@skillsmith/core 0.9.0 → 0.11.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/CHANGELOG.md +16 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts +23 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts.map +1 -1
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js +137 -0
- package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js.map +1 -1
- package/dist/src/analysis/tree-sitter/pythonIncremental.js +83 -10
- package/dist/src/analysis/tree-sitter/pythonIncremental.js.map +1 -1
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js +6 -1
- package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js.map +1 -1
- package/dist/src/api/client.d.ts.map +1 -1
- package/dist/src/api/client.js +6 -0
- package/dist/src/api/client.js.map +1 -1
- package/dist/src/api/client.test.d.ts +9 -0
- package/dist/src/api/client.test.d.ts.map +1 -0
- package/dist/src/api/client.test.js +81 -0
- package/dist/src/api/client.test.js.map +1 -0
- package/dist/src/config/audit-notify-state.d.ts +46 -0
- package/dist/src/config/audit-notify-state.d.ts.map +1 -0
- package/dist/src/config/audit-notify-state.js +55 -0
- package/dist/src/config/audit-notify-state.js.map +1 -0
- package/dist/src/config/audit-notify-state.test.d.ts +9 -0
- package/dist/src/config/audit-notify-state.test.d.ts.map +1 -0
- package/dist/src/config/audit-notify-state.test.js +63 -0
- package/dist/src/config/audit-notify-state.test.js.map +1 -0
- package/dist/src/config/index.d.ts +10 -0
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/exports/services.d.ts +3 -1
- package/dist/src/exports/services.d.ts.map +1 -1
- package/dist/src/exports/services.js +9 -1
- package/dist/src/exports/services.js.map +1 -1
- package/dist/src/index.d.ts +6 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/install/agent-config-merge.json-array.d.ts +29 -0
- package/dist/src/install/agent-config-merge.json-array.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.json-array.js +100 -0
- package/dist/src/install/agent-config-merge.json-array.js.map +1 -0
- package/dist/src/install/agent-config-merge.json.d.ts +37 -0
- package/dist/src/install/agent-config-merge.json.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.json.js +134 -0
- package/dist/src/install/agent-config-merge.json.js.map +1 -0
- package/dist/src/install/agent-config-merge.toml-block.d.ts +48 -0
- package/dist/src/install/agent-config-merge.toml-block.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.toml-block.js +107 -0
- package/dist/src/install/agent-config-merge.toml-block.js.map +1 -0
- package/dist/src/install/agent-config-merge.types.d.ts +87 -0
- package/dist/src/install/agent-config-merge.types.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.types.js +83 -0
- package/dist/src/install/agent-config-merge.types.js.map +1 -0
- package/dist/src/install/agent-config-merge.yaml.d.ts +46 -0
- package/dist/src/install/agent-config-merge.yaml.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.yaml.js +133 -0
- package/dist/src/install/agent-config-merge.yaml.js.map +1 -0
- package/dist/src/install/agent-config-merge.yaml.test.d.ts +2 -0
- package/dist/src/install/agent-config-merge.yaml.test.d.ts.map +1 -0
- package/dist/src/install/agent-config-merge.yaml.test.js +210 -0
- package/dist/src/install/agent-config-merge.yaml.test.js.map +1 -0
- package/dist/src/install/agent-harness-targets.d.ts +98 -0
- package/dist/src/install/agent-harness-targets.d.ts.map +1 -0
- package/dist/src/install/agent-harness-targets.js +154 -0
- package/dist/src/install/agent-harness-targets.js.map +1 -0
- package/dist/src/install/agent-home-relocate.d.ts +29 -0
- package/dist/src/install/agent-home-relocate.d.ts.map +1 -0
- package/dist/src/install/agent-home-relocate.js +38 -0
- package/dist/src/install/agent-home-relocate.js.map +1 -0
- package/dist/src/install/agent-manifest-path-guard.d.ts +55 -0
- package/dist/src/install/agent-manifest-path-guard.d.ts.map +1 -0
- package/dist/src/install/agent-manifest-path-guard.js +109 -0
- package/dist/src/install/agent-manifest-path-guard.js.map +1 -0
- package/dist/src/install/agent-manifest-path-guard.test.d.ts +2 -0
- package/dist/src/install/agent-manifest-path-guard.test.d.ts.map +1 -0
- package/dist/src/install/agent-manifest-path-guard.test.js +72 -0
- package/dist/src/install/agent-manifest-path-guard.test.js.map +1 -0
- package/dist/src/install/agent-manifest.d.ts +58 -0
- package/dist/src/install/agent-manifest.d.ts.map +1 -0
- package/dist/src/install/agent-manifest.js +103 -0
- package/dist/src/install/agent-manifest.js.map +1 -0
- package/dist/src/install/agent-pack-installer.d.ts +39 -0
- package/dist/src/install/agent-pack-installer.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.entry.d.ts +55 -0
- package/dist/src/install/agent-pack-installer.entry.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.entry.js +90 -0
- package/dist/src/install/agent-pack-installer.entry.js.map +1 -0
- package/dist/src/install/agent-pack-installer.fs-helpers.d.ts +33 -0
- package/dist/src/install/agent-pack-installer.fs-helpers.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.fs-helpers.js +59 -0
- package/dist/src/install/agent-pack-installer.fs-helpers.js.map +1 -0
- package/dist/src/install/agent-pack-installer.harness.d.ts +66 -0
- package/dist/src/install/agent-pack-installer.harness.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.harness.js +310 -0
- package/dist/src/install/agent-pack-installer.harness.js.map +1 -0
- package/dist/src/install/agent-pack-installer.js +221 -0
- package/dist/src/install/agent-pack-installer.js.map +1 -0
- package/dist/src/install/agent-pack-installer.preserve.test.d.ts +11 -0
- package/dist/src/install/agent-pack-installer.preserve.test.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.preserve.test.js +72 -0
- package/dist/src/install/agent-pack-installer.preserve.test.js.map +1 -0
- package/dist/src/install/agent-pack-installer.test.d.ts +2 -0
- package/dist/src/install/agent-pack-installer.test.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.test.js +350 -0
- package/dist/src/install/agent-pack-installer.test.js.map +1 -0
- package/dist/src/install/agent-pack-installer.types.d.ts +51 -0
- package/dist/src/install/agent-pack-installer.types.d.ts.map +1 -0
- package/dist/src/install/agent-pack-installer.types.js +16 -0
- package/dist/src/install/agent-pack-installer.types.js.map +1 -0
- package/dist/src/install/agent-pack-uninstaller.d.ts +43 -0
- package/dist/src/install/agent-pack-uninstaller.d.ts.map +1 -0
- package/dist/src/install/agent-pack-uninstaller.js +113 -0
- package/dist/src/install/agent-pack-uninstaller.js.map +1 -0
- package/dist/src/install/agent-pack-uninstaller.test.d.ts +2 -0
- package/dist/src/install/agent-pack-uninstaller.test.d.ts.map +1 -0
- package/dist/src/install/agent-pack-uninstaller.test.js +212 -0
- package/dist/src/install/agent-pack-uninstaller.test.js.map +1 -0
- package/dist/src/install/index.d.ts +7 -0
- package/dist/src/install/index.d.ts.map +1 -1
- package/dist/src/install/index.js +7 -0
- package/dist/src/install/index.js.map +1 -1
- package/dist/src/install/paths.d.ts +1 -1
- package/dist/src/install/paths.d.ts.map +1 -1
- package/dist/src/install/paths.js +4 -0
- package/dist/src/install/paths.js.map +1 -1
- package/dist/src/install/paths.test.js +15 -0
- package/dist/src/install/paths.test.js.map +1 -1
- package/dist/src/journal/hash.d.ts +13 -0
- package/dist/src/journal/hash.d.ts.map +1 -0
- package/dist/src/journal/hash.js +16 -0
- package/dist/src/journal/hash.js.map +1 -0
- package/dist/src/journal/index.d.ts +15 -0
- package/dist/src/journal/index.d.ts.map +1 -0
- package/dist/src/journal/index.js +15 -0
- package/dist/src/journal/index.js.map +1 -0
- package/dist/src/journal/journal.test.d.ts +16 -0
- package/dist/src/journal/journal.test.d.ts.map +1 -0
- package/dist/src/journal/journal.test.js +171 -0
- package/dist/src/journal/journal.test.js.map +1 -0
- package/dist/src/journal/path.d.ts +44 -0
- package/dist/src/journal/path.d.ts.map +1 -0
- package/dist/src/journal/path.js +61 -0
- package/dist/src/journal/path.js.map +1 -0
- package/dist/src/journal/reader.d.ts +38 -0
- package/dist/src/journal/reader.d.ts.map +1 -0
- package/dist/src/journal/reader.js +93 -0
- package/dist/src/journal/reader.js.map +1 -0
- package/dist/src/journal/types.d.ts +87 -0
- package/dist/src/journal/types.d.ts.map +1 -0
- package/dist/src/journal/types.js +21 -0
- package/dist/src/journal/types.js.map +1 -0
- package/dist/src/journal/writer.d.ts +52 -0
- package/dist/src/journal/writer.d.ts.map +1 -0
- package/dist/src/journal/writer.js +125 -0
- package/dist/src/journal/writer.js.map +1 -0
- package/dist/src/logging/context.d.ts +58 -0
- package/dist/src/logging/context.d.ts.map +1 -0
- package/dist/src/logging/context.js +62 -0
- package/dist/src/logging/context.js.map +1 -0
- package/dist/src/logging/context.test.d.ts +14 -0
- package/dist/src/logging/context.test.d.ts.map +1 -0
- package/dist/src/logging/context.test.js +88 -0
- package/dist/src/logging/context.test.js.map +1 -0
- package/dist/src/logging/index.d.ts +13 -0
- package/dist/src/logging/index.d.ts.map +1 -0
- package/dist/src/logging/index.js +12 -0
- package/dist/src/logging/index.js.map +1 -0
- package/dist/src/logging/logger.d.ts +71 -0
- package/dist/src/logging/logger.d.ts.map +1 -0
- package/dist/src/logging/logger.js +264 -0
- package/dist/src/logging/logger.js.map +1 -0
- package/dist/src/logging/logger.test.d.ts +9 -0
- package/dist/src/logging/logger.test.d.ts.map +1 -0
- package/dist/src/logging/logger.test.js +320 -0
- package/dist/src/logging/logger.test.js.map +1 -0
- package/dist/src/logging/redact.d.ts +35 -0
- package/dist/src/logging/redact.d.ts.map +1 -0
- package/dist/src/logging/redact.js +152 -0
- package/dist/src/logging/redact.js.map +1 -0
- package/dist/src/logging/redact.test.d.ts +8 -0
- package/dist/src/logging/redact.test.d.ts.map +1 -0
- package/dist/src/logging/redact.test.js +330 -0
- package/dist/src/logging/redact.test.js.map +1 -0
- package/dist/src/logging/rotation.d.ts +75 -0
- package/dist/src/logging/rotation.d.ts.map +1 -0
- package/dist/src/logging/rotation.js +284 -0
- package/dist/src/logging/rotation.js.map +1 -0
- package/dist/src/logging/rotation.test.d.ts +11 -0
- package/dist/src/logging/rotation.test.d.ts.map +1 -0
- package/dist/src/logging/rotation.test.js +132 -0
- package/dist/src/logging/rotation.test.js.map +1 -0
- package/dist/src/logging/types.d.ts +69 -0
- package/dist/src/logging/types.d.ts.map +1 -0
- package/dist/src/logging/types.js +9 -0
- package/dist/src/logging/types.js.map +1 -0
- package/dist/src/paywall-triggers/index.d.ts +13 -0
- package/dist/src/paywall-triggers/index.d.ts.map +1 -0
- package/dist/src/paywall-triggers/index.js +13 -0
- package/dist/src/paywall-triggers/index.js.map +1 -0
- package/dist/src/paywall-triggers/path.d.ts +47 -0
- package/dist/src/paywall-triggers/path.d.ts.map +1 -0
- package/dist/src/paywall-triggers/path.js +73 -0
- package/dist/src/paywall-triggers/path.js.map +1 -0
- package/dist/src/paywall-triggers/store.d.ts +75 -0
- package/dist/src/paywall-triggers/store.d.ts.map +1 -0
- package/dist/src/paywall-triggers/store.js +122 -0
- package/dist/src/paywall-triggers/store.js.map +1 -0
- package/dist/src/paywall-triggers/store.test.d.ts +2 -0
- package/dist/src/paywall-triggers/store.test.d.ts.map +1 -0
- package/dist/src/paywall-triggers/store.test.js +121 -0
- package/dist/src/paywall-triggers/store.test.js.map +1 -0
- package/dist/src/paywall-triggers/types.d.ts +24 -0
- package/dist/src/paywall-triggers/types.d.ts.map +1 -0
- package/dist/src/paywall-triggers/types.js +13 -0
- package/dist/src/paywall-triggers/types.js.map +1 -0
- package/dist/src/security/index.d.ts +2 -0
- package/dist/src/security/index.d.ts.map +1 -1
- package/dist/src/security/index.js +4 -0
- package/dist/src/security/index.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.compound.d.ts +13 -0
- package/dist/src/security/scanner/SecurityScanner.compound.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.compound.js +127 -0
- package/dist/src/security/scanner/SecurityScanner.compound.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.hostile-update.d.ts +46 -0
- package/dist/src/security/scanner/SecurityScanner.hostile-update.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.hostile-update.js +209 -0
- package/dist/src/security/scanner/SecurityScanner.hostile-update.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.js +10 -1
- package/dist/src/security/scanner/SecurityScanner.js.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.pii.d.ts +23 -0
- package/dist/src/security/scanner/SecurityScanner.pii.d.ts.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.pii.js +152 -0
- package/dist/src/security/scanner/SecurityScanner.pii.js.map +1 -0
- package/dist/src/security/scanner/SecurityScanner.scanners.d.ts +5 -12
- package/dist/src/security/scanner/SecurityScanner.scanners.d.ts.map +1 -1
- package/dist/src/security/scanner/SecurityScanner.scanners.js +63 -137
- package/dist/src/security/scanner/SecurityScanner.scanners.js.map +1 -1
- package/dist/src/security/scanner/index.d.ts +2 -1
- package/dist/src/security/scanner/index.d.ts.map +1 -1
- package/dist/src/security/scanner/index.js +2 -0
- package/dist/src/security/scanner/index.js.map +1 -1
- package/dist/src/security/scanner/patterns.d.ts +2 -0
- package/dist/src/security/scanner/patterns.d.ts.map +1 -1
- package/dist/src/security/scanner/patterns.js +79 -11
- package/dist/src/security/scanner/patterns.js.map +1 -1
- package/dist/src/security/scanner/types.d.ts +23 -0
- package/dist/src/security/scanner/types.d.ts.map +1 -1
- package/dist/src/services/agent-pack/agent-pack.test.d.ts +18 -0
- package/dist/src/services/agent-pack/agent-pack.test.d.ts.map +1 -0
- package/dist/src/services/agent-pack/agent-pack.test.js +344 -0
- package/dist/src/services/agent-pack/agent-pack.test.js.map +1 -0
- package/dist/src/services/agent-pack/hooks.d.ts +29 -0
- package/dist/src/services/agent-pack/hooks.d.ts.map +1 -0
- package/dist/src/services/agent-pack/hooks.js +139 -0
- package/dist/src/services/agent-pack/hooks.js.map +1 -0
- package/dist/src/services/agent-pack/index.d.ts +26 -0
- package/dist/src/services/agent-pack/index.d.ts.map +1 -0
- package/dist/src/services/agent-pack/index.js +109 -0
- package/dist/src/services/agent-pack/index.js.map +1 -0
- package/dist/src/services/agent-pack/prompt-source.d.ts +47 -0
- package/dist/src/services/agent-pack/prompt-source.d.ts.map +1 -0
- package/dist/src/services/agent-pack/prompt-source.js +182 -0
- package/dist/src/services/agent-pack/prompt-source.js.map +1 -0
- package/dist/src/services/agent-pack/shims.d.ts +40 -0
- package/dist/src/services/agent-pack/shims.d.ts.map +1 -0
- package/dist/src/services/agent-pack/shims.js +96 -0
- package/dist/src/services/agent-pack/shims.js.map +1 -0
- package/dist/src/services/agent-pack/skill-md.d.ts +35 -0
- package/dist/src/services/agent-pack/skill-md.d.ts.map +1 -0
- package/dist/src/services/agent-pack/skill-md.js +89 -0
- package/dist/src/services/agent-pack/skill-md.js.map +1 -0
- package/dist/src/services/agent-pack/types.d.ts +118 -0
- package/dist/src/services/agent-pack/types.d.ts.map +1 -0
- package/dist/src/services/agent-pack/types.js +61 -0
- package/dist/src/services/agent-pack/types.js.map +1 -0
- package/dist/src/services/agent-tool-profile.d.ts +59 -0
- package/dist/src/services/agent-tool-profile.d.ts.map +1 -0
- package/dist/src/services/agent-tool-profile.js +76 -0
- package/dist/src/services/agent-tool-profile.js.map +1 -0
- package/dist/src/services/agent-tool-profile.test.d.ts +2 -0
- package/dist/src/services/agent-tool-profile.test.d.ts.map +1 -0
- package/dist/src/services/agent-tool-profile.test.js +28 -0
- package/dist/src/services/agent-tool-profile.test.js.map +1 -0
- package/dist/src/services/bundled-sibling-scan.d.ts +111 -0
- package/dist/src/services/bundled-sibling-scan.d.ts.map +1 -0
- package/dist/src/services/bundled-sibling-scan.js +170 -0
- package/dist/src/services/bundled-sibling-scan.js.map +1 -0
- package/dist/src/services/skill-installation.io.d.ts +16 -5
- package/dist/src/services/skill-installation.io.d.ts.map +1 -1
- package/dist/src/services/skill-installation.io.js +63 -22
- package/dist/src/services/skill-installation.io.js.map +1 -1
- package/dist/src/services/skill-installation.policy.d.ts +96 -0
- package/dist/src/services/skill-installation.policy.d.ts.map +1 -0
- package/dist/src/services/skill-installation.policy.js +144 -0
- package/dist/src/services/skill-installation.policy.js.map +1 -0
- package/dist/src/services/skill-installation.service.d.ts.map +1 -1
- package/dist/src/services/skill-installation.service.js +9 -3
- package/dist/src/services/skill-installation.service.js.map +1 -1
- package/dist/src/sources/index.d.ts +1 -0
- package/dist/src/sources/index.d.ts.map +1 -1
- package/dist/src/sources/index.js +4 -0
- package/dist/src/sources/index.js.map +1 -1
- package/dist/src/sync/access-token.d.ts +27 -0
- package/dist/src/sync/access-token.d.ts.map +1 -0
- package/dist/src/sync/access-token.js +40 -0
- package/dist/src/sync/access-token.js.map +1 -0
- package/dist/src/sync/audit-notify-client.d.ts +83 -0
- package/dist/src/sync/audit-notify-client.d.ts.map +1 -0
- package/dist/src/sync/audit-notify-client.js +126 -0
- package/dist/src/sync/audit-notify-client.js.map +1 -0
- package/dist/src/sync/audit-notify-client.test.d.ts +14 -0
- package/dist/src/sync/audit-notify-client.test.d.ts.map +1 -0
- package/dist/src/sync/audit-notify-client.test.js +133 -0
- package/dist/src/sync/audit-notify-client.test.js.map +1 -0
- package/dist/src/sync/index.d.ts +2 -1
- package/dist/src/sync/index.d.ts.map +1 -1
- package/dist/src/sync/index.js +3 -1
- package/dist/src/sync/index.js.map +1 -1
- package/dist/src/sync/inventory-client.d.ts +16 -0
- package/dist/src/sync/inventory-client.d.ts.map +1 -1
- package/dist/src/sync/inventory-client.js +59 -16
- package/dist/src/sync/inventory-client.js.map +1 -1
- package/dist/src/sync/inventory-client.test.js +67 -1
- package/dist/src/sync/inventory-client.test.js.map +1 -1
- package/dist/src/sync/inventory-collector.d.ts.map +1 -1
- package/dist/src/sync/inventory-collector.js +32 -5
- package/dist/src/sync/inventory-collector.js.map +1 -1
- package/dist/src/sync/inventory-collector.test.js +50 -1
- package/dist/src/sync/inventory-collector.test.js.map +1 -1
- package/dist/src/sync/inventory-types.d.ts +9 -0
- package/dist/src/sync/inventory-types.d.ts.map +1 -1
- package/dist/src/sync/inventory-types.js +3 -0
- package/dist/src/sync/inventory-types.js.map +1 -1
- package/dist/src/telemetry/agent-marker.d.ts +137 -0
- package/dist/src/telemetry/agent-marker.d.ts.map +1 -0
- package/dist/src/telemetry/agent-marker.js +242 -0
- package/dist/src/telemetry/agent-marker.js.map +1 -0
- package/dist/src/telemetry/agent-marker.test.d.ts +13 -0
- package/dist/src/telemetry/agent-marker.test.d.ts.map +1 -0
- package/dist/src/telemetry/agent-marker.test.js +202 -0
- package/dist/src/telemetry/agent-marker.test.js.map +1 -0
- package/dist/src/telemetry/index.d.ts +2 -1
- package/dist/src/telemetry/index.d.ts.map +1 -1
- package/dist/src/telemetry/index.js +6 -1
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/posthog.d.ts +25 -0
- package/dist/src/telemetry/posthog.d.ts.map +1 -1
- package/dist/src/telemetry/posthog.js +10 -1
- package/dist/src/telemetry/posthog.js.map +1 -1
- package/dist/src/telemetry/wrap.bench.js +5 -0
- package/dist/src/telemetry/wrap.bench.js.map +1 -1
- package/dist/src/telemetry/wrap.correlation.test.d.ts +20 -0
- package/dist/src/telemetry/wrap.correlation.test.d.ts.map +1 -0
- package/dist/src/telemetry/wrap.correlation.test.js +174 -0
- package/dist/src/telemetry/wrap.correlation.test.js.map +1 -0
- package/dist/src/telemetry/wrap.d.ts +28 -7
- package/dist/src/telemetry/wrap.d.ts.map +1 -1
- package/dist/src/telemetry/wrap.gate.test.d.ts +22 -0
- package/dist/src/telemetry/wrap.gate.test.d.ts.map +1 -0
- package/dist/src/telemetry/wrap.gate.test.js +202 -0
- package/dist/src/telemetry/wrap.gate.test.js.map +1 -0
- package/dist/src/telemetry/wrap.js +196 -52
- package/dist/src/telemetry/wrap.js.map +1 -1
- package/dist/src/telemetry/wrap.marker.test.d.ts +16 -0
- package/dist/src/telemetry/wrap.marker.test.d.ts.map +1 -0
- package/dist/src/telemetry/wrap.marker.test.js +190 -0
- package/dist/src/telemetry/wrap.marker.test.js.map +1 -0
- package/dist/src/telemetry/wrap.test.js +14 -0
- package/dist/src/telemetry/wrap.test.js.map +1 -1
- package/dist/src/types.d.ts +6 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tests/SecurityScanner.exec.test.js +60 -0
- package/dist/tests/SecurityScanner.exec.test.js.map +1 -1
- package/dist/tests/security/ContinuousSecurity.test.js +10 -4
- package/dist/tests/security/ContinuousSecurity.test.js.map +1 -1
- package/dist/tests/security/SecurityScanner.chmod-evasion.test.d.ts +2 -0
- package/dist/tests/security/SecurityScanner.chmod-evasion.test.d.ts.map +1 -0
- package/dist/tests/security/SecurityScanner.chmod-evasion.test.js +126 -0
- package/dist/tests/security/SecurityScanner.chmod-evasion.test.js.map +1 -0
- package/dist/tests/security/chmod-compound.test.d.ts +2 -0
- package/dist/tests/security/chmod-compound.test.d.ts.map +1 -0
- package/dist/tests/security/chmod-compound.test.js +188 -0
- package/dist/tests/security/chmod-compound.test.js.map +1 -0
- package/dist/tests/security/pii-detection.test.js +24 -0
- package/dist/tests/security/pii-detection.test.js.map +1 -1
- package/dist/tests/security/scanner-regression-guard.test.d.ts +23 -7
- package/dist/tests/security/scanner-regression-guard.test.d.ts.map +1 -1
- package/dist/tests/security/scanner-regression-guard.test.js +206 -12
- package/dist/tests/security/scanner-regression-guard.test.js.map +1 -1
- package/dist/tests/security/sensitive-path-fp.test.d.ts +2 -0
- package/dist/tests/security/sensitive-path-fp.test.d.ts.map +1 -0
- package/dist/tests/security/sensitive-path-fp.test.js +142 -0
- package/dist/tests/security/sensitive-path-fp.test.js.map +1 -0
- package/dist/tests/services/bundled-sibling-scan.test.d.ts +2 -0
- package/dist/tests/services/bundled-sibling-scan.test.d.ts.map +1 -0
- package/dist/tests/services/bundled-sibling-scan.test.js +139 -0
- package/dist/tests/services/bundled-sibling-scan.test.js.map +1 -0
- package/dist/tests/unit/services/skill-installation.io.test.js +166 -0
- package/dist/tests/unit/services/skill-installation.io.test.js.map +1 -1
- package/dist/tests/unit/services/skill-installation.policy.test.d.ts +8 -0
- package/dist/tests/unit/services/skill-installation.policy.test.d.ts.map +1 -0
- package/dist/tests/unit/services/skill-installation.policy.test.js +151 -0
- package/dist/tests/unit/services/skill-installation.policy.test.js.map +1 -0
- package/package.json +28 -3
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Install manifest for `sklx agent install` / `uninstall` (SMI-5456 Wave 1
|
|
3
|
+
* Step 5).
|
|
4
|
+
*
|
|
5
|
+
* `sklx agent uninstall` must reverse EXACTLY what install wrote — per-
|
|
6
|
+
* changeset file identity, not a re-derivation from the current pack
|
|
7
|
+
* generator (which could have changed between install and uninstall, e.g.
|
|
8
|
+
* across a version bump). The manifest is the durable record of every path
|
|
9
|
+
* the installer created or modified, plus a backup reference for anything it
|
|
10
|
+
* modified (so a foreign file's pre-existing content is restorable) or `null`
|
|
11
|
+
* for anything it created outright (so uninstall deletes rather than
|
|
12
|
+
* restores).
|
|
13
|
+
*
|
|
14
|
+
* Location: `~/.skillsmith/agent-install/manifest.json` — a sibling
|
|
15
|
+
* directory to `~/.skillsmith/journal` (Step 3) and `~/.skillsmith/agent-markers`
|
|
16
|
+
* (Step 1), following the same `getConfigDir()`-rooted, env-override-for-
|
|
17
|
+
* tests convention as both.
|
|
18
|
+
*
|
|
19
|
+
* @module @skillsmith/core/install/agent-manifest
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { getConfigDir } from '../config/index.js';
|
|
24
|
+
/** Env var overriding the manifest directory (test isolation — mirrors SKILLSMITH_JOURNAL_DIR). */
|
|
25
|
+
export const AGENT_INSTALL_DIR_ENV_VAR = 'SKILLSMITH_AGENT_INSTALL_DIR';
|
|
26
|
+
export const AGENT_MANIFEST_SCHEMA_VERSION = 1;
|
|
27
|
+
function getAgentInstallDir() {
|
|
28
|
+
const override = process.env[AGENT_INSTALL_DIR_ENV_VAR];
|
|
29
|
+
return override && override.length > 0 ? override : join(getConfigDir(), 'agent-install');
|
|
30
|
+
}
|
|
31
|
+
export function getAgentManifestPath() {
|
|
32
|
+
return join(getAgentInstallDir(), 'manifest.json');
|
|
33
|
+
}
|
|
34
|
+
export function getAgentInstallBackupsDir() {
|
|
35
|
+
return join(getAgentInstallDir(), 'backups');
|
|
36
|
+
}
|
|
37
|
+
/** Load the manifest, or an empty (never-installed) manifest if none exists or it is corrupt. */
|
|
38
|
+
export function loadAgentManifest() {
|
|
39
|
+
const path = getAgentManifestPath();
|
|
40
|
+
if (!existsSync(path))
|
|
41
|
+
return emptyManifest();
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(readFileSync(path, 'utf-8'));
|
|
44
|
+
if (!parsed || !Array.isArray(parsed.entries))
|
|
45
|
+
return emptyManifest();
|
|
46
|
+
return {
|
|
47
|
+
schemaVersion: parsed.schemaVersion ?? AGENT_MANIFEST_SCHEMA_VERSION,
|
|
48
|
+
installedAt: parsed.installedAt ?? new Date(0).toISOString(),
|
|
49
|
+
packSchemaVersion: parsed.packSchemaVersion ?? 0,
|
|
50
|
+
entries: parsed.entries,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return emptyManifest();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function emptyManifest() {
|
|
58
|
+
return {
|
|
59
|
+
schemaVersion: AGENT_MANIFEST_SCHEMA_VERSION,
|
|
60
|
+
installedAt: new Date(0).toISOString(),
|
|
61
|
+
packSchemaVersion: 0,
|
|
62
|
+
entries: [],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Persist a manifest, replacing any prior one. Re-running install writes a
|
|
67
|
+
* fresh manifest reflecting the CURRENT full set of entries (deduped by
|
|
68
|
+
* `path` — later entries in `entries` win) so a double-install never
|
|
69
|
+
* accumulates duplicate entries (P-5 idempotency test).
|
|
70
|
+
*/
|
|
71
|
+
export function saveAgentManifest(manifest) {
|
|
72
|
+
const dir = getAgentInstallDir();
|
|
73
|
+
mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
74
|
+
const deduped = dedupeEntriesByPath(manifest.entries);
|
|
75
|
+
const toWrite = { ...manifest, entries: deduped };
|
|
76
|
+
writeFileSync(getAgentManifestPath(), JSON.stringify(toWrite, null, 2) + '\n', { mode: 0o600 });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Dedupe by `path`, keeping the LAST entry's `kind`/`harness`/`executable`
|
|
80
|
+
* (the most recent write's classification) but preserving a non-null
|
|
81
|
+
* `backupPath` from ANY entry for that path.
|
|
82
|
+
*
|
|
83
|
+
* A single install run can merge into the same shared config file more than
|
|
84
|
+
* once (claude-code's SessionStart/SessionEnd hooks AND its MCP
|
|
85
|
+
* registration all touch `~/.claude/settings.json`) — only the FIRST merge
|
|
86
|
+
* into that file takes a real backup of the genuine pre-install content
|
|
87
|
+
* (`agent-config-merge.types.ts`'s `alreadyBackedUpPaths`); every
|
|
88
|
+
* subsequent merge into the same path this run correctly reports
|
|
89
|
+
* `backupPath: null` (nothing new to back up). A naive "last entry wins"
|
|
90
|
+
* dedupe would silently drop that first, load-bearing backup reference —
|
|
91
|
+
* `uninstallAgentPack` would then treat a modified pre-existing file as
|
|
92
|
+
* "created fresh" and delete it instead of restoring it.
|
|
93
|
+
*/
|
|
94
|
+
function dedupeEntriesByPath(entries) {
|
|
95
|
+
const byPath = new Map();
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
const prior = byPath.get(entry.path);
|
|
98
|
+
const backupPath = entry.backupPath ?? prior?.backupPath ?? null;
|
|
99
|
+
byPath.set(entry.path, { ...entry, backupPath });
|
|
100
|
+
}
|
|
101
|
+
return [...byPath.values()];
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=agent-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-manifest.js","sourceRoot":"","sources":["../../../src/install/agent-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,mGAAmG;AACnG,MAAM,CAAC,MAAM,yBAAyB,GAAG,8BAA8B,CAAA;AAEvE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAA;AA4B9C,SAAS,kBAAkB;IACzB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;IACvD,OAAO,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,eAAe,CAAC,CAAA;AAC3F,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,CAAC,kBAAkB,EAAE,EAAE,eAAe,CAAC,CAAA;AACpD,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,IAAI,CAAC,kBAAkB,EAAE,EAAE,SAAS,CAAC,CAAA;AAC9C,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,oBAAoB,EAAE,CAAA;IACnC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,aAAa,EAAE,CAAA;IAC7C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAkC,CAAA;QACvF,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;YAAE,OAAO,aAAa,EAAE,CAAA;QACrE,OAAO;YACL,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,6BAA6B;YACpE,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;YAC5D,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,IAAI,CAAC;YAChD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,aAAa,EAAE,CAAA;IACxB,CAAC;AACH,CAAC;AAED,SAAS,aAAa;IACpB,OAAO;QACL,aAAa,EAAE,6BAA6B;QAC5C,WAAW,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;QACtC,iBAAiB,EAAE,CAAC;QACpB,OAAO,EAAE,EAAE;KACZ,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAA8B;IAC9D,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAA;IAChC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IAChD,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACrD,MAAM,OAAO,GAAyB,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;IACvE,aAAa,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;AACjG,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAS,mBAAmB,CAAC,OAAsC;IACjE,MAAM,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAA;IACpD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACpC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,EAAE,UAAU,IAAI,IAAI,CAAA;QAChE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,CAAC,CAAA;IAClD,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sklx agent install` core orchestration (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* Generates the pack via `generateAgentPack({ toolProfile: AGENT_TOOL_PROFILE_NAMES })`
|
|
5
|
+
* (QD-2: byte-identical to the committed `packages/mcp-server/src/assets/agent-pack/`
|
|
6
|
+
* tree by determinism, never read from the mcp-server package) and writes:
|
|
7
|
+
* - SKILL.md to the mandatory dual path (claude-code + agents) plus any
|
|
8
|
+
* detected Tier-2/3 harness with its own native skill directory
|
|
9
|
+
* (opencode, hermes, windsurf).
|
|
10
|
+
* - Named-agent shims for every detected harness with a shim target
|
|
11
|
+
* (claude-code always; copilot, opencode when detected; codex via its
|
|
12
|
+
* own TOML-merge "shim").
|
|
13
|
+
* - SessionStart/SessionEnd hooks (+x) for claude-code (always), cursor
|
|
14
|
+
* and codex when detected — hook CONFIG wiring ships for claude-code/
|
|
15
|
+
* cursor (JSON arrays) and codex (SessionStart ONLY, as a
|
|
16
|
+
* marker-delimited `[[hooks.SessionStart]]` TOML block; Codex has no
|
|
17
|
+
* SessionEnd event and its Stop event is per-turn — see
|
|
18
|
+
* `installCodexHooks` in `agent-pack-installer.harness.ts`).
|
|
19
|
+
* - The `skillsmith` MCP server registration (`SKILLSMITH_TOOL_PROFILE=agent`)
|
|
20
|
+
* for every detected MCP-capable harness (all 7), backup-first,
|
|
21
|
+
* idempotent, preserve-and-prompt on a foreign entry.
|
|
22
|
+
*
|
|
23
|
+
* Every write funnels through `writeOwnedArtifactFile` (owned files) or the
|
|
24
|
+
* `agent-config-merge.*` helpers (shared config files), both of which record
|
|
25
|
+
* a manifest entry — `uninstallAgentPack` (SMI-5456) reverses exactly what
|
|
26
|
+
* this function wrote by replaying that manifest, never by re-deriving
|
|
27
|
+
* "what the current generator would produce".
|
|
28
|
+
*
|
|
29
|
+
* @module @skillsmith/core/install/agent-pack-installer
|
|
30
|
+
*/
|
|
31
|
+
import { loadAgentManifest } from './agent-manifest.js';
|
|
32
|
+
import { type AgentInstallOptions, type AgentInstallResult } from './agent-pack-installer.types.js';
|
|
33
|
+
/**
|
|
34
|
+
* Detect + install the portable Skillsmith Agent pack across every
|
|
35
|
+
* supported harness. See module header for the full per-harness matrix.
|
|
36
|
+
*/
|
|
37
|
+
export declare function installAgentPack(opts?: AgentInstallOptions): AgentInstallResult;
|
|
38
|
+
export { loadAgentManifest };
|
|
39
|
+
//# sourceMappingURL=agent-pack-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.d.ts","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAWH,OAAO,EAGL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAA;AAS5B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAExB,MAAM,iCAAiC,CAAA;AA4FxC;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,mBAAwB,GAAG,kBAAkB,CA6HnF;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry-value builders for `sklx agent install` (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* Pure functions producing the exact MCP-server registration value + the
|
|
5
|
+
* Codex TOML blocks the installer merges in. Separated from the
|
|
6
|
+
* orchestrator so the "what do we install" shape is independently testable
|
|
7
|
+
* from "where do we write it".
|
|
8
|
+
*
|
|
9
|
+
* @module @skillsmith/core/install/agent-pack-installer.entry
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The `skillsmith` MCP server registration value for `mcpServers`-convention
|
|
13
|
+
* harnesses (claude-code, cursor, copilot, windsurf; hermes uses the same
|
|
14
|
+
* field names under YAML). OpenCode does NOT use this shape — see
|
|
15
|
+
* {@link buildOpenCodeMcpEntryValue}.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildAgentMcpEntryValue(): Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* OpenCode's `mcp`-key entry value (Step-6 verified against
|
|
20
|
+
* opencode.ai/docs/mcp-servers/): entries are typed `local|remote`,
|
|
21
|
+
* `command` is an ARRAY (command + args combined), and the env-var field is
|
|
22
|
+
* named `environment`, not `env`. Writing the generic mcpServers shape here
|
|
23
|
+
* would produce an entry OpenCode's config schema rejects.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildOpenCodeMcpEntryValue(): Record<string, unknown>;
|
|
26
|
+
/** Codex `[mcp_servers.skillsmith]` TOML block (text between our markers). */
|
|
27
|
+
export declare function buildCodexMcpTomlBlock(): string;
|
|
28
|
+
/** Regex matching a bare (non-marker-delimited) `[mcp_servers.skillsmith]` table header. */
|
|
29
|
+
export declare const CODEX_MCP_FOREIGN_HEADER: RegExp;
|
|
30
|
+
/** Regex matching a bare (non-marker-delimited) `[agents.skillsmith-agent]` table header. */
|
|
31
|
+
export declare const CODEX_AGENTS_FOREIGN_HEADER: RegExp;
|
|
32
|
+
/**
|
|
33
|
+
* Codex `[[hooks.SessionStart]]` TOML block (text between our markers) —
|
|
34
|
+
* shape verified by the Step-6 eval worker against
|
|
35
|
+
* developers.openai.com/codex/hooks: inline array-of-tables
|
|
36
|
+
* `[[hooks.SessionStart]]` with a nested `[[hooks.SessionStart.hooks]]`
|
|
37
|
+
* array carrying `{type, command, timeout, statusMessage}`. Only `type` +
|
|
38
|
+
* `command` are emitted (timeout/statusMessage stay at Codex defaults).
|
|
39
|
+
* `JSON.stringify` produces a valid TOML basic string for the absolute
|
|
40
|
+
* script path — same quoting convention as `renderCodexToml` (shims.ts).
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildCodexSessionStartHookBlock(sessionStartScriptPath: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Regex matching a SINGLE-bracket `[hooks.SessionStart]` table header — a
|
|
45
|
+
* user config that defined `hooks.SessionStart` as a plain TABLE. Appending
|
|
46
|
+
* our `[[hooks.SessionStart]]` array-of-tables entry to such a file would
|
|
47
|
+
* produce INVALID TOML (a key cannot be both a table and an array of
|
|
48
|
+
* tables), so that is the genuine-conflict case. A foreign DOUBLE-bracket
|
|
49
|
+
* `[[hooks.SessionStart]]` (the user's own hook) is deliberately NOT
|
|
50
|
+
* matched: TOML permits re-opening an array of tables anywhere in the
|
|
51
|
+
* document, so appending our own `[[hooks.SessionStart]]` entry alongside a
|
|
52
|
+
* user's is valid and non-destructive — both hooks run.
|
|
53
|
+
*/
|
|
54
|
+
export declare const CODEX_HOOKS_TABLE_CONFLICT_HEADER: RegExp;
|
|
55
|
+
//# sourceMappingURL=agent-pack-installer.entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.entry.d.ts","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQjE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASpE;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,IAAI,MAAM,CAS/C;AAED,4FAA4F;AAC5F,eAAO,MAAM,wBAAwB,QAAoD,CAAA;AAEzF,6FAA6F;AAC7F,eAAO,MAAM,2BAA2B,QAAqD,CAAA;AAE7F;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,sBAAsB,EAAE,MAAM,GAAG,MAAM,CAQtF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC,QAA8B,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entry-value builders for `sklx agent install` (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* Pure functions producing the exact MCP-server registration value + the
|
|
5
|
+
* Codex TOML blocks the installer merges in. Separated from the
|
|
6
|
+
* orchestrator so the "what do we install" shape is independently testable
|
|
7
|
+
* from "where do we write it".
|
|
8
|
+
*
|
|
9
|
+
* @module @skillsmith/core/install/agent-pack-installer.entry
|
|
10
|
+
*/
|
|
11
|
+
import { AGENT_TOOL_PROFILE_ENV_VAR, AGENT_TOOL_PROFILE_VALUE, } from '../services/agent-tool-profile.js';
|
|
12
|
+
/**
|
|
13
|
+
* The `skillsmith` MCP server registration value for `mcpServers`-convention
|
|
14
|
+
* harnesses (claude-code, cursor, copilot, windsurf; hermes uses the same
|
|
15
|
+
* field names under YAML). OpenCode does NOT use this shape — see
|
|
16
|
+
* {@link buildOpenCodeMcpEntryValue}.
|
|
17
|
+
*/
|
|
18
|
+
export function buildAgentMcpEntryValue() {
|
|
19
|
+
return {
|
|
20
|
+
command: 'npx',
|
|
21
|
+
args: ['-y', '@skillsmith/mcp-server'],
|
|
22
|
+
env: {
|
|
23
|
+
[AGENT_TOOL_PROFILE_ENV_VAR]: AGENT_TOOL_PROFILE_VALUE,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* OpenCode's `mcp`-key entry value (Step-6 verified against
|
|
29
|
+
* opencode.ai/docs/mcp-servers/): entries are typed `local|remote`,
|
|
30
|
+
* `command` is an ARRAY (command + args combined), and the env-var field is
|
|
31
|
+
* named `environment`, not `env`. Writing the generic mcpServers shape here
|
|
32
|
+
* would produce an entry OpenCode's config schema rejects.
|
|
33
|
+
*/
|
|
34
|
+
export function buildOpenCodeMcpEntryValue() {
|
|
35
|
+
return {
|
|
36
|
+
type: 'local',
|
|
37
|
+
command: ['npx', '-y', '@skillsmith/mcp-server'],
|
|
38
|
+
enabled: true,
|
|
39
|
+
environment: {
|
|
40
|
+
[AGENT_TOOL_PROFILE_ENV_VAR]: AGENT_TOOL_PROFILE_VALUE,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** Codex `[mcp_servers.skillsmith]` TOML block (text between our markers). */
|
|
45
|
+
export function buildCodexMcpTomlBlock() {
|
|
46
|
+
return [
|
|
47
|
+
'[mcp_servers.skillsmith]',
|
|
48
|
+
'command = "npx"',
|
|
49
|
+
'args = ["-y", "@skillsmith/mcp-server"]',
|
|
50
|
+
'',
|
|
51
|
+
'[mcp_servers.skillsmith.env]',
|
|
52
|
+
`${AGENT_TOOL_PROFILE_ENV_VAR} = "${AGENT_TOOL_PROFILE_VALUE}"`,
|
|
53
|
+
].join('\n');
|
|
54
|
+
}
|
|
55
|
+
/** Regex matching a bare (non-marker-delimited) `[mcp_servers.skillsmith]` table header. */
|
|
56
|
+
export const CODEX_MCP_FOREIGN_HEADER = /^\[mcp_servers\.skillsmith(\.[a-zA-Z0-9_]+)?\]/m;
|
|
57
|
+
/** Regex matching a bare (non-marker-delimited) `[agents.skillsmith-agent]` table header. */
|
|
58
|
+
export const CODEX_AGENTS_FOREIGN_HEADER = /^\[agents\.skillsmith-agent(\.[a-zA-Z0-9_]+)?\]/m;
|
|
59
|
+
/**
|
|
60
|
+
* Codex `[[hooks.SessionStart]]` TOML block (text between our markers) —
|
|
61
|
+
* shape verified by the Step-6 eval worker against
|
|
62
|
+
* developers.openai.com/codex/hooks: inline array-of-tables
|
|
63
|
+
* `[[hooks.SessionStart]]` with a nested `[[hooks.SessionStart.hooks]]`
|
|
64
|
+
* array carrying `{type, command, timeout, statusMessage}`. Only `type` +
|
|
65
|
+
* `command` are emitted (timeout/statusMessage stay at Codex defaults).
|
|
66
|
+
* `JSON.stringify` produces a valid TOML basic string for the absolute
|
|
67
|
+
* script path — same quoting convention as `renderCodexToml` (shims.ts).
|
|
68
|
+
*/
|
|
69
|
+
export function buildCodexSessionStartHookBlock(sessionStartScriptPath) {
|
|
70
|
+
return [
|
|
71
|
+
'[[hooks.SessionStart]]',
|
|
72
|
+
'',
|
|
73
|
+
'[[hooks.SessionStart.hooks]]',
|
|
74
|
+
'type = "command"',
|
|
75
|
+
`command = ${JSON.stringify(sessionStartScriptPath)}`,
|
|
76
|
+
].join('\n');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Regex matching a SINGLE-bracket `[hooks.SessionStart]` table header — a
|
|
80
|
+
* user config that defined `hooks.SessionStart` as a plain TABLE. Appending
|
|
81
|
+
* our `[[hooks.SessionStart]]` array-of-tables entry to such a file would
|
|
82
|
+
* produce INVALID TOML (a key cannot be both a table and an array of
|
|
83
|
+
* tables), so that is the genuine-conflict case. A foreign DOUBLE-bracket
|
|
84
|
+
* `[[hooks.SessionStart]]` (the user's own hook) is deliberately NOT
|
|
85
|
+
* matched: TOML permits re-opening an array of tables anywhere in the
|
|
86
|
+
* document, so appending our own `[[hooks.SessionStart]]` entry alongside a
|
|
87
|
+
* user's is valid and non-destructive — both hooks run.
|
|
88
|
+
*/
|
|
89
|
+
export const CODEX_HOOKS_TABLE_CONFLICT_HEADER = /^\[hooks\.SessionStart\]/m;
|
|
90
|
+
//# sourceMappingURL=agent-pack-installer.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.entry.js","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,mCAAmC,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;QACtC,GAAG,EAAE;YACH,CAAC,0BAA0B,CAAC,EAAE,wBAAwB;SACvD;KACF,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,wBAAwB,CAAC;QAChD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE;YACX,CAAC,0BAA0B,CAAC,EAAE,wBAAwB;SACvD;KACF,CAAA;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,sBAAsB;IACpC,OAAO;QACL,0BAA0B;QAC1B,iBAAiB;QACjB,yCAAyC;QACzC,EAAE;QACF,8BAA8B;QAC9B,GAAG,0BAA0B,OAAO,wBAAwB,GAAG;KAChE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,iDAAiD,CAAA;AAEzF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAAG,kDAAkD,CAAA;AAE7F;;;;;;;;;GASG;AACH,MAAM,UAAU,+BAA+B,CAAC,sBAA8B;IAC5E,OAAO;QACL,wBAAwB;QACxB,EAAE;QACF,8BAA8B;QAC9B,kBAAkB;QAClB,aAAa,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,EAAE;KACtD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem primitives shared by `installAgentPack` (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* `writeOwnedArtifactFile` is the idempotency backbone for the P-5
|
|
5
|
+
* "double-install produces identical filesystem state, no duplicate
|
|
6
|
+
* backups" test: byte-identical content at an already-correct path is a
|
|
7
|
+
* true no-op (no write, no backup, no manifest churn beyond re-recording the
|
|
8
|
+
* same entry).
|
|
9
|
+
*
|
|
10
|
+
* @module @skillsmith/core/install/agent-pack-installer.fs-helpers
|
|
11
|
+
*/
|
|
12
|
+
export interface WriteOwnedFileOptions {
|
|
13
|
+
path: string;
|
|
14
|
+
content: string;
|
|
15
|
+
executable: boolean;
|
|
16
|
+
backupDir: string;
|
|
17
|
+
}
|
|
18
|
+
export interface WriteOwnedFileResult {
|
|
19
|
+
/** True when a write actually happened (content or executable-bit changed, or the file was new). */
|
|
20
|
+
changed: boolean;
|
|
21
|
+
/** Backup of PRE-EXISTING different content, or null (nothing existed, or content already matched). */
|
|
22
|
+
backupPath: string | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Write a file the installer fully owns by path convention (SKILL.md copies,
|
|
26
|
+
* shim files, hook scripts). Idempotent: re-writing identical content with
|
|
27
|
+
* the correct executable bit is a no-op. A pre-existing file with DIFFERENT
|
|
28
|
+
* content is backed up before being overwritten (defensive — these paths are
|
|
29
|
+
* namespaced (`skillsmith-agent`) so a genuine foreign collision is unlikely,
|
|
30
|
+
* but never silently destroying user data is the house floor).
|
|
31
|
+
*/
|
|
32
|
+
export declare function writeOwnedArtifactFile(opts: WriteOwnedFileOptions): WriteOwnedFileResult;
|
|
33
|
+
//# sourceMappingURL=agent-pack-installer.fs-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.fs-helpers.d.ts","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.fs-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,oGAAoG;IACpG,OAAO,EAAE,OAAO,CAAA;IAChB,uGAAuG;IACvG,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,qBAAqB,GAAG,oBAAoB,CAoBxF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem primitives shared by `installAgentPack` (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* `writeOwnedArtifactFile` is the idempotency backbone for the P-5
|
|
5
|
+
* "double-install produces identical filesystem state, no duplicate
|
|
6
|
+
* backups" test: byte-identical content at an already-correct path is a
|
|
7
|
+
* true no-op (no write, no backup, no manifest churn beyond re-recording the
|
|
8
|
+
* same entry).
|
|
9
|
+
*
|
|
10
|
+
* @module @skillsmith/core/install/agent-pack-installer.fs-helpers
|
|
11
|
+
*/
|
|
12
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
13
|
+
import { dirname, join } from 'node:path';
|
|
14
|
+
/**
|
|
15
|
+
* Write a file the installer fully owns by path convention (SKILL.md copies,
|
|
16
|
+
* shim files, hook scripts). Idempotent: re-writing identical content with
|
|
17
|
+
* the correct executable bit is a no-op. A pre-existing file with DIFFERENT
|
|
18
|
+
* content is backed up before being overwritten (defensive — these paths are
|
|
19
|
+
* namespaced (`skillsmith-agent`) so a genuine foreign collision is unlikely,
|
|
20
|
+
* but never silently destroying user data is the house floor).
|
|
21
|
+
*/
|
|
22
|
+
export function writeOwnedArtifactFile(opts) {
|
|
23
|
+
const { path, content, executable, backupDir } = opts;
|
|
24
|
+
if (existsSync(path)) {
|
|
25
|
+
const existing = readFileSync(path, 'utf-8');
|
|
26
|
+
const currentlyExecutable = isExecutable(path);
|
|
27
|
+
if (existing === content && currentlyExecutable === executable) {
|
|
28
|
+
return { changed: false, backupPath: null };
|
|
29
|
+
}
|
|
30
|
+
const backupPath = writeBackup(path, backupDir);
|
|
31
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
32
|
+
writeFileSync(path, content, 'utf-8');
|
|
33
|
+
if (executable)
|
|
34
|
+
chmodSync(path, 0o755);
|
|
35
|
+
return { changed: true, backupPath };
|
|
36
|
+
}
|
|
37
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
38
|
+
writeFileSync(path, content, 'utf-8');
|
|
39
|
+
if (executable)
|
|
40
|
+
chmodSync(path, 0o755);
|
|
41
|
+
return { changed: true, backupPath: null };
|
|
42
|
+
}
|
|
43
|
+
function isExecutable(path) {
|
|
44
|
+
try {
|
|
45
|
+
return (statSync(path).mode & 0o111) !== 0;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function writeBackup(sourcePath, backupDir) {
|
|
52
|
+
mkdirSync(backupDir, { recursive: true, mode: 0o700 });
|
|
53
|
+
const stamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
54
|
+
const baseName = sourcePath.split('/').pop() ?? 'file';
|
|
55
|
+
const backupPath = join(backupDir, `${stamp}-${baseName}.bak`);
|
|
56
|
+
writeFileSync(backupPath, readFileSync(sourcePath, 'utf-8'), { mode: 0o600 });
|
|
57
|
+
return backupPath;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=agent-pack-installer.fs-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.fs-helpers.js","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.fs-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAgBzC;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAA2B;IAChE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;IAErD,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QAC5C,MAAM,mBAAmB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,QAAQ,KAAK,OAAO,IAAI,mBAAmB,KAAK,UAAU,EAAE,CAAC;YAC/D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;QAC7C,CAAC;QACD,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC/C,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QAC7C,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QACrC,IAAI,UAAU;YAAE,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;IACtC,CAAC;IAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7C,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IACrC,IAAI,UAAU;QAAE,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;AAC5C,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,UAAkB,EAAE,SAAiB;IACxD,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IACtD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;IAC5D,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,MAAM,CAAA;IACtD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,KAAK,IAAI,QAAQ,MAAM,CAAC,CAAA;IAC9D,aAAa,CAAC,UAAU,EAAE,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7E,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-harness install step for `installAgentPack` (SMI-5456 Wave 1 Step 5).
|
|
3
|
+
*
|
|
4
|
+
* One function per concern (shim, hooks, MCP registration) so the
|
|
5
|
+
* orchestrator (`agent-pack-installer.ts`) stays a readable top-level loop.
|
|
6
|
+
* Every function is additive to `entries`/`report` in place — the caller
|
|
7
|
+
* owns aggregation and the manifest save.
|
|
8
|
+
*
|
|
9
|
+
* @module @skillsmith/core/install/agent-pack-installer.harness
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentPackArtifact, HarnessId } from '../services/agent-pack/index.js';
|
|
12
|
+
import { type McpHarnessId } from './agent-harness-targets.js';
|
|
13
|
+
import type { AgentManifestEntry } from './agent-manifest.js';
|
|
14
|
+
import type { HarnessInstallReport } from './agent-pack-installer.types.js';
|
|
15
|
+
export interface HarnessInstallCtx {
|
|
16
|
+
homeDir: string | undefined;
|
|
17
|
+
force: boolean;
|
|
18
|
+
backupDir: string;
|
|
19
|
+
entries: AgentManifestEntry[];
|
|
20
|
+
/**
|
|
21
|
+
* Config-file paths already backed up during THIS install run. Shared
|
|
22
|
+
* across every merge call so a harness whose hooks + MCP registration
|
|
23
|
+
* share one file (claude-code: `settings.json`; codex: `config.toml`)
|
|
24
|
+
* only backs it up once, capturing genuine pre-install state rather than
|
|
25
|
+
* repeatedly "backing up" content this same run already wrote.
|
|
26
|
+
*/
|
|
27
|
+
backedUpPaths: Set<string>;
|
|
28
|
+
}
|
|
29
|
+
/** Write the named-agent shim for `harness` when a target exists (claude-code/copilot/opencode). */
|
|
30
|
+
export declare function installShim(harness: HarnessId, artifact: AgentPackArtifact | undefined, ctx: HarnessInstallCtx, report: HarnessInstallReport): void;
|
|
31
|
+
/** Install + wire SessionStart/SessionEnd hook scripts for claude-code/cursor (JSON hook config). */
|
|
32
|
+
export declare function installJsonHooks(harness: 'claude-code' | 'cursor', startArtifact: AgentPackArtifact | undefined, endArtifact: AgentPackArtifact | undefined, ctx: HarnessInstallCtx, report: HarnessInstallReport): void;
|
|
33
|
+
/**
|
|
34
|
+
* Install hook scripts for Codex (+x) and wire the SessionStart hook into
|
|
35
|
+
* `~/.codex/config.toml` as a marker-delimited `[[hooks.SessionStart]]`
|
|
36
|
+
* array-of-tables block (shape Step-6-verified against
|
|
37
|
+
* developers.openai.com/codex/hooks).
|
|
38
|
+
*
|
|
39
|
+
* SessionStart ONLY — deliberate, do not "complete" this:
|
|
40
|
+
* - Codex has NO SessionEnd event. There is nothing to wire the
|
|
41
|
+
* session-end.sh cleanup script to.
|
|
42
|
+
* - Codex's Stop event fires PER-TURN, not per-session. Wiring the marker
|
|
43
|
+
* cleanup there would delete the agent-mediation marker file after the
|
|
44
|
+
* FIRST turn, silently unmarking every subsequent tool call in the same
|
|
45
|
+
* session and corrupting the mediation-share metric the whole Wave-1
|
|
46
|
+
* bet is measured by.
|
|
47
|
+
* - Cleanup therefore rides the server's 12h marker TTL
|
|
48
|
+
* (`telemetry/agent-marker.ts` `AGENT_MARKER_TTL_MS`) — the same
|
|
49
|
+
* crash-backstop path every harness already relies on.
|
|
50
|
+
*
|
|
51
|
+
* session-end.sh is still installed (inert on Codex — nothing invokes it):
|
|
52
|
+
* it keeps the on-disk script tree identical across hook-capable harnesses
|
|
53
|
+
* and stays manifest-tracked, so uninstall removes it like any other owned
|
|
54
|
+
* file. Zero uninstall complication.
|
|
55
|
+
*/
|
|
56
|
+
export declare function installCodexHooks(startArtifact: AgentPackArtifact | undefined, endArtifact: AgentPackArtifact | undefined, ctx: HarnessInstallCtx, report: HarnessInstallReport): void;
|
|
57
|
+
/**
|
|
58
|
+
* Codex's named-agent "shim" is a `[agents.skillsmith-agent]` TOML entry
|
|
59
|
+
* merged into the same `~/.codex/config.toml` as its MCP registration —
|
|
60
|
+
* the artifact's content (`shims/codex/agents.toml`, rendered by the
|
|
61
|
+
* locked `renderCodexToml`) is already the exact block text to install.
|
|
62
|
+
*/
|
|
63
|
+
export declare function installCodexAgentsShim(artifact: AgentPackArtifact | undefined, ctx: HarnessInstallCtx, report: HarnessInstallReport): void;
|
|
64
|
+
/** Merge the `skillsmith` MCP server registration for any of the 7 MCP-capable harnesses. */
|
|
65
|
+
export declare function installMcpConfig(harness: McpHarnessId, ctx: HarnessInstallCtx, report: HarnessInstallReport): void;
|
|
66
|
+
//# sourceMappingURL=agent-pack-installer.harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pack-installer.harness.d.ts","sourceRoot":"","sources":["../../../src/install/agent-pack-installer.harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AACnF,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,4BAA4B,CAAA;AAgBnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAqB3E,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B;;;;;;OAMG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B;AAED,oGAAoG;AACpG,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAoBN;AAED,qGAAqG;AACrG,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,GAAG,QAAQ,EACjC,aAAa,EAAE,iBAAiB,GAAG,SAAS,EAC5C,WAAW,EAAE,iBAAiB,GAAG,SAAS,EAC1C,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAgEN;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,iBAAiB,GAAG,SAAS,EAC5C,WAAW,EAAE,iBAAiB,GAAG,SAAS,EAC1C,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAmEN;AAgBD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CA+BN;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAwDN"}
|