@stigmer/runner 3.14.1 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-fingerprint +1 -1
- package/dist/__test-utils__/execution-record-fixture.d.ts +47 -0
- package/dist/__test-utils__/execution-record-fixture.js +68 -0
- package/dist/__test-utils__/execution-record-fixture.js.map +1 -0
- package/dist/__test-utils__/harness-contract/types.d.ts +166 -0
- package/dist/__test-utils__/harness-contract/types.js +49 -0
- package/dist/__test-utils__/harness-contract/types.js.map +1 -0
- package/dist/__test-utils__/hermetic-activity.d.ts +28 -5
- package/dist/__test-utils__/hermetic-activity.js +23 -7
- package/dist/__test-utils__/hermetic-activity.js.map +1 -1
- package/dist/__test-utils__/mock-workspace.d.ts +15 -0
- package/dist/__test-utils__/mock-workspace.js +21 -0
- package/dist/__test-utils__/mock-workspace.js.map +1 -0
- package/dist/__test-utils__/model-registry-fixture.d.ts +56 -0
- package/dist/__test-utils__/model-registry-fixture.js +66 -0
- package/dist/__test-utils__/model-registry-fixture.js.map +1 -0
- package/dist/__test-utils__/turn-input-fixture.d.ts +60 -0
- package/dist/__test-utils__/turn-input-fixture.js +118 -0
- package/dist/__test-utils__/turn-input-fixture.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.d.ts +107 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.js +344 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.d.ts +20 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js +58 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js.map +1 -1
- package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js +2 -32
- package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js.map +1 -1
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.d.ts +38 -62
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js +47 -121
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js.map +1 -1
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.d.ts +17 -1
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js +27 -4
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js.map +1 -1
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.d.ts +52 -11
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js +66 -7
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js.map +1 -1
- package/dist/activities/execute-cursor/adapter.d.ts +55 -0
- package/dist/activities/execute-cursor/adapter.js +119 -0
- package/dist/activities/execute-cursor/adapter.js.map +1 -0
- package/dist/activities/execute-cursor/approval-state.d.ts +2 -2
- package/dist/activities/execute-cursor/approval-state.js.map +1 -1
- package/dist/activities/execute-cursor/capture-flow.d.ts +15 -30
- package/dist/activities/execute-cursor/capture-flow.js +17 -26
- package/dist/activities/execute-cursor/capture-flow.js.map +1 -1
- package/dist/activities/execute-cursor/cursor-capabilities.d.ts +23 -0
- package/dist/activities/execute-cursor/cursor-capabilities.js +33 -0
- package/dist/activities/execute-cursor/cursor-capabilities.js.map +1 -0
- package/dist/activities/execute-cursor/cursor-mcp-config.d.ts +2 -2
- package/dist/activities/execute-cursor/cursor-mcp-config.js.map +1 -1
- package/dist/activities/execute-cursor/fetch-interceptor.d.ts +15 -25
- package/dist/activities/execute-cursor/fetch-interceptor.js +39 -33
- package/dist/activities/execute-cursor/fetch-interceptor.js.map +1 -1
- package/dist/activities/execute-cursor/http2-interceptor.d.ts +21 -17
- package/dist/activities/execute-cursor/http2-interceptor.js +38 -31
- package/dist/activities/execute-cursor/http2-interceptor.js.map +1 -1
- package/dist/activities/execute-cursor/message-translator.d.ts +28 -19
- package/dist/activities/execute-cursor/message-translator.js +76 -27
- package/dist/activities/execute-cursor/message-translator.js.map +1 -1
- package/dist/activities/execute-cursor/prompt-builder.d.ts +180 -11
- package/dist/activities/execute-cursor/prompt-builder.js +171 -0
- package/dist/activities/execute-cursor/prompt-builder.js.map +1 -1
- package/dist/activities/execute-cursor/rejection-capture.d.ts +3 -6
- package/dist/activities/execute-cursor/rejection-capture.js +5 -7
- package/dist/activities/execute-cursor/rejection-capture.js.map +1 -1
- package/dist/activities/execute-cursor/session-lifecycle.d.ts +1 -4
- package/dist/activities/execute-cursor/session-lifecycle.js.map +1 -1
- package/dist/activities/execute-cursor/turn-boundary.d.ts +1 -1
- package/dist/activities/execute-cursor/turn-settle.d.ts +49 -0
- package/dist/activities/execute-cursor/turn-settle.js +507 -0
- package/dist/activities/execute-cursor/turn-settle.js.map +1 -0
- package/dist/activities/execute-cursor/turn-setup.d.ts +173 -0
- package/dist/activities/execute-cursor/turn-setup.js +496 -0
- package/dist/activities/execute-cursor/turn-setup.js.map +1 -0
- package/dist/activities/execute-cursor/turn-stream.d.ts +41 -71
- package/dist/activities/execute-cursor/turn-stream.js +70 -135
- package/dist/activities/execute-cursor/turn-stream.js.map +1 -1
- package/dist/activities/execute-cursor/turn.d.ts +43 -0
- package/dist/activities/execute-cursor/turn.js +222 -0
- package/dist/activities/execute-cursor/turn.js.map +1 -0
- package/dist/activities/execute-cursor/usage-pricing.d.ts +38 -0
- package/dist/activities/execute-cursor/usage-pricing.js +50 -0
- package/dist/activities/execute-cursor/usage-pricing.js.map +1 -0
- package/dist/activities/execute-deep-agent/approval-file-change.d.ts +1 -1
- package/dist/activities/execute-deep-agent/approval-file-change.js +1 -1
- package/dist/activities/execute-deep-agent/environment.js +1 -1
- package/dist/activities/execute-deep-agent/environment.js.map +1 -1
- package/dist/activities/execute-deep-agent/setup.js +3 -2
- package/dist/activities/execute-deep-agent/setup.js.map +1 -1
- package/dist/activities/hydrate-workflow-execution.js +1 -1
- package/dist/activities/hydrate-workflow-execution.js.map +1 -1
- package/dist/config.d.ts +15 -0
- package/dist/config.js.map +1 -1
- package/dist/harness/capabilities.d.ts +16 -0
- package/dist/harness/capabilities.js +1 -0
- package/dist/harness/capabilities.js.map +1 -1
- package/dist/harness/persist-chokepoint.d.ts +74 -0
- package/dist/harness/persist-chokepoint.js +88 -0
- package/dist/harness/persist-chokepoint.js.map +1 -0
- package/dist/harness/registry.d.ts +44 -5
- package/dist/harness/registry.js +61 -5
- package/dist/harness/registry.js.map +1 -1
- package/dist/harness/run-turn.d.ts +53 -0
- package/dist/harness/run-turn.js +528 -0
- package/dist/harness/run-turn.js.map +1 -0
- package/dist/harness/stop-controller.d.ts +50 -0
- package/dist/harness/stop-controller.js +62 -0
- package/dist/harness/stop-controller.js.map +1 -0
- package/dist/harness/terminal-table.d.ts +141 -0
- package/dist/harness/terminal-table.js +239 -0
- package/dist/harness/terminal-table.js.map +1 -0
- package/dist/harness/turn-context.d.ts +523 -0
- package/dist/harness/turn-context.js +739 -0
- package/dist/harness/turn-context.js.map +1 -0
- package/dist/harness/types.d.ts +232 -52
- package/dist/harness/types.js +17 -8
- package/dist/harness/types.js.map +1 -1
- package/dist/harness/usage-accumulator.d.ts +68 -0
- package/dist/harness/usage-accumulator.js +101 -0
- package/dist/harness/usage-accumulator.js.map +1 -0
- package/dist/harness-adapters.d.ts +27 -0
- package/dist/harness-adapters.js +28 -0
- package/dist/harness-adapters.js.map +1 -0
- package/dist/main.js.map +1 -1
- package/dist/runner-manager.js +64 -48
- package/dist/runner-manager.js.map +1 -1
- package/dist/runner.d.ts +5 -4
- package/dist/runner.js +65 -64
- package/dist/runner.js.map +1 -1
- package/dist/shared/approval-policy.d.ts +1 -1
- package/dist/shared/approval-policy.js.map +1 -1
- package/dist/{activities/execute-cursor → shared}/attachment-resolver.d.ts +2 -2
- package/dist/{activities/execute-cursor → shared}/attachment-resolver.js +5 -5
- package/dist/shared/attachment-resolver.js.map +1 -0
- package/dist/{activities/execute-cursor → shared}/blueprint-resolver.d.ts +7 -5
- package/dist/{activities/execute-cursor → shared}/blueprint-resolver.js +3 -63
- package/dist/shared/blueprint-resolver.js.map +1 -0
- package/dist/shared/channel-attachment.d.ts +1 -1
- package/dist/shared/channel-attachment.js.map +1 -1
- package/dist/{activities/execute-cursor → shared}/cost-guard.d.ts +5 -1
- package/dist/{activities/execute-cursor → shared}/cost-guard.js +5 -1
- package/dist/shared/cost-guard.js.map +1 -0
- package/dist/{activities/execute-cursor → shared}/env-resolver.d.ts +1 -1
- package/dist/shared/env-resolver.js.map +1 -0
- package/dist/{activities/execute-cursor → shared}/exact-apply.d.ts +1 -1
- package/dist/{activities/execute-cursor → shared}/exact-apply.js +6 -6
- package/dist/shared/exact-apply.js.map +1 -0
- package/dist/shared/execution-context.d.ts +35 -0
- package/dist/shared/execution-context.js +38 -0
- package/dist/shared/execution-context.js.map +1 -0
- package/dist/{activities/execute-cursor → shared}/extract-structured-output.d.ts +5 -2
- package/dist/{activities/execute-cursor → shared}/extract-structured-output.js +9 -6
- package/dist/shared/extract-structured-output.js.map +1 -0
- package/dist/shared/filereview/capture.d.ts +1 -1
- package/dist/shared/filereview/capture.js +1 -1
- package/dist/shared/heartbeat.d.ts +13 -11
- package/dist/shared/heartbeat.js +14 -29
- package/dist/shared/heartbeat.js.map +1 -1
- package/dist/{activities/execute-cursor → shared}/persist-decision.d.ts +5 -2
- package/dist/{activities/execute-cursor → shared}/persist-decision.js +4 -1
- package/dist/shared/persist-decision.js.map +1 -0
- package/dist/{activities/execute-cursor → shared}/skill-resolver.d.ts +16 -3
- package/dist/{activities/execute-cursor → shared}/skill-resolver.js +12 -4
- package/dist/shared/skill-resolver.js.map +1 -0
- package/dist/shared/subagent-rows.d.ts +21 -0
- package/dist/shared/subagent-rows.js +34 -0
- package/dist/shared/subagent-rows.js.map +1 -0
- package/dist/shared/worker-shutdown.d.ts +43 -16
- package/dist/shared/worker-shutdown.js +28 -13
- package/dist/shared/worker-shutdown.js.map +1 -1
- package/dist/shared/workspace/platform-dir.d.ts +1 -1
- package/dist/shared/workspace/platform-dir.js +1 -1
- package/dist/shared/workspace/session-provision.d.ts +54 -0
- package/dist/{activities/execute-cursor/workspace-provision.js → shared/workspace/session-provision.js} +15 -12
- package/dist/shared/workspace/session-provision.js.map +1 -0
- package/package.json +4 -4
- package/src/__test-utils__/__tests__/harness-contract-self-check.test.ts +110 -14
- package/src/__test-utils__/execution-record-fixture.ts +104 -0
- package/src/__test-utils__/harness-boot-order-child.ts +58 -0
- package/src/__test-utils__/harness-contract/contract.ts +128 -83
- package/src/__test-utils__/harness-contract/recording-sink.ts +15 -4
- package/src/__test-utils__/harness-contract/runtime-contract.ts +666 -0
- package/src/__test-utils__/harness-contract/scripted-adapter.ts +92 -32
- package/src/__test-utils__/harness-contract/types.ts +85 -9
- package/src/__test-utils__/hermetic-activity.ts +33 -8
- package/src/__test-utils__/model-registry-fixture.ts +72 -0
- package/src/__test-utils__/module-specifiers.ts +82 -0
- package/src/__test-utils__/turn-input-fixture.ts +155 -0
- package/src/__tests__/harness-boot-order.test.ts +77 -0
- package/src/__tests__/harness-contract.test.ts +7 -5
- package/src/__tests__/runner-manager.test.ts +18 -0
- package/src/activities/execute-cursor/__test-utils__/__tests__/scripted-double.test.ts +102 -0
- package/src/activities/execute-cursor/__test-utils__/contract-subject.ts +396 -0
- package/src/activities/execute-cursor/__test-utils__/cursor-hook-harness.ts +66 -0
- package/src/activities/execute-cursor/__test-utils__/gateway-substrate.ts +2 -43
- package/src/activities/execute-cursor/__test-utils__/hermetic-cursor.ts +65 -145
- package/src/activities/execute-cursor/__test-utils__/scripted-agent.ts +30 -4
- package/src/activities/execute-cursor/__test-utils__/scripted-sdk.ts +96 -8
- package/src/activities/execute-cursor/__tests__/adapter-is-temporal-free.test.ts +45 -0
- package/src/activities/execute-cursor/__tests__/approval-decisions-agree.test.ts +90 -0
- package/src/activities/execute-cursor/__tests__/build-prompt.test.ts +7 -8
- package/src/activities/execute-cursor/__tests__/capture-flow.test.ts +28 -1
- package/src/activities/execute-cursor/__tests__/deny-gate-exact-apply.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/fetch-interceptor.test.ts +64 -6
- package/src/activities/execute-cursor/__tests__/hermetic/deny-and-retry.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/hermetic/file-review-capture.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/cost-cap.status.json +53 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/pause.status.json +1 -6
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/platform-stop.status.json +56 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-transport-timeout.status.json +48 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/resolution-error.status.json +18 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-cancelled.status.json +36 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-error-non-retryable.status.json +37 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-error-at-create.status.json +38 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/stall.status.json +59 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattributed-hook-block.status.json +79 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/worker-shutdown.status.json +2 -7
- package/src/activities/execute-cursor/__tests__/hermetic/harness-contract.test.ts +170 -0
- package/src/activities/execute-cursor/__tests__/hermetic/pause-vs-shutdown.test.ts +22 -18
- package/src/activities/execute-cursor/__tests__/hermetic/plain-turn.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/hermetic/recovery-fresh-agent.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/hermetic/run-wait-arms.test.ts +286 -0
- package/src/activities/execute-cursor/__tests__/hermetic/stream-self-stop-arms.test.ts +332 -0
- package/src/activities/execute-cursor/__tests__/hermetic/thrown-error-arms.test.ts +193 -0
- package/src/activities/execute-cursor/__tests__/hermetic/tool-call.test.ts +1 -1
- package/src/activities/execute-cursor/__tests__/hermetic/unattributed-hook-block.test.ts +185 -0
- package/src/activities/execute-cursor/__tests__/hermetic/workspace-lock-timeout.test.ts +151 -0
- package/src/activities/execute-cursor/__tests__/http2-interceptor.test.ts +65 -35
- package/src/activities/execute-cursor/__tests__/message-translator.test.ts +0 -40
- package/src/activities/execute-cursor/__tests__/same-identity-reproposal.test.ts +171 -0
- package/src/activities/execute-cursor/__tests__/turn-stream.test.ts +118 -243
- package/src/activities/execute-cursor/__tests__/usage-pricing.test.ts +84 -0
- package/src/activities/execute-cursor/adapter.ts +138 -0
- package/src/activities/execute-cursor/approval-state.ts +2 -2
- package/src/activities/execute-cursor/capture-flow.ts +18 -41
- package/src/activities/execute-cursor/cursor-capabilities.ts +35 -0
- package/src/activities/execute-cursor/cursor-mcp-config.ts +2 -2
- package/src/activities/execute-cursor/fetch-interceptor.ts +48 -45
- package/src/activities/execute-cursor/http2-interceptor.ts +47 -34
- package/src/activities/execute-cursor/message-translator.ts +90 -45
- package/src/activities/execute-cursor/prompt-builder.ts +327 -12
- package/src/activities/execute-cursor/rejection-capture.ts +5 -12
- package/src/activities/execute-cursor/session-lifecycle.ts +1 -5
- package/src/activities/execute-cursor/turn-boundary.ts +1 -1
- package/src/activities/execute-cursor/turn-settle.ts +601 -0
- package/src/activities/execute-cursor/turn-setup.ts +645 -0
- package/src/activities/execute-cursor/turn-stream.ts +84 -210
- package/src/activities/execute-cursor/turn.ts +240 -0
- package/src/activities/execute-cursor/usage-pricing.ts +67 -0
- package/src/activities/execute-deep-agent/approval-file-change.ts +1 -1
- package/src/activities/execute-deep-agent/environment.ts +1 -1
- package/src/activities/execute-deep-agent/setup.ts +3 -2
- package/src/activities/hydrate-workflow-execution.ts +1 -1
- package/src/config.ts +13 -0
- package/src/harness/__tests__/import-direction.test.ts +168 -0
- package/src/harness/__tests__/persist-chokepoint.test.ts +146 -0
- package/src/harness/__tests__/registry.test.ts +1 -0
- package/src/harness/__tests__/run-turn.test.ts +165 -0
- package/src/harness/__tests__/stop-controller.test.ts +49 -0
- package/src/harness/__tests__/turn-context.test.ts +178 -0
- package/src/harness/__tests__/usage-accumulator.test.ts +83 -0
- package/src/harness/capabilities.ts +17 -0
- package/src/harness/persist-chokepoint.ts +112 -0
- package/src/harness/registry.ts +79 -5
- package/src/harness/run-turn.ts +618 -0
- package/src/harness/stop-controller.ts +83 -0
- package/src/harness/terminal-table.ts +276 -0
- package/src/harness/turn-context.ts +1028 -0
- package/src/harness/types.ts +248 -53
- package/src/harness/usage-accumulator.ts +122 -0
- package/src/harness-adapters.ts +30 -0
- package/src/main.ts +1 -1
- package/src/runner-manager.ts +68 -61
- package/src/runner.ts +67 -78
- package/src/shared/__tests__/attachment-naming.test.ts +1 -1
- package/src/{activities/execute-cursor → shared}/__tests__/attachment-resolver.test.ts +6 -4
- package/src/{activities/execute-cursor → shared}/__tests__/cost-guard.test.ts +2 -1
- package/src/{activities/execute-cursor → shared}/__tests__/exact-apply.test.ts +3 -3
- package/src/{activities/execute-cursor → shared}/__tests__/extract-structured-output.test.ts +8 -8
- package/src/{activities/execute-cursor → shared}/__tests__/persist-decision.test.ts +4 -2
- package/src/{activities/execute-cursor → shared}/__tests__/skill-resolver.test.ts +1 -1
- package/src/shared/__tests__/subagent-rows.test.ts +34 -0
- package/src/shared/__tests__/worker-shutdown.test.ts +44 -39
- package/src/shared/approval-policy.ts +1 -1
- package/src/{activities/execute-cursor → shared}/attachment-resolver.ts +6 -6
- package/src/{activities/execute-cursor → shared}/blueprint-resolver.ts +7 -78
- package/src/shared/channel-attachment.ts +1 -1
- package/src/{activities/execute-cursor → shared}/cost-guard.ts +5 -1
- package/src/{activities/execute-cursor → shared}/env-resolver.ts +1 -1
- package/src/{activities/execute-cursor → shared}/exact-apply.ts +7 -7
- package/src/shared/execution-context.ts +45 -0
- package/src/{activities/execute-cursor → shared}/extract-structured-output.ts +10 -7
- package/src/shared/filereview/capture.ts +1 -1
- package/src/shared/heartbeat.ts +13 -33
- package/src/{activities/execute-cursor → shared}/persist-decision.ts +5 -2
- package/src/{activities/execute-cursor → shared}/skill-resolver.ts +20 -6
- package/src/shared/subagent-rows.ts +39 -0
- package/src/shared/worker-shutdown.ts +55 -25
- package/src/{activities/execute-cursor/__tests__/workspace-provision.test.ts → shared/workspace/__tests__/session-provision.test.ts} +25 -28
- package/src/shared/workspace/platform-dir.ts +1 -1
- package/src/{activities/execute-cursor/workspace-provision.ts → shared/workspace/session-provision.ts} +29 -16
- package/dist/activities/execute-cursor/attachment-resolver.js.map +0 -1
- package/dist/activities/execute-cursor/blueprint-resolver.js.map +0 -1
- package/dist/activities/execute-cursor/cost-guard.js.map +0 -1
- package/dist/activities/execute-cursor/env-resolver.js.map +0 -1
- package/dist/activities/execute-cursor/exact-apply.js.map +0 -1
- package/dist/activities/execute-cursor/extract-structured-output.js.map +0 -1
- package/dist/activities/execute-cursor/index.d.ts +0 -209
- package/dist/activities/execute-cursor/index.js +0 -2345
- package/dist/activities/execute-cursor/index.js.map +0 -1
- package/dist/activities/execute-cursor/persist-decision.js.map +0 -1
- package/dist/activities/execute-cursor/skill-resolver.js.map +0 -1
- package/dist/activities/execute-cursor/usage-accumulator.d.ts +0 -89
- package/dist/activities/execute-cursor/usage-accumulator.js +0 -121
- package/dist/activities/execute-cursor/usage-accumulator.js.map +0 -1
- package/dist/activities/execute-cursor/workspace-provision.d.ts +0 -42
- package/dist/activities/execute-cursor/workspace-provision.js.map +0 -1
- package/src/activities/execute-cursor/__tests__/usage-accumulator.test.ts +0 -164
- package/src/activities/execute-cursor/index.ts +0 -2876
- package/src/activities/execute-cursor/usage-accumulator.ts +0 -169
- /package/dist/{activities/execute-cursor → shared}/env-resolver.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-flow.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/capture-flow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capture-flow.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/capture-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM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C;gBAAE,SAAS,CAAC,mCAAmC;YAC1E,gBAAgB,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Cursor harness's capability flags — the facts about `@cursor/sdk` the
|
|
3
|
+
* turn runtime branches on, declared once (`harness/capabilities.ts` has the
|
|
4
|
+
* matrix and the meaning of each flag).
|
|
5
|
+
*
|
|
6
|
+
* - `deny-and-retry`: an out-of-process hook denies a gated tool, the
|
|
7
|
+
* denial lands in the session ledger, the run is cancelled, and the next
|
|
8
|
+
* invocation re-runs with grants (`hook-script.ts`, `approval-state.ts`).
|
|
9
|
+
* - `engine-minted`: the agent id exists only once `Agent.create` returns;
|
|
10
|
+
* the adapter binds it through `TurnSink.bindHarnessState` before its
|
|
11
|
+
* first persist.
|
|
12
|
+
* - No system prompt: instructions ride the first user message
|
|
13
|
+
* (`prompt-builder.ts`).
|
|
14
|
+
* - Sub-agents through the SDK's `agents` option (`subagent-config.ts`).
|
|
15
|
+
* - No tool restriction in the SDK config: the hook's "disabled" arm
|
|
16
|
+
* enforces `enabledTools` at call time (issue #350).
|
|
17
|
+
* - PNG and JPEG inline; the transport re-sniffs (`shared/attachment-vision.ts`).
|
|
18
|
+
* - File review under the `cursor` harness id, with the transient
|
|
19
|
+
* `.cursor/hooks.json` the gate writes excluded from every diff
|
|
20
|
+
* (`capture-flow.ts`).
|
|
21
|
+
*/
|
|
22
|
+
import type { HarnessCapabilities } from "../../harness/capabilities.js";
|
|
23
|
+
export declare const CURSOR_CAPABILITIES: HarnessCapabilities;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Cursor harness's capability flags — the facts about `@cursor/sdk` the
|
|
3
|
+
* turn runtime branches on, declared once (`harness/capabilities.ts` has the
|
|
4
|
+
* matrix and the meaning of each flag).
|
|
5
|
+
*
|
|
6
|
+
* - `deny-and-retry`: an out-of-process hook denies a gated tool, the
|
|
7
|
+
* denial lands in the session ledger, the run is cancelled, and the next
|
|
8
|
+
* invocation re-runs with grants (`hook-script.ts`, `approval-state.ts`).
|
|
9
|
+
* - `engine-minted`: the agent id exists only once `Agent.create` returns;
|
|
10
|
+
* the adapter binds it through `TurnSink.bindHarnessState` before its
|
|
11
|
+
* first persist.
|
|
12
|
+
* - No system prompt: instructions ride the first user message
|
|
13
|
+
* (`prompt-builder.ts`).
|
|
14
|
+
* - Sub-agents through the SDK's `agents` option (`subagent-config.ts`).
|
|
15
|
+
* - No tool restriction in the SDK config: the hook's "disabled" arm
|
|
16
|
+
* enforces `enabledTools` at call time (issue #350).
|
|
17
|
+
* - PNG and JPEG inline; the transport re-sniffs (`shared/attachment-vision.ts`).
|
|
18
|
+
* - File review under the `cursor` harness id, with the transient
|
|
19
|
+
* `.cursor/hooks.json` the gate writes excluded from every diff
|
|
20
|
+
* (`capture-flow.ts`).
|
|
21
|
+
*/
|
|
22
|
+
import { CURSOR_VISION_PROFILE } from "../../shared/attachment-vision.js";
|
|
23
|
+
import { CURSOR_FILE_REVIEW_IDENTITY } from "./capture-flow.js";
|
|
24
|
+
export const CURSOR_CAPABILITIES = {
|
|
25
|
+
pausePrimitive: "deny-and-retry",
|
|
26
|
+
stateIdSource: "engine-minted",
|
|
27
|
+
systemPrompt: false,
|
|
28
|
+
subAgents: true,
|
|
29
|
+
toolRestriction: false,
|
|
30
|
+
visionProfile: CURSOR_VISION_PROFILE,
|
|
31
|
+
fileReview: CURSOR_FILE_REVIEW_IDENTITY,
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=cursor-capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-capabilities.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/cursor-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,qBAAqB;IACpC,UAAU,EAAE,2BAA2B;CACxC,CAAC"}
|
|
@@ -36,10 +36,10 @@ export type CursorMcpServerConfig = {
|
|
|
36
36
|
* rebuild. The Cursor SDK config cannot hide tools, so enabledTools is NOT
|
|
37
37
|
* expressed here — the HITL hook enforces it (see ResolvedMcpServer.enabledTools).
|
|
38
38
|
*/
|
|
39
|
-
export declare function toCursorMcpConfig(servers: ResolvedMcpServer[]): Record<string, CursorMcpServerConfig>;
|
|
39
|
+
export declare function toCursorMcpConfig(servers: readonly ResolvedMcpServer[]): Record<string, CursorMcpServerConfig>;
|
|
40
40
|
/**
|
|
41
41
|
* Validate that resolved MCP servers have their required env vars populated.
|
|
42
42
|
* Returns a list of warnings for servers with empty/missing env.
|
|
43
43
|
* Used as a pre-flight check before agent.send() to surface config issues early.
|
|
44
44
|
*/
|
|
45
|
-
export declare function validateMcpServerEnv(servers: ResolvedMcpServer[], usages: McpServerUsage[]): string[];
|
|
45
|
+
export declare function validateMcpServerEnv(servers: readonly ResolvedMcpServer[], usages: McpServerUsage[]): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor-mcp-config.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/cursor-mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuBH;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAC/B,
|
|
1
|
+
{"version":3,"file":"cursor-mcp-config.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/cursor-mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA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,IAAI,gEAAgE,CAAC,CAAC;YACnG,SAAS;QACX,CAAC;QAED,IAAI,QAAQ,CAAC,cAAc,KAAK,OAAO,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;YACxD,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;iBAC3C,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;iBACrB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzB,QAAQ,CAAC,IAAI,CACX,eAAe,IAAI,gBAAgB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB;oBACvE,+CAA+C,CAChD,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -9,34 +9,32 @@
|
|
|
9
9
|
* This is the JavaScript-level equivalent of LangChain's base_url parameter
|
|
10
10
|
* that the Python agent-runner uses for the LLM proxy pattern.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Installed by the Cursor adapter's `boot` (adapter.ts), which the registry
|
|
13
|
+
* runs in both composition roots before Temporal coordinates are resolved and
|
|
14
|
+
* before the adapter loads `@cursor/sdk`, so the interceptor is in place
|
|
15
|
+
* before the SDK issues its first request. The proxy credential is read per
|
|
16
|
+
* request from the ref the root bound as `Config.proxyTokenRef`.
|
|
14
17
|
*
|
|
15
18
|
* When STIGMER_PROXY_ENDPOINT is not set, this module is a no-op.
|
|
16
19
|
*/
|
|
17
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
18
|
-
interface ExecutionContextStore {
|
|
19
|
-
executionId: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function getExecutionContext(): AsyncLocalStorage<ExecutionContextStore>;
|
|
22
20
|
/**
|
|
23
|
-
* Install the global fetch interceptor
|
|
24
|
-
*
|
|
21
|
+
* Install the global fetch interceptor, at boot, BEFORE `@cursor/sdk` is
|
|
22
|
+
* imported. Idempotent: a second install rebinds the config (a worker may
|
|
23
|
+
* re-boot its harnesses) and never captures the interceptor itself as the
|
|
24
|
+
* original fetch.
|
|
25
25
|
*
|
|
26
26
|
* When proxyEndpoint is empty or not provided, the interceptor is not
|
|
27
27
|
* installed and all fetch calls pass through to the original implementation.
|
|
28
|
+
* A proxy endpoint with no credential bound at install is a configuration
|
|
29
|
+
* defect and fails the boot here, the same failure as before the ref (the
|
|
30
|
+
* ref is read per request afterwards; only its presence is judged now).
|
|
28
31
|
*/
|
|
29
32
|
export declare function installFetchInterceptor(config: {
|
|
30
33
|
proxyEndpoint: string | undefined;
|
|
31
|
-
|
|
34
|
+
proxyTokenRef: {
|
|
35
|
+
readonly current: string | null;
|
|
36
|
+
} | undefined;
|
|
32
37
|
}): void;
|
|
33
|
-
/**
|
|
34
|
-
* Update the auth token on the live interceptor config. Must be called
|
|
35
|
-
* whenever the Stigmer JWT is refreshed (e.g. via IPC updateToken) so
|
|
36
|
-
* that fetch-intercepted REST calls (token exchange, /v1/models) use the
|
|
37
|
-
* current token instead of the one frozen at install time.
|
|
38
|
-
*/
|
|
39
|
-
export declare function updateInterceptorToken(token: string): void;
|
|
40
38
|
/**
|
|
41
39
|
* Update the execution ID on the active interceptor (legacy global path).
|
|
42
40
|
* Prefer {@link runWithExecutionContext} for concurrent-safe isolation.
|
|
@@ -44,16 +42,8 @@ export declare function updateInterceptorToken(token: string): void;
|
|
|
44
42
|
* @deprecated Use runWithExecutionContext() instead for concurrent activities.
|
|
45
43
|
*/
|
|
46
44
|
export declare function setInterceptorExecutionId(executionId: string | undefined): void;
|
|
47
|
-
/**
|
|
48
|
-
* Run an async function with execution-scoped context. The executionId is
|
|
49
|
-
* propagated through the async call chain via AsyncLocalStorage, ensuring
|
|
50
|
-
* concurrent activities on the same runner process don't overwrite each
|
|
51
|
-
* other's proxy headers.
|
|
52
|
-
*/
|
|
53
|
-
export declare function runWithExecutionContext<T>(executionId: string, fn: () => Promise<T>): Promise<T>;
|
|
54
45
|
/**
|
|
55
46
|
* Remove the interceptor and restore the original fetch. Primarily for
|
|
56
47
|
* testing.
|
|
57
48
|
*/
|
|
58
49
|
export declare function uninstallFetchInterceptor(): void;
|
|
59
|
-
export {};
|
|
@@ -9,13 +9,16 @@
|
|
|
9
9
|
* This is the JavaScript-level equivalent of LangChain's base_url parameter
|
|
10
10
|
* that the Python agent-runner uses for the LLM proxy pattern.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Installed by the Cursor adapter's `boot` (adapter.ts), which the registry
|
|
13
|
+
* runs in both composition roots before Temporal coordinates are resolved and
|
|
14
|
+
* before the adapter loads `@cursor/sdk`, so the interceptor is in place
|
|
15
|
+
* before the SDK issues its first request. The proxy credential is read per
|
|
16
|
+
* request from the ref the root bound as `Config.proxyTokenRef`.
|
|
14
17
|
*
|
|
15
18
|
* When STIGMER_PROXY_ENDPOINT is not set, this module is a no-op.
|
|
16
19
|
*/
|
|
17
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
18
20
|
import { TimingRecorder, emitTimingLog } from "../../shared/cold-start-timing.js";
|
|
21
|
+
import { getExecutionContext } from "../../shared/execution-context.js";
|
|
19
22
|
/**
|
|
20
23
|
* REST paths worth timing individually — both sit inside Agent.create/
|
|
21
24
|
* Agent.resume on the user-visible resolve_agent setup path, and in proxy
|
|
@@ -42,12 +45,22 @@ const CURSOR_DOMAINS = [
|
|
|
42
45
|
"api.cursor.com",
|
|
43
46
|
"api.cursor.sh",
|
|
44
47
|
];
|
|
48
|
+
/**
|
|
49
|
+
* The `Authorization`-style header value for the current proxy credential,
|
|
50
|
+
* or undefined when the ref is empty. Empty is unreachable by construction
|
|
51
|
+
* today (neither root ever writes null into the ref it bound), so the request
|
|
52
|
+
* goes out without the header and the proxy's 401 is the diagnostic; a
|
|
53
|
+
* runner-side throw here would surface inside the SDK's transport, a path
|
|
54
|
+
* nothing exercises.
|
|
55
|
+
*/
|
|
56
|
+
function bearer(config) {
|
|
57
|
+
const token = config.proxyTokenRef.current;
|
|
58
|
+
return token === null ? undefined : `Bearer ${token}`;
|
|
59
|
+
}
|
|
45
60
|
let interceptorConfig = null;
|
|
46
61
|
const originalFetch = globalThis.fetch;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return executionContext;
|
|
50
|
-
}
|
|
62
|
+
/** The execution-scoped store the headers below are stamped from (`shared/execution-context.ts`). */
|
|
63
|
+
const executionContext = getExecutionContext();
|
|
51
64
|
/**
|
|
52
65
|
* Connect RPC path prefixes used by the Cursor SDK. Most requests with
|
|
53
66
|
* these prefixes go through connect-node (native HTTP/2) and are handled
|
|
@@ -164,7 +177,13 @@ function rewriteUrl(originalUrl, proxyEndpoint) {
|
|
|
164
177
|
*/
|
|
165
178
|
function replaceAuth(init, config) {
|
|
166
179
|
const headers = new Headers(init?.headers);
|
|
167
|
-
|
|
180
|
+
const auth = bearer(config);
|
|
181
|
+
// Replace, never leak: with no proxy credential the SDK's own authorization
|
|
182
|
+
// (a Cursor credential) must still not reach the proxy.
|
|
183
|
+
if (auth !== undefined)
|
|
184
|
+
headers.set("authorization", auth);
|
|
185
|
+
else
|
|
186
|
+
headers.delete("authorization");
|
|
168
187
|
const ctx = executionContext.getStore();
|
|
169
188
|
const effectiveExecutionId = ctx?.executionId ?? config.executionId;
|
|
170
189
|
if (effectiveExecutionId) {
|
|
@@ -180,7 +199,9 @@ function replaceAuth(init, config) {
|
|
|
180
199
|
*/
|
|
181
200
|
function injectProxyAuth(init, config) {
|
|
182
201
|
const headers = new Headers(init?.headers);
|
|
183
|
-
|
|
202
|
+
const auth = bearer(config);
|
|
203
|
+
if (auth !== undefined)
|
|
204
|
+
headers.set("x-stigmer-auth", auth);
|
|
184
205
|
const ctx = executionContext.getStore();
|
|
185
206
|
const effectiveExecutionId = ctx?.executionId ?? config.executionId;
|
|
186
207
|
if (effectiveExecutionId) {
|
|
@@ -298,38 +319,32 @@ async function fetchWithProxyAuth(url, init, config) {
|
|
|
298
319
|
}
|
|
299
320
|
}
|
|
300
321
|
/**
|
|
301
|
-
* Install the global fetch interceptor
|
|
302
|
-
*
|
|
322
|
+
* Install the global fetch interceptor, at boot, BEFORE `@cursor/sdk` is
|
|
323
|
+
* imported. Idempotent: a second install rebinds the config (a worker may
|
|
324
|
+
* re-boot its harnesses) and never captures the interceptor itself as the
|
|
325
|
+
* original fetch.
|
|
303
326
|
*
|
|
304
327
|
* When proxyEndpoint is empty or not provided, the interceptor is not
|
|
305
328
|
* installed and all fetch calls pass through to the original implementation.
|
|
329
|
+
* A proxy endpoint with no credential bound at install is a configuration
|
|
330
|
+
* defect and fails the boot here, the same failure as before the ref (the
|
|
331
|
+
* ref is read per request afterwards; only its presence is judged now).
|
|
306
332
|
*/
|
|
307
333
|
export function installFetchInterceptor(config) {
|
|
308
334
|
if (!config.proxyEndpoint) {
|
|
309
335
|
return;
|
|
310
336
|
}
|
|
311
|
-
if (!config.
|
|
337
|
+
if (!config.proxyTokenRef || config.proxyTokenRef.current === null) {
|
|
312
338
|
throw new Error("STIGMER_TOKEN is required when STIGMER_PROXY_ENDPOINT is set. " +
|
|
313
339
|
"In proxy mode, the runner authenticates with Stigmer's proxy using STIGMER_TOKEN.");
|
|
314
340
|
}
|
|
315
341
|
interceptorConfig = {
|
|
316
342
|
proxyEndpoint: config.proxyEndpoint,
|
|
317
|
-
|
|
343
|
+
proxyTokenRef: config.proxyTokenRef,
|
|
318
344
|
};
|
|
319
345
|
globalThis.fetch = interceptedFetch;
|
|
320
346
|
console.log(`Cursor proxy interceptor installed: Cursor traffic → ${config.proxyEndpoint}/v1/proxy/cursor/`);
|
|
321
347
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Update the auth token on the live interceptor config. Must be called
|
|
324
|
-
* whenever the Stigmer JWT is refreshed (e.g. via IPC updateToken) so
|
|
325
|
-
* that fetch-intercepted REST calls (token exchange, /v1/models) use the
|
|
326
|
-
* current token instead of the one frozen at install time.
|
|
327
|
-
*/
|
|
328
|
-
export function updateInterceptorToken(token) {
|
|
329
|
-
if (interceptorConfig) {
|
|
330
|
-
interceptorConfig = { ...interceptorConfig, stigmerToken: token };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
348
|
/**
|
|
334
349
|
* Update the execution ID on the active interceptor (legacy global path).
|
|
335
350
|
* Prefer {@link runWithExecutionContext} for concurrent-safe isolation.
|
|
@@ -341,15 +356,6 @@ export function setInterceptorExecutionId(executionId) {
|
|
|
341
356
|
interceptorConfig = { ...interceptorConfig, executionId };
|
|
342
357
|
}
|
|
343
358
|
}
|
|
344
|
-
/**
|
|
345
|
-
* Run an async function with execution-scoped context. The executionId is
|
|
346
|
-
* propagated through the async call chain via AsyncLocalStorage, ensuring
|
|
347
|
-
* concurrent activities on the same runner process don't overwrite each
|
|
348
|
-
* other's proxy headers.
|
|
349
|
-
*/
|
|
350
|
-
export function runWithExecutionContext(executionId, fn) {
|
|
351
|
-
return executionContext.run({ executionId }, fn);
|
|
352
|
-
}
|
|
353
359
|
/**
|
|
354
360
|
* Remove the interceptor and restore the original fetch. Primarily for
|
|
355
361
|
* testing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-interceptor.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/fetch-interceptor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetch-interceptor.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/fetch-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AASxE;;;;;;;;;;;;;GAaG;AACH,MAAM,gBAAgB,GAAuC,I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,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC;IAEF,UAAU,CAAC,KAAK,GAAG,gBAAgB,CAAC;IAEpC,OAAO,CAAC,GAAG,CACT,wDAAwD,MAAM,CAAC,aAAa,mBAAmB,CAChG,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAA+B;IACvE,IAAI,iBAAiB,EAAE,CAAC;QACtB,iBAAiB,GAAG,EAAE,GAAG,iBAAiB,EAAE,WAAW,EAAE,CAAC;IAC5D,CAAC;AACH,CAAC;AAGD;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,iBAAiB,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,KAAK,GAAG,aAAa,CAAC;AACnC,CAAC"}
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
*
|
|
17
17
|
* LOAD ORDER IS THEREFORE LOAD-BEARING: this interceptor MUST be installed
|
|
18
18
|
* before the first connect-node import in the process. The runner enforces this
|
|
19
|
-
* by (a) keeping connect-node out of the pre-
|
|
20
|
-
* (bootstrap.ts
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* by (a) keeping connect-node out of the pre-boot static module graph
|
|
20
|
+
* (bootstrap.ts and harness/registry.ts load StigmerClient via dynamic import;
|
|
21
|
+
* adapter.ts loads the SDK inside boot) and (b) installing this interceptor in
|
|
22
|
+
* the Cursor adapter's `boot`, which the registry runs in both composition
|
|
23
|
+
* roots before Temporal coordinates are resolved. assertHttp2ConnectPatched()
|
|
24
|
+
* verifies the ESM-facade view right after the install so any future
|
|
25
|
+
* regression fails loudly instead of silently 401-ing;
|
|
26
|
+
* src/__tests__/harness-boot-order.test.ts runs that boot in a fresh process.
|
|
24
27
|
*
|
|
25
28
|
* This module patches `http2.connect()` to wrap returned sessions. The
|
|
26
29
|
* wrapped session's `request()` method reads the execution ID from the
|
|
@@ -40,15 +43,23 @@
|
|
|
40
43
|
* to ensure the patch is in place when the SDK opens its HTTP/2 session.
|
|
41
44
|
*/
|
|
42
45
|
/**
|
|
43
|
-
* Install the HTTP/2 interceptor
|
|
44
|
-
*
|
|
46
|
+
* Install the HTTP/2 interceptor, at boot, BEFORE `@cursor/sdk` (and so
|
|
47
|
+
* connect-node) is imported. Idempotent: a second install rebinds the config
|
|
48
|
+
* (a worker may re-boot its harnesses) and leaves the one patch in place —
|
|
49
|
+
* re-capturing `http2.connect` here would take the patched function as the
|
|
50
|
+
* original and wrap every proxy session twice.
|
|
45
51
|
*
|
|
46
|
-
* When proxyEndpoint is not provided,
|
|
47
|
-
* and all http2.connect() calls pass through to
|
|
52
|
+
* When proxyEndpoint is not provided, or no credential ref is bound, the
|
|
53
|
+
* interceptor is not installed and all http2.connect() calls pass through to
|
|
54
|
+
* the original. (The fetch interceptor, installed first, throws on a proxy
|
|
55
|
+
* without a credential; this one stays a silent no-op as it always has, so a
|
|
56
|
+
* caller that installs only this half keeps its historical posture.)
|
|
48
57
|
*/
|
|
49
58
|
export declare function installHttp2Interceptor(opts: {
|
|
50
59
|
proxyEndpoint: string | undefined;
|
|
51
|
-
|
|
60
|
+
proxyTokenRef: {
|
|
61
|
+
readonly current: string | null;
|
|
62
|
+
} | undefined;
|
|
52
63
|
}): void;
|
|
53
64
|
/**
|
|
54
65
|
* Verify the patch is visible to ESM namespace importers of `node:http2`
|
|
@@ -71,13 +82,6 @@ export declare function installHttp2Interceptor(opts: {
|
|
|
71
82
|
* a load-order regression that must fail loudly at boot, not at request time.
|
|
72
83
|
*/
|
|
73
84
|
export declare function assertHttp2ConnectPatched(): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Update the auth token on the live interceptor config. Must be called
|
|
76
|
-
* whenever the Stigmer JWT is refreshed (e.g. via IPC updateToken) so
|
|
77
|
-
* that HTTP/2-intercepted streams use the current token instead of the
|
|
78
|
-
* one frozen at install time.
|
|
79
|
-
*/
|
|
80
|
-
export declare function updateHttp2InterceptorToken(token: string): void;
|
|
81
85
|
/**
|
|
82
86
|
* Remove the interceptor and restore the original http2.connect.
|
|
83
87
|
* Primarily for testing.
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
*
|
|
17
17
|
* LOAD ORDER IS THEREFORE LOAD-BEARING: this interceptor MUST be installed
|
|
18
18
|
* before the first connect-node import in the process. The runner enforces this
|
|
19
|
-
* by (a) keeping connect-node out of the pre-
|
|
20
|
-
* (bootstrap.ts
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* by (a) keeping connect-node out of the pre-boot static module graph
|
|
20
|
+
* (bootstrap.ts and harness/registry.ts load StigmerClient via dynamic import;
|
|
21
|
+
* adapter.ts loads the SDK inside boot) and (b) installing this interceptor in
|
|
22
|
+
* the Cursor adapter's `boot`, which the registry runs in both composition
|
|
23
|
+
* roots before Temporal coordinates are resolved. assertHttp2ConnectPatched()
|
|
24
|
+
* verifies the ESM-facade view right after the install so any future
|
|
25
|
+
* regression fails loudly instead of silently 401-ing;
|
|
26
|
+
* src/__tests__/harness-boot-order.test.ts runs that boot in a fresh process.
|
|
24
27
|
*
|
|
25
28
|
* This module patches `http2.connect()` to wrap returned sessions. The
|
|
26
29
|
* wrapped session's `request()` method reads the execution ID from the
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
* to ensure the patch is in place when the SDK opens its HTTP/2 session.
|
|
41
44
|
*/
|
|
42
45
|
import { createRequire } from "node:module";
|
|
43
|
-
import { getExecutionContext } from "
|
|
46
|
+
import { getExecutionContext } from "../../shared/execution-context.js";
|
|
44
47
|
// Use require() to get the ACTUAL CJS module singleton. Mutations here
|
|
45
48
|
// are visible to all importers including ESM namespace imports, because
|
|
46
49
|
// Node.js builtins expose a single shared exports object.
|
|
@@ -92,10 +95,15 @@ function wrapSession(session) {
|
|
|
92
95
|
return originalRequest(headers, options);
|
|
93
96
|
}
|
|
94
97
|
const ctx = getExecutionContext().getStore();
|
|
95
|
-
const augmented = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
const augmented = { ...headers };
|
|
99
|
+
// An empty ref is unreachable by construction today (no root writes null
|
|
100
|
+
// into the ref it bound); the stream then goes out without the header and
|
|
101
|
+
// the proxy's 401 is the diagnostic, rather than a throw inside the SDK's
|
|
102
|
+
// transport, a path nothing exercises.
|
|
103
|
+
const token = config.proxyTokenRef.current;
|
|
104
|
+
if (token !== null) {
|
|
105
|
+
augmented[STIGMER_AUTH_HEADER] = `Bearer ${token}`;
|
|
106
|
+
}
|
|
99
107
|
if (ctx?.executionId) {
|
|
100
108
|
augmented[EXECUTION_ID_HEADER] = ctx.executionId;
|
|
101
109
|
}
|
|
@@ -104,17 +112,23 @@ function wrapSession(session) {
|
|
|
104
112
|
return session;
|
|
105
113
|
}
|
|
106
114
|
/**
|
|
107
|
-
* Install the HTTP/2 interceptor
|
|
108
|
-
*
|
|
115
|
+
* Install the HTTP/2 interceptor, at boot, BEFORE `@cursor/sdk` (and so
|
|
116
|
+
* connect-node) is imported. Idempotent: a second install rebinds the config
|
|
117
|
+
* (a worker may re-boot its harnesses) and leaves the one patch in place —
|
|
118
|
+
* re-capturing `http2.connect` here would take the patched function as the
|
|
119
|
+
* original and wrap every proxy session twice.
|
|
109
120
|
*
|
|
110
|
-
* When proxyEndpoint is not provided,
|
|
111
|
-
* and all http2.connect() calls pass through to
|
|
121
|
+
* When proxyEndpoint is not provided, or no credential ref is bound, the
|
|
122
|
+
* interceptor is not installed and all http2.connect() calls pass through to
|
|
123
|
+
* the original. (The fetch interceptor, installed first, throws on a proxy
|
|
124
|
+
* without a credential; this one stays a silent no-op as it always has, so a
|
|
125
|
+
* caller that installs only this half keeps its historical posture.)
|
|
112
126
|
*/
|
|
113
127
|
export function installHttp2Interceptor(opts) {
|
|
114
128
|
if (!opts.proxyEndpoint) {
|
|
115
129
|
return;
|
|
116
130
|
}
|
|
117
|
-
if (!opts.
|
|
131
|
+
if (!opts.proxyTokenRef || opts.proxyTokenRef.current === null) {
|
|
118
132
|
return;
|
|
119
133
|
}
|
|
120
134
|
const parsed = parseAuthority(opts.proxyEndpoint);
|
|
@@ -122,7 +136,11 @@ export function installHttp2Interceptor(opts) {
|
|
|
122
136
|
console.warn(`[http2-interceptor] Could not parse proxyEndpoint "${opts.proxyEndpoint}", skipping install`);
|
|
123
137
|
return;
|
|
124
138
|
}
|
|
125
|
-
|
|
139
|
+
const alreadyPatched = config !== null;
|
|
140
|
+
config = { proxyHostname: parsed.hostname, proxyPort: parsed.port, proxyTokenRef: opts.proxyTokenRef };
|
|
141
|
+
if (alreadyPatched) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
126
144
|
originalConnect = http2.connect;
|
|
127
145
|
http2.connect = function patchedConnect(authority, optionsOrListener, listener) {
|
|
128
146
|
const isProxy = isProxyAuthority(authority);
|
|
@@ -164,21 +182,10 @@ export async function assertHttp2ConnectPatched() {
|
|
|
164
182
|
throw new Error("[http2-interceptor] node:http2 ESM facade is unpatched: connect-node imported " +
|
|
165
183
|
"node:http2 before installHttp2Interceptor() ran, so its frozen namespace still " +
|
|
166
184
|
"holds the original http2.connect. BiDi streams would omit x-stigmer-auth and 401. " +
|
|
167
|
-
"Fix the load order: keep @connectrpc/connect-node out of the pre-
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Update the auth token on the live interceptor config. Must be called
|
|
175
|
-
* whenever the Stigmer JWT is refreshed (e.g. via IPC updateToken) so
|
|
176
|
-
* that HTTP/2-intercepted streams use the current token instead of the
|
|
177
|
-
* one frozen at install time.
|
|
178
|
-
*/
|
|
179
|
-
export function updateHttp2InterceptorToken(token) {
|
|
180
|
-
if (config) {
|
|
181
|
-
config = { ...config, stigmerToken: token };
|
|
185
|
+
"Fix the load order: keep @connectrpc/connect-node out of the pre-boot static module " +
|
|
186
|
+
"graph (load StigmerClient via dynamic import, as bootstrap.ts and harness/registry.ts " +
|
|
187
|
+
"do) and keep @cursor/sdk behind the Cursor adapter's boot (adapter.ts loads turn.ts " +
|
|
188
|
+
"after this install). See src/__tests__/harness-boot-order.test.ts.");
|
|
182
189
|
}
|
|
183
190
|
}
|
|
184
191
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http2-interceptor.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/http2-interceptor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"http2-interceptor.js","sourceRoot":"","sources":["../../../src/activities/execute-cursor/http2-interceptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,uEAAuE;AACvE,wEAAwE;AACxE,0DAA0D;AAC1D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,KAAK,GAAqB,OAAO,CAAC,YAAY,CAAC,CAAC;AAEtD,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AACrD,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAe7C,IAAI,MAAM,GAAkC,IAAI,CAAC;AACjD,IAAI,eAAe,GAAyB,KAAK,CAAC,OAAO,CAAC;AAE1D,6EAA6E;AAC7E,wDAAwD;AACxD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAgC,CAAC;AAE9D;;;GAGG;AACH,SAAS,cAAc,CAAC,SAAuB;IAC7C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,SAAS,YAAY,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,GAA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