@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,443 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import * as zlib from "node:zlib";
|
|
3
|
+
import { isObject, asString, asNumber } from "../../core/type-guards.js";
|
|
4
|
+
import { SourceReadBudgetExceededError } from "../../core/read-budget.js";
|
|
5
|
+
/**
|
|
6
|
+
* DeepSeek Harness persistence reader.
|
|
7
|
+
*
|
|
8
|
+
* The current physical format (`session.v4.jsonl[.zstd]`) stores one JSONL
|
|
9
|
+
* record per durable session event behind a header record, framed as
|
|
10
|
+
* independent Zstandard frames when compression is enabled. The bundled
|
|
11
|
+
* reader reconstructs the logical rows without depending on the harness, so
|
|
12
|
+
* Lite keeps its zero-store, read-only contract.
|
|
13
|
+
*/
|
|
14
|
+
const ZSTD_FRAME_MAGIC = 0xfd2fb528;
|
|
15
|
+
const ZSTD_SKIPPABLE_MAGIC_MIN = 0x184d2a50;
|
|
16
|
+
const ZSTD_SKIPPABLE_MAGIC_MAX = 0x184d2a5f;
|
|
17
|
+
/** Current logical session format this adapter interprets. */
|
|
18
|
+
export const SUPPORTED_SESSION_FORMAT_VERSION = 4;
|
|
19
|
+
const MAX_DECODED_BYTES = 256 * 1024 * 1024;
|
|
20
|
+
const MAX_RECORD_BYTES = 16 * 1024 * 1024;
|
|
21
|
+
// Resolved lazily so an older Node.js still loads this module and reports an
|
|
22
|
+
// actionable diagnostic instead of failing at import time.
|
|
23
|
+
function getZstdDecompressSync() {
|
|
24
|
+
const fn = zlib.zstdDecompressSync;
|
|
25
|
+
return typeof fn === "function" ? fn : undefined;
|
|
26
|
+
}
|
|
27
|
+
function isZstdMagic(fileBuffer) {
|
|
28
|
+
if (fileBuffer.length < 4) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
const magic = fileBuffer.readUInt32LE(0);
|
|
32
|
+
return (magic === ZSTD_FRAME_MAGIC ||
|
|
33
|
+
(magic >= ZSTD_SKIPPABLE_MAGIC_MIN && magic <= ZSTD_SKIPPABLE_MAGIC_MAX));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Locate the exact RFC 8878 byte span of one Zstandard (or skippable) frame.
|
|
37
|
+
* Node 22's `node:zlib` Zstd decoder stops after the first frame in a
|
|
38
|
+
* concatenated stream, so slicing frames explicitly keeps multi-frame decoding
|
|
39
|
+
* and torn-tail detection consistent across Node 22 and newer runtimes.
|
|
40
|
+
*/
|
|
41
|
+
function scanNextZstdFrame(buffer, offset) {
|
|
42
|
+
if (offset + 4 > buffer.length) {
|
|
43
|
+
return { kind: "truncated", reason: "incomplete Zstandard frame magic" };
|
|
44
|
+
}
|
|
45
|
+
const magic = buffer.readUInt32LE(offset);
|
|
46
|
+
if (magic >= ZSTD_SKIPPABLE_MAGIC_MIN && magic <= ZSTD_SKIPPABLE_MAGIC_MAX) {
|
|
47
|
+
if (offset + 8 > buffer.length) {
|
|
48
|
+
return { kind: "truncated", reason: "incomplete skippable frame header" };
|
|
49
|
+
}
|
|
50
|
+
const frameSize = buffer.readUInt32LE(offset + 4);
|
|
51
|
+
const end = offset + 8 + frameSize;
|
|
52
|
+
if (end > buffer.length) {
|
|
53
|
+
return { kind: "truncated", reason: "incomplete skippable frame body" };
|
|
54
|
+
}
|
|
55
|
+
return { kind: "skippable", start: offset, end };
|
|
56
|
+
}
|
|
57
|
+
if (magic !== ZSTD_FRAME_MAGIC) {
|
|
58
|
+
return { kind: "invalid", reason: `unexpected Zstandard frame magic 0x${magic.toString(16)}` };
|
|
59
|
+
}
|
|
60
|
+
if (offset + 5 > buffer.length) {
|
|
61
|
+
return { kind: "truncated", reason: "incomplete Zstandard frame header descriptor" };
|
|
62
|
+
}
|
|
63
|
+
let pos = offset + 4;
|
|
64
|
+
const fhd = buffer[pos++];
|
|
65
|
+
const fcsFlag = (fhd >>> 6) & 3;
|
|
66
|
+
const singleSegment = (fhd & 0x20) !== 0;
|
|
67
|
+
if ((fhd & 0x08) !== 0) {
|
|
68
|
+
return { kind: "invalid", reason: "reserved bit set in Zstandard frame header" };
|
|
69
|
+
}
|
|
70
|
+
const hasChecksum = (fhd & 0x04) !== 0;
|
|
71
|
+
const dictFlag = fhd & 3;
|
|
72
|
+
if (!singleSegment) {
|
|
73
|
+
pos += 1;
|
|
74
|
+
}
|
|
75
|
+
pos += dictFlag === 0 ? 0 : dictFlag === 1 ? 1 : dictFlag === 2 ? 2 : 4;
|
|
76
|
+
pos += fcsFlag === 0 ? (singleSegment ? 1 : 0) : fcsFlag === 1 ? 2 : fcsFlag === 2 ? 4 : 8;
|
|
77
|
+
if (pos > buffer.length) {
|
|
78
|
+
return { kind: "truncated", reason: "incomplete Zstandard frame header" };
|
|
79
|
+
}
|
|
80
|
+
while (true) {
|
|
81
|
+
if (pos + 3 > buffer.length) {
|
|
82
|
+
return { kind: "truncated", reason: "incomplete Zstandard block header" };
|
|
83
|
+
}
|
|
84
|
+
const blockHeader = buffer[pos] | (buffer[pos + 1] << 8) | (buffer[pos + 2] << 16);
|
|
85
|
+
pos += 3;
|
|
86
|
+
const lastBlock = (blockHeader & 1) === 1;
|
|
87
|
+
const blockType = (blockHeader >>> 1) & 3;
|
|
88
|
+
const blockSize = blockHeader >>> 3;
|
|
89
|
+
if (blockType === 3) {
|
|
90
|
+
return { kind: "invalid", reason: "reserved Zstandard block type" };
|
|
91
|
+
}
|
|
92
|
+
pos += blockType === 1 ? 1 : blockSize;
|
|
93
|
+
if (pos > buffer.length) {
|
|
94
|
+
return { kind: "truncated", reason: "incomplete Zstandard block payload" };
|
|
95
|
+
}
|
|
96
|
+
if (lastBlock) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (hasChecksum) {
|
|
101
|
+
pos += 4;
|
|
102
|
+
if (pos > buffer.length) {
|
|
103
|
+
return { kind: "truncated", reason: "incomplete Zstandard content checksum" };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return { kind: "frame", start: offset, end: pos };
|
|
107
|
+
}
|
|
108
|
+
function readMaxDecodedBytes(budget) {
|
|
109
|
+
const budgeted = budget?.maximumUnitBytes?.();
|
|
110
|
+
if (typeof budgeted === "number" && Number.isFinite(budgeted) && budgeted > 0) {
|
|
111
|
+
return Math.min(budgeted, MAX_DECODED_BYTES);
|
|
112
|
+
}
|
|
113
|
+
return MAX_DECODED_BYTES;
|
|
114
|
+
}
|
|
115
|
+
function splitLines(decoded) {
|
|
116
|
+
return decoded
|
|
117
|
+
.toString("utf8")
|
|
118
|
+
.split("\n")
|
|
119
|
+
.filter((line) => line.trim().length > 0);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Decode every concatenated Zstandard frame. A truncated trailing frame from a
|
|
123
|
+
* crashed writer still yields its complete predecessor frames; the partial
|
|
124
|
+
* suffix is reported instead of dropping the whole readable prefix.
|
|
125
|
+
*/
|
|
126
|
+
function decodeZstdFrames(fileBuffer, maxDecodedBytes, budget, unitLabel = "deepseek_harness zstd log") {
|
|
127
|
+
const decompress = getZstdDecompressSync();
|
|
128
|
+
if (!decompress) {
|
|
129
|
+
return {
|
|
130
|
+
lines: [],
|
|
131
|
+
decodedBytes: 0,
|
|
132
|
+
diagnostics: [{
|
|
133
|
+
code: "dsh_zstd_unsupported_runtime",
|
|
134
|
+
detail: "This Node.js runtime has no Zstandard support; install Node 22.15+ or point the adapter at an uncompressed session log.",
|
|
135
|
+
}],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const chunks = [];
|
|
139
|
+
const diagnostics = [];
|
|
140
|
+
let decodedBytes = 0;
|
|
141
|
+
let admittedExtraBytes = 0;
|
|
142
|
+
let offset = 0;
|
|
143
|
+
while (offset < fileBuffer.length) {
|
|
144
|
+
const scan = scanNextZstdFrame(fileBuffer, offset);
|
|
145
|
+
if (scan.kind === "skippable") {
|
|
146
|
+
offset = scan.end;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (scan.kind !== "frame") {
|
|
150
|
+
if (decodedBytes > 0) {
|
|
151
|
+
diagnostics.push({
|
|
152
|
+
code: "dsh_zstd_partial_frame",
|
|
153
|
+
detail: `Zstandard stream ended after ${decodedBytes} decoded bytes (${scan.reason}). Complete predecessor frames were retained.`,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
diagnostics.push({
|
|
158
|
+
code: "dsh_zstd_decode_failed",
|
|
159
|
+
detail: `Zstandard decompression failed before any readable record (${scan.reason}).`,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
const remainingBytes = maxDecodedBytes - decodedBytes;
|
|
165
|
+
if (remainingBytes <= 0) {
|
|
166
|
+
diagnostics.push({
|
|
167
|
+
code: "dsh_decoded_size_exceeded",
|
|
168
|
+
detail: `Decoded session log exceeds the ${maxDecodedBytes}-byte read budget; readable prefix discarded.`,
|
|
169
|
+
});
|
|
170
|
+
return { lines: [], decodedBytes: 0, diagnostics };
|
|
171
|
+
}
|
|
172
|
+
let frameDecoded;
|
|
173
|
+
try {
|
|
174
|
+
frameDecoded = decompress(fileBuffer.subarray(scan.start, scan.end), {
|
|
175
|
+
maxOutputLength: remainingBytes,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
const code = error.code;
|
|
180
|
+
if (code === "ERR_BUFFER_TOO_LARGE") {
|
|
181
|
+
diagnostics.push({
|
|
182
|
+
code: "dsh_decoded_size_exceeded",
|
|
183
|
+
detail: `Decoded session log exceeds the ${maxDecodedBytes}-byte read budget; readable prefix discarded.`,
|
|
184
|
+
});
|
|
185
|
+
return { lines: [], decodedBytes: 0, diagnostics };
|
|
186
|
+
}
|
|
187
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
188
|
+
if (decodedBytes > 0) {
|
|
189
|
+
diagnostics.push({
|
|
190
|
+
code: "dsh_zstd_partial_frame",
|
|
191
|
+
detail: `Zstandard frame at byte ${scan.start} failed after ${decodedBytes} decoded bytes: ${message}. Complete predecessor frames were retained.`,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
diagnostics.push({
|
|
196
|
+
code: "dsh_zstd_decode_failed",
|
|
197
|
+
detail: `Zstandard decompression failed before any readable record: ${message}.`,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
decodedBytes += frameDecoded.length;
|
|
203
|
+
if (decodedBytes > maxDecodedBytes) {
|
|
204
|
+
diagnostics.push({
|
|
205
|
+
code: "dsh_decoded_size_exceeded",
|
|
206
|
+
detail: `Decoded session log exceeds the ${maxDecodedBytes}-byte read budget; readable prefix discarded.`,
|
|
207
|
+
});
|
|
208
|
+
return { lines: [], decodedBytes: 0, diagnostics };
|
|
209
|
+
}
|
|
210
|
+
// Charge incremental expansion beyond the compressed bytes already admitted
|
|
211
|
+
// when the file was captured so many compressed logs cannot bypass the scan budget.
|
|
212
|
+
const totalExtraBytes = Math.max(0, decodedBytes - fileBuffer.length);
|
|
213
|
+
const deltaExtraBytes = totalExtraBytes - admittedExtraBytes;
|
|
214
|
+
if (deltaExtraBytes > 0 && budget) {
|
|
215
|
+
try {
|
|
216
|
+
budget.admit(deltaExtraBytes, `${unitLabel}:zstd decoded`);
|
|
217
|
+
admittedExtraBytes = totalExtraBytes;
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
if (error instanceof SourceReadBudgetExceededError) {
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
223
|
+
throw error;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
chunks.push(frameDecoded);
|
|
227
|
+
offset = scan.end;
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
lines: chunks.length > 0 ? splitLines(Buffer.concat(chunks)) : [],
|
|
231
|
+
decodedBytes,
|
|
232
|
+
diagnostics,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
export async function readDeepSeekHarnessLog(fileBuffer, budget, options) {
|
|
236
|
+
if (!isZstdMagic(fileBuffer) && !options?.compressedHint) {
|
|
237
|
+
const maxBytes = readMaxDecodedBytes(budget);
|
|
238
|
+
if (fileBuffer.length > maxBytes) {
|
|
239
|
+
return {
|
|
240
|
+
lines: [],
|
|
241
|
+
decodedBytes: 0,
|
|
242
|
+
diagnostics: [{
|
|
243
|
+
code: "dsh_decoded_size_exceeded",
|
|
244
|
+
detail: `Session log exceeds the ${maxBytes}-byte read budget; readable prefix discarded.`,
|
|
245
|
+
}],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
return { lines: splitLines(fileBuffer), decodedBytes: fileBuffer.length, diagnostics: [] };
|
|
249
|
+
}
|
|
250
|
+
return decodeZstdFrames(fileBuffer, readMaxDecodedBytes(budget), budget, options?.unitLabel);
|
|
251
|
+
}
|
|
252
|
+
function epochMillisIso(value) {
|
|
253
|
+
const millis = asNumber(value);
|
|
254
|
+
if (millis === undefined || !Number.isFinite(millis)) {
|
|
255
|
+
return undefined;
|
|
256
|
+
}
|
|
257
|
+
const date = new Date(millis);
|
|
258
|
+
if (Number.isNaN(date.getTime())) {
|
|
259
|
+
return undefined;
|
|
260
|
+
}
|
|
261
|
+
return date.toISOString();
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Project one DeepSeek Harness session log into the adapter seed shape.
|
|
265
|
+
* One log file is one session; its header supplies identity and working
|
|
266
|
+
* directory, and each durable event becomes one parseable record so the
|
|
267
|
+
* runtime can interpret it in file order.
|
|
268
|
+
*/
|
|
269
|
+
export async function extractDeepSeekHarnessSeeds(filePath, fileBuffer, budget) {
|
|
270
|
+
const { lines, diagnostics } = await readDeepSeekHarnessLog(fileBuffer, budget, {
|
|
271
|
+
compressedHint: filePath.endsWith(".zstd"),
|
|
272
|
+
unitLabel: filePath,
|
|
273
|
+
});
|
|
274
|
+
const seedDiagnostics = [...diagnostics];
|
|
275
|
+
const rows = [];
|
|
276
|
+
const maxRecordBytes = Math.min(MAX_RECORD_BYTES, readMaxDecodedBytes(budget));
|
|
277
|
+
for (const [index, rawLine] of lines.entries()) {
|
|
278
|
+
const lineBytes = Buffer.byteLength(rawLine, "utf8");
|
|
279
|
+
if (lineBytes > maxRecordBytes) {
|
|
280
|
+
seedDiagnostics.push({
|
|
281
|
+
code: "dsh_record_too_large",
|
|
282
|
+
detail: `Line ${index + 1} is ${lineBytes} bytes, exceeding the ${maxRecordBytes}-byte record cap; skipped.`,
|
|
283
|
+
});
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
let value;
|
|
287
|
+
try {
|
|
288
|
+
value = JSON.parse(rawLine);
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
seedDiagnostics.push({
|
|
292
|
+
code: "dsh_malformed_jsonl_record",
|
|
293
|
+
detail: `Line ${index + 1} is not valid JSON and was kept only as a diagnostic.`,
|
|
294
|
+
});
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
if (!isObject(value)) {
|
|
298
|
+
seedDiagnostics.push({
|
|
299
|
+
code: "dsh_record_not_object",
|
|
300
|
+
detail: `Line ${index + 1} is not a JSON object and was kept only as a diagnostic.`,
|
|
301
|
+
});
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
rows.push({ lineNumber: index + 1, rawLine, value });
|
|
305
|
+
}
|
|
306
|
+
const headerRow = rows.find((row) => row.value.type === "session");
|
|
307
|
+
const header = headerRow?.value;
|
|
308
|
+
const version = asNumber(header?.version);
|
|
309
|
+
if (!header) {
|
|
310
|
+
seedDiagnostics.push({
|
|
311
|
+
code: "dsh_session_header_missing",
|
|
312
|
+
detail: "The log has no session header record; session identity falls back to the directory name.",
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
else if (version !== SUPPORTED_SESSION_FORMAT_VERSION) {
|
|
316
|
+
seedDiagnostics.push({
|
|
317
|
+
code: "dsh_unsupported_session_format",
|
|
318
|
+
detail: `Physical session format version ${String(header.version)} is not the supported v${SUPPORTED_SESSION_FORMAT_VERSION}; event bodies were not interpreted.`,
|
|
319
|
+
});
|
|
320
|
+
return [{
|
|
321
|
+
sessionId: canonicalSessionId(filePath, header),
|
|
322
|
+
diagnostics: seedDiagnostics,
|
|
323
|
+
records: [],
|
|
324
|
+
}];
|
|
325
|
+
}
|
|
326
|
+
const events = headerRow ? rows.filter((row) => row !== headerRow) : rows;
|
|
327
|
+
const inheritedCut = findInheritedSeedCut(events);
|
|
328
|
+
if (header && header.isSeeded === true && inheritedCut === undefined) {
|
|
329
|
+
seedDiagnostics.push({
|
|
330
|
+
code: "dsh_fork_seed_boundary_missing",
|
|
331
|
+
detail: "The session header marks a fork seed but no tagged session/end-seed marker was found; inherited history cannot be separated.",
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
const ownEvents = inheritedCut === undefined ? events : events.slice(inheritedCut);
|
|
335
|
+
if (inheritedCut !== undefined && inheritedCut > 0) {
|
|
336
|
+
seedDiagnostics.push({
|
|
337
|
+
code: "dsh_fork_seed_prefix_omitted",
|
|
338
|
+
detail: `${inheritedCut} inherited fork-seed event(s) belong to the parent history and were not projected as this session's conversation.`,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
const createdAt = epochMillisIso(header?.createdAt);
|
|
342
|
+
const updatedAt = lastEventIso(ownEvents) ?? createdAt;
|
|
343
|
+
const sessionId = canonicalSessionId(filePath, header);
|
|
344
|
+
const model = resolveSessionModel(ownEvents) ?? resolveSessionModel(events);
|
|
345
|
+
const title = resolveSessionTitle(events);
|
|
346
|
+
const records = [];
|
|
347
|
+
if (headerRow) {
|
|
348
|
+
records.push({
|
|
349
|
+
pointer: `line:${headerRow.lineNumber}`,
|
|
350
|
+
observedAt: createdAt,
|
|
351
|
+
rawJson: headerRow.rawLine,
|
|
352
|
+
parsedValue: headerRow.value,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
for (const row of ownEvents) {
|
|
356
|
+
records.push({
|
|
357
|
+
pointer: `line:${row.lineNumber}`,
|
|
358
|
+
observedAt: epochMillisIso(row.value.time) ?? updatedAt,
|
|
359
|
+
rawJson: row.rawLine,
|
|
360
|
+
parsedValue: row.value,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
const workingDirectory = asString(header?.cwd);
|
|
364
|
+
return [{
|
|
365
|
+
sessionId,
|
|
366
|
+
...(title ? { title } : {}),
|
|
367
|
+
...(createdAt ? { createdAt } : {}),
|
|
368
|
+
...(updatedAt ? { updatedAt } : {}),
|
|
369
|
+
...(model ? { model } : {}),
|
|
370
|
+
...(workingDirectory ? { workingDirectory } : {}),
|
|
371
|
+
...(seedDiagnostics.length > 0 ? { diagnostics: seedDiagnostics } : {}),
|
|
372
|
+
records,
|
|
373
|
+
}];
|
|
374
|
+
}
|
|
375
|
+
function canonicalSessionId(filePath, header) {
|
|
376
|
+
const headerId = asString(header?.id);
|
|
377
|
+
const nativeId = headerId ?? fallbackNativeId(filePath);
|
|
378
|
+
return `sess:deepseek_harness:${nativeId}`;
|
|
379
|
+
}
|
|
380
|
+
function fallbackNativeId(filePath) {
|
|
381
|
+
const directory = path.basename(path.dirname(filePath));
|
|
382
|
+
if (directory && directory !== "." && directory !== path.sep) {
|
|
383
|
+
return directory;
|
|
384
|
+
}
|
|
385
|
+
return path.basename(filePath).replace(/\.jsonl(?:\.zstd)?$/u, "");
|
|
386
|
+
}
|
|
387
|
+
function findInheritedSeedCut(events) {
|
|
388
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
389
|
+
const row = events[index];
|
|
390
|
+
if (row?.value.type !== "session/end-seed") {
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
const data = row.value.data;
|
|
394
|
+
if (isObject(data) && data.inherited === true) {
|
|
395
|
+
return index + 1;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return undefined;
|
|
399
|
+
}
|
|
400
|
+
function lastEventIso(events) {
|
|
401
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
402
|
+
const iso = epochMillisIso(events[index]?.value.time);
|
|
403
|
+
if (iso) {
|
|
404
|
+
return iso;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return undefined;
|
|
408
|
+
}
|
|
409
|
+
function resolveSessionModel(events) {
|
|
410
|
+
let model;
|
|
411
|
+
for (const row of events) {
|
|
412
|
+
const data = row.value.data;
|
|
413
|
+
if (!isObject(data)) {
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if (row.value.type === "request/context") {
|
|
417
|
+
model = asString(data.model) ?? model;
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
if (row.value.type === "request/header" && isObject(data.header) && isObject(data.header.config)) {
|
|
421
|
+
model = asString(data.header.config.model) ?? model;
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
if (row.value.type === "assistant/message" && isObject(data.message) && isObject(data.message.source)) {
|
|
425
|
+
model = asString(data.message.source.model) ?? model;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return model;
|
|
429
|
+
}
|
|
430
|
+
function resolveSessionTitle(events) {
|
|
431
|
+
let title;
|
|
432
|
+
for (const row of events) {
|
|
433
|
+
if (row.value.type !== "session/title" || !isObject(row.value.data)) {
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
const candidate = asString(row.value.data.title);
|
|
437
|
+
if (candidate) {
|
|
438
|
+
title = candidate;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return title;
|
|
442
|
+
}
|
|
443
|
+
//# sourceMappingURL=reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../../../src/platforms/deepseek-harness/reader.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAyB,MAAM,2BAA2B,CAAC;AAGjG;;;;;;;;GAQG;AAEH,MAAM,gBAAgB,GAAG,UAAU,CAAC;AACpC,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAC5C,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAC5C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAClD,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAS1C,6EAA6E;AAC7E,2DAA2D;AAC3D,SAAS,qBAAqB;IAC5B,MAAM,EAAE,GAAI,IAA+D,CAAC,kBAAkB,CAAC;IAC/F,OAAO,OAAO,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnD,CAAC;AAUD,SAAS,WAAW,CAAC,UAAkB;IACrC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACzC,OAAO,CACL,KAAK,KAAK,gBAAgB;QAC1B,CAAC,KAAK,IAAI,wBAAwB,IAAI,KAAK,IAAI,w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,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;YACpD,SAAS;QACX,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,mBAAmB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACtG,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,mBAAmB,CAAC,MAA4B;IACvD,IAAI,KAAyB,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACpE,SAAS;QACX,CAAC;QACD,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,SAAS,EAAE,CAAC;YACd,KAAK,GAAG,SAAS,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RawRecord } from "@cchistory/domain";
|
|
2
|
+
import type { CommonParseRuntimeHelpers, FragmentBuildContextLike, ParseRuntimeResult, SessionDraftLike } from "../runtime-types.js";
|
|
3
|
+
export declare function parseDeepSeekHarnessRecord(context: FragmentBuildContextLike, record: RawRecord, parsed: Record<string, unknown>, draft: SessionDraftLike, helpers: CommonParseRuntimeHelpers): ParseRuntimeResult;
|
|
4
|
+
//# sourceMappingURL=runtime.d.ts.map
|
package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/platforms/deepseek-harness/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiC,SAAS,EAAkB,MAAM,mBAAmB,CAAC;AAClG,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAqF7B,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CA6JpB"}
|