@cchistory/lite 0.8.3 → 0.9.1
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/INSTALL.md +1 -1
- package/apps/lite-cli/dist/agent-contract.d.ts.map +1 -1
- package/apps/lite-cli/dist/agent-contract.js +41 -2
- package/apps/lite-cli/dist/agent-contract.js.map +1 -1
- package/apps/lite-cli/dist/help.js +5 -5
- package/apps/lite-cli/dist/index.d.ts.map +1 -1
- package/apps/lite-cli/dist/index.js +148 -17
- package/apps/lite-cli/dist/index.js.map +1 -1
- package/apps/lite-cli/dist/index.test.js +114 -95
- package/apps/lite-cli/dist/index.test.js.map +1 -1
- package/apps/lite-cli/dist/inventory-and-git.test.d.ts +7 -0
- package/apps/lite-cli/dist/inventory-and-git.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/inventory-and-git.test.js +776 -0
- package/apps/lite-cli/dist/inventory-and-git.test.js.map +1 -0
- package/apps/lite-cli/dist/inventory-command.d.ts +30 -0
- package/apps/lite-cli/dist/inventory-command.d.ts.map +1 -0
- package/apps/lite-cli/dist/inventory-command.js +265 -0
- package/apps/lite-cli/dist/inventory-command.js.map +1 -0
- package/apps/lite-cli/dist/json-v2.d.ts +2 -2
- package/apps/lite-cli/dist/json-v2.d.ts.map +1 -1
- package/apps/lite-cli/dist/json-v2.js +9 -3
- package/apps/lite-cli/dist/json-v2.js.map +1 -1
- package/apps/lite-cli/dist/project-git-command.d.ts +28 -0
- package/apps/lite-cli/dist/project-git-command.d.ts.map +1 -0
- package/apps/lite-cli/dist/project-git-command.js +288 -0
- package/apps/lite-cli/dist/project-git-command.js.map +1 -0
- package/apps/lite-cli/dist/startup-render.d.ts +10 -0
- package/apps/lite-cli/dist/startup-render.d.ts.map +1 -0
- package/apps/lite-cli/dist/startup-render.js +335 -0
- package/apps/lite-cli/dist/startup-render.js.map +1 -0
- package/apps/lite-cli/dist/version.d.ts +1 -1
- package/apps/lite-cli/dist/version.js +1 -1
- package/apps/lite-tui/dist/render.d.ts +1 -1
- package/apps/lite-tui/dist/version.d.ts +1 -1
- package/apps/lite-tui/dist/version.js +1 -1
- package/docs/guide/for-agents.md +14 -0
- package/docs/guide/lite.md +53 -2
- package/node_modules/@cchistory/canonical/dist/agent-inventory.d.ts +25 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.js +345 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.test.d.ts +7 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.test.js +231 -0
- package/node_modules/@cchistory/canonical/dist/agent-inventory.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/directory-scope.js +4 -1
- package/node_modules/@cchistory/canonical/dist/directory-scope.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.js +2 -0
- package/node_modules/@cchistory/canonical/dist/index.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/project-merge.d.ts +42 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.js +396 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.test.d.ts +7 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.test.js +319 -0
- package/node_modules/@cchistory/canonical/dist/project-merge.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/query.js +1 -1
- package/node_modules/@cchistory/canonical/dist/query.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js +38 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js +18 -2
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js +2 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js +4 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.js +3 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js +73 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.d.ts +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.js +23 -17
- package/node_modules/@cchistory/canonical/dist/usage.js.map +1 -1
- package/node_modules/@cchistory/canonical/package.json +1 -1
- package/node_modules/@cchistory/domain/dist/agent-inventory.d.ts +146 -0
- package/node_modules/@cchistory/domain/dist/agent-inventory.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/agent-inventory.js +9 -0
- package/node_modules/@cchistory/domain/dist/agent-inventory.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/agent-startup.d.ts +362 -0
- package/node_modules/@cchistory/domain/dist/agent-startup.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/agent-startup.js +8 -0
- package/node_modules/@cchistory/domain/dist/agent-startup.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts +8 -1
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.js +3 -0
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.test.js +27 -1
- package/node_modules/@cchistory/domain/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/project-git.d.ts +121 -0
- package/node_modules/@cchistory/domain/dist/project-git.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/project-git.js +93 -0
- package/node_modules/@cchistory/domain/dist/project-git.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/token-evidence.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/token-evidence.js +3 -1
- package/node_modules/@cchistory/domain/dist/token-evidence.js.map +1 -1
- package/node_modules/@cchistory/domain/package.json +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +4 -1
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js +3 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +266 -38
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/inventory-and-git.d.ts +35 -0
- package/node_modules/@cchistory/live-runtime/dist/inventory-and-git.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/inventory-and-git.js +68 -0
- package/node_modules/@cchistory/live-runtime/dist/inventory-and-git.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/package.json +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js +60 -4
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.js +130 -7
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +198 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js +85 -5
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js +17 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js +44 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js +12 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts +5 -0
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.js +5 -0
- package/node_modules/@cchistory/source-adapters/dist/index.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +6 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.js +6 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.d.ts +14 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.js +397 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.test.d.ts +6 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.test.js +106 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/agent-config-reader.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/config-io.d.ts +42 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/config-io.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/config-io.js +368 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/config-io.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/redaction.d.ts +22 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/redaction.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/redaction.js +195 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/redaction.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity-helpers.d.ts +23 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity-helpers.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity-helpers.js +147 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity-helpers.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity.d.ts +11 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity.js +339 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/antigravity.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code-helpers.d.ts +70 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code-helpers.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code-helpers.js +257 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code-helpers.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code.d.ts +11 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code.js +321 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/codex.d.ts +12 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/codex.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/codex.js +363 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/codex.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/deepseek-harness.d.ts +20 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/deepseek-harness.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/deepseek-harness.js +408 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/deepseek-harness.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/index.d.ts +24 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/index.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/index.js +225 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/index.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/opencode.d.ts +12 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/opencode.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/opencode.js +372 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/opencode.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/shared.d.ts +62 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/shared.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/shared.js +428 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/shared.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/startup.test.d.ts +7 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/startup.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/startup.test.js +399 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/startup/startup.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/toml.d.ts +16 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/toml.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/toml.js +478 -0
- package/node_modules/@cchistory/source-adapters/dist/inventory/toml.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.d.ts +28 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.js +443 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.js +370 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.js +78 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.js +313 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js +14 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.js +306 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.js +499 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.js +53 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.js +314 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.js +84 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.d.ts +50 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.js +291 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.js +321 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.js +245 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js +30 -7
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.d.ts +44 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.js +533 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.js +375 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.js +346 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.js +60 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts +3 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js +5 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/package.json +1 -1
- package/package.json +5 -5
- package/schemas/cchistory-lite-agent-v1.schema.json +3 -1
- package/schemas/cchistory-lite-envelope-v1.schema.json +33 -0
- package/schemas/cchistory-lite-inventory-v1.schema.json +94 -0
- package/schemas/cchistory-lite-merged-projects-v1.schema.json +44 -0
- package/schemas/cchistory-lite-v2.schema.json +22 -1
- package/skills/using-cchistory-lite/SKILL.md +17 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Helpers for the native Claude Code startup resolver: CLAUDE.md recursive @import
|
|
3
|
+
* resolution, .claude/rules YAML frontmatter parsing, subagent parsing, plugin bundle
|
|
4
|
+
* expansion, hook extraction, and precedence deduplication.
|
|
5
|
+
* Excludes top-level Claude Code settings/MCP cascade orchestration and CLI rendering.
|
|
6
|
+
*/
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { redactMcpCommand } from "../redaction.js";
|
|
10
|
+
import { asNonEmptyString, asRecord, buildRedactedMcpEntry, estimateTokens, listSkillEntriesInDir, parseMarkdownFrontmatter, readTrackedJsonObject, readTrackedTextFile, safeReadDir, } from "./shared.js";
|
|
11
|
+
const MAX_IMPORT_DEPTH = 5;
|
|
12
|
+
export async function loadClaudeMdEntry(tracker, filePath, layer, homeDir) {
|
|
13
|
+
const file = await readTrackedTextFile(tracker, filePath, "claude_md");
|
|
14
|
+
if (!file)
|
|
15
|
+
return undefined;
|
|
16
|
+
const imports = [];
|
|
17
|
+
const visited = new Set([path.resolve(filePath)]);
|
|
18
|
+
await resolveClaudeImports(tracker, filePath, file.content, homeDir, 1, visited, imports);
|
|
19
|
+
return {
|
|
20
|
+
path: path.resolve(filePath),
|
|
21
|
+
layer,
|
|
22
|
+
size_bytes: file.sizeBytes,
|
|
23
|
+
estimated_tokens: estimateTokens(file.sizeBytes),
|
|
24
|
+
imports,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async function resolveClaudeImports(tracker, ownerPath, content, homeDir, depth, visited, out) {
|
|
28
|
+
if (depth > MAX_IMPORT_DEPTH)
|
|
29
|
+
return;
|
|
30
|
+
const refs = extractAtImportRefs(content);
|
|
31
|
+
for (const rawRef of refs) {
|
|
32
|
+
const resolved = rawRef.startsWith("~/")
|
|
33
|
+
? path.resolve(homeDir, rawRef.slice(2))
|
|
34
|
+
: path.resolve(path.dirname(ownerPath), rawRef);
|
|
35
|
+
if (visited.has(resolved)) {
|
|
36
|
+
out.push({ raw_ref: rawRef, resolved_path: resolved, exists: true, cycle: true, depth });
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const imported = await readTrackedTextFile(tracker, resolved, "claude_md_import");
|
|
40
|
+
if (!imported) {
|
|
41
|
+
out.push({ raw_ref: rawRef, resolved_path: resolved, exists: false, depth });
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
visited.add(resolved);
|
|
45
|
+
out.push({
|
|
46
|
+
raw_ref: rawRef,
|
|
47
|
+
resolved_path: resolved,
|
|
48
|
+
exists: true,
|
|
49
|
+
size_bytes: imported.sizeBytes,
|
|
50
|
+
estimated_tokens: estimateTokens(imported.sizeBytes),
|
|
51
|
+
depth,
|
|
52
|
+
});
|
|
53
|
+
await resolveClaudeImports(tracker, resolved, imported.content, homeDir, depth + 1, visited, out);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function extractAtImportRefs(markdown) {
|
|
57
|
+
const refs = [];
|
|
58
|
+
let inFence = false;
|
|
59
|
+
for (const rawLine of markdown.replace(/\r\n/gu, "\n").split("\n")) {
|
|
60
|
+
const trimmed = rawLine.trim();
|
|
61
|
+
if (/^`{3,}|^~{3,}/u.test(trimmed)) {
|
|
62
|
+
inFence = !inFence;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (inFence)
|
|
66
|
+
continue;
|
|
67
|
+
const match = /^@((?:~\/|\.\.?\/|\/)?[^\s`"']+\.[A-Za-z0-9_-]+)$/u.exec(trimmed);
|
|
68
|
+
if (match?.[1])
|
|
69
|
+
refs.push(match[1]);
|
|
70
|
+
}
|
|
71
|
+
return refs;
|
|
72
|
+
}
|
|
73
|
+
export async function collectClaudeRules(tracker, dirPath, scope, out) {
|
|
74
|
+
const entries = await safeReadDir(tracker, dirPath);
|
|
75
|
+
for (const entry of entries) {
|
|
76
|
+
if (entry.name.startsWith(".") || !entry.isFile() || !/\.(?:md|markdown)$/iu.test(entry.name))
|
|
77
|
+
continue;
|
|
78
|
+
const fullPath = path.join(dirPath, entry.name);
|
|
79
|
+
const file = await readTrackedTextFile(tracker, fullPath, "claude_rule");
|
|
80
|
+
if (!file)
|
|
81
|
+
continue;
|
|
82
|
+
const fm = parseMarkdownFrontmatter(file.content);
|
|
83
|
+
const pathsList = fm.lists.paths?.length
|
|
84
|
+
? fm.lists.paths
|
|
85
|
+
: fm.scalars.paths
|
|
86
|
+
? [fm.scalars.paths]
|
|
87
|
+
: fm.lists.globs?.length
|
|
88
|
+
? fm.lists.globs
|
|
89
|
+
: [];
|
|
90
|
+
out.push({
|
|
91
|
+
name: entry.name.replace(/\.(?:md|markdown)$/iu, ""),
|
|
92
|
+
path: fullPath,
|
|
93
|
+
scope,
|
|
94
|
+
mode: pathsList.length > 0 ? "path_scoped" : "always",
|
|
95
|
+
...(pathsList.length > 0 ? { paths: pathsList } : {}),
|
|
96
|
+
size_bytes: file.sizeBytes,
|
|
97
|
+
estimated_tokens: estimateTokens(file.sizeBytes),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export async function listClaudeSubagents(tracker, dirPath) {
|
|
102
|
+
const entries = await safeReadDir(tracker, dirPath);
|
|
103
|
+
const out = [];
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
if (entry.name.startsWith(".") || !entry.isFile() || !/\.(?:md|markdown)$/iu.test(entry.name))
|
|
106
|
+
continue;
|
|
107
|
+
const fullPath = path.join(dirPath, entry.name);
|
|
108
|
+
const file = await readTrackedTextFile(tracker, fullPath, "claude_subagent");
|
|
109
|
+
const fm = file ? parseMarkdownFrontmatter(file.content) : undefined;
|
|
110
|
+
const tools = fm?.lists.tools?.length
|
|
111
|
+
? fm.lists.tools
|
|
112
|
+
: fm?.scalars.tools
|
|
113
|
+
? fm.scalars.tools.split(",").map((t) => t.trim()).filter(Boolean)
|
|
114
|
+
: undefined;
|
|
115
|
+
out.push({
|
|
116
|
+
name: fm?.scalars.name || entry.name.replace(/\.(?:md|markdown)$/iu, ""),
|
|
117
|
+
path: fullPath,
|
|
118
|
+
...(fm?.scalars.description ? { description: fm.scalars.description } : {}),
|
|
119
|
+
...(fm?.scalars.model ? { model: fm.scalars.model } : {}),
|
|
120
|
+
...(tools && tools.length > 0 ? { tools } : {}),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
export async function expandClaudePluginBundle(tracker, plugin, installPath, mcpOut, skillsOut, commandsOut, subagentsOut, hooksOut) {
|
|
126
|
+
try {
|
|
127
|
+
await fs.access(installPath);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const manifestPath = path.join(installPath, ".claude-plugin", "plugin.json");
|
|
133
|
+
await readTrackedJsonObject(tracker, manifestPath, "claude_plugin_manifest");
|
|
134
|
+
const skills = await listSkillEntriesInDir(tracker, path.join(installPath, "skills"));
|
|
135
|
+
for (const s of skills) {
|
|
136
|
+
plugin.bundled_skills.push(s.name);
|
|
137
|
+
skillsOut.push(s);
|
|
138
|
+
}
|
|
139
|
+
const cmds = await listSkillEntriesInDir(tracker, path.join(installPath, "commands"));
|
|
140
|
+
for (const c of cmds) {
|
|
141
|
+
plugin.bundled_commands.push(c.name);
|
|
142
|
+
commandsOut.push(c);
|
|
143
|
+
}
|
|
144
|
+
const agents = await listClaudeSubagents(tracker, path.join(installPath, "agents"));
|
|
145
|
+
for (const a of agents) {
|
|
146
|
+
plugin.bundled_agents.push(a.name);
|
|
147
|
+
subagentsOut.push(a);
|
|
148
|
+
}
|
|
149
|
+
const mcpPath = path.join(installPath, ".mcp.json");
|
|
150
|
+
const mcpJson = await readTrackedJsonObject(tracker, mcpPath, "claude_plugin_mcp");
|
|
151
|
+
const servers = asRecord(mcpJson?.mcpServers);
|
|
152
|
+
if (servers) {
|
|
153
|
+
for (const [id, val] of Object.entries(servers)) {
|
|
154
|
+
const rec = asRecord(val);
|
|
155
|
+
if (!rec)
|
|
156
|
+
continue;
|
|
157
|
+
plugin.bundled_mcp_servers.push(id);
|
|
158
|
+
mcpOut.push({
|
|
159
|
+
entry: buildRedactedMcpEntry("claude_code", "user", mcpPath, id, rec),
|
|
160
|
+
pluginName: plugin.name,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const hooksPath = path.join(installPath, "hooks", "hooks.json");
|
|
165
|
+
const hooksJson = await readTrackedJsonObject(tracker, hooksPath, "claude_plugin_hooks");
|
|
166
|
+
const hookEvents = asRecord(hooksJson?.hooks ?? hooksJson);
|
|
167
|
+
if (hookEvents) {
|
|
168
|
+
const before = hooksOut.length;
|
|
169
|
+
extractClaudeHooks(hookEvents, hooksPath, hooksOut);
|
|
170
|
+
for (let i = before; i < hooksOut.length; i += 1) {
|
|
171
|
+
plugin.bundled_hooks.push(hooksOut[i].event);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export function extractClaudeHooks(hooksObj, sourcePath, out) {
|
|
176
|
+
if (!hooksObj)
|
|
177
|
+
return;
|
|
178
|
+
for (const [event, value] of Object.entries(hooksObj)) {
|
|
179
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
180
|
+
out.push({ event, enabled: true, source_path: sourcePath });
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
for (const group of value) {
|
|
184
|
+
const rec = asRecord(group);
|
|
185
|
+
const matcher = asNonEmptyString(rec?.matcher);
|
|
186
|
+
const nested = Array.isArray(rec?.hooks) ? rec.hooks : [];
|
|
187
|
+
if (nested.length === 0) {
|
|
188
|
+
const directCmd = redactMcpCommand(asNonEmptyString(rec?.command));
|
|
189
|
+
out.push({
|
|
190
|
+
event,
|
|
191
|
+
...(matcher ? { matcher } : {}),
|
|
192
|
+
...(directCmd ? { command: directCmd } : {}),
|
|
193
|
+
enabled: true,
|
|
194
|
+
source_path: sourcePath,
|
|
195
|
+
});
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
for (const handler of nested) {
|
|
199
|
+
const hRec = asRecord(handler);
|
|
200
|
+
const cmd = redactMcpCommand(asNonEmptyString(hRec?.command));
|
|
201
|
+
out.push({
|
|
202
|
+
event,
|
|
203
|
+
...(matcher ? { matcher } : {}),
|
|
204
|
+
...(cmd ? { command: cmd } : {}),
|
|
205
|
+
enabled: true,
|
|
206
|
+
source_path: sourcePath,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
export function resolveNamedEntries(projectList, userList, pluginList) {
|
|
213
|
+
const out = [];
|
|
214
|
+
const winners = new Map();
|
|
215
|
+
const addScope = (items, scope) => {
|
|
216
|
+
for (const item of items) {
|
|
217
|
+
const key = item.name.toLowerCase();
|
|
218
|
+
const winner = winners.get(key);
|
|
219
|
+
if (winner) {
|
|
220
|
+
out.push({ ...item, scope, status: "shadowed", shadowed_by: winner });
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
winners.set(key, `${scope} (${item.path})`);
|
|
224
|
+
out.push({ ...item, scope, status: "effective" });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
addScope(projectList, "project");
|
|
229
|
+
addScope(userList, "user");
|
|
230
|
+
addScope(pluginList, "plugin");
|
|
231
|
+
return out;
|
|
232
|
+
}
|
|
233
|
+
export function resolveSubagentEntries(projectList, userList, pluginList) {
|
|
234
|
+
const out = [];
|
|
235
|
+
const winners = new Map();
|
|
236
|
+
const addScope = (items, scope) => {
|
|
237
|
+
for (const item of items) {
|
|
238
|
+
const key = item.name.toLowerCase();
|
|
239
|
+
const winner = winners.get(key);
|
|
240
|
+
if (winner) {
|
|
241
|
+
out.push({ ...item, scope, status: "shadowed", shadowed_by: winner });
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
winners.set(key, `${scope} (${item.path})`);
|
|
245
|
+
out.push({ ...item, scope, status: "effective" });
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
addScope(projectList, "project");
|
|
250
|
+
addScope(userList, "user");
|
|
251
|
+
addScope(pluginList, "plugin");
|
|
252
|
+
return out;
|
|
253
|
+
}
|
|
254
|
+
export function asStringArray(value) {
|
|
255
|
+
return Array.isArray(value) ? value.filter((v) => typeof v === "string" && v.trim().length > 0) : [];
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=claude-code-helpers.js.map
|
package/node_modules/@cchistory/source-adapters/dist/inventory/startup/claude-code-helpers.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code-helpers.js","sourceRoot":"","sources":["../../../src/inventory/startup/claude-code-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAW7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,WAAW,GAEZ,MAAM,aAAa,CAAC;AAErB,MAAM,gBAAgB,GAAG,CA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AC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,QAAQ,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Native pre-launch startup context resolver for Claude Code.
|
|
3
|
+
* Resolves CLAUDE.md / CLAUDE.local.md chains with recursive @path imports,
|
|
4
|
+
* .claude/rules YAML frontmatter paths, settings.json / settings.local.json cascade,
|
|
5
|
+
* installed plugin bundle expansion, and 4-tier MCP precedence (local > project > user > plugin).
|
|
6
|
+
* Excludes history scanning, activity correlation, and CLI formatting.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentStartupResolution } from "@cchistory/domain";
|
|
9
|
+
import { type NativeStartupResolverInput } from "./shared.js";
|
|
10
|
+
export declare function resolveClaudeCodeStartup(input: NativeStartupResolverInput): Promise<AgentStartupResolution>;
|
|
11
|
+
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/inventory/startup/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,sBAAsB,EAQvB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAUL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAErB,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,sBAAsB,CAAC,CAiVjC"}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Native pre-launch startup context resolver for Claude Code.
|
|
3
|
+
* Resolves CLAUDE.md / CLAUDE.local.md chains with recursive @path imports,
|
|
4
|
+
* .claude/rules YAML frontmatter paths, settings.json / settings.local.json cascade,
|
|
5
|
+
* installed plugin bundle expansion, and 4-tier MCP precedence (local > project > user > plugin).
|
|
6
|
+
* Excludes history scanning, activity correlation, and CLI formatting.
|
|
7
|
+
*/
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { asStringArray, collectClaudeRules, expandClaudePluginBundle, extractClaudeHooks, listClaudeSubagents, loadClaudeMdEntry, resolveNamedEntries, resolveSubagentEntries, } from "./claude-code-helpers.js";
|
|
10
|
+
import { asNonEmptyString, asRecord, buildRedactedMcpEntry, createReadTracker, estimateTokens, listSkillEntriesInDir, normalizeComparablePath, readTrackedJsonObject, stripMcpResolutionFields, } from "./shared.js";
|
|
11
|
+
export async function resolveClaudeCodeStartup(input) {
|
|
12
|
+
const tracker = createReadTracker("claude_code");
|
|
13
|
+
const claudeDir = path.join(input.homeDir, ".claude");
|
|
14
|
+
const claudeJsonPath = path.join(input.homeDir, ".claude.json");
|
|
15
|
+
// 1. Settings cascade: user < project < project_local
|
|
16
|
+
const settingsFiles = [];
|
|
17
|
+
const userSettingsPath = path.join(claudeDir, "settings.json");
|
|
18
|
+
const userSettings = await readTrackedJsonObject(tracker, userSettingsPath, "settings");
|
|
19
|
+
if (userSettings)
|
|
20
|
+
settingsFiles.push({ path: userSettingsPath, layer: "user", data: userSettings });
|
|
21
|
+
for (const dir of input.ancestorDirsRootToCwd) {
|
|
22
|
+
const projSettingsPath = path.join(dir, ".claude", "settings.json");
|
|
23
|
+
const projSettings = await readTrackedJsonObject(tracker, projSettingsPath, "settings");
|
|
24
|
+
if (projSettings)
|
|
25
|
+
settingsFiles.push({ path: projSettingsPath, layer: "project", data: projSettings });
|
|
26
|
+
const localSettingsPath = path.join(dir, ".claude", "settings.local.json");
|
|
27
|
+
const localSettings = await readTrackedJsonObject(tracker, localSettingsPath, "settings");
|
|
28
|
+
if (localSettings)
|
|
29
|
+
settingsFiles.push({ path: localSettingsPath, layer: "project_local", data: localSettings });
|
|
30
|
+
}
|
|
31
|
+
let effectiveModel;
|
|
32
|
+
let permissionMode;
|
|
33
|
+
const allowSet = new Set();
|
|
34
|
+
const askSet = new Set();
|
|
35
|
+
const denySet = new Set();
|
|
36
|
+
const disabledMcpjson = new Set();
|
|
37
|
+
const enabledMcpjson = new Set();
|
|
38
|
+
let enableAllProjectMcp;
|
|
39
|
+
const enabledPluginsMap = new Map();
|
|
40
|
+
const hooks = [];
|
|
41
|
+
for (const sf of settingsFiles) {
|
|
42
|
+
const model = asNonEmptyString(sf.data.model);
|
|
43
|
+
if (model)
|
|
44
|
+
effectiveModel = model;
|
|
45
|
+
const perms = asRecord(sf.data.permissions);
|
|
46
|
+
if (perms) {
|
|
47
|
+
const mode = asNonEmptyString(perms.defaultMode);
|
|
48
|
+
if (mode)
|
|
49
|
+
permissionMode = mode;
|
|
50
|
+
for (const item of asStringArray(perms.allow))
|
|
51
|
+
allowSet.add(item);
|
|
52
|
+
for (const item of asStringArray(perms.ask))
|
|
53
|
+
askSet.add(item);
|
|
54
|
+
for (const item of asStringArray(perms.deny))
|
|
55
|
+
denySet.add(item);
|
|
56
|
+
}
|
|
57
|
+
for (const name of asStringArray(sf.data.disabledMcpjsonServers))
|
|
58
|
+
disabledMcpjson.add(name);
|
|
59
|
+
for (const name of asStringArray(sf.data.enabledMcpjsonServers))
|
|
60
|
+
enabledMcpjson.add(name);
|
|
61
|
+
if (typeof sf.data.enableAllProjectMcpServers === "boolean") {
|
|
62
|
+
enableAllProjectMcp = sf.data.enableAllProjectMcpServers;
|
|
63
|
+
}
|
|
64
|
+
const pluginMap = asRecord(sf.data.enabledPlugins);
|
|
65
|
+
if (pluginMap) {
|
|
66
|
+
for (const [pluginName, val] of Object.entries(pluginMap)) {
|
|
67
|
+
if (typeof val === "boolean") {
|
|
68
|
+
enabledPluginsMap.set(pluginName, { enabled: val, sourcePath: sf.path });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
extractClaudeHooks(asRecord(sf.data.hooks), sf.path, hooks);
|
|
73
|
+
}
|
|
74
|
+
// 2. CLAUDE.md / CLAUDE.local.md chain + recursive @imports
|
|
75
|
+
const claudeMdChain = [];
|
|
76
|
+
if (!input.isolatedHome) {
|
|
77
|
+
const managedCandidates = process.platform === "darwin"
|
|
78
|
+
? ["/Library/Application Support/ClaudeCode/CLAUDE.md"]
|
|
79
|
+
: ["/etc/claude-code/CLAUDE.md"];
|
|
80
|
+
for (const mPath of managedCandidates) {
|
|
81
|
+
const entry = await loadClaudeMdEntry(tracker, mPath, "managed", input.homeDir);
|
|
82
|
+
if (entry)
|
|
83
|
+
claudeMdChain.push(entry);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const userClaudeMd = await loadClaudeMdEntry(tracker, path.join(claudeDir, "CLAUDE.md"), "user", input.homeDir);
|
|
87
|
+
if (userClaudeMd)
|
|
88
|
+
claudeMdChain.push(userClaudeMd);
|
|
89
|
+
for (let i = 0; i < input.ancestorDirsRootToCwd.length; i += 1) {
|
|
90
|
+
const dir = input.ancestorDirsRootToCwd[i];
|
|
91
|
+
const isCwd = i === input.ancestorDirsRootToCwd.length - 1;
|
|
92
|
+
const layer = isCwd ? "project" : "ancestor";
|
|
93
|
+
const rootMd = await loadClaudeMdEntry(tracker, path.join(dir, "CLAUDE.md"), layer, input.homeDir);
|
|
94
|
+
if (rootMd)
|
|
95
|
+
claudeMdChain.push(rootMd);
|
|
96
|
+
const dotMd = await loadClaudeMdEntry(tracker, path.join(dir, ".claude", "CLAUDE.md"), layer, input.homeDir);
|
|
97
|
+
if (dotMd)
|
|
98
|
+
claudeMdChain.push(dotMd);
|
|
99
|
+
if (isCwd) {
|
|
100
|
+
const localMd = await loadClaudeMdEntry(tracker, path.join(dir, "CLAUDE.local.md"), "project_local", input.homeDir);
|
|
101
|
+
if (localMd)
|
|
102
|
+
claudeMdChain.push(localMd);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// 3. .claude/rules/*.md (user + repo ancestor chain) with YAML frontmatter `paths:`
|
|
106
|
+
const rules = [];
|
|
107
|
+
await collectClaudeRules(tracker, path.join(claudeDir, "rules"), "user", rules);
|
|
108
|
+
for (const dir of input.ancestorDirsRootToCwd) {
|
|
109
|
+
await collectClaudeRules(tracker, path.join(dir, ".claude", "rules"), "project", rules);
|
|
110
|
+
}
|
|
111
|
+
// 4. Plugins (`installed_plugins.json` + `enabledPlugins`) with bundle expansion
|
|
112
|
+
const plugins = [];
|
|
113
|
+
const pluginMcpCandidates = [];
|
|
114
|
+
const pluginSkills = [];
|
|
115
|
+
const pluginCommands = [];
|
|
116
|
+
const pluginSubagents = [];
|
|
117
|
+
const installedPluginsPath = path.join(claudeDir, "plugins", "installed_plugins.json");
|
|
118
|
+
const installedJson = await readTrackedJsonObject(tracker, installedPluginsPath, "plugins_registry");
|
|
119
|
+
const installedMap = asRecord(installedJson?.plugins) ?? {};
|
|
120
|
+
const allPluginNames = new Set([...Object.keys(installedMap), ...enabledPluginsMap.keys()]);
|
|
121
|
+
for (const pluginName of [...allPluginNames].sort((a, b) => a.localeCompare(b))) {
|
|
122
|
+
const enabledInfo = enabledPluginsMap.get(pluginName);
|
|
123
|
+
const enabled = enabledInfo ? enabledInfo.enabled : true;
|
|
124
|
+
const rawMeta = installedMap[pluginName];
|
|
125
|
+
const metaObj = Array.isArray(rawMeta) ? asRecord(rawMeta[0]) : asRecord(rawMeta);
|
|
126
|
+
const installPath = asNonEmptyString(metaObj?.installPath);
|
|
127
|
+
const version = asNonEmptyString(metaObj?.version);
|
|
128
|
+
const pluginEntry = {
|
|
129
|
+
name: pluginName,
|
|
130
|
+
enabled,
|
|
131
|
+
source_path: enabledInfo?.sourcePath ?? installedPluginsPath,
|
|
132
|
+
...(installPath ? { install_path: installPath } : {}),
|
|
133
|
+
...(version ? { version } : {}),
|
|
134
|
+
bundled_skills: [],
|
|
135
|
+
bundled_commands: [],
|
|
136
|
+
bundled_agents: [],
|
|
137
|
+
bundled_mcp_servers: [],
|
|
138
|
+
bundled_hooks: [],
|
|
139
|
+
};
|
|
140
|
+
if (enabled && installPath) {
|
|
141
|
+
await expandClaudePluginBundle(tracker, pluginEntry, installPath, pluginMcpCandidates, pluginSkills, pluginCommands, pluginSubagents, hooks);
|
|
142
|
+
}
|
|
143
|
+
plugins.push(pluginEntry);
|
|
144
|
+
}
|
|
145
|
+
// 5. MCP servers precedence: local (~/.claude.json#projects[dir]) > project (.mcp.json) > user (~/.claude.json) > plugin
|
|
146
|
+
const claudeJson = await readTrackedJsonObject(tracker, claudeJsonPath, "claude_json");
|
|
147
|
+
const localMcpRaw = [];
|
|
148
|
+
const userMcpRaw = [];
|
|
149
|
+
const projectMcpRaw = [];
|
|
150
|
+
if (claudeJson) {
|
|
151
|
+
const userMap = asRecord(claudeJson.mcpServers);
|
|
152
|
+
if (userMap) {
|
|
153
|
+
for (const [id, val] of Object.entries(userMap)) {
|
|
154
|
+
const rec = asRecord(val);
|
|
155
|
+
if (rec)
|
|
156
|
+
userMcpRaw.push({ id, rec, path: claudeJsonPath });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const projectsMap = asRecord(claudeJson.projects);
|
|
160
|
+
if (projectsMap && input.projectDir) {
|
|
161
|
+
const targetNorm = normalizeComparablePath(input.projectDir);
|
|
162
|
+
for (const [projKey, projVal] of Object.entries(projectsMap)) {
|
|
163
|
+
if (normalizeComparablePath(projKey) !== targetNorm)
|
|
164
|
+
continue;
|
|
165
|
+
const projMcp = asRecord(asRecord(projVal)?.mcpServers);
|
|
166
|
+
if (!projMcp)
|
|
167
|
+
continue;
|
|
168
|
+
for (const [id, val] of Object.entries(projMcp)) {
|
|
169
|
+
const rec = asRecord(val);
|
|
170
|
+
if (rec)
|
|
171
|
+
localMcpRaw.push({ id, rec, path: claudeJsonPath });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// Project `.mcp.json` files: closer directory overrides parent repo root
|
|
177
|
+
for (let i = input.ancestorDirsRootToCwd.length - 1; i >= 0; i -= 1) {
|
|
178
|
+
const dir = input.ancestorDirsRootToCwd[i];
|
|
179
|
+
const dotMcpPath = path.join(dir, ".mcp.json");
|
|
180
|
+
const dotMcp = await readTrackedJsonObject(tracker, dotMcpPath, "mcp_config");
|
|
181
|
+
const projMap = asRecord(dotMcp?.mcpServers);
|
|
182
|
+
if (projMap) {
|
|
183
|
+
for (const [id, val] of Object.entries(projMap)) {
|
|
184
|
+
const rec = asRecord(val);
|
|
185
|
+
if (rec)
|
|
186
|
+
projectMcpRaw.push({ id, rec, path: dotMcpPath });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const mcpServers = [];
|
|
191
|
+
const winningMcpById = new Map();
|
|
192
|
+
const registerMcpLayer = (items) => {
|
|
193
|
+
for (const item of items) {
|
|
194
|
+
const key = item.id.toLowerCase();
|
|
195
|
+
const disabledBySetting = item.layer === "project" && disabledMcpjson.has(item.id);
|
|
196
|
+
if (!item.entry.enabled || disabledBySetting) {
|
|
197
|
+
mcpServers.push({
|
|
198
|
+
...item.entry,
|
|
199
|
+
enabled: false,
|
|
200
|
+
status: "disabled",
|
|
201
|
+
precedence_layer: item.layer,
|
|
202
|
+
disabled_reason: disabledBySetting ? "disabledMcpjsonServers" : "config_disabled",
|
|
203
|
+
...(item.pluginName ? { from_plugin: item.pluginName } : {}),
|
|
204
|
+
});
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
const winner = winningMcpById.get(key);
|
|
208
|
+
if (winner) {
|
|
209
|
+
mcpServers.push({
|
|
210
|
+
...item.entry,
|
|
211
|
+
status: "shadowed",
|
|
212
|
+
precedence_layer: item.layer,
|
|
213
|
+
shadowed_by: winner,
|
|
214
|
+
...(item.pluginName ? { from_plugin: item.pluginName } : {}),
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
winningMcpById.set(key, `${item.layer} (${item.entry.source_path})`);
|
|
219
|
+
mcpServers.push({
|
|
220
|
+
...item.entry,
|
|
221
|
+
status: "effective",
|
|
222
|
+
precedence_layer: item.layer,
|
|
223
|
+
...(item.pluginName ? { from_plugin: item.pluginName } : {}),
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
registerMcpLayer(localMcpRaw.map((x) => ({
|
|
229
|
+
id: x.id,
|
|
230
|
+
entry: buildRedactedMcpEntry("claude_code", "project", x.path, x.id, x.rec),
|
|
231
|
+
layer: "local",
|
|
232
|
+
})));
|
|
233
|
+
registerMcpLayer(projectMcpRaw.map((x) => ({
|
|
234
|
+
id: x.id,
|
|
235
|
+
entry: buildRedactedMcpEntry("claude_code", "project", x.path, x.id, x.rec),
|
|
236
|
+
layer: "project",
|
|
237
|
+
})));
|
|
238
|
+
registerMcpLayer(userMcpRaw.map((x) => ({
|
|
239
|
+
id: x.id,
|
|
240
|
+
entry: buildRedactedMcpEntry("claude_code", "user", x.path, x.id, x.rec),
|
|
241
|
+
layer: "user",
|
|
242
|
+
})));
|
|
243
|
+
registerMcpLayer(pluginMcpCandidates.map((x) => ({
|
|
244
|
+
id: x.entry.server_id,
|
|
245
|
+
entry: x.entry,
|
|
246
|
+
layer: "plugin",
|
|
247
|
+
pluginName: x.pluginName,
|
|
248
|
+
})));
|
|
249
|
+
// 6. Skills, commands, subagents (precedence: project > user > plugin)
|
|
250
|
+
const projSkills = input.projectDir ? await listSkillEntriesInDir(tracker, path.join(input.projectDir, ".claude", "skills")) : [];
|
|
251
|
+
const userSkills = await listSkillEntriesInDir(tracker, path.join(claudeDir, "skills"));
|
|
252
|
+
const skills = resolveNamedEntries(projSkills, userSkills, pluginSkills);
|
|
253
|
+
const projCommands = input.projectDir ? await listSkillEntriesInDir(tracker, path.join(input.projectDir, ".claude", "commands")) : [];
|
|
254
|
+
const userCommands = await listSkillEntriesInDir(tracker, path.join(claudeDir, "commands"));
|
|
255
|
+
const commands = resolveNamedEntries(projCommands, userCommands, pluginCommands);
|
|
256
|
+
const projAgents = input.projectDir ? await listClaudeSubagents(tracker, path.join(input.projectDir, ".claude", "agents")) : [];
|
|
257
|
+
const userAgents = await listClaudeSubagents(tracker, path.join(claudeDir, "agents"));
|
|
258
|
+
const subagents = resolveSubagentEntries(projAgents, userAgents, pluginSubagents);
|
|
259
|
+
// 7. Startup context footprint
|
|
260
|
+
let alwaysBytes = 0;
|
|
261
|
+
let resolvedImports = 0;
|
|
262
|
+
let missingImports = 0;
|
|
263
|
+
for (const entry of claudeMdChain) {
|
|
264
|
+
alwaysBytes += entry.size_bytes;
|
|
265
|
+
for (const imp of entry.imports) {
|
|
266
|
+
if (imp.exists && !imp.cycle) {
|
|
267
|
+
resolvedImports += 1;
|
|
268
|
+
alwaysBytes += imp.size_bytes ?? 0;
|
|
269
|
+
}
|
|
270
|
+
else if (!imp.exists) {
|
|
271
|
+
missingImports += 1;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const alwaysRules = rules.filter((r) => r.mode === "always");
|
|
276
|
+
for (const r of alwaysRules)
|
|
277
|
+
alwaysBytes += r.size_bytes;
|
|
278
|
+
const native = {
|
|
279
|
+
client: "claude_code",
|
|
280
|
+
claude_md_chain: claudeMdChain,
|
|
281
|
+
rules,
|
|
282
|
+
settings_cascade: {
|
|
283
|
+
files: settingsFiles.map((f) => ({ path: f.path, layer: f.layer })),
|
|
284
|
+
...(effectiveModel ? { effective_model: effectiveModel } : {}),
|
|
285
|
+
...(permissionMode ? { permission_mode: permissionMode } : {}),
|
|
286
|
+
...(allowSet.size + askSet.size + denySet.size > 0
|
|
287
|
+
? { permissions: { allow_count: allowSet.size, ask_count: askSet.size, deny_count: denySet.size } }
|
|
288
|
+
: {}),
|
|
289
|
+
disabled_mcpjson_servers: [...disabledMcpjson].sort(),
|
|
290
|
+
enabled_mcpjson_servers: [...enabledMcpjson].sort(),
|
|
291
|
+
...(enableAllProjectMcp !== undefined ? { enable_all_project_mcp_servers: enableAllProjectMcp } : {}),
|
|
292
|
+
},
|
|
293
|
+
mcp_servers: mcpServers,
|
|
294
|
+
plugins,
|
|
295
|
+
skills,
|
|
296
|
+
commands,
|
|
297
|
+
subagents,
|
|
298
|
+
hooks,
|
|
299
|
+
startup_footprint: {
|
|
300
|
+
always_loaded_bytes: alwaysBytes,
|
|
301
|
+
always_loaded_estimated_tokens: estimateTokens(alwaysBytes),
|
|
302
|
+
claude_md_count: claudeMdChain.length,
|
|
303
|
+
resolved_import_count: resolvedImports,
|
|
304
|
+
missing_import_count: missingImports,
|
|
305
|
+
always_rule_count: alwaysRules.length,
|
|
306
|
+
path_scoped_rule_count: rules.length - alwaysRules.length,
|
|
307
|
+
},
|
|
308
|
+
};
|
|
309
|
+
return {
|
|
310
|
+
client: "claude_code",
|
|
311
|
+
display_name: "Claude Code",
|
|
312
|
+
resolution_tier: "native",
|
|
313
|
+
project_dir: input.projectDir,
|
|
314
|
+
git_root: input.gitRoot,
|
|
315
|
+
files_read: tracker.filesRead,
|
|
316
|
+
mcp_servers: mcpServers.filter((m) => m.status === "effective").map(stripMcpResolutionFields),
|
|
317
|
+
diagnostics: tracker.diagnostics,
|
|
318
|
+
native,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=claude-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../../src/inventory/startup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uB,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,IAAI,EAAE;YACnD,GAAG,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACtG;QACD,WAAW,EAAE,UAAU;QACvB,OAAO;QACP,MAAM;QACN,QAAQ;QACR,SAAS;QACT,KAAK;QACL,iBAAiB,EAAE;YACjB,mBAAmB,EAAE,WAAW;YAChC,8BAA8B,EAAE,cAAc,CAAC,WAAW,CAAC;YAC3D,eAAe,EAAE,aAAa,CAAC,MAAM;YACrC,qBAAqB,EAAE,eAAe;YACtC,oBAAoB,EAAE,cAAc;YACpC,iBAAiB,EAAE,WAAW,CAAC,MAAM;YACrC,sBAAsB,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM;SAC1D;KACF,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,aAAa;QACrB,YAAY,EAAE,aAAa;QAC3B,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,KAAK,CAAC,UAAU;QAC7B,QAAQ,EAAE,KAAK,CAAC,OAAO;QACvB,UAAU,EAAE,OAAO,CAAC,SAAS;QAC7B,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAC7F,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Native pre-launch startup context resolver for OpenAI Codex CLI.
|
|
3
|
+
* Resolves ~/.codex/config.toml + trusted .codex/config.toml, [projects.<dir>].trust_level,
|
|
4
|
+
* profiles, AGENTS.override.md / AGENTS.md / fallback chain from global -> Git root -> cwd
|
|
5
|
+
* with cumulative project_doc_max_bytes (32 KiB default) truncation tracking, MCP servers,
|
|
6
|
+
* agents, skills, and hooks.
|
|
7
|
+
* Excludes history scanning, activity correlation, and CLI formatting.
|
|
8
|
+
*/
|
|
9
|
+
import type { AgentStartupResolution } from "@cchistory/domain";
|
|
10
|
+
import { type NativeStartupResolverInput } from "./shared.js";
|
|
11
|
+
export declare function resolveCodexStartup(input: NativeStartupResolverInput): Promise<AgentStartupResolution>;
|
|
12
|
+
//# sourceMappingURL=codex.d.ts.map
|