@cchistory/lite 0.4.5 → 0.6.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 +7 -5
- package/apps/lite-cli/dist/agent-contract.d.ts.map +1 -1
- package/apps/lite-cli/dist/agent-contract.js +36 -25
- package/apps/lite-cli/dist/agent-contract.js.map +1 -1
- package/apps/lite-cli/dist/bin.js +2 -2
- 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 +151 -66
- package/apps/lite-cli/dist/index.js.map +1 -1
- package/apps/lite-cli/dist/index.test.js +59 -89
- 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 +2 -2
- 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 +6 -2
- package/apps/lite-tui/dist/index.js.map +1 -1
- package/apps/lite-tui/dist/index.test.js +10 -8
- 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 +2 -2
- package/bin/cchistory-lite.mjs +2 -2
- package/docs/guide/for-agents.md +66 -46
- package/docs/guide/lite.md +53 -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 +1 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/bootstrap.js +1 -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 +314 -143
- 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/launcher-memory.d.ts +12 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.js +44 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.test.js +20 -0
- package/node_modules/@cchistory/live-runtime/dist/launcher-memory.test.js.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/live-read-recovery.test.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/live-read-recovery.test.d.ts.map +1 -0
- package/node_modules/@cchistory/live-runtime/dist/live-read-recovery.test.js +92 -0
- package/node_modules/@cchistory/live-runtime/dist/live-read-recovery.test.js.map +1 -0
- 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 +22 -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 -47
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/scan-guard.test.js +287 -83
- 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 +171 -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 +81 -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/jsonl-records.test.js +31 -1
- package/node_modules/@cchistory/source-adapters/dist/core/jsonl-records.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +4 -3
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +32 -13
- 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 +46 -45
- 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 +76 -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 +126 -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
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
var util = require('./util');
|
|
2
|
+
var types = require('./types');
|
|
3
|
+
var sets = require('./sets');
|
|
4
|
+
var positions = require('./positions');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module.exports = function(regexpStr) {
|
|
8
|
+
var i = 0, l, c,
|
|
9
|
+
start = { type: types.ROOT, stack: []},
|
|
10
|
+
|
|
11
|
+
// Keep track of last clause/group and stack.
|
|
12
|
+
lastGroup = start,
|
|
13
|
+
last = start.stack,
|
|
14
|
+
groupStack = [];
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var repeatErr = function(i) {
|
|
18
|
+
util.error(regexpStr, 'Nothing to repeat at column ' + (i - 1));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Decode a few escaped characters.
|
|
22
|
+
var str = util.strToChars(regexpStr);
|
|
23
|
+
l = str.length;
|
|
24
|
+
|
|
25
|
+
// Iterate through each character in string.
|
|
26
|
+
while (i < l) {
|
|
27
|
+
c = str[i++];
|
|
28
|
+
|
|
29
|
+
switch (c) {
|
|
30
|
+
// Handle escaped characters, inclues a few sets.
|
|
31
|
+
case '\\':
|
|
32
|
+
c = str[i++];
|
|
33
|
+
|
|
34
|
+
switch (c) {
|
|
35
|
+
case 'b':
|
|
36
|
+
last.push(positions.wordBoundary());
|
|
37
|
+
break;
|
|
38
|
+
|
|
39
|
+
case 'B':
|
|
40
|
+
last.push(positions.nonWordBoundary());
|
|
41
|
+
break;
|
|
42
|
+
|
|
43
|
+
case 'w':
|
|
44
|
+
last.push(sets.words());
|
|
45
|
+
break;
|
|
46
|
+
|
|
47
|
+
case 'W':
|
|
48
|
+
last.push(sets.notWords());
|
|
49
|
+
break;
|
|
50
|
+
|
|
51
|
+
case 'd':
|
|
52
|
+
last.push(sets.ints());
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 'D':
|
|
56
|
+
last.push(sets.notInts());
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 's':
|
|
60
|
+
last.push(sets.whitespace());
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
case 'S':
|
|
64
|
+
last.push(sets.notWhitespace());
|
|
65
|
+
break;
|
|
66
|
+
|
|
67
|
+
default:
|
|
68
|
+
// Check if c is integer.
|
|
69
|
+
// In which case it's a reference.
|
|
70
|
+
if (/\d/.test(c)) {
|
|
71
|
+
last.push({ type: types.REFERENCE, value: parseInt(c, 10) });
|
|
72
|
+
|
|
73
|
+
// Escaped character.
|
|
74
|
+
} else {
|
|
75
|
+
last.push({ type: types.CHAR, value: c.charCodeAt(0) });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
break;
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
// Positionals.
|
|
83
|
+
case '^':
|
|
84
|
+
last.push(positions.begin());
|
|
85
|
+
break;
|
|
86
|
+
|
|
87
|
+
case '$':
|
|
88
|
+
last.push(positions.end());
|
|
89
|
+
break;
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// Handle custom sets.
|
|
93
|
+
case '[':
|
|
94
|
+
// Check if this class is 'anti' i.e. [^abc].
|
|
95
|
+
var not;
|
|
96
|
+
if (str[i] === '^') {
|
|
97
|
+
not = true;
|
|
98
|
+
i++;
|
|
99
|
+
} else {
|
|
100
|
+
not = false;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Get all the characters in class.
|
|
104
|
+
var classTokens = util.tokenizeClass(str.slice(i), regexpStr);
|
|
105
|
+
|
|
106
|
+
// Increase index by length of class.
|
|
107
|
+
i += classTokens[1];
|
|
108
|
+
last.push({
|
|
109
|
+
type: types.SET,
|
|
110
|
+
set: classTokens[0],
|
|
111
|
+
not: not,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
break;
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
// Class of any character except \n.
|
|
118
|
+
case '.':
|
|
119
|
+
last.push(sets.anyChar());
|
|
120
|
+
break;
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// Push group onto stack.
|
|
124
|
+
case '(':
|
|
125
|
+
// Create group.
|
|
126
|
+
var group = {
|
|
127
|
+
type: types.GROUP,
|
|
128
|
+
stack: [],
|
|
129
|
+
remember: true,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
c = str[i];
|
|
133
|
+
|
|
134
|
+
// If if this is a special kind of group.
|
|
135
|
+
if (c === '?') {
|
|
136
|
+
c = str[i + 1];
|
|
137
|
+
i += 2;
|
|
138
|
+
|
|
139
|
+
// Match if followed by.
|
|
140
|
+
if (c === '=') {
|
|
141
|
+
group.followedBy = true;
|
|
142
|
+
|
|
143
|
+
// Match if not followed by.
|
|
144
|
+
} else if (c === '!') {
|
|
145
|
+
group.notFollowedBy = true;
|
|
146
|
+
|
|
147
|
+
} else if (c !== ':') {
|
|
148
|
+
util.error(regexpStr,
|
|
149
|
+
'Invalid group, character \'' + c +
|
|
150
|
+
'\' after \'?\' at column ' + (i - 1));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
group.remember = false;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Insert subgroup into current group stack.
|
|
157
|
+
last.push(group);
|
|
158
|
+
|
|
159
|
+
// Remember the current group for when the group closes.
|
|
160
|
+
groupStack.push(lastGroup);
|
|
161
|
+
|
|
162
|
+
// Make this new group the current group.
|
|
163
|
+
lastGroup = group;
|
|
164
|
+
last = group.stack;
|
|
165
|
+
break;
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
// Pop group out of stack.
|
|
169
|
+
case ')':
|
|
170
|
+
if (groupStack.length === 0) {
|
|
171
|
+
util.error(regexpStr, 'Unmatched ) at column ' + (i - 1));
|
|
172
|
+
}
|
|
173
|
+
lastGroup = groupStack.pop();
|
|
174
|
+
|
|
175
|
+
// Check if this group has a PIPE.
|
|
176
|
+
// To get back the correct last stack.
|
|
177
|
+
last = lastGroup.options ?
|
|
178
|
+
lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack;
|
|
179
|
+
break;
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
// Use pipe character to give more choices.
|
|
183
|
+
case '|':
|
|
184
|
+
// Create array where options are if this is the first PIPE
|
|
185
|
+
// in this clause.
|
|
186
|
+
if (!lastGroup.options) {
|
|
187
|
+
lastGroup.options = [lastGroup.stack];
|
|
188
|
+
delete lastGroup.stack;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Create a new stack and add to options for rest of clause.
|
|
192
|
+
var stack = [];
|
|
193
|
+
lastGroup.options.push(stack);
|
|
194
|
+
last = stack;
|
|
195
|
+
break;
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
// Repetition.
|
|
199
|
+
// For every repetition, remove last element from last stack
|
|
200
|
+
// then insert back a RANGE object.
|
|
201
|
+
// This design is chosen because there could be more than
|
|
202
|
+
// one repetition symbols in a regex i.e. `a?+{2,3}`.
|
|
203
|
+
case '{':
|
|
204
|
+
var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max;
|
|
205
|
+
if (rs !== null) {
|
|
206
|
+
if (last.length === 0) {
|
|
207
|
+
repeatErr(i);
|
|
208
|
+
}
|
|
209
|
+
min = parseInt(rs[1], 10);
|
|
210
|
+
max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min;
|
|
211
|
+
i += rs[0].length;
|
|
212
|
+
|
|
213
|
+
last.push({
|
|
214
|
+
type: types.REPETITION,
|
|
215
|
+
min: min,
|
|
216
|
+
max: max,
|
|
217
|
+
value: last.pop(),
|
|
218
|
+
});
|
|
219
|
+
} else {
|
|
220
|
+
last.push({
|
|
221
|
+
type: types.CHAR,
|
|
222
|
+
value: 123,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
break;
|
|
226
|
+
|
|
227
|
+
case '?':
|
|
228
|
+
if (last.length === 0) {
|
|
229
|
+
repeatErr(i);
|
|
230
|
+
}
|
|
231
|
+
last.push({
|
|
232
|
+
type: types.REPETITION,
|
|
233
|
+
min: 0,
|
|
234
|
+
max: 1,
|
|
235
|
+
value: last.pop(),
|
|
236
|
+
});
|
|
237
|
+
break;
|
|
238
|
+
|
|
239
|
+
case '+':
|
|
240
|
+
if (last.length === 0) {
|
|
241
|
+
repeatErr(i);
|
|
242
|
+
}
|
|
243
|
+
last.push({
|
|
244
|
+
type: types.REPETITION,
|
|
245
|
+
min: 1,
|
|
246
|
+
max: Infinity,
|
|
247
|
+
value: last.pop(),
|
|
248
|
+
});
|
|
249
|
+
break;
|
|
250
|
+
|
|
251
|
+
case '*':
|
|
252
|
+
if (last.length === 0) {
|
|
253
|
+
repeatErr(i);
|
|
254
|
+
}
|
|
255
|
+
last.push({
|
|
256
|
+
type: types.REPETITION,
|
|
257
|
+
min: 0,
|
|
258
|
+
max: Infinity,
|
|
259
|
+
value: last.pop(),
|
|
260
|
+
});
|
|
261
|
+
break;
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
// Default is a character that is not `\[](){}?+*^$`.
|
|
265
|
+
default:
|
|
266
|
+
last.push({
|
|
267
|
+
type: types.CHAR,
|
|
268
|
+
value: c.charCodeAt(0),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Check if any groups have not been closed.
|
|
275
|
+
if (groupStack.length !== 0) {
|
|
276
|
+
util.error(regexpStr, 'Unterminated group');
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return start;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
module.exports.types = types;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var types = require('./types');
|
|
2
|
+
|
|
3
|
+
exports.wordBoundary = function() {
|
|
4
|
+
return { type: types.POSITION, value: 'b' };
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
exports.nonWordBoundary = function() {
|
|
8
|
+
return { type: types.POSITION, value: 'B' };
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.begin = function() {
|
|
12
|
+
return { type: types.POSITION, value: '^' };
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.end = function() {
|
|
16
|
+
return { type: types.POSITION, value: '$' };
|
|
17
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
var types = require('./types');
|
|
2
|
+
|
|
3
|
+
var INTS = function() {
|
|
4
|
+
return [{ type: types.RANGE , from: 48, to: 57 }];
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
var WORDS = function() {
|
|
8
|
+
return [
|
|
9
|
+
{ type: types.CHAR, value: 95 },
|
|
10
|
+
{ type: types.RANGE, from: 97, to: 122 },
|
|
11
|
+
{ type: types.RANGE, from: 65, to: 90 }
|
|
12
|
+
].concat(INTS());
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var WHITESPACE = function() {
|
|
16
|
+
return [
|
|
17
|
+
{ type: types.CHAR, value: 9 },
|
|
18
|
+
{ type: types.CHAR, value: 10 },
|
|
19
|
+
{ type: types.CHAR, value: 11 },
|
|
20
|
+
{ type: types.CHAR, value: 12 },
|
|
21
|
+
{ type: types.CHAR, value: 13 },
|
|
22
|
+
{ type: types.CHAR, value: 32 },
|
|
23
|
+
{ type: types.CHAR, value: 160 },
|
|
24
|
+
{ type: types.CHAR, value: 5760 },
|
|
25
|
+
{ type: types.CHAR, value: 6158 },
|
|
26
|
+
{ type: types.CHAR, value: 8192 },
|
|
27
|
+
{ type: types.CHAR, value: 8193 },
|
|
28
|
+
{ type: types.CHAR, value: 8194 },
|
|
29
|
+
{ type: types.CHAR, value: 8195 },
|
|
30
|
+
{ type: types.CHAR, value: 8196 },
|
|
31
|
+
{ type: types.CHAR, value: 8197 },
|
|
32
|
+
{ type: types.CHAR, value: 8198 },
|
|
33
|
+
{ type: types.CHAR, value: 8199 },
|
|
34
|
+
{ type: types.CHAR, value: 8200 },
|
|
35
|
+
{ type: types.CHAR, value: 8201 },
|
|
36
|
+
{ type: types.CHAR, value: 8202 },
|
|
37
|
+
{ type: types.CHAR, value: 8232 },
|
|
38
|
+
{ type: types.CHAR, value: 8233 },
|
|
39
|
+
{ type: types.CHAR, value: 8239 },
|
|
40
|
+
{ type: types.CHAR, value: 8287 },
|
|
41
|
+
{ type: types.CHAR, value: 12288 },
|
|
42
|
+
{ type: types.CHAR, value: 65279 }
|
|
43
|
+
];
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var NOTANYCHAR = function() {
|
|
47
|
+
return [
|
|
48
|
+
{ type: types.CHAR, value: 10 },
|
|
49
|
+
{ type: types.CHAR, value: 13 },
|
|
50
|
+
{ type: types.CHAR, value: 8232 },
|
|
51
|
+
{ type: types.CHAR, value: 8233 },
|
|
52
|
+
];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Predefined class objects.
|
|
56
|
+
exports.words = function() {
|
|
57
|
+
return { type: types.SET, set: WORDS(), not: false };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.notWords = function() {
|
|
61
|
+
return { type: types.SET, set: WORDS(), not: true };
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.ints = function() {
|
|
65
|
+
return { type: types.SET, set: INTS(), not: false };
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.notInts = function() {
|
|
69
|
+
return { type: types.SET, set: INTS(), not: true };
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
exports.whitespace = function() {
|
|
73
|
+
return { type: types.SET, set: WHITESPACE(), not: false };
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.notWhitespace = function() {
|
|
77
|
+
return { type: types.SET, set: WHITESPACE(), not: true };
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.anyChar = function() {
|
|
81
|
+
return { type: types.SET, set: NOTANYCHAR(), not: true };
|
|
82
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var types = require('./types');
|
|
2
|
+
var sets = require('./sets');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// All of these are private and only used by randexp.
|
|
6
|
+
// It's assumed that they will always be called with the correct input.
|
|
7
|
+
|
|
8
|
+
var CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?';
|
|
9
|
+
var SLSH = { '0': 0, 't': 9, 'n': 10, 'v': 11, 'f': 12, 'r': 13 };
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Finds character representations in str and convert all to
|
|
13
|
+
* their respective characters
|
|
14
|
+
*
|
|
15
|
+
* @param {String} str
|
|
16
|
+
* @return {String}
|
|
17
|
+
*/
|
|
18
|
+
exports.strToChars = function(str) {
|
|
19
|
+
/* jshint maxlen: false */
|
|
20
|
+
var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g;
|
|
21
|
+
str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) {
|
|
22
|
+
if (lbs) {
|
|
23
|
+
return s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var code = b ? 8 :
|
|
27
|
+
a16 ? parseInt(a16, 16) :
|
|
28
|
+
b16 ? parseInt(b16, 16) :
|
|
29
|
+
c8 ? parseInt(c8, 8) :
|
|
30
|
+
dctrl ? CTRL.indexOf(dctrl) :
|
|
31
|
+
SLSH[eslsh];
|
|
32
|
+
|
|
33
|
+
var c = String.fromCharCode(code);
|
|
34
|
+
|
|
35
|
+
// Escape special regex characters.
|
|
36
|
+
if (/[\[\]{}\^$.|?*+()]/.test(c)) {
|
|
37
|
+
c = '\\' + c;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return c;
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return str;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* turns class into tokens
|
|
49
|
+
* reads str until it encounters a ] not preceeded by a \
|
|
50
|
+
*
|
|
51
|
+
* @param {String} str
|
|
52
|
+
* @param {String} regexpStr
|
|
53
|
+
* @return {Array.<Array.<Object>, Number>}
|
|
54
|
+
*/
|
|
55
|
+
exports.tokenizeClass = function(str, regexpStr) {
|
|
56
|
+
/* jshint maxlen: false */
|
|
57
|
+
var tokens = [];
|
|
58
|
+
var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g;
|
|
59
|
+
var rs, c;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
while ((rs = regexp.exec(str)) != null) {
|
|
63
|
+
if (rs[1]) {
|
|
64
|
+
tokens.push(sets.words());
|
|
65
|
+
|
|
66
|
+
} else if (rs[2]) {
|
|
67
|
+
tokens.push(sets.ints());
|
|
68
|
+
|
|
69
|
+
} else if (rs[3]) {
|
|
70
|
+
tokens.push(sets.whitespace());
|
|
71
|
+
|
|
72
|
+
} else if (rs[4]) {
|
|
73
|
+
tokens.push(sets.notWords());
|
|
74
|
+
|
|
75
|
+
} else if (rs[5]) {
|
|
76
|
+
tokens.push(sets.notInts());
|
|
77
|
+
|
|
78
|
+
} else if (rs[6]) {
|
|
79
|
+
tokens.push(sets.notWhitespace());
|
|
80
|
+
|
|
81
|
+
} else if (rs[7]) {
|
|
82
|
+
tokens.push({
|
|
83
|
+
type: types.RANGE,
|
|
84
|
+
from: (rs[8] || rs[9]).charCodeAt(0),
|
|
85
|
+
to: rs[10].charCodeAt(0),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
} else if (c = rs[12]) {
|
|
89
|
+
tokens.push({
|
|
90
|
+
type: types.CHAR,
|
|
91
|
+
value: c.charCodeAt(0),
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
} else {
|
|
95
|
+
return [tokens, regexp.lastIndex];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
exports.error(regexpStr, 'Unterminated character class');
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Shortcut to throw errors.
|
|
105
|
+
*
|
|
106
|
+
* @param {String} regexp
|
|
107
|
+
* @param {String} msg
|
|
108
|
+
*/
|
|
109
|
+
exports.error = function(regexp, msg) {
|
|
110
|
+
throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg);
|
|
111
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ret",
|
|
3
|
+
"description": "Tokenizes a string that represents a regular expression.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"regex",
|
|
6
|
+
"regexp",
|
|
7
|
+
"regular expression",
|
|
8
|
+
"parser",
|
|
9
|
+
"tokenizer"
|
|
10
|
+
],
|
|
11
|
+
"version": "0.1.15",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git://github.com/fent/ret.js.git"
|
|
15
|
+
},
|
|
16
|
+
"author": "Roly Fentanes (https://github.com/fent)",
|
|
17
|
+
"main": "./lib/index.js",
|
|
18
|
+
"files": [
|
|
19
|
+
"lib"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "istanbul cover vows -- --spec test/*-test.js"
|
|
23
|
+
},
|
|
24
|
+
"directories": {
|
|
25
|
+
"lib": "./lib"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"istanbul": "*",
|
|
29
|
+
"vows": "*"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=0.12"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT"
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cchistory/lite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,16 +26,32 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cchistory/domain": "0.
|
|
30
|
-
"@cchistory/canonical": "0.
|
|
31
|
-
"@cchistory/source-adapters": "0.
|
|
32
|
-
"@cchistory/live-runtime": "0.
|
|
29
|
+
"@cchistory/domain": "0.6.0",
|
|
30
|
+
"@cchistory/canonical": "0.6.0",
|
|
31
|
+
"@cchistory/source-adapters": "0.6.0",
|
|
32
|
+
"@cchistory/live-runtime": "0.6.0",
|
|
33
|
+
"pgsql-ast-parser": "12.0.2",
|
|
34
|
+
"moo": "0.5.3",
|
|
35
|
+
"nearley": "2.20.1",
|
|
36
|
+
"commander": "2.20.3",
|
|
37
|
+
"railroad-diagrams": "1.0.0",
|
|
38
|
+
"randexp": "0.4.6",
|
|
39
|
+
"discontinuous-range": "1.0.0",
|
|
40
|
+
"ret": "0.1.15"
|
|
33
41
|
},
|
|
34
42
|
"bundleDependencies": [
|
|
35
43
|
"@cchistory/domain",
|
|
36
44
|
"@cchistory/canonical",
|
|
37
45
|
"@cchistory/source-adapters",
|
|
38
|
-
"@cchistory/live-runtime"
|
|
46
|
+
"@cchistory/live-runtime",
|
|
47
|
+
"pgsql-ast-parser",
|
|
48
|
+
"moo",
|
|
49
|
+
"nearley",
|
|
50
|
+
"commander",
|
|
51
|
+
"railroad-diagrams",
|
|
52
|
+
"randexp",
|
|
53
|
+
"discontinuous-range",
|
|
54
|
+
"ret"
|
|
39
55
|
],
|
|
40
56
|
"engines": {
|
|
41
57
|
"node": ">=22"
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
"process_model": { "type": "string", "minLength": 1 },
|
|
99
99
|
"heap_ceiling": {
|
|
100
100
|
"type": "object",
|
|
101
|
-
"required": ["
|
|
101
|
+
"required": ["policy", "automatic_reexec", "description"],
|
|
102
102
|
"properties": {
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
103
|
+
"policy": { "const": "node_default_or_explicit" },
|
|
104
|
+
"automatic_reexec": { "const": false },
|
|
105
|
+
"description": { "type": "string", "minLength": 1 }
|
|
106
106
|
},
|
|
107
107
|
"additionalProperties": false
|
|
108
108
|
},
|
|
@@ -126,11 +126,10 @@
|
|
|
126
126
|
"lock_wait_ms": { "type": "integer", "minimum": 1 },
|
|
127
127
|
"watchdog_floor": {
|
|
128
128
|
"type": "object",
|
|
129
|
-
"required": ["formula", "
|
|
129
|
+
"required": ["formula", "initial_available_fraction"],
|
|
130
130
|
"properties": {
|
|
131
131
|
"formula": { "type": "string", "minLength": 1 },
|
|
132
|
-
"
|
|
133
|
-
"total_floor_fraction": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
|
132
|
+
"initial_available_fraction": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
|
134
133
|
},
|
|
135
134
|
"additionalProperties": false
|
|
136
135
|
},
|
|
@@ -3,24 +3,74 @@
|
|
|
3
3
|
"$id": "https://cchistory.dev/schemas/cchistory-lite-error-v1.schema.json",
|
|
4
4
|
"title": "CC History Lite structured error",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": [
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"kind",
|
|
9
|
+
"error"
|
|
10
|
+
],
|
|
7
11
|
"properties": {
|
|
8
|
-
"schema": {
|
|
9
|
-
|
|
12
|
+
"schema": {
|
|
13
|
+
"const": "cchistory-lite-error/v1"
|
|
14
|
+
},
|
|
15
|
+
"kind": {
|
|
16
|
+
"const": "error"
|
|
17
|
+
},
|
|
10
18
|
"error": {
|
|
11
19
|
"type": "object",
|
|
12
|
-
"required": [
|
|
20
|
+
"required": [
|
|
21
|
+
"code",
|
|
22
|
+
"message",
|
|
23
|
+
"candidates"
|
|
24
|
+
],
|
|
13
25
|
"properties": {
|
|
14
|
-
"code": {
|
|
15
|
-
|
|
26
|
+
"code": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"message": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
16
32
|
"candidates": {
|
|
17
33
|
"type": "array",
|
|
18
34
|
"items": {
|
|
19
35
|
"type": "object",
|
|
20
|
-
"required": [
|
|
21
|
-
|
|
36
|
+
"required": [
|
|
37
|
+
"id"
|
|
38
|
+
],
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"label": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
22
47
|
"additionalProperties": false
|
|
23
48
|
}
|
|
49
|
+
},
|
|
50
|
+
"reason": {
|
|
51
|
+
"enum": [
|
|
52
|
+
"syntax",
|
|
53
|
+
"unsupported",
|
|
54
|
+
"field",
|
|
55
|
+
"parameter",
|
|
56
|
+
"type",
|
|
57
|
+
"budget"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"operation_id": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"resource": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": [
|
|
66
|
+
"complete"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"complete": {
|
|
70
|
+
"const": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": true
|
|
24
74
|
}
|
|
25
75
|
},
|
|
26
76
|
"additionalProperties": false
|