Documentation
¶
Overview ¶
Package installcmd ships TAI's own bundled slash-command assets into every configured target's `<commands>/tai/` subdirectory.
The `tai/` subdirectory is treated as a TAI-owned namespace — re-runs overwrite files within it and remove built-ins the running binary no longer bundles, but content outside `tai/` is preserved untouched. Because the subdirectory is wholly TAI-owned, no manifest is needed: the next run computes target state from the currently-embedded bundle.
See openspec/changes/pivot-to-ai-as-code/specs/install-commands/ spec.md for the normative behaviour.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BundledFiles ¶
BundledFiles is the test-only accessor for bundledFiles. Exported solely so e2e tests in core/internal/cmd_test (a different package, so it cannot reach `bundledFiles` directly) can assert what the running binary ships. The `core/internal/` import path keeps this symbol unreachable from any module outside `tai`; no `tai` production code should call it.
Types ¶
type Result ¶
type Result struct {
// Targets is the number of targets that received the bundle
// (i.e. excluding targets skipped via a falsy `commands`
// sub-path).
Targets int
// Written is the count of bundled-file writes across all
// targets. Equal to Targets * len(bundled-files) when no target
// is skipped.
Written int
// Removed is the count of stale built-ins deleted across all
// targets (files present under `<root>/<commands>/tai/` whose
// names are no longer in the running binary's bundle).
Removed int
// Skipped is the count of targets bypassed because their
// `commands` sub-path is falsy ("").
Skipped int
}
Result describes what Install did. Counts are aggregated across every configured target.
func Install ¶
Install copies every bundled built-in command into `<target.root>/<target.commands>/tai/` for each configured target, then deletes any files in that subdirectory whose names are no longer in the bundle. Warnings (e.g. falsy-skip notices) are written to stderr.
Returns *errcode.Error{Code: TaiNotConfigured} when cfg has no targets.