@cchistory/lite 0.4.2
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 +13 -0
- package/LICENSE +21 -0
- package/README.md +16 -0
- package/apps/lite-cli/dist/bin.d.ts +3 -0
- package/apps/lite-cli/dist/bin.d.ts.map +1 -0
- package/apps/lite-cli/dist/bin.js +7 -0
- package/apps/lite-cli/dist/bin.js.map +1 -0
- package/apps/lite-cli/dist/index.d.ts +21 -0
- package/apps/lite-cli/dist/index.d.ts.map +1 -0
- package/apps/lite-cli/dist/index.js +1812 -0
- package/apps/lite-cli/dist/index.js.map +1 -0
- package/apps/lite-cli/dist/index.test.d.ts +2 -0
- package/apps/lite-cli/dist/index.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/index.test.js +1290 -0
- package/apps/lite-cli/dist/index.test.js.map +1 -0
- package/apps/lite-cli/dist/json-v2.d.ts +17 -0
- package/apps/lite-cli/dist/json-v2.d.ts.map +1 -0
- package/apps/lite-cli/dist/json-v2.js +352 -0
- package/apps/lite-cli/dist/json-v2.js.map +1 -0
- package/apps/lite-cli/dist/query.d.ts +50 -0
- package/apps/lite-cli/dist/query.d.ts.map +1 -0
- package/apps/lite-cli/dist/query.js +297 -0
- package/apps/lite-cli/dist/query.js.map +1 -0
- package/apps/lite-cli/dist/shell.d.ts +18 -0
- package/apps/lite-cli/dist/shell.d.ts.map +1 -0
- package/apps/lite-cli/dist/shell.js +276 -0
- package/apps/lite-cli/dist/shell.js.map +1 -0
- package/apps/lite-tui/dist/bin.d.ts +3 -0
- package/apps/lite-tui/dist/bin.d.ts.map +1 -0
- package/apps/lite-tui/dist/bin.js +7 -0
- package/apps/lite-tui/dist/bin.js.map +1 -0
- package/apps/lite-tui/dist/colors.d.ts +49 -0
- package/apps/lite-tui/dist/colors.d.ts.map +1 -0
- package/apps/lite-tui/dist/colors.js +70 -0
- package/apps/lite-tui/dist/colors.js.map +1 -0
- package/apps/lite-tui/dist/index.d.ts +23 -0
- package/apps/lite-tui/dist/index.d.ts.map +1 -0
- package/apps/lite-tui/dist/index.js +519 -0
- package/apps/lite-tui/dist/index.js.map +1 -0
- package/apps/lite-tui/dist/index.test.d.ts +2 -0
- package/apps/lite-tui/dist/index.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/index.test.js +487 -0
- package/apps/lite-tui/dist/index.test.js.map +1 -0
- package/apps/lite-tui/dist/input.d.ts +23 -0
- package/apps/lite-tui/dist/input.d.ts.map +1 -0
- package/apps/lite-tui/dist/input.js +98 -0
- package/apps/lite-tui/dist/input.js.map +1 -0
- package/apps/lite-tui/dist/keys.d.ts +32 -0
- package/apps/lite-tui/dist/keys.d.ts.map +1 -0
- package/apps/lite-tui/dist/keys.js +136 -0
- package/apps/lite-tui/dist/keys.js.map +1 -0
- package/apps/lite-tui/dist/keys.test.d.ts +2 -0
- package/apps/lite-tui/dist/keys.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/keys.test.js +67 -0
- package/apps/lite-tui/dist/keys.test.js.map +1 -0
- package/apps/lite-tui/dist/model.d.ts +88 -0
- package/apps/lite-tui/dist/model.d.ts.map +1 -0
- package/apps/lite-tui/dist/model.js +146 -0
- package/apps/lite-tui/dist/model.js.map +1 -0
- package/apps/lite-tui/dist/render.d.ts +46 -0
- package/apps/lite-tui/dist/render.d.ts.map +1 -0
- package/apps/lite-tui/dist/render.js +706 -0
- package/apps/lite-tui/dist/render.js.map +1 -0
- package/apps/lite-tui/dist/render.test.d.ts +2 -0
- package/apps/lite-tui/dist/render.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/render.test.js +594 -0
- package/apps/lite-tui/dist/render.test.js.map +1 -0
- package/apps/lite-tui/dist/state.d.ts +127 -0
- package/apps/lite-tui/dist/state.d.ts.map +1 -0
- package/apps/lite-tui/dist/state.js +391 -0
- package/apps/lite-tui/dist/state.js.map +1 -0
- package/apps/lite-tui/dist/state.test.d.ts +2 -0
- package/apps/lite-tui/dist/state.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/state.test.js +331 -0
- package/apps/lite-tui/dist/state.test.js.map +1 -0
- package/apps/lite-tui/dist/text.d.ts +38 -0
- package/apps/lite-tui/dist/text.d.ts.map +1 -0
- package/apps/lite-tui/dist/text.js +246 -0
- package/apps/lite-tui/dist/text.js.map +1 -0
- package/apps/lite-tui/dist/version.d.ts +10 -0
- package/apps/lite-tui/dist/version.d.ts.map +1 -0
- package/apps/lite-tui/dist/version.js +10 -0
- package/apps/lite-tui/dist/version.js.map +1 -0
- package/apps/lite-tui/dist/view-model.d.ts +26 -0
- package/apps/lite-tui/dist/view-model.d.ts.map +1 -0
- package/apps/lite-tui/dist/view-model.js +87 -0
- package/apps/lite-tui/dist/view-model.js.map +1 -0
- package/bin/cchistory-lite +3 -0
- package/bin/cchistory-lite-tui +3 -0
- package/bin/cchistory-lite-tui.cmd +3 -0
- package/bin/cchistory-lite-tui.mjs +7 -0
- package/bin/cchistory-lite.cmd +3 -0
- package/bin/cchistory-lite.mjs +11 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts +33 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.js +95 -0
- package/node_modules/@cchistory/canonical/dist/directory-scope.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/fallback-projects.d.ts +14 -0
- package/node_modules/@cchistory/canonical/dist/fallback-projects.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/fallback-projects.js +120 -0
- package/node_modules/@cchistory/canonical/dist/fallback-projects.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/index.d.ts +12 -0
- package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/index.js +12 -0
- package/node_modules/@cchistory/canonical/dist/index.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/index.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/index.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/index.test.js +901 -0
- package/node_modules/@cchistory/canonical/dist/index.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/project-linker.d.ts +30 -0
- package/node_modules/@cchistory/canonical/dist/project-linker.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/project-linker.js +720 -0
- package/node_modules/@cchistory/canonical/dist/project-linker.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts +23 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.js +192 -0
- package/node_modules/@cchistory/canonical/dist/projection-audit.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/read-order.d.ts +19 -0
- package/node_modules/@cchistory/canonical/dist/read-order.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/read-order.js +73 -0
- package/node_modules/@cchistory/canonical/dist/read-order.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/related-work.d.ts +4 -0
- package/node_modules/@cchistory/canonical/dist/related-work.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/related-work.js +232 -0
- package/node_modules/@cchistory/canonical/dist/related-work.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.d.ts +10 -0
- package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.js +34 -0
- package/node_modules/@cchistory/canonical/dist/runtime-warning-filter.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/search.d.ts +69 -0
- package/node_modules/@cchistory/canonical/dist/search.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/search.js +337 -0
- package/node_modules/@cchistory/canonical/dist/search.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-collections.d.ts +8 -0
- package/node_modules/@cchistory/canonical/dist/session-collections.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-collections.js +21 -0
- package/node_modules/@cchistory/canonical/dist/session-collections.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.d.ts +23 -0
- package/node_modules/@cchistory/canonical/dist/session-family.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.js +808 -0
- package/node_modules/@cchistory/canonical/dist/session-family.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/session-family.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/session-family.test.js +650 -0
- package/node_modules/@cchistory/canonical/dist/session-family.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts +79 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.js +232 -0
- package/node_modules/@cchistory/canonical/dist/usage.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/utils.d.ts +5 -0
- package/node_modules/@cchistory/canonical/dist/utils.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/utils.js +18 -0
- package/node_modules/@cchistory/canonical/dist/utils.js.map +1 -0
- package/node_modules/@cchistory/canonical/package.json +14 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts +943 -0
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.js +238 -0
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.test.d.ts +2 -0
- package/node_modules/@cchistory/domain/dist/index.test.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/index.test.js +423 -0
- package/node_modules/@cchistory/domain/dist/index.test.js.map +1 -0
- package/node_modules/@cchistory/domain/package.json +14 -0
- package/node_modules/@cchistory/live-runtime/dist/async-pool.d.ts +3 -0
- package/node_modules/@cchistory/live-runtime/dist/async-pool.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/async-pool.js +19 -0
- package/node_modules/@cchistory/live-runtime/dist/async-pool.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts +3 -0
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.js +22 -0
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +149 -0
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.js +1180 -0
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/index.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +1819 -0
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts +5 -0
- package/node_modules/@cchistory/live-runtime/dist/node-memory.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/node-memory.js +83 -0
- package/node_modules/@cchistory/live-runtime/dist/node-memory.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/package.json +18 -0
- package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.js +115 -0
- package/node_modules/@cchistory/source-adapters/dist/core/antigravity-logic.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.js +223 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user-registry.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.js +318 -0
- package/node_modules/@cchistory/source-adapters/dist/core/ask-user.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.d.ts +11 -0
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js +206 -0
- package/node_modules/@cchistory/source-adapters/dist/core/atomizer.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts +62 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js +224 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.d.ts +15 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.js +96 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.js +97 -0
- package/node_modules/@cchistory/source-adapters/dist/core/directory-preview.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts +11 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js +412 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js +552 -0
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts +10 -0
- package/node_modules/@cchistory/source-adapters/dist/core/factories.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/factories.js +83 -0
- package/node_modules/@cchistory/source-adapters/dist/core/factories.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts +5 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.js +86 -0
- package/node_modules/@cchistory/source-adapters/dist/core/git-project.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts +31 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js +216 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js +367 -0
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/legacy.d.ts +10 -0
- package/node_modules/@cchistory/source-adapters/dist/core/legacy.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/legacy.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/core/legacy.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +70 -0
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +1389 -0
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.d.ts +15 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.js +76 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.js +33 -0
- package/node_modules/@cchistory/source-adapters/dist/core/path-utils.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts +24 -0
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js +1829 -0
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts +39 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.js +873 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js +165 -0
- package/node_modules/@cchistory/source-adapters/dist/core/projections.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js +87 -0
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping-worker.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts +29 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js +455 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js +357 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts +25 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js +144 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts +14 -0
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js +247 -0
- package/node_modules/@cchistory/source-adapters/dist/core/token-usage.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js +323 -0
- package/node_modules/@cchistory/source-adapters/dist/core/tokens.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts +26 -0
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js +80 -0
- package/node_modules/@cchistory/source-adapters/dist/core/type-guards.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts +226 -0
- package/node_modules/@cchistory/source-adapters/dist/core/types.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/types.js +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/types.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts +29 -0
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.js +327 -0
- package/node_modules/@cchistory/source-adapters/dist/core/user-text.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.d.ts +11 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.js +19 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js +289 -0
- package/node_modules/@cchistory/source-adapters/dist/core/utils.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts +43 -0
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js +520 -0
- package/node_modules/@cchistory/source-adapters/dist/core/vscode-state.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts +13 -0
- package/node_modules/@cchistory/source-adapters/dist/index.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/index.js +8 -0
- package/node_modules/@cchistory/source-adapters/dist/index.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +31 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js +31 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/masks.d.ts +31 -0
- package/node_modules/@cchistory/source-adapters/dist/masks.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/masks.js +342 -0
- package/node_modules/@cchistory/source-adapters/dist/masks.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.d.ts +31 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.js +161 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.js +107 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js +202 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/accio.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.js +85 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js +105 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/amp.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts +45 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js +609 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/live.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.d.ts +16 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.js +534 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts +12 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js +105 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js +820 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js +130 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js +357 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.js +27 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js +49 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codebuddy.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js +555 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.js +15 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js +893 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts +70 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js +786 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.js +14 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +154 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.js +151 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js +1486 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.js +229 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js +222 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/factory-droid.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.d.ts +7 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.js +65 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js +220 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/gemini.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts +20 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js +365 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.d.ts +17 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.js +498 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts +36 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js +261 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js +565 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/grok.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.js +193 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.d.ts +7 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.js +55 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js +163 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/kimi.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.js +10 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js +179 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/lobechat.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.js +44 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.js +60 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js +39 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/openclaw.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js +45 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js +170 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts +7 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js +52 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.d.ts +104 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.js +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/runtime-types.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts +38 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js +19 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts +14 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js +283 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.js +26 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js +411 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/zcode.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/test-helpers.d.ts +85 -0
- package/node_modules/@cchistory/source-adapters/dist/test-helpers.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/test-helpers.js +2106 -0
- package/node_modules/@cchistory/source-adapters/dist/test-helpers.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/package.json +14 -0
- package/package.json +38 -0
- package/schemas/cchistory-lite-canonical-v1.schema.json +13 -0
- package/schemas/cchistory-lite-error-v1.schema.json +30 -0
- package/schemas/cchistory-lite-query-result-v1.schema.json +29 -0
- package/schemas/cchistory-lite-query-result-v2.schema.json +29 -0
- package/schemas/cchistory-lite-query-v1.schema.json +62 -0
- package/schemas/cchistory-lite-query-v2.schema.json +82 -0
- package/schemas/cchistory-lite-v2.schema.json +176 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import test from "node:test";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { LiveHistorySnapshot, scanLiteHistory } from "@cchistory/live-runtime";
|
|
6
|
+
import { configureColorPolicy, stripAnsi } from "./colors.js";
|
|
7
|
+
import { LiteBrowserModel } from "./model.js";
|
|
8
|
+
import { BANNER_SUBTITLE, BANNER_TITLE, renderLiteFrame, renderScrollablePane } from "./render.js";
|
|
9
|
+
import { createLiteBrowserState, getVisibleTurns, reduceLiteBrowserState, } from "./state.js";
|
|
10
|
+
import { clipLine, displayWidth, padLine, wrapText } from "./text.js";
|
|
11
|
+
import { buildSessionDisplayLabels, buildTurnDisplayGroups } from "./view-model.js";
|
|
12
|
+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
13
|
+
const codexRoot = path.join(repoRoot, "mock_data", ".codex", "sessions");
|
|
14
|
+
const claudeRoot = path.join(repoRoot, "mock_data", ".claude", "projects");
|
|
15
|
+
const codeBuddyRoot = path.join(repoRoot, "mock_data", ".codebuddy");
|
|
16
|
+
const openclawRoot = path.join(repoRoot, "mock_data", ".openclaw", "agents");
|
|
17
|
+
const fixtureRoots = {
|
|
18
|
+
codex: ".codex/sessions",
|
|
19
|
+
claude_code: ".claude/projects",
|
|
20
|
+
factory_droid: ".factory/sessions",
|
|
21
|
+
amp: ".local/share/amp/threads",
|
|
22
|
+
cursor: ".cursor/chats",
|
|
23
|
+
antigravity: ".gemini/antigravity/brain",
|
|
24
|
+
gemini: ".gemini",
|
|
25
|
+
openclaw: ".openclaw/agents",
|
|
26
|
+
opencode: ".local/share/opencode/storage",
|
|
27
|
+
codebuddy: ".codebuddy",
|
|
28
|
+
accio: "fixtures/accio-multi-agent/agents",
|
|
29
|
+
cursor_agent: "fixtures/cursor-agent",
|
|
30
|
+
grok: "fixtures/grok-cli",
|
|
31
|
+
};
|
|
32
|
+
const FIXED_NOW = Date.UTC(2026, 6, 27, 12, 0, 0);
|
|
33
|
+
configureColorPolicy({ color: false });
|
|
34
|
+
async function buildModel(baseDir = codexRoot, sourceRef = "codex") {
|
|
35
|
+
const snapshot = await scanLiteHistory({
|
|
36
|
+
homeDir: repoRoot,
|
|
37
|
+
hostname: "cchistory-lite-tui-render-test-host",
|
|
38
|
+
sourceRoots: [{ sourceRef, baseDir }],
|
|
39
|
+
sourceRefs: [sourceRef],
|
|
40
|
+
safeMode: true,
|
|
41
|
+
contextMode: "none",
|
|
42
|
+
});
|
|
43
|
+
return new LiteBrowserModel(snapshot);
|
|
44
|
+
}
|
|
45
|
+
async function buildFullModel() {
|
|
46
|
+
const snapshot = await scanLiteHistory({
|
|
47
|
+
homeDir: repoRoot,
|
|
48
|
+
hostname: "cchistory-lite-tui-render-context-host",
|
|
49
|
+
sourceRoots: [{ sourceRef: "codex", baseDir: codexRoot }],
|
|
50
|
+
sourceRefs: ["codex"],
|
|
51
|
+
safeMode: true,
|
|
52
|
+
contextMode: "full",
|
|
53
|
+
});
|
|
54
|
+
return new LiteBrowserModel(snapshot);
|
|
55
|
+
}
|
|
56
|
+
async function buildMultiSourceModel() {
|
|
57
|
+
const snapshot = await scanLiteHistory({
|
|
58
|
+
homeDir: repoRoot,
|
|
59
|
+
hostname: "cchistory-lite-tui-render-multi-source-host",
|
|
60
|
+
sourceRoots: [
|
|
61
|
+
{ sourceRef: "codex", baseDir: codexRoot },
|
|
62
|
+
{ sourceRef: "codebuddy", baseDir: codeBuddyRoot },
|
|
63
|
+
],
|
|
64
|
+
sourceRefs: ["codex", "codebuddy"],
|
|
65
|
+
safeMode: true,
|
|
66
|
+
contextMode: "none",
|
|
67
|
+
});
|
|
68
|
+
return new LiteBrowserModel(snapshot);
|
|
69
|
+
}
|
|
70
|
+
async function buildFixtureMatrixModel() {
|
|
71
|
+
const snapshot = await scanLiteHistory({
|
|
72
|
+
homeDir: repoRoot,
|
|
73
|
+
hostname: "cchistory-lite-tui-render-fixture-matrix-host",
|
|
74
|
+
sourceRoots: Object.entries(fixtureRoots).map(([sourceRef, relativePath]) => ({
|
|
75
|
+
sourceRef,
|
|
76
|
+
baseDir: path.join(repoRoot, "mock_data", relativePath),
|
|
77
|
+
})),
|
|
78
|
+
sourceRefs: Object.keys(fixtureRoots),
|
|
79
|
+
safeMode: true,
|
|
80
|
+
contextMode: "none",
|
|
81
|
+
});
|
|
82
|
+
return new LiteBrowserModel(snapshot);
|
|
83
|
+
}
|
|
84
|
+
function buildInterleavedModel(base) {
|
|
85
|
+
const source = base.snapshot.data.sources[0];
|
|
86
|
+
const projectTemplate = base.snapshot.data.projects[0];
|
|
87
|
+
const sessionTemplate = base.snapshot.data.sessions[0];
|
|
88
|
+
const turnTemplates = base.snapshot.data.turns.slice(0, 4);
|
|
89
|
+
const project = {
|
|
90
|
+
...projectTemplate,
|
|
91
|
+
project_id: "project:interleaved",
|
|
92
|
+
project_revision_id: "project:interleaved:r1",
|
|
93
|
+
display_name: "Interleaved project",
|
|
94
|
+
slug: "interleaved-project",
|
|
95
|
+
committed_turn_count: 4,
|
|
96
|
+
candidate_turn_count: 0,
|
|
97
|
+
session_count: 2,
|
|
98
|
+
project_last_activity_at: "2026-01-04T00:00:00.000Z",
|
|
99
|
+
updated_at: "2026-01-04T00:00:00.000Z",
|
|
100
|
+
};
|
|
101
|
+
const sessions = [
|
|
102
|
+
{
|
|
103
|
+
...sessionTemplate,
|
|
104
|
+
id: "sess:codex:interleaved-alpha",
|
|
105
|
+
source_session_id: "interleaved-alpha",
|
|
106
|
+
title: "Alpha session",
|
|
107
|
+
created_at: "2026-01-01T00:00:00.000Z",
|
|
108
|
+
updated_at: "2026-01-04T00:00:00.000Z",
|
|
109
|
+
turn_count: 2,
|
|
110
|
+
primary_project_id: project.project_id,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
...sessionTemplate,
|
|
114
|
+
id: "sess:codex:interleaved-beta",
|
|
115
|
+
source_session_id: "interleaved-beta",
|
|
116
|
+
title: "Beta session",
|
|
117
|
+
created_at: "2026-01-01T00:00:00.000Z",
|
|
118
|
+
updated_at: "2026-01-03T00:00:00.000Z",
|
|
119
|
+
turn_count: 2,
|
|
120
|
+
primary_project_id: project.project_id,
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
const turnSpecs = [
|
|
124
|
+
[0, sessions[0], "2026-01-04T00:00:00.000Z", "Alpha first ask"],
|
|
125
|
+
[1, sessions[1], "2026-01-03T00:00:00.000Z", "Beta first ask"],
|
|
126
|
+
[2, sessions[0], "2026-01-02T00:00:00.000Z", "Alpha second ask"],
|
|
127
|
+
[3, sessions[1], "2026-01-01T00:00:00.000Z", "Beta second ask"],
|
|
128
|
+
];
|
|
129
|
+
const turns = turnSpecs.map(([templateIndex, session, timestamp, prompt], index) => {
|
|
130
|
+
const template = turnTemplates[templateIndex];
|
|
131
|
+
return {
|
|
132
|
+
...template,
|
|
133
|
+
id: `turn:interleaved:${index}`,
|
|
134
|
+
revision_id: `turn:interleaved:${index}:r1`,
|
|
135
|
+
turn_id: `turn:interleaved:${index}`,
|
|
136
|
+
turn_revision_id: `turn:interleaved:${index}:r1`,
|
|
137
|
+
raw_text: prompt,
|
|
138
|
+
canonical_text: prompt,
|
|
139
|
+
created_at: timestamp,
|
|
140
|
+
submission_started_at: timestamp,
|
|
141
|
+
last_context_activity_at: timestamp,
|
|
142
|
+
session_id: session.id,
|
|
143
|
+
source_id: source.id,
|
|
144
|
+
project_id: project.project_id,
|
|
145
|
+
project_ref: project.slug,
|
|
146
|
+
link_state: "committed",
|
|
147
|
+
project_link_state: "committed",
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
const snapshot = new LiveHistorySnapshot({
|
|
151
|
+
...base.snapshot.data,
|
|
152
|
+
sources: [source],
|
|
153
|
+
projects: [project],
|
|
154
|
+
sessions,
|
|
155
|
+
turns,
|
|
156
|
+
contexts: [],
|
|
157
|
+
related_work: [],
|
|
158
|
+
ask_user_question_turns: [],
|
|
159
|
+
loss_audits: [],
|
|
160
|
+
});
|
|
161
|
+
return new LiteBrowserModel(snapshot);
|
|
162
|
+
}
|
|
163
|
+
function apply(model, state, ...actions) {
|
|
164
|
+
return actions.reduce((current, action) => reduceLiteBrowserState(model, current, action), state);
|
|
165
|
+
}
|
|
166
|
+
function frame(model, state, width = 110, height = 34) {
|
|
167
|
+
return renderLiteFrame(model, state, { width, height, now: FIXED_NOW });
|
|
168
|
+
}
|
|
169
|
+
test("scrollable pane reaches the last row at the bottom of the scroll range", () => {
|
|
170
|
+
// viewport = maxLines - 1. With more rows than fit, scrolling to the bottom
|
|
171
|
+
// (Number.MAX_SAFE_INTEGER is the established jump-to-last sentinel) must show
|
|
172
|
+
// the final row rather than hiding it behind a phantom "more below" line.
|
|
173
|
+
const rows = Array.from({ length: 15 }, (_, index) => `row${index}`);
|
|
174
|
+
const bottom = renderScrollablePane(rows, "TITLE", 10, Number.MAX_SAFE_INTEGER);
|
|
175
|
+
assert.equal(bottom.length, 10, "pane is exactly maxLines tall");
|
|
176
|
+
assert.ok(bottom.some((line) => line.includes("row14")), "last row is reachable at the bottom");
|
|
177
|
+
assert.ok(!bottom.some((line) => line.includes("↓")), "no phantom below-indicator at the bottom");
|
|
178
|
+
// A middle offset still shows both indicators and a contiguous run of rows.
|
|
179
|
+
const middle = renderScrollablePane(rows, "TITLE", 10, 3);
|
|
180
|
+
assert.ok(middle.some((line) => line.includes("↑")), "above-indicator shown mid-scroll");
|
|
181
|
+
assert.ok(middle.some((line) => line.includes("↓")), "below-indicator shown mid-scroll");
|
|
182
|
+
assert.ok(!middle.some((line) => line.includes("row0")), "scrolled past the first row");
|
|
183
|
+
});
|
|
184
|
+
test("a frame is exactly the requested height and never exceeds the width", async () => {
|
|
185
|
+
const model = await buildModel();
|
|
186
|
+
const state = createLiteBrowserState(model);
|
|
187
|
+
for (const [width, height] of [
|
|
188
|
+
[80, 24],
|
|
189
|
+
[110, 34],
|
|
190
|
+
[200, 60],
|
|
191
|
+
[46, 14],
|
|
192
|
+
]) {
|
|
193
|
+
const lines = frame(model, state, width, height).split("\n");
|
|
194
|
+
assert.equal(lines.length, height, `height ${height}`);
|
|
195
|
+
for (const line of lines) {
|
|
196
|
+
assert.ok(displayWidth(line) <= width, `line exceeded ${width} columns: ${JSON.stringify(line)}`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
test("every view keeps the frame geometry stable", async () => {
|
|
201
|
+
const model = await buildModel();
|
|
202
|
+
const base = createLiteBrowserState(model);
|
|
203
|
+
const views = [
|
|
204
|
+
["browse", base],
|
|
205
|
+
["turns", apply(model, base, { type: "focus-turns" })],
|
|
206
|
+
["detail", apply(model, base, { type: "focus-detail" })],
|
|
207
|
+
["conversation", apply(model, base, { type: "drill" }, { type: "drill" }, { type: "drill" })],
|
|
208
|
+
["search", apply(model, base, { type: "open-search", query: "mock" })],
|
|
209
|
+
["help", apply(model, base, { type: "toggle-help" })],
|
|
210
|
+
["stats", apply(model, base, { type: "toggle-stats" })],
|
|
211
|
+
["sources", apply(model, base, { type: "toggle-sources" })],
|
|
212
|
+
];
|
|
213
|
+
for (const [label, state] of views) {
|
|
214
|
+
const lines = frame(model, state, 100, 30).split("\n");
|
|
215
|
+
assert.equal(lines.length, 30, `${label} view height`);
|
|
216
|
+
for (const line of lines) {
|
|
217
|
+
assert.ok(displayWidth(line) <= 100, `${label} view overflowed: ${JSON.stringify(line)}`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
test("the banner lines release verifiers grep for are byte-identical", async () => {
|
|
222
|
+
const model = await buildModel();
|
|
223
|
+
const lines = frame(model, createLiteBrowserState(model)).split("\n");
|
|
224
|
+
assert.equal(lines[0], BANNER_TITLE);
|
|
225
|
+
assert.equal(lines[1], BANNER_SUBTITLE);
|
|
226
|
+
assert.equal(BANNER_TITLE, "CC History Lite TUI 0.4.2");
|
|
227
|
+
assert.equal(BANNER_SUBTITLE, "Ephemeral live snapshot · single machine · no Full store");
|
|
228
|
+
});
|
|
229
|
+
test("browse shows both panes, the counts line, and the status bar", async () => {
|
|
230
|
+
const model = await buildModel();
|
|
231
|
+
const output = frame(model, createLiteBrowserState(model));
|
|
232
|
+
assert.match(output, /Projects/);
|
|
233
|
+
assert.match(output, /Turns/);
|
|
234
|
+
assert.match(output, /Detail/);
|
|
235
|
+
assert.match(output, /\d+ sources · \d+ projects · \d+ sessions · \d+ turns/);
|
|
236
|
+
assert.match(output, /\? help/);
|
|
237
|
+
assert.match(output, /q quit/);
|
|
238
|
+
});
|
|
239
|
+
test("the focused pane is marked and the selected row carries a cursor", async () => {
|
|
240
|
+
const model = await buildModel();
|
|
241
|
+
const projects = frame(model, createLiteBrowserState(model));
|
|
242
|
+
assert.match(projects, /▸ Projects/);
|
|
243
|
+
assert.match(projects, /❯ /);
|
|
244
|
+
const turns = frame(model, apply(model, createLiteBrowserState(model), { type: "focus-turns" }));
|
|
245
|
+
assert.match(turns, /▸ Turns/);
|
|
246
|
+
assert.doesNotMatch(turns, /▸ Projects/);
|
|
247
|
+
});
|
|
248
|
+
test("moving the cursor moves the marker to the next project", async () => {
|
|
249
|
+
const model = await buildModel();
|
|
250
|
+
const first = frame(model, createLiteBrowserState(model)).split("\n");
|
|
251
|
+
const second = frame(model, apply(model, createLiteBrowserState(model), { type: "move-down" })).split("\n");
|
|
252
|
+
const cursorRow = (lines) => lines.findIndex((line) => line.includes("❯"));
|
|
253
|
+
assert.ok(cursorRow(first) >= 0);
|
|
254
|
+
assert.equal(cursorRow(second), cursorRow(first) + 1);
|
|
255
|
+
});
|
|
256
|
+
test("search mode renders the query line and groups matches by project", async () => {
|
|
257
|
+
const model = await buildModel();
|
|
258
|
+
const state = apply(model, createLiteBrowserState(model), { type: "open-search", query: "mock" });
|
|
259
|
+
const output = frame(model, state);
|
|
260
|
+
assert.match(output, /\/ mock/);
|
|
261
|
+
assert.match(output, /search "mock"/);
|
|
262
|
+
assert.match(output, /\d+ matches/);
|
|
263
|
+
});
|
|
264
|
+
test("an uncommitted short query prompts for Enter rather than searching", async () => {
|
|
265
|
+
const model = await buildModel();
|
|
266
|
+
let state = apply(model, createLiteBrowserState(model), { type: "enter-search-mode" });
|
|
267
|
+
state = apply(model, state, { type: "append-search-char", value: "m" });
|
|
268
|
+
assert.match(frame(model, state), /Press Enter to search/);
|
|
269
|
+
});
|
|
270
|
+
test("the help overlay documents the Full-TUI-compatible keymap", async () => {
|
|
271
|
+
const model = await buildModel();
|
|
272
|
+
const output = frame(model, apply(model, createLiteBrowserState(model), { type: "toggle-help" }));
|
|
273
|
+
for (const fragment of ["Navigation", "Panes", "Actions", "j/k", "PgUp/PgDn", "Enter", "Esc", "refresh"]) {
|
|
274
|
+
assert.ok(output.includes(fragment), `help overlay missing ${fragment}`);
|
|
275
|
+
}
|
|
276
|
+
assert.match(output, /Never opens or creates ~\/\.cchistory/);
|
|
277
|
+
});
|
|
278
|
+
test("the stats overlay shows the overview and the selected rollup dimension", async () => {
|
|
279
|
+
const model = await buildModel();
|
|
280
|
+
let state = apply(model, createLiteBrowserState(model), { type: "toggle-stats" });
|
|
281
|
+
assert.match(frame(model, state), /Statistics/);
|
|
282
|
+
assert.match(frame(model, state), /By source/);
|
|
283
|
+
state = apply(model, state, { type: "cycle-stats-dimension" });
|
|
284
|
+
assert.match(frame(model, state), /By project/);
|
|
285
|
+
});
|
|
286
|
+
test("the sources overlay reports health counts and adapter roots", async () => {
|
|
287
|
+
const model = await buildModel();
|
|
288
|
+
const output = frame(model, apply(model, createLiteBrowserState(model), { type: "toggle-sources" }));
|
|
289
|
+
assert.match(output, /Sources/);
|
|
290
|
+
assert.match(output, /Healthy: \d+/);
|
|
291
|
+
assert.match(output, /Stale: \d+/);
|
|
292
|
+
assert.match(output, /Error: \d+/);
|
|
293
|
+
assert.ok(output.includes(".codex"), "expected the adapter base dir");
|
|
294
|
+
});
|
|
295
|
+
test("the detail pane surfaces canonical turn identity and the prompt", async () => {
|
|
296
|
+
const model = await buildModel();
|
|
297
|
+
const output = frame(model, apply(model, createLiteBrowserState(model), { type: "focus-detail" }));
|
|
298
|
+
assert.match(output, /Ask 1\/\d+ in /);
|
|
299
|
+
assert.match(output, /Model:/);
|
|
300
|
+
assert.match(output, /Turn:/);
|
|
301
|
+
assert.match(output, /Prompt:/);
|
|
302
|
+
});
|
|
303
|
+
test("the browser preserves canonical session order without a surface-specific sort", async () => {
|
|
304
|
+
const model = await buildModel();
|
|
305
|
+
assert.deepEqual(model.sessions.map((entry) => entry.session.id), model.snapshot.listTopLevelSessions().map((session) => session.id));
|
|
306
|
+
});
|
|
307
|
+
test("resumable session detail shows one complete green command without a duplicate workspace", async () => {
|
|
308
|
+
const model = await buildModel();
|
|
309
|
+
const resumable = model.sessions.find((entry) => entry.session.resume_command);
|
|
310
|
+
assert.ok(resumable?.session.resume_command);
|
|
311
|
+
const state = apply(model, createLiteBrowserState(model), { type: "open-session-ref", ref: resumable.session.id }, { type: "focus-detail" });
|
|
312
|
+
const previousForceColor = process.env.FORCE_COLOR;
|
|
313
|
+
process.env.FORCE_COLOR = "1";
|
|
314
|
+
configureColorPolicy({ color: true });
|
|
315
|
+
try {
|
|
316
|
+
const output = frame(model, state, 150, 46);
|
|
317
|
+
const plain = stripAnsi(output).replace(/\s+/gu, " ");
|
|
318
|
+
assert.ok(plain.includes(resumable.session.resume_command));
|
|
319
|
+
assert.doesNotMatch(plain, /Workspace:/);
|
|
320
|
+
assert.match(output, /\u001b\[32mcd /u);
|
|
321
|
+
}
|
|
322
|
+
finally {
|
|
323
|
+
if (previousForceColor === undefined)
|
|
324
|
+
delete process.env.FORCE_COLOR;
|
|
325
|
+
else
|
|
326
|
+
process.env.FORCE_COLOR = previousForceColor;
|
|
327
|
+
configureColorPolicy({ color: false });
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
test("turn headers keep the full visible session count when sessions interleave", async () => {
|
|
331
|
+
const model = buildInterleavedModel(await buildModel());
|
|
332
|
+
const state = apply(model, createLiteBrowserState(model), { type: "focus-turns" });
|
|
333
|
+
const groups = buildTurnDisplayGroups(getVisibleTurns(model, state));
|
|
334
|
+
assert.deepEqual(groups.map((group) => [group.title, group.visibleTurnCount, group.turnIndices]), [
|
|
335
|
+
["Alpha session", 2, [0]],
|
|
336
|
+
["Beta session", 2, [1]],
|
|
337
|
+
["Alpha session", 2, [2]],
|
|
338
|
+
["Beta session", 2, [3]],
|
|
339
|
+
]);
|
|
340
|
+
const output = frame(model, state, 130, 40);
|
|
341
|
+
assert.equal((output.match(/Session: Alpha session/g) ?? []).length, 2);
|
|
342
|
+
assert.equal((output.match(/Session: Beta session/g) ?? []).length, 2);
|
|
343
|
+
assert.match(output, /Session: Alpha session 2a/);
|
|
344
|
+
assert.match(output, /Session: Beta session 2a/);
|
|
345
|
+
for (const prompt of ["Alpha first ask", "Beta first ask", "Alpha second ask", "Beta second ask"]) {
|
|
346
|
+
assert.match(output, new RegExp(prompt));
|
|
347
|
+
}
|
|
348
|
+
const searchState = apply(model, createLiteBrowserState(model), { type: "open-search", query: "ask" });
|
|
349
|
+
const searchOutput = frame(model, searchState, 130, 40);
|
|
350
|
+
assert.match(searchOutput, /Session: Alpha session 2a/);
|
|
351
|
+
assert.match(searchOutput, /Session: Beta session 2a/);
|
|
352
|
+
});
|
|
353
|
+
test("the sessions scope disambiguates duplicate session titles with stable native refs", async () => {
|
|
354
|
+
const model = await buildModel(claudeRoot, "claude_code");
|
|
355
|
+
const byTitle = new Map();
|
|
356
|
+
for (const entry of model.sessions) {
|
|
357
|
+
const title = entry.session.title ?? entry.session.source_session_id ?? entry.session.id;
|
|
358
|
+
const group = byTitle.get(title);
|
|
359
|
+
if (group)
|
|
360
|
+
group.push(entry);
|
|
361
|
+
else
|
|
362
|
+
byTitle.set(title, [entry]);
|
|
363
|
+
}
|
|
364
|
+
const duplicate = [...byTitle.values()].find((group) => group.length > 1);
|
|
365
|
+
assert.ok(duplicate, "fixture must contain duplicate session titles");
|
|
366
|
+
const labels = buildSessionDisplayLabels(duplicate.map((entry) => entry.session));
|
|
367
|
+
assert.equal(new Set(duplicate.map((entry) => labels.get(entry.session.id))).size, duplicate.length);
|
|
368
|
+
const state = apply(model, createLiteBrowserState(model), { type: "set-browse-scope", scope: "sessions" });
|
|
369
|
+
const output = frame(model, state, 130, 40);
|
|
370
|
+
for (const entry of duplicate) {
|
|
371
|
+
const nativeRef = entry.session.source_session_id ?? entry.session.id;
|
|
372
|
+
assert.ok(output.includes(nativeRef.slice(0, 8)), `missing stable ref for ${entry.session.id}`);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
test("session detail resolves the project from the selected turn", async () => {
|
|
376
|
+
const model = await buildMultiSourceModel();
|
|
377
|
+
const selectedProject = model.projects[0];
|
|
378
|
+
assert.ok(selectedProject);
|
|
379
|
+
const targetIndex = model.sessions.findIndex((entry) => entry.turns.some((turn) => turn.turn.project_id && turn.turn.project_id !== selectedProject.key));
|
|
380
|
+
assert.ok(targetIndex >= 0, "fixture must contain a session from another project");
|
|
381
|
+
const target = model.sessions[targetIndex];
|
|
382
|
+
const targetTurn = target.turns[0];
|
|
383
|
+
const targetProjectName = model.snapshot.getProject(targetTurn.turn.project_id ?? "")?.display_name;
|
|
384
|
+
assert.ok(targetProjectName);
|
|
385
|
+
let state = apply(model, createLiteBrowserState(model), { type: "set-browse-scope", scope: "sessions" });
|
|
386
|
+
for (let index = 0; index < targetIndex; index += 1) {
|
|
387
|
+
state = apply(model, state, { type: "move-down" });
|
|
388
|
+
}
|
|
389
|
+
state = apply(model, state, { type: "focus-detail" });
|
|
390
|
+
const output = frame(model, state, 130, 40);
|
|
391
|
+
const askLine = output.split("\n").find((line) => line.includes("Ask 1/"));
|
|
392
|
+
assert.ok(askLine, "selected session turn detail is missing");
|
|
393
|
+
assert.ok(askLine.includes(`in ${targetProjectName}`), `detail used the wrong project label: ${askLine}`);
|
|
394
|
+
});
|
|
395
|
+
test("the full adapter matrix preserves identity through every browser scope", async () => {
|
|
396
|
+
const model = await buildFixtureMatrixModel();
|
|
397
|
+
const snapshotTurnIds = new Set(model.snapshot.listResolvedTurns().map((turn) => turn.id));
|
|
398
|
+
const topLevelSessionIds = new Set(model.sessions.map((entry) => entry.session.id));
|
|
399
|
+
const delegatedChildIds = new Set(model.snapshot.listResolvedSessions().flatMap((session) => model.snapshot.listSessionRelatedWork(session.id).flatMap((entry) => {
|
|
400
|
+
const parentSessionRef = entry.parent_session_ref;
|
|
401
|
+
return (entry.relation_kind === "delegated_session" &&
|
|
402
|
+
entry.direction === "inbound" &&
|
|
403
|
+
entry.child_session_ref === entry.query_session_ref &&
|
|
404
|
+
parentSessionRef !== undefined &&
|
|
405
|
+
topLevelSessionIds.has(parentSessionRef)) ? [entry.query_session_ref] : [];
|
|
406
|
+
})));
|
|
407
|
+
const sessionTurnIds = new Set();
|
|
408
|
+
const projectTurnIds = new Set();
|
|
409
|
+
const delegatedChildTurnIds = new Set(model.snapshot.listResolvedTurns()
|
|
410
|
+
.filter((turn) => delegatedChildIds.has(turn.session_id))
|
|
411
|
+
.map((turn) => turn.id));
|
|
412
|
+
assert.deepEqual(model.sessions.map((entry) => entry.session.id), model.snapshot.listTopLevelSessions().map((session) => session.id));
|
|
413
|
+
for (const childId of delegatedChildIds) {
|
|
414
|
+
assert.equal(topLevelSessionIds.has(childId), false, `delegated child ${childId} leaked into the session pane`);
|
|
415
|
+
assert.ok(model.snapshot.getSession(childId), `delegated child ${childId} must stay addressable`);
|
|
416
|
+
}
|
|
417
|
+
for (const entry of model.sessions) {
|
|
418
|
+
assert.equal(entry.turns.length, entry.session.turn_count, `session count drift for ${entry.session.id}`);
|
|
419
|
+
for (const turn of entry.turns) {
|
|
420
|
+
assert.equal(turn.turn.session_id, entry.session.id);
|
|
421
|
+
assert.equal(turn.session?.id, entry.session.id);
|
|
422
|
+
sessionTurnIds.add(turn.turn.id);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
assert.deepEqual(new Set([...sessionTurnIds, ...delegatedChildTurnIds]), snapshotTurnIds, "every resolved turn belongs to a top-level session row or a nested delegated child");
|
|
426
|
+
for (const turnId of delegatedChildTurnIds) {
|
|
427
|
+
assert.equal(sessionTurnIds.has(turnId), false, `delegated child turn ${turnId} must not appear as a top-level session row`);
|
|
428
|
+
}
|
|
429
|
+
for (const entry of model.projects) {
|
|
430
|
+
assert.equal(entry.turnCount, entry.turns.length, `project turn count drift for ${entry.key}`);
|
|
431
|
+
assert.equal(entry.sessionCount, new Set(entry.turns.map((turn) => turn.turn.session_id)).size, `project session count drift for ${entry.key}`);
|
|
432
|
+
for (const turn of entry.turns) {
|
|
433
|
+
if (entry.project)
|
|
434
|
+
assert.equal(turn.turn.project_id, entry.key);
|
|
435
|
+
else
|
|
436
|
+
assert.equal(turn.turn.project_id, undefined);
|
|
437
|
+
projectTurnIds.add(turn.turn.id);
|
|
438
|
+
}
|
|
439
|
+
const groups = buildTurnDisplayGroups(entry.turns);
|
|
440
|
+
assert.deepEqual(groups.flatMap((group) => group.turnIndices).sort((left, right) => left - right), Array.from({ length: entry.turns.length }, (_, index) => index), `turn display groups dropped or duplicated a turn for ${entry.key}`);
|
|
441
|
+
}
|
|
442
|
+
assert.deepEqual(projectTurnIds, snapshotTurnIds, "every resolved turn must belong to exactly one project bucket");
|
|
443
|
+
let sessionState = apply(model, createLiteBrowserState(model), { type: "set-browse-scope", scope: "sessions" });
|
|
444
|
+
for (const [index, entry] of model.sessions.entries()) {
|
|
445
|
+
if (index > 0)
|
|
446
|
+
sessionState = apply(model, sessionState, { type: "move-down" });
|
|
447
|
+
assert.deepEqual(getVisibleTurns(model, sessionState).map((turn) => turn.turn.id), entry.turns.map((turn) => turn.turn.id), `session scope selected the wrong turns for ${entry.session.id}`);
|
|
448
|
+
}
|
|
449
|
+
let projectState = createLiteBrowserState(model);
|
|
450
|
+
for (const [index, entry] of model.projects.entries()) {
|
|
451
|
+
if (index > 0)
|
|
452
|
+
projectState = apply(model, projectState, { type: "move-down" });
|
|
453
|
+
assert.deepEqual(getVisibleTurns(model, projectState).map((turn) => turn.turn.id), entry.turns.map((turn) => turn.turn.id), `project scope selected the wrong turns for ${entry.key}`);
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
test("session detail surfaces canonical related work for a turn-less session", async () => {
|
|
457
|
+
const model = await buildModel(openclawRoot, "openclaw");
|
|
458
|
+
const sessionId = "sess:openclaw:44444444-5555-4666-8777-888888888888";
|
|
459
|
+
const state = apply(model, createLiteBrowserState(model), { type: "open-session-ref", ref: sessionId });
|
|
460
|
+
const output = frame(model, state, 130, 40);
|
|
461
|
+
assert.match(output, /Sessions/);
|
|
462
|
+
assert.match(output, /Related work \(1\)/);
|
|
463
|
+
assert.match(output, /automation run · self/);
|
|
464
|
+
assert.match(output, /derived no UserTurn/);
|
|
465
|
+
});
|
|
466
|
+
test("the sessions scope lists every session with turn and related-work counts", async () => {
|
|
467
|
+
const model = await buildModel(openclawRoot, "openclaw");
|
|
468
|
+
const state = apply(model, createLiteBrowserState(model), { type: "set-browse-scope", scope: "sessions" });
|
|
469
|
+
const output = frame(model, state, 130, 40);
|
|
470
|
+
assert.match(output, /▸ Sessions/);
|
|
471
|
+
assert.match(output, /sessions\/projects/);
|
|
472
|
+
for (const entry of model.sessions) {
|
|
473
|
+
const label = entry.session.title ?? entry.session.source_session_id ?? entry.session.id;
|
|
474
|
+
assert.ok(output.includes(label.slice(0, 12)), `session ${label} missing from the pane`);
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
test("the conversation view labels context that the light snapshot has not loaded", async () => {
|
|
478
|
+
const model = await buildModel();
|
|
479
|
+
const state = apply(model, createLiteBrowserState(model), { type: "drill" }, { type: "drill" }, { type: "drill" });
|
|
480
|
+
const output = frame(model, state);
|
|
481
|
+
assert.match(output, /▸ Conversation/);
|
|
482
|
+
assert.match(output, /Ask 1\/\d+/);
|
|
483
|
+
assert.match(output, /context not loaded/);
|
|
484
|
+
});
|
|
485
|
+
test("the conversation view renders replies and tool calls once context is loaded", async () => {
|
|
486
|
+
const model = await buildFullModel();
|
|
487
|
+
const state = apply(model, createLiteBrowserState(model), { type: "drill" }, { type: "drill" }, { type: "drill" });
|
|
488
|
+
const output = frame(model, state, 120, 44);
|
|
489
|
+
assert.match(output, /Assistant replies: [1-9]/);
|
|
490
|
+
assert.match(output, /Tool calls: \d+/);
|
|
491
|
+
assert.doesNotMatch(output, /context not loaded/);
|
|
492
|
+
});
|
|
493
|
+
test("the conversation view keeps both scroll indicators inside the frame height", async () => {
|
|
494
|
+
const model = await buildFullModel();
|
|
495
|
+
const targetTurn = model.snapshot.listResolvedTurns()
|
|
496
|
+
.map((turn) => ({
|
|
497
|
+
turn,
|
|
498
|
+
contextBytes: JSON.stringify(model.snapshot.getTurnContext(turn.id) ?? {}).length,
|
|
499
|
+
}))
|
|
500
|
+
.sort((left, right) => right.contextBytes - left.contextBytes)[0]?.turn;
|
|
501
|
+
assert.ok(targetTurn);
|
|
502
|
+
const drilled = apply(model, createLiteBrowserState(model), { type: "open-turn-ref", ref: targetTurn.id }, { type: "drill" });
|
|
503
|
+
// A mid-scroll offset must show both the above and below indicators, and the
|
|
504
|
+
// emitted rows must not exceed contentHeight (which used to slice the "more
|
|
505
|
+
// below" hint and the last content line off the bottom).
|
|
506
|
+
const mid = { ...drilled, conversationScrollOffset: 2 };
|
|
507
|
+
const output = frame(model, mid, 100, 14);
|
|
508
|
+
assert.equal(output.split("\n").length, 14, "conversation frame must stay exactly the requested height");
|
|
509
|
+
assert.match(output, /↑ \d+ more lines above/);
|
|
510
|
+
assert.match(output, /↓ \d+ more lines below/);
|
|
511
|
+
});
|
|
512
|
+
test("a jump-to-last scroll offset is reconciled to a finite maximum so scrolling up works", async () => {
|
|
513
|
+
const model = await buildFullModel();
|
|
514
|
+
// The reducer stores a bottom sentinel (MAX_SAFE_INTEGER) for jump-last
|
|
515
|
+
// because it has no terminal dimensions; only the renderer can resolve it.
|
|
516
|
+
const jumped = apply(model, createLiteBrowserState(model), { type: "drill" }, { type: "drill" }, { type: "drill" }, { type: "jump-last" });
|
|
517
|
+
assert.equal(jumped.conversationScrollOffset, Number.MAX_SAFE_INTEGER);
|
|
518
|
+
const bottom = {};
|
|
519
|
+
renderLiteFrame(model, jumped, { width: 100, height: 14, now: FIXED_NOW }, bottom);
|
|
520
|
+
assert.ok(bottom.conversationScrollOffset !== undefined, "renderer must report the reconciled offset");
|
|
521
|
+
assert.ok(bottom.conversationScrollOffset < Number.MAX_SAFE_INTEGER, "the sentinel must be resolved to a real finite maximum");
|
|
522
|
+
// Scrolling up from the reconciled bottom must move the offset down, which is
|
|
523
|
+
// the behavior the stuck-after-G bug broke.
|
|
524
|
+
const up = { ...jumped, conversationScrollOffset: bottom.conversationScrollOffset - 1 };
|
|
525
|
+
const afterUp = {};
|
|
526
|
+
renderLiteFrame(model, up, { width: 100, height: 14, now: FIXED_NOW }, afterUp);
|
|
527
|
+
assert.ok(afterUp.conversationScrollOffset < bottom.conversationScrollOffset, "move-up from the bottom must scroll the view");
|
|
528
|
+
});
|
|
529
|
+
test("a status message renders above the status bar", async () => {
|
|
530
|
+
const model = await buildModel();
|
|
531
|
+
const state = apply(model, createLiteBrowserState(model), {
|
|
532
|
+
type: "set-status",
|
|
533
|
+
status: { kind: "error", text: "Refresh failed; previous snapshot retained: boom" },
|
|
534
|
+
});
|
|
535
|
+
const lines = frame(model, state).split("\n");
|
|
536
|
+
assert.match(lines.at(-2) ?? "", /Refresh failed; previous snapshot retained: boom/);
|
|
537
|
+
});
|
|
538
|
+
test("projection integrity warnings stay visible instead of failing silently", async () => {
|
|
539
|
+
const base = await buildModel();
|
|
540
|
+
assert.deepEqual(base.snapshot.projectionIssues, []);
|
|
541
|
+
const target = base.snapshot.data.sessions[0];
|
|
542
|
+
const snapshot = new LiveHistorySnapshot({
|
|
543
|
+
...base.snapshot.data,
|
|
544
|
+
sessions: base.snapshot.data.sessions.map((session) => session.id === target.id ? { ...session, turn_count: session.turn_count + 1 } : session),
|
|
545
|
+
});
|
|
546
|
+
const model = new LiteBrowserModel(snapshot);
|
|
547
|
+
assert.equal(model.snapshot.projectionIssues.length, 1);
|
|
548
|
+
const state = apply(model, createLiteBrowserState(model), { type: "toggle-sources" });
|
|
549
|
+
const output = frame(model, state);
|
|
550
|
+
assert.match(output, /1 data warning/);
|
|
551
|
+
assert.match(output, /Projection warnings: 1/);
|
|
552
|
+
assert.match(output, /session sess:codex:/);
|
|
553
|
+
});
|
|
554
|
+
test("an empty snapshot renders guidance instead of a blank frame", async () => {
|
|
555
|
+
const model = new LiteBrowserModel(new LiveHistorySnapshot({
|
|
556
|
+
host: { id: "host", hostname: "empty", platform: "darwin", created_at: "2026-01-01T00:00:00.000Z" },
|
|
557
|
+
sources: [],
|
|
558
|
+
projects: [],
|
|
559
|
+
sessions: [],
|
|
560
|
+
turns: [],
|
|
561
|
+
contexts: [],
|
|
562
|
+
ask_user_question_turns: [],
|
|
563
|
+
loss_audits: [],
|
|
564
|
+
}));
|
|
565
|
+
const state = createLiteBrowserState(model);
|
|
566
|
+
const output = frame(model, state);
|
|
567
|
+
assert.match(output, /No projects/);
|
|
568
|
+
assert.match(output, /0 sources · 0 projects · 0 sessions · 0 turns/);
|
|
569
|
+
assert.match(output, /No AI coding history found on this machine/);
|
|
570
|
+
assert.match(output, /--source-root <slot-or-id>=<path>/);
|
|
571
|
+
const sources = frame(model, apply(model, state, { type: "toggle-sources" }));
|
|
572
|
+
assert.match(sources, /No adapter roots were found on this machine/);
|
|
573
|
+
assert.match(sources, /--source-root <slot-or-id>=<path>/);
|
|
574
|
+
});
|
|
575
|
+
test("frames carry no escape bytes when color is disabled", async () => {
|
|
576
|
+
const model = await buildModel();
|
|
577
|
+
const output = frame(model, apply(model, createLiteBrowserState(model), { type: "toggle-stats" }));
|
|
578
|
+
assert.equal(output, stripAnsi(output));
|
|
579
|
+
});
|
|
580
|
+
test("text helpers measure and clip by terminal columns, not string length", () => {
|
|
581
|
+
assert.equal(displayWidth("abc"), 3);
|
|
582
|
+
assert.equal(displayWidth("日本語"), 6);
|
|
583
|
+
assert.equal(displayWidth("\x1b[31mabc\x1b[39m"), 3);
|
|
584
|
+
assert.equal(displayWidth(padLine("ab", 6)), 6);
|
|
585
|
+
assert.ok(displayWidth(clipLine("日本語テスト", 6)) <= 6);
|
|
586
|
+
assert.equal(clipLine("abc", 10), "abc");
|
|
587
|
+
assert.deepEqual(wrapText("one two three", 7), ["one two", "three"]);
|
|
588
|
+
assert.deepEqual(wrapText("supercalifragilistic", 6), ["superc", "alifra", "gilist", "ic"]);
|
|
589
|
+
assert.deepEqual(wrapText("first\n\nsecond", 40), ["first", "", "second"]);
|
|
590
|
+
for (const line of wrapText("日本語のテキストを折り返します", 8)) {
|
|
591
|
+
assert.ok(displayWidth(line) <= 8);
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
//# sourceMappingURL=render.test.js.map
|