@hashicorp/kits 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +619 -0
- package/bin/kits.js +8 -0
- package/dist/adapters/base-adapter.d.ts +231 -0
- package/dist/adapters/base-adapter.d.ts.map +1 -0
- package/dist/adapters/base-adapter.js +703 -0
- package/dist/adapters/base-adapter.js.map +1 -0
- package/dist/adapters/claude-code/detection.d.ts +63 -0
- package/dist/adapters/claude-code/detection.d.ts.map +1 -0
- package/dist/adapters/claude-code/detection.js +154 -0
- package/dist/adapters/claude-code/detection.js.map +1 -0
- package/dist/adapters/claude-code/index.d.ts +178 -0
- package/dist/adapters/claude-code/index.d.ts.map +1 -0
- package/dist/adapters/claude-code/index.js +643 -0
- package/dist/adapters/claude-code/index.js.map +1 -0
- package/dist/adapters/claude-code/installer.d.ts +161 -0
- package/dist/adapters/claude-code/installer.d.ts.map +1 -0
- package/dist/adapters/claude-code/installer.js +413 -0
- package/dist/adapters/claude-code/installer.js.map +1 -0
- package/dist/adapters/claude-code/model-mapping.d.ts +7 -0
- package/dist/adapters/claude-code/model-mapping.d.ts.map +1 -0
- package/dist/adapters/claude-code/model-mapping.js +14 -0
- package/dist/adapters/claude-code/model-mapping.js.map +1 -0
- package/dist/adapters/claude-code/tool-mapping.d.ts +18 -0
- package/dist/adapters/claude-code/tool-mapping.d.ts.map +1 -0
- package/dist/adapters/claude-code/tool-mapping.js +31 -0
- package/dist/adapters/claude-code/tool-mapping.js.map +1 -0
- package/dist/adapters/codex/detection.d.ts +60 -0
- package/dist/adapters/codex/detection.d.ts.map +1 -0
- package/dist/adapters/codex/detection.js +146 -0
- package/dist/adapters/codex/detection.js.map +1 -0
- package/dist/adapters/codex/index.d.ts +167 -0
- package/dist/adapters/codex/index.d.ts.map +1 -0
- package/dist/adapters/codex/index.js +344 -0
- package/dist/adapters/codex/index.js.map +1 -0
- package/dist/adapters/codex/installer.d.ts +147 -0
- package/dist/adapters/codex/installer.d.ts.map +1 -0
- package/dist/adapters/codex/installer.js +229 -0
- package/dist/adapters/codex/installer.js.map +1 -0
- package/dist/adapters/codex/model-mapping.d.ts +7 -0
- package/dist/adapters/codex/model-mapping.d.ts.map +1 -0
- package/dist/adapters/codex/model-mapping.js +14 -0
- package/dist/adapters/codex/model-mapping.js.map +1 -0
- package/dist/adapters/codex/tool-mapping.d.ts +19 -0
- package/dist/adapters/codex/tool-mapping.d.ts.map +1 -0
- package/dist/adapters/codex/tool-mapping.js +32 -0
- package/dist/adapters/codex/tool-mapping.js.map +1 -0
- package/dist/adapters/command-parser.d.ts +72 -0
- package/dist/adapters/command-parser.d.ts.map +1 -0
- package/dist/adapters/command-parser.js +222 -0
- package/dist/adapters/command-parser.js.map +1 -0
- package/dist/adapters/file-operations.d.ts +164 -0
- package/dist/adapters/file-operations.d.ts.map +1 -0
- package/dist/adapters/file-operations.js +526 -0
- package/dist/adapters/file-operations.js.map +1 -0
- package/dist/adapters/gemini-cli/detection.d.ts +57 -0
- package/dist/adapters/gemini-cli/detection.d.ts.map +1 -0
- package/dist/adapters/gemini-cli/detection.js +143 -0
- package/dist/adapters/gemini-cli/detection.js.map +1 -0
- package/dist/adapters/gemini-cli/index.d.ts +182 -0
- package/dist/adapters/gemini-cli/index.d.ts.map +1 -0
- package/dist/adapters/gemini-cli/index.js +598 -0
- package/dist/adapters/gemini-cli/index.js.map +1 -0
- package/dist/adapters/gemini-cli/installer.d.ts +158 -0
- package/dist/adapters/gemini-cli/installer.d.ts.map +1 -0
- package/dist/adapters/gemini-cli/installer.js +457 -0
- package/dist/adapters/gemini-cli/installer.js.map +1 -0
- package/dist/adapters/gemini-cli/model-mapping.d.ts +7 -0
- package/dist/adapters/gemini-cli/model-mapping.d.ts.map +1 -0
- package/dist/adapters/gemini-cli/model-mapping.js +14 -0
- package/dist/adapters/gemini-cli/model-mapping.js.map +1 -0
- package/dist/adapters/gemini-cli/tool-mapping.d.ts +18 -0
- package/dist/adapters/gemini-cli/tool-mapping.d.ts.map +1 -0
- package/dist/adapters/gemini-cli/tool-mapping.js +31 -0
- package/dist/adapters/gemini-cli/tool-mapping.js.map +1 -0
- package/dist/adapters/github-copilot/detection.d.ts +58 -0
- package/dist/adapters/github-copilot/detection.d.ts.map +1 -0
- package/dist/adapters/github-copilot/detection.js +144 -0
- package/dist/adapters/github-copilot/detection.js.map +1 -0
- package/dist/adapters/github-copilot/index.d.ts +203 -0
- package/dist/adapters/github-copilot/index.d.ts.map +1 -0
- package/dist/adapters/github-copilot/index.js +595 -0
- package/dist/adapters/github-copilot/index.js.map +1 -0
- package/dist/adapters/github-copilot/installer.d.ts +124 -0
- package/dist/adapters/github-copilot/installer.d.ts.map +1 -0
- package/dist/adapters/github-copilot/installer.js +343 -0
- package/dist/adapters/github-copilot/installer.js.map +1 -0
- package/dist/adapters/github-copilot/model-mapping.d.ts +7 -0
- package/dist/adapters/github-copilot/model-mapping.d.ts.map +1 -0
- package/dist/adapters/github-copilot/model-mapping.js +14 -0
- package/dist/adapters/github-copilot/model-mapping.js.map +1 -0
- package/dist/adapters/github-copilot/tool-mapping.d.ts +18 -0
- package/dist/adapters/github-copilot/tool-mapping.d.ts.map +1 -0
- package/dist/adapters/github-copilot/tool-mapping.js +31 -0
- package/dist/adapters/github-copilot/tool-mapping.js.map +1 -0
- package/dist/adapters/index.d.ts +39 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +76 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/interface.d.ts +9 -0
- package/dist/adapters/interface.d.ts.map +1 -0
- package/dist/adapters/interface.js +8 -0
- package/dist/adapters/interface.js.map +1 -0
- package/dist/adapters/model-templating.d.ts +16 -0
- package/dist/adapters/model-templating.d.ts.map +1 -0
- package/dist/adapters/model-templating.js +52 -0
- package/dist/adapters/model-templating.js.map +1 -0
- package/dist/adapters/opencode/detection.d.ts +57 -0
- package/dist/adapters/opencode/detection.d.ts.map +1 -0
- package/dist/adapters/opencode/detection.js +140 -0
- package/dist/adapters/opencode/detection.js.map +1 -0
- package/dist/adapters/opencode/index.d.ts +168 -0
- package/dist/adapters/opencode/index.d.ts.map +1 -0
- package/dist/adapters/opencode/index.js +494 -0
- package/dist/adapters/opencode/index.js.map +1 -0
- package/dist/adapters/opencode/installer.d.ts +91 -0
- package/dist/adapters/opencode/installer.d.ts.map +1 -0
- package/dist/adapters/opencode/installer.js +290 -0
- package/dist/adapters/opencode/installer.js.map +1 -0
- package/dist/adapters/opencode/model-mapping.d.ts +7 -0
- package/dist/adapters/opencode/model-mapping.d.ts.map +1 -0
- package/dist/adapters/opencode/model-mapping.js +14 -0
- package/dist/adapters/opencode/model-mapping.js.map +1 -0
- package/dist/adapters/opencode/tool-mapping.d.ts +18 -0
- package/dist/adapters/opencode/tool-mapping.d.ts.map +1 -0
- package/dist/adapters/opencode/tool-mapping.js +31 -0
- package/dist/adapters/opencode/tool-mapping.js.map +1 -0
- package/dist/adapters/registry.d.ts +154 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +223 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/skill-frontmatter.d.ts +34 -0
- package/dist/adapters/skill-frontmatter.d.ts.map +1 -0
- package/dist/adapters/skill-frontmatter.js +110 -0
- package/dist/adapters/skill-frontmatter.js.map +1 -0
- package/dist/adapters/subagent-frontmatter.d.ts +22 -0
- package/dist/adapters/subagent-frontmatter.d.ts.map +1 -0
- package/dist/adapters/subagent-frontmatter.js +80 -0
- package/dist/adapters/subagent-frontmatter.js.map +1 -0
- package/dist/adapters/tool-templating.d.ts +162 -0
- package/dist/adapters/tool-templating.d.ts.map +1 -0
- package/dist/adapters/tool-templating.js +273 -0
- package/dist/adapters/tool-templating.js.map +1 -0
- package/dist/adapters/types.d.ts +347 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +33 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/cli/index.d.ts +10 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +261 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/info.d.ts +20 -0
- package/dist/cli/info.d.ts.map +1 -0
- package/dist/cli/info.js +194 -0
- package/dist/cli/info.js.map +1 -0
- package/dist/cli/install.d.ts +21 -0
- package/dist/cli/install.d.ts.map +1 -0
- package/dist/cli/install.js +1624 -0
- package/dist/cli/install.js.map +1 -0
- package/dist/cli/list.d.ts +19 -0
- package/dist/cli/list.d.ts.map +1 -0
- package/dist/cli/list.js +216 -0
- package/dist/cli/list.js.map +1 -0
- package/dist/cli/types.d.ts +246 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +25 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/uninstall.d.ts +20 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +393 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/cli/upgrade.d.ts +20 -0
- package/dist/cli/upgrade.d.ts.map +1 -0
- package/dist/cli/upgrade.js +372 -0
- package/dist/cli/upgrade.js.map +1 -0
- package/dist/cli/validate.d.ts +14 -0
- package/dist/cli/validate.d.ts.map +1 -0
- package/dist/cli/validate.js +307 -0
- package/dist/cli/validate.js.map +1 -0
- package/dist/core/debug.d.ts +23 -0
- package/dist/core/debug.d.ts.map +1 -0
- package/dist/core/debug.js +69 -0
- package/dist/core/debug.js.map +1 -0
- package/dist/core/hook-instance.d.ts +8 -0
- package/dist/core/hook-instance.d.ts.map +1 -0
- package/dist/core/hook-instance.js +62 -0
- package/dist/core/hook-instance.js.map +1 -0
- package/dist/core/mcp-instance.d.ts +13 -0
- package/dist/core/mcp-instance.d.ts.map +1 -0
- package/dist/core/mcp-instance.js +80 -0
- package/dist/core/mcp-instance.js.map +1 -0
- package/dist/core/types.d.ts +461 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +42 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/upgrade-executor.d.ts +70 -0
- package/dist/core/upgrade-executor.d.ts.map +1 -0
- package/dist/core/upgrade-executor.js +368 -0
- package/dist/core/upgrade-executor.js.map +1 -0
- package/dist/discovery/fetcher-registry.d.ts +87 -0
- package/dist/discovery/fetcher-registry.d.ts.map +1 -0
- package/dist/discovery/fetcher-registry.js +119 -0
- package/dist/discovery/fetcher-registry.js.map +1 -0
- package/dist/discovery/git-fetcher.d.ts +61 -0
- package/dist/discovery/git-fetcher.d.ts.map +1 -0
- package/dist/discovery/git-fetcher.js +150 -0
- package/dist/discovery/git-fetcher.js.map +1 -0
- package/dist/discovery/index.d.ts +13 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +15 -0
- package/dist/discovery/index.js.map +1 -0
- package/dist/discovery/kit-scanner.d.ts +55 -0
- package/dist/discovery/kit-scanner.d.ts.map +1 -0
- package/dist/discovery/kit-scanner.js +305 -0
- package/dist/discovery/kit-scanner.js.map +1 -0
- package/dist/discovery/local-fetcher.d.ts +38 -0
- package/dist/discovery/local-fetcher.d.ts.map +1 -0
- package/dist/discovery/local-fetcher.js +100 -0
- package/dist/discovery/local-fetcher.js.map +1 -0
- package/dist/discovery/source-parser.d.ts +33 -0
- package/dist/discovery/source-parser.d.ts.map +1 -0
- package/dist/discovery/source-parser.js +136 -0
- package/dist/discovery/source-parser.js.map +1 -0
- package/dist/discovery/types.d.ts +145 -0
- package/dist/discovery/types.d.ts.map +1 -0
- package/dist/discovery/types.js +18 -0
- package/dist/discovery/types.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest/index.d.ts +79 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +200 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/manifest/read.d.ts +32 -0
- package/dist/manifest/read.d.ts.map +1 -0
- package/dist/manifest/read.js +88 -0
- package/dist/manifest/read.js.map +1 -0
- package/dist/manifest/types.d.ts +119 -0
- package/dist/manifest/types.d.ts.map +1 -0
- package/dist/manifest/types.js +44 -0
- package/dist/manifest/types.js.map +1 -0
- package/dist/manifest/upgrade-check.d.ts +72 -0
- package/dist/manifest/upgrade-check.d.ts.map +1 -0
- package/dist/manifest/upgrade-check.js +215 -0
- package/dist/manifest/upgrade-check.js.map +1 -0
- package/dist/manifest/utils.d.ts +35 -0
- package/dist/manifest/utils.d.ts.map +1 -0
- package/dist/manifest/utils.js +57 -0
- package/dist/manifest/utils.js.map +1 -0
- package/dist/manifest/write.d.ts +44 -0
- package/dist/manifest/write.d.ts.map +1 -0
- package/dist/manifest/write.js +77 -0
- package/dist/manifest/write.js.map +1 -0
- package/dist/resolution/env-resolver.d.ts +81 -0
- package/dist/resolution/env-resolver.d.ts.map +1 -0
- package/dist/resolution/env-resolver.js +233 -0
- package/dist/resolution/env-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +55 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +412 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/multi-kit-resolver.d.ts +43 -0
- package/dist/resolution/multi-kit-resolver.d.ts.map +1 -0
- package/dist/resolution/multi-kit-resolver.js +258 -0
- package/dist/resolution/multi-kit-resolver.js.map +1 -0
- package/dist/resolution/primitive-paths.d.ts +17 -0
- package/dist/resolution/primitive-paths.d.ts.map +1 -0
- package/dist/resolution/primitive-paths.js +59 -0
- package/dist/resolution/primitive-paths.js.map +1 -0
- package/dist/resolution/primitives-registry.d.ts +137 -0
- package/dist/resolution/primitives-registry.d.ts.map +1 -0
- package/dist/resolution/primitives-registry.js +295 -0
- package/dist/resolution/primitives-registry.js.map +1 -0
- package/dist/resolution/reference-parser.d.ts +62 -0
- package/dist/resolution/reference-parser.d.ts.map +1 -0
- package/dist/resolution/reference-parser.js +182 -0
- package/dist/resolution/reference-parser.js.map +1 -0
- package/dist/resolution/types.d.ts +77 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +13 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/resolution/version-resolver.d.ts +76 -0
- package/dist/resolution/version-resolver.d.ts.map +1 -0
- package/dist/resolution/version-resolver.js +269 -0
- package/dist/resolution/version-resolver.js.map +1 -0
- package/dist/tui/compatibility.d.ts +80 -0
- package/dist/tui/compatibility.d.ts.map +1 -0
- package/dist/tui/compatibility.js +355 -0
- package/dist/tui/compatibility.js.map +1 -0
- package/dist/tui/env-prompt.d.ts +129 -0
- package/dist/tui/env-prompt.d.ts.map +1 -0
- package/dist/tui/env-prompt.js +488 -0
- package/dist/tui/env-prompt.js.map +1 -0
- package/dist/tui/harness-select.d.ts +54 -0
- package/dist/tui/harness-select.d.ts.map +1 -0
- package/dist/tui/harness-select.js +171 -0
- package/dist/tui/harness-select.js.map +1 -0
- package/dist/tui/index.d.ts +112 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +213 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/kit-select.d.ts +72 -0
- package/dist/tui/kit-select.d.ts.map +1 -0
- package/dist/tui/kit-select.js +209 -0
- package/dist/tui/kit-select.js.map +1 -0
- package/dist/tui/progress.d.ts +75 -0
- package/dist/tui/progress.d.ts.map +1 -0
- package/dist/tui/progress.js +267 -0
- package/dist/tui/progress.js.map +1 -0
- package/dist/tui/resolution.d.ts +62 -0
- package/dist/tui/resolution.d.ts.map +1 -0
- package/dist/tui/resolution.js +261 -0
- package/dist/tui/resolution.js.map +1 -0
- package/dist/tui/scope-compatibility.d.ts +139 -0
- package/dist/tui/scope-compatibility.d.ts.map +1 -0
- package/dist/tui/scope-compatibility.js +230 -0
- package/dist/tui/scope-compatibility.js.map +1 -0
- package/dist/tui/scope-select.d.ts +67 -0
- package/dist/tui/scope-select.d.ts.map +1 -0
- package/dist/tui/scope-select.js +134 -0
- package/dist/tui/scope-select.js.map +1 -0
- package/dist/tui/spinner.d.ts +114 -0
- package/dist/tui/spinner.d.ts.map +1 -0
- package/dist/tui/spinner.js +186 -0
- package/dist/tui/spinner.js.map +1 -0
- package/dist/tui/summary.d.ts +71 -0
- package/dist/tui/summary.d.ts.map +1 -0
- package/dist/tui/summary.js +343 -0
- package/dist/tui/summary.js.map +1 -0
- package/dist/tui/types.d.ts +234 -0
- package/dist/tui/types.d.ts.map +1 -0
- package/dist/tui/types.js +7 -0
- package/dist/tui/types.js.map +1 -0
- package/dist/tui/upgrade-select.d.ts +73 -0
- package/dist/tui/upgrade-select.d.ts.map +1 -0
- package/dist/tui/upgrade-select.js +324 -0
- package/dist/tui/upgrade-select.js.map +1 -0
- package/dist/validation/index.d.ts +13 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +13 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/source.d.ts +14 -0
- package/dist/validation/source.d.ts.map +1 -0
- package/dist/validation/source.js +51 -0
- package/dist/validation/source.js.map +1 -0
- package/dist/validation/utils.d.ts +29 -0
- package/dist/validation/utils.d.ts.map +1 -0
- package/dist/validation/utils.js +89 -0
- package/dist/validation/utils.js.map +1 -0
- package/dist/validation/validate-commands.d.ts +28 -0
- package/dist/validation/validate-commands.d.ts.map +1 -0
- package/dist/validation/validate-commands.js +151 -0
- package/dist/validation/validate-commands.js.map +1 -0
- package/dist/validation/validate-hooks.d.ts +13 -0
- package/dist/validation/validate-hooks.d.ts.map +1 -0
- package/dist/validation/validate-hooks.js +272 -0
- package/dist/validation/validate-hooks.js.map +1 -0
- package/dist/validation/validate-kits.d.ts +15 -0
- package/dist/validation/validate-kits.d.ts.map +1 -0
- package/dist/validation/validate-kits.js +185 -0
- package/dist/validation/validate-kits.js.map +1 -0
- package/dist/validation/validate-mcp.d.ts +12 -0
- package/dist/validation/validate-mcp.d.ts.map +1 -0
- package/dist/validation/validate-mcp.js +132 -0
- package/dist/validation/validate-mcp.js.map +1 -0
- package/dist/validation/validate-skills.d.ts +24 -0
- package/dist/validation/validate-skills.d.ts.map +1 -0
- package/dist/validation/validate-skills.js +223 -0
- package/dist/validation/validate-skills.js.map +1 -0
- package/dist/validation/validate-subagents.d.ts +27 -0
- package/dist/validation/validate-subagents.d.ts.map +1 -0
- package/dist/validation/validate-subagents.js +269 -0
- package/dist/validation/validate-subagents.js.map +1 -0
- package/package.json +91 -0
- package/schemas/command.schema.json +23 -0
- package/schemas/examples/hook-binding-valid.json +20 -0
- package/schemas/examples/hook-program-valid.json +25 -0
- package/schemas/examples/http-server-valid.json +82 -0
- package/schemas/examples/invalid-sensitive-header-no-envvar.json +16 -0
- package/schemas/examples/invalid-sensitive-header-with-value.json +17 -0
- package/schemas/examples/invalid-sensitive-var-with-default.json +19 -0
- package/schemas/examples/stdio-server-valid.json +55 -0
- package/schemas/hook-binding.schema.json +63 -0
- package/schemas/hook-program.schema.json +104 -0
- package/schemas/kit.schema.json +338 -0
- package/schemas/kits.schema.json +117 -0
- package/schemas/manifest.schema.json +200 -0
- package/schemas/mcp-server.schema.json +305 -0
- package/schemas/primitives.schema.json +118 -0
- package/schemas/skill.schema.json +96 -0
- package/schemas/subagent.schema.json +107 -0
package/README.md
ADDED
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
# @hashicorp/kits
|
|
2
|
+
|
|
3
|
+
Install AI agent kits into your favorite coding assistants.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Kit Installer is a CLI tool that discovers, validates, and installs AI agent kits from kit repositories into various AI coding assistant harnesses. It supports multiple harnesses including Claude Code, Codex, Gemini CLI, GitHub Copilot, and OpenCode.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run directly with npx (recommended)
|
|
13
|
+
npx @hashicorp/kits install example-org/kits
|
|
14
|
+
|
|
15
|
+
# Or install globally
|
|
16
|
+
npm install -g @hashicorp/kits
|
|
17
|
+
kits install example-org/kits
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To validate kit repositories, use the built-in validate command:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @hashicorp/kits validate ./agent-kits
|
|
24
|
+
npx @hashicorp/kits validate --commands example-org/kits
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Interactive installation - guides you through selection
|
|
31
|
+
npx @hashicorp/kits install example-org/kits
|
|
32
|
+
|
|
33
|
+
# Install to global scope (user-level, available in all projects)
|
|
34
|
+
npx @hashicorp/kits install example-org/kits --global -y
|
|
35
|
+
|
|
36
|
+
# Install to project scope (current directory only)
|
|
37
|
+
npx @hashicorp/kits install example-org/kits --project -y
|
|
38
|
+
|
|
39
|
+
# Install specific kit to specific harness
|
|
40
|
+
npx @hashicorp/kits install example-org/kits \
|
|
41
|
+
-a claude-code \
|
|
42
|
+
-k terraform-development \
|
|
43
|
+
--global
|
|
44
|
+
|
|
45
|
+
# List available kits without installing
|
|
46
|
+
npx @hashicorp/kits install example-org/kits -l
|
|
47
|
+
|
|
48
|
+
# Check what would be installed (dry run)
|
|
49
|
+
npx @hashicorp/kits install example-org/kits --global --dry-run
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Commands
|
|
53
|
+
|
|
54
|
+
### Install
|
|
55
|
+
|
|
56
|
+
Installs kits from a source repository.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
kits install <source> [options]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Options:**
|
|
63
|
+
|
|
64
|
+
| Flag | Description |
|
|
65
|
+
|------|-------------|
|
|
66
|
+
| `-a, --agent <name...>` | Target specific harness(es) |
|
|
67
|
+
| `-k, --kit <name...>` | Install specific kit(s) |
|
|
68
|
+
| `-g, --global` | Install to global scope (user-level, available in all projects) |
|
|
69
|
+
| `-p, --project` | Install to project scope (current directory only) |
|
|
70
|
+
| `-e, --env <KEY=VALUE>` | Set environment variable for MCP servers (repeatable; nonsensitive only) |
|
|
71
|
+
| `--mcp-instance <KIT:NAME=VALUE>` | Override MCP instance name for a specific kit (repeatable) |
|
|
72
|
+
| `-l, --list` | List available kits without installing |
|
|
73
|
+
| `-y, --yes` | Non-interactive mode, accept defaults |
|
|
74
|
+
| `--dry-run` | Show what would be installed |
|
|
75
|
+
| `--json` | Output results as JSON |
|
|
76
|
+
| `-v, --verbose` | Enable verbose logging |
|
|
77
|
+
| `--debug` | Enable debug logging to `~/.config/agent-kit/debug.log` |
|
|
78
|
+
|
|
79
|
+
**Note:** In non-interactive mode (`-y`), one of `--global` or `--project` is required.
|
|
80
|
+
|
|
81
|
+
**Examples:**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Interactive installation (prompts for scope selection)
|
|
85
|
+
npx @hashicorp/kits install example-org/kits
|
|
86
|
+
|
|
87
|
+
# Install to global scope (user-level)
|
|
88
|
+
npx @hashicorp/kits install example-org/kits --global -y
|
|
89
|
+
|
|
90
|
+
# Install to project scope (current directory)
|
|
91
|
+
npx @hashicorp/kits install example-org/kits --project -y
|
|
92
|
+
|
|
93
|
+
# Install to Claude Code only at global scope
|
|
94
|
+
npx @hashicorp/kits install example-org/kits -a claude-code --global
|
|
95
|
+
|
|
96
|
+
# Install specific kits at project scope
|
|
97
|
+
npx @hashicorp/kits install example-org/kits \
|
|
98
|
+
-k terraform-development \
|
|
99
|
+
-k vault-operations \
|
|
100
|
+
--project
|
|
101
|
+
|
|
102
|
+
# Override MCP instance name for a specific kit
|
|
103
|
+
npx @hashicorp/kits install example-org/kits \
|
|
104
|
+
-k terraform-development \
|
|
105
|
+
--mcp-instance terraform-development:terraform=terraform-prod \
|
|
106
|
+
--global
|
|
107
|
+
|
|
108
|
+
# Non-interactive with all options
|
|
109
|
+
npx @hashicorp/kits install example-org/kits \
|
|
110
|
+
-a claude-code \
|
|
111
|
+
-k terraform-development \
|
|
112
|
+
--global \
|
|
113
|
+
-y
|
|
114
|
+
|
|
115
|
+
# Install from local directory (for development)
|
|
116
|
+
npx @hashicorp/kits install ./my-kits -a claude-code --project
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Integration Tests (Devcontainer)
|
|
120
|
+
|
|
121
|
+
The integration suite runs the real CLI against the local `test-kits/` repository using non-interactive JSON output. It is intended to run inside the devcontainer so harness CLIs are available and filesystem isolation is preserved.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run test:integration
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Integration tests are organized by intent under `tests/integration/`:
|
|
128
|
+
- `cli/` for CLI command behavior
|
|
129
|
+
- `primitives/` for primitive-specific scenarios
|
|
130
|
+
- `harnesses/` for harness-specific scenarios
|
|
131
|
+
- `scopes/` for scope-specific scenarios
|
|
132
|
+
- `validators/` for validator binaries (using `test-kits/fixtures/invalid/`)
|
|
133
|
+
|
|
134
|
+
### Uninstall
|
|
135
|
+
|
|
136
|
+
Removes installed kits.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
kits uninstall <kit-name> [options]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Options:**
|
|
143
|
+
|
|
144
|
+
| Flag | Description |
|
|
145
|
+
|------|-------------|
|
|
146
|
+
| `-a, --agent <name...>` | Target specific harness(es) |
|
|
147
|
+
| `-g, --global` | Uninstall from global scope |
|
|
148
|
+
| `-p, --project` | Uninstall from project scope |
|
|
149
|
+
| `-y, --yes` | Non-interactive mode |
|
|
150
|
+
| `--json` | Output results as JSON |
|
|
151
|
+
|
|
152
|
+
**Note:** In non-interactive mode (`-y`), one of `--global` or `--project` is required.
|
|
153
|
+
|
|
154
|
+
**Examples:**
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Interactive uninstall (prompts for scope selection)
|
|
158
|
+
npx @hashicorp/kits uninstall terraform-development
|
|
159
|
+
|
|
160
|
+
# Uninstall from global scope
|
|
161
|
+
npx @hashicorp/kits uninstall terraform-development --global -y
|
|
162
|
+
|
|
163
|
+
# Uninstall from project scope
|
|
164
|
+
npx @hashicorp/kits uninstall terraform-development --project -y
|
|
165
|
+
|
|
166
|
+
# Uninstall from specific harness at global scope
|
|
167
|
+
npx @hashicorp/kits uninstall terraform-development -a claude-code --global -y
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Upgrade
|
|
171
|
+
|
|
172
|
+
Checks for and applies primitive updates.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
kits upgrade [options]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Options:**
|
|
179
|
+
|
|
180
|
+
| Flag | Description |
|
|
181
|
+
|------|-------------|
|
|
182
|
+
| `-s, --source <source>` | Kit repository source |
|
|
183
|
+
| `-a, --agent <name...>` | Target specific harness(es) |
|
|
184
|
+
| `-k, --kit <name...>` | Upgrade specific kit(s) only |
|
|
185
|
+
| `-g, --global` | Upgrade global scope installations (required) |
|
|
186
|
+
| `-p, --project` | Upgrade project scope installations (required) |
|
|
187
|
+
| `-c, --check` | Check for updates without installing |
|
|
188
|
+
| `-y, --yes` | Non-interactive mode |
|
|
189
|
+
| `--json` | Output results as JSON |
|
|
190
|
+
|
|
191
|
+
**Note:** Unlike install, upgrade always requires `--global` or `--project` (no TUI prompt).
|
|
192
|
+
|
|
193
|
+
**Examples:**
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Check for available upgrades at global scope
|
|
197
|
+
npx @hashicorp/kits upgrade --check --global
|
|
198
|
+
|
|
199
|
+
# Check for available upgrades at project scope
|
|
200
|
+
npx @hashicorp/kits upgrade --check --project
|
|
201
|
+
|
|
202
|
+
# Interactive upgrade at global scope
|
|
203
|
+
npx @hashicorp/kits upgrade -s example-org/kits --global
|
|
204
|
+
|
|
205
|
+
# Upgrade all automatically at project scope
|
|
206
|
+
npx @hashicorp/kits upgrade -s example-org/kits --project -y
|
|
207
|
+
|
|
208
|
+
# Upgrade specific kit at global scope
|
|
209
|
+
npx @hashicorp/kits upgrade \
|
|
210
|
+
-s example-org/kits \
|
|
211
|
+
-k terraform-development \
|
|
212
|
+
--global
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Validate
|
|
216
|
+
|
|
217
|
+
Validate primitive files in a kit repository. Validators accept either a local path or GitHub shorthand (`org/repo[@ref]`).
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Validate an entire repository (all types)
|
|
221
|
+
npx @hashicorp/kits validate ./agent-kits
|
|
222
|
+
|
|
223
|
+
# Validate commands in a GitHub repo
|
|
224
|
+
npx @hashicorp/kits validate --commands example-org/kits
|
|
225
|
+
|
|
226
|
+
# Validate skills at a specific ref
|
|
227
|
+
npx @hashicorp/kits validate --skills example-org/kits@v1.2.3
|
|
228
|
+
|
|
229
|
+
# Validate hook programs in a local path
|
|
230
|
+
npx @hashicorp/kits validate --hooks ./agent-kits
|
|
231
|
+
|
|
232
|
+
# Validate MCP configs in a local path
|
|
233
|
+
npx @hashicorp/kits validate --mcp ./agent-kits
|
|
234
|
+
|
|
235
|
+
# Validate kit manifests and kits.json registry
|
|
236
|
+
npx @hashicorp/kits validate --kits ./agent-kits
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
If you install the package globally, the validate command is available directly:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
npm install -g @hashicorp/kits
|
|
243
|
+
kits validate example-org/kits
|
|
244
|
+
kits validate --skills example-org/kits@v1.2.3
|
|
245
|
+
kits validate --subagents example-org/kits
|
|
246
|
+
kits validate --hooks ./agent-kits
|
|
247
|
+
kits validate --mcp ./agent-kits
|
|
248
|
+
kits validate --kits ./agent-kits
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### List
|
|
252
|
+
|
|
253
|
+
Lists detected harnesses or installed kits.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
kits list harnesses # Show detected AI harnesses
|
|
257
|
+
kits list kits # Show installed kits (both scopes)
|
|
258
|
+
kits list kits --global # Show global scope only
|
|
259
|
+
kits list kits --project # Show project scope only
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
When listing kits, results are grouped by scope. Use `--global` or `--project` to filter to a specific scope.
|
|
263
|
+
|
|
264
|
+
### Info
|
|
265
|
+
|
|
266
|
+
Shows information about a kit repository or specific kit.
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
kits info <source> [options]
|
|
270
|
+
kits info <source> -k <kit-name> # Specific kit info
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Supported Harnesses
|
|
274
|
+
|
|
275
|
+
| Harness | Commands | Skills | Subagents | MCP | Hooks |
|
|
276
|
+
|---------|----------|--------|-----------|-----|-------|
|
|
277
|
+
| Claude Code | Yes | Yes | Yes | Yes | Yes |
|
|
278
|
+
| Codex | Yes | Yes | No | Yes | No |
|
|
279
|
+
| Gemini CLI | Yes | Experimental | Experimental | Yes | Yes |
|
|
280
|
+
| GitHub Copilot | Partial | Yes | Yes | Yes | Limited |
|
|
281
|
+
| OpenCode | Yes | Yes | Yes | Yes | Yes |
|
|
282
|
+
|
|
283
|
+
## Installation Scopes
|
|
284
|
+
|
|
285
|
+
Kits can be installed at two scopes:
|
|
286
|
+
|
|
287
|
+
### Global Scope (`--global`)
|
|
288
|
+
|
|
289
|
+
Installs to user-level harness directories, making primitives available across all projects.
|
|
290
|
+
|
|
291
|
+
| Harness | Primitives Directory | Config Location |
|
|
292
|
+
|---------|---------------------|-----------------|
|
|
293
|
+
| Claude Code | `~/.claude/commands/`, `~/.claude/skills/`, `~/.claude/agents/` | `~/.claude/settings.json`, `~/.claude.json` |
|
|
294
|
+
| Codex | `~/.codex/prompts/`, `~/.codex/skills/` | `~/.codex/config.toml` |
|
|
295
|
+
| Gemini CLI | `~/.gemini/commands/`, `~/.gemini/skills/` | `~/.gemini/settings.json` |
|
|
296
|
+
| GitHub Copilot | `~/.copilot/prompts/`, `~/.copilot/skills/`, `~/.copilot/agents/` | `~/.copilot/config.json` |
|
|
297
|
+
| OpenCode | `~/.config/opencode/commands/`, `~/.config/opencode/skills/`, `~/.config/opencode/agents/` | `~/.config/opencode/opencode.json` |
|
|
298
|
+
|
|
299
|
+
### Project Scope (`--project`)
|
|
300
|
+
|
|
301
|
+
Installs to repository-level harness directories, making primitives available only within that project. Project-scope installations can be committed to version control for team sharing.
|
|
302
|
+
|
|
303
|
+
| Harness | Primitives Directory | Config Location |
|
|
304
|
+
|---------|---------------------|-----------------|
|
|
305
|
+
| Claude Code | `.claude/commands/`, `.claude/skills/`, `.claude/agents/` | `.claude/settings.json`, `.mcp.json` |
|
|
306
|
+
| Codex | `.codex/skills/` | `.codex/config.toml` |
|
|
307
|
+
| Gemini CLI | `.gemini/commands/`, `.gemini/skills/` | `.gemini/settings.json` |
|
|
308
|
+
| GitHub Copilot | `.github/skills/`, `.github/agents/` | `.vscode/mcp.json` |
|
|
309
|
+
| OpenCode | `.opencode/commands/`, `.opencode/skills/`, `.opencode/agents/` | `opencode.json` |
|
|
310
|
+
|
|
311
|
+
### Scope Limitations
|
|
312
|
+
|
|
313
|
+
Not all primitive types are available at project scope for all harnesses:
|
|
314
|
+
|
|
315
|
+
| Harness | Commands | Skills | Subagents | MCP | Hooks |
|
|
316
|
+
|---------|----------|--------|-----------|-----|-------|
|
|
317
|
+
| Claude Code | Global + Project | Global + Project | Global + Project | Global + Project | Global + Project |
|
|
318
|
+
| Codex | **Global only** | Global + Project | N/A | **Global only** | N/A |
|
|
319
|
+
| Gemini CLI | Global + Project | Global + Project | Global + Project | Global + Project | Global + Project |
|
|
320
|
+
| GitHub Copilot | Global + Project | Global + Project | Global + Project | Global + Project | Limited |
|
|
321
|
+
| OpenCode | Global + Project | Global + Project | Global + Project | Global + Project | Global + Project |
|
|
322
|
+
|
|
323
|
+
When a kit requires primitives that cannot be installed at project scope for a given harness, the installer will report this as a compatibility issue and suggest using `--global` instead.
|
|
324
|
+
|
|
325
|
+
## Source Formats
|
|
326
|
+
|
|
327
|
+
The installer supports multiple source formats:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# GitHub shorthand (org/repo)
|
|
331
|
+
example-org/kits
|
|
332
|
+
|
|
333
|
+
# GitHub with specific version/branch
|
|
334
|
+
example-org/kits@v1.0.0
|
|
335
|
+
example-org/kits@main
|
|
336
|
+
|
|
337
|
+
# Local path (for development)
|
|
338
|
+
./my-kits
|
|
339
|
+
/absolute/path/to/kits
|
|
340
|
+
~/path/to/kits
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Primitive Resolution
|
|
344
|
+
|
|
345
|
+
Kits can reference primitives from a shared primitives library using version specs:
|
|
346
|
+
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"primitives": {
|
|
350
|
+
"commands": [
|
|
351
|
+
{ "ref": "tf-plan@^1.0.0" },
|
|
352
|
+
{ "ref": "tf-apply@~1.1.0" },
|
|
353
|
+
{ "ref": "tf-validate@latest" }
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
The installer resolves these references at install time:
|
|
360
|
+
- **SemVer ranges** (`^1.0.0`, `~1.2.0`): Resolved to highest matching version
|
|
361
|
+
- **Exact versions** (`1.2.3`): Must match exactly
|
|
362
|
+
- **`latest` keyword**: Resolved to highest available version
|
|
363
|
+
|
|
364
|
+
When multiple kits reference the same primitive, the installer deduplicates and selects the highest compatible version.
|
|
365
|
+
|
|
366
|
+
## Installation Manifest
|
|
367
|
+
|
|
368
|
+
The installer tracks installations in scope-specific manifest files:
|
|
369
|
+
|
|
370
|
+
| Scope | Manifest Location |
|
|
371
|
+
|-------|------------------|
|
|
372
|
+
| Global | `~/.agents/manifest.json` |
|
|
373
|
+
| Project | `.agents/manifest.json` |
|
|
374
|
+
|
|
375
|
+
This enables:
|
|
376
|
+
- Uninstallation of kits
|
|
377
|
+
- Upgrade checking for primitives
|
|
378
|
+
- Conflict detection
|
|
379
|
+
- Scope isolation (global and project installations are tracked separately)
|
|
380
|
+
|
|
381
|
+
## Exit Codes
|
|
382
|
+
|
|
383
|
+
| Code | Meaning |
|
|
384
|
+
|------|---------|
|
|
385
|
+
| 0 | Success |
|
|
386
|
+
| 1 | Installation failed |
|
|
387
|
+
| 2 | Invalid arguments |
|
|
388
|
+
| 3 | Source not found or invalid |
|
|
389
|
+
| 4 | No harnesses detected |
|
|
390
|
+
| 5 | Kit not found |
|
|
391
|
+
| 6 | Kit incompatible with all selected harnesses |
|
|
392
|
+
| 7 | Primitive reference resolution failed |
|
|
393
|
+
| 8 | Manifest read/write error |
|
|
394
|
+
| 9 | No upgrades available |
|
|
395
|
+
| 10 | User cancelled |
|
|
396
|
+
| 11 | Scope required (non-interactive mode without `--global` or `--project`) |
|
|
397
|
+
|
|
398
|
+
## Environment Variables
|
|
399
|
+
|
|
400
|
+
| Variable | Description |
|
|
401
|
+
|----------|-------------|
|
|
402
|
+
| `HTTP_PROXY` / `HTTPS_PROXY` | Proxy configuration for network requests |
|
|
403
|
+
|
|
404
|
+
## Configuration
|
|
405
|
+
|
|
406
|
+
### Kit Repository Structure
|
|
407
|
+
|
|
408
|
+
A kit repository should have:
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
my-kits/
|
|
412
|
+
├── kits.json # Kit registry (optional, enables multiple kits)
|
|
413
|
+
├── primitives.json # Shared primitives registry (optional)
|
|
414
|
+
├── primitives/ # Shared primitive definitions
|
|
415
|
+
│ ├── commands/
|
|
416
|
+
│ ├── skills/
|
|
417
|
+
│ └── ...
|
|
418
|
+
└── kits/ # Individual kit directories
|
|
419
|
+
├── terraform-development/
|
|
420
|
+
│ ├── kit.json # Kit manifest
|
|
421
|
+
│ └── primitives/ # Kit-specific primitives
|
|
422
|
+
└── vault-operations/
|
|
423
|
+
├── kit.json
|
|
424
|
+
└── primitives/
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
For single-kit repositories, place `kit.json` at the root.
|
|
428
|
+
|
|
429
|
+
### Kit Manifest (kit.json)
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"schemaVersion": "1.0.0",
|
|
434
|
+
"name": "terraform-development",
|
|
435
|
+
"version": "1.0.0",
|
|
436
|
+
"description": "Terraform development capabilities",
|
|
437
|
+
"products": ["terraform"],
|
|
438
|
+
"requires": {
|
|
439
|
+
"primitives": ["commands", "skills"]
|
|
440
|
+
},
|
|
441
|
+
"primitives": {
|
|
442
|
+
"commands": [
|
|
443
|
+
{ "ref": "tf-plan@^1.0.0" },
|
|
444
|
+
{ "name": "custom-cmd", "entrypoint": "./primitives/commands/custom-cmd.md" }
|
|
445
|
+
],
|
|
446
|
+
"skills": [
|
|
447
|
+
{ "name": "generate-hcl", "entrypoint": "./primitives/skills/generate-hcl" }
|
|
448
|
+
]
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Primitive Formats
|
|
454
|
+
|
|
455
|
+
**Commands** (Markdown):
|
|
456
|
+
```markdown
|
|
457
|
+
# Command Name
|
|
458
|
+
|
|
459
|
+
Description of what the command does.
|
|
460
|
+
|
|
461
|
+
## Usage
|
|
462
|
+
|
|
463
|
+
Instructions for using the command.
|
|
464
|
+
|
|
465
|
+
## Examples
|
|
466
|
+
|
|
467
|
+
Example usage scenarios.
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Skills** (Directory with SKILL.md):
|
|
471
|
+
```
|
|
472
|
+
my-skill/
|
|
473
|
+
├── SKILL.md # Main skill definition
|
|
474
|
+
└── assets/ # Optional supporting files
|
|
475
|
+
└── template.hcl
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
**Subagents** (Markdown with YAML frontmatter):
|
|
479
|
+
```markdown
|
|
480
|
+
---
|
|
481
|
+
name: security-advisor
|
|
482
|
+
description: Reviews Terraform configs for security issues
|
|
483
|
+
model: "{{model:power}}"
|
|
484
|
+
allowedTools:
|
|
485
|
+
- "{{tool:read}}"
|
|
486
|
+
- "{{tool:shell}}"
|
|
487
|
+
disallowedTools: "{{tool:write}}"
|
|
488
|
+
skills:
|
|
489
|
+
- generate-hcl
|
|
490
|
+
hooks:
|
|
491
|
+
- ref: "pre-apply-validation@^1.0.0"
|
|
492
|
+
binding:
|
|
493
|
+
event: "tool.before"
|
|
494
|
+
matcher:
|
|
495
|
+
tool: "{{tool:shell}}"
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
# security-advisor
|
|
499
|
+
|
|
500
|
+
<agent_role>
|
|
501
|
+
You are a security-focused Terraform advisor...
|
|
502
|
+
</agent_role>
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
Skill and subagent frontmatter `hooks` are supported by Claude Code only; other harnesses drop them during transformation.
|
|
506
|
+
|
|
507
|
+
### Model Templates
|
|
508
|
+
|
|
509
|
+
Skills and subagents can reference canonical model tiers in frontmatter:
|
|
510
|
+
|
|
511
|
+
```yaml
|
|
512
|
+
model: "{{model:fast}}"
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Supported tiers: `fast`, `standard`, `power`, `auto`, `inherit`. Adapters map these to harness-specific model IDs (or omit the field if unsupported).
|
|
516
|
+
|
|
517
|
+
## Development
|
|
518
|
+
|
|
519
|
+
### Prerequisites
|
|
520
|
+
|
|
521
|
+
- Node.js >= 18.0.0
|
|
522
|
+
- npm >= 8.0.0
|
|
523
|
+
|
|
524
|
+
### Setup
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
# Install dependencies
|
|
528
|
+
npm install
|
|
529
|
+
|
|
530
|
+
# Build
|
|
531
|
+
npm run build
|
|
532
|
+
|
|
533
|
+
# Run tests
|
|
534
|
+
npm test
|
|
535
|
+
|
|
536
|
+
# Run tests with coverage
|
|
537
|
+
npm test -- --coverage
|
|
538
|
+
|
|
539
|
+
# Type check
|
|
540
|
+
npm run typecheck
|
|
541
|
+
|
|
542
|
+
# Lint
|
|
543
|
+
npm run lint
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Testing Local Changes
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
# Build and link locally
|
|
550
|
+
npm run build
|
|
551
|
+
npm link
|
|
552
|
+
|
|
553
|
+
# Test with local kit repository
|
|
554
|
+
kits install ./path/to/local/kits
|
|
555
|
+
|
|
556
|
+
# Or use directly without linking
|
|
557
|
+
npx ts-node src/cli/index.ts install ./path/to/local/kits
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### Project Structure
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
agent-kit-cli/
|
|
564
|
+
├── src/
|
|
565
|
+
│ ├── cli/ # CLI commands (install, uninstall, upgrade, etc.)
|
|
566
|
+
│ ├── tui/ # Terminal UI components
|
|
567
|
+
│ ├── adapters/ # Harness adapters (claude-code, codex, etc.)
|
|
568
|
+
│ ├── discovery/ # Kit discovery and source fetching
|
|
569
|
+
│ ├── resolution/ # Primitive reference resolution
|
|
570
|
+
│ ├── manifest/ # Installation manifest management
|
|
571
|
+
│ └── core/ # Core types and utilities
|
|
572
|
+
├── tests/ # Test files
|
|
573
|
+
├── schemas/ # JSON schemas
|
|
574
|
+
└── bin/ # CLI entrypoint
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
## Troubleshooting
|
|
578
|
+
|
|
579
|
+
### Common Issues
|
|
580
|
+
|
|
581
|
+
**"No harnesses detected"**
|
|
582
|
+
- Ensure at least one supported AI assistant is installed
|
|
583
|
+
- Check that configuration files exist in expected locations
|
|
584
|
+
|
|
585
|
+
**"Permission denied" errors**
|
|
586
|
+
- Check file permissions on harness configuration directories
|
|
587
|
+
- Ensure the AI assistant is not running during installation
|
|
588
|
+
|
|
589
|
+
**"Source not found"**
|
|
590
|
+
- Verify the source path or GitHub repository exists
|
|
591
|
+
- Check network connectivity for remote sources
|
|
592
|
+
|
|
593
|
+
**"Kit incompatible"**
|
|
594
|
+
- The kit requires primitives not supported by the selected harness
|
|
595
|
+
- Choose a compatible harness or different kit
|
|
596
|
+
|
|
597
|
+
**"Scope required" (exit code 11)**
|
|
598
|
+
- Non-interactive mode (`-y`) requires explicit scope selection
|
|
599
|
+
- Add `--global` for user-level installation or `--project` for current directory
|
|
600
|
+
- Example: `npx @hashicorp/kits install ... --global -y`
|
|
601
|
+
|
|
602
|
+
**"Scope incompatible" for Codex**
|
|
603
|
+
- Codex commands and MCP servers are global-only
|
|
604
|
+
- Use `--global` to install kits requiring these primitives to Codex
|
|
605
|
+
- Or install to other harnesses that support project scope
|
|
606
|
+
|
|
607
|
+
### Debug Mode
|
|
608
|
+
|
|
609
|
+
Enable debug logging for detailed output:
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
npx @hashicorp/kits install example-org/kits --debug
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
Logs are written to `~/.config/agent-kit/debug.log`.
|
|
616
|
+
|
|
617
|
+
## License
|
|
618
|
+
|
|
619
|
+
MPL-2.0
|