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,309 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Integration types.
|
|
3
|
+
*
|
|
4
|
+
* ── Role of this module ────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* This module defines the seam between UseSteady's authority system and
|
|
7
|
+
* Cursor's edit machinery. It is the type contract for:
|
|
8
|
+
*
|
|
9
|
+
* - CursorHandoffArtifact: the approved, constrained artifact Cursor receives
|
|
10
|
+
* - CursorDeliveryRequest: what the delivery gate sends to Cursor
|
|
11
|
+
* - CursorResponse: the three response kinds Cursor may return
|
|
12
|
+
* - CursorScopeQuestion: Cursor's structured scope clarification request
|
|
13
|
+
* - CursorOCDPolicy: the policy inputs for the OCD evaluator
|
|
14
|
+
*
|
|
15
|
+
* ── Authority model ────────────────────────────────────────────────────────────
|
|
16
|
+
*
|
|
17
|
+
* PROPOSE parsedChange.filePath (artifact mapper only)
|
|
18
|
+
* CONSTRAIN OCD policy engine (conflicts + prohibitedPatterns)
|
|
19
|
+
* REFINE H at ready_for_confirmation (set from empty or narrow non-empty)
|
|
20
|
+
* SELECT H at scope_clarification (from Cursor's candidates only)
|
|
21
|
+
*
|
|
22
|
+
* Cursor: execute only. No upstream reach-back. No re-interpretation.
|
|
23
|
+
*
|
|
24
|
+
* ── Key invariants ─────────────────────────────────────────────────────────────
|
|
25
|
+
*
|
|
26
|
+
* - CursorHandoffArtifact never carries the original input string
|
|
27
|
+
* - eligibility === "approved_for_cursor" is the only value that opens delivery
|
|
28
|
+
* - H can set allowedFiles from empty or narrow non-empty; cannot widen non-empty
|
|
29
|
+
* - H-provided paths are validated against workspace boundary (hard block)
|
|
30
|
+
* and write_safe_globs (OCD conflict trigger)
|
|
31
|
+
* - Maximum one scope clarification per delivery sequence
|
|
32
|
+
*
|
|
33
|
+
* ── Provenance chain ───────────────────────────────────────────────────────────
|
|
34
|
+
*
|
|
35
|
+
* ucp.intent.v1 → ucp.response.v1 → ucp.cursor_handoff.v1
|
|
36
|
+
* → ucp.cursor_receipt.v1
|
|
37
|
+
* → [ucp.cursor_artifact.v1 — RESERVED FUTURE SLOT]
|
|
38
|
+
* → ucp.execution_trace.v1 → ucp.replay_report.v1
|
|
39
|
+
*
|
|
40
|
+
* Refusal path:
|
|
41
|
+
* ucp.cursor_handoff.v1 → ucp.cursor_refused.v1 (dead end or retry trigger)
|
|
42
|
+
*
|
|
43
|
+
* See: docs/cursor-integration-architecture.md
|
|
44
|
+
* docs/cursor-delivery-contract.md
|
|
45
|
+
* docs/cursor-allowedfiles-policy.md
|
|
46
|
+
*/
|
|
47
|
+
export type CursorHandoffEligibility =
|
|
48
|
+
/** OCD cleared; awaiting H confirmation. */
|
|
49
|
+
"pending_confirmation"
|
|
50
|
+
/** H confirmed. Only value that opens the delivery gate. */
|
|
51
|
+
| "approved_for_cursor"
|
|
52
|
+
/** H rejected, timed out, auto-rejected, or Cursor execution error. */
|
|
53
|
+
| "rejected";
|
|
54
|
+
export type CursorOCDClearanceStatus = "cleared" | "conflict_detected" | "conflict_accepted";
|
|
55
|
+
export type CursorOCDClearance = {
|
|
56
|
+
readonly status: CursorOCDClearanceStatus;
|
|
57
|
+
/** Policy rule IDs that were evaluated (from approval-workflow rule registry). */
|
|
58
|
+
readonly rulesFired: readonly string[];
|
|
59
|
+
/** Human-readable conflict descriptions. Empty when status === "cleared". */
|
|
60
|
+
readonly conflictsDetected: readonly string[];
|
|
61
|
+
};
|
|
62
|
+
export type CursorScopeConstraint = {
|
|
63
|
+
/**
|
|
64
|
+
* Files Cursor is allowed to touch.
|
|
65
|
+
*
|
|
66
|
+
* Empty ([]) = no explicit file restriction.
|
|
67
|
+
* Semantic: Cursor may search freely within prohibitedPatterns.
|
|
68
|
+
* H is shown this state and may specify a file before confirming.
|
|
69
|
+
* OCD adds defensive prohibitedPatterns when this is empty.
|
|
70
|
+
*
|
|
71
|
+
* Non-empty = Cursor must stay within these paths.
|
|
72
|
+
* Any write outside this set is an authority violation.
|
|
73
|
+
* H may narrow (remove entries) but not widen (add entries).
|
|
74
|
+
*
|
|
75
|
+
* Populated by: artifact mapper from parsedChange.filePath.
|
|
76
|
+
* Refined by: H (set from empty, or remove from non-empty).
|
|
77
|
+
* Never touched by: OCD (OCD fires conflicts; H decides).
|
|
78
|
+
*/
|
|
79
|
+
readonly allowedFiles: readonly string[];
|
|
80
|
+
/**
|
|
81
|
+
* Named scopes within allowed files (function, class, component names).
|
|
82
|
+
* Empty = no sub-file restriction.
|
|
83
|
+
* Populated during scope clarification when questionKind === "need_scope_selection".
|
|
84
|
+
*/
|
|
85
|
+
readonly allowedScopes: readonly string[];
|
|
86
|
+
/**
|
|
87
|
+
* Glob patterns Cursor must NOT touch, regardless of allowedFiles.
|
|
88
|
+
* Takes precedence over allowedFiles if there is overlap.
|
|
89
|
+
*
|
|
90
|
+
* Always contains defensive system globs (set by OCD policy):
|
|
91
|
+
* migrations, .env files, secrets, lockfiles, generated code
|
|
92
|
+
* When allowedFiles is empty, also contains:
|
|
93
|
+
* node_modules, .git
|
|
94
|
+
*/
|
|
95
|
+
readonly prohibitedPatterns: readonly string[];
|
|
96
|
+
};
|
|
97
|
+
export type CursorChangeSpec = {
|
|
98
|
+
/**
|
|
99
|
+
* Category from whichever interpretation family ran.
|
|
100
|
+
*
|
|
101
|
+
* For execute + structured command (ParsedChange present):
|
|
102
|
+
* InterpretationCategory values:
|
|
103
|
+
* "tailwind_color_change" | "css_color_change" | "text_literal_change" | "config_value_change"
|
|
104
|
+
*
|
|
105
|
+
* For execute + intent interpretation (no ParsedChange):
|
|
106
|
+
* IntentInterpretationCategory values:
|
|
107
|
+
* "visual_color" | "text_change" | "config_change" | "workflow_operation" | "unknown"
|
|
108
|
+
*/
|
|
109
|
+
readonly category: string;
|
|
110
|
+
/** Human-readable summary of what the change is. */
|
|
111
|
+
readonly summary: string;
|
|
112
|
+
/** Impact list from InterpretationResult. Empty for intent-only interpretations. */
|
|
113
|
+
readonly impact: readonly string[];
|
|
114
|
+
readonly confidence: "high" | "medium" | "low";
|
|
115
|
+
/**
|
|
116
|
+
* The parsed change directive.
|
|
117
|
+
*
|
|
118
|
+
* Present when mode === "execute" AND a structured command was parsed
|
|
119
|
+
* (i.e. InterpretationResult was produced — "replace X with Y in file").
|
|
120
|
+
*
|
|
121
|
+
* Absent for vague execute flows where only intent interpretation exists.
|
|
122
|
+
* When absent, Cursor has no concrete search string — the flow will likely
|
|
123
|
+
* reach Cursor and refuse (see Case C in allowedfiles-policy.md).
|
|
124
|
+
*
|
|
125
|
+
* When present: this is the primary edit directive. Cursor must use
|
|
126
|
+
* oldValue/newValue/filePath as the authoritative change spec.
|
|
127
|
+
* Cursor must not expand or paraphrase this.
|
|
128
|
+
*/
|
|
129
|
+
readonly parsedChange?: {
|
|
130
|
+
readonly oldValue: string;
|
|
131
|
+
readonly newValue: string;
|
|
132
|
+
readonly filePath?: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Signals that produced the classification (from IntentInterpretation.basis
|
|
136
|
+
* or InterpretationResult category-specific evidence).
|
|
137
|
+
* Observability only — not an edit directive.
|
|
138
|
+
*/
|
|
139
|
+
readonly basis: readonly string[];
|
|
140
|
+
};
|
|
141
|
+
export type CursorHandoffArtifact = {
|
|
142
|
+
/** Content-addressed identifier. Computed from artifact content, not delivery time. */
|
|
143
|
+
readonly id: string;
|
|
144
|
+
/** Links back to ucp.intent.v1 — the originating user intent. */
|
|
145
|
+
readonly intentId: string;
|
|
146
|
+
/** Links back to ucp.response.v1 — the intake mode decision. */
|
|
147
|
+
readonly responseId: string;
|
|
148
|
+
/**
|
|
149
|
+
* Mode authority — always "execute".
|
|
150
|
+
* Only intake mode === "execute" flows produce a CursorHandoffArtifact.
|
|
151
|
+
* Never re-derived by OCD, Present, or Cursor.
|
|
152
|
+
*/
|
|
153
|
+
readonly mode: "execute";
|
|
154
|
+
/** What the edit is. Cursor uses this as the sole edit directive. */
|
|
155
|
+
readonly changeSpec: CursorChangeSpec;
|
|
156
|
+
/** OCD policy evaluation result. */
|
|
157
|
+
readonly ocdClearance: CursorOCDClearance;
|
|
158
|
+
/**
|
|
159
|
+
* Eligibility state.
|
|
160
|
+
* Only "approved_for_cursor" opens the delivery gate.
|
|
161
|
+
* Set exclusively by H — never by OCD, Present, or Cursor.
|
|
162
|
+
*/
|
|
163
|
+
readonly eligibility: CursorHandoffEligibility;
|
|
164
|
+
/** What Cursor is allowed to touch. Set by OCD + optionally refined by H. */
|
|
165
|
+
readonly scopeConstraint: CursorScopeConstraint;
|
|
166
|
+
/**
|
|
167
|
+
* Epoch ms when H set eligibility to "approved_for_cursor".
|
|
168
|
+
* Absent until H approves.
|
|
169
|
+
* Omit entirely (do not set to undefined) per UCP undefined-free invariant.
|
|
170
|
+
*/
|
|
171
|
+
readonly approvedAt?: number;
|
|
172
|
+
};
|
|
173
|
+
export type CursorOCDPolicy = {
|
|
174
|
+
/**
|
|
175
|
+
* Glob patterns that define the safe write zone.
|
|
176
|
+
* Files outside these globs trigger RULE_WRITE_OUTSIDE_WORKSPACE.
|
|
177
|
+
* Maps to write_safe_globs from the approval-workflow PolicyConfig.
|
|
178
|
+
*/
|
|
179
|
+
readonly writeSafeGlobs: readonly string[];
|
|
180
|
+
/**
|
|
181
|
+
* Maximum number of files in allowedFiles before RULE_WRITE_TOO_MANY_FILES fires.
|
|
182
|
+
* Maps to max_files_approval_threshold from PolicyConfig.
|
|
183
|
+
*/
|
|
184
|
+
readonly maxFilesApprovalThreshold: number;
|
|
185
|
+
/**
|
|
186
|
+
* Glob patterns always added to prohibitedPatterns regardless of allowedFiles.
|
|
187
|
+
* Example: ["**\/migrations\/**", "**\/.env*", "**\/secrets\/**", "*.lock"]
|
|
188
|
+
*/
|
|
189
|
+
readonly alwaysProhibitedGlobs: readonly string[];
|
|
190
|
+
/**
|
|
191
|
+
* Additional globs added to prohibitedPatterns ONLY when allowedFiles is empty.
|
|
192
|
+
* Example: ["**\/node_modules\/**", "**\/.git\/**"]
|
|
193
|
+
*/
|
|
194
|
+
readonly emptyAllowedFilesAdditionalProhibitions: readonly string[];
|
|
195
|
+
/**
|
|
196
|
+
* The workspace root path. Used for the H-provided path workspace-boundary check.
|
|
197
|
+
* H-provided paths outside this root are hard-blocked (not OCD conflicts).
|
|
198
|
+
*/
|
|
199
|
+
readonly workspaceRoot: string;
|
|
200
|
+
};
|
|
201
|
+
export type CursorDeliveryRequest = {
|
|
202
|
+
/**
|
|
203
|
+
* Delivery-attempt identifier.
|
|
204
|
+
*
|
|
205
|
+
* IMPORTANT: This is an ATTEMPT identity, not a content identity.
|
|
206
|
+
*
|
|
207
|
+
* deliveryId = sha256({ artifactId: artifact.id, sentAt })
|
|
208
|
+
*
|
|
209
|
+
* Unlike artifact.id (content-addressed, stable across re-deliveries),
|
|
210
|
+
* deliveryId is unique per delivery attempt. Use deliveryId for
|
|
211
|
+
* transport-level correlation only (ucp.cursor_receipt.v1, ucp.cursor_refused.v1).
|
|
212
|
+
* Never use deliveryId for content deduplication or provenance chain links —
|
|
213
|
+
* use artifact.id for those purposes.
|
|
214
|
+
*/
|
|
215
|
+
readonly deliveryId: string;
|
|
216
|
+
/** Epoch ms when the delivery gate sent this request. */
|
|
217
|
+
readonly sentAt: number;
|
|
218
|
+
/**
|
|
219
|
+
* The approved artifact. Complete source of truth for the edit.
|
|
220
|
+
*
|
|
221
|
+
* Immutability rule: bit-for-bit identical to the artifact whose id was
|
|
222
|
+
* used to compute ucp.cursor_handoff.v1. If they diverge, the delivery
|
|
223
|
+
* is considered corrupted and must be aborted.
|
|
224
|
+
*/
|
|
225
|
+
readonly artifact: CursorHandoffArtifact;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* CursorAccepted — Cursor has taken ownership and will begin applying the edit.
|
|
229
|
+
*
|
|
230
|
+
* Does NOT mean the edit is complete — only that Cursor accepted the request.
|
|
231
|
+
* After returning Accepted, Cursor MUST apply the edit and MUST emit
|
|
232
|
+
* ucp.execution_trace.v1 when complete. Cursor MUST NOT surface a new
|
|
233
|
+
* confirmation request to H.
|
|
234
|
+
*/
|
|
235
|
+
export type CursorAccepted = {
|
|
236
|
+
readonly kind: "accepted";
|
|
237
|
+
readonly deliveryId: string;
|
|
238
|
+
readonly artifactId: string;
|
|
239
|
+
readonly receivedAt: number;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* CursorRefusedDueToScope — Cursor cannot determine the edit target.
|
|
243
|
+
*
|
|
244
|
+
* Valid only when:
|
|
245
|
+
* - parsedChange.filePath is absent AND Cursor found 0 or 2+ candidate files
|
|
246
|
+
* - parsedChange.filePath is present but oldValue appears in multiple scopes
|
|
247
|
+
*
|
|
248
|
+
* Cursor MUST NOT have begun any file writes before returning this response.
|
|
249
|
+
* Triggers scope_clarification_needed state.
|
|
250
|
+
*/
|
|
251
|
+
export type CursorRefusedDueToScope = {
|
|
252
|
+
readonly kind: "refused_due_to_scope";
|
|
253
|
+
readonly deliveryId: string;
|
|
254
|
+
readonly artifactId: string;
|
|
255
|
+
readonly receivedAt: number;
|
|
256
|
+
readonly scopeQuestion: CursorScopeQuestion;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* CursorRefusedDueToExecutionError — Cursor found the target but could not apply the edit.
|
|
260
|
+
*
|
|
261
|
+
* Cursor MUST NOT have written partial changes before returning this response.
|
|
262
|
+
* Triggers rejected state. No retry path.
|
|
263
|
+
*/
|
|
264
|
+
export type CursorRefusedDueToExecutionError = {
|
|
265
|
+
readonly kind: "refused_due_to_execution_error";
|
|
266
|
+
readonly deliveryId: string;
|
|
267
|
+
readonly artifactId: string;
|
|
268
|
+
readonly receivedAt: number;
|
|
269
|
+
readonly errorCode: CursorExecutionErrorCode;
|
|
270
|
+
/** Human-readable detail for Present layer. Must not contain raw stack traces. */
|
|
271
|
+
readonly detail: string;
|
|
272
|
+
};
|
|
273
|
+
export type CursorResponse = CursorAccepted | CursorRefusedDueToScope | CursorRefusedDueToExecutionError;
|
|
274
|
+
/**
|
|
275
|
+
* CursorScopeQuestion — Cursor's structured scope clarification request.
|
|
276
|
+
*
|
|
277
|
+
* Not prose. The Present layer formats this for H.
|
|
278
|
+
* H selects from candidates — cannot add paths outside candidates.
|
|
279
|
+
*/
|
|
280
|
+
export type CursorScopeQuestionKind = "need_file_path" | "need_scope_selection" | "ambiguous_old_value";
|
|
281
|
+
export type CursorScopeQuestion = {
|
|
282
|
+
readonly questionKind: CursorScopeQuestionKind;
|
|
283
|
+
/**
|
|
284
|
+
* Candidates Cursor found:
|
|
285
|
+
* need_file_path: relative file paths containing oldValue
|
|
286
|
+
* need_scope_selection: scope names (function/class/component) within the file
|
|
287
|
+
* ambiguous_old_value: line numbers or context snippets
|
|
288
|
+
*
|
|
289
|
+
* Empty candidates = Cursor found nothing. This should produce
|
|
290
|
+
* refused_due_to_execution_error (errorCode: "old_value_not_found") instead.
|
|
291
|
+
*/
|
|
292
|
+
readonly candidates: readonly string[];
|
|
293
|
+
/** What Cursor was searching for. Typically parsedChange.oldValue. */
|
|
294
|
+
readonly searchedFor: string;
|
|
295
|
+
/**
|
|
296
|
+
* Terse factual statement for the Present layer.
|
|
297
|
+
* Not a question — a statement of what was found.
|
|
298
|
+
* Example: "Found 'bg-blue-500' in 3 files. Select the target file."
|
|
299
|
+
*/
|
|
300
|
+
readonly explanation: string;
|
|
301
|
+
};
|
|
302
|
+
export type CursorExecutionErrorCode = "old_value_not_found" | "ambiguous_match" | "file_not_found" | "scope_outside_allowed" | "prohibited_pattern_match" | "parse_error" | "merge_conflict" | "delivery_timeout";
|
|
303
|
+
export type WorkspacePathValidationResult = {
|
|
304
|
+
readonly ok: true;
|
|
305
|
+
} | {
|
|
306
|
+
readonly ok: false;
|
|
307
|
+
readonly reason: "outside_workspace_boundary" | "invalid_path";
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cursor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAIH,MAAM,MAAM,wBAAwB;AAClC,4CAA4C;AAC1C,sBAAsB;AACxB,4DAA4D;GAC1D,qBAAqB;AACvB,uEAAuE;GACrE,UAAU,CAAC;AAIf,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,kFAAkF;IAClF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,6EAA6E;IAC7E,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C,CAAC;AAIF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAEzC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAE1C;;;;;;;;OAQG;IACH,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD,CAAC;AAIF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C;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;IAC7C,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,uBAAuB,GACvB,gCAAgC,CAAC;AAIrC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAC/B,gBAAgB,GAChB,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAE/C;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC,sEAAsE;IACtE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAChC,qBAAqB,GACrB,iBAAiB,GACjB,gBAAgB,GAChB,uBAAuB,GACvB,0BAA0B,GAC1B,aAAa,GACb,gBAAgB,GAChB,kBAAkB,CAAC;AAIvB,MAAM,MAAM,6BAA6B,GACrC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,4BAA4B,GAAG,cAAc,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Integration types.
|
|
3
|
+
*
|
|
4
|
+
* ── Role of this module ────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* This module defines the seam between UseSteady's authority system and
|
|
7
|
+
* Cursor's edit machinery. It is the type contract for:
|
|
8
|
+
*
|
|
9
|
+
* - CursorHandoffArtifact: the approved, constrained artifact Cursor receives
|
|
10
|
+
* - CursorDeliveryRequest: what the delivery gate sends to Cursor
|
|
11
|
+
* - CursorResponse: the three response kinds Cursor may return
|
|
12
|
+
* - CursorScopeQuestion: Cursor's structured scope clarification request
|
|
13
|
+
* - CursorOCDPolicy: the policy inputs for the OCD evaluator
|
|
14
|
+
*
|
|
15
|
+
* ── Authority model ────────────────────────────────────────────────────────────
|
|
16
|
+
*
|
|
17
|
+
* PROPOSE parsedChange.filePath (artifact mapper only)
|
|
18
|
+
* CONSTRAIN OCD policy engine (conflicts + prohibitedPatterns)
|
|
19
|
+
* REFINE H at ready_for_confirmation (set from empty or narrow non-empty)
|
|
20
|
+
* SELECT H at scope_clarification (from Cursor's candidates only)
|
|
21
|
+
*
|
|
22
|
+
* Cursor: execute only. No upstream reach-back. No re-interpretation.
|
|
23
|
+
*
|
|
24
|
+
* ── Key invariants ─────────────────────────────────────────────────────────────
|
|
25
|
+
*
|
|
26
|
+
* - CursorHandoffArtifact never carries the original input string
|
|
27
|
+
* - eligibility === "approved_for_cursor" is the only value that opens delivery
|
|
28
|
+
* - H can set allowedFiles from empty or narrow non-empty; cannot widen non-empty
|
|
29
|
+
* - H-provided paths are validated against workspace boundary (hard block)
|
|
30
|
+
* and write_safe_globs (OCD conflict trigger)
|
|
31
|
+
* - Maximum one scope clarification per delivery sequence
|
|
32
|
+
*
|
|
33
|
+
* ── Provenance chain ───────────────────────────────────────────────────────────
|
|
34
|
+
*
|
|
35
|
+
* ucp.intent.v1 → ucp.response.v1 → ucp.cursor_handoff.v1
|
|
36
|
+
* → ucp.cursor_receipt.v1
|
|
37
|
+
* → [ucp.cursor_artifact.v1 — RESERVED FUTURE SLOT]
|
|
38
|
+
* → ucp.execution_trace.v1 → ucp.replay_report.v1
|
|
39
|
+
*
|
|
40
|
+
* Refusal path:
|
|
41
|
+
* ucp.cursor_handoff.v1 → ucp.cursor_refused.v1 (dead end or retry trigger)
|
|
42
|
+
*
|
|
43
|
+
* See: docs/cursor-integration-architecture.md
|
|
44
|
+
* docs/cursor-delivery-contract.md
|
|
45
|
+
* docs/cursor-allowedfiles-policy.md
|
|
46
|
+
*/
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cursor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Execution Coordinator — product seam wiring (Phase 8C).
|
|
3
|
+
*
|
|
4
|
+
* ── Purpose ───────────────────────────────────────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* The execution entry point for Claude Managed Agent requests.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors cursor-execution-coordinator.ts in structure:
|
|
9
|
+
*
|
|
10
|
+
* prepareCursorExecution() → prepareClaude Execution()
|
|
11
|
+
* deliverCursorExecution() → deliverClaudeExecution()
|
|
12
|
+
*
|
|
13
|
+
* Two phases. Same intent-separation as Cursor:
|
|
14
|
+
* Phase 1 (prepare): deterministic, synchronous, no side effects.
|
|
15
|
+
* Builds the artifact, evaluates OCD, returns confirmation state.
|
|
16
|
+
* Phase 2 (deliver): async, requires H approval, dispatches to Claude API.
|
|
17
|
+
* Calls the delivery gate with an already-approved artifact.
|
|
18
|
+
*
|
|
19
|
+
* ── OCD evaluation for Claude ──────────────────────────────────────────────────
|
|
20
|
+
*
|
|
21
|
+
* Claude OCD is simpler than Cursor OCD at V1.
|
|
22
|
+
* The artifact already carries prohibitedPatterns from the mapper (ClaudeOCDPolicy).
|
|
23
|
+
*
|
|
24
|
+
* The OCD check fires a conflict when parsedChange.filePath matches any
|
|
25
|
+
* prohibitedPattern glob. This surfaces the conflict to H before delivery.
|
|
26
|
+
* The delivery gate independently enforces prohibitedPatterns at delivery time
|
|
27
|
+
* (defense-in-depth: gate is the hard block, OCD is the early warning).
|
|
28
|
+
*
|
|
29
|
+
* ── What this is NOT ──────────────────────────────────────────────────────────
|
|
30
|
+
*
|
|
31
|
+
* NOT a scheduler — does not queue or retry
|
|
32
|
+
* NOT an OCD authority — OCD fires conflicts; this surfaces them
|
|
33
|
+
* NOT a decision maker — all decisions flow from intake + OCD + H approval
|
|
34
|
+
* NOT autonomous — deliverClaudeExecution() requires an approved artifact
|
|
35
|
+
*
|
|
36
|
+
* ── Dependency direction ───────────────────────────────────────────────────────
|
|
37
|
+
*
|
|
38
|
+
* Coordinator imports: intake types, claude module (all phases).
|
|
39
|
+
* Claude module NEVER imports this coordinator.
|
|
40
|
+
* Present layer NEVER imports this coordinator.
|
|
41
|
+
*
|
|
42
|
+
* ── Authority invariants preserved ────────────────────────────────────────────
|
|
43
|
+
*
|
|
44
|
+
* - mode === "execute" is the only intake mode that opens Phase 1.
|
|
45
|
+
* - eligibility === "approved_for_agent" is the only state that opens Phase 2.
|
|
46
|
+
* - Raw input never crosses to Claude (enforced by ClaudeAgentHandoffArtifact shape).
|
|
47
|
+
* - executionDomain is derived once in buildClaudeHandoffArtifact (A1).
|
|
48
|
+
* - OCD fires conflicts; this surfaces them — never overrides them.
|
|
49
|
+
* - H approval is explicit (approveClaudeArtifact before deliverClaudeExecution).
|
|
50
|
+
*
|
|
51
|
+
* See: docs/claude-agent-phase-a-architecture.md
|
|
52
|
+
*/
|
|
53
|
+
import type { IntakeResult } from "../../intake/types.js";
|
|
54
|
+
import type { ReplaceChange } from "../../understand/interpretation/types.js";
|
|
55
|
+
type ParsedChange = ReplaceChange;
|
|
56
|
+
import type { ClaudeAgentHandoffArtifact, ClaudeOCDPolicy, ClaudeScopeQuestion, ClaudeToolPolicy } from "../../claude/index.js";
|
|
57
|
+
import type { ClaudeAgentPlugin } from "../../claude/delivery-gate.js";
|
|
58
|
+
import type { ClaudeGateDeps } from "../../claude/delivery-gate.js";
|
|
59
|
+
/**
|
|
60
|
+
* ClaudePreparationResult — returned by prepareClaudeExecution().
|
|
61
|
+
*
|
|
62
|
+
* "ready_for_confirmation" OCD cleared. Artifact awaits H approval.
|
|
63
|
+
* "conflict_detected" OCD fired a conflict. H must review + acceptConflict before approving.
|
|
64
|
+
* "not_execute" intakeResult.mode was not "execute". No artifact produced.
|
|
65
|
+
*/
|
|
66
|
+
export type ClaudePreparationResult = {
|
|
67
|
+
readonly kind: "ready_for_confirmation";
|
|
68
|
+
readonly artifact: ClaudeAgentHandoffArtifact;
|
|
69
|
+
readonly display: ClaudePreparationDisplay;
|
|
70
|
+
} | {
|
|
71
|
+
readonly kind: "conflict_detected";
|
|
72
|
+
readonly artifact: ClaudeAgentHandoffArtifact;
|
|
73
|
+
readonly display: ClaudePreparationDisplay;
|
|
74
|
+
} | {
|
|
75
|
+
readonly kind: "not_execute";
|
|
76
|
+
readonly reason: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* ClaudePreparationDisplay — consumer-ready strings for the Phase 1 result.
|
|
80
|
+
*
|
|
81
|
+
* headline — "Ready to delegate" / "Conflict detected"
|
|
82
|
+
* summary — task description (from taskSpec.summary)
|
|
83
|
+
* targetFile — the proposed target file from parsedChange, if known
|
|
84
|
+
* conflicts — human-readable OCD conflict messages; empty when cleared
|
|
85
|
+
*/
|
|
86
|
+
export type ClaudePreparationDisplay = {
|
|
87
|
+
readonly headline: string;
|
|
88
|
+
readonly summary: string;
|
|
89
|
+
readonly targetFile: string | null;
|
|
90
|
+
readonly conflicts: readonly string[];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* ClaudeExecutionResult — returned by deliverClaudeExecution().
|
|
94
|
+
*
|
|
95
|
+
* "accepted" Claude accepted the task and started a session.
|
|
96
|
+
* "refused_due_to_scope" Claude needs H to clarify scope.
|
|
97
|
+
* "refused_due_to_execution_error" Claude could not proceed (network, auth, session error).
|
|
98
|
+
* "blocked_ineligible" Artifact not approved. Caller error.
|
|
99
|
+
* "blocked_tool_policy" Tool policy violation (networkAccess not "deny", etc.).
|
|
100
|
+
* "blocked_persistence_failure" Handoff provenance could not be recorded.
|
|
101
|
+
*/
|
|
102
|
+
export type ClaudeExecutionResult = {
|
|
103
|
+
readonly kind: "accepted";
|
|
104
|
+
readonly deliveryId: string;
|
|
105
|
+
readonly sessionId: string;
|
|
106
|
+
readonly display: ClaudeExecutionDisplay;
|
|
107
|
+
} | {
|
|
108
|
+
readonly kind: "refused_due_to_scope";
|
|
109
|
+
readonly deliveryId: string;
|
|
110
|
+
readonly scopeQuestion: ClaudeScopeQuestion;
|
|
111
|
+
readonly display: ClaudeExecutionDisplay;
|
|
112
|
+
} | {
|
|
113
|
+
readonly kind: "refused_due_to_execution_error";
|
|
114
|
+
readonly deliveryId: string;
|
|
115
|
+
readonly errorCode: string;
|
|
116
|
+
readonly detail: string;
|
|
117
|
+
readonly display: ClaudeExecutionDisplay;
|
|
118
|
+
} | {
|
|
119
|
+
readonly kind: "blocked_ineligible";
|
|
120
|
+
readonly display: ClaudeExecutionDisplay;
|
|
121
|
+
} | {
|
|
122
|
+
readonly kind: "blocked_tool_policy";
|
|
123
|
+
readonly reason: string;
|
|
124
|
+
readonly display: ClaudeExecutionDisplay;
|
|
125
|
+
} | {
|
|
126
|
+
readonly kind: "blocked_persistence_failure";
|
|
127
|
+
readonly reason: string;
|
|
128
|
+
readonly display: ClaudeExecutionDisplay;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* ClaudeExecutionDisplay — consumer-ready strings for the Phase 2 result.
|
|
132
|
+
*/
|
|
133
|
+
export type ClaudeExecutionDisplay = {
|
|
134
|
+
readonly verdict: "accepted" | "refused" | "blocked";
|
|
135
|
+
readonly headline: string;
|
|
136
|
+
readonly note: string | null;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Build and OCD-evaluate a ClaudeAgentHandoffArtifact from an IntakeResult.
|
|
140
|
+
*
|
|
141
|
+
* Returns a preparation result describing what will happen and whether OCD
|
|
142
|
+
* has any conflicts. Synchronous and side-effect-free.
|
|
143
|
+
*
|
|
144
|
+
* @param intakeResult Output of runIntake(). Must have mode === "execute".
|
|
145
|
+
* @param intentId UCP envelope id of the intent.
|
|
146
|
+
* @param responseId UCP envelope id of the response.
|
|
147
|
+
* @param policy OCD policy (alwaysProhibitedGlobs, writeSafeGlobs).
|
|
148
|
+
* @param toolPolicy Tool policy (allowedTools, networkAccess, filesystemMode).
|
|
149
|
+
* @param parsedChange Optional: structured change parsed from the input.
|
|
150
|
+
*/
|
|
151
|
+
export declare function prepareClaudeExecution(intakeResult: IntakeResult, intentId: string, responseId: string, policy: ClaudeOCDPolicy, toolPolicy: ClaudeToolPolicy, parsedChange?: ParsedChange): ClaudePreparationResult;
|
|
152
|
+
/**
|
|
153
|
+
* Deliver an already-approved ClaudeAgentHandoffArtifact through the delivery gate.
|
|
154
|
+
*
|
|
155
|
+
* Call this after H has called approveClaudeArtifact() on the prepared artifact.
|
|
156
|
+
*
|
|
157
|
+
* @param approvedArtifact A ClaudeAgentHandoffArtifact with eligibility: "approved_for_agent".
|
|
158
|
+
* @param plugin The transport adapter (ClaudeApiAdapter or stub).
|
|
159
|
+
* @param storeDir Absolute path to the UCP store directory.
|
|
160
|
+
* @param deps Optional: injectable persistence fns for testing.
|
|
161
|
+
*/
|
|
162
|
+
export declare function deliverClaudeExecution(approvedArtifact: ClaudeAgentHandoffArtifact, plugin: ClaudeAgentPlugin, storeDir: string, deps?: ClaudeGateDeps): Promise<ClaudeExecutionResult>;
|
|
163
|
+
export {};
|
|
164
|
+
//# sourceMappingURL=claude-execution-coordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-execution-coordinator.d.ts","sourceRoot":"","sources":["../../../../src/execution/claude/claude-execution-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH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