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,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Present Coordinator — Phase 5, Present Layer integration path.
|
|
3
|
+
*
|
|
4
|
+
* ── Purpose ───────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* A single consumer entry point that:
|
|
7
|
+
* 1. Tries reminder presentation if the raw input has a reminder signal.
|
|
8
|
+
* 2. Falls back to standard intake presentation if no reminder signal is found.
|
|
9
|
+
*
|
|
10
|
+
* Consumers receive a PresentResult discriminated union and route based on kind.
|
|
11
|
+
* The coordinator owns selection. The consumer owns rendering and routing.
|
|
12
|
+
*
|
|
13
|
+
* ── Why a coordinator? ────────────────────────────────────────────────────────
|
|
14
|
+
*
|
|
15
|
+
* The existing formatIntakeResult receives only IntakeResult — it does not see
|
|
16
|
+
* the raw input. Reminder detection requires the raw input (explicit signal
|
|
17
|
+
* matching). The coordinator is the narrow bridge that wires both without
|
|
18
|
+
* mixing their concerns.
|
|
19
|
+
*
|
|
20
|
+
* ── What this is NOT ─────────────────────────────────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* NOT an execution layer — never schedules, stores, or triggers
|
|
23
|
+
* NOT an intake modification — the intake pipeline result is used as-is
|
|
24
|
+
* NOT a decision authority — all decisions came from upstream (intake)
|
|
25
|
+
* NOT an interpreter — no new classification happens here
|
|
26
|
+
*
|
|
27
|
+
* ── Routing contract ─────────────────────────────────────────────────────────
|
|
28
|
+
*
|
|
29
|
+
* Consumer calls presentFromInput(input, intakeResult, trace?).
|
|
30
|
+
* Consumer receives PresentResult.
|
|
31
|
+
* Consumer checks result.kind to route:
|
|
32
|
+
*
|
|
33
|
+
* "reminder" → render with renderReminder(), check actions[].enabled
|
|
34
|
+
* "intake" → render with existing PresentationOutput fields
|
|
35
|
+
*
|
|
36
|
+
* Routing logic lives in the consumer, not here.
|
|
37
|
+
*
|
|
38
|
+
* ── Priority rule ─────────────────────────────────────────────────────────────
|
|
39
|
+
*
|
|
40
|
+
* If the input contains a reminder signal → return kind: "reminder".
|
|
41
|
+
* Otherwise → return kind: "intake".
|
|
42
|
+
*
|
|
43
|
+
* This priority is intentional:
|
|
44
|
+
* - Reminder signal is explicit ("remind me", "set a reminder", etc.)
|
|
45
|
+
* - If the signal is present, reminder shaping is always more useful than
|
|
46
|
+
* a generic guide/execute presentation.
|
|
47
|
+
* - The intake result is still available inside PresentResult for consumers
|
|
48
|
+
* who need it alongside the reminder presentation.
|
|
49
|
+
*
|
|
50
|
+
* ── Future-safety ─────────────────────────────────────────────────────────────
|
|
51
|
+
*
|
|
52
|
+
* When real reminder execution exists, consumers update their routing:
|
|
53
|
+
* On confirm (enabled) → call execution layer.
|
|
54
|
+
* The Present Layer itself never changes for that.
|
|
55
|
+
* PresentResult remains correct.
|
|
56
|
+
*/
|
|
57
|
+
import type { IntakeResult } from "../intake/types.js";
|
|
58
|
+
import type { DebugTrace } from "../intake/trace.js";
|
|
59
|
+
import type { PresentationOutput } from "./types.js";
|
|
60
|
+
import type { ReminderPresentation } from "./reminders/reminder-types.js";
|
|
61
|
+
/**
|
|
62
|
+
* Minimal policy information needed for 5D cross-layer contradiction detection.
|
|
63
|
+
* Callers pass this when they have policy context available.
|
|
64
|
+
*/
|
|
65
|
+
export type PolicyHint = {
|
|
66
|
+
readonly prohibitedGlobs: readonly string[];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Minimal parsed-change shape needed for 5D target-path checks.
|
|
70
|
+
*/
|
|
71
|
+
export type ParsedChangeHint = {
|
|
72
|
+
readonly filePath?: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* PresentResult — what presentFromInput() returns.
|
|
76
|
+
*
|
|
77
|
+
* Discriminate on `kind`:
|
|
78
|
+
*
|
|
79
|
+
* "reminder" — input contained a reminder signal.
|
|
80
|
+
* presentation is a ReminderPresentation.
|
|
81
|
+
* Check presentation.state for completeness.
|
|
82
|
+
* Check presentation.actions[].enabled before routing confirm.
|
|
83
|
+
* intakeResult is included for consumers who need both.
|
|
84
|
+
*
|
|
85
|
+
* "intake" — no reminder signal found, or reminder detection returned null.
|
|
86
|
+
* presentation is a standard PresentationOutput from formatIntakeResult.
|
|
87
|
+
* Existing rendering logic applies.
|
|
88
|
+
*/
|
|
89
|
+
export type PresentResult = {
|
|
90
|
+
readonly kind: "reminder";
|
|
91
|
+
readonly presentation: ReminderPresentation;
|
|
92
|
+
readonly intakeResult: IntakeResult;
|
|
93
|
+
readonly trace?: DebugTrace;
|
|
94
|
+
} | {
|
|
95
|
+
readonly kind: "intake";
|
|
96
|
+
readonly presentation: PresentationOutput;
|
|
97
|
+
readonly intakeResult: IntakeResult;
|
|
98
|
+
readonly trace?: DebugTrace;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Present the result of running an intake pipeline on the given input.
|
|
102
|
+
*
|
|
103
|
+
* @param input The raw input string (same one that was passed to intake).
|
|
104
|
+
* @param intakeResult The result of runIntake / runIntakeWithTrace.
|
|
105
|
+
* @param trace Optional debug trace from runIntakeWithTrace.
|
|
106
|
+
*
|
|
107
|
+
* Returns a PresentResult discriminated union.
|
|
108
|
+
*
|
|
109
|
+
* ── Selection logic ──────────────────────────────────────────────────────────
|
|
110
|
+
*
|
|
111
|
+
* 1. Try presentReminder(input).
|
|
112
|
+
* If non-null → return { kind: "reminder", presentation }.
|
|
113
|
+
* 2. Otherwise → return { kind: "intake", presentation: formatIntakeResult(...) }.
|
|
114
|
+
*
|
|
115
|
+
* ── What consumers do with it ────────────────────────────────────────────────
|
|
116
|
+
*
|
|
117
|
+
* if (result.kind === "reminder") {
|
|
118
|
+
* // Use result.presentation (ReminderPresentation)
|
|
119
|
+
* const rendered = renderReminder(result.presentation);
|
|
120
|
+
* // Check result.presentation.actions.find(a => a.id === "confirm")?.enabled
|
|
121
|
+
* // Show rendered.prompt when state !== "ready_to_confirm"
|
|
122
|
+
* } else {
|
|
123
|
+
* // Use result.presentation (PresentationOutput)
|
|
124
|
+
* // Existing rendering path
|
|
125
|
+
* }
|
|
126
|
+
*
|
|
127
|
+
* ── Determinism guarantee ────────────────────────────────────────────────────
|
|
128
|
+
*
|
|
129
|
+
* Same inputs → same output, always.
|
|
130
|
+
* No session state. No side effects. No randomness.
|
|
131
|
+
*/
|
|
132
|
+
export declare function presentFromInput(input: string, intakeResult: IntakeResult, trace?: DebugTrace, policy?: PolicyHint, parsedChange?: ParsedChangeHint): PresentResult;
|
|
133
|
+
/**
|
|
134
|
+
* Returns true if the reminder presentation is complete and confirmable.
|
|
135
|
+
*
|
|
136
|
+
* Consumers should use this before showing a confirm button as active.
|
|
137
|
+
* If false, the confirm action's enabled flag will also be false —
|
|
138
|
+
* but this helper makes the check explicit and readable.
|
|
139
|
+
*
|
|
140
|
+
* Zero authority: this function never changes what will happen.
|
|
141
|
+
* It only describes the current presentation state.
|
|
142
|
+
*/
|
|
143
|
+
export declare function isReminderConfirmable(result: PresentResult): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Returns the clarification prompt for the current reminder state, or null.
|
|
146
|
+
*
|
|
147
|
+
* Useful when consumers want to display a contextual question to the user
|
|
148
|
+
* without importing and calling renderReminder themselves.
|
|
149
|
+
*
|
|
150
|
+
* Returns null for non-reminder results and for ready_to_confirm (no prompt needed).
|
|
151
|
+
*/
|
|
152
|
+
export declare function getReminderPrompt(result: PresentResult): string | null;
|
|
153
|
+
//# sourceMappingURL=present-coordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"present-coordinator.d.ts","sourceRoot":"","sources":["../../../src/present/present-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAQ,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAe1E;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAMF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GACrB;IACE,QAAQ,CAAC,IAAI,EAAU,UAAU,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAQ,UAAU,CAAC;CACnC,GACD;IACE,QAAQ,CAAC,IAAI,EAAU,QAAQ,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAQ,UAAU,CAAC;CACnC,CAAC;AAMN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAU,MAAM,EACrB,YAAY,EAAG,YAAY,EAC3B,KAAK,CAAC,EAAS,UAAU,EACzB,MAAM,CAAC,EAAQ,UAAU,EACzB,YAAY,CAAC,EAAE,gBAAgB,GAC9B,aAAa,CA8Df;AA2BD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAKpE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAgBtE"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Present Coordinator — Phase 5, Present Layer integration path.
|
|
3
|
+
*
|
|
4
|
+
* ── Purpose ───────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* A single consumer entry point that:
|
|
7
|
+
* 1. Tries reminder presentation if the raw input has a reminder signal.
|
|
8
|
+
* 2. Falls back to standard intake presentation if no reminder signal is found.
|
|
9
|
+
*
|
|
10
|
+
* Consumers receive a PresentResult discriminated union and route based on kind.
|
|
11
|
+
* The coordinator owns selection. The consumer owns rendering and routing.
|
|
12
|
+
*
|
|
13
|
+
* ── Why a coordinator? ────────────────────────────────────────────────────────
|
|
14
|
+
*
|
|
15
|
+
* The existing formatIntakeResult receives only IntakeResult — it does not see
|
|
16
|
+
* the raw input. Reminder detection requires the raw input (explicit signal
|
|
17
|
+
* matching). The coordinator is the narrow bridge that wires both without
|
|
18
|
+
* mixing their concerns.
|
|
19
|
+
*
|
|
20
|
+
* ── What this is NOT ─────────────────────────────────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* NOT an execution layer — never schedules, stores, or triggers
|
|
23
|
+
* NOT an intake modification — the intake pipeline result is used as-is
|
|
24
|
+
* NOT a decision authority — all decisions came from upstream (intake)
|
|
25
|
+
* NOT an interpreter — no new classification happens here
|
|
26
|
+
*
|
|
27
|
+
* ── Routing contract ─────────────────────────────────────────────────────────
|
|
28
|
+
*
|
|
29
|
+
* Consumer calls presentFromInput(input, intakeResult, trace?).
|
|
30
|
+
* Consumer receives PresentResult.
|
|
31
|
+
* Consumer checks result.kind to route:
|
|
32
|
+
*
|
|
33
|
+
* "reminder" → render with renderReminder(), check actions[].enabled
|
|
34
|
+
* "intake" → render with existing PresentationOutput fields
|
|
35
|
+
*
|
|
36
|
+
* Routing logic lives in the consumer, not here.
|
|
37
|
+
*
|
|
38
|
+
* ── Priority rule ─────────────────────────────────────────────────────────────
|
|
39
|
+
*
|
|
40
|
+
* If the input contains a reminder signal → return kind: "reminder".
|
|
41
|
+
* Otherwise → return kind: "intake".
|
|
42
|
+
*
|
|
43
|
+
* This priority is intentional:
|
|
44
|
+
* - Reminder signal is explicit ("remind me", "set a reminder", etc.)
|
|
45
|
+
* - If the signal is present, reminder shaping is always more useful than
|
|
46
|
+
* a generic guide/execute presentation.
|
|
47
|
+
* - The intake result is still available inside PresentResult for consumers
|
|
48
|
+
* who need it alongside the reminder presentation.
|
|
49
|
+
*
|
|
50
|
+
* ── Future-safety ─────────────────────────────────────────────────────────────
|
|
51
|
+
*
|
|
52
|
+
* When real reminder execution exists, consumers update their routing:
|
|
53
|
+
* On confirm (enabled) → call execution layer.
|
|
54
|
+
* The Present Layer itself never changes for that.
|
|
55
|
+
* PresentResult remains correct.
|
|
56
|
+
*/
|
|
57
|
+
import { formatIntakeResult } from "./format.js";
|
|
58
|
+
import { presentReminder } from "./reminders/reminder-presenter.js";
|
|
59
|
+
import { evaluateControlVisibility, assertControlVisibilityConsistency, } from "./control-visibility/index.js";
|
|
60
|
+
import { detectBoundaryExplanation, detectReminderBoundaryExplanation, } from "./boundary-explanation/index.js";
|
|
61
|
+
import { matchesGlob } from "../cursor/glob-matcher.js";
|
|
62
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
63
|
+
// presentFromInput — the single consumer entry point
|
|
64
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
65
|
+
/**
|
|
66
|
+
* Present the result of running an intake pipeline on the given input.
|
|
67
|
+
*
|
|
68
|
+
* @param input The raw input string (same one that was passed to intake).
|
|
69
|
+
* @param intakeResult The result of runIntake / runIntakeWithTrace.
|
|
70
|
+
* @param trace Optional debug trace from runIntakeWithTrace.
|
|
71
|
+
*
|
|
72
|
+
* Returns a PresentResult discriminated union.
|
|
73
|
+
*
|
|
74
|
+
* ── Selection logic ──────────────────────────────────────────────────────────
|
|
75
|
+
*
|
|
76
|
+
* 1. Try presentReminder(input).
|
|
77
|
+
* If non-null → return { kind: "reminder", presentation }.
|
|
78
|
+
* 2. Otherwise → return { kind: "intake", presentation: formatIntakeResult(...) }.
|
|
79
|
+
*
|
|
80
|
+
* ── What consumers do with it ────────────────────────────────────────────────
|
|
81
|
+
*
|
|
82
|
+
* if (result.kind === "reminder") {
|
|
83
|
+
* // Use result.presentation (ReminderPresentation)
|
|
84
|
+
* const rendered = renderReminder(result.presentation);
|
|
85
|
+
* // Check result.presentation.actions.find(a => a.id === "confirm")?.enabled
|
|
86
|
+
* // Show rendered.prompt when state !== "ready_to_confirm"
|
|
87
|
+
* } else {
|
|
88
|
+
* // Use result.presentation (PresentationOutput)
|
|
89
|
+
* // Existing rendering path
|
|
90
|
+
* }
|
|
91
|
+
*
|
|
92
|
+
* ── Determinism guarantee ────────────────────────────────────────────────────
|
|
93
|
+
*
|
|
94
|
+
* Same inputs → same output, always.
|
|
95
|
+
* No session state. No side effects. No randomness.
|
|
96
|
+
*/
|
|
97
|
+
export function presentFromInput(input, intakeResult, trace, policy, parsedChange) {
|
|
98
|
+
const traceField = trace !== undefined ? { trace } : {};
|
|
99
|
+
// ── Try reminder presentation first ───────────────────────────────────────
|
|
100
|
+
const reminderPresentation = presentReminder(input);
|
|
101
|
+
if (reminderPresentation !== null) {
|
|
102
|
+
// 5C: attach boundary explanation for reminder path
|
|
103
|
+
const reminderBoundary = detectReminderBoundaryExplanation(reminderPresentation);
|
|
104
|
+
const enrichedReminder = reminderBoundary
|
|
105
|
+
? { ...reminderPresentation, boundaryExplanation: reminderBoundary }
|
|
106
|
+
: reminderPresentation;
|
|
107
|
+
// CVG read-only hook — compute and assert, output shape unchanged.
|
|
108
|
+
const cvg = evaluateControlVisibility({
|
|
109
|
+
kind: "reminder_presentation",
|
|
110
|
+
presentation: enrichedReminder,
|
|
111
|
+
});
|
|
112
|
+
assertControlVisibilityConsistency(cvg);
|
|
113
|
+
return {
|
|
114
|
+
kind: "reminder",
|
|
115
|
+
presentation: enrichedReminder,
|
|
116
|
+
intakeResult,
|
|
117
|
+
...traceField,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
// ── Fall back to standard intake presentation ─────────────────────────────
|
|
121
|
+
const basePresentation = formatIntakeResult(intakeResult, trace);
|
|
122
|
+
// 5C: detect boundary explanation (first-match-wins)
|
|
123
|
+
let intakeBoundary = detectBoundaryExplanation(input, intakeResult, trace);
|
|
124
|
+
// 5D: cross-layer contradiction detection (only when policy + parsedChange provided)
|
|
125
|
+
const hasContradiction = detectContradiction(intakeResult, policy, parsedChange);
|
|
126
|
+
if (hasContradiction) {
|
|
127
|
+
// policy_may_block_target overrides 5C boundary when 5D fires
|
|
128
|
+
intakeBoundary = {
|
|
129
|
+
code: "policy_may_block_target",
|
|
130
|
+
message: "This change is structurally executable, but the target file may be restricted by policy. Review the target before approving.",
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
// Attach boundary explanation when detected
|
|
134
|
+
const intakePresentation = intakeBoundary
|
|
135
|
+
? { ...basePresentation, boundaryExplanation: intakeBoundary }
|
|
136
|
+
: basePresentation;
|
|
137
|
+
// CVG read-only hook — use provisionally_executable arm when contradiction detected
|
|
138
|
+
const cvgInput = hasContradiction
|
|
139
|
+
? { kind: "intake_provisionally_executable", presentation: intakePresentation }
|
|
140
|
+
: { kind: "intake_presentation", presentation: intakePresentation };
|
|
141
|
+
const cvg = evaluateControlVisibility(cvgInput);
|
|
142
|
+
assertControlVisibilityConsistency(cvg);
|
|
143
|
+
return {
|
|
144
|
+
kind: "intake",
|
|
145
|
+
presentation: intakePresentation,
|
|
146
|
+
intakeResult,
|
|
147
|
+
...traceField,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// ─── 5D contradiction detection ──────────────────────────────────────────────
|
|
151
|
+
/**
|
|
152
|
+
* Returns true when the intake result is "execute" but the parsedChange.filePath
|
|
153
|
+
* matches a prohibited glob in the policy — indicating a likely downstream gate block.
|
|
154
|
+
*
|
|
155
|
+
* Pure function. No side effects. No external calls.
|
|
156
|
+
* Only runs when both policy and parsedChange are provided.
|
|
157
|
+
*/
|
|
158
|
+
function detectContradiction(intakeResult, policy, parsedChange) {
|
|
159
|
+
if (!policy || !parsedChange)
|
|
160
|
+
return false;
|
|
161
|
+
if (intakeResult.mode !== "execute")
|
|
162
|
+
return false;
|
|
163
|
+
const filePath = parsedChange.filePath;
|
|
164
|
+
if (!filePath)
|
|
165
|
+
return false;
|
|
166
|
+
return policy.prohibitedGlobs.some(glob => matchesGlob(filePath, glob));
|
|
167
|
+
}
|
|
168
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
169
|
+
// Consumer routing helpers — zero-authority, purely derived
|
|
170
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
171
|
+
/**
|
|
172
|
+
* Returns true if the reminder presentation is complete and confirmable.
|
|
173
|
+
*
|
|
174
|
+
* Consumers should use this before showing a confirm button as active.
|
|
175
|
+
* If false, the confirm action's enabled flag will also be false —
|
|
176
|
+
* but this helper makes the check explicit and readable.
|
|
177
|
+
*
|
|
178
|
+
* Zero authority: this function never changes what will happen.
|
|
179
|
+
* It only describes the current presentation state.
|
|
180
|
+
*/
|
|
181
|
+
export function isReminderConfirmable(result) {
|
|
182
|
+
return (result.kind === "reminder" &&
|
|
183
|
+
result.presentation.state === "ready_to_confirm");
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Returns the clarification prompt for the current reminder state, or null.
|
|
187
|
+
*
|
|
188
|
+
* Useful when consumers want to display a contextual question to the user
|
|
189
|
+
* without importing and calling renderReminder themselves.
|
|
190
|
+
*
|
|
191
|
+
* Returns null for non-reminder results and for ready_to_confirm (no prompt needed).
|
|
192
|
+
*/
|
|
193
|
+
export function getReminderPrompt(result) {
|
|
194
|
+
if (result.kind !== "reminder")
|
|
195
|
+
return null;
|
|
196
|
+
const { state, subject, time_text } = result.presentation;
|
|
197
|
+
if (state === "ready_to_confirm")
|
|
198
|
+
return null;
|
|
199
|
+
if (state === "needs_time")
|
|
200
|
+
return "When should this reminder trigger?";
|
|
201
|
+
if (state === "needs_subject")
|
|
202
|
+
return "What should this reminder be for?";
|
|
203
|
+
// ambiguous
|
|
204
|
+
// Preserve the ambiguity honestly — don't overclaim what's missing
|
|
205
|
+
const hasSubject = subject !== null;
|
|
206
|
+
const hasTime = time_text !== null;
|
|
207
|
+
if (hasSubject && !hasTime)
|
|
208
|
+
return "When should this reminder trigger?";
|
|
209
|
+
if (hasTime && !hasSubject)
|
|
210
|
+
return "What should this reminder be for?";
|
|
211
|
+
return "Is this a reminder? If so, what would you like to be reminded about, and when?";
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=present-coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"present-coordinator.js","sourceRoot":"","sources":["../../../src/present/present-coordinator.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reminder presentation module — Phase 5, Present Layer.
|
|
3
|
+
*
|
|
4
|
+
* Public exports for the reminder presentation slice.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* import { presentReminder, renderReminder } from "./reminders/index.js";
|
|
8
|
+
*
|
|
9
|
+
* const presentation = presentReminder(rawInput);
|
|
10
|
+
* if (presentation) {
|
|
11
|
+
* const rendered = renderReminder(presentation);
|
|
12
|
+
* // render rendered.headline, rendered.body, rendered.prompt, rendered.actions_label
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* extractReminderCandidate is NOT exported here.
|
|
16
|
+
* It is exported directly from reminder-presenter.ts for testing purposes only.
|
|
17
|
+
*/
|
|
18
|
+
export type { ReminderPresentationState, ReminderConfidence, PresentAction, ReminderPresentation, } from "./reminder-types.js";
|
|
19
|
+
export type { RenderedReminder } from "./reminder-renderer.js";
|
|
20
|
+
export { presentReminder } from "./reminder-presenter.js";
|
|
21
|
+
export { renderReminder } from "./reminder-renderer.js";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/present/reminders/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reminder presentation module — Phase 5, Present Layer.
|
|
3
|
+
*
|
|
4
|
+
* Public exports for the reminder presentation slice.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* import { presentReminder, renderReminder } from "./reminders/index.js";
|
|
8
|
+
*
|
|
9
|
+
* const presentation = presentReminder(rawInput);
|
|
10
|
+
* if (presentation) {
|
|
11
|
+
* const rendered = renderReminder(presentation);
|
|
12
|
+
* // render rendered.headline, rendered.body, rendered.prompt, rendered.actions_label
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* extractReminderCandidate is NOT exported here.
|
|
16
|
+
* It is exported directly from reminder-presenter.ts for testing purposes only.
|
|
17
|
+
*/
|
|
18
|
+
// Presenter (raw input → structured presentation)
|
|
19
|
+
export { presentReminder } from "./reminder-presenter.js";
|
|
20
|
+
// Renderer (structured presentation → display strings)
|
|
21
|
+
export { renderReminder } from "./reminder-renderer.js";
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/present/reminders/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAaH,kDAAkD;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,uDAAuD;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reminder Presenter — Phase 5, Present Layer.
|
|
3
|
+
*
|
|
4
|
+
* ── Responsibility ────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* Takes raw input text and produces a ReminderPresentation, or null if the
|
|
7
|
+
* input does not contain sufficient reminder signal.
|
|
8
|
+
*
|
|
9
|
+
* ── What this is NOT ─────────────────────────────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* NOT a new interpreter — does not enter the intake pipeline
|
|
12
|
+
* NOT an intake pipeline step — does not affect mode, signal, or intentState
|
|
13
|
+
* NOT an execution layer — does not schedule, store, or trigger anything
|
|
14
|
+
* NOT a UCP participant — produces no envelopes
|
|
15
|
+
*
|
|
16
|
+
* ── Architecture position ────────────────────────────────────────────────────
|
|
17
|
+
*
|
|
18
|
+
* Raw input → extractReminderCandidate() → ReminderCandidate | null
|
|
19
|
+
* ↓
|
|
20
|
+
* presentReminder() → ReminderPresentation | null
|
|
21
|
+
*
|
|
22
|
+
* presentReminder() is the sole public entry point.
|
|
23
|
+
* extractReminderCandidate() is exported for testing; internal to this module.
|
|
24
|
+
*
|
|
25
|
+
* ── Extraction philosophy ────────────────────────────────────────────────────
|
|
26
|
+
*
|
|
27
|
+
* Conservative: extract only what is EXPLICITLY present.
|
|
28
|
+
* If a field cannot be cleanly extracted, it becomes null.
|
|
29
|
+
* Null is never defaulted, assumed, or guessed.
|
|
30
|
+
* This is a hard contract — the Present Layer does not invent missing facts.
|
|
31
|
+
*
|
|
32
|
+
* ── No interpreter changes ───────────────────────────────────────────────────
|
|
33
|
+
*
|
|
34
|
+
* This module does not modify the interpreter registry.
|
|
35
|
+
* It does not affect guided_recovery, incomplete, or any pipeline decision.
|
|
36
|
+
* Reminder extraction is purely a PRESENTATION-LAYER concern.
|
|
37
|
+
*/
|
|
38
|
+
import type { ReminderCandidate, ReminderPresentation } from "./reminder-types.js";
|
|
39
|
+
/**
|
|
40
|
+
* Extract all reminder candidate fields from the raw input.
|
|
41
|
+
*
|
|
42
|
+
* Returns null if no reminder signal is found.
|
|
43
|
+
* Returns a ReminderCandidate with null fields where extraction failed.
|
|
44
|
+
*
|
|
45
|
+
* The confidence level reflects what was successfully extracted:
|
|
46
|
+
* explicit = subject AND time present
|
|
47
|
+
* partial = exactly one of subject/time present
|
|
48
|
+
* ambiguous = signal matched but neither subject nor time found
|
|
49
|
+
*
|
|
50
|
+
* Exported for testing. Not part of the public barrel API.
|
|
51
|
+
*/
|
|
52
|
+
export declare function extractReminderCandidate(input: string): ReminderCandidate | null;
|
|
53
|
+
/**
|
|
54
|
+
* presentReminder(input) — the sole public function of this module.
|
|
55
|
+
*
|
|
56
|
+
* Takes raw input text and produces a ReminderPresentation, or null if the
|
|
57
|
+
* input does not contain enough reminder signal to justify reminder shaping.
|
|
58
|
+
*
|
|
59
|
+
* ── Return null when ─────────────────────────────────────────────────────────
|
|
60
|
+
*
|
|
61
|
+
* The input contains no reminder signal (no "remind me", "set a reminder", etc.)
|
|
62
|
+
* In this case, callers should fall back to existing presentation behavior.
|
|
63
|
+
*
|
|
64
|
+
* ── Return ReminderPresentation when ────────────────────────────────────────
|
|
65
|
+
*
|
|
66
|
+
* The input contains a reminder signal, even if fields are missing.
|
|
67
|
+
* The state field tells the consumer how complete the reminder is.
|
|
68
|
+
* Missing fields are listed in missing_fields.
|
|
69
|
+
*
|
|
70
|
+
* ── Determinism guarantee ────────────────────────────────────────────────────
|
|
71
|
+
*
|
|
72
|
+
* Same input → same output, always.
|
|
73
|
+
* No randomness. No session state. No side effects.
|
|
74
|
+
*/
|
|
75
|
+
export declare function presentReminder(input: string): ReminderPresentation | null;
|
|
76
|
+
//# sourceMappingURL=reminder-presenter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reminder-presenter.d.ts","sourceRoot":"","sources":["../../../../src/present/reminders/reminder-presenter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EACV,iBAAiB,EAEjB,oBAAoB,EAGrB,MAAM,qBAAqB,CAAC;AAkM7B;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAgBhF;AAkFD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAkB1E"}
|