@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,183 @@
|
|
|
1
|
+
"This is a polyglot Python/JavaScript file.";
|
|
2
|
+
|
|
3
|
+
add('comment', Diagram(
|
|
4
|
+
'/*',
|
|
5
|
+
ZeroOrMore(
|
|
6
|
+
NonTerminal('anything but * followed by /')),
|
|
7
|
+
'*/'));
|
|
8
|
+
|
|
9
|
+
add('newline', Diagram(Choice(0, '\\n', '\\r\\n', '\\r', '\\f')));
|
|
10
|
+
|
|
11
|
+
add('whitespace', Diagram(Choice(
|
|
12
|
+
0, 'space', '\\t', NonTerminal('newline'))));
|
|
13
|
+
|
|
14
|
+
add('hex digit', Diagram(NonTerminal('0-9 a-f or A-F')));
|
|
15
|
+
|
|
16
|
+
add('escape', Diagram(
|
|
17
|
+
'\\', Choice(0,
|
|
18
|
+
NonTerminal('not newline or hex digit'),
|
|
19
|
+
Sequence(
|
|
20
|
+
OneOrMore(NonTerminal('hex digit'), Comment('1-6 times')),
|
|
21
|
+
Optional(NonTerminal('whitespace'), 'skip')))));
|
|
22
|
+
|
|
23
|
+
add('<whitespace-token>', Diagram(OneOrMore(NonTerminal('whitespace'))));
|
|
24
|
+
|
|
25
|
+
add('ws*', Diagram(ZeroOrMore(NonTerminal('<whitespace-token>'))));
|
|
26
|
+
|
|
27
|
+
add('<ident-token>', Diagram(
|
|
28
|
+
Choice(0, Skip(), '-'),
|
|
29
|
+
Choice(0, NonTerminal('a-z A-Z _ or non-ASCII'), NonTerminal('escape')),
|
|
30
|
+
ZeroOrMore(Choice(0,
|
|
31
|
+
NonTerminal('a-z A-Z 0-9 _ - or non-ASCII'), NonTerminal('escape')))));
|
|
32
|
+
|
|
33
|
+
add('<function-token>', Diagram(
|
|
34
|
+
NonTerminal('<ident-token>'), '('));
|
|
35
|
+
|
|
36
|
+
add('<at-keyword-token>', Diagram(
|
|
37
|
+
'@', NonTerminal('<ident-token>')));
|
|
38
|
+
|
|
39
|
+
add('<hash-token>', Diagram(
|
|
40
|
+
'#', OneOrMore(Choice(0,
|
|
41
|
+
NonTerminal('a-z A-Z 0-9 _ - or non-ASCII'),
|
|
42
|
+
NonTerminal('escape')))));
|
|
43
|
+
|
|
44
|
+
add('<string-token>', Diagram(
|
|
45
|
+
Choice(0,
|
|
46
|
+
Sequence(
|
|
47
|
+
'"',
|
|
48
|
+
ZeroOrMore(
|
|
49
|
+
Choice(0,
|
|
50
|
+
NonTerminal('not " \\ or newline'),
|
|
51
|
+
NonTerminal('escape'),
|
|
52
|
+
Sequence('\\', NonTerminal('newline')))),
|
|
53
|
+
'"'),
|
|
54
|
+
Sequence(
|
|
55
|
+
'\'',
|
|
56
|
+
ZeroOrMore(
|
|
57
|
+
Choice(0,
|
|
58
|
+
NonTerminal("not ' \\ or newline"),
|
|
59
|
+
NonTerminal('escape'),
|
|
60
|
+
Sequence('\\', NonTerminal('newline')))),
|
|
61
|
+
'\''))));
|
|
62
|
+
|
|
63
|
+
add('<url-token>', Diagram(
|
|
64
|
+
NonTerminal('<ident-token "url">'),
|
|
65
|
+
'(',
|
|
66
|
+
NonTerminal('ws*'),
|
|
67
|
+
Optional(Sequence(
|
|
68
|
+
Choice(0, NonTerminal('url-unquoted'), NonTerminal('STRING')),
|
|
69
|
+
NonTerminal('ws*'))),
|
|
70
|
+
')'));
|
|
71
|
+
|
|
72
|
+
add('url-unquoted', Diagram(OneOrMore(
|
|
73
|
+
Choice(0,
|
|
74
|
+
NonTerminal('not " \' ( ) \\ whitespace or non-printable'),
|
|
75
|
+
NonTerminal('escape')))));
|
|
76
|
+
|
|
77
|
+
add('<number-token>', Diagram(
|
|
78
|
+
Choice(1, '+', Skip(), '-'),
|
|
79
|
+
Choice(0,
|
|
80
|
+
Sequence(
|
|
81
|
+
OneOrMore(NonTerminal('digit')),
|
|
82
|
+
'.',
|
|
83
|
+
OneOrMore(NonTerminal('digit'))),
|
|
84
|
+
OneOrMore(NonTerminal('digit')),
|
|
85
|
+
Sequence(
|
|
86
|
+
'.',
|
|
87
|
+
OneOrMore(NonTerminal('digit')))),
|
|
88
|
+
Choice(0,
|
|
89
|
+
Skip(),
|
|
90
|
+
Sequence(
|
|
91
|
+
Choice(0, 'e', 'E'),
|
|
92
|
+
Choice(1, '+', Skip(), '-'),
|
|
93
|
+
OneOrMore(NonTerminal('digit'))))));
|
|
94
|
+
|
|
95
|
+
add('<dimension-token>', Diagram(
|
|
96
|
+
NonTerminal('<number-token>'), NonTerminal('<ident-token>')));
|
|
97
|
+
|
|
98
|
+
add('<percentage-token>', Diagram(
|
|
99
|
+
NonTerminal('<number-token>'), '%'));
|
|
100
|
+
|
|
101
|
+
add('<unicode-range-token>', Diagram(
|
|
102
|
+
Choice(0,
|
|
103
|
+
'U',
|
|
104
|
+
'u'),
|
|
105
|
+
'+',
|
|
106
|
+
Choice(0,
|
|
107
|
+
Sequence(OneOrMore(NonTerminal('hex digit'), Comment('1-6 times'))),
|
|
108
|
+
Sequence(
|
|
109
|
+
ZeroOrMore(NonTerminal('hex digit'), Comment('1-5 times')),
|
|
110
|
+
OneOrMore('?', Comment('1 to (6 - digits) times'))),
|
|
111
|
+
Sequence(
|
|
112
|
+
OneOrMore(NonTerminal('hex digit'), Comment('1-6 times')),
|
|
113
|
+
'-',
|
|
114
|
+
OneOrMore(NonTerminal('hex digit'), Comment('1-6 times'))))));
|
|
115
|
+
|
|
116
|
+
add('<include-match-token>', Diagram('~='));
|
|
117
|
+
|
|
118
|
+
add('<dash-match-token>', Diagram('|='));
|
|
119
|
+
|
|
120
|
+
add('<prefix-match-token>', Diagram('^='));
|
|
121
|
+
|
|
122
|
+
add('<suffix-match-token>', Diagram('$='));
|
|
123
|
+
|
|
124
|
+
add('<substring-match-token>', Diagram('*='));
|
|
125
|
+
|
|
126
|
+
add('<column-token>', Diagram('||'));
|
|
127
|
+
|
|
128
|
+
add('<CDO-token>', Diagram('<' + '!--'));
|
|
129
|
+
|
|
130
|
+
add('<CDC-token>', Diagram('-' + '->'));
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
NonTerminal = NonTerminal;
|
|
134
|
+
|
|
135
|
+
add('Stylesheet', Diagram(ZeroOrMore(Choice(3,
|
|
136
|
+
NonTerminal('<CDO-token>'), NonTerminal('<CDC-token>'), NonTerminal('<whitespace-token>'),
|
|
137
|
+
NonTerminal('Qualified rule'), NonTerminal('At-rule')))));
|
|
138
|
+
|
|
139
|
+
add('Rule list', Diagram(ZeroOrMore(Choice(1,
|
|
140
|
+
NonTerminal('<whitespace-token>'), NonTerminal('Qualified rule'), NonTerminal('At-rule')))));
|
|
141
|
+
|
|
142
|
+
add('At-rule', Diagram(
|
|
143
|
+
NonTerminal('<at-keyword-token>'), ZeroOrMore(NonTerminal('Component value')),
|
|
144
|
+
Choice(0, NonTerminal('{} block'), ';')));
|
|
145
|
+
|
|
146
|
+
add('Qualified rule', Diagram(
|
|
147
|
+
ZeroOrMore(NonTerminal('Component value')),
|
|
148
|
+
NonTerminal('{} block')));
|
|
149
|
+
|
|
150
|
+
add('Declaration list', Diagram(
|
|
151
|
+
NonTerminal('ws*'),
|
|
152
|
+
Choice(0,
|
|
153
|
+
Sequence(
|
|
154
|
+
Optional(NonTerminal('Declaration')),
|
|
155
|
+
Optional(Sequence(';', NonTerminal('Declaration list')))),
|
|
156
|
+
Sequence(
|
|
157
|
+
NonTerminal('At-rule'),
|
|
158
|
+
NonTerminal('Declaration list')))));
|
|
159
|
+
|
|
160
|
+
add('Declaration', Diagram(
|
|
161
|
+
NonTerminal('<ident-token>'), NonTerminal('ws*'), ':',
|
|
162
|
+
ZeroOrMore(NonTerminal('Component value')), Optional(NonTerminal('!important'))));
|
|
163
|
+
|
|
164
|
+
add('!important', Diagram(
|
|
165
|
+
'!', NonTerminal('ws*'), NonTerminal('<ident-token "important">'), NonTerminal('ws*')));
|
|
166
|
+
|
|
167
|
+
add('Component value', Diagram(Choice(0,
|
|
168
|
+
NonTerminal('Preserved token'),
|
|
169
|
+
NonTerminal('{} block'),
|
|
170
|
+
NonTerminal('() block'),
|
|
171
|
+
NonTerminal('[] block'),
|
|
172
|
+
NonTerminal('Function block'))));
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
add('{} block', Diagram('{', ZeroOrMore(NonTerminal('Component value')), '}'));
|
|
176
|
+
add('() block', Diagram('(', ZeroOrMore(NonTerminal('Component value')), ')'));
|
|
177
|
+
add('[] block', Diagram('[', ZeroOrMore(NonTerminal('Component value')), ']'));
|
|
178
|
+
|
|
179
|
+
add('Function block', Diagram(
|
|
180
|
+
NonTerminal('<function-token>'),
|
|
181
|
+
ZeroOrMore(NonTerminal('Component value')),
|
|
182
|
+
')'));
|
|
183
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<style>
|
|
3
|
+
body {
|
|
4
|
+
background-color: hsl(30,20%, 95%);
|
|
5
|
+
}
|
|
6
|
+
h1 {
|
|
7
|
+
font-family: sans-serif;
|
|
8
|
+
font-size: 1em;
|
|
9
|
+
}
|
|
10
|
+
div svg.railroad-diagram {
|
|
11
|
+
width: 80%; /* Scale to the width of the parent */
|
|
12
|
+
height: 100%; /* Preserve the ratio. Could be related to https://bugs.webkit.org/show_bug.cgi?id=82489 */
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<link rel='stylesheet' href='railroad-diagrams.css'>
|
|
16
|
+
<script src='railroad-diagrams.js'></script>
|
|
17
|
+
<body>
|
|
18
|
+
<h1 id='ident'>IDENT</h1>
|
|
19
|
+
<div>
|
|
20
|
+
<script >
|
|
21
|
+
ComplexDiagram(
|
|
22
|
+
Choice(0, Skip(), '-'),
|
|
23
|
+
Choice(0, NonTerminal('name-start char'), NonTerminal('escape')),
|
|
24
|
+
ZeroOrMore(
|
|
25
|
+
Choice(0, NonTerminal('name char'), NonTerminal('escape')))).addTo();
|
|
26
|
+
</script>
|
|
27
|
+
</div>
|
|
28
|
+
<h1 id='function'>FUNCTION</h1>
|
|
29
|
+
<script>
|
|
30
|
+
Diagram(NonTerminal('IDENT'), '(').addTo();
|
|
31
|
+
</script>
|
|
32
|
+
<h1 id='at-keyword'>AT-KEYWORD</h1>
|
|
33
|
+
<script>
|
|
34
|
+
Diagram('@', NonTerminal('IDENT')).addTo();
|
|
35
|
+
</script>
|
|
36
|
+
<h1 id='hash'>HASH</h1>
|
|
37
|
+
<script>
|
|
38
|
+
Diagram('#', NonTerminal('IDENT')).addTo();
|
|
39
|
+
</script>
|
|
40
|
+
<h1 id='string'>STRING</h1>
|
|
41
|
+
<script>
|
|
42
|
+
Diagram(
|
|
43
|
+
Choice(0,
|
|
44
|
+
Sequence(
|
|
45
|
+
'"',
|
|
46
|
+
ZeroOrMore(
|
|
47
|
+
Choice(0,
|
|
48
|
+
NonTerminal('not " or \\'),
|
|
49
|
+
NonTerminal('escape'))),
|
|
50
|
+
'"'),
|
|
51
|
+
Sequence(
|
|
52
|
+
"'",
|
|
53
|
+
ZeroOrMore(
|
|
54
|
+
Choice(0,
|
|
55
|
+
NonTerminal("not ' or \\"),
|
|
56
|
+
NonTerminal('escape'))),
|
|
57
|
+
"'"))).addTo();
|
|
58
|
+
</script>
|
|
59
|
+
<h1 id='url'>URL</h1>
|
|
60
|
+
<script>
|
|
61
|
+
Diagram(
|
|
62
|
+
Choice(0, 'u', 'U'),
|
|
63
|
+
Choice(0, 'r', 'R'),
|
|
64
|
+
Choice(0, 'l', 'L'),
|
|
65
|
+
'(',
|
|
66
|
+
Choice(1,
|
|
67
|
+
Optional(NonTerminal('WS')),
|
|
68
|
+
Sequence(
|
|
69
|
+
Optional(NonTerminal('WS')),
|
|
70
|
+
NonTerminal('STRING'),
|
|
71
|
+
Optional(NonTerminal('WS'))),
|
|
72
|
+
Sequence(
|
|
73
|
+
Optional(NonTerminal('WS')),
|
|
74
|
+
OneOrMore(
|
|
75
|
+
Choice(0,
|
|
76
|
+
NonTerminal('not " \' ( ) WS or NPC'),
|
|
77
|
+
NonTerminal('escape'))),
|
|
78
|
+
Optional(NonTerminal('WS')))),
|
|
79
|
+
')').addTo();
|
|
80
|
+
</script>
|
|
81
|
+
<h1>NUMBER</h1>
|
|
82
|
+
<script>
|
|
83
|
+
Diagram(
|
|
84
|
+
Choice(1, '+', Skip(), '-'),
|
|
85
|
+
Choice(0,
|
|
86
|
+
Sequence(
|
|
87
|
+
OneOrMore(NonTerminal('digit')),
|
|
88
|
+
'.',
|
|
89
|
+
OneOrMore(NonTerminal('digit'))),
|
|
90
|
+
OneOrMore(NonTerminal('digit')),
|
|
91
|
+
Sequence(
|
|
92
|
+
'.',
|
|
93
|
+
OneOrMore(NonTerminal('digit')))),
|
|
94
|
+
Choice(0,
|
|
95
|
+
Skip(),
|
|
96
|
+
Sequence(
|
|
97
|
+
Choice(0, 'e', 'E'),
|
|
98
|
+
Choice(1, '+', Skip(), '-'),
|
|
99
|
+
OneOrMore(NonTerminal('digit'))))).addTo();
|
|
100
|
+
</script>
|
|
101
|
+
<h1>DIMENSION</h1>
|
|
102
|
+
<script>
|
|
103
|
+
Diagram(NonTerminal('NUMBER'), NonTerminal('IDENT')).addTo();
|
|
104
|
+
</script>
|
|
105
|
+
<h1>PERCENTAGE</h1>
|
|
106
|
+
<script>
|
|
107
|
+
Diagram(NonTerminal('NUMBER'), '%').addTo();
|
|
108
|
+
</script>
|
|
109
|
+
<h1>UNICODE-RANGE</h1>
|
|
110
|
+
<script>
|
|
111
|
+
Diagram(
|
|
112
|
+
Choice(0,
|
|
113
|
+
'U',
|
|
114
|
+
'u'),
|
|
115
|
+
'+',
|
|
116
|
+
Choice(0,
|
|
117
|
+
Sequence(OneOrMore(NonTerminal('hex digit'), Comment('1-6 times'))),
|
|
118
|
+
Sequence(
|
|
119
|
+
ZeroOrMore(NonTerminal('hex digit'), Comment('1-5 times')),
|
|
120
|
+
OneOrMore('?', Comment('1 to (6 - digits) times'))),
|
|
121
|
+
Sequence(
|
|
122
|
+
OneOrMore(NonTerminal('hex digit'), Comment('1-6 times')),
|
|
123
|
+
'-',
|
|
124
|
+
OneOrMore(NonTerminal('hex digit'), Comment('1-6 times'))))).addTo();
|
|
125
|
+
</script>
|
|
126
|
+
<h1>COMMENT</h1>
|
|
127
|
+
<script>
|
|
128
|
+
Diagram(
|
|
129
|
+
'/*',
|
|
130
|
+
ZeroOrMore(
|
|
131
|
+
NonTerminal("anything but * followed by /")),
|
|
132
|
+
'*/').addTo();
|
|
133
|
+
</script>
|
|
134
|
+
<h1>CDO</h1>
|
|
135
|
+
<script>
|
|
136
|
+
Diagram("<" + "!--").addTo();
|
|
137
|
+
</script>
|
|
138
|
+
<h1>CDC</h1>
|
|
139
|
+
<script>
|
|
140
|
+
Diagram("-->").addTo();
|
|
141
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<title>Railroad Diagram Generator</title>
|
|
3
|
+
<script src="railroad-diagrams.js"></script>
|
|
4
|
+
<link href="railroad-diagrams.css" rel=stylesheet>
|
|
5
|
+
<textarea class='input'>Diagram(
|
|
6
|
+
Optional('+', 'skip'),
|
|
7
|
+
Choice(0,
|
|
8
|
+
NonTerminal('name-start char'),
|
|
9
|
+
NonTerminal('escape')),
|
|
10
|
+
ZeroOrMore(
|
|
11
|
+
Choice(0,
|
|
12
|
+
NonTerminal('name char'),
|
|
13
|
+
NonTerminal('escape'))))</textarea>
|
|
14
|
+
<div class='output-image'></div>
|
|
15
|
+
<textarea class='output-text' readonly></textarea>
|
|
16
|
+
</div>
|
|
17
|
+
<script>
|
|
18
|
+
window.find = document.querySelector.bind(document);
|
|
19
|
+
|
|
20
|
+
find('.input').addEventListener('input', process, false);
|
|
21
|
+
|
|
22
|
+
window.addEventListener('load', process, false);
|
|
23
|
+
|
|
24
|
+
function process() {
|
|
25
|
+
var input = find('.input').value;
|
|
26
|
+
try {
|
|
27
|
+
var result = eval(input).format();
|
|
28
|
+
} catch (e) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
find('.output-image').innerHTML = '';
|
|
32
|
+
result.addTo(find('.output-image'));
|
|
33
|
+
find('.output-text').textContent = result;
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
<style>
|
|
37
|
+
* { box-sizing: border-box; }
|
|
38
|
+
.input {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
width: 50%;
|
|
43
|
+
height: 50%;
|
|
44
|
+
}
|
|
45
|
+
.output-text {
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
width: 50%;
|
|
50
|
+
height: 50%;
|
|
51
|
+
}
|
|
52
|
+
.output-image {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 50%;
|
|
55
|
+
left: 0;
|
|
56
|
+
right: 0;
|
|
57
|
+
height: 50%;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "railroad-diagrams",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A small JS+SVG library for drawing railroad syntax diagrams.",
|
|
5
|
+
"main": "railroad-diagrams.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/tabatkins/railroad-diagrams.git"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"railroad",
|
|
12
|
+
"syntax",
|
|
13
|
+
"diagrams",
|
|
14
|
+
"grammar",
|
|
15
|
+
"svg"
|
|
16
|
+
],
|
|
17
|
+
"author": "Tab Atkins Jr.",
|
|
18
|
+
"license": "CC0-1.0",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/tabatkins/railroad-diagrams/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/tabatkins/railroad-diagrams"
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
svg.railroad-diagram {
|
|
2
|
+
background-color: hsl(30,20%,95%);
|
|
3
|
+
}
|
|
4
|
+
svg.railroad-diagram path {
|
|
5
|
+
stroke-width: 3;
|
|
6
|
+
stroke: black;
|
|
7
|
+
fill: rgba(0,0,0,0);
|
|
8
|
+
}
|
|
9
|
+
svg.railroad-diagram text {
|
|
10
|
+
font: bold 14px monospace;
|
|
11
|
+
text-anchor: middle;
|
|
12
|
+
}
|
|
13
|
+
svg.railroad-diagram text.label {
|
|
14
|
+
text-anchor: start;
|
|
15
|
+
}
|
|
16
|
+
svg.railroad-diagram text.comment {
|
|
17
|
+
font: italic 12px monospace;
|
|
18
|
+
}
|
|
19
|
+
svg.railroad-diagram rect {
|
|
20
|
+
stroke-width: 3;
|
|
21
|
+
stroke: black;
|
|
22
|
+
fill: hsl(120,100%,90%);
|
|
23
|
+
}
|