usesteady 0.1.0-alpha.1
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/LICENSE +186 -0
- package/README.md +724 -0
- package/bin/use-steady.js +13 -0
- package/dist/server-store.d.ts +68 -0
- package/dist/server-store.d.ts.map +1 -0
- package/dist/server-store.js +133 -0
- package/dist/server-store.js.map +1 -0
- package/dist/server.d.ts +35 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +569 -0
- package/dist/server.js.map +1 -0
- package/dist/src/claude/adapters/api-adapter.d.ts +99 -0
- package/dist/src/claude/adapters/api-adapter.d.ts.map +1 -0
- package/dist/src/claude/adapters/api-adapter.js +415 -0
- package/dist/src/claude/adapters/api-adapter.js.map +1 -0
- package/dist/src/claude/adapters/stub-adapter.d.ts +73 -0
- package/dist/src/claude/adapters/stub-adapter.d.ts.map +1 -0
- package/dist/src/claude/adapters/stub-adapter.js +114 -0
- package/dist/src/claude/adapters/stub-adapter.js.map +1 -0
- package/dist/src/claude/artifact-mapper.d.ts +85 -0
- package/dist/src/claude/artifact-mapper.d.ts.map +1 -0
- package/dist/src/claude/artifact-mapper.js +187 -0
- package/dist/src/claude/artifact-mapper.js.map +1 -0
- package/dist/src/claude/delivery-gate.d.ts +136 -0
- package/dist/src/claude/delivery-gate.d.ts.map +1 -0
- package/dist/src/claude/delivery-gate.js +231 -0
- package/dist/src/claude/delivery-gate.js.map +1 -0
- package/dist/src/claude/index.d.ts +24 -0
- package/dist/src/claude/index.d.ts.map +1 -0
- package/dist/src/claude/index.js +23 -0
- package/dist/src/claude/index.js.map +1 -0
- package/dist/src/claude/types.d.ts +223 -0
- package/dist/src/claude/types.d.ts.map +1 -0
- package/dist/src/claude/types.js +64 -0
- package/dist/src/claude/types.js.map +1 -0
- package/dist/src/control/compiler.d.ts +125 -0
- package/dist/src/control/compiler.d.ts.map +1 -0
- package/dist/src/control/compiler.js +179 -0
- package/dist/src/control/compiler.js.map +1 -0
- package/dist/src/control/constraints.d.ts +42 -0
- package/dist/src/control/constraints.d.ts.map +1 -0
- package/dist/src/control/constraints.js +116 -0
- package/dist/src/control/constraints.js.map +1 -0
- package/dist/src/control/drift-detector.d.ts +49 -0
- package/dist/src/control/drift-detector.d.ts.map +1 -0
- package/dist/src/control/drift-detector.js +115 -0
- package/dist/src/control/drift-detector.js.map +1 -0
- package/dist/src/control/index.d.ts +44 -0
- package/dist/src/control/index.d.ts.map +1 -0
- package/dist/src/control/index.js +40 -0
- package/dist/src/control/index.js.map +1 -0
- package/dist/src/control/types.d.ts +144 -0
- package/dist/src/control/types.d.ts.map +1 -0
- package/dist/src/control/types.js +57 -0
- package/dist/src/control/types.js.map +1 -0
- package/dist/src/cursor/adapters/inprocess-adapter.d.ts +78 -0
- package/dist/src/cursor/adapters/inprocess-adapter.d.ts.map +1 -0
- package/dist/src/cursor/adapters/inprocess-adapter.js +308 -0
- package/dist/src/cursor/adapters/inprocess-adapter.js.map +1 -0
- package/dist/src/cursor/adapters/stub-adapter.d.ts +75 -0
- package/dist/src/cursor/adapters/stub-adapter.d.ts.map +1 -0
- package/dist/src/cursor/adapters/stub-adapter.js +120 -0
- package/dist/src/cursor/adapters/stub-adapter.js.map +1 -0
- package/dist/src/cursor/artifact-mapper.d.ts +81 -0
- package/dist/src/cursor/artifact-mapper.d.ts.map +1 -0
- package/dist/src/cursor/artifact-mapper.js +203 -0
- package/dist/src/cursor/artifact-mapper.js.map +1 -0
- package/dist/src/cursor/delivery-gate.d.ts +144 -0
- package/dist/src/cursor/delivery-gate.d.ts.map +1 -0
- package/dist/src/cursor/delivery-gate.js +208 -0
- package/dist/src/cursor/delivery-gate.js.map +1 -0
- package/dist/src/cursor/glob-matcher.d.ts +30 -0
- package/dist/src/cursor/glob-matcher.d.ts.map +1 -0
- package/dist/src/cursor/glob-matcher.js +68 -0
- package/dist/src/cursor/glob-matcher.js.map +1 -0
- package/dist/src/cursor/index.d.ts +43 -0
- package/dist/src/cursor/index.d.ts.map +1 -0
- package/dist/src/cursor/index.js +44 -0
- package/dist/src/cursor/index.js.map +1 -0
- package/dist/src/cursor/ocd-evaluator.d.ts +89 -0
- package/dist/src/cursor/ocd-evaluator.d.ts.map +1 -0
- package/dist/src/cursor/ocd-evaluator.js +142 -0
- package/dist/src/cursor/ocd-evaluator.js.map +1 -0
- package/dist/src/cursor/types.d.ts +309 -0
- package/dist/src/cursor/types.d.ts.map +1 -0
- package/dist/src/cursor/types.js +48 -0
- package/dist/src/cursor/types.js.map +1 -0
- package/dist/src/execution/claude/claude-execution-coordinator.d.ts +164 -0
- package/dist/src/execution/claude/claude-execution-coordinator.d.ts.map +1 -0
- package/dist/src/execution/claude/claude-execution-coordinator.js +198 -0
- package/dist/src/execution/claude/claude-execution-coordinator.js.map +1 -0
- package/dist/src/execution/claude/index.d.ts +13 -0
- package/dist/src/execution/claude/index.d.ts.map +1 -0
- package/dist/src/execution/claude/index.js +12 -0
- package/dist/src/execution/claude/index.js.map +1 -0
- package/dist/src/execution/cursor/cursor-execution-coordinator.d.ts +216 -0
- package/dist/src/execution/cursor/cursor-execution-coordinator.d.ts.map +1 -0
- package/dist/src/execution/cursor/cursor-execution-coordinator.js +233 -0
- package/dist/src/execution/cursor/cursor-execution-coordinator.js.map +1 -0
- package/dist/src/execution/cursor/index.d.ts +20 -0
- package/dist/src/execution/cursor/index.d.ts.map +1 -0
- package/dist/src/execution/cursor/index.js +18 -0
- package/dist/src/execution/cursor/index.js.map +1 -0
- package/dist/src/execution/reminders/index.d.ts +11 -0
- package/dist/src/execution/reminders/index.d.ts.map +1 -0
- package/dist/src/execution/reminders/index.js +9 -0
- package/dist/src/execution/reminders/index.js.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-coordinator.d.ts +125 -0
- package/dist/src/execution/reminders/reminder-execution-coordinator.d.ts.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-coordinator.js +129 -0
- package/dist/src/execution/reminders/reminder-execution-coordinator.js.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-types.d.ts +161 -0
- package/dist/src/execution/reminders/reminder-execution-types.d.ts.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-types.js +39 -0
- package/dist/src/execution/reminders/reminder-execution-types.js.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-validator.d.ts +45 -0
- package/dist/src/execution/reminders/reminder-execution-validator.d.ts.map +1 -0
- package/dist/src/execution/reminders/reminder-execution-validator.js +92 -0
- package/dist/src/execution/reminders/reminder-execution-validator.js.map +1 -0
- package/dist/src/execution/reminders/reminder-executor.d.ts +62 -0
- package/dist/src/execution/reminders/reminder-executor.d.ts.map +1 -0
- package/dist/src/execution/reminders/reminder-executor.js +113 -0
- package/dist/src/execution/reminders/reminder-executor.js.map +1 -0
- package/dist/src/execution/reminders/reminder-time-parser.d.ts +41 -0
- package/dist/src/execution/reminders/reminder-time-parser.d.ts.map +1 -0
- package/dist/src/execution/reminders/reminder-time-parser.js +113 -0
- package/dist/src/execution/reminders/reminder-time-parser.js.map +1 -0
- package/dist/src/friction/auto-capture.d.ts +38 -0
- package/dist/src/friction/auto-capture.d.ts.map +1 -0
- package/dist/src/friction/auto-capture.js +133 -0
- package/dist/src/friction/auto-capture.js.map +1 -0
- package/dist/src/friction/client.d.ts +39 -0
- package/dist/src/friction/client.d.ts.map +1 -0
- package/dist/src/friction/client.js +165 -0
- package/dist/src/friction/client.js.map +1 -0
- package/dist/src/friction/config.d.ts +16 -0
- package/dist/src/friction/config.d.ts.map +1 -0
- package/dist/src/friction/config.js +56 -0
- package/dist/src/friction/config.js.map +1 -0
- package/dist/src/friction/github-auth.d.ts +41 -0
- package/dist/src/friction/github-auth.d.ts.map +1 -0
- package/dist/src/friction/github-auth.js +155 -0
- package/dist/src/friction/github-auth.js.map +1 -0
- package/dist/src/friction/github-issues.d.ts +51 -0
- package/dist/src/friction/github-issues.d.ts.map +1 -0
- package/dist/src/friction/github-issues.js +118 -0
- package/dist/src/friction/github-issues.js.map +1 -0
- package/dist/src/friction/payout-ledger.d.ts +45 -0
- package/dist/src/friction/payout-ledger.d.ts.map +1 -0
- package/dist/src/friction/payout-ledger.js +111 -0
- package/dist/src/friction/payout-ledger.js.map +1 -0
- package/dist/src/friction/queue.d.ts +42 -0
- package/dist/src/friction/queue.d.ts.map +1 -0
- package/dist/src/friction/queue.js +179 -0
- package/dist/src/friction/queue.js.map +1 -0
- package/dist/src/friction/reviewer.d.ts +42 -0
- package/dist/src/friction/reviewer.d.ts.map +1 -0
- package/dist/src/friction/reviewer.js +269 -0
- package/dist/src/friction/reviewer.js.map +1 -0
- package/dist/src/friction/types.d.ts +63 -0
- package/dist/src/friction/types.d.ts.map +1 -0
- package/dist/src/friction/types.js +18 -0
- package/dist/src/friction/types.js.map +1 -0
- package/dist/src/history/index.d.ts +39 -0
- package/dist/src/history/index.d.ts.map +1 -0
- package/dist/src/history/index.js +41 -0
- package/dist/src/history/index.js.map +1 -0
- package/dist/src/history/session-chain.d.ts +36 -0
- package/dist/src/history/session-chain.d.ts.map +1 -0
- package/dist/src/history/session-chain.js +91 -0
- package/dist/src/history/session-chain.js.map +1 -0
- package/dist/src/history/types.d.ts +130 -0
- package/dist/src/history/types.d.ts.map +1 -0
- package/dist/src/history/types.js +32 -0
- package/dist/src/history/types.js.map +1 -0
- package/dist/src/history/workflow-history.d.ts +48 -0
- package/dist/src/history/workflow-history.d.ts.map +1 -0
- package/dist/src/history/workflow-history.js +116 -0
- package/dist/src/history/workflow-history.js.map +1 -0
- package/dist/src/index.d.ts +88 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +58 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/intake/classify-intent-state.d.ts +20 -0
- package/dist/src/intake/classify-intent-state.d.ts.map +1 -0
- package/dist/src/intake/classify-intent-state.js +29 -0
- package/dist/src/intake/classify-intent-state.js.map +1 -0
- package/dist/src/intake/intake-service.d.ts +105 -0
- package/dist/src/intake/intake-service.d.ts.map +1 -0
- package/dist/src/intake/intake-service.js +407 -0
- package/dist/src/intake/intake-service.js.map +1 -0
- package/dist/src/intake/response-planner.d.ts +25 -0
- package/dist/src/intake/response-planner.d.ts.map +1 -0
- package/dist/src/intake/response-planner.js +52 -0
- package/dist/src/intake/response-planner.js.map +1 -0
- package/dist/src/intake/signal-extractor.d.ts +25 -0
- package/dist/src/intake/signal-extractor.d.ts.map +1 -0
- package/dist/src/intake/signal-extractor.js +42 -0
- package/dist/src/intake/signal-extractor.js.map +1 -0
- package/dist/src/intake/trace.d.ts +157 -0
- package/dist/src/intake/trace.d.ts.map +1 -0
- package/dist/src/intake/trace.js +38 -0
- package/dist/src/intake/trace.js.map +1 -0
- package/dist/src/intake/types.d.ts +70 -0
- package/dist/src/intake/types.d.ts.map +1 -0
- package/dist/src/intake/types.js +30 -0
- package/dist/src/intake/types.js.map +1 -0
- package/dist/src/interaction/defaults.d.ts +12 -0
- package/dist/src/interaction/defaults.d.ts.map +1 -0
- package/dist/src/interaction/defaults.js +26 -0
- package/dist/src/interaction/defaults.js.map +1 -0
- package/dist/src/interaction/guidance-order.d.ts +53 -0
- package/dist/src/interaction/guidance-order.d.ts.map +1 -0
- package/dist/src/interaction/guidance-order.js +131 -0
- package/dist/src/interaction/guidance-order.js.map +1 -0
- package/dist/src/interaction/observe.d.ts +57 -0
- package/dist/src/interaction/observe.d.ts.map +1 -0
- package/dist/src/interaction/observe.js +77 -0
- package/dist/src/interaction/observe.js.map +1 -0
- package/dist/src/interaction/selectors.d.ts +16 -0
- package/dist/src/interaction/selectors.d.ts.map +1 -0
- package/dist/src/interaction/selectors.js +23 -0
- package/dist/src/interaction/selectors.js.map +1 -0
- package/dist/src/interaction/types.d.ts +105 -0
- package/dist/src/interaction/types.d.ts.map +1 -0
- package/dist/src/interaction/types.js +48 -0
- package/dist/src/interaction/types.js.map +1 -0
- package/dist/src/interaction/updater.d.ts +22 -0
- package/dist/src/interaction/updater.d.ts.map +1 -0
- package/dist/src/interaction/updater.js +87 -0
- package/dist/src/interaction/updater.js.map +1 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-detector.d.ts +48 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-detector.d.ts.map +1 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-detector.js +107 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-detector.js.map +1 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-types.d.ts +43 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-types.d.ts.map +1 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-types.js +20 -0
- package/dist/src/present/boundary-explanation/boundary-explanation-types.js.map +1 -0
- package/dist/src/present/boundary-explanation/index.d.ts +10 -0
- package/dist/src/present/boundary-explanation/index.d.ts.map +1 -0
- package/dist/src/present/boundary-explanation/index.js +2 -0
- package/dist/src/present/boundary-explanation/index.js.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-assertions.d.ts +70 -0
- package/dist/src/present/control-visibility/control-visibility-assertions.d.ts.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-assertions.js +138 -0
- package/dist/src/present/control-visibility/control-visibility-assertions.js.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-evaluator.d.ts +67 -0
- package/dist/src/present/control-visibility/control-visibility-evaluator.d.ts.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-evaluator.js +146 -0
- package/dist/src/present/control-visibility/control-visibility-evaluator.js.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-types.d.ts +113 -0
- package/dist/src/present/control-visibility/control-visibility-types.d.ts.map +1 -0
- package/dist/src/present/control-visibility/control-visibility-types.js +24 -0
- package/dist/src/present/control-visibility/control-visibility-types.js.map +1 -0
- package/dist/src/present/control-visibility/index.d.ts +16 -0
- package/dist/src/present/control-visibility/index.d.ts.map +1 -0
- package/dist/src/present/control-visibility/index.js +15 -0
- package/dist/src/present/control-visibility/index.js.map +1 -0
- package/dist/src/present/format.d.ts +57 -0
- package/dist/src/present/format.d.ts.map +1 -0
- package/dist/src/present/format.js +150 -0
- package/dist/src/present/format.js.map +1 -0
- package/dist/src/present/present-coordinator.d.ts +153 -0
- package/dist/src/present/present-coordinator.d.ts.map +1 -0
- package/dist/src/present/present-coordinator.js +213 -0
- package/dist/src/present/present-coordinator.js.map +1 -0
- package/dist/src/present/reminders/index.d.ts +22 -0
- package/dist/src/present/reminders/index.d.ts.map +1 -0
- package/dist/src/present/reminders/index.js +22 -0
- package/dist/src/present/reminders/index.js.map +1 -0
- package/dist/src/present/reminders/reminder-presenter.d.ts +76 -0
- package/dist/src/present/reminders/reminder-presenter.d.ts.map +1 -0
- package/dist/src/present/reminders/reminder-presenter.js +359 -0
- package/dist/src/present/reminders/reminder-presenter.js.map +1 -0
- package/dist/src/present/reminders/reminder-renderer.d.ts +82 -0
- package/dist/src/present/reminders/reminder-renderer.d.ts.map +1 -0
- package/dist/src/present/reminders/reminder-renderer.js +136 -0
- package/dist/src/present/reminders/reminder-renderer.js.map +1 -0
- package/dist/src/present/reminders/reminder-types.d.ts +131 -0
- package/dist/src/present/reminders/reminder-types.d.ts.map +1 -0
- package/dist/src/present/reminders/reminder-types.js +29 -0
- package/dist/src/present/reminders/reminder-types.js.map +1 -0
- package/dist/src/present/types.d.ts +114 -0
- package/dist/src/present/types.d.ts.map +1 -0
- package/dist/src/present/types.js +18 -0
- package/dist/src/present/types.js.map +1 -0
- package/dist/src/product/claude-product-session.d.ts +146 -0
- package/dist/src/product/claude-product-session.d.ts.map +1 -0
- package/dist/src/product/claude-product-session.js +362 -0
- package/dist/src/product/claude-product-session.js.map +1 -0
- package/dist/src/product/cursor-product-session.d.ts +211 -0
- package/dist/src/product/cursor-product-session.d.ts.map +1 -0
- package/dist/src/product/cursor-product-session.js +390 -0
- package/dist/src/product/cursor-product-session.js.map +1 -0
- package/dist/src/product/index.d.ts +28 -0
- package/dist/src/product/index.d.ts.map +1 -0
- package/dist/src/product/index.js +22 -0
- package/dist/src/product/index.js.map +1 -0
- package/dist/src/product/session-resilience/index.d.ts +17 -0
- package/dist/src/product/session-resilience/index.d.ts.map +1 -0
- package/dist/src/product/session-resilience/index.js +15 -0
- package/dist/src/product/session-resilience/index.js.map +1 -0
- package/dist/src/product/session-resilience/session-serializer.d.ts +43 -0
- package/dist/src/product/session-resilience/session-serializer.d.ts.map +1 -0
- package/dist/src/product/session-resilience/session-serializer.js +84 -0
- package/dist/src/product/session-resilience/session-serializer.js.map +1 -0
- package/dist/src/product/session-resilience/session-snapshot-types.d.ts +35 -0
- package/dist/src/product/session-resilience/session-snapshot-types.d.ts.map +1 -0
- package/dist/src/product/session-resilience/session-snapshot-types.js +21 -0
- package/dist/src/product/session-resilience/session-snapshot-types.js.map +1 -0
- package/dist/src/product/session-resilience/session-staleness.d.ts +54 -0
- package/dist/src/product/session-resilience/session-staleness.d.ts.map +1 -0
- package/dist/src/product/session-resilience/session-staleness.js +62 -0
- package/dist/src/product/session-resilience/session-staleness.js.map +1 -0
- package/dist/src/product/session-resilience/session-summary.d.ts +40 -0
- package/dist/src/product/session-resilience/session-summary.d.ts.map +1 -0
- package/dist/src/product/session-resilience/session-summary.js +72 -0
- package/dist/src/product/session-resilience/session-summary.js.map +1 -0
- package/dist/src/prv/patterns.d.ts +32 -0
- package/dist/src/prv/patterns.d.ts.map +1 -0
- package/dist/src/prv/patterns.js +40 -0
- package/dist/src/prv/patterns.js.map +1 -0
- package/dist/src/prv/prv.d.ts +13 -0
- package/dist/src/prv/prv.d.ts.map +1 -0
- package/dist/src/prv/prv.js +22 -0
- package/dist/src/prv/prv.js.map +1 -0
- package/dist/src/prv/types.d.ts +26 -0
- package/dist/src/prv/types.d.ts.map +1 -0
- package/dist/src/prv/types.js +15 -0
- package/dist/src/prv/types.js.map +1 -0
- package/dist/src/safety/detectors/arbitrary-exec.detector.d.ts +3 -0
- package/dist/src/safety/detectors/arbitrary-exec.detector.d.ts.map +1 -0
- package/dist/src/safety/detectors/arbitrary-exec.detector.js +31 -0
- package/dist/src/safety/detectors/arbitrary-exec.detector.js.map +1 -0
- package/dist/src/safety/detectors/bulk-data-exfil.detector.d.ts +21 -0
- package/dist/src/safety/detectors/bulk-data-exfil.detector.d.ts.map +1 -0
- package/dist/src/safety/detectors/bulk-data-exfil.detector.js +90 -0
- package/dist/src/safety/detectors/bulk-data-exfil.detector.js.map +1 -0
- package/dist/src/safety/detectors/destructive.detector.d.ts +3 -0
- package/dist/src/safety/detectors/destructive.detector.d.ts.map +1 -0
- package/dist/src/safety/detectors/destructive.detector.js +28 -0
- package/dist/src/safety/detectors/destructive.detector.js.map +1 -0
- package/dist/src/safety/detectors/evasion.detector.d.ts +3 -0
- package/dist/src/safety/detectors/evasion.detector.d.ts.map +1 -0
- package/dist/src/safety/detectors/evasion.detector.js +28 -0
- package/dist/src/safety/detectors/evasion.detector.js.map +1 -0
- package/dist/src/safety/detectors/secret-access.detector.d.ts +31 -0
- package/dist/src/safety/detectors/secret-access.detector.d.ts.map +1 -0
- package/dist/src/safety/detectors/secret-access.detector.js +78 -0
- package/dist/src/safety/detectors/secret-access.detector.js.map +1 -0
- package/dist/src/safety/registry.d.ts +9 -0
- package/dist/src/safety/registry.d.ts.map +1 -0
- package/dist/src/safety/registry.js +22 -0
- package/dist/src/safety/registry.js.map +1 -0
- package/dist/src/safety/safety-gate.d.ts +16 -0
- package/dist/src/safety/safety-gate.d.ts.map +1 -0
- package/dist/src/safety/safety-gate.js +26 -0
- package/dist/src/safety/safety-gate.js.map +1 -0
- package/dist/src/safety/types.d.ts +35 -0
- package/dist/src/safety/types.d.ts.map +1 -0
- package/dist/src/safety/types.js +14 -0
- package/dist/src/safety/types.js.map +1 -0
- package/dist/src/shell/claude-shell.d.ts +63 -0
- package/dist/src/shell/claude-shell.d.ts.map +1 -0
- package/dist/src/shell/claude-shell.js +81 -0
- package/dist/src/shell/claude-shell.js.map +1 -0
- package/dist/src/shell/cli/friction-admin.d.ts +14 -0
- package/dist/src/shell/cli/friction-admin.d.ts.map +1 -0
- package/dist/src/shell/cli/friction-admin.js +276 -0
- package/dist/src/shell/cli/friction-admin.js.map +1 -0
- package/dist/src/shell/cli/friction-report.d.ts +16 -0
- package/dist/src/shell/cli/friction-report.d.ts.map +1 -0
- package/dist/src/shell/cli/friction-report.js +156 -0
- package/dist/src/shell/cli/friction-report.js.map +1 -0
- package/dist/src/shell/cli/main.d.ts +68 -0
- package/dist/src/shell/cli/main.d.ts.map +1 -0
- package/dist/src/shell/cli/main.js +488 -0
- package/dist/src/shell/cli/main.js.map +1 -0
- package/dist/src/shell/cli/use-steady.d.ts +26 -0
- package/dist/src/shell/cli/use-steady.d.ts.map +1 -0
- package/dist/src/shell/cli/use-steady.js +117 -0
- package/dist/src/shell/cli/use-steady.js.map +1 -0
- package/dist/src/shell/cursor-shell.d.ts +63 -0
- package/dist/src/shell/cursor-shell.d.ts.map +1 -0
- package/dist/src/shell/cursor-shell.js +88 -0
- package/dist/src/shell/cursor-shell.js.map +1 -0
- package/dist/src/shell/defaults.d.ts +51 -0
- package/dist/src/shell/defaults.d.ts.map +1 -0
- package/dist/src/shell/defaults.js +78 -0
- package/dist/src/shell/defaults.js.map +1 -0
- package/dist/src/shell/history-render.d.ts +56 -0
- package/dist/src/shell/history-render.d.ts.map +1 -0
- package/dist/src/shell/history-render.js +166 -0
- package/dist/src/shell/history-render.js.map +1 -0
- package/dist/src/shell/index.d.ts +43 -0
- package/dist/src/shell/index.d.ts.map +1 -0
- package/dist/src/shell/index.js +45 -0
- package/dist/src/shell/index.js.map +1 -0
- package/dist/src/shell/render.d.ts +42 -0
- package/dist/src/shell/render.d.ts.map +1 -0
- package/dist/src/shell/render.js +122 -0
- package/dist/src/shell/render.js.map +1 -0
- package/dist/src/shell/types.d.ts +46 -0
- package/dist/src/shell/types.d.ts.map +1 -0
- package/dist/src/shell/types.js +19 -0
- package/dist/src/shell/types.js.map +1 -0
- package/dist/src/shell/workflow-defaults.d.ts +23 -0
- package/dist/src/shell/workflow-defaults.d.ts.map +1 -0
- package/dist/src/shell/workflow-defaults.js +27 -0
- package/dist/src/shell/workflow-defaults.js.map +1 -0
- package/dist/src/shell/workflow-render.d.ts +54 -0
- package/dist/src/shell/workflow-render.d.ts.map +1 -0
- package/dist/src/shell/workflow-render.js +319 -0
- package/dist/src/shell/workflow-render.js.map +1 -0
- package/dist/src/shell/workflow-shell.d.ts +110 -0
- package/dist/src/shell/workflow-shell.d.ts.map +1 -0
- package/dist/src/shell/workflow-shell.js +180 -0
- package/dist/src/shell/workflow-shell.js.map +1 -0
- package/dist/src/skills/audit.d.ts +118 -0
- package/dist/src/skills/audit.d.ts.map +1 -0
- package/dist/src/skills/audit.js +147 -0
- package/dist/src/skills/audit.js.map +1 -0
- package/dist/src/skills/invocation.d.ts +131 -0
- package/dist/src/skills/invocation.d.ts.map +1 -0
- package/dist/src/skills/invocation.js +165 -0
- package/dist/src/skills/invocation.js.map +1 -0
- package/dist/src/skills/loader.d.ts +70 -0
- package/dist/src/skills/loader.d.ts.map +1 -0
- package/dist/src/skills/loader.js +220 -0
- package/dist/src/skills/loader.js.map +1 -0
- package/dist/src/skills/local-recovery-adapter.d.ts +49 -0
- package/dist/src/skills/local-recovery-adapter.d.ts.map +1 -0
- package/dist/src/skills/local-recovery-adapter.js +184 -0
- package/dist/src/skills/local-recovery-adapter.js.map +1 -0
- package/dist/src/skills/parser.d.ts +53 -0
- package/dist/src/skills/parser.d.ts.map +1 -0
- package/dist/src/skills/parser.js +336 -0
- package/dist/src/skills/parser.js.map +1 -0
- package/dist/src/skills/registry.d.ts +123 -0
- package/dist/src/skills/registry.d.ts.map +1 -0
- package/dist/src/skills/registry.js +144 -0
- package/dist/src/skills/registry.js.map +1 -0
- package/dist/src/skills/types.d.ts +242 -0
- package/dist/src/skills/types.d.ts.map +1 -0
- package/dist/src/skills/types.js +50 -0
- package/dist/src/skills/types.js.map +1 -0
- package/dist/src/skills/validator.d.ts +31 -0
- package/dist/src/skills/validator.d.ts.map +1 -0
- package/dist/src/skills/validator.js +366 -0
- package/dist/src/skills/validator.js.map +1 -0
- package/dist/src/ucp/envelope.d.ts +165 -0
- package/dist/src/ucp/envelope.d.ts.map +1 -0
- package/dist/src/ucp/envelope.js +241 -0
- package/dist/src/ucp/envelope.js.map +1 -0
- package/dist/src/ucp/hashes.d.ts +36 -0
- package/dist/src/ucp/hashes.d.ts.map +1 -0
- package/dist/src/ucp/hashes.js +59 -0
- package/dist/src/ucp/hashes.js.map +1 -0
- package/dist/src/ucp/mappers/map-artifact.d.ts +58 -0
- package/dist/src/ucp/mappers/map-artifact.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-artifact.js +51 -0
- package/dist/src/ucp/mappers/map-artifact.js.map +1 -0
- package/dist/src/ucp/mappers/map-change-interpretation.d.ts +12 -0
- package/dist/src/ucp/mappers/map-change-interpretation.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-change-interpretation.js +18 -0
- package/dist/src/ucp/mappers/map-change-interpretation.js.map +1 -0
- package/dist/src/ucp/mappers/map-completion.d.ts +10 -0
- package/dist/src/ucp/mappers/map-completion.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-completion.js +24 -0
- package/dist/src/ucp/mappers/map-completion.js.map +1 -0
- package/dist/src/ucp/mappers/map-context.d.ts +9 -0
- package/dist/src/ucp/mappers/map-context.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-context.js +13 -0
- package/dist/src/ucp/mappers/map-context.js.map +1 -0
- package/dist/src/ucp/mappers/map-debug-trace.d.ts +10 -0
- package/dist/src/ucp/mappers/map-debug-trace.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-debug-trace.js +18 -0
- package/dist/src/ucp/mappers/map-debug-trace.js.map +1 -0
- package/dist/src/ucp/mappers/map-disambiguation.d.ts +10 -0
- package/dist/src/ucp/mappers/map-disambiguation.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-disambiguation.js +21 -0
- package/dist/src/ucp/mappers/map-disambiguation.js.map +1 -0
- package/dist/src/ucp/mappers/map-execution-trace.d.ts +64 -0
- package/dist/src/ucp/mappers/map-execution-trace.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-execution-trace.js +57 -0
- package/dist/src/ucp/mappers/map-execution-trace.js.map +1 -0
- package/dist/src/ucp/mappers/map-intent-interpretation.d.ts +11 -0
- package/dist/src/ucp/mappers/map-intent-interpretation.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-intent-interpretation.js +17 -0
- package/dist/src/ucp/mappers/map-intent-interpretation.js.map +1 -0
- package/dist/src/ucp/mappers/map-intent.d.ts +9 -0
- package/dist/src/ucp/mappers/map-intent.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-intent.js +11 -0
- package/dist/src/ucp/mappers/map-intent.js.map +1 -0
- package/dist/src/ucp/mappers/map-prv.d.ts +10 -0
- package/dist/src/ucp/mappers/map-prv.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-prv.js +14 -0
- package/dist/src/ucp/mappers/map-prv.js.map +1 -0
- package/dist/src/ucp/mappers/map-reminder-execution.d.ts +57 -0
- package/dist/src/ucp/mappers/map-reminder-execution.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-reminder-execution.js +69 -0
- package/dist/src/ucp/mappers/map-reminder-execution.js.map +1 -0
- package/dist/src/ucp/mappers/map-replay-report.d.ts +81 -0
- package/dist/src/ucp/mappers/map-replay-report.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-replay-report.js +76 -0
- package/dist/src/ucp/mappers/map-replay-report.js.map +1 -0
- package/dist/src/ucp/mappers/map-response.d.ts +13 -0
- package/dist/src/ucp/mappers/map-response.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-response.js +25 -0
- package/dist/src/ucp/mappers/map-response.js.map +1 -0
- package/dist/src/ucp/mappers/map-safety.d.ts +14 -0
- package/dist/src/ucp/mappers/map-safety.d.ts.map +1 -0
- package/dist/src/ucp/mappers/map-safety.js +22 -0
- package/dist/src/ucp/mappers/map-safety.js.map +1 -0
- package/dist/src/ucp/persistence/index.d.ts +24 -0
- package/dist/src/ucp/persistence/index.d.ts.map +1 -0
- package/dist/src/ucp/persistence/index.js +22 -0
- package/dist/src/ucp/persistence/index.js.map +1 -0
- package/dist/src/ucp/persistence/query.d.ts +164 -0
- package/dist/src/ucp/persistence/query.d.ts.map +1 -0
- package/dist/src/ucp/persistence/query.js +240 -0
- package/dist/src/ucp/persistence/query.js.map +1 -0
- package/dist/src/ucp/persistence/reader.d.ts +43 -0
- package/dist/src/ucp/persistence/reader.d.ts.map +1 -0
- package/dist/src/ucp/persistence/reader.js +104 -0
- package/dist/src/ucp/persistence/reader.js.map +1 -0
- package/dist/src/ucp/persistence/store.d.ts +77 -0
- package/dist/src/ucp/persistence/store.d.ts.map +1 -0
- package/dist/src/ucp/persistence/store.js +177 -0
- package/dist/src/ucp/persistence/store.js.map +1 -0
- package/dist/src/ucp/persistence/write.d.ts +48 -0
- package/dist/src/ucp/persistence/write.d.ts.map +1 -0
- package/dist/src/ucp/persistence/write.js +59 -0
- package/dist/src/ucp/persistence/write.js.map +1 -0
- package/dist/src/ucp/projection.d.ts +146 -0
- package/dist/src/ucp/projection.d.ts.map +1 -0
- package/dist/src/ucp/projection.js +139 -0
- package/dist/src/ucp/projection.js.map +1 -0
- package/dist/src/ucp/types.d.ts +585 -0
- package/dist/src/ucp/types.d.ts.map +1 -0
- package/dist/src/ucp/types.js +57 -0
- package/dist/src/ucp/types.js.map +1 -0
- package/dist/src/understand/completion/completion.d.ts +26 -0
- package/dist/src/understand/completion/completion.d.ts.map +1 -0
- package/dist/src/understand/completion/completion.js +45 -0
- package/dist/src/understand/completion/completion.js.map +1 -0
- package/dist/src/understand/completion/rules.d.ts +61 -0
- package/dist/src/understand/completion/rules.d.ts.map +1 -0
- package/dist/src/understand/completion/rules.js +268 -0
- package/dist/src/understand/completion/rules.js.map +1 -0
- package/dist/src/understand/completion/types.d.ts +68 -0
- package/dist/src/understand/completion/types.d.ts.map +1 -0
- package/dist/src/understand/completion/types.js +34 -0
- package/dist/src/understand/completion/types.js.map +1 -0
- package/dist/src/understand/context/context-alignment.d.ts +18 -0
- package/dist/src/understand/context/context-alignment.d.ts.map +1 -0
- package/dist/src/understand/context/context-alignment.js +61 -0
- package/dist/src/understand/context/context-alignment.js.map +1 -0
- package/dist/src/understand/context/types.d.ts +20 -0
- package/dist/src/understand/context/types.d.ts.map +1 -0
- package/dist/src/understand/context/types.js +13 -0
- package/dist/src/understand/context/types.js.map +1 -0
- package/dist/src/understand/disambiguation/detectors/missing-context.detector.d.ts +12 -0
- package/dist/src/understand/disambiguation/detectors/missing-context.detector.d.ts.map +1 -0
- package/dist/src/understand/disambiguation/detectors/missing-context.detector.js +60 -0
- package/dist/src/understand/disambiguation/detectors/missing-context.detector.js.map +1 -0
- package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.d.ts +13 -0
- package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.d.ts.map +1 -0
- package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.js +57 -0
- package/dist/src/understand/disambiguation/detectors/overloaded-term.detector.js.map +1 -0
- package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.d.ts +16 -0
- package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.d.ts.map +1 -0
- package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.js +56 -0
- package/dist/src/understand/disambiguation/detectors/typo-adjacent.detector.js.map +1 -0
- package/dist/src/understand/disambiguation/registry.d.ts +14 -0
- package/dist/src/understand/disambiguation/registry.d.ts.map +1 -0
- package/dist/src/understand/disambiguation/registry.js +27 -0
- package/dist/src/understand/disambiguation/registry.js.map +1 -0
- package/dist/src/understand/disambiguation/types.d.ts +34 -0
- package/dist/src/understand/disambiguation/types.d.ts.map +1 -0
- package/dist/src/understand/disambiguation/types.js +15 -0
- package/dist/src/understand/disambiguation/types.js.map +1 -0
- package/dist/src/understand/intent-interpretation/intent-interpretation.d.ts +86 -0
- package/dist/src/understand/intent-interpretation/intent-interpretation.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/intent-interpretation.js +141 -0
- package/dist/src/understand/intent-interpretation/intent-interpretation.js.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.d.ts +33 -0
- package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.js +66 -0
- package/dist/src/understand/intent-interpretation/interpreters/color-intent.interpreter.js.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.d.ts +20 -0
- package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.js +80 -0
- package/dist/src/understand/intent-interpretation/interpreters/config-intent.interpreter.js.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.d.ts +25 -0
- package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.js +47 -0
- package/dist/src/understand/intent-interpretation/interpreters/text-intent.interpreter.js.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.d.ts +35 -0
- package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.js +89 -0
- package/dist/src/understand/intent-interpretation/interpreters/workflow-intent.interpreter.js.map +1 -0
- package/dist/src/understand/intent-interpretation/registry.d.ts +18 -0
- package/dist/src/understand/intent-interpretation/registry.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/registry.js +26 -0
- package/dist/src/understand/intent-interpretation/registry.js.map +1 -0
- package/dist/src/understand/intent-interpretation/types.d.ts +83 -0
- package/dist/src/understand/intent-interpretation/types.d.ts.map +1 -0
- package/dist/src/understand/intent-interpretation/types.js +40 -0
- package/dist/src/understand/intent-interpretation/types.js.map +1 -0
- package/dist/src/understand/interpretation/intent.d.ts +72 -0
- package/dist/src/understand/interpretation/intent.d.ts.map +1 -0
- package/dist/src/understand/interpretation/intent.js +414 -0
- package/dist/src/understand/interpretation/intent.js.map +1 -0
- package/dist/src/understand/interpretation/interpretation.d.ts +26 -0
- package/dist/src/understand/interpretation/interpretation.d.ts.map +1 -0
- package/dist/src/understand/interpretation/interpretation.js +43 -0
- package/dist/src/understand/interpretation/interpretation.js.map +1 -0
- package/dist/src/understand/interpretation/parser.d.ts +20 -0
- package/dist/src/understand/interpretation/parser.d.ts.map +1 -0
- package/dist/src/understand/interpretation/parser.js +88 -0
- package/dist/src/understand/interpretation/parser.js.map +1 -0
- package/dist/src/understand/interpretation/rules.d.ts +19 -0
- package/dist/src/understand/interpretation/rules.d.ts.map +1 -0
- package/dist/src/understand/interpretation/rules.js +222 -0
- package/dist/src/understand/interpretation/rules.js.map +1 -0
- package/dist/src/understand/interpretation/types.d.ts +90 -0
- package/dist/src/understand/interpretation/types.d.ts.map +1 -0
- package/dist/src/understand/interpretation/types.js +29 -0
- package/dist/src/understand/interpretation/types.js.map +1 -0
- package/dist/src/understand/shared/types.d.ts +13 -0
- package/dist/src/understand/shared/types.d.ts.map +1 -0
- package/dist/src/understand/shared/types.js +9 -0
- package/dist/src/understand/shared/types.js.map +1 -0
- package/dist/src/understand/silent-guidance/index.d.ts +4 -0
- package/dist/src/understand/silent-guidance/index.d.ts.map +1 -0
- package/dist/src/understand/silent-guidance/index.js +3 -0
- package/dist/src/understand/silent-guidance/index.js.map +1 -0
- package/dist/src/understand/silent-guidance/selector.d.ts +44 -0
- package/dist/src/understand/silent-guidance/selector.d.ts.map +1 -0
- package/dist/src/understand/silent-guidance/selector.js +158 -0
- package/dist/src/understand/silent-guidance/selector.js.map +1 -0
- package/dist/src/understand/silent-guidance/templates.d.ts +31 -0
- package/dist/src/understand/silent-guidance/templates.d.ts.map +1 -0
- package/dist/src/understand/silent-guidance/templates.js +109 -0
- package/dist/src/understand/silent-guidance/templates.js.map +1 -0
- package/dist/src/understand/silent-guidance/types.d.ts +36 -0
- package/dist/src/understand/silent-guidance/types.d.ts.map +1 -0
- package/dist/src/understand/silent-guidance/types.js +2 -0
- package/dist/src/understand/silent-guidance/types.js.map +1 -0
- package/dist/src/workflow/coordinator.d.ts +197 -0
- package/dist/src/workflow/coordinator.d.ts.map +1 -0
- package/dist/src/workflow/coordinator.js +682 -0
- package/dist/src/workflow/coordinator.js.map +1 -0
- package/dist/src/workflow/index.d.ts +30 -0
- package/dist/src/workflow/index.d.ts.map +1 -0
- package/dist/src/workflow/index.js +30 -0
- package/dist/src/workflow/index.js.map +1 -0
- package/dist/src/workflow/types.d.ts +213 -0
- package/dist/src/workflow/types.d.ts.map +1 -0
- package/dist/src/workflow/types.js +27 -0
- package/dist/src/workflow/types.js.map +1 -0
- package/package.json +54 -0
- package/ui/README.md +73 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context Alignment types.
|
|
3
|
+
*
|
|
4
|
+
* Context Alignment classifies whether an input makes sense to process given
|
|
5
|
+
* the current session context. It is the first subsystem of the Understand layer.
|
|
6
|
+
*
|
|
7
|
+
* Results:
|
|
8
|
+
* aligned — normal processable input
|
|
9
|
+
* non_literal — conversational/social input, not a task request
|
|
10
|
+
* hard_mismatch — input requires context that does not exist
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/understand/context/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Missing-context ambiguity detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs that contain underspecified references like "the file",
|
|
5
|
+
* "my project", "the config" without a concrete identifier.
|
|
6
|
+
*
|
|
7
|
+
* These inputs are ambiguous because it is not possible to determine
|
|
8
|
+
* which specific artifact is being referenced.
|
|
9
|
+
*/
|
|
10
|
+
import type { AmbiguityDetector } from "../types.js";
|
|
11
|
+
export declare const missingContextDetector: AmbiguityDetector;
|
|
12
|
+
//# sourceMappingURL=missing-context.detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-context.detector.d.ts","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/missing-context.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAC;AA4C3E,eAAO,MAAM,sBAAsB,EAAE,iBAiBpC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Missing-context ambiguity detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs that contain underspecified references like "the file",
|
|
5
|
+
* "my project", "the config" without a concrete identifier.
|
|
6
|
+
*
|
|
7
|
+
* These inputs are ambiguous because it is not possible to determine
|
|
8
|
+
* which specific artifact is being referenced.
|
|
9
|
+
*/
|
|
10
|
+
const MISSING_CONTEXT_TERMS = [
|
|
11
|
+
{
|
|
12
|
+
pattern: /\bthe\s+file\b(?!\s*["'])/i,
|
|
13
|
+
reference: "the file",
|
|
14
|
+
reason: "'the file' does not specify which file. Use a concrete path.",
|
|
15
|
+
options: [
|
|
16
|
+
'read "path/to/file"',
|
|
17
|
+
'replace "..." with "..." in "path/to/file"',
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
pattern: /\bmy\s+project\b/i,
|
|
22
|
+
reference: "my project",
|
|
23
|
+
reason: "'my project' does not specify a path. Use a concrete workspace or file path.",
|
|
24
|
+
options: [
|
|
25
|
+
"read src/index.ts",
|
|
26
|
+
"list src/",
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
pattern: /\bthe\s+config\b(?!\s*[".])/i,
|
|
31
|
+
reference: "the config",
|
|
32
|
+
reason: "'the config' does not specify which config file.",
|
|
33
|
+
options: [
|
|
34
|
+
'read "tsconfig.json"',
|
|
35
|
+
'read "package.json"',
|
|
36
|
+
'replace "..." with "..." in "config.json"',
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
function findMatch(input) {
|
|
41
|
+
return MISSING_CONTEXT_TERMS.find((entry) => entry.pattern.test(input)) ?? null;
|
|
42
|
+
}
|
|
43
|
+
export const missingContextDetector = {
|
|
44
|
+
id: "missing_context",
|
|
45
|
+
priority: 30,
|
|
46
|
+
supports(input) {
|
|
47
|
+
return findMatch(input) !== null;
|
|
48
|
+
},
|
|
49
|
+
detect(input) {
|
|
50
|
+
const entry = findMatch(input);
|
|
51
|
+
if (entry === null)
|
|
52
|
+
return null;
|
|
53
|
+
return {
|
|
54
|
+
kind: "ambiguous",
|
|
55
|
+
reason: entry.reason,
|
|
56
|
+
options: entry.options,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=missing-context.detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-context.detector.js","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/missing-context.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,MAAM,qBAAqB,GAAuC;IAChE;QACE,OAAO,EAAE,4BAA4B;QACrC,SAAS,EAAE,UAAU;QACrB,MAAM,EAAE,8DAA8D;QACtE,OAAO,EAAE;YACP,qBAAqB;YACrB,4CAA4C;SAC7C;KACF;IACD;QACE,OAAO,EAAE,mBAAmB;QAC5B,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,8EAA8E;QACtF,OAAO,EAAE;YACP,mBAAmB;YACnB,WAAW;SACZ;KACF;IACD;QACE,OAAO,EAAE,8BAA8B;QACvC,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,kDAAkD;QAC1D,OAAO,EAAE;YACP,sBAAsB;YACtB,qBAAqB;YACrB,2CAA2C;SAC5C;KACF;CACF,CAAC;AAEF,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC;AAClF,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,EAAE;IAEZ,QAAQ,CAAC,KAAa;QACpB,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChC,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overloaded term detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs that contain terms with multiple well-known meanings
|
|
5
|
+
* in a development/tooling context.
|
|
6
|
+
*
|
|
7
|
+
* Examples:
|
|
8
|
+
* "latest change" → latest git commit? latest file modification? latest test run?
|
|
9
|
+
* "change button" → change button text? change button color? change button behavior?
|
|
10
|
+
*/
|
|
11
|
+
import type { AmbiguityDetector } from "../types.js";
|
|
12
|
+
export declare const overloadedTermDetector: AmbiguityDetector;
|
|
13
|
+
//# sourceMappingURL=overloaded-term.detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overloaded-term.detector.d.ts","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/overloaded-term.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAC;AAwC3E,eAAO,MAAM,sBAAsB,EAAE,iBAiBpC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overloaded term detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs that contain terms with multiple well-known meanings
|
|
5
|
+
* in a development/tooling context.
|
|
6
|
+
*
|
|
7
|
+
* Examples:
|
|
8
|
+
* "latest change" → latest git commit? latest file modification? latest test run?
|
|
9
|
+
* "change button" → change button text? change button color? change button behavior?
|
|
10
|
+
*/
|
|
11
|
+
const OVERLOADED_TERMS = [
|
|
12
|
+
// NOTE: "latest change" / "show latest change" was removed from here.
|
|
13
|
+
// Completion handles it deterministically as `incomplete` with a specific
|
|
14
|
+
// next step ("show last commit"). Disambiguation should not intercept inputs
|
|
15
|
+
// that completion can resolve with a concrete path.
|
|
16
|
+
{
|
|
17
|
+
// Only fire when the user has NOT specified what to change (e.g. not "change button text"
|
|
18
|
+
// or "change button color") — those are partially resolved and fall through to guided_recovery.
|
|
19
|
+
pattern: /\bchange\s+(the\s+)?button\b(?!\s+(?:text|color|colour|label|style|class))/i,
|
|
20
|
+
term: "change button",
|
|
21
|
+
reason: "'change button' is ambiguous: text, color, behavior, or handler are all valid targets.",
|
|
22
|
+
options: [
|
|
23
|
+
'replace "old text" with "new text" in button component',
|
|
24
|
+
'replace "old-class" with "new-class" in button component',
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
pattern: /\b(update|modify|change)\s+(the\s+)?config\b/i,
|
|
29
|
+
term: "change config",
|
|
30
|
+
reason: "'change config' is ambiguous: which config file and which field are unspecified.",
|
|
31
|
+
options: [
|
|
32
|
+
'replace "old-value" with "new-value" in config.json',
|
|
33
|
+
'replace "old-value" with "new-value" in tsconfig.json',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
function findMatch(input) {
|
|
38
|
+
return OVERLOADED_TERMS.find((entry) => entry.pattern.test(input)) ?? null;
|
|
39
|
+
}
|
|
40
|
+
export const overloadedTermDetector = {
|
|
41
|
+
id: "overloaded_term",
|
|
42
|
+
priority: 20,
|
|
43
|
+
supports(input) {
|
|
44
|
+
return findMatch(input) !== null;
|
|
45
|
+
},
|
|
46
|
+
detect(input) {
|
|
47
|
+
const entry = findMatch(input);
|
|
48
|
+
if (entry === null)
|
|
49
|
+
return null;
|
|
50
|
+
return {
|
|
51
|
+
kind: "ambiguous",
|
|
52
|
+
reason: entry.reason,
|
|
53
|
+
options: entry.options,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=overloaded-term.detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overloaded-term.detector.js","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/overloaded-term.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,MAAM,gBAAgB,GAAuC;IAC3D,sEAAsE;IACtE,0EAA0E;IAC1E,6EAA6E;IAC7E,oDAAoD;IACpD;QACE,0FAA0F;QAC1F,gGAAgG;QAChG,OAAO,EAAE,6EAA6E;QACtF,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,wFAAwF;QAChG,OAAO,EAAE;YACP,wDAAwD;YACxD,0DAA0D;SAC3D;KACF;IACD;QACE,OAAO,EAAE,+CAA+C;QACxD,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,kFAAkF;QAC1F,OAAO,EAAE;YACP,qDAAqD;YACrD,uDAAuD;SACxD;KACF;CACF,CAAC;AAEF,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,EAAE,EAAE,iBAAiB;IACrB,QAAQ,EAAE,EAAE;IAEZ,QAAQ,CAAC,KAAa;QACpB,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChC,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typo-adjacent ambiguity detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs where a word closely resembles another word with a
|
|
5
|
+
* significantly different meaning in a UseSteady context.
|
|
6
|
+
*
|
|
7
|
+
* This is NOT a generic spellchecker. Only well-known, high-risk pairs
|
|
8
|
+
* are registered. The pair must change the semantic meaning materially.
|
|
9
|
+
*
|
|
10
|
+
* Example pair: "loops" vs "loopholes"
|
|
11
|
+
* "fix the loops in the code" → code loop (clear programming construct)
|
|
12
|
+
* "loops" near "approval"/"rule" → might mean loopholes (policy bypass)
|
|
13
|
+
*/
|
|
14
|
+
import type { AmbiguityDetector } from "../types.js";
|
|
15
|
+
export declare const typoAdjacentDetector: AmbiguityDetector;
|
|
16
|
+
//# sourceMappingURL=typo-adjacent.detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typo-adjacent.detector.d.ts","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/typo-adjacent.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAC;AAoC3E,eAAO,MAAM,oBAAoB,EAAE,iBAiBlC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typo-adjacent ambiguity detector.
|
|
3
|
+
*
|
|
4
|
+
* Detects inputs where a word closely resembles another word with a
|
|
5
|
+
* significantly different meaning in a UseSteady context.
|
|
6
|
+
*
|
|
7
|
+
* This is NOT a generic spellchecker. Only well-known, high-risk pairs
|
|
8
|
+
* are registered. The pair must change the semantic meaning materially.
|
|
9
|
+
*
|
|
10
|
+
* Example pair: "loops" vs "loopholes"
|
|
11
|
+
* "fix the loops in the code" → code loop (clear programming construct)
|
|
12
|
+
* "loops" near "approval"/"rule" → might mean loopholes (policy bypass)
|
|
13
|
+
*/
|
|
14
|
+
const TYPO_ADJACENT_PAIRS = [
|
|
15
|
+
{
|
|
16
|
+
// "loops" near policy/rule/approval language → could mean loopholes
|
|
17
|
+
pattern: /\bloops?\b.{0,40}(rule|policy|approval|bypass)/i,
|
|
18
|
+
word: "loops",
|
|
19
|
+
alternatives: [
|
|
20
|
+
"code loops (programming construct)",
|
|
21
|
+
"loopholes (policy bypass attempt — blocked)",
|
|
22
|
+
],
|
|
23
|
+
reason: "'loops' near policy language may mean code loops or loopholes.",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
// Standalone "loops" could go either way in ambiguous context
|
|
27
|
+
pattern: /\b(approval|rule|policy).{0,40}\bloops?\b/i,
|
|
28
|
+
word: "loops",
|
|
29
|
+
alternatives: [
|
|
30
|
+
"code loops (programming construct)",
|
|
31
|
+
"loopholes (policy bypass attempt — blocked)",
|
|
32
|
+
],
|
|
33
|
+
reason: "'loops' near policy language may mean code loops or loopholes.",
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
function matches(input) {
|
|
37
|
+
return TYPO_ADJACENT_PAIRS.find((pair) => pair.pattern.test(input)) ?? null;
|
|
38
|
+
}
|
|
39
|
+
export const typoAdjacentDetector = {
|
|
40
|
+
id: "typo_adjacent",
|
|
41
|
+
priority: 10,
|
|
42
|
+
supports(input) {
|
|
43
|
+
return matches(input) !== null;
|
|
44
|
+
},
|
|
45
|
+
detect(input) {
|
|
46
|
+
const pair = matches(input);
|
|
47
|
+
if (pair === null)
|
|
48
|
+
return null;
|
|
49
|
+
return {
|
|
50
|
+
kind: "ambiguous",
|
|
51
|
+
reason: pair.reason,
|
|
52
|
+
options: pair.alternatives,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=typo-adjacent.detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typo-adjacent.detector.js","sourceRoot":"","sources":["../../../../../src/understand/disambiguation/detectors/typo-adjacent.detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH,MAAM,mBAAmB,GAAiC;IACxD;QACE,oEAAoE;QACpE,OAAO,EAAE,iDAAiD;QAC1D,IAAI,EAAE,OAAO;QACb,YAAY,EAAE;YACZ,oCAAoC;YACpC,6CAA6C;SAC9C;QACD,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,8DAA8D;QAC9D,OAAO,EAAE,4CAA4C;QACrD,IAAI,EAAE,OAAO;QACb,YAAY,EAAE;YACZ,oCAAoC;YACpC,6CAA6C;SAC9C;QACD,MAAM,EAAE,gEAAgE;KACzE;CACF,CAAC;AAEF,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC;AAC9E,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,EAAE,EAAE,eAAe;IACnB,QAAQ,EAAE,EAAE;IAEZ,QAAQ,CAAC,KAAa;QACpB,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,YAAY;SAC3B,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disambiguation detector registry.
|
|
3
|
+
*
|
|
4
|
+
* Detectors are sorted by priority ascending (lower number = runs first).
|
|
5
|
+
*/
|
|
6
|
+
import type { AmbiguityDetector } from "./types.js";
|
|
7
|
+
export declare function getDisambiguationDetectors(): ReadonlyArray<AmbiguityDetector>;
|
|
8
|
+
/**
|
|
9
|
+
* Run all disambiguation detectors in priority order.
|
|
10
|
+
* Returns the first non-null result, or { kind: "unknown" } if none match.
|
|
11
|
+
*/
|
|
12
|
+
import type { DisambiguationResult } from "./types.js";
|
|
13
|
+
export declare function runDisambiguation(input: string): DisambiguationResult;
|
|
14
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/understand/disambiguation/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAWpD,wBAAgB,0BAA0B,IAAI,aAAa,CAAC,iBAAiB,CAAC,CAE7E;AAED;;;GAGG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAQrE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disambiguation detector registry.
|
|
3
|
+
*
|
|
4
|
+
* Detectors are sorted by priority ascending (lower number = runs first).
|
|
5
|
+
*/
|
|
6
|
+
import { typoAdjacentDetector } from "./detectors/typo-adjacent.detector.js";
|
|
7
|
+
import { overloadedTermDetector } from "./detectors/overloaded-term.detector.js";
|
|
8
|
+
import { missingContextDetector } from "./detectors/missing-context.detector.js";
|
|
9
|
+
const REGISTERED_DETECTORS = [
|
|
10
|
+
typoAdjacentDetector,
|
|
11
|
+
overloadedTermDetector,
|
|
12
|
+
missingContextDetector,
|
|
13
|
+
].sort((a, b) => a.priority - b.priority);
|
|
14
|
+
export function getDisambiguationDetectors() {
|
|
15
|
+
return REGISTERED_DETECTORS;
|
|
16
|
+
}
|
|
17
|
+
export function runDisambiguation(input) {
|
|
18
|
+
for (const detector of getDisambiguationDetectors()) {
|
|
19
|
+
if (detector.supports(input)) {
|
|
20
|
+
const result = detector.detect(input);
|
|
21
|
+
if (result !== null)
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return { kind: "unknown" };
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/understand/disambiguation/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,MAAM,oBAAoB,GAAqC;IAC7D,oBAAoB;IACpB,sBAAsB;IACtB,sBAAsB;CACvB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,UAAU,0BAA0B;IACxC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAQD,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,KAAK,MAAM,QAAQ,IAAI,0BAA0B,EAAE,EAAE,CAAC;QACpD,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACtC,IAAI,MAAM,KAAK,IAAI;gBAAE,OAAO,MAAM,CAAC;QACrC,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent Disambiguation types.
|
|
3
|
+
*
|
|
4
|
+
* Disambiguation identifies whether an input has a single clear meaning
|
|
5
|
+
* or multiple competing interpretations.
|
|
6
|
+
*
|
|
7
|
+
* Results:
|
|
8
|
+
* clear — single unambiguous meaning; normalized form provided
|
|
9
|
+
* ambiguous — multiple valid interpretations; bounded options provided
|
|
10
|
+
* unknown — no registered detector matched; no interpretation available
|
|
11
|
+
*
|
|
12
|
+
* Detectors may NOT silently rewrite input. If ambiguous, they MUST return options.
|
|
13
|
+
*/
|
|
14
|
+
export type DisambiguationResult = {
|
|
15
|
+
readonly kind: "clear";
|
|
16
|
+
readonly normalized: string;
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: "ambiguous";
|
|
19
|
+
readonly reason: string;
|
|
20
|
+
readonly options: readonly string[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: "unknown";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* An AmbiguityDetector examines an input and returns a DisambiguationResult
|
|
26
|
+
* if it recognizes a pattern, or null if the input is outside its scope.
|
|
27
|
+
*/
|
|
28
|
+
export type AmbiguityDetector = {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly priority: number;
|
|
31
|
+
supports(input: string): boolean;
|
|
32
|
+
detect(input: string): DisambiguationResult | null;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/understand/disambiguation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC5F;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAAC;CACpD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent Disambiguation types.
|
|
3
|
+
*
|
|
4
|
+
* Disambiguation identifies whether an input has a single clear meaning
|
|
5
|
+
* or multiple competing interpretations.
|
|
6
|
+
*
|
|
7
|
+
* Results:
|
|
8
|
+
* clear — single unambiguous meaning; normalized form provided
|
|
9
|
+
* ambiguous — multiple valid interpretations; bounded options provided
|
|
10
|
+
* unknown — no registered detector matched; no interpretation available
|
|
11
|
+
*
|
|
12
|
+
* Detectors may NOT silently rewrite input. If ambiguous, they MUST return options.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/understand/disambiguation/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent Interpretation Bridge — main entry point.
|
|
3
|
+
*
|
|
4
|
+
* ── What this layer is ────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* The Intent Interpretation Bridge sits between Completion and Response Planner.
|
|
7
|
+
* It runs ONLY when CompletionResult.kind === "guided_recovery" — i.e. the input
|
|
8
|
+
* is safe, not executable yet, but a safe next-step path exists.
|
|
9
|
+
*
|
|
10
|
+
* Its job is to make guided recovery feel more helpful without guessing.
|
|
11
|
+
* It classifies the broad category of what the user appears to be trying to do,
|
|
12
|
+
* then rewrites guidance labels to be context-aware.
|
|
13
|
+
*
|
|
14
|
+
* ── Pipeline position ─────────────────────────────────────────────────────────
|
|
15
|
+
*
|
|
16
|
+
* Completion
|
|
17
|
+
* ↓ (guided_recovery only)
|
|
18
|
+
* Intent Interpretation Bridge ← this module
|
|
19
|
+
* ↓
|
|
20
|
+
* Response Planner
|
|
21
|
+
*
|
|
22
|
+
* ── Hard invariant (locked) ──────────────────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* Interpretation can improve guidance, but it can never manufacture executability.
|
|
25
|
+
*
|
|
26
|
+
* This means the bridge:
|
|
27
|
+
* MAY → classify broad intent (visual_color, text_change, config_change, workflow_operation)
|
|
28
|
+
* MAY → rewrite step labels with category-aware language
|
|
29
|
+
* MAY → add rationale for "read first" steps
|
|
30
|
+
* MAY → run for both guided_recovery and incomplete completions (both become guide mode)
|
|
31
|
+
* MUST NOT → guess file paths
|
|
32
|
+
* MUST NOT → guess current or new values
|
|
33
|
+
* MUST NOT → turn guided_recovery or incomplete into complete
|
|
34
|
+
* MUST NOT → change the mode decision
|
|
35
|
+
* MUST NOT → downgrade safety
|
|
36
|
+
*
|
|
37
|
+
* ── Two interpretation families (keep separate) ───────────────────────────────
|
|
38
|
+
*
|
|
39
|
+
* Change Interpretation (src/understand/interpretation/)
|
|
40
|
+
* → For executable, structured patch commands: replace "X" with "Y" in <file>
|
|
41
|
+
* → Runs when mode === "execute", describes what the change means after the fact
|
|
42
|
+
*
|
|
43
|
+
* Intent Interpretation Bridge (this module)
|
|
44
|
+
* → For vague, incomplete requests: "make the button blue"
|
|
45
|
+
* → Runs when mode === "guide" (guided_recovery), describes what the user
|
|
46
|
+
* appears to be trying to do
|
|
47
|
+
*/
|
|
48
|
+
import type { IntentInterpretation, GuidancePayload } from "./types.js";
|
|
49
|
+
import type { CompletionResult } from "../completion/types.js";
|
|
50
|
+
import type { UnderstandContext } from "../shared/types.js";
|
|
51
|
+
/**
|
|
52
|
+
* Run the interpreter registry against the input.
|
|
53
|
+
*
|
|
54
|
+
* Returns the first safe, non-null interpretation (registry is priority-ordered).
|
|
55
|
+
* Returns null if no interpreter claims the input.
|
|
56
|
+
*
|
|
57
|
+
* CONTRACT: null means "no safe classification exists" — not "unknown".
|
|
58
|
+
* The `unknown` category exists in the type system but the registry never
|
|
59
|
+
* returns it; callers should treat null as "no interpretation available."
|
|
60
|
+
*/
|
|
61
|
+
export declare function runIntentInterpretation(input: string): IntentInterpretation | null;
|
|
62
|
+
/**
|
|
63
|
+
* Bridge function: call after completion returns guided_recovery or incomplete.
|
|
64
|
+
*
|
|
65
|
+
* Both guided_recovery and incomplete lead to `guide` response mode, so both
|
|
66
|
+
* can benefit from interpretation-enriched step labels.
|
|
67
|
+
*
|
|
68
|
+
* @param input Original user input string
|
|
69
|
+
* @param completion The completion result — acts on guided_recovery and incomplete
|
|
70
|
+
* @param _ctx UnderstandContext — reserved for future context-aware enrichment
|
|
71
|
+
* @returns GuidancePayload for guided_recovery / incomplete; null for all other kinds
|
|
72
|
+
*
|
|
73
|
+
* When interpretation is found:
|
|
74
|
+
* → attaches interpretation to guidance
|
|
75
|
+
* → rewrites nextSteps labels to be category-aware
|
|
76
|
+
* → never fills in missing[] values
|
|
77
|
+
*
|
|
78
|
+
* When no interpretation is found:
|
|
79
|
+
* → returns original guidance unchanged (no interpretation field attached)
|
|
80
|
+
*
|
|
81
|
+
* Hard invariant:
|
|
82
|
+
* Interpretation can improve guidance, but it can never manufacture executability.
|
|
83
|
+
* This function MUST NOT return complete or change the mode decision.
|
|
84
|
+
*/
|
|
85
|
+
export declare function enrichGuidance(input: string, completion: CompletionResult, _ctx: UnderstandContext): GuidancePayload | null;
|
|
86
|
+
//# sourceMappingURL=intent-interpretation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-interpretation.d.ts","sourceRoot":"","sources":["../../../../src/understand/intent-interpretation/intent-interpretation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,wBAAwB,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAQlF;AA2DD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,iBAAiB,GACtB,eAAe,GAAG,IAAI,CAiBxB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent Interpretation Bridge — main entry point.
|
|
3
|
+
*
|
|
4
|
+
* ── What this layer is ────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* The Intent Interpretation Bridge sits between Completion and Response Planner.
|
|
7
|
+
* It runs ONLY when CompletionResult.kind === "guided_recovery" — i.e. the input
|
|
8
|
+
* is safe, not executable yet, but a safe next-step path exists.
|
|
9
|
+
*
|
|
10
|
+
* Its job is to make guided recovery feel more helpful without guessing.
|
|
11
|
+
* It classifies the broad category of what the user appears to be trying to do,
|
|
12
|
+
* then rewrites guidance labels to be context-aware.
|
|
13
|
+
*
|
|
14
|
+
* ── Pipeline position ─────────────────────────────────────────────────────────
|
|
15
|
+
*
|
|
16
|
+
* Completion
|
|
17
|
+
* ↓ (guided_recovery only)
|
|
18
|
+
* Intent Interpretation Bridge ← this module
|
|
19
|
+
* ↓
|
|
20
|
+
* Response Planner
|
|
21
|
+
*
|
|
22
|
+
* ── Hard invariant (locked) ──────────────────────────────────────────────────
|
|
23
|
+
*
|
|
24
|
+
* Interpretation can improve guidance, but it can never manufacture executability.
|
|
25
|
+
*
|
|
26
|
+
* This means the bridge:
|
|
27
|
+
* MAY → classify broad intent (visual_color, text_change, config_change, workflow_operation)
|
|
28
|
+
* MAY → rewrite step labels with category-aware language
|
|
29
|
+
* MAY → add rationale for "read first" steps
|
|
30
|
+
* MAY → run for both guided_recovery and incomplete completions (both become guide mode)
|
|
31
|
+
* MUST NOT → guess file paths
|
|
32
|
+
* MUST NOT → guess current or new values
|
|
33
|
+
* MUST NOT → turn guided_recovery or incomplete into complete
|
|
34
|
+
* MUST NOT → change the mode decision
|
|
35
|
+
* MUST NOT → downgrade safety
|
|
36
|
+
*
|
|
37
|
+
* ── Two interpretation families (keep separate) ───────────────────────────────
|
|
38
|
+
*
|
|
39
|
+
* Change Interpretation (src/understand/interpretation/)
|
|
40
|
+
* → For executable, structured patch commands: replace "X" with "Y" in <file>
|
|
41
|
+
* → Runs when mode === "execute", describes what the change means after the fact
|
|
42
|
+
*
|
|
43
|
+
* Intent Interpretation Bridge (this module)
|
|
44
|
+
* → For vague, incomplete requests: "make the button blue"
|
|
45
|
+
* → Runs when mode === "guide" (guided_recovery), describes what the user
|
|
46
|
+
* appears to be trying to do
|
|
47
|
+
*/
|
|
48
|
+
import { ALL_INTENT_INTERPRETERS } from "./registry.js";
|
|
49
|
+
// ─── runIntentInterpretation ──────────────────────────────────────────────────
|
|
50
|
+
/**
|
|
51
|
+
* Run the interpreter registry against the input.
|
|
52
|
+
*
|
|
53
|
+
* Returns the first safe, non-null interpretation (registry is priority-ordered).
|
|
54
|
+
* Returns null if no interpreter claims the input.
|
|
55
|
+
*
|
|
56
|
+
* CONTRACT: null means "no safe classification exists" — not "unknown".
|
|
57
|
+
* The `unknown` category exists in the type system but the registry never
|
|
58
|
+
* returns it; callers should treat null as "no interpretation available."
|
|
59
|
+
*/
|
|
60
|
+
export function runIntentInterpretation(input) {
|
|
61
|
+
for (const interpreter of ALL_INTENT_INTERPRETERS) {
|
|
62
|
+
if (interpreter.matches(input)) {
|
|
63
|
+
const result = interpreter.interpret(input);
|
|
64
|
+
if (result !== null)
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const ENRICHED_STEP_LABELS = {
|
|
71
|
+
visual_color: {
|
|
72
|
+
read_first: 'Read the component file first to find the current color value: read "<file>"',
|
|
73
|
+
use_exact_format: 'Then patch it: replace "<current color>" with "<new color>" in "<file>"',
|
|
74
|
+
add_missing_field: "Add the specific color value that should change.",
|
|
75
|
+
},
|
|
76
|
+
text_change: {
|
|
77
|
+
read_first: 'Read the file first to find the current text: read "<file>"',
|
|
78
|
+
use_exact_format: 'Then patch it: replace "<current text>" with "<new text>" in "<file>"',
|
|
79
|
+
add_missing_field: "Add the specific text string that should change.",
|
|
80
|
+
},
|
|
81
|
+
config_change: {
|
|
82
|
+
read_first: 'Read the config file first to find the current setting: read "<file>"',
|
|
83
|
+
use_exact_format: 'Then update the config: replace "<current value>" with "<new value>" in "<file>"',
|
|
84
|
+
add_missing_field: "Add the specific configuration value that should change.",
|
|
85
|
+
},
|
|
86
|
+
workflow_operation: {
|
|
87
|
+
read_first: "Review the current state before committing: show git status",
|
|
88
|
+
use_exact_format: 'Then commit with a descriptive message: commit "<message>"',
|
|
89
|
+
add_missing_field: "Add a specific commit message that describes the change.",
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
function enrichNextSteps(steps, interpretation) {
|
|
93
|
+
const labels = ENRICHED_STEP_LABELS[interpretation.category];
|
|
94
|
+
if (labels === undefined)
|
|
95
|
+
return steps;
|
|
96
|
+
return steps.map((step) => {
|
|
97
|
+
const enriched = labels[step.type];
|
|
98
|
+
return enriched !== undefined ? { ...step, label: enriched } : step;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// ─── enrichGuidance ────────────────────────────────────────────────────────────
|
|
102
|
+
/**
|
|
103
|
+
* Bridge function: call after completion returns guided_recovery or incomplete.
|
|
104
|
+
*
|
|
105
|
+
* Both guided_recovery and incomplete lead to `guide` response mode, so both
|
|
106
|
+
* can benefit from interpretation-enriched step labels.
|
|
107
|
+
*
|
|
108
|
+
* @param input Original user input string
|
|
109
|
+
* @param completion The completion result — acts on guided_recovery and incomplete
|
|
110
|
+
* @param _ctx UnderstandContext — reserved for future context-aware enrichment
|
|
111
|
+
* @returns GuidancePayload for guided_recovery / incomplete; null for all other kinds
|
|
112
|
+
*
|
|
113
|
+
* When interpretation is found:
|
|
114
|
+
* → attaches interpretation to guidance
|
|
115
|
+
* → rewrites nextSteps labels to be category-aware
|
|
116
|
+
* → never fills in missing[] values
|
|
117
|
+
*
|
|
118
|
+
* When no interpretation is found:
|
|
119
|
+
* → returns original guidance unchanged (no interpretation field attached)
|
|
120
|
+
*
|
|
121
|
+
* Hard invariant:
|
|
122
|
+
* Interpretation can improve guidance, but it can never manufacture executability.
|
|
123
|
+
* This function MUST NOT return complete or change the mode decision.
|
|
124
|
+
*/
|
|
125
|
+
export function enrichGuidance(input, completion, _ctx) {
|
|
126
|
+
if (completion.kind !== "guided_recovery" && completion.kind !== "incomplete")
|
|
127
|
+
return null;
|
|
128
|
+
const interpretation = runIntentInterpretation(input);
|
|
129
|
+
if (interpretation === null) {
|
|
130
|
+
return {
|
|
131
|
+
missing: completion.missing,
|
|
132
|
+
nextSteps: completion.nextSteps,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
missing: completion.missing,
|
|
137
|
+
nextSteps: enrichNextSteps(completion.nextSteps, interpretation),
|
|
138
|
+
interpretation,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=intent-interpretation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-interpretation.js","sourceRoot":"","sources":["../../../../src/understand/intent-interpretation/intent-interpretation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAKH,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,iFAAiF;AAEjF;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,KAAK,MAAM,WAAW,IAAI,uBAAuB,EAAE,CAAC;QAClD,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,MAAM,KAAK,IAAI;gBAAE,OAAO,MAAM,CAAC;QACrC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAUD,MAAM,oBAAoB,GAAyC;IACjE,YAAY,EAAE;QACZ,UAAU,EACR,8EAA8E;QAChF,gBAAgB,EACd,yEAAyE;QAC3E,iBAAiB,EACf,kDAAkD;KACrD;IACD,WAAW,EAAE;QACX,UAAU,EACR,6DAA6D;QAC/D,gBAAgB,EACd,uEAAuE;QACzE,iBAAiB,EACf,kDAAkD;KACrD;IACD,aAAa,EAAE;QACb,UAAU,EACR,uEAAuE;QACzE,gBAAgB,EACd,kFAAkF;QACpF,iBAAiB,EACf,0DAA0D;KAC7D;IACD,kBAAkB,EAAE;QAClB,UAAU,EACR,6DAA6D;QAC/D,gBAAgB,EACd,4DAA4D;QAC9D,iBAAiB,EACf,0DAA0D;KAC7D;CACF,CAAC;AAEF,SAAS,eAAe,CACtB,KAAoC,EACpC,cAAoC;IAEpC,MAAM,MAAM,GAAG,oBAAoB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC7D,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kFAAkF;AAElF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAa,EACb,UAA4B,EAC5B,IAAuB;IAEvB,IAAI,UAAU,CAAC,IAAI,KAAK,iBAAiB,IAAI,UAAU,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,IAAI,CAAC;IAE3F,MAAM,cAAc,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAEtD,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO;YACL,OAAO,EAAI,UAAU,CAAC,OAAO;YAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;SAChC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAS,UAAU,CAAC,OAAO;QAClC,SAAS,EAAO,eAAe,CAAC,UAAU,CAAC,SAAS,EAAE,cAAc,CAAC;QACrE,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color intent interpreter.
|
|
3
|
+
*
|
|
4
|
+
* Scope: detect inputs that appear to be visual/color style changes.
|
|
5
|
+
* Priority 20 — runs after config (which owns toggle/enable verbs).
|
|
6
|
+
*
|
|
7
|
+
* Color signal words: named colors, comparative terms (darker/lighter), and
|
|
8
|
+
* the generic words "color" / "colour".
|
|
9
|
+
*
|
|
10
|
+
* UI target terms: component names that contextualize the color signal and
|
|
11
|
+
* raise confidence from "low" (color word only) to "medium" (color + target).
|
|
12
|
+
*
|
|
13
|
+
* Noun-context guard — DARK MODE:
|
|
14
|
+
* "dark mode" as a compound noun refers to a UI theme variant, not a shade/color
|
|
15
|
+
* change. The word "dark" alone would otherwise trigger this interpreter (false
|
|
16
|
+
* positive). If the input contains the phrase "dark mode", the interpreter returns
|
|
17
|
+
* null and yields to the config interpreter or bridge silence.
|
|
18
|
+
*
|
|
19
|
+
* Examples of the guard in action:
|
|
20
|
+
* "I want to add dark mode" → null (feature request, not color change)
|
|
21
|
+
* "add a dark mode option" → null (same: feature request)
|
|
22
|
+
* "make the background dark" → visual_color (shade change — guard does NOT fire)
|
|
23
|
+
* "darker shade of blue" → visual_color (no "dark mode" phrase — guard OK)
|
|
24
|
+
* "enable dark mode" → config_change (config fires first at priority 10)
|
|
25
|
+
*
|
|
26
|
+
* Language contract:
|
|
27
|
+
* Summary says "appears to be a color/style change request" — medium confidence.
|
|
28
|
+
* Never says "background becomes blue" or infers the component type.
|
|
29
|
+
* basis[] reports the exact matched token so the result is inspectable.
|
|
30
|
+
*/
|
|
31
|
+
import type { IntentInterpreter } from "../types.js";
|
|
32
|
+
export declare const colorIntentInterpreter: IntentInterpreter;
|
|
33
|
+
//# sourceMappingURL=color-intent.interpreter.d.ts.map
|