@cchistory/lite 0.4.5 → 0.5.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 +4 -5
- package/apps/lite-cli/dist/agent-contract.d.ts.map +1 -1
- package/apps/lite-cli/dist/agent-contract.js +32 -25
- package/apps/lite-cli/dist/agent-contract.js.map +1 -1
- package/apps/lite-cli/dist/bin.js +3 -3
- package/apps/lite-cli/dist/bin.js.map +1 -1
- package/apps/lite-cli/dist/index.d.ts.map +1 -1
- package/apps/lite-cli/dist/index.js +147 -66
- package/apps/lite-cli/dist/index.js.map +1 -1
- package/apps/lite-cli/dist/index.test.js +76 -60
- package/apps/lite-cli/dist/index.test.js.map +1 -1
- package/apps/lite-cli/dist/query.d.ts +4 -1
- package/apps/lite-cli/dist/query.d.ts.map +1 -1
- package/apps/lite-cli/dist/query.js +45 -29
- package/apps/lite-cli/dist/query.js.map +1 -1
- package/apps/lite-cli/dist/resource-errors.d.ts +3 -0
- package/apps/lite-cli/dist/resource-errors.d.ts.map +1 -0
- package/apps/lite-cli/dist/resource-errors.js +17 -0
- package/apps/lite-cli/dist/resource-errors.js.map +1 -0
- package/apps/lite-cli/dist/shell.d.ts +12 -2
- package/apps/lite-cli/dist/shell.d.ts.map +1 -1
- package/apps/lite-cli/dist/shell.js +129 -57
- package/apps/lite-cli/dist/shell.js.map +1 -1
- package/apps/lite-cli/dist/sql-query.test.d.ts +2 -0
- package/apps/lite-cli/dist/sql-query.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/sql-query.test.js +290 -0
- package/apps/lite-cli/dist/sql-query.test.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/bin.js +3 -3
- package/apps/lite-tui/dist/bin.js.map +1 -1
- package/apps/lite-tui/dist/index.d.ts.map +1 -1
- package/apps/lite-tui/dist/index.js +2 -2
- package/apps/lite-tui/dist/index.js.map +1 -1
- package/apps/lite-tui/dist/index.test.js +5 -3
- package/apps/lite-tui/dist/index.test.js.map +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/bin/cchistory-lite-tui.mjs +3 -3
- package/bin/cchistory-lite.mjs +3 -3
- package/docs/guide/for-agents.md +65 -46
- package/docs/guide/lite.md +49 -11
- package/docs/guide/queries/latest-sessions.sql +4 -0
- package/docs/guide/queries/latest-turns.sql +1 -0
- package/docs/guide/queries/list-sessions.sql +2 -0
- package/docs/guide/query.md +153 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts +7 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/directory-scope.js +11 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.d.ts +5 -1
- package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.js +5 -1
- package/node_modules/@cchistory/canonical/dist/index.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/query.d.ts +15 -0
- package/node_modules/@cchistory/canonical/dist/query.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/query.js +208 -0
- package/node_modules/@cchistory/canonical/dist/query.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.d.ts +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-family.js +3 -0
- package/node_modules/@cchistory/canonical/dist/session-family.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-family.test.js +61 -0
- package/node_modules/@cchistory/canonical/dist/session-family.test.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts +30 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js +713 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.test.js +56 -0
- package/node_modules/@cchistory/canonical/dist/session-interpreter.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/package.json +1 -1
- package/node_modules/@cchistory/domain/dist/evidence-atoms.d.ts +7 -0
- package/node_modules/@cchistory/domain/dist/evidence-atoms.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/evidence-atoms.js +36 -0
- package/node_modules/@cchistory/domain/dist/evidence-atoms.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/evidence-values.d.ts +26 -0
- package/node_modules/@cchistory/domain/dist/evidence-values.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/evidence-values.js +80 -0
- package/node_modules/@cchistory/domain/dist/evidence-values.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts +6 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.js +5 -0
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/masks.d.ts +31 -0
- package/node_modules/@cchistory/domain/dist/masks.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/masks.js +342 -0
- package/node_modules/@cchistory/domain/dist/masks.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/parsed-session.d.ts +58 -0
- package/node_modules/@cchistory/domain/dist/parsed-session.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/parsed-session.js +2 -0
- package/node_modules/@cchistory/domain/dist/parsed-session.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/query.d.ts +67 -0
- package/node_modules/@cchistory/domain/dist/query.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/query.js +2 -0
- package/node_modules/@cchistory/domain/dist/query.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/token-evidence.d.ts +14 -0
- package/node_modules/@cchistory/domain/dist/token-evidence.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/token-evidence.js +247 -0
- package/node_modules/@cchistory/domain/dist/token-evidence.js.map +1 -0
- package/node_modules/@cchistory/domain/package.json +1 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts +0 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.js +0 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +30 -9
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js +263 -142
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +177 -20
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.d.ts +16 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.js +55 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.js +192 -0
- package/node_modules/@cchistory/live-runtime/dist/preparation-metadata.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.d.ts +21 -22
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.js +53 -41
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.test.js +266 -57
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts +47 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.js +15 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.test.js +166 -0
- package/node_modules/@cchistory/live-runtime/dist/selective-query.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.d.ts +37 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.js +301 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js +67 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-worker.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-worker.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-worker.js +14 -0
- package/node_modules/@cchistory/live-runtime/dist/sql-worker.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/system-memory.d.ts +13 -10
- package/node_modules/@cchistory/live-runtime/dist/system-memory.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/system-memory.js +61 -34
- package/node_modules/@cchistory/live-runtime/dist/system-memory.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/system-memory.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/system-memory.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/system-memory.test.js +76 -0
- package/node_modules/@cchistory/live-runtime/dist/system-memory.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/package.json +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts +2 -4
- package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/factories.js +1 -23
- package/node_modules/@cchistory/source-adapters/dist/core/factories.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.d.ts +25 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.js +80 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.js +122 -0
- package/node_modules/@cchistory/source-adapters/dist/core/file-read-plan.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts +1 -1
- 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 +2 -11
- 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 +2 -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 +4 -4
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts +8 -6
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js +54 -36
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts +2 -28
- package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/projections.js +2 -695
- package/node_modules/@cchistory/source-adapters/dist/core/projections.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts +18 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js +27 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js +75 -0
- package/node_modules/@cchistory/source-adapters/dist/core/read-budget.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts +6 -0
- 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 +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts +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 +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts +1 -13
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js +1 -246
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts +1 -25
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js +1 -79
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts +6 -35
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts +2 -1
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js +14 -10
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts +6 -0
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.js +4 -0
- package/node_modules/@cchistory/source-adapters/dist/index.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +2 -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 +2 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/masks.d.ts +1 -30
- package/node_modules/@cchistory/source-adapters/dist/masks.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/masks.js +1 -341
- package/node_modules/@cchistory/source-adapters/dist/masks.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.d.ts +14 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.js +103 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/activity-evidence.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js +5 -3
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js +24 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts +2 -1
- 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 +11 -9
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js +2 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.js +7 -0
- package/node_modules/@cchistory/source-adapters/dist/probe-reference.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/test-helpers.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/package.json +1 -1
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +428 -0
- package/node_modules/commander/index.js +1224 -0
- package/node_modules/commander/package.json +38 -0
- package/node_modules/commander/typings/index.d.ts +310 -0
- package/node_modules/discontinuous-range/.npmignore +28 -0
- package/node_modules/discontinuous-range/.travis.yml +4 -0
- package/node_modules/discontinuous-range/LICENSE +21 -0
- package/node_modules/discontinuous-range/README.md +23 -0
- package/node_modules/discontinuous-range/index.js +144 -0
- package/node_modules/discontinuous-range/package.json +27 -0
- package/node_modules/discontinuous-range/test/main-test.js +96 -0
- package/node_modules/moo/LICENSE +29 -0
- package/node_modules/moo/README.md +385 -0
- package/node_modules/moo/moo.js +645 -0
- package/node_modules/moo/package.json +29 -0
- package/node_modules/nearley/LICENSE.txt +21 -0
- package/node_modules/nearley/README.md +80 -0
- package/node_modules/nearley/bin/nearley-railroad.js +121 -0
- package/node_modules/nearley/bin/nearley-test.js +64 -0
- package/node_modules/nearley/bin/nearley-unparse.js +29 -0
- package/node_modules/nearley/bin/nearleyc.js +38 -0
- package/node_modules/nearley/builtin/cow.ne +2 -0
- package/node_modules/nearley/builtin/number.ne +51 -0
- package/node_modules/nearley/builtin/postprocessors.ne +36 -0
- package/node_modules/nearley/builtin/string.ne +26 -0
- package/node_modules/nearley/builtin/whitespace.ne +5 -0
- package/node_modules/nearley/lib/compile.js +307 -0
- package/node_modules/nearley/lib/generate.js +244 -0
- package/node_modules/nearley/lib/lint.js +28 -0
- package/node_modules/nearley/lib/nearley-language-bootstrapped.js +132 -0
- package/node_modules/nearley/lib/nearley-language-bootstrapped.ne +126 -0
- package/node_modules/nearley/lib/nearley.js +564 -0
- package/node_modules/nearley/lib/stream.js +18 -0
- package/node_modules/nearley/lib/unparse.js +139 -0
- package/node_modules/nearley/package.json +63 -0
- package/node_modules/pgsql-ast-parser/ast-mapper.d.ts +237 -0
- package/node_modules/pgsql-ast-parser/ast-mapper.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/ast-mapper.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/ast-mapper.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/ast-visitor.d.ts +33 -0
- package/node_modules/pgsql-ast-parser/ast-visitor.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/ast-visitor.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/ast-visitor.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/index.d.ts +11 -0
- package/node_modules/pgsql-ast-parser/index.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/index.js +6484 -0
- package/node_modules/pgsql-ast-parser/index.js.map +1 -0
- package/node_modules/pgsql-ast-parser/interfaces.d.ts +1 -0
- package/node_modules/pgsql-ast-parser/interfaces.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/keywords.d.ts +2 -0
- package/node_modules/pgsql-ast-parser/keywords.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/lexer.d.ts +15 -0
- package/node_modules/pgsql-ast-parser/lexer.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/lexer.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/lexer.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array-lexer.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array-lexer.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array.ne.d.ts +29 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array.ne.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/array.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric-lexer.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric-lexer.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.ne.d.ts +29 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.ne.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/geometric.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-builder.d.ts +10 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-builder.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso-lexer.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso-lexer.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso.ne.d.ts +29 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-iso.ne.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-lexer.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval-lexer.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.ne.d.ts +29 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.ne.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/literal-syntaxes/interval.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/package.json +69 -0
- package/node_modules/pgsql-ast-parser/parser.d.ts +33 -0
- package/node_modules/pgsql-ast-parser/parser.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/pg-escape.d.ts +2 -0
- package/node_modules/pgsql-ast-parser/pg-escape.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/readme.md +255 -0
- package/node_modules/pgsql-ast-parser/src/ast-mapper.spec.ts +296 -0
- package/node_modules/pgsql-ast-parser/src/ast-mapper.ts +1378 -0
- package/node_modules/pgsql-ast-parser/src/ast-visitor.spec.ts +57 -0
- package/node_modules/pgsql-ast-parser/src/ast-visitor.ts +101 -0
- package/node_modules/pgsql-ast-parser/src/index.ts +10 -0
- package/node_modules/pgsql-ast-parser/src/interfaces.ts +0 -0
- package/node_modules/pgsql-ast-parser/src/keywords.ts +8 -0
- package/node_modules/pgsql-ast-parser/src/lexer.spec.ts +245 -0
- package/node_modules/pgsql-ast-parser/src/lexer.ts +267 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array-lexer.ts +27 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array.ne +18 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/array.spec.ts +55 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric-lexer.ts +26 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric.ne +88 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/geometric.spec.ts +131 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-builder.ts +148 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-iso-lexer.ts +17 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-iso.ne +53 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval-lexer.ts +26 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval.ne +54 -0
- package/node_modules/pgsql-ast-parser/src/literal-syntaxes/interval.spec.ts +106 -0
- package/node_modules/pgsql-ast-parser/src/parser.ts +142 -0
- package/node_modules/pgsql-ast-parser/src/pg-escape.ts +14 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-index.ne +29 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-index.spec.ts +35 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-table.ne +123 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-table.spec.ts +476 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-type.ne +33 -0
- package/node_modules/pgsql-ast-parser/src/syntax/alter-type.spec.ts +29 -0
- package/node_modules/pgsql-ast-parser/src/syntax/ast.ts +1150 -0
- package/node_modules/pgsql-ast-parser/src/syntax/base.ne +369 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-extension.ne +17 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-extension.spec.ts +37 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-index.ne +62 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-index.spec.ts +245 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-table.ne +174 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-table.spec.ts +761 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-type.ne +40 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-type.spec.ts +32 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-view.ne +68 -0
- package/node_modules/pgsql-ast-parser/src/syntax/create-view.spec.ts +187 -0
- package/node_modules/pgsql-ast-parser/src/syntax/deallocate.ne +13 -0
- package/node_modules/pgsql-ast-parser/src/syntax/deallocate.spec.ts +19 -0
- package/node_modules/pgsql-ast-parser/src/syntax/delete.ne +36 -0
- package/node_modules/pgsql-ast-parser/src/syntax/delete.spec.ts +71 -0
- package/node_modules/pgsql-ast-parser/src/syntax/drop.ne +28 -0
- package/node_modules/pgsql-ast-parser/src/syntax/drop.spec.ts +77 -0
- package/node_modules/pgsql-ast-parser/src/syntax/edge-cases.spec.ts +41 -0
- package/node_modules/pgsql-ast-parser/src/syntax/expr.ne +350 -0
- package/node_modules/pgsql-ast-parser/src/syntax/expr.spec.ts +1638 -0
- package/node_modules/pgsql-ast-parser/src/syntax/functions.ne +114 -0
- package/node_modules/pgsql-ast-parser/src/syntax/functions.spec.ts +235 -0
- package/node_modules/pgsql-ast-parser/src/syntax/insert.ne +63 -0
- package/node_modules/pgsql-ast-parser/src/syntax/insert.spec.ts +292 -0
- package/node_modules/pgsql-ast-parser/src/syntax/main.ne +77 -0
- package/node_modules/pgsql-ast-parser/src/syntax/nearley.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/src/syntax/prepare.ne +8 -0
- package/node_modules/pgsql-ast-parser/src/syntax/prepare.spec.ts +44 -0
- package/node_modules/pgsql-ast-parser/src/syntax/refresh-materialized-view.ne +19 -0
- package/node_modules/pgsql-ast-parser/src/syntax/refresh-materialized-view.spec.ts +42 -0
- package/node_modules/pgsql-ast-parser/src/syntax/select.ne +223 -0
- package/node_modules/pgsql-ast-parser/src/syntax/select.spec.ts +1063 -0
- package/node_modules/pgsql-ast-parser/src/syntax/sequence.ne +101 -0
- package/node_modules/pgsql-ast-parser/src/syntax/sequence.spec.ts +103 -0
- package/node_modules/pgsql-ast-parser/src/syntax/simple-statements.ne +168 -0
- package/node_modules/pgsql-ast-parser/src/syntax/simple-statements.spec.ts +327 -0
- package/node_modules/pgsql-ast-parser/src/syntax/spec-utils.ts +333 -0
- package/node_modules/pgsql-ast-parser/src/syntax/union.ne +18 -0
- package/node_modules/pgsql-ast-parser/src/syntax/union.spec.ts +125 -0
- package/node_modules/pgsql-ast-parser/src/syntax/update.ne +56 -0
- package/node_modules/pgsql-ast-parser/src/syntax/update.spec.ts +87 -0
- package/node_modules/pgsql-ast-parser/src/syntax/with.ne +41 -0
- package/node_modules/pgsql-ast-parser/src/syntax/with.spec.ts +155 -0
- package/node_modules/pgsql-ast-parser/src/to-sql.spec.ts +85 -0
- package/node_modules/pgsql-ast-parser/src/to-sql.ts +1555 -0
- package/node_modules/pgsql-ast-parser/src/utils.ts +47 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-index.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-index.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-table.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-table.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-type.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/alter-type.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/ast.d.ts +826 -0
- package/node_modules/pgsql-ast-parser/syntax/ast.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/create-extension.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/create-extension.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/create-index.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/create-index.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/create-table.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/create-table.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/create-type.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/create-type.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/create-view.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/create-view.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/deallocate.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/deallocate.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/delete.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/delete.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/drop.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/drop.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/edge-cases.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/edge-cases.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/expr.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/expr.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/functions.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/functions.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/insert.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/insert.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/main.ne.d.ts +29 -0
- package/node_modules/pgsql-ast-parser/syntax/main.ne.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/prepare.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/prepare.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/refresh-materialized-view.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/refresh-materialized-view.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/select.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/select.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/sequence.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/sequence.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/simple-statements.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/simple-statements.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/spec-utils.d.ts +35 -0
- package/node_modules/pgsql-ast-parser/syntax/spec-utils.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/union.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/union.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/update.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/update.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/syntax/with.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/syntax/with.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/to-sql.d.ts +7 -0
- package/node_modules/pgsql-ast-parser/to-sql.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/to-sql.spec.d.ts +3 -0
- package/node_modules/pgsql-ast-parser/to-sql.spec.d.ts.map +1 -0
- package/node_modules/pgsql-ast-parser/utils.d.ts +16 -0
- package/node_modules/pgsql-ast-parser/utils.d.ts.map +1 -0
- package/node_modules/railroad-diagrams/.gitattributes +22 -0
- package/node_modules/railroad-diagrams/.npmignore +163 -0
- package/node_modules/railroad-diagrams/README.md +86 -0
- package/node_modules/railroad-diagrams/css-example.py-js +183 -0
- package/node_modules/railroad-diagrams/example.html +141 -0
- package/node_modules/railroad-diagrams/generator.html +59 -0
- package/node_modules/railroad-diagrams/package.json +23 -0
- package/node_modules/railroad-diagrams/railroad-diagrams.css +23 -0
- package/node_modules/railroad-diagrams/railroad-diagrams.js +524 -0
- package/node_modules/railroad-diagrams/railroad_diagrams.py +427 -0
- package/node_modules/randexp/LICENSE +19 -0
- package/node_modules/randexp/README.md +134 -0
- package/node_modules/randexp/lib/randexp.js +245 -0
- package/node_modules/randexp/package.json +48 -0
- package/node_modules/ret/LICENSE +19 -0
- package/node_modules/ret/README.md +183 -0
- package/node_modules/ret/lib/index.js +282 -0
- package/node_modules/ret/lib/positions.js +17 -0
- package/node_modules/ret/lib/sets.js +82 -0
- package/node_modules/ret/lib/types.js +10 -0
- package/node_modules/ret/lib/util.js +111 -0
- package/node_modules/ret/package.json +35 -0
- package/package.json +22 -6
- package/schemas/cchistory-lite-agent-v1.schema.json +6 -7
- package/schemas/cchistory-lite-error-v1.schema.json +58 -8
- package/schemas/cchistory-lite-query-result-v2.schema.json +66 -11
- package/schemas/cchistory-lite-query-result-v3.schema.json +219 -0
- package/schemas/cchistory-lite-query-v3.schema.json +57 -0
- package/schemas/cchistory-lite-source-inventory-v1.schema.json +72 -0
- package/skills/using-cchistory-lite/SKILL.md +125 -55
- package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts +0 -8
- package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts.map +0 -1
- package/node_modules/@cchistory/live-runtime/dist/node-memory.js +0 -110
- package/node_modules/@cchistory/live-runtime/dist/node-memory.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { access, cp, mkdir, mkdtemp, readFile, rm, symlink,
|
|
2
|
+
import { access, cp, mkdir, mkdtemp, readFile, rm, symlink, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { PassThrough } from "node:stream";
|
|
6
6
|
import { setTimeout as delay } from "node:timers/promises";
|
|
7
7
|
import test from "node:test";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
-
import { FULL_SCAN_MEMORY_MULTIPLIER, LIGHT_SCAN_MEMORY_MULTIPLIER, LiveHistorySnapshot,
|
|
9
|
+
import { FULL_SCAN_MEMORY_MULTIPLIER, LIGHT_SCAN_MEMORY_MULTIPLIER, LiveHistorySnapshot, SCAN_GUARD_REFUSE_AVAILABLE_FRACTION, SCAN_GUARD_WARN_AVAILABLE_FRACTION, SCAN_LOCK_WAIT_MS, SCAN_WATCHDOG_AVAILABLE_RESERVE_FRACTION, scanLiteHistory, ScanGuardAbortedError, ScanGuardRefusedError, } from "@cchistory/live-runtime";
|
|
10
10
|
import { formatTuiLaunchError, runLiteCli, VERSION } from "./index.js";
|
|
11
11
|
import { buildAgentContract } from "./agent-contract.js";
|
|
12
12
|
import { compactPayload } from "./json-v2.js";
|
|
@@ -45,7 +45,7 @@ test("Lite CLI searches, reports stats, and writes one-way export", async () =>
|
|
|
45
45
|
const sources = captureIo(tempHome);
|
|
46
46
|
assert.equal(await runLiteCli(["sources", ...rootArgs], sources.io), 0);
|
|
47
47
|
const sourcesPayload = JSON.parse(sources.stdout.join(""));
|
|
48
|
-
assert.equal(sourcesPayload.kind, "
|
|
48
|
+
assert.equal(sourcesPayload.kind, "source_inventory");
|
|
49
49
|
assert.equal(sourcesPayload.total, 1);
|
|
50
50
|
const sessions = captureIo(tempHome);
|
|
51
51
|
assert.equal(await runLiteCli(["ls", "sessions", ...unscopedArgs], sessions.io), 0);
|
|
@@ -768,7 +768,7 @@ test("Lite CLI ls limits human and JSON output and rejects conflicting controls
|
|
|
768
768
|
});
|
|
769
769
|
assert.equal(await runLiteCli(["ls", "sources", "--dir", "/workspace"], invalidScope.io), 2);
|
|
770
770
|
assert.match(invalidScope.stderr.join(""), /--dir is not valid for ls sources/);
|
|
771
|
-
assert.match(invalidScope.stderr.join(""), /Drop --dir
|
|
771
|
+
assert.match(invalidScope.stderr.join(""), /Drop --dir/);
|
|
772
772
|
assert.equal(rejectedScans, 0);
|
|
773
773
|
});
|
|
774
774
|
test("Lite CLI applies --dir to sessions, search, stats, and project trees", async () => {
|
|
@@ -945,7 +945,7 @@ test("Lite CLI help documents latest, limits, and directory scope", async () =>
|
|
|
945
945
|
"format",
|
|
946
946
|
"out",
|
|
947
947
|
"dir",
|
|
948
|
-
"request",
|
|
948
|
+
"request", "sql", "sql-file", "params", "complete", "idle-timeout",
|
|
949
949
|
"safe",
|
|
950
950
|
"json",
|
|
951
951
|
"help",
|
|
@@ -1178,7 +1178,7 @@ test("Lite CLI human collection commands default to cwd and announce the scope",
|
|
|
1178
1178
|
assert.equal(scanOptions.at(-1)?.directoryScope, undefined);
|
|
1179
1179
|
assert.match(unscoped.stderr.join(""), /Listing every selected source on this machine/);
|
|
1180
1180
|
assert.match(unscoped.stderr.join(""), /memory estimate covers every selected source root/);
|
|
1181
|
-
assert.match(unscoped.stderr.join(""), /
|
|
1181
|
+
assert.match(unscoped.stderr.join(""), /File and sample counts are not memory guarantees/);
|
|
1182
1182
|
const exportRun = captureIo(repoRoot, undefined, { scan: scanner });
|
|
1183
1183
|
assert.equal(await runLiteCli(["export", "--format", "markdown", "--out", "-"], exportRun.io), 0);
|
|
1184
1184
|
assert.equal(scanOptions.at(-1)?.directoryScope, undefined);
|
|
@@ -1304,6 +1304,7 @@ test("Lite shell JSON-lines keeps the snapshot when refresh fails and uses struc
|
|
|
1304
1304
|
const snapshot = await getCodexSnapshot();
|
|
1305
1305
|
let scans = 0;
|
|
1306
1306
|
const refreshLines = [
|
|
1307
|
+
JSON.stringify({ id: "initial", kind: "search", query: "Review", limit: 1 }),
|
|
1307
1308
|
JSON.stringify({ kind: "refresh" }),
|
|
1308
1309
|
JSON.stringify({ id: "find", kind: "search", query: "Review", limit: 1 }),
|
|
1309
1310
|
JSON.stringify({ kind: "exit" }),
|
|
@@ -1321,71 +1322,79 @@ test("Lite shell JSON-lines keeps the snapshot when refresh fails and uses struc
|
|
|
1321
1322
|
});
|
|
1322
1323
|
assert.equal(await runLiteCli(["shell", "--json", "--no-dir"], refresh.io), 1);
|
|
1323
1324
|
const refreshPayloads = refresh.stdout.join("").trim().split("\n").map((line) => JSON.parse(line));
|
|
1324
|
-
assert.equal(refreshPayloads[
|
|
1325
|
-
assert.equal(refreshPayloads[
|
|
1326
|
-
assert.equal(refreshPayloads[
|
|
1327
|
-
assert.equal(refreshPayloads[
|
|
1325
|
+
assert.equal(refreshPayloads[1]?.kind, "error");
|
|
1326
|
+
assert.equal(refreshPayloads[1]?.error?.code, "scan_failed");
|
|
1327
|
+
assert.equal(refreshPayloads[2]?.kind, "query_result");
|
|
1328
|
+
assert.equal(refreshPayloads[2]?.operations?.[0]?.status, "ok");
|
|
1328
1329
|
assert.equal(refresh.stderr.join(""), "");
|
|
1330
|
+
const startupLines = ['{"kind":"latest","limit":1}', '{"kind":"exit"}'];
|
|
1329
1331
|
const startup = captureIo(repoRoot, undefined, {
|
|
1330
1332
|
isTTY: true,
|
|
1331
1333
|
stdinIsTTY: false,
|
|
1334
|
+
readLine: async () => startupLines.shift() ?? null,
|
|
1332
1335
|
scan: async () => {
|
|
1333
1336
|
throw new Error("synthetic startup scan failure");
|
|
1334
1337
|
},
|
|
1335
1338
|
});
|
|
1336
1339
|
assert.equal(await runLiteCli(["shell", "--no-dir"], startup.io), 1);
|
|
1337
|
-
assert.equal(startup.
|
|
1338
|
-
const startupError = JSON.parse(startup.
|
|
1339
|
-
assert.equal(startupError.schema, "cchistory-lite-error/v1");
|
|
1340
|
+
assert.equal(startup.stderr.join(""), "");
|
|
1341
|
+
const startupError = JSON.parse(startup.stdout.join(""));
|
|
1340
1342
|
assert.equal(startupError.error.code, "scan_failed");
|
|
1341
1343
|
});
|
|
1342
1344
|
test("Lite CLI scan guard refuses a scan whose estimate risks the machine, teaches the bounds, and bends to the kill-switch", async () => {
|
|
1343
1345
|
const tempHome = await mkdtemp(path.join(os.tmpdir(), "cchistory-lite-guard-cli-"));
|
|
1344
|
-
const
|
|
1346
|
+
const fixtureRoot = path.join(tempHome, "codex-sessions");
|
|
1345
1347
|
try {
|
|
1346
|
-
await cp(codexRoot,
|
|
1347
|
-
//
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1348
|
+
await cp(codexRoot, fixtureRoot, { recursive: true });
|
|
1349
|
+
// Exercise guard-to-surface behavior with a controlled risk estimate. Runtime
|
|
1350
|
+
// tests cover adapter selection; unrelated files must not inflate the estimate.
|
|
1351
|
+
const guardedIo = () => captureIo(tempHome, undefined, {
|
|
1352
|
+
scan: (options) => scanLiteHistory({
|
|
1353
|
+
...options,
|
|
1354
|
+
scanGuardDeps: {
|
|
1355
|
+
walkRootBytes: async () => options.directoryScope ? 0 : 256 * 1024 ** 3,
|
|
1356
|
+
readAvailableBytes: () => 1024 ** 3,
|
|
1357
|
+
},
|
|
1358
|
+
}),
|
|
1359
|
+
});
|
|
1360
|
+
const sourceArgs = ["--source-root", `codex=${fixtureRoot}`, "--source", "codex", "--safe"];
|
|
1361
|
+
const refused = guardedIo();
|
|
1362
|
+
assert.equal(await runLiteCli(["sources", "--complete", ...sourceArgs], refused.io), 1);
|
|
1354
1363
|
assert.equal(refused.stdout.join(""), "");
|
|
1355
1364
|
const message = refused.stderr.join("");
|
|
1356
1365
|
assert.match(message, /Refusing to scan/);
|
|
1357
1366
|
assert.match(message, /Selected source roots/);
|
|
1358
1367
|
assert.match(message, /codex/);
|
|
1359
1368
|
assert.match(message, /this scan has no --dir filter/);
|
|
1360
|
-
assert.match(message,
|
|
1361
|
-
assert.match(message,
|
|
1369
|
+
assert.match(message, /keep the requested scope/);
|
|
1370
|
+
assert.match(message, /File count and sample size are not memory bounds/);
|
|
1362
1371
|
assert.match(message, /sample/);
|
|
1363
|
-
assert.match(message, /
|
|
1372
|
+
assert.match(message, /sources --json/);
|
|
1364
1373
|
assert.match(message, /shell/);
|
|
1365
|
-
assert.match(message, /
|
|
1366
|
-
assert.
|
|
1374
|
+
assert.match(message, /No complete result/);
|
|
1375
|
+
assert.doesNotMatch(message, /CCHISTORY_SCAN_GUARD=0/);
|
|
1367
1376
|
assert.doesNotMatch(message, /--dir is already on/);
|
|
1368
1377
|
assert.doesNotMatch(message, /does not shrink source bytes/);
|
|
1369
|
-
const scopedLatest =
|
|
1378
|
+
const scopedLatest = guardedIo();
|
|
1370
1379
|
assert.equal(await runLiteCli(["latest", "--dir", "/workspace/codex-delegated", ...sourceArgs], scopedLatest.io), 0, scopedLatest.stderr.join(""));
|
|
1371
|
-
const defaultDir =
|
|
1380
|
+
const defaultDir = guardedIo();
|
|
1372
1381
|
assert.equal(await runLiteCli(["latest", ...sourceArgs], defaultDir.io), 0, defaultDir.stderr.join(""));
|
|
1373
|
-
const refusedJson =
|
|
1374
|
-
assert.equal(await runLiteCli(["sources", "--json", ...sourceArgs], refusedJson.io), 1);
|
|
1382
|
+
const refusedJson = guardedIo();
|
|
1383
|
+
assert.equal(await runLiteCli(["sources", "--complete", "--json", ...sourceArgs], refusedJson.io), 1);
|
|
1375
1384
|
assert.equal(refusedJson.stdout.join(""), "");
|
|
1376
1385
|
const errorPayload = JSON.parse(refusedJson.stderr.join(""));
|
|
1377
1386
|
assert.equal(errorPayload.schema, "cchistory-lite-error/v1");
|
|
1378
1387
|
assert.equal(errorPayload.error.code, "scan_guard_refused");
|
|
1379
1388
|
assert.match(errorPayload.error.message, /Refusing to scan/);
|
|
1380
|
-
//
|
|
1381
|
-
const sampled =
|
|
1382
|
-
assert.equal(await runLiteCli(["sample", "1", ...sourceArgs, "--no-dir"], sampled.io),
|
|
1383
|
-
const shown =
|
|
1384
|
-
assert.equal(await runLiteCli(["show", "session", "sess:codex:019ce4fd-8290-7501-afc4-0e9486733614", ...sourceArgs], shown.io),
|
|
1389
|
+
// Sample/exact probes bypass only the lock; an excessive estimate still refuses.
|
|
1390
|
+
const sampled = guardedIo();
|
|
1391
|
+
assert.equal(await runLiteCli(["sample", "1", ...sourceArgs, "--no-dir"], sampled.io), 1, sampled.stderr.join(""));
|
|
1392
|
+
const shown = guardedIo();
|
|
1393
|
+
assert.equal(await runLiteCli(["show", "session", "sess:codex:019ce4fd-8290-7501-afc4-0e9486733614", ...sourceArgs], shown.io), 1, shown.stderr.join(""));
|
|
1385
1394
|
process.env.CCHISTORY_SCAN_GUARD = "0";
|
|
1386
1395
|
try {
|
|
1387
|
-
const allowed =
|
|
1388
|
-
assert.equal(await runLiteCli(["sources", ...sourceArgs], allowed.io), 0, allowed.stderr.join(""));
|
|
1396
|
+
const allowed = guardedIo();
|
|
1397
|
+
assert.equal(await runLiteCli(["sources", "--complete", ...sourceArgs], allowed.io), 0, allowed.stderr.join(""));
|
|
1389
1398
|
}
|
|
1390
1399
|
finally {
|
|
1391
1400
|
delete process.env.CCHISTORY_SCAN_GUARD;
|
|
@@ -1403,7 +1412,7 @@ test("Lite CLI maps scan guard refusals and aborts to exit 1 with distinct struc
|
|
|
1403
1412
|
throw new ScanGuardAbortedError({ availableBytes: 300 * 1024 ** 2, floorBytes: 512 * 1024 ** 2 });
|
|
1404
1413
|
},
|
|
1405
1414
|
});
|
|
1406
|
-
assert.equal(await runLiteCli(["sources", "--json"], aborted.io), 1);
|
|
1415
|
+
assert.equal(await runLiteCli(["sources", "--complete", "--json"], aborted.io), 1);
|
|
1407
1416
|
assert.equal(aborted.stdout.join(""), "");
|
|
1408
1417
|
const abortPayload = JSON.parse(aborted.stderr.join(""));
|
|
1409
1418
|
assert.equal(abortPayload.schema, "cchistory-lite-error/v1");
|
|
@@ -1451,7 +1460,7 @@ test("Lite CLI maps scan guard refusals and aborts to exit 1 with distinct struc
|
|
|
1451
1460
|
throw new ScanGuardRefusedError({ reason: "scan_in_progress", holder: { pid: 4321 }, waitedMs: 30_000 });
|
|
1452
1461
|
},
|
|
1453
1462
|
});
|
|
1454
|
-
assert.equal(await runLiteCli(["sources"], human.io), 1);
|
|
1463
|
+
assert.equal(await runLiteCli(["sources", "--complete"], human.io), 1);
|
|
1455
1464
|
assert.match(human.stderr.join(""), /Refusing to scan/);
|
|
1456
1465
|
assert.throws(() => JSON.parse(human.stderr.join("")));
|
|
1457
1466
|
}
|
|
@@ -1478,9 +1487,9 @@ test("Lite CLI prints a one-line scan guard warning on stderr and proceeds", asy
|
|
|
1478
1487
|
return getCodexSnapshot();
|
|
1479
1488
|
},
|
|
1480
1489
|
});
|
|
1481
|
-
assert.equal(await runLiteCli(["sources", "--json"], warned.io), 0);
|
|
1490
|
+
assert.equal(await runLiteCli(["sources", "--complete", "--json"], warned.io), 0);
|
|
1482
1491
|
assert.match(warned.stderr.join(""), /Scan guard warning/);
|
|
1483
|
-
assert.
|
|
1492
|
+
assert.doesNotMatch(warned.stderr.join(""), /CCHISTORY_SCAN_GUARD=0/);
|
|
1484
1493
|
assert.equal(JSON.parse(warned.stdout.join("")).kind, "sources");
|
|
1485
1494
|
}
|
|
1486
1495
|
finally {
|
|
@@ -1521,12 +1530,11 @@ test("Lite CLI agent prints the machine-readable contract without scanning", asy
|
|
|
1521
1530
|
assert.equal(guard.warn_available_fraction, SCAN_GUARD_WARN_AVAILABLE_FRACTION);
|
|
1522
1531
|
assert.equal(guard.refuse_available_fraction, SCAN_GUARD_REFUSE_AVAILABLE_FRACTION);
|
|
1523
1532
|
assert.equal(guard.lock_wait_ms, SCAN_LOCK_WAIT_MS);
|
|
1524
|
-
assert.equal(guard.watchdog_floor.
|
|
1525
|
-
assert.equal(guard.watchdog_floor.total_floor_fraction, SCAN_WATCHDOG_TOTAL_FLOOR_FRACTION);
|
|
1533
|
+
assert.equal(guard.watchdog_floor.initial_available_fraction, SCAN_WATCHDOG_AVAILABLE_RESERVE_FRACTION);
|
|
1526
1534
|
assert.deepEqual(guard.kill_switch, { env: "CCHISTORY_SCAN_GUARD", value: "0" });
|
|
1527
|
-
assert.deepEqual([...guard.error_codes].sort(), ["scan_guard_aborted", "scan_guard_refused"]);
|
|
1528
|
-
assert.equal(contract.cost_model.heap_ceiling.
|
|
1529
|
-
assert.equal(contract.cost_model.heap_ceiling.
|
|
1535
|
+
assert.deepEqual([...guard.error_codes].sort(), ["read_budget_exceeded", "scan_guard_aborted", "scan_guard_refused"]);
|
|
1536
|
+
assert.equal(contract.cost_model.heap_ceiling.policy, "node_default_or_explicit");
|
|
1537
|
+
assert.equal(contract.cost_model.heap_ceiling.automatic_reexec, false);
|
|
1530
1538
|
assert.equal(contract.trust_model.content_trust, "untrusted_history");
|
|
1531
1539
|
const schemaIds = contract.output_schemas.map((entry) => entry.id);
|
|
1532
1540
|
for (const id of [
|
|
@@ -1594,7 +1602,7 @@ test("Lite CLI agent contract flags match the parser in both directions", async
|
|
|
1594
1602
|
const parserFlags = [
|
|
1595
1603
|
"--source-root", "--source", "--limit-files", "--limit", "--offset", "--project", "--by",
|
|
1596
1604
|
"--format", "--out", "--dir", "--request", "--safe", "--json", "--all", "--no-dir",
|
|
1597
|
-
"--help", "--version",
|
|
1605
|
+
"--help", "--version", "--sql", "--sql-file", "--params", "--complete", "--idle-timeout",
|
|
1598
1606
|
];
|
|
1599
1607
|
assert.deepEqual([...universe].sort(), [...parserFlags].sort());
|
|
1600
1608
|
const tails = {
|
|
@@ -1626,6 +1634,10 @@ test("Lite CLI agent contract flags match the parser in both directions", async
|
|
|
1626
1634
|
case "--out": return [name, "-"];
|
|
1627
1635
|
case "--dir": return [name, repoRoot];
|
|
1628
1636
|
case "--request": return [name, "-"];
|
|
1637
|
+
case "--sql": return [name, "SELECT id FROM sessions LIMIT 1"];
|
|
1638
|
+
case "--sql-file": return [name, path.join(repoRoot, "docs/guide/queries/latest-turns.sql")];
|
|
1639
|
+
case "--params": return [name, "[]"];
|
|
1640
|
+
case "--idle-timeout": return [name, "0"];
|
|
1629
1641
|
default: return [name];
|
|
1630
1642
|
}
|
|
1631
1643
|
};
|
|
@@ -1653,7 +1665,12 @@ test("Lite CLI agent contract flags match the parser in both directions", async
|
|
|
1653
1665
|
}
|
|
1654
1666
|
const accepted = new Set([...globalFlags, ...command.flags.map((flag) => flag.name)]);
|
|
1655
1667
|
for (const flag of universe) {
|
|
1656
|
-
|
|
1668
|
+
let argv = tail.includes(flag) ? [name, ...tail] : [name, ...tail, ...flagArgs(flag)];
|
|
1669
|
+
if (name === "query" && ["--sql", "--sql-file", "--params", "--complete"].includes(flag)) {
|
|
1670
|
+
argv = [name, ...(["--sql", "--sql-file"].includes(flag) ? [] : ["--sql", "SELECT id FROM sessions LIMIT 1"]), ...flagArgs(flag)];
|
|
1671
|
+
}
|
|
1672
|
+
if (name === "ls" && flag === "--complete")
|
|
1673
|
+
argv = ["ls", "sources", "--complete"];
|
|
1657
1674
|
const code = await run(argv);
|
|
1658
1675
|
if (accepted.has(flag)) {
|
|
1659
1676
|
assert.equal(code, 0, `${name} must accept ${flag} (argv: ${argv.join(" ")})`);
|
|
@@ -1689,19 +1706,18 @@ test("Lite CLI agent skill and guide print the shipped docs", async () => {
|
|
|
1689
1706
|
const extra = captureIo(repoRoot, undefined, noScan);
|
|
1690
1707
|
assert.equal(await runLiteCli(["agent", "skill", "extra"], extra.io), 2);
|
|
1691
1708
|
});
|
|
1692
|
-
test("Lite CLI help leads with
|
|
1709
|
+
test("Lite CLI help leads with a direct scoped read and prints optional command contracts", async () => {
|
|
1693
1710
|
const captured = captureIo(repoRoot);
|
|
1694
1711
|
assert.equal(await runLiteCli(["help"], captured.io), 0);
|
|
1695
1712
|
const help = captured.stdout.join("");
|
|
1696
1713
|
const head = help.split("\n").slice(0, 20).join("\n");
|
|
1697
1714
|
assert.match(head, /cchistory-lite agent/);
|
|
1698
|
-
assert.match(head, /
|
|
1699
|
-
assert.match(head, /
|
|
1700
|
-
assert.match(head, /
|
|
1701
|
-
assert.match(head,
|
|
1702
|
-
assert.match(head, /
|
|
1703
|
-
assert.
|
|
1704
|
-
assert.match(head, /Do not discard stderr/);
|
|
1715
|
+
assert.match(head, /latest sessions 10 --dir/);
|
|
1716
|
+
assert.match(head, /sources --json/);
|
|
1717
|
+
assert.match(head, /no history scan/);
|
|
1718
|
+
assert.match(head, /first valid read/);
|
|
1719
|
+
assert.match(head, /Keep stderr/);
|
|
1720
|
+
assert.doesNotMatch(head, /sample --json/);
|
|
1705
1721
|
assert.match(help, /cchistory-lite agent \[skill\|guide\]/);
|
|
1706
1722
|
const sourcesHelp = captureIo(repoRoot);
|
|
1707
1723
|
assert.equal(await runLiteCli(["help", "sources"], sourcesHelp.io), 0);
|
|
@@ -1716,7 +1732,7 @@ test("Lite CLI help leads with the agent path and prints per-command contracts",
|
|
|
1716
1732
|
const lsHelp = captureIo(repoRoot);
|
|
1717
1733
|
assert.equal(await runLiteCli(["help", "ls"], lsHelp.io), 0);
|
|
1718
1734
|
assert.match(lsHelp.stdout.join(""), /ls sources always lists every selected adapter/);
|
|
1719
|
-
assert.match(lsHelp.stdout.join(""), /
|
|
1735
|
+
assert.match(lsHelp.stdout.join(""), /without parsing history/);
|
|
1720
1736
|
const unknownHelp = captureIo(repoRoot);
|
|
1721
1737
|
assert.equal(await runLiteCli(["help", "bogus"], unknownHelp.io), 0);
|
|
1722
1738
|
assert.match(unknownHelp.stdout.join(""), /Unknown Lite command: bogus/);
|
|
@@ -1731,8 +1747,8 @@ test("Lite CLI dead-end flags and unknown adapters teach the next command", asyn
|
|
|
1731
1747
|
const sourcesNoDir = captureIo(repoRoot, undefined, noScan);
|
|
1732
1748
|
assert.equal(await runLiteCli(["sources", "--no-dir"], sourcesNoDir.io), 2);
|
|
1733
1749
|
assert.match(sourcesNoDir.stderr.join(""), /--no-dir is not valid for sources/);
|
|
1734
|
-
assert.match(sourcesNoDir.stderr.join(""), /Drop --no-dir
|
|
1735
|
-
assert.match(sourcesNoDir.stderr.join(""), /
|
|
1750
|
+
assert.match(sourcesNoDir.stderr.join(""), /Drop --no-dir/);
|
|
1751
|
+
assert.match(sourcesNoDir.stderr.join(""), /sources --complete/);
|
|
1736
1752
|
const unknown = captureIo(repoRoot);
|
|
1737
1753
|
assert.equal(await runLiteCli(["latest", "--source", "claude"], unknown.io), 1);
|
|
1738
1754
|
assert.match(unknown.stderr.join(""), /Unknown Lite source adapter: claude/);
|