@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,533 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { asNumber, asString, isObject, safeJsonParse } from "../../core/type-guards.js";
|
|
3
|
+
const EVIDENCE_ONLY_ENTRY_TYPES = new Set([
|
|
4
|
+
"label",
|
|
5
|
+
"custom",
|
|
6
|
+
"thinking_level_change",
|
|
7
|
+
"service_tier_change",
|
|
8
|
+
"ttsr_injection",
|
|
9
|
+
"credential_pin",
|
|
10
|
+
"session_init",
|
|
11
|
+
"mode_change",
|
|
12
|
+
"context_edit",
|
|
13
|
+
"session_info",
|
|
14
|
+
]);
|
|
15
|
+
const NON_USAGE_INACTIVE_ENTRY_TYPES = new Set([
|
|
16
|
+
...EVIDENCE_ONLY_ENTRY_TYPES,
|
|
17
|
+
"model_change",
|
|
18
|
+
"title_change",
|
|
19
|
+
"reset_boundary",
|
|
20
|
+
]);
|
|
21
|
+
const HEADER_PREFIX_SCAN_BYTES = 64 * 1024;
|
|
22
|
+
export function extractPiFamilySessionSeed(platform, filePath, fileBuffer, options = {}) {
|
|
23
|
+
const diagnostics = [];
|
|
24
|
+
if (options.maxBytes !== undefined && fileBuffer.length > options.maxBytes) {
|
|
25
|
+
diagnostics.push({
|
|
26
|
+
code: "pi_family_file_too_large",
|
|
27
|
+
detail: `Session file is ${fileBuffer.length} bytes, above the ${options.maxBytes}-byte read budget; only the header was admitted.`,
|
|
28
|
+
severity: "warning",
|
|
29
|
+
});
|
|
30
|
+
return { seed: headerOnlySeed(platform, filePath, fileBuffer, diagnostics), diagnostics };
|
|
31
|
+
}
|
|
32
|
+
const records = [];
|
|
33
|
+
const lines = fileBuffer.toString("utf8").split("\n");
|
|
34
|
+
let lastNonEmptyLine = -1;
|
|
35
|
+
for (let index = 0; index < lines.length; index += 1) {
|
|
36
|
+
if (lines[index]?.trim()) {
|
|
37
|
+
lastNonEmptyLine = index;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const [index, rawLine] of lines.entries()) {
|
|
41
|
+
if (!rawLine.trim()) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
let value;
|
|
45
|
+
try {
|
|
46
|
+
value = JSON.parse(rawLine);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
const isTail = index === lastNonEmptyLine;
|
|
50
|
+
diagnostics.push({
|
|
51
|
+
code: isTail ? "pi_family_truncated_tail" : "pi_family_malformed_jsonl_record",
|
|
52
|
+
detail: `Line ${index + 1} is not valid JSON${isTail ? " (truncated final record)" : ""}; it was kept only as a diagnostic.`,
|
|
53
|
+
severity: "info",
|
|
54
|
+
});
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (!isObject(value)) {
|
|
58
|
+
diagnostics.push({
|
|
59
|
+
code: "pi_family_record_not_object",
|
|
60
|
+
detail: `Line ${index + 1} is not a JSON object.`,
|
|
61
|
+
});
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
records.push({ lineNumber: index + 1, value });
|
|
65
|
+
}
|
|
66
|
+
const headerRecord = records.find((record) => record.value.type === "session");
|
|
67
|
+
if (!headerRecord) {
|
|
68
|
+
diagnostics.push({
|
|
69
|
+
code: "pi_family_session_header_missing",
|
|
70
|
+
detail: "The file has no session header; it is not projected as a session.",
|
|
71
|
+
});
|
|
72
|
+
return { seed: undefined, diagnostics };
|
|
73
|
+
}
|
|
74
|
+
const header = headerRecord.value;
|
|
75
|
+
const titleSlot = [...records].reverse().find((record) => record.value.type === "title");
|
|
76
|
+
const entries = records.filter((record) => record !== headerRecord && record.value.type !== "title");
|
|
77
|
+
const version = asNumber(header.version) ?? 1;
|
|
78
|
+
const activeEntries = selectActiveBranch(entries, version, diagnostics);
|
|
79
|
+
// Track active entries by physical line number rather than entry id so v1
|
|
80
|
+
// linear files and entries without ids are never emitted a second time.
|
|
81
|
+
const activeLineNumbers = new Set(activeEntries.map((entry) => entry.lineNumber));
|
|
82
|
+
const rawSessionId = asString(header.id) ??
|
|
83
|
+
deriveSessionIdFromFileName(filePath) ??
|
|
84
|
+
`session-${path.basename(filePath, ".jsonl")}`;
|
|
85
|
+
const sessionId = `sess:${platform}:${rawSessionId}`;
|
|
86
|
+
const workingDirectory = normalizeDirectory(asString(header.cwd));
|
|
87
|
+
const headerTitle = asString(header.title)?.trim();
|
|
88
|
+
const slotTitle = asString(titleSlot?.value.title)?.trim();
|
|
89
|
+
const titleChanges = entries
|
|
90
|
+
.filter((entry) => entry.value.type === "title_change")
|
|
91
|
+
.map((entry) => asString(entry.value.title)?.trim())
|
|
92
|
+
.filter((value) => Boolean(value));
|
|
93
|
+
const sessionInfoNames = entries
|
|
94
|
+
.filter((entry) => entry.value.type === "session_info")
|
|
95
|
+
.map((entry) => asString(entry.value.name)?.trim())
|
|
96
|
+
.filter((value) => Boolean(value));
|
|
97
|
+
// Oh My Pi keeps the current title in the slot; Pi's `/name` lands in
|
|
98
|
+
// session_info. Both are session-wide, independent of the active branch.
|
|
99
|
+
const title = slotTitle || titleChanges.at(-1) || headerTitle || sessionInfoNames.at(-1);
|
|
100
|
+
const rawParentSession = asString(header.parentSession);
|
|
101
|
+
const parentSession = resolveParentSessionRef(rawParentSession);
|
|
102
|
+
const nestedParent = nestedSessionParent(filePath);
|
|
103
|
+
const taskPromptCacheKey = asString(header.taskPromptCacheKey);
|
|
104
|
+
const delegated = platform === "oh_my_pi" && Boolean(nestedParent ?? taskPromptCacheKey);
|
|
105
|
+
const startedAt = normalizeIso(asString(header.timestamp)) ?? firstEntryIso(activeEntries);
|
|
106
|
+
const output = [];
|
|
107
|
+
output.push({
|
|
108
|
+
pointer: "session header",
|
|
109
|
+
observedAt: startedAt,
|
|
110
|
+
rawJson: JSON.stringify({
|
|
111
|
+
kind: "session",
|
|
112
|
+
id: rawSessionId,
|
|
113
|
+
version,
|
|
114
|
+
title,
|
|
115
|
+
cwd: workingDirectory,
|
|
116
|
+
parent_session: nestedParent ?? parentSession,
|
|
117
|
+
parent_session_path: rawParentSession && (rawParentSession.includes("/") || rawParentSession.endsWith(".jsonl"))
|
|
118
|
+
? rawParentSession
|
|
119
|
+
: undefined,
|
|
120
|
+
delegated,
|
|
121
|
+
taskPromptCacheKey,
|
|
122
|
+
additional_directories: header.additionalDirectories,
|
|
123
|
+
}),
|
|
124
|
+
});
|
|
125
|
+
for (const entry of activeEntries) {
|
|
126
|
+
const entryType = asString(entry.value.type) ?? "unknown";
|
|
127
|
+
const timestamp = normalizeIso(asString(entry.value.timestamp));
|
|
128
|
+
if (entryType === "message" || entryType === "custom_message") {
|
|
129
|
+
const message = entryType === "custom_message"
|
|
130
|
+
? {
|
|
131
|
+
role: "custom",
|
|
132
|
+
content: entry.value.content,
|
|
133
|
+
customType: entry.value.customType,
|
|
134
|
+
display: entry.value.display,
|
|
135
|
+
timestamp: entry.value.timestamp,
|
|
136
|
+
}
|
|
137
|
+
: entry.value.message;
|
|
138
|
+
output.push({
|
|
139
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
140
|
+
observedAt: timestamp,
|
|
141
|
+
rawJson: JSON.stringify({
|
|
142
|
+
kind: "message",
|
|
143
|
+
entry_id: asString(entry.value.id),
|
|
144
|
+
parent_id: asString(entry.value.parentId),
|
|
145
|
+
timestamp,
|
|
146
|
+
message,
|
|
147
|
+
}),
|
|
148
|
+
});
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (entryType === "model_change") {
|
|
152
|
+
output.push({
|
|
153
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
154
|
+
observedAt: timestamp,
|
|
155
|
+
rawJson: JSON.stringify({
|
|
156
|
+
kind: "model_change",
|
|
157
|
+
entry_id: asString(entry.value.id),
|
|
158
|
+
model: asString(entry.value.modelId) ?? asString(entry.value.model),
|
|
159
|
+
provider: asString(entry.value.provider),
|
|
160
|
+
role: asString(entry.value.role),
|
|
161
|
+
}),
|
|
162
|
+
});
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (entryType === "usage" || entryType === "model_usage") {
|
|
166
|
+
output.push({
|
|
167
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
168
|
+
observedAt: timestamp,
|
|
169
|
+
rawJson: JSON.stringify({
|
|
170
|
+
kind: "usage",
|
|
171
|
+
entry_id: asString(entry.value.id),
|
|
172
|
+
purpose: asString(entry.value.purpose) ?? asString(entry.value.kind),
|
|
173
|
+
role: asString(entry.value.role),
|
|
174
|
+
provider: asString(entry.value.provider),
|
|
175
|
+
model: asString(entry.value.model),
|
|
176
|
+
usage: entry.value.usage,
|
|
177
|
+
stop_reason: asString(entry.value.stopReason),
|
|
178
|
+
}),
|
|
179
|
+
});
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (entryType === "compaction" || entryType === "branch_summary") {
|
|
183
|
+
output.push({
|
|
184
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
185
|
+
observedAt: timestamp,
|
|
186
|
+
rawJson: JSON.stringify({
|
|
187
|
+
kind: entryType,
|
|
188
|
+
entry_id: asString(entry.value.id),
|
|
189
|
+
summary: asString(entry.value.summary),
|
|
190
|
+
usage: entry.value.usage,
|
|
191
|
+
first_kept_entry_id: asString(entry.value.firstKeptEntryId),
|
|
192
|
+
}),
|
|
193
|
+
});
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (entryType === "title_change") {
|
|
197
|
+
const nextTitle = asString(entry.value.title)?.trim();
|
|
198
|
+
if (nextTitle) {
|
|
199
|
+
output.push({
|
|
200
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
201
|
+
observedAt: timestamp,
|
|
202
|
+
rawJson: JSON.stringify({ kind: "title", entry_id: asString(entry.value.id), title: nextTitle }),
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (entryType === "reset_boundary") {
|
|
208
|
+
output.push({
|
|
209
|
+
pointer: `entry:${entry.lineNumber}`,
|
|
210
|
+
observedAt: timestamp,
|
|
211
|
+
rawJson: JSON.stringify({ kind: "reset_boundary", entry_id: asString(entry.value.id) }),
|
|
212
|
+
});
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (!EVIDENCE_ONLY_ENTRY_TYPES.has(entryType)) {
|
|
216
|
+
diagnostics.push({
|
|
217
|
+
code: "pi_family_unhandled_entry_type",
|
|
218
|
+
detail: `Unhandled Pi/OMP entry type ${entryType}; kept only as a diagnostic.`,
|
|
219
|
+
severity: "info",
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
// Native totals include compacted-away and abandoned-branch calls. Emit
|
|
224
|
+
// usage-only records for every entry that the active branch skipped.
|
|
225
|
+
for (const entry of entries) {
|
|
226
|
+
if (activeLineNumbers.has(entry.lineNumber)) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
appendInactiveUsage(entry, platform, output, diagnostics);
|
|
230
|
+
}
|
|
231
|
+
const lastActivity = lastMessageIso(activeEntries) ?? startedAt;
|
|
232
|
+
const forkParentPath = !delegated && rawParentSession && (rawParentSession.includes("/") || rawParentSession.endsWith(".jsonl"))
|
|
233
|
+
? rawParentSession
|
|
234
|
+
: undefined;
|
|
235
|
+
return {
|
|
236
|
+
seed: {
|
|
237
|
+
sessionId,
|
|
238
|
+
...(title ? { title } : {}),
|
|
239
|
+
...(startedAt ? { createdAt: startedAt } : {}),
|
|
240
|
+
...(lastActivity ? { updatedAt: lastActivity } : {}),
|
|
241
|
+
...(workingDirectory ? { workingDirectory } : {}),
|
|
242
|
+
...(forkParentPath ? { parent_session_path: forkParentPath } : {}),
|
|
243
|
+
...(diagnostics.length > 0 ? { diagnostics } : {}),
|
|
244
|
+
records: output,
|
|
245
|
+
},
|
|
246
|
+
diagnostics,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function appendInactiveUsage(entry, _platform, output, diagnostics) {
|
|
250
|
+
const entryType = asString(entry.value.type);
|
|
251
|
+
const timestamp = normalizeIso(asString(entry.value.timestamp));
|
|
252
|
+
const pushUsage = (usage, model, purpose) => {
|
|
253
|
+
if (!isObject(usage)) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
output.push({
|
|
257
|
+
pointer: `inactive-usage:${entry.lineNumber}`,
|
|
258
|
+
observedAt: timestamp,
|
|
259
|
+
rawJson: JSON.stringify({
|
|
260
|
+
kind: "usage",
|
|
261
|
+
usage,
|
|
262
|
+
model,
|
|
263
|
+
purpose,
|
|
264
|
+
entry_id: asString(entry.value.id),
|
|
265
|
+
timestamp,
|
|
266
|
+
}),
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
if (entryType === "message" || entryType === "custom_message") {
|
|
270
|
+
const message = entryType === "message" ? entry.value.message : undefined;
|
|
271
|
+
if (isObject(message)) {
|
|
272
|
+
const role = asString(message.role);
|
|
273
|
+
if (role === "assistant" || role === "toolResult") {
|
|
274
|
+
pushUsage(message.usage, asString(message.model) ?? asString(message.responseModel), role === "assistant" ? "inactive_assistant" : "inactive_tool");
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (entryType === "usage" || entryType === "model_usage") {
|
|
280
|
+
pushUsage(entry.value.usage, asString(entry.value.model), asString(entry.value.purpose) ?? "inactive_usage");
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
if (entryType === "compaction" || entryType === "branch_summary") {
|
|
284
|
+
pushUsage(entry.value.usage, undefined, entryType);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
if (entryType !== undefined && !NON_USAGE_INACTIVE_ENTRY_TYPES.has(entryType)) {
|
|
288
|
+
diagnostics.push({
|
|
289
|
+
code: "pi_family_unhandled_inactive_entry",
|
|
290
|
+
detail: `Unhandled inactive ${entryType} entry; kept only as a diagnostic.`,
|
|
291
|
+
severity: "info",
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
function selectActiveBranch(entries, version, diagnostics) {
|
|
296
|
+
if (version < 2 || entries.length === 0) {
|
|
297
|
+
return [...entries];
|
|
298
|
+
}
|
|
299
|
+
const byId = new Map();
|
|
300
|
+
for (const entry of entries) {
|
|
301
|
+
const id = asString(entry.value.id);
|
|
302
|
+
if (id) {
|
|
303
|
+
byId.set(id, entry);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// Oh My Pi persists the active leaf on late entries (background usage can be
|
|
307
|
+
// the physically last row). The newest explicit activeLeafId wins.
|
|
308
|
+
let leafId;
|
|
309
|
+
let leafWasExplicit = false;
|
|
310
|
+
for (let index = entries.length - 1; index >= 0; index -= 1) {
|
|
311
|
+
const entry = entries[index];
|
|
312
|
+
if (!entry || !Object.prototype.hasOwnProperty.call(entry.value, "activeLeafId")) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
leafWasExplicit = true;
|
|
316
|
+
const rawLeaf = entry.value.activeLeafId;
|
|
317
|
+
if (rawLeaf === null) {
|
|
318
|
+
return [];
|
|
319
|
+
}
|
|
320
|
+
leafId = asString(rawLeaf);
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
if (!leafWasExplicit) {
|
|
324
|
+
leafId = asString(entries.at(-1)?.value.id);
|
|
325
|
+
}
|
|
326
|
+
if (!leafId || !byId.has(leafId)) {
|
|
327
|
+
diagnostics.push({
|
|
328
|
+
code: "pi_family_active_leaf_missing",
|
|
329
|
+
detail: `Active leaf ${leafId ?? "<unknown>"} is not present in the file; the file was projected in file order.`,
|
|
330
|
+
});
|
|
331
|
+
return [...entries];
|
|
332
|
+
}
|
|
333
|
+
const chain = [];
|
|
334
|
+
const seen = new Set();
|
|
335
|
+
let cursorId = leafId;
|
|
336
|
+
while (cursorId) {
|
|
337
|
+
if (seen.has(cursorId)) {
|
|
338
|
+
diagnostics.push({
|
|
339
|
+
code: "pi_family_parent_cycle",
|
|
340
|
+
detail: `Entry parent chain cycles at ${cursorId}; the file was projected in file order.`,
|
|
341
|
+
});
|
|
342
|
+
return [...entries];
|
|
343
|
+
}
|
|
344
|
+
seen.add(cursorId);
|
|
345
|
+
const entry = byId.get(cursorId);
|
|
346
|
+
if (!entry) {
|
|
347
|
+
diagnostics.push({
|
|
348
|
+
code: "pi_family_parent_missing",
|
|
349
|
+
detail: `Entry ${cursorId} is missing from the file; the file was projected in file order.`,
|
|
350
|
+
});
|
|
351
|
+
return [...entries];
|
|
352
|
+
}
|
|
353
|
+
chain.push(entry);
|
|
354
|
+
const parentId = asString(entry.value.parentId);
|
|
355
|
+
cursorId = parentId && parentId.length > 0 ? parentId : undefined;
|
|
356
|
+
}
|
|
357
|
+
return chain.reverse();
|
|
358
|
+
}
|
|
359
|
+
function firstEntryIso(entries) {
|
|
360
|
+
for (const entry of entries) {
|
|
361
|
+
const iso = normalizeIso(asString(entry.value.timestamp));
|
|
362
|
+
if (iso) {
|
|
363
|
+
return iso;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return undefined;
|
|
367
|
+
}
|
|
368
|
+
function lastMessageIso(entries) {
|
|
369
|
+
for (let index = entries.length - 1; index >= 0; index -= 1) {
|
|
370
|
+
const entry = entries[index];
|
|
371
|
+
if (!entry) {
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
const type = asString(entry.value.type);
|
|
375
|
+
if (type !== "message" && type !== "custom_message") {
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
const message = entry.value.message;
|
|
379
|
+
if (isObject(message)) {
|
|
380
|
+
const millis = asNumber(message.timestamp);
|
|
381
|
+
if (millis !== undefined) {
|
|
382
|
+
const date = new Date(millis);
|
|
383
|
+
if (!Number.isNaN(date.getTime())) {
|
|
384
|
+
return date.toISOString();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const iso = normalizeIso(asString(entry.value.timestamp));
|
|
389
|
+
if (iso) {
|
|
390
|
+
return iso;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return undefined;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* OMP nests subagent transcripts under `<bucket>/<timestamp>_<parent-id>/`.
|
|
397
|
+
* The directory name is durable delegation evidence even when the child header
|
|
398
|
+
* has no `taskPromptCacheKey` (that key is only written after a shared-cache
|
|
399
|
+
* request).
|
|
400
|
+
*/
|
|
401
|
+
function nestedSessionParent(filePath) {
|
|
402
|
+
const normalized = filePath.replace(/\\/gu, "/");
|
|
403
|
+
const match = normalized.match(/\/sessions\/[^/]+\/\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}(?:[.-]\d+)?Z?_([^/]+)\/[^/]+\.jsonl$/u);
|
|
404
|
+
return match?.[1] ?? undefined;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* OMP writes either a session id or the parent session file path into
|
|
408
|
+
* `parentSession`. The path form must be reduced to the same native id the
|
|
409
|
+
* parent file's header uses, or the lineage cannot resolve in the snapshot.
|
|
410
|
+
*/
|
|
411
|
+
function resolveParentSessionRef(value) {
|
|
412
|
+
if (!value) {
|
|
413
|
+
return undefined;
|
|
414
|
+
}
|
|
415
|
+
const normalized = value.replace(/\\/gu, "/");
|
|
416
|
+
if (!normalized.includes("/") && !normalized.endsWith(".jsonl")) {
|
|
417
|
+
return value;
|
|
418
|
+
}
|
|
419
|
+
const base = normalized.slice(normalized.lastIndexOf("/") + 1).replace(/\.jsonl$/u, "");
|
|
420
|
+
const separator = base.indexOf("_");
|
|
421
|
+
if (separator > 0 && base.slice(0, separator).includes("-")) {
|
|
422
|
+
return base.slice(separator + 1) || base;
|
|
423
|
+
}
|
|
424
|
+
return base || value;
|
|
425
|
+
}
|
|
426
|
+
function deriveSessionIdFromFileName(filePath) {
|
|
427
|
+
const base = path.basename(filePath, ".jsonl");
|
|
428
|
+
const separator = base.indexOf("_");
|
|
429
|
+
if (separator > 0 && base.slice(0, separator).includes("-")) {
|
|
430
|
+
return base.slice(separator + 1) || undefined;
|
|
431
|
+
}
|
|
432
|
+
return base || undefined;
|
|
433
|
+
}
|
|
434
|
+
function normalizeIso(value) {
|
|
435
|
+
if (!value) {
|
|
436
|
+
return undefined;
|
|
437
|
+
}
|
|
438
|
+
const date = new Date(value);
|
|
439
|
+
return Number.isNaN(date.getTime()) ? undefined : date.toISOString();
|
|
440
|
+
}
|
|
441
|
+
function normalizeDirectory(value) {
|
|
442
|
+
const trimmed = value?.trim();
|
|
443
|
+
if (!trimmed) {
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
446
|
+
return trimmed.replace(/\\/gu, "/").replace(/\/+$/u, "") || "/";
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Inspect only the leading JSONL header lines (optional OMP title slot plus
|
|
450
|
+
* session header) so targeted reads can identify sessions and delegated child
|
|
451
|
+
* transcripts without reading full files.
|
|
452
|
+
*/
|
|
453
|
+
export function inspectPiFamilyHeaderPrefix(platform, filePath, headLines) {
|
|
454
|
+
let header;
|
|
455
|
+
for (const rawLine of headLines) {
|
|
456
|
+
const parsed = safeJsonParse(rawLine);
|
|
457
|
+
if (isObject(parsed) && parsed.type === "session") {
|
|
458
|
+
header = parsed;
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
const rawSessionId = asString(header?.id) ??
|
|
463
|
+
deriveSessionIdFromFileName(filePath) ??
|
|
464
|
+
`session-${path.basename(filePath, ".jsonl")}`;
|
|
465
|
+
const workingDirectory = normalizeDirectory(asString(header?.cwd));
|
|
466
|
+
const rawParentSession = asString(header?.parentSession);
|
|
467
|
+
const parentSession = resolveParentSessionRef(rawParentSession);
|
|
468
|
+
const nestedParent = nestedSessionParent(filePath);
|
|
469
|
+
const taskPromptCacheKey = asString(header?.taskPromptCacheKey);
|
|
470
|
+
const delegated = platform === "oh_my_pi" && Boolean(nestedParent ?? taskPromptCacheKey);
|
|
471
|
+
const delegatedParentId = delegated ? (nestedParent ?? parentSession) : undefined;
|
|
472
|
+
return {
|
|
473
|
+
sessionId: `sess:${platform}:${rawSessionId}`,
|
|
474
|
+
...(workingDirectory ? { workingDirectory } : {}),
|
|
475
|
+
...(delegatedParentId ? { delegatedParentId } : {}),
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
function headerOnlySeed(platform, filePath, fileBuffer, diagnostics) {
|
|
479
|
+
// Decode only a bounded leading slice so over-budget files never materialize
|
|
480
|
+
// a full UTF-8 string, while still reaching Oh My Pi's line-2 session header.
|
|
481
|
+
const prefixLines = fileBuffer
|
|
482
|
+
.subarray(0, HEADER_PREFIX_SCAN_BYTES)
|
|
483
|
+
.toString("utf8")
|
|
484
|
+
.split("\n")
|
|
485
|
+
.slice(0, 8);
|
|
486
|
+
let header;
|
|
487
|
+
let slotTitle;
|
|
488
|
+
for (const rawLine of prefixLines) {
|
|
489
|
+
if (!rawLine.trim()) {
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
const parsed = safeJsonParse(rawLine);
|
|
493
|
+
if (!isObject(parsed)) {
|
|
494
|
+
continue;
|
|
495
|
+
}
|
|
496
|
+
if (parsed.type === "title") {
|
|
497
|
+
slotTitle = asString(parsed.title)?.trim() || slotTitle;
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
if (parsed.type === "session") {
|
|
501
|
+
header = parsed;
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
if (!header) {
|
|
506
|
+
return undefined;
|
|
507
|
+
}
|
|
508
|
+
const rawSessionId = asString(header.id) ?? deriveSessionIdFromFileName(filePath);
|
|
509
|
+
if (!rawSessionId) {
|
|
510
|
+
return undefined;
|
|
511
|
+
}
|
|
512
|
+
const timestamp = normalizeIso(asString(header.timestamp));
|
|
513
|
+
const title = slotTitle || asString(header.title)?.trim() || undefined;
|
|
514
|
+
const workingDirectory = normalizeDirectory(asString(header.cwd));
|
|
515
|
+
return {
|
|
516
|
+
sessionId: `sess:${platform}:${rawSessionId}`,
|
|
517
|
+
...(title ? { title } : {}),
|
|
518
|
+
...(timestamp ? { createdAt: timestamp } : {}),
|
|
519
|
+
...(workingDirectory ? { workingDirectory } : {}),
|
|
520
|
+
diagnostics,
|
|
521
|
+
records: [{
|
|
522
|
+
pointer: "session header",
|
|
523
|
+
observedAt: timestamp,
|
|
524
|
+
rawJson: JSON.stringify({
|
|
525
|
+
kind: "session",
|
|
526
|
+
id: rawSessionId,
|
|
527
|
+
...(title ? { title } : {}),
|
|
528
|
+
...(workingDirectory ? { cwd: workingDirectory } : {}),
|
|
529
|
+
}),
|
|
530
|
+
}],
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
//# sourceMappingURL=reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../../../src/platforms/pi-family/reader.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AA0CxF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACxC,OAAO;IACP,QAAQ;IACR,uBAAuB;IACvB,qBAAqB;IACrB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;CACf,CAAC,CAAC;AAEH,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IAC7C,GAA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S;gBACrB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;oBACtB,IAAI,EAAE,SAAS;oBACf,EAAE,EAAE,YAAY;oBAChB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC3B,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACvD,CAAC;aACH,CAAC;KACH,CAAC;AACJ,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 parsePiFamilyRecord(context: FragmentBuildContextLike, record: RawRecord, parsed: Record<string, unknown>, draft: SessionDraftLike, helpers: CommonParseRuntimeHelpers): ParseRuntimeResult;
|
|
4
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/platforms/pi-family/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;AAgB7B,wBAAgB,mBAAmB,CACjC,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,CAyHpB"}
|