@cchistory/lite 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -9
- package/apps/lite-cli/dist/agent-contract.js.map +1 -1
- package/apps/lite-cli/dist/agent-journeys.test.d.ts +2 -0
- package/apps/lite-cli/dist/agent-journeys.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/agent-journeys.test.js +403 -0
- package/apps/lite-cli/dist/agent-journeys.test.js.map +1 -0
- package/apps/lite-cli/dist/index.d.ts.map +1 -1
- package/apps/lite-cli/dist/index.js +137 -60
- package/apps/lite-cli/dist/index.js.map +1 -1
- package/apps/lite-cli/dist/index.test.js +48 -5
- package/apps/lite-cli/dist/index.test.js.map +1 -1
- package/apps/lite-cli/dist/json-v2.d.ts.map +1 -1
- package/apps/lite-cli/dist/json-v2.js +8 -1
- package/apps/lite-cli/dist/json-v2.js.map +1 -1
- package/apps/lite-cli/dist/query.d.ts +15 -2
- package/apps/lite-cli/dist/query.d.ts.map +1 -1
- package/apps/lite-cli/dist/query.js +79 -4
- package/apps/lite-cli/dist/query.js.map +1 -1
- package/apps/lite-cli/dist/shell.d.ts +2 -1
- package/apps/lite-cli/dist/shell.d.ts.map +1 -1
- package/apps/lite-cli/dist/shell.js +20 -16
- package/apps/lite-cli/dist/shell.js.map +1 -1
- package/apps/lite-cli/dist/stats-command.d.ts +52 -0
- package/apps/lite-cli/dist/stats-command.d.ts.map +1 -0
- package/apps/lite-cli/dist/stats-command.js +322 -0
- package/apps/lite-cli/dist/stats-command.js.map +1 -0
- package/apps/lite-cli/dist/stats-command.test.d.ts +2 -0
- package/apps/lite-cli/dist/stats-command.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/stats-command.test.js +154 -0
- package/apps/lite-cli/dist/stats-command.test.js.map +1 -0
- package/apps/lite-cli/dist/stats-render.d.ts +21 -0
- package/apps/lite-cli/dist/stats-render.d.ts.map +1 -0
- package/apps/lite-cli/dist/stats-render.js +207 -0
- package/apps/lite-cli/dist/stats-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/index.d.ts.map +1 -1
- package/apps/lite-tui/dist/index.js +75 -4
- package/apps/lite-tui/dist/index.js.map +1 -1
- package/apps/lite-tui/dist/input.d.ts.map +1 -1
- package/apps/lite-tui/dist/input.js +124 -3
- package/apps/lite-tui/dist/input.js.map +1 -1
- package/apps/lite-tui/dist/model.d.ts +29 -4
- package/apps/lite-tui/dist/model.d.ts.map +1 -1
- package/apps/lite-tui/dist/model.js +91 -8
- package/apps/lite-tui/dist/model.js.map +1 -1
- package/apps/lite-tui/dist/render.d.ts +1 -1
- package/apps/lite-tui/dist/render.d.ts.map +1 -1
- package/apps/lite-tui/dist/render.js +21 -51
- package/apps/lite-tui/dist/render.js.map +1 -1
- package/apps/lite-tui/dist/state.d.ts +3 -1
- package/apps/lite-tui/dist/state.d.ts.map +1 -1
- package/apps/lite-tui/dist/state.js +31 -13
- package/apps/lite-tui/dist/state.js.map +1 -1
- package/apps/lite-tui/dist/state.test.js +118 -0
- package/apps/lite-tui/dist/state.test.js.map +1 -1
- package/apps/lite-tui/dist/stats-dashboard.test.d.ts +2 -0
- package/apps/lite-tui/dist/stats-dashboard.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-dashboard.test.js +191 -0
- package/apps/lite-tui/dist/stats-dashboard.test.js.map +1 -0
- package/apps/lite-tui/dist/stats-query.d.ts +11 -0
- package/apps/lite-tui/dist/stats-query.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-query.js +104 -0
- package/apps/lite-tui/dist/stats-query.js.map +1 -0
- package/apps/lite-tui/dist/stats-render.d.ts +9 -0
- package/apps/lite-tui/dist/stats-render.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-render.js +311 -0
- package/apps/lite-tui/dist/stats-render.js.map +1 -0
- package/apps/lite-tui/dist/stats-state.d.ts +121 -0
- package/apps/lite-tui/dist/stats-state.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-state.js +335 -0
- package/apps/lite-tui/dist/stats-state.js.map +1 -0
- package/apps/lite-tui/dist/version.d.ts +1 -1
- package/apps/lite-tui/dist/version.js +1 -1
- package/docs/guide/agent-evidence.md +154 -0
- package/docs/guide/for-agents.md +29 -10
- package/docs/guide/lite.md +31 -4
- package/docs/guide/pricing.example.json +38 -0
- package/docs/guide/query.md +10 -1
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.d.ts +85 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.js +191 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.test.js +105 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/index.d.ts +9 -2
- package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.js +9 -2
- package/node_modules/@cchistory/canonical/dist/index.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.test.js +62 -1
- package/node_modules/@cchistory/canonical/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.d.ts +11 -0
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.js +96 -0
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts +4 -3
- package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/projection-audit.js +34 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.js.map +1 -1
- 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/read-order.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/read-order.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/read-order.js +10 -0
- package/node_modules/@cchistory/canonical/dist/read-order.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/read-status.d.ts +11 -0
- package/node_modules/@cchistory/canonical/dist/read-status.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/read-status.js +14 -0
- package/node_modules/@cchistory/canonical/dist/read-status.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.js +3 -3
- package/node_modules/@cchistory/canonical/dist/session-family.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts +7 -3
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js +40 -14
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.d.ts +37 -0
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.js +274 -0
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing-config.d.ts +11 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing-config.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing-config.js +297 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing-config.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.d.ts +28 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.js +267 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.js +365 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-time.d.ts +53 -0
- package/node_modules/@cchistory/canonical/dist/usage-time.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-time.js +323 -0
- package/node_modules/@cchistory/canonical/dist/usage-time.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts +46 -31
- package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.js +187 -96
- 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/conversation-evidence.d.ts +24 -0
- package/node_modules/@cchistory/domain/dist/conversation-evidence.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/conversation-evidence.js +2 -0
- package/node_modules/@cchistory/domain/dist/conversation-evidence.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts +27 -2
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.js +1 -0
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/usage-pricing.d.ts +145 -0
- package/node_modules/@cchistory/domain/dist/usage-pricing.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/usage-pricing.js +7 -0
- package/node_modules/@cchistory/domain/dist/usage-pricing.js.map +1 -0
- package/node_modules/@cchistory/domain/package.json +1 -1
- package/node_modules/@cchistory/live-runtime/dist/antigravity.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/antigravity.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/antigravity.test.js +104 -0
- package/node_modules/@cchistory/live-runtime/dist/antigravity.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.d.ts +15 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.js +44 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.test.js +45 -0
- package/node_modules/@cchistory/live-runtime/dist/bounded-cache.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/diagnostics.d.ts +7 -0
- package/node_modules/@cchistory/live-runtime/dist/diagnostics.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/diagnostics.js +2 -0
- package/node_modules/@cchistory/live-runtime/dist/diagnostics.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/grok-bot.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/grok-bot.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/grok-bot.test.js +211 -0
- package/node_modules/@cchistory/live-runtime/dist/grok-bot.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/history-reader.d.ts +24 -0
- package/node_modules/@cchistory/live-runtime/dist/history-reader.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/history-reader.js +155 -0
- package/node_modules/@cchistory/live-runtime/dist/history-reader.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +102 -5
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js +245 -58
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +43 -2
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts +2 -1
- package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/selective-query.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/package.json +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts +7 -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/decoded-record.d.ts +12 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.js +32 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.test.js +21 -0
- package/node_modules/@cchistory/source-adapters/dist/core/decoded-record.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js +16 -2
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts +3 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js +56 -38
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js +46 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +15 -4
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +181 -65
- 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 +223 -61
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts +4 -1
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js +4 -2
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js +58 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts +6 -2
- 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 +16 -5
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts +5 -2
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts +9 -7
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.js +34 -8
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js +11 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +3 -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 +3 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js +49 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/protobuf.d.ts +18 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/protobuf.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/protobuf.js +105 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/protobuf.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.js +227 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/usage.d.ts +6 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/usage.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/usage.js +22 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/usage.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity-sqlite.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity-sqlite.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity-sqlite.test.js +145 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity-sqlite.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js +14 -5
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/runtime.d.ts +27 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/runtime.js +262 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/title.d.ts +18 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/title.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/title.js +101 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot/title.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.d.ts +17 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.js +145 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.test.js +423 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok-bot.test.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 +2 -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 +1 -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 +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js +48 -29
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.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 +8 -5
- package/schemas/cchistory-lite-canonical-v1.schema.json +82 -0
- package/schemas/cchistory-lite-diagnostic-v1.schema.json +27 -0
- package/schemas/cchistory-lite-query-result-v2.schema.json +232 -4
- package/schemas/cchistory-lite-query-result-v3.schema.json +45 -1
- package/schemas/cchistory-lite-query-v2.schema.json +150 -8
- package/schemas/cchistory-lite-v2.schema.json +82 -0
- package/skills/using-cchistory-lite/SKILL.md +86 -128
package/docs/guide/lite.md
CHANGED
|
@@ -102,7 +102,10 @@ sample [N] [--dir <path>] [--no-dir]
|
|
|
102
102
|
tree [projects|project <ref>|session <ref>] [--dir <path>]
|
|
103
103
|
search <query> [--project <ref>] [--source <ref>] [--dir <path>] [--no-dir] [--limit <n>] [--offset <n>]
|
|
104
104
|
show project|session|turn|source <ref>
|
|
105
|
-
stats [--by source|project|model|day] [--project <ref>] [--
|
|
105
|
+
stats [--by source|project|model|day|week|month[,...]] [--project <ref>] [--model <pattern>]
|
|
106
|
+
[--since <window>] [--from <time>] [--to <time>] [--tz <zone>]
|
|
107
|
+
[--week-mode rolling_7d|iso_week|custom_reset] [--pricing <file>] [--quota <usd>]
|
|
108
|
+
[--explain-pricing] [--export-pricing <file|->] [--dir <path>] [--no-dir]
|
|
106
109
|
query --request <file|-> | --sql <text> | --sql-file <file|-> [--params <JSON-array>] [--complete]
|
|
107
110
|
[--dir <path>] [--no-dir]
|
|
108
111
|
shell [--dir <path>] [--no-dir] [--idle-timeout <seconds>]
|
|
@@ -254,6 +257,14 @@ format with schema `cchistory-lite-export/v1`.
|
|
|
254
257
|
|
|
255
258
|
Batch requests are strict JSON documents:
|
|
256
259
|
|
|
260
|
+
For bounded question/answer text, use `read` with a `session_ref` or `turn_ref`,
|
|
261
|
+
`max_chars` and a continuation `cursor`. Search assistant answers with
|
|
262
|
+
`content: "conversation"`. [Evidence operations](agent-evidence.md) document these
|
|
263
|
+
additive v2 forms. History responses also expose `read` and `read_status`; query
|
|
264
|
+
success and SQL coverage do not by themselves establish native completeness.
|
|
265
|
+
|
|
266
|
+
Existing unbounded projections remain available:
|
|
267
|
+
|
|
257
268
|
```json
|
|
258
269
|
{
|
|
259
270
|
"schema": "cchistory-lite-query/v2",
|
|
@@ -296,14 +307,15 @@ do not automatically retry with broader filters or a disabled guard.
|
|
|
296
307
|
|
|
297
308
|
`cchistory-lite-tui` is a full-screen, keyboard-driven browser over one
|
|
298
309
|
context-light snapshot held for the process lifetime. It accepts
|
|
299
|
-
`--source-root`, `--source`, `--limit-files`,
|
|
300
|
-
at one focused object or search query:
|
|
310
|
+
`--source-root`, `--source`, `--limit-files`, `--safe`, `--pricing`, and
|
|
311
|
+
`--quota`, and can open directly at one focused object or search query:
|
|
301
312
|
|
|
302
313
|
```bash
|
|
303
314
|
cchistory-lite-tui --project <ref>
|
|
304
315
|
cchistory-lite-tui --session <ref>
|
|
305
316
|
cchistory-lite-tui --turn <ref>
|
|
306
317
|
cchistory-lite-tui --search "parser regression"
|
|
318
|
+
cchistory-lite-tui --pricing docs/guide/pricing.example.json --quota 100
|
|
307
319
|
```
|
|
308
320
|
|
|
309
321
|
Only one of `--project`, `--session`, and `--turn` may be supplied. References
|
|
@@ -315,11 +327,26 @@ Up/Down or j/k move cursor Tab / Shift+Tab next / previous pane
|
|
|
315
327
|
PgUp/PgDn page Enter drill into the focused pane
|
|
316
328
|
g / G first / last Esc back or close an overlay
|
|
317
329
|
p / S projects / sessions t / d turns / detail pane
|
|
318
|
-
/ search i usage stats
|
|
330
|
+
/ search i usage & cost stats
|
|
319
331
|
s source status ? help
|
|
320
332
|
r refresh from disk q quit and release snapshot
|
|
321
333
|
```
|
|
322
334
|
|
|
335
|
+
In the usage stats dashboard (`i`), four panels (`By project`, `By model`,
|
|
336
|
+
`By source`, and `By day`/`week`/`month`) show tokens, `models.dev` reference list
|
|
337
|
+
USD cost, multiplier-adjusted USD cost, and period quota usage together:
|
|
338
|
+
press `Tab`/`1-4` to focus a panel, `Space`/`Enter` to toggle multi-dimensional
|
|
339
|
+
cross-filters (`c` clears), `t`/`b`/`w`/`o` to cycle time window, bucket, week
|
|
340
|
+
reset mode, or sort order, `v` to open the full-width matrix table, `m` to
|
|
341
|
+
calibrate per-model/per-component multipliers and aliases in memory (`+`/`-`,
|
|
342
|
+
`0`/`1`/`u`, `a` alias, `e` value, `R` reset), and `$` to set a period USD quota.
|
|
343
|
+
Both CLI `stats` and TUI use the bundled offline `models.dev/api.json` snapshot
|
|
344
|
+
(plus local `--pricing` / `CCHISTORY_PRICING_CONFIG` overrides, see
|
|
345
|
+
[pricing.example.json](pricing.example.json)) and never access the network at
|
|
346
|
+
runtime. For Antigravity SQLite history, model totals use each recorded model
|
|
347
|
+
call and include `turn_id: null` usage events; overview and source/project/day
|
|
348
|
+
rollups retain unique user-turn counts.
|
|
349
|
+
|
|
323
350
|
The interactive TUI uses the alternate screen and raw keyboard input. Search
|
|
324
351
|
queries of one to three characters wait for Enter; queries of four or more
|
|
325
352
|
characters run automatically as you type. Startup and refresh scans are
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "cchistory-lite-pricing/v1",
|
|
3
|
+
"timezone": "local",
|
|
4
|
+
"aliases": {
|
|
5
|
+
"gemini-pro-orchestrator": "gemini-4-carbon",
|
|
6
|
+
"gemini-flash-worker-agy": "gemini-4-hydrogen"
|
|
7
|
+
},
|
|
8
|
+
"default_multipliers": {
|
|
9
|
+
"model": 1,
|
|
10
|
+
"input": 1,
|
|
11
|
+
"cache_read": 1,
|
|
12
|
+
"cache_write": 1,
|
|
13
|
+
"output": 1,
|
|
14
|
+
"reasoning": 1
|
|
15
|
+
},
|
|
16
|
+
"multipliers": {
|
|
17
|
+
"gemini-4-carbon": {
|
|
18
|
+
"model": 1,
|
|
19
|
+
"cache_read": 1
|
|
20
|
+
},
|
|
21
|
+
"gemini-4-hydrogen": {
|
|
22
|
+
"model": 1,
|
|
23
|
+
"cache_read": 1
|
|
24
|
+
},
|
|
25
|
+
"claude-opus-5-5": {
|
|
26
|
+
"model": 1,
|
|
27
|
+
"cache_read": 1,
|
|
28
|
+
"cache_write": 1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"quota": {
|
|
32
|
+
"weekly_usd": 100,
|
|
33
|
+
"monthly_usd": 400,
|
|
34
|
+
"week_mode": "rolling_7d",
|
|
35
|
+
"week_start_day": 1,
|
|
36
|
+
"week_reset_hour": 0
|
|
37
|
+
}
|
|
38
|
+
}
|
package/docs/guide/query.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Querying history with SQL
|
|
2
2
|
|
|
3
|
+
For bounded question/answer evidence and full conversation text search, use the
|
|
4
|
+
[v2 agent operations](agent-evidence.md). SQL remains the interface for selecting
|
|
5
|
+
fields and combining conditions over canonical collections.
|
|
6
|
+
Use conversation `group_by: "message"` for older decisions within a session.
|
|
7
|
+
Optional `--diagnostics` exposes execution stages and SQL work counters as stderr
|
|
8
|
+
JSONL while preserving stdout; see the [diagnostic contract](agent-evidence.md#observe-a-read).
|
|
9
|
+
|
|
3
10
|
Use a finite PostgreSQL-style SELECT to combine conditions over canonical history. `sessions`
|
|
4
11
|
contains every addressable session, including empty sessions and delegated children. `turns`
|
|
5
12
|
contains every resolved turn, including a child's work on its own session. The source and directory
|
|
@@ -144,7 +151,9 @@ All operations are validated before one shared scan. Existing v2 operation reque
|
|
|
144
151
|
A shell opens without scanning; it prepares on its first valid collection read or explicit
|
|
145
152
|
refresh. Help, invalid requests and cold exit do not scan. A warm shell reuses its SQL `read.id`; successful refresh replaces it, failed refresh reports an
|
|
146
153
|
error and preserves the old snapshot. The ID is process-local, not a native transaction or a
|
|
147
|
-
handle for
|
|
154
|
+
handle for detail evidence. Conversation search can prepare a new collection with masked
|
|
155
|
+
text; details have bounded process-local reuse and expose their own read IDs. Native changes
|
|
156
|
+
require explicit refresh. See the [evidence lifetime](agent-evidence.md#snapshot-ownership).
|
|
148
157
|
|
|
149
158
|
Idle expiry defaults to 300 seconds; `--idle-timeout 0` disables it, with positive values up to
|
|
150
159
|
86400. The timer runs only while waiting for input; partial input resets it and active work suspends
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type ConversationAtom, type ConversationEvidence, type EvidenceReadOptions, type SessionProjection, type SessionRelatedWorkProjection, type TurnContextProjection, type UserTurnProjection } from "@cchistory/domain";
|
|
2
|
+
export declare const DEFAULT_EVIDENCE_CHARS = 8000;
|
|
3
|
+
export declare const MAX_EVIDENCE_CHARS = 64000;
|
|
4
|
+
export declare class EvidenceCursorError extends Error {
|
|
5
|
+
readonly code = "invalid_evidence_cursor";
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export declare function buildConversationEvidence(turns: readonly UserTurnProjection[], contexts: readonly TurnContextProjection[], atoms?: readonly ConversationAtom[], sessions?: readonly SessionProjection[]): ConversationEvidence[];
|
|
9
|
+
export declare function validateEvidenceBudget(options: EvidenceReadOptions): void;
|
|
10
|
+
/** Cursor identity binds the complete ordered evidence and resolved target, never a title or row position alone. */
|
|
11
|
+
export declare function readConversationEvidence(messages: readonly ConversationEvidence[], selector: string, options?: EvidenceReadOptions): {
|
|
12
|
+
revision: string;
|
|
13
|
+
messages: (ConversationEvidence & {
|
|
14
|
+
start: number;
|
|
15
|
+
end: number;
|
|
16
|
+
total_chars: number;
|
|
17
|
+
truncated: boolean;
|
|
18
|
+
})[];
|
|
19
|
+
shown: number;
|
|
20
|
+
total_messages: number;
|
|
21
|
+
returned_chars: number;
|
|
22
|
+
max_chars: number;
|
|
23
|
+
has_more: boolean;
|
|
24
|
+
next_cursor: string | null;
|
|
25
|
+
};
|
|
26
|
+
/** Own immutable evidence for repeated pages; callers cannot invalidate a cached revision by mutation. */
|
|
27
|
+
export declare function prepareConversationEvidence(messages: readonly ConversationEvidence[], selector: string): {
|
|
28
|
+
messageCount: number;
|
|
29
|
+
read: (options?: EvidenceReadOptions) => {
|
|
30
|
+
revision: string;
|
|
31
|
+
messages: (ConversationEvidence & {
|
|
32
|
+
start: number;
|
|
33
|
+
end: number;
|
|
34
|
+
total_chars: number;
|
|
35
|
+
truncated: boolean;
|
|
36
|
+
})[];
|
|
37
|
+
shown: number;
|
|
38
|
+
total_messages: number;
|
|
39
|
+
returned_chars: number;
|
|
40
|
+
max_chars: number;
|
|
41
|
+
has_more: boolean;
|
|
42
|
+
next_cursor: string | null;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/** Full masked user/reply text; delegated matches keep their own evidence IDs under a top-level parent. */
|
|
46
|
+
export declare function searchConversationEvidence(input: {
|
|
47
|
+
messages: readonly ConversationEvidence[];
|
|
48
|
+
sessions: readonly SessionProjection[];
|
|
49
|
+
related_work: readonly SessionRelatedWorkProjection[];
|
|
50
|
+
query: string;
|
|
51
|
+
directoryScope?: string;
|
|
52
|
+
projectId?: string;
|
|
53
|
+
projectTurnIds?: ReadonlySet<string>;
|
|
54
|
+
limit?: number;
|
|
55
|
+
offset?: number;
|
|
56
|
+
max_chars?: number;
|
|
57
|
+
group_by?: "session" | "message";
|
|
58
|
+
}): {
|
|
59
|
+
total: number;
|
|
60
|
+
shown: number;
|
|
61
|
+
offset: number;
|
|
62
|
+
limit: number;
|
|
63
|
+
results: {
|
|
64
|
+
session_id: string;
|
|
65
|
+
matched_session_id: string;
|
|
66
|
+
turn_id: string | null;
|
|
67
|
+
message_id: string;
|
|
68
|
+
role: "user" | "assistant";
|
|
69
|
+
created_at: string;
|
|
70
|
+
text: string;
|
|
71
|
+
start: number;
|
|
72
|
+
end: number;
|
|
73
|
+
total_chars: number;
|
|
74
|
+
truncated: boolean;
|
|
75
|
+
}[];
|
|
76
|
+
returned_chars: number;
|
|
77
|
+
max_chars: number;
|
|
78
|
+
next_offset: number | null;
|
|
79
|
+
group_by?: "message" | undefined;
|
|
80
|
+
content: string;
|
|
81
|
+
searched_roles: string[];
|
|
82
|
+
text_coverage: string;
|
|
83
|
+
tool_output_searched: boolean;
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=conversation-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-evidence.d.ts","sourceRoot":"","sources":["../src/conversation-evidence.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EACvI,KAAK,4BAA4B,EAAE,KAAK,qBAAqB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAMpH,eAAO,MAAM,sBAAsB,OAAQ,CAAC;AAC5C,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC,qBAAa,mBAAoB,SAAQ,K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GAAG,SAAS,CAAC;CAClC;;;;;;oBAmCoC,MAAM;4BAAsB,MAAM;iBAAW,MAAM,GAAG,IAAI;oBAAc,MAAM;cAAQ,MAAM,GAAG,WAAW;oBAC/H,MAAM;cAAQ,MAAM;eAAS,MAAM;aAAO,MAAM;qBAAe,MAAM;mBAAa,OAAO;;;;;;;;;;EAgBxG"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { applyMaskTemplates, stableId } from "@cchistory/domain";
|
|
3
|
+
import { compareTurnsByChronology } from "./read-order.js";
|
|
4
|
+
import { filterSessionsByDirectoryScope } from "./directory-scope.js";
|
|
5
|
+
import { filterTopLevelSessions } from "./session-collections.js";
|
|
6
|
+
import { buildSearchPlan, computeSearchRecencyScore, matchesSearchPlan } from "./search.js";
|
|
7
|
+
export const DEFAULT_EVIDENCE_CHARS = 8_000;
|
|
8
|
+
export const MAX_EVIDENCE_CHARS = 64_000;
|
|
9
|
+
export class EvidenceCursorError extends Error {
|
|
10
|
+
code = "invalid_evidence_cursor";
|
|
11
|
+
constructor(message) { super(message); }
|
|
12
|
+
}
|
|
13
|
+
export function buildConversationEvidence(turns, contexts, atoms = [], sessions = []) {
|
|
14
|
+
const byTurn = new Map(contexts.map(context => [context.turn_id, context]));
|
|
15
|
+
const messages = [...turns].sort(compareTurnsByChronology).flatMap(turn => [
|
|
16
|
+
{ message_id: turn.id, session_id: turn.session_id, turn_id: turn.id, role: "user",
|
|
17
|
+
created_at: turn.submission_started_at, text: turn.canonical_text },
|
|
18
|
+
...(byTurn.get(turn.id)?.assistant_replies ?? []).map(reply => ({
|
|
19
|
+
message_id: reply.id, session_id: turn.session_id, turn_id: turn.id, role: "assistant",
|
|
20
|
+
created_at: reply.created_at, text: reply.canonical_text,
|
|
21
|
+
})),
|
|
22
|
+
]);
|
|
23
|
+
const projected = new Set(messages.map(message => message.message_id));
|
|
24
|
+
const sessionIds = new Set(sessions.map(session => session.id));
|
|
25
|
+
for (const atom of atoms) {
|
|
26
|
+
if (atom.actor_kind !== "assistant" || atom.content_kind !== "text" || atom.display_policy === "hide" || !sessionIds.has(atom.session_ref))
|
|
27
|
+
continue;
|
|
28
|
+
const messageId = stableId("assistant-reply", atom.source_id, atom.session_ref, atom.id);
|
|
29
|
+
if (projected.has(messageId) || typeof atom.payload.text !== "string")
|
|
30
|
+
continue;
|
|
31
|
+
projected.add(messageId);
|
|
32
|
+
messages.push({ message_id: messageId, session_id: atom.session_ref, turn_id: null, role: "assistant",
|
|
33
|
+
created_at: atom.time_key, text: applyMaskTemplates(atom.payload.text, "assistant_reply").canonical_text });
|
|
34
|
+
}
|
|
35
|
+
// Stable order preserves canonical turn/reply order for equal source timestamps.
|
|
36
|
+
return messages.sort((a, b) => a.created_at.localeCompare(b.created_at));
|
|
37
|
+
}
|
|
38
|
+
/** Offsets/budgets use UTF-16 code units, without cutting a surrogate pair. */
|
|
39
|
+
function boundary(text, offset) {
|
|
40
|
+
return offset > 0 && offset < text.length && /[\uD800-\uDBFF]/u.test(text[offset - 1])
|
|
41
|
+
&& /[\uDC00-\uDFFF]/u.test(text[offset]) ? offset - 1 : offset;
|
|
42
|
+
}
|
|
43
|
+
export function validateEvidenceBudget(options) {
|
|
44
|
+
const chars = options.max_chars ?? DEFAULT_EVIDENCE_CHARS, limit = options.limit ?? 20;
|
|
45
|
+
if (!Number.isSafeInteger(chars) || chars < 256 || chars > MAX_EVIDENCE_CHARS)
|
|
46
|
+
throw new Error(`max_chars must be an integer from 256 to ${MAX_EVIDENCE_CHARS}.`);
|
|
47
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
48
|
+
throw new Error("Evidence limit must be an integer from 1 to 100.");
|
|
49
|
+
if (options.cursor !== undefined && (typeof options.cursor !== "string" || !options.cursor || options.cursor.length > 2048))
|
|
50
|
+
throw new EvidenceCursorError("Invalid evidence cursor; restart this read without a cursor.");
|
|
51
|
+
if (options.cursor) {
|
|
52
|
+
try {
|
|
53
|
+
if (!/^[A-Za-z0-9_-]+$/u.test(options.cursor))
|
|
54
|
+
throw new Error();
|
|
55
|
+
const cursor = JSON.parse(Buffer.from(options.cursor, "base64url").toString("utf8"));
|
|
56
|
+
if (cursor?.v !== 1 || !/^[a-f0-9]{64}$/u.test(cursor.revision) || !Number.isSafeInteger(cursor.index)
|
|
57
|
+
|| cursor.index < 0 || !Number.isSafeInteger(cursor.offset) || cursor.offset < 0)
|
|
58
|
+
throw new Error();
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
throw new EvidenceCursorError("Invalid evidence cursor; restart this read without a cursor.");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** Cursor identity binds the complete ordered evidence and resolved target, never a title or row position alone. */
|
|
66
|
+
export function readConversationEvidence(messages, selector, options = {}) {
|
|
67
|
+
return readEvidencePage(messages, evidenceRevision(messages, selector), options);
|
|
68
|
+
}
|
|
69
|
+
/** Own immutable evidence for repeated pages; callers cannot invalidate a cached revision by mutation. */
|
|
70
|
+
export function prepareConversationEvidence(messages, selector) {
|
|
71
|
+
const owned = Object.freeze(messages.map(message => Object.freeze({ ...message })));
|
|
72
|
+
const revision = evidenceRevision(owned, selector);
|
|
73
|
+
return { messageCount: owned.length, read: (options = {}) => readEvidencePage(owned, revision, options) };
|
|
74
|
+
}
|
|
75
|
+
function evidenceRevision(messages, selector) {
|
|
76
|
+
const hash = createHash("sha256").update("cchistory-evidence/2").update(JSON.stringify([selector, messages.length]));
|
|
77
|
+
for (const message of messages) {
|
|
78
|
+
hash.update(JSON.stringify([message.message_id, message.session_id, message.turn_id, message.role,
|
|
79
|
+
message.created_at, message.text.length]));
|
|
80
|
+
// UTF-16 preserves even unpaired surrogates and avoids allocating a serialized copy of a huge body.
|
|
81
|
+
for (let offset = 0; offset < message.text.length; offset += 16_384) {
|
|
82
|
+
hash.update(Buffer.from(message.text.slice(offset, offset + 16_384), "utf16le"));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return hash.digest("hex");
|
|
86
|
+
}
|
|
87
|
+
function readEvidencePage(messages, revision, options) {
|
|
88
|
+
validateEvidenceBudget(options);
|
|
89
|
+
const maxChars = options.max_chars ?? DEFAULT_EVIDENCE_CHARS, limit = options.limit ?? 20;
|
|
90
|
+
let index = 0, offset = 0;
|
|
91
|
+
if (options.cursor) {
|
|
92
|
+
try {
|
|
93
|
+
const cursor = JSON.parse(Buffer.from(options.cursor, "base64url").toString("utf8"));
|
|
94
|
+
if (cursor.v !== 1 || cursor.revision !== revision)
|
|
95
|
+
throw new Error();
|
|
96
|
+
index = cursor.index;
|
|
97
|
+
offset = cursor.offset;
|
|
98
|
+
if (!Number.isSafeInteger(index) || index < 0 || index >= messages.length || !Number.isSafeInteger(offset)
|
|
99
|
+
|| offset < 0 || offset > messages[index].text.length || boundary(messages[index].text, offset) !== offset)
|
|
100
|
+
throw new Error();
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
throw new EvidenceCursorError("Evidence or target changed, or cursor is invalid; restart this read without a cursor.");
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const chunks = [];
|
|
107
|
+
let remaining = maxChars;
|
|
108
|
+
while (index < messages.length && chunks.length < limit && remaining > 0) {
|
|
109
|
+
const message = messages[index];
|
|
110
|
+
const end = boundary(message.text, Math.min(message.text.length, offset + remaining));
|
|
111
|
+
if (end === offset && offset < message.text.length)
|
|
112
|
+
break;
|
|
113
|
+
chunks.push({ ...message, text: message.text.slice(offset, end), start: offset, end,
|
|
114
|
+
total_chars: message.text.length, truncated: offset > 0 || end < message.text.length });
|
|
115
|
+
remaining -= end - offset;
|
|
116
|
+
if (end === message.text.length) {
|
|
117
|
+
index++;
|
|
118
|
+
offset = 0;
|
|
119
|
+
}
|
|
120
|
+
else
|
|
121
|
+
offset = end;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
revision, messages: chunks, shown: chunks.length, total_messages: messages.length,
|
|
125
|
+
returned_chars: maxChars - remaining, max_chars: maxChars,
|
|
126
|
+
has_more: index < messages.length,
|
|
127
|
+
next_cursor: index < messages.length ? Buffer.from(JSON.stringify({ v: 1, revision, index, offset })).toString("base64url") : null,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Full masked user/reply text; delegated matches keep their own evidence IDs under a top-level parent. */
|
|
131
|
+
export function searchConversationEvidence(input) {
|
|
132
|
+
validateEvidenceBudget(input);
|
|
133
|
+
const plan = buildSearchPlan(input.query);
|
|
134
|
+
const top = new Set(filterTopLevelSessions(input.sessions, input.related_work).map(s => s.id));
|
|
135
|
+
const scoped = new Set(filterSessionsByDirectoryScope(input.sessions, input.directoryScope).map(s => s.id));
|
|
136
|
+
const sessions = new Map(input.sessions.map(s => [s.id, s]));
|
|
137
|
+
const parents = new Map();
|
|
138
|
+
for (const relation of input.related_work) {
|
|
139
|
+
if (relation.relation_kind === "delegated_session" && relation.direction === "inbound" && relation.child_session_ref
|
|
140
|
+
&& relation.parent_session_ref && relation.child_session_ref !== relation.parent_session_ref && sessions.has(relation.parent_session_ref)) {
|
|
141
|
+
if (!parents.has(relation.child_session_ref))
|
|
142
|
+
parents.set(relation.child_session_ref, relation.parent_session_ref);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const root = (id) => {
|
|
146
|
+
const seen = new Set();
|
|
147
|
+
while (!top.has(id) && parents.has(id) && !seen.has(id)) {
|
|
148
|
+
seen.add(id);
|
|
149
|
+
id = parents.get(id);
|
|
150
|
+
}
|
|
151
|
+
return id;
|
|
152
|
+
};
|
|
153
|
+
const now = input.sessions.reduce((latest, session) => Math.max(latest, Date.parse(session.updated_at) || 0), 0);
|
|
154
|
+
const matches = new Map();
|
|
155
|
+
for (const message of input.messages) {
|
|
156
|
+
const parent = root(message.session_id);
|
|
157
|
+
if (!scoped.has(message.session_id) || !scoped.has(parent) || !top.has(parent))
|
|
158
|
+
continue;
|
|
159
|
+
if (input.projectId && (message.turn_id === null ? sessions.get(message.session_id)?.primary_project_id !== input.projectId
|
|
160
|
+
: !input.projectTurnIds?.has(message.turn_id)))
|
|
161
|
+
continue;
|
|
162
|
+
if (!matchesSearchPlan(message.text, plan))
|
|
163
|
+
continue;
|
|
164
|
+
const score = computeSearchRecencyScore({ submission_started_at: message.created_at }, now);
|
|
165
|
+
const key = input.group_by === "message" ? message.message_id : parent;
|
|
166
|
+
const previous = matches.get(key);
|
|
167
|
+
if (!previous || score > previous.score || score === previous.score && message.message_id < previous.message.message_id) {
|
|
168
|
+
matches.set(key, { message, score, parentSessionId: parent });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const ranked = [...matches].sort((a, b) => b[1].score - a[1].score || a[0].localeCompare(b[0]));
|
|
172
|
+
const offset = input.offset ?? 0, limit = input.limit ?? 20, maxChars = input.max_chars ?? DEFAULT_EVIDENCE_CHARS;
|
|
173
|
+
const results = [];
|
|
174
|
+
let remaining = maxChars;
|
|
175
|
+
for (const [, { message, parentSessionId: sessionId }] of ranked.slice(offset, offset + limit)) {
|
|
176
|
+
if (remaining < 2)
|
|
177
|
+
break;
|
|
178
|
+
const first = message.text.toLowerCase().indexOf(plan.terms[0]?.value ?? "");
|
|
179
|
+
const start = boundary(message.text, Math.max(0, first - 80));
|
|
180
|
+
const end = boundary(message.text, Math.min(message.text.length, start + Math.min(400, remaining)));
|
|
181
|
+
results.push({ session_id: sessionId, matched_session_id: message.session_id, turn_id: message.turn_id, message_id: message.message_id,
|
|
182
|
+
role: message.role, created_at: message.created_at, text: message.text.slice(start, end), start, end,
|
|
183
|
+
total_chars: message.text.length, truncated: start > 0 || end < message.text.length });
|
|
184
|
+
remaining -= end - start;
|
|
185
|
+
}
|
|
186
|
+
return { content: "conversation", searched_roles: ["user", "assistant"], text_coverage: "full", tool_output_searched: false,
|
|
187
|
+
...(input.group_by === "message" ? { group_by: "message" } : {}),
|
|
188
|
+
total: ranked.length, shown: results.length, offset, limit, results, returned_chars: maxChars - remaining, max_chars: maxChars,
|
|
189
|
+
next_offset: offset + results.length < ranked.length ? offset + results.length : null };
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=conversation-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-evidence.js","sourceRoot":"","sources":["../src/conversation-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EACqD,MAAM,mBAAmB,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE5F,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAEzC,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACnC,IAAI,GAAG,yBAAyB,CAAC;IAC1C,YAAY,OAAe,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACjD;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAoC,EAAE,QAA0C,EACxH,QAAqC,EAAE,EAAE,WAAyC,EAAE;IACpF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAA2B,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACjG,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE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ence.test.d.ts","sourceRoot":"","sources":["../src/conversation-evidence.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import test from "node:test";
|
|
4
|
+
import { readConversationEvidence, prepareConversationEvidence, searchConversationEvidence, EvidenceCursorError, validateEvidenceBudget } from "./conversation-evidence.js";
|
|
5
|
+
import { auditProjectionConsistency } from "./projection-audit.js";
|
|
6
|
+
import { summarizeReadStatus } from "./read-status.js";
|
|
7
|
+
const records = (await readFile(new URL("../../../mock_data/fixtures/agent-evidence/parent.jsonl", import.meta.url), "utf8")).trim().split("\n").map(line => JSON.parse(line));
|
|
8
|
+
const messages = records.filter(r => r.payload.type === "message").map((record, index) => ({
|
|
9
|
+
message_id: `message-${index}`, session_id: "fixture-parent", turn_id: `turn-${Math.floor(index / 2)}`,
|
|
10
|
+
role: record.payload.role, created_at: record.timestamp, text: record.payload.content[0].text,
|
|
11
|
+
}));
|
|
12
|
+
test("bounded evidence pages reconstruct all Unicode text without duplicates or split surrogate pairs", () => {
|
|
13
|
+
const expanded = messages.map(m => ({ ...m, text: m.text.repeat(37) }));
|
|
14
|
+
const recovered = new Map();
|
|
15
|
+
let cursor;
|
|
16
|
+
for (let pages = 0;; pages++) {
|
|
17
|
+
assert.ok(pages < 100);
|
|
18
|
+
const result = readConversationEvidence(expanded, "session:fixture-parent", { max_chars: 257, limit: 2, cursor });
|
|
19
|
+
assert.ok(result.returned_chars <= 257);
|
|
20
|
+
assert.ok(result.messages.length <= 2);
|
|
21
|
+
for (const chunk of result.messages) {
|
|
22
|
+
assert.equal(chunk.start, (recovered.get(chunk.message_id) ?? "").length);
|
|
23
|
+
assert.equal(chunk.text.length, chunk.end - chunk.start);
|
|
24
|
+
assert.doesNotMatch(chunk.text, /^[\uDC00-\uDFFF]|[\uD800-\uDBFF]$/u);
|
|
25
|
+
recovered.set(chunk.message_id, (recovered.get(chunk.message_id) ?? "") + chunk.text);
|
|
26
|
+
}
|
|
27
|
+
if (!result.has_more) {
|
|
28
|
+
assert.equal(result.next_cursor, null);
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
assert.ok(result.next_cursor && result.next_cursor !== cursor);
|
|
32
|
+
cursor = result.next_cursor;
|
|
33
|
+
}
|
|
34
|
+
assert.deepEqual(expanded.map(m => recovered.get(m.message_id)), expanded.map(m => m.text));
|
|
35
|
+
});
|
|
36
|
+
test("cursors reject changed content, another target, reordered evidence and malformed offsets", () => {
|
|
37
|
+
const cursor = readConversationEvidence(messages, "session:a", { limit: 1 }).next_cursor;
|
|
38
|
+
assert.throws(() => readConversationEvidence(messages, "session:b", { cursor }), EvidenceCursorError);
|
|
39
|
+
assert.throws(() => readConversationEvidence([...messages].reverse(), "session:a", { cursor }), EvidenceCursorError);
|
|
40
|
+
assert.throws(() => readConversationEvidence(messages.map(m => ({ ...m, text: m.text + "." })), "session:a", { cursor }), EvidenceCursorError);
|
|
41
|
+
const modified = JSON.parse(Buffer.from(cursor, "base64url").toString());
|
|
42
|
+
modified.offset = -1;
|
|
43
|
+
assert.throws(() => validateEvidenceBudget({ cursor: Buffer.from(JSON.stringify(modified)).toString("base64url") }), EvidenceCursorError);
|
|
44
|
+
assert.throws(() => validateEvidenceBudget({ cursor: "not-a-cursor" }), EvidenceCursorError);
|
|
45
|
+
});
|
|
46
|
+
test("prepared pages own immutable content and agree with direct reads, including unpaired surrogates", () => {
|
|
47
|
+
const mutable = messages.map(message => ({ ...message, text: message.text.repeat(37) + "\ud800" }));
|
|
48
|
+
const original = mutable.map(message => ({ ...message }));
|
|
49
|
+
const prepared = prepareConversationEvidence(mutable, "session:fixture-parent");
|
|
50
|
+
mutable[0].text = "Changed after preparation";
|
|
51
|
+
mutable.reverse();
|
|
52
|
+
let cursor;
|
|
53
|
+
for (let count = 0;; count++) {
|
|
54
|
+
assert.ok(count < 100);
|
|
55
|
+
const options = { max_chars: 257, limit: 2, cursor };
|
|
56
|
+
const page = prepared.read(options);
|
|
57
|
+
assert.deepEqual(page, readConversationEvidence(original, "session:fixture-parent", options));
|
|
58
|
+
if (!page.has_more)
|
|
59
|
+
break;
|
|
60
|
+
cursor = page.next_cursor;
|
|
61
|
+
}
|
|
62
|
+
assert.notEqual(prepared.read().revision, readConversationEvidence(mutable, "session:fixture-parent").revision);
|
|
63
|
+
const replaced = original.map(message => ({ ...message, text: message.text.replace(/\ud800/g, "\ufffd") }));
|
|
64
|
+
assert.notEqual(prepared.read().revision, readConversationEvidence(replaced, "session:fixture-parent").revision);
|
|
65
|
+
});
|
|
66
|
+
test("empty sessions and empty messages terminate without inventing text", () => {
|
|
67
|
+
assert.deepEqual(readConversationEvidence([], "empty").messages, []);
|
|
68
|
+
assert.equal(readConversationEvidence([], "empty").next_cursor, null);
|
|
69
|
+
const result = readConversationEvidence(messages.map(m => ({ ...m, text: "" })), "empty-body", { limit: 2 });
|
|
70
|
+
assert.equal(result.returned_chars, 0);
|
|
71
|
+
assert.equal(result.messages.length, 2);
|
|
72
|
+
assert.ok(result.next_cursor);
|
|
73
|
+
});
|
|
74
|
+
test("message-grouped search paginates older matches without changing default session grouping", () => {
|
|
75
|
+
const sessions = [{ id: "fixture-parent", source_id: "fixture-source",
|
|
76
|
+
source_platform: "codex", host_id: "fixture-host", created_at: messages[0].created_at,
|
|
77
|
+
updated_at: messages.at(-1).created_at, turn_count: 2, sync_axis: "current" }];
|
|
78
|
+
const input = { messages, sessions, related_work: [], query: "fixture", limit: 1 };
|
|
79
|
+
const grouped = searchConversationEvidence(input);
|
|
80
|
+
assert.equal(grouped.total, 1);
|
|
81
|
+
assert.equal(grouped.results[0]?.message_id, "message-3");
|
|
82
|
+
assert.equal(grouped.next_offset, null);
|
|
83
|
+
const first = searchConversationEvidence({ ...input, group_by: "message" });
|
|
84
|
+
const second = searchConversationEvidence({ ...input, group_by: "message", offset: first.next_offset });
|
|
85
|
+
assert.equal(first.total, 2);
|
|
86
|
+
assert.equal(first.next_offset, 1);
|
|
87
|
+
assert.equal(second.results[0]?.message_id, "message-0");
|
|
88
|
+
assert.equal(second.results[0]?.turn_id, "turn-0");
|
|
89
|
+
assert.equal(second.results[0]?.session_id, "fixture-parent");
|
|
90
|
+
assert.equal(second.next_offset, null);
|
|
91
|
+
});
|
|
92
|
+
test("evidence identity failures remain projection diagnostics", () => {
|
|
93
|
+
const issues = auditProjectionConsistency({ sources: [], projects: [], sessions: [], turns: [], conversation_evidence: [messages[0], messages[0]] });
|
|
94
|
+
assert.ok(issues.some(issue => issue.code === "evidence-turn-mismatch"));
|
|
95
|
+
assert.ok(issues.some(issue => issue.code === "duplicate-id" && issue.entity === "evidence"));
|
|
96
|
+
});
|
|
97
|
+
test("limited scans and observed diagnostics cannot report no known gaps", () => {
|
|
98
|
+
const input = { sources: [], lossAudits: [], projectionIssueCount: 0 };
|
|
99
|
+
assert.equal(summarizeReadStatus(input).status, "no_known_gaps");
|
|
100
|
+
assert.equal(summarizeReadStatus({ ...input, limitedScan: true }).status, "unverified");
|
|
101
|
+
assert.equal(summarizeReadStatus({ ...input, observedDiagnostics: true }).status, "unverified");
|
|
102
|
+
assert.equal(summarizeReadStatus({ ...input, unknownDirectorySessions: 1 }).status, "partial");
|
|
103
|
+
assert.equal(summarizeReadStatus({ ...input, projectionIssueCount: 1 }).status, "partial");
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=conversation-evidence.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-evidence.test.js","sourceRoot":"","sources":["../src/conversation-evidence.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,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AG,EAAE;IAC9E,MAAM,KAAK,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,oBAAoB,EAAE,CAAC,EAAE,CAAC;IACvE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjE,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACxF,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAChG,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,wBAAwB,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC/F,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC7F,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { buildLinkingReview, deriveProjectLinkSnapshot, type LinkedProjectObservation, type LinkingReview, type ProjectLinkSnapshot, } from "./project-linker.js";
|
|
2
2
|
export { buildFallbackProjectObservationCandidates, listBlobOriginsBySession, } from "./fallback-projects.js";
|
|
3
|
-
export { buildUsageRows, compareUsageRollupRows,
|
|
3
|
+
export { UNASSIGNED_PROJECT_KEY, buildUsageRows, compareUsageRollupRows, extractUnfilteredUsageRows, filterUsageRows, hasAnyTokenUsage, resolveStructuredTokenTotal, resolveTurnUsage, summarizeSessionUsage, sumUsageRows, usageDimensionKey, usageDimensionLabel, type UsageAggregationRow, type UsageFilters, type UsageSourceData, type SessionUsageProjection, type TurnUsageProjection, } from "./usage.js";
|
|
4
|
+
export { computeUsageBreakdown, computeUsageMatrix, computeUsageOverview, computeUsageRollup, countExcludedZeroTokenTurns, } from "./usage-breakdown.js";
|
|
5
|
+
export { BUILTIN_MODEL_PRICING_CATALOG, DEFAULT_MODEL_ALIASES, MODEL_PRICING_CATALOG_SNAPSHOT_DATE, } from "./model-pricing-catalog.js";
|
|
6
|
+
export { addModelUsageToCostBreakdown, buildModelPricingResolutions, createEmptyCostBreakdown, normalizeMultipliers, resolveModelPricing, type ResolvedModelPricing, type UsageTokenQuantities, } from "./usage-pricing.js";
|
|
7
|
+
export { buildPricingConfigTemplate, mergeUsagePricingConfigs, parseUsagePricingInput, resolveEffectiveQuotaLimitUsd, } from "./usage-pricing-config.js";
|
|
8
|
+
export { extractLocalTimeParts, localWallTimeToEpochMs, parseDateEnd, parseDateOrRelativeStart, resolveTimeWindowBounds, resolveUsageTimezone, resolveWeekBucket, type LocalTimeParts, type UsageTimeOptions, } from "./usage-time.js";
|
|
4
9
|
export { boundSearchCanonicalText, buildSearchPlan, classifySearchMatch, compareSessionSearchResults, compareTurnSearchResults, computeRelevanceScore, findHighlights, materializeSearchCandidate, matchesSearchCandidatePlan, matchesSearchCandidateQuery, matchesSearchPlan, SEARCH_CANONICAL_TEXT_SCAN_BYTES, SEARCH_TRUNCATION_MARKER, searchSessionsInMemory, searchTurnsInMemory, stripSearchTruncationMarker, type MaterializeSearchCandidateInput, type SearchCandidateFields, type SearchCandidateSessionFields, type SearchPlan, type SearchProjectObservationCandidate, type SearchSessionsInMemoryInput, type SearchTerm, type SearchTurnsInMemoryInput, } from "./search.js";
|
|
5
|
-
export { buildSessionLastMessageIndex, buildProjectDisplayList, compareSessionsByRecency, compareTurnsByChronology, compareTurnsByRecency, orderSessionsByLastMessage, } from "./read-order.js";
|
|
10
|
+
export { buildSessionLastMessageIndex, buildProjectDisplayList, compareSessionsByRecency, compareTurnsByChronology, compareTurnsByRecency, orderSessionsByLastMessage, resolveLatestTurnActivityAt, } from "./read-order.js";
|
|
6
11
|
export { buildDirectoryScopedProjectTreeProjection, filterProjectsByDirectoryScope, filterSessionsByDirectoryScope, filterTurnsByDirectoryScope, normalizeDirectoryScopePath, pathMatchesDirectoryScope, projectMatchesDirectoryScope, sessionMatchesDirectoryScope, type DirectoryScopeOptions, type DirectoryScopedProjectTreeProjection, } from "./directory-scope.js";
|
|
7
12
|
export { buildSessionRelatedWorkIndex, listSessionRelatedWork, } from "./related-work.js";
|
|
8
13
|
export { addContributionStats, buildSessionFamilyInventory, hasSessionFamilyLinkTool, emptyContributionStats, FAMILY_IO_PREVIEW_CHARS, listDelegatedRelationsForFamilyChildren, listSessionFamilies, mergeSessionFamilyInventories, type SessionFamilyInput, type SessionFamilyInventory, } from "./session-family.js";
|
|
@@ -13,4 +18,6 @@ export { interpretSessionEvidence } from "./session-interpreter.js";
|
|
|
13
18
|
export { QUERY_COLUMNS, collectionQueryTemplate, executeCanonicalQuery, executeQueryRows } from "./query.js";
|
|
14
19
|
export { summarizeDirectoryScope } from "./directory-scope.js";
|
|
15
20
|
export { selectSampleSessions } from "./query.js";
|
|
21
|
+
export { buildConversationEvidence, readConversationEvidence, prepareConversationEvidence, searchConversationEvidence, validateEvidenceBudget, EvidenceCursorError, DEFAULT_EVIDENCE_CHARS, MAX_EVIDENCE_CHARS } from "./conversation-evidence.js";
|
|
22
|
+
export { summarizeReadStatus } from "./read-status.js";
|
|
16
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,yCAAyC,EACzC,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,yCAAyC,EACzC,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,mCAAmC,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EACZ,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,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