@stigmer/server 3.15.3-dev.20260916211208 → 3.16.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.
Files changed (152) hide show
  1. package/dist/authorization/lane-admission.d.ts +50 -0
  2. package/dist/authorization/lane-admission.d.ts.map +1 -0
  3. package/dist/authorization/lane-admission.js +13 -0
  4. package/dist/authorization/lane-admission.js.map +1 -0
  5. package/dist/authorization/schedule-fire-caller.d.ts +2 -2
  6. package/dist/authorization/schedule-fire-caller.d.ts.map +1 -1
  7. package/dist/authorization/schedule-fire-caller.js +8 -8
  8. package/dist/authorization/schedule-fire-caller.js.map +1 -1
  9. package/dist/boot/compose.d.ts.map +1 -1
  10. package/dist/boot/compose.js +66 -14
  11. package/dist/boot/compose.js.map +1 -1
  12. package/dist/boot/inprocess.d.ts.map +1 -1
  13. package/dist/boot/inprocess.js +6 -1
  14. package/dist/boot/inprocess.js.map +1 -1
  15. package/dist/domain/executioncontext/resolve-values-for-caller.d.ts +33 -14
  16. package/dist/domain/executioncontext/resolve-values-for-caller.d.ts.map +1 -1
  17. package/dist/domain/executioncontext/resolve-values-for-caller.js +32 -8
  18. package/dist/domain/executioncontext/resolve-values-for-caller.js.map +1 -1
  19. package/dist/domain/identityaccount/actor.d.ts +33 -18
  20. package/dist/domain/identityaccount/actor.d.ts.map +1 -1
  21. package/dist/domain/identityaccount/actor.js +20 -3
  22. package/dist/domain/identityaccount/actor.js.map +1 -1
  23. package/dist/domain/identityaccount/resolve.d.ts +19 -0
  24. package/dist/domain/identityaccount/resolve.d.ts.map +1 -1
  25. package/dist/domain/identityaccount/resolve.js +12 -0
  26. package/dist/domain/identityaccount/resolve.js.map +1 -1
  27. package/dist/domain/mcpserver/connect-execution-id.d.ts +5 -0
  28. package/dist/domain/mcpserver/connect-execution-id.d.ts.map +1 -0
  29. package/dist/domain/mcpserver/connect-execution-id.js +32 -0
  30. package/dist/domain/mcpserver/connect-execution-id.js.map +1 -0
  31. package/dist/domain/mcpserver/connect.d.ts +28 -2
  32. package/dist/domain/mcpserver/connect.d.ts.map +1 -1
  33. package/dist/domain/mcpserver/connect.js +27 -7
  34. package/dist/domain/mcpserver/connect.js.map +1 -1
  35. package/dist/domain/mcpserver/engine.d.ts +9 -3
  36. package/dist/domain/mcpserver/engine.d.ts.map +1 -1
  37. package/dist/domain/mcpserver/engine.js.map +1 -1
  38. package/dist/domain/mcpserver/start-connect.js +1 -1
  39. package/dist/domain/mcpserver/start-connect.js.map +1 -1
  40. package/dist/domain/platform/controller.d.ts +24 -11
  41. package/dist/domain/platform/controller.d.ts.map +1 -1
  42. package/dist/domain/platform/controller.js.map +1 -1
  43. package/dist/domain/plugin/overlay/sanitize.d.ts.map +1 -1
  44. package/dist/domain/plugin/overlay/sanitize.js +4 -2
  45. package/dist/domain/plugin/overlay/sanitize.js.map +1 -1
  46. package/dist/domain/workflowexecution/phases.d.ts +21 -0
  47. package/dist/domain/workflowexecution/phases.d.ts.map +1 -0
  48. package/dist/domain/workflowexecution/phases.js +31 -0
  49. package/dist/domain/workflowexecution/phases.js.map +1 -0
  50. package/dist/identity/oidc-verifier.js +8 -1
  51. package/dist/identity/oidc-verifier.js.map +1 -1
  52. package/dist/pipeline/apiresource-meta.d.ts +15 -0
  53. package/dist/pipeline/apiresource-meta.d.ts.map +1 -1
  54. package/dist/pipeline/apiresource-meta.js +34 -0
  55. package/dist/pipeline/apiresource-meta.js.map +1 -1
  56. package/dist/pipeline/steps/guard-memory-capture.d.ts.map +1 -1
  57. package/dist/pipeline/steps/guard-memory-capture.js +5 -3
  58. package/dist/pipeline/steps/guard-memory-capture.js.map +1 -1
  59. package/dist/runnerauth/bound-execution.d.ts +27 -0
  60. package/dist/runnerauth/bound-execution.d.ts.map +1 -0
  61. package/dist/runnerauth/bound-execution.js +137 -0
  62. package/dist/runnerauth/bound-execution.js.map +1 -0
  63. package/dist/runnerauth/built-in-runner-credential-provider.d.ts +28 -0
  64. package/dist/runnerauth/built-in-runner-credential-provider.d.ts.map +1 -0
  65. package/dist/runnerauth/built-in-runner-credential-provider.js +217 -0
  66. package/dist/runnerauth/built-in-runner-credential-provider.js.map +1 -0
  67. package/dist/runnerauth/constants.d.ts +63 -0
  68. package/dist/runnerauth/constants.d.ts.map +1 -0
  69. package/dist/runnerauth/constants.js +63 -0
  70. package/dist/runnerauth/constants.js.map +1 -0
  71. package/dist/runnerauth/dispatch-credential.d.ts +38 -0
  72. package/dist/runnerauth/dispatch-credential.d.ts.map +1 -0
  73. package/dist/runnerauth/dispatch-credential.js +17 -0
  74. package/dist/runnerauth/dispatch-credential.js.map +1 -0
  75. package/dist/runnerauth/runner-credential-provider.d.ts +49 -11
  76. package/dist/runnerauth/runner-credential-provider.d.ts.map +1 -1
  77. package/dist/runnerauth/runner-credential-provider.js +16 -4
  78. package/dist/runnerauth/runner-credential-provider.js.map +1 -1
  79. package/dist/runnerauth/runner-subject-verifier.d.ts +14 -0
  80. package/dist/runnerauth/runner-subject-verifier.d.ts.map +1 -0
  81. package/dist/runnerauth/runner-subject-verifier.js +115 -0
  82. package/dist/runnerauth/runner-subject-verifier.js.map +1 -0
  83. package/dist/runnerauth/runnerauth.d.ts +33 -4
  84. package/dist/runnerauth/runnerauth.d.ts.map +1 -1
  85. package/dist/runnerauth/runnerauth.js +131 -35
  86. package/dist/runnerauth/runnerauth.js.map +1 -1
  87. package/dist/temporal/agentexecution/engine-client.d.ts +13 -0
  88. package/dist/temporal/agentexecution/engine-client.d.ts.map +1 -1
  89. package/dist/temporal/agentexecution/engine-client.js +10 -2
  90. package/dist/temporal/agentexecution/engine-client.js.map +1 -1
  91. package/dist/temporal/agentexecution/workflow-input.d.ts +13 -0
  92. package/dist/temporal/agentexecution/workflow-input.d.ts.map +1 -1
  93. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.d.ts.map +1 -1
  94. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js +35 -31
  95. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js.map +1 -1
  96. package/dist/temporal/workflowexecution/engine-client.d.ts +24 -0
  97. package/dist/temporal/workflowexecution/engine-client.d.ts.map +1 -1
  98. package/dist/temporal/workflowexecution/engine-client.js +26 -19
  99. package/dist/temporal/workflowexecution/engine-client.js.map +1 -1
  100. package/dist/temporal/workflowexecution/workflow-input.d.ts +14 -0
  101. package/dist/temporal/workflowexecution/workflow-input.d.ts.map +1 -1
  102. package/package.json +5 -5
  103. package/src/authorization/__tests__/lane-admission.test.ts +115 -0
  104. package/src/authorization/lane-admission.ts +73 -0
  105. package/src/authorization/schedule-fire-caller.ts +10 -14
  106. package/src/boot/compose.ts +79 -22
  107. package/src/boot/inprocess.ts +7 -1
  108. package/src/domain/executioncontext/__tests__/executioncontext.test.ts +104 -0
  109. package/src/domain/executioncontext/__tests__/resolve-values-capability.test.ts +33 -4
  110. package/src/domain/executioncontext/resolve-values-for-caller.ts +79 -22
  111. package/src/domain/identityaccount/__tests__/account-for-stamp.test.ts +111 -0
  112. package/src/domain/identityaccount/actor.ts +61 -21
  113. package/src/domain/identityaccount/resolve.ts +31 -0
  114. package/src/domain/mcpserver/__tests__/connect.test.ts +17 -2
  115. package/src/domain/mcpserver/connect-execution-id.ts +34 -0
  116. package/src/domain/mcpserver/connect.ts +38 -3
  117. package/src/domain/mcpserver/engine.ts +9 -3
  118. package/src/domain/mcpserver/start-connect.ts +1 -1
  119. package/src/domain/platform/controller.ts +24 -11
  120. package/src/domain/plugin/__tests__/plugin.test.ts +116 -1
  121. package/src/domain/plugin/__tests__/sanitize.test.ts +2 -2
  122. package/src/domain/plugin/overlay/sanitize.ts +4 -2
  123. package/src/domain/workflowexecution/__tests__/phases.test.ts +58 -0
  124. package/src/domain/workflowexecution/phases.ts +33 -0
  125. package/src/extensions/__tests__/extension-composition.test.ts +7 -1
  126. package/src/identity/__tests__/oidc-verifier.test.ts +22 -0
  127. package/src/identity/oidc-verifier.ts +8 -1
  128. package/src/pipeline/__tests__/kind-by-id-prefix.test.ts +75 -0
  129. package/src/pipeline/apiresource-meta.ts +41 -0
  130. package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +55 -35
  131. package/src/pipeline/steps/guard-memory-capture.ts +5 -3
  132. package/src/runnerauth/__tests__/bound-execution.test.ts +334 -0
  133. package/src/runnerauth/__tests__/built-in-runner-credential-provider.test.ts +516 -0
  134. package/src/runnerauth/__tests__/dispatch-credential.test.ts +94 -0
  135. package/src/runnerauth/__tests__/runner-credential-provider.test.ts +27 -0
  136. package/src/runnerauth/__tests__/runner-subject-composed.test.ts +497 -0
  137. package/src/runnerauth/__tests__/runner-subject-verifier.test.ts +541 -0
  138. package/src/runnerauth/bound-execution.ts +270 -0
  139. package/src/runnerauth/built-in-runner-credential-provider.ts +300 -0
  140. package/src/runnerauth/constants.ts +74 -0
  141. package/src/runnerauth/dispatch-credential.ts +63 -0
  142. package/src/runnerauth/runner-credential-provider.ts +60 -11
  143. package/src/runnerauth/runner-subject-verifier.ts +152 -0
  144. package/src/runnerauth/runnerauth.ts +148 -38
  145. package/src/temporal/agentexecution/__tests__/engine-client.test.ts +107 -38
  146. package/src/temporal/agentexecution/__tests__/invoke-workflow.test.ts +105 -2
  147. package/src/temporal/agentexecution/engine-client.ts +27 -2
  148. package/src/temporal/agentexecution/workflow-input.ts +13 -0
  149. package/src/temporal/agentexecution/workflows/invoke-agent-execution.ts +90 -44
  150. package/src/temporal/workflowexecution/__tests__/engine-client.test.ts +139 -33
  151. package/src/temporal/workflowexecution/engine-client.ts +48 -21
  152. package/src/temporal/workflowexecution/workflow-input.ts +14 -0
@@ -41,12 +41,26 @@
41
41
  * the token baked into a provisioned sandbox, and the ExecutionContext
42
42
  * decrypt trust decision. Each is an OPTIONAL method here; each OSS call
43
43
  * site falls back to today's exact behavior when the method is absent,
44
- * and the OSS default provider defines none — empty-composition behavior
45
- * is byte-identical by construction (the local conformance rosters pin
46
- * it). One provider object carries the edition's whole credential story;
47
- * the rejected alternative (a second single-instance driver for the
48
- * exchange) split that story across two objects whose only consumer is
49
- * the same composition.
44
+ * and the OSS default provider defines none of these POLICY capabilities
45
+ * — empty-composition behavior is byte-identical by construction (the
46
+ * local conformance rosters pin it). One provider object carries the
47
+ * edition's whole credential story; the rejected alternative (a second
48
+ * single-instance driver for the exchange) split that story across two
49
+ * objects whose only consumer is the same composition.
50
+ *
51
+ * One capability is open source's OWN and the default provider does
52
+ * define it: `mintRunCredential`, the run credential the dispatch path
53
+ * puts on every invoke workflow input (2026-09-16). It is optional on the
54
+ * seam for the same reason the others are — an edition whose runner
55
+ * credential rides another channel (the cloud's, minted at sandbox
56
+ * provision) leaves it undefined and its payloads carry nothing — but
57
+ * here the OSS default is the one that defines it, because the run
58
+ * credential is how an open-source runner acts for each run under the
59
+ * built-in authorization posture (runner-subject-verifier.ts). A unit
60
+ * that registers its own Authorizer but no provider of its own inherits
61
+ * this mint and composes no verifier for it; such a unit owns its
62
+ * credential story and must bring a provider, the rule the composition
63
+ * root already states for the verifier.
50
64
  *
51
65
  * Capability implementations REFUSE by throwing (a ConnectError with the
52
66
  * implementation's own byte-pinned copy — the gate-step refusal shape)
@@ -201,6 +215,22 @@ export interface RunnerCredentialProvider {
201
215
  * propagates to the invoking step's own failure posture.
202
216
  */
203
217
  mintSandboxCredential?(request: SandboxCredentialRequest): string;
218
+ /**
219
+ * The RUN credential the dispatch path hands the runner in the invoke
220
+ * workflow input (`execution_context_token` on both invoke inputs —
221
+ * the connect lane's key for the same token type). Bound to one
222
+ * execution and carrying NO `exp`: its validity is the bound row's
223
+ * liveness (runnerauth.ts `mintRunCredential`; bound-execution.ts),
224
+ * read by both lanes that accept it. When present, both engine clients
225
+ * call it for every dispatch (start, recover, signalWithStart); absent,
226
+ * the payload carries no credential — the edition's runner is
227
+ * credentialed another way (the cloud bakes a sandbox credential at
228
+ * provision). Returns "" to dispatch without a credential (the lane
229
+ * cannot mint — keyless); a thrown error is a real fault, which the
230
+ * dispatch reader (dispatch-credential.ts) logs and degrades to the
231
+ * same "" rather than failing the run's start.
232
+ */
233
+ mintRunCredential?(executionId: string): string;
204
234
  /**
205
235
  * The ExecutionContext decrypt trust decision for getByExecutionId
206
236
  * (`executionId` is the EC's spec.execution_id). When present, it IS
@@ -263,17 +293,25 @@ export interface RunnerCredentialProvider {
263
293
  * `captureOrg` is the request's metadata.org, checked against the
264
294
  * token's own org claim).
265
295
  *
296
+ * May answer synchronously or with a promise: the cloud's credential
297
+ * carries the subject and the session in its own claims, so its answer
298
+ * is a decode; open source's run credential names only the execution,
299
+ * so the built-in provider reads the execution row for its session and
300
+ * org (built-in-runner-credential-provider.ts). The gate awaits either.
301
+ *
266
302
  * Absent method → the gate's existing logic exactly (today's OSS
267
303
  * behavior: the trusted-local single-user posture admits, honestly).
268
304
  */
269
- authorizeMemoryCapture?(caller: CallerIdentity, captureOrg: string): MemoryCaptureDecision;
305
+ authorizeMemoryCapture?(caller: CallerIdentity, captureOrg: string): MemoryCaptureDecision | Promise<MemoryCaptureDecision>;
270
306
  }
271
307
  /**
272
308
  * The OSS default: RunnerAuthService behind the provider contract,
273
- * providing only the execution_scoped lane. A separate adapter rather
274
- * than the service implementing the interface: the service's concrete
275
- * lane-free signatures are a stable test surface (and the O2 sub-project
276
- * edits runnerauth.ts in parallel — this file keeps O5 out of it).
309
+ * providing only the execution_scoped lane, plus the one capability that
310
+ * is open source's own — the run credential a dispatch carries (module
311
+ * header). A separate adapter rather than the service implementing the
312
+ * interface: the service's concrete lane-free signatures are a stable
313
+ * test surface (and the O2 sub-project edits runnerauth.ts in parallel —
314
+ * this file keeps O5 out of it).
277
315
  */
278
316
  export declare function newExecutionScopedRunnerCredentialProvider(service: RunnerAuthService): RunnerCredentialProvider;
279
317
  //# sourceMappingURL=runner-credential-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner-credential-provider.d.ts","sourceRoot":"","sources":["../../src/runnerauth/runner-credential-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC;IAEvC;;;;;;;OAOG;IACH,qBAAqB,CAAC,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,CAAC;IAElE;;;;;;;;;OASG;IACH,6BAA6B,CAAC,CAC5B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE/D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,wBAAwB,CAAC,CACvB,MAAM,EAAE,cAAc,EACtB,0BAA0B,EAAE,MAAM,GACjC,OAAO,CAAC;IAEX;;;;;;;;;;;;;;OAcG;IACH,sBAAsB,CAAC,CACrB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB,qBAAqB,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,0CAA0C,CACxD,OAAO,EAAE,iBAAiB,GACzB,wBAAwB,CAoB1B"}
1
+ {"version":3,"file":"runner-credential-provider.d.ts","sourceRoot":"","sources":["../../src/runnerauth/runner-credential-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAEL,iBAAiB,EAElB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACjE;IAAE,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAAC,QA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CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE/D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,wBAAwB,CAAC,CACvB,MAAM,EAAE,cAAc,EACtB,0BAA0B,EAAE,MAAM,GACjC,OAAO,CAAC;IAEX;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,sBAAsB,CAAC,CACrB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,0CAA0C,CACxD,OAAO,EAAE,iBAAiB,GACzB,wBAAwB,CA8B1B"}
@@ -1,10 +1,12 @@
1
1
  import { InvalidTokenError, TOKEN_TYPE_EXECUTION_SCOPED, } from "./runnerauth.js";
2
2
  /**
3
3
  * The OSS default: RunnerAuthService behind the provider contract,
4
- * providing only the execution_scoped lane. A separate adapter rather
5
- * than the service implementing the interface: the service's concrete
6
- * lane-free signatures are a stable test surface (and the O2 sub-project
7
- * edits runnerauth.ts in parallel — this file keeps O5 out of it).
4
+ * providing only the execution_scoped lane, plus the one capability that
5
+ * is open source's own — the run credential a dispatch carries (module
6
+ * header). A separate adapter rather than the service implementing the
7
+ * interface: the service's concrete lane-free signatures are a stable
8
+ * test surface (and the O2 sub-project edits runnerauth.ts in parallel —
9
+ * this file keeps O5 out of it).
8
10
  */
9
11
  export function newExecutionScopedRunnerCredentialProvider(service) {
10
12
  return {
@@ -23,6 +25,16 @@ export function newExecutionScopedRunnerCredentialProvider(service) {
23
25
  }
24
26
  return service.verify(token);
25
27
  },
28
+ mintRunCredential(executionId) {
29
+ // Keyless is the modeled disabled state (the exchange's fail-soft
30
+ // arm, the sandbox lane's tokenless launch): answer "" and let the
31
+ // dispatch go without. Anything else the service refuses is a
32
+ // programming error and propagates as itself.
33
+ if (!service.isEnabled()) {
34
+ return "";
35
+ }
36
+ return service.mintRunCredential(executionId);
37
+ },
26
38
  };
27
39
  }
28
40
  //# sourceMappingURL=runner-credential-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner-credential-provider.js","sourceRoot":"","sources":["../../src/runnerauth/runner-credential-provider.ts"],"names":[],"mappings":"AA0DA,OAAO,EACL,iBAAiB,EAEjB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AA4OzB;;;;;;GAMG;AACH,MAAM,UAAU,0CAA0C,CACxD,OAA0B;IAE1B,OAAO;QACL,SAAS,CAAC,IAAY;YACpB,OAAO,IAAI,KAAK,2BAA2B,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,IAAY,EAAE,OAAe,EAAE,UAAkB;YACpD,IAAI,IAAI,KAAK,2BAA2B,EAAE,CAAC;gBACzC,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,uDAAuD,2BAA2B,IAAI,CACtH,CAAC;YACJ,CAAC;YACD,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,CAAC,IAAY,EAAE,KAAa;YAChC,IAAI,IAAI,KAAK,2BAA2B,EAAE,CAAC;gBACzC,MAAM,IAAI,iBAAiB,EAAE,CAAC;YAChC,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"runner-credential-provider.js","sourceRoot":"","sources":["../../src/runnerauth/runner-credential-provider.ts"],"names":[],"mappings":"AAwEA,OAAO,EACL,iBAAiB,EAEjB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AAmQzB;;;;;;;;GAQG;AACH,MAAM,UAAU,0CAA0C,CACxD,OAA0B;IAE1B,OAAO;QACL,SAAS,CAAC,IAAY;YACpB,OAAO,IAAI,KAAK,2BAA2B,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,IAAY,EAAE,OAAe,EAAE,UAAkB;YACpD,IAAI,IAAI,KAAK,2BAA2B,EAAE,CAAC;gBACzC,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,uDAAuD,2BAA2B,IAAI,CACtH,CAAC;YACJ,CAAC;YACD,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,CAAC,IAAY,EAAE,KAAa;YAChC,IAAI,IAAI,KAAK,2BAA2B,EAAE,CAAC;gBACzC,MAAM,IAAI,iBAAiB,EAAE,CAAC;YAChC,CAAC;YACD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,iBAAiB,CAAC,WAAmB;YACnC,kEAAkE;YAClE,mEAAmE;YACnE,8DAA8D;YAC9D,8CAA8C;YAC9C,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;gBACzB,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAChD,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { AccountsByCaller } from "../domain/identityaccount/resolve.js";
2
+ import type { IdentityVerifier } from "../extensions/identity.js";
3
+ import type { BoundExecutionStore } from "./bound-execution.js";
4
+ import type { RunnerCredentialProvider } from "./runner-credential-provider.js";
5
+ export interface RunnerSubjectVerifierDeps {
6
+ /** Where the executions live — one primary-key read per claimed token. */
7
+ readonly store: BoundExecutionStore;
8
+ /** The account port the creator stamp resolves through (by id, then by subject). */
9
+ readonly accounts: AccountsByCaller;
10
+ /** The provider whose execution_scoped lane signed the token — verification goes through the seam. */
11
+ readonly credentials: Pick<RunnerCredentialProvider, "verify">;
12
+ }
13
+ export declare function newRunnerSubjectIdentityVerifier(deps: RunnerSubjectVerifierDeps): IdentityVerifier;
14
+ //# sourceMappingURL=runner-subject-verifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner-subject-verifier.d.ts","sourceRoot":"","sources":["../../src/runnerauth/runner-subject-verifier.ts"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAMhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAOhF,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,oFAAoF;IACpF,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,sGAAsG;IACtG,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;CAChE;AAED,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,yBAAyB,GAC9B,gBAAgB,CAmClB"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The runner-subject identity verifier — the third open-source entry on
3
+ * the chassis's verifier chain, composed under the built-in authorization
4
+ * posture ONLY (boot/compose.ts; authorization/posture.ts), between
5
+ * `apikey` and `oidc`. It admits the bearer of an execution-scoped runner
6
+ * token AS THE HUMAN WHO ASKED: for a run, the person the execution row's
7
+ * creator stamp names, for as long as that run lives; for an MCP
8
+ * connect, the person who asked for the connect, whose stamp the
9
+ * connect's ExecutionContext row carries for as long as that row exists
10
+ * — in the `runner` caller class either way (runnerauth.ts header: the
11
+ * lane the token gains under this posture; bound-execution.ts: the three
12
+ * bindings and what "lives" means for each).
13
+ *
14
+ * Why a verifier reads the store: the token is a capability for one
15
+ * execution, not an identity assertion. Its claims name only the
16
+ * binding; the server resolves the person from the row the way the
17
+ * schedule fire caller resolves a schedule's creator (`accountForStamp`:
18
+ * the account id stamped since 3.15.0, the raw issuer subject the 3.14.x
19
+ * verifiers stamped) and mints the account acting as itself
20
+ * (`accountAsRunnerCaller`), so the audit actor on every row the runner
21
+ * writes carries the person's email and display name that no token
22
+ * could. The API-key verifier is the precedent for a store-reading
23
+ * verifier (domain/apikey/verifier.ts: the key row, then the owner's
24
+ * account); this one pays the same two reads. No cache: a run that ends,
25
+ * or a connect that settles, stops admitting on the very next request.
26
+ *
27
+ * A token with no `exp` is a RUN credential and may bind only a run
28
+ * (`bindsARun`): no mint produces a clockless connect token, so one that
29
+ * arrives is refused as the credential it is not — the same predicate
30
+ * the decrypt lane falls closed on, one rule in one home.
31
+ *
32
+ * The execution's creator IS the session's owner on every path open
33
+ * source has today. `agent_execution.can_edit` derives from the SESSION's
34
+ * owner, not the execution's stamp, so the person this verifier admits
35
+ * must be the session's owner for the runner to report at all. They
36
+ * coincide because a session's `can_create_execution_in` is its viewers,
37
+ * and in open source a session has no viewer but its owner: the contract
38
+ * lists `viewer` as grantable on a session, but open source's grant scope
39
+ * is organization-only (domain/iampolicy/grant-scope.ts) and the session
40
+ * model derives no organization-wide viewer. A scheduled run is created
41
+ * as the schedule's creator, who owns the session the fire creates. The
42
+ * verifier test pins the grant-scope fact by name; an edition that grants
43
+ * `viewer` on sessions (the cloud does) has the cloud's own credential
44
+ * story, and a change to open source's scope must revisit this sentence.
45
+ *
46
+ * Claim rule: exactly `token_type === "execution_scoped"`, read from the
47
+ * UNTRUSTED payload (`peekTokenType`). Everything else passes — the
48
+ * API-key lane's `stk_`, the OIDC verifier's JWTs, garbage. The ORDER on
49
+ * the chain is the contract, not a detail: the OIDC verifier claims any
50
+ * JWT-shaped token and throws when it cannot verify one, and the server's
51
+ * own HS256 token is JWT-shaped, so composed after `oidc` this verifier
52
+ * would never see its own token; that is precisely what a 3.15.x
53
+ * self-host with sign-in on did (stigmer#1137: every agent execution
54
+ * failed INTERNAL). A token that names our type and fails the HMAC is
55
+ * CLAIMED and refused, never passed to a laxer verifier (the identity.ts
56
+ * contract); an OIDC-issued JWT never carries the claim, so there is no
57
+ * downgrade path.
58
+ *
59
+ * Refusals are UNAUTHENTICATED with exactly two sentences (constants.ts):
60
+ * the token sentence for anything wrong with the credential itself — the
61
+ * HMAC, a present `exp` in the past, a binding that names no kind or no
62
+ * row (the run is not the caller's to learn about, so never NOT_FOUND),
63
+ * a clockless token bound to a connect — and the liveness sentence for a
64
+ * genuine credential whose run is over or was created by nobody this
65
+ * server recognizes. A store fault propagates as the fault it is: the
66
+ * chassis maps it INTERNAL (pipeline/interceptors/auth.ts), so an outage
67
+ * never reads as a bad credential.
68
+ */
69
+ import { Code, ConnectError } from "@connectrpc/connect";
70
+ import { accountAsRunnerCaller } from "../domain/identityaccount/actor.js";
71
+ import { accountForStamp } from "../domain/identityaccount/resolve.js";
72
+ import { bindsARun, loadBoundExecution } from "./bound-execution.js";
73
+ import { RUNNER_CREDENTIAL_INVALID_MESSAGE, RUNNER_CREDENTIAL_NOT_LIVE_MESSAGE, RUNNER_VERIFIER_NAME, } from "./constants.js";
74
+ import { isClockedToken, peekTokenType, TOKEN_TYPE_EXECUTION_SCOPED, } from "./runnerauth.js";
75
+ export function newRunnerSubjectIdentityVerifier(deps) {
76
+ return {
77
+ name: RUNNER_VERIFIER_NAME,
78
+ async verify(token) {
79
+ if (peekTokenType(token) !== TOKEN_TYPE_EXECUTION_SCOPED) {
80
+ return null;
81
+ }
82
+ let executionId;
83
+ try {
84
+ executionId = deps.credentials.verify(TOKEN_TYPE_EXECUTION_SCOPED, token);
85
+ }
86
+ catch {
87
+ // Every verify failure is the one InvalidTokenError by contract;
88
+ // the sentence on the wire is ours, not the service's.
89
+ throw invalidCredential();
90
+ }
91
+ const execution = await loadBoundExecution(deps.store, executionId);
92
+ if (execution === undefined) {
93
+ throw invalidCredential();
94
+ }
95
+ if (!isClockedToken(token) && !bindsARun(execution.kind)) {
96
+ throw invalidCredential();
97
+ }
98
+ if (!execution.live) {
99
+ throw notLive();
100
+ }
101
+ const account = await accountForStamp(deps.accounts, execution.createdBy);
102
+ if (account === undefined) {
103
+ throw notLive();
104
+ }
105
+ return accountAsRunnerCaller(account, token);
106
+ },
107
+ };
108
+ }
109
+ function invalidCredential() {
110
+ return new ConnectError(RUNNER_CREDENTIAL_INVALID_MESSAGE, Code.Unauthenticated);
111
+ }
112
+ function notLive() {
113
+ return new ConnectError(RUNNER_CREDENTIAL_NOT_LIVE_MESSAGE, Code.Unauthenticated);
114
+ }
115
+ //# sourceMappingURL=runner-subject-verifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner-subject-verifier.js","sourceRoot":"","sources":["../../src/runnerauth/runner-subject-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAMvE,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,cAAc,EACd,aAAa,EACb,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AAWzB,MAAM,UAAU,gCAAgC,CAC9C,IAA+B;IAE/B,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,CAAC,MAAM,CAAC,KAAa;YACxB,IAAI,aAAa,CAAC,KAAK,CAAC,KAAK,2BAA2B,EAAE,CAAC;gBACzD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IAAI,WAAmB,CAAC;YACxB,IAAI,CAAC;gBACH,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CACnC,2BAA2B,EAC3B,KAAK,CACN,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACP,iEAAiE;gBACjE,uDAAuD;gBACvD,MAAM,iBAAiB,EAAE,CAAC;YAC5B,CAAC;YACD,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YACpE,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC5B,MAAM,iBAAiB,EAAE,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzD,MAAM,iBAAiB,EAAE,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;gBACpB,MAAM,OAAO,EAAE,CAAC;YAClB,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;YAC1E,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM,OAAO,EAAE,CAAC;YAClB,CAAC;YACD,OAAO,qBAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,IAAI,YAAY,CACrB,iCAAiC,EACjC,IAAI,CAAC,eAAe,CACrB,CAAC;AACJ,CAAC;AAED,SAAS,OAAO;IACd,OAAO,IAAI,YAAY,CACrB,kCAAkC,EAClC,IAAI,CAAC,eAAe,CACrB,CAAC;AACJ,CAAC"}
@@ -57,10 +57,10 @@ export declare class RunnerAuthService {
57
57
  /**
58
58
  * Go NewServiceFromEnv: key via the shared ladder (env var → key file →
59
59
  * auto-generate). Errors only on unusable explicit configuration; the
60
- * composition root maps that to the BOOT-FATAL posture (the ratified D2
61
- * asymmetry: a server that cannot mint runner tokens would hand every
62
- * execution redaction markers instead of its secrets — the silent-junk
63
- * failure the oss#405 fail-loud doctrine forbids).
60
+ * composition root maps that to the BOOT-FATAL posture: a server that
61
+ * cannot mint runner tokens would hand every execution redaction markers
62
+ * instead of its secrets — the silent-junk failure the encryption work
63
+ * (stigmer#405) made fail-loud.
64
64
  */
65
65
  static fromEnv(options?: KeyLoaderOptions): RunnerAuthService;
66
66
  /** Go IsEnabled: whether the service holds a signing key. */
@@ -70,6 +70,14 @@ export declare class RunnerAuthService {
70
70
  * (DEFAULT_TTL_SECONDS when <= 0).
71
71
  */
72
72
  mint(executionId: string, ttlSeconds?: number): MintedToken;
73
+ /**
74
+ * The run credential: bound to `executionId`, with NO `exp` (see the
75
+ * header — a run outlives any clock; the row decides). The dispatch
76
+ * path mints it into the workflow input; only the string travels, since
77
+ * there is no lifetime to report.
78
+ */
79
+ mintRunCredential(executionId: string): string;
80
+ private signClaims;
73
81
  /**
74
82
  * Go Verify: checks signature, algorithm, expiry, and token type, and
75
83
  * returns the execution id the token is bound to. Any failure throws the
@@ -79,9 +87,30 @@ export declare class RunnerAuthService {
79
87
  * Check order mirrors Go: enabled → three parts → exact encoded-header
80
88
  * compare → constant-time HMAC → payload decode → claims. The expiry
81
89
  * boundary is `now >= exp` (a token in its expiring second is invalid).
90
+ * A token with no `exp` is a run credential and passes this check; a
91
+ * present `exp` that is not a number is a malformed clock and refuses.
82
92
  */
83
93
  verify(token: string): string;
84
94
  /** base64url HMAC-SHA256 of the signing input — Go sign(). */
85
95
  private sign;
86
96
  }
97
+ /**
98
+ * The `token_type` claim read off an UNVERIFIED token, or undefined for
99
+ * anything that is not a three-segment token with a JSON payload naming
100
+ * one. This is the runner-subject verifier's claim rule (the chassis
101
+ * contract: decide "is this ours?" before trusting anything), so it must
102
+ * never throw and must trust nothing it reads — `verify` runs afterwards
103
+ * on a claimed token. It is NOT a shortcut for reading claims a caller
104
+ * intends to act on.
105
+ */
106
+ export declare function peekTokenType(token: string): string | undefined;
107
+ /**
108
+ * Whether a token this module has ALREADY verified carries a clock. The
109
+ * decrypt lane reads it to know which validity rule applies (a clocked
110
+ * token's clock was enforced by `verify`; a run credential's validity is
111
+ * the row's). Reading the payload of a verified token is a read of
112
+ * trusted state, the GuardMemoryCapture precedent; on anything `verify`
113
+ * has not accepted the answer is meaningless, so callers verify first.
114
+ */
115
+ export declare function isClockedToken(verifiedToken: string): boolean;
87
116
  //# sourceMappingURL=runnerauth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runnerauth.d.ts","sourceRoot":"","sources":["../../src/runnerauth/runnerauth.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,qBAAqB,CAAC;AAE9D,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;;CAK3C;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;;CAK9C;AAmBD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAqB;IAEzC,OAAO;IAIP;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB;IAOzD;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,gBAAqB,GAAG,iBAAiB;IASjE,6DAA6D;IAC7D,SAAS,IAAI,OAAO;IAIpB;;;OAGG;IACH,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,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IAM9C,OAAO,CAAC,UAAU;IAsBlB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAqD7B,8DAA8D;IAC9D,OAAO,CAAC,IAAI;CAQb;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAE7D"}
@@ -1,34 +1,67 @@
1
1
  /**
2
2
  * Execution-scoped runner tokens — ports pkg/runnerauth/runnerauth.go
3
- * (oss#535), the lane that gates the ExecutionContext decrypt path.
3
+ * (oss#535): one HS256 token type, bound to ONE execution, serving two
4
+ * lanes that the server's posture decides between.
4
5
  *
5
6
  * WHY: since oss#535 the EC read RPCs redact is_secret values for every
6
7
  * caller — the same contract the cloud edition enforces — but the runner
7
8
  * still needs the real values to serve executions. Cloud distinguishes the
8
- * runner by the token_type claim of its platform-minted credential; OSS
9
- * ships no token VERIFIERS on its identity chassis (O2, 20260827.01 — the
10
- * verifier chain exists but resolves every request to the trusted-local
11
- * identity until O3 lands the first verifiers), so this module supplies
12
- * the minimal equivalent: the platform exchange mints a short-lived token
13
- * bound to ONE execution, and the EC handler decrypts only for a token
14
- * whose binding matches the requested ExecutionContext.
9
+ * runner by the token_type claim of its platform-minted credential; this
10
+ * module is the open-source equivalent: a token whose binding names the
11
+ * execution it serves, and the EC handler decrypts only for a token whose
12
+ * binding matches the requested ExecutionContext.
15
13
  *
16
- * A LANE DISCRIMINATOR, NOT A TRUST BOUNDARY (DD-004): in the trusted-local
17
- * posture anyone who can reach the server can mint. What the token buys is
18
- * the redaction-by-default read contract converging with cloud, on top of
19
- * oss#405's encryption at rest. It is deliberately NOT an IdentityVerifier
20
- * on the chassis: presenting it must never change the caller's identity
21
- * (the Q6 fall-through keeps the runner's Bearer-on-every-RPC behavior
22
- * byte-identical), only unlock this one decrypt lane.
14
+ * THE TWO LANES, BY POSTURE. Until 2026-09-16 this header stated the
15
+ * token was "deliberately NOT an IdentityVerifier on the chassis:
16
+ * presenting it must never change the caller's identity". That sentence
17
+ * described a server that did not enforce authorization: with the
18
+ * permissive Authorizer, the runner's operator key could do everything,
19
+ * so the token only needed to unlock one decrypt lane. Under the built-in
20
+ * authorization posture (an OIDC self-host; authorization/posture.ts) the
21
+ * server enforces the cloud's model, and a runner keyed with one
22
+ * operator's API key could report on nobody's run but the operator's.
23
+ * So under that posture the SAME token is also an identity
24
+ * (runner-subject-verifier.ts): it admits its bearer as the human whose
25
+ * run it is, the person the execution row's creator stamp names, for as
26
+ * long as that run lives. The runner acts as the run's human, which is
27
+ * what the cloud's managed sandbox has always done. Under trusted-local
28
+ * no verifier is composed and the token stays the decrypt-lane
29
+ * discriminator it was: anyone who can reach that server can mint one,
30
+ * and there is one person to be.
23
31
  *
24
32
  * Token shape (field names are wire contract — the runner's
25
33
  * token-claims.ts reads token_type by name):
26
34
  * {"token_type":"execution_scoped","execution_id":"<id>","iat":…,"exp":…}
27
35
  *
28
- * Consumers arrive with their own domains: the platform exchange RPC
29
- * (mint) and the executioncontext resolve step (verify). This module lands
30
- * with the encryption sub-project because its signing key rides the shared
31
- * key ladder and its boot posture is a ratified cross-domain invariant
36
+ * Two mints, one shape:
37
+ * - `mint(executionId, ttl)` — the CLOCKED token: the trusted-local
38
+ * exchange and the connect and sandbox lanes, whose one unit of work
39
+ * has a bounded lifetime. `exp` is present and enforced. The connect
40
+ * lane's token binds no execution row but the connect's own
41
+ * ExecutionContext (domain/mcpserver/connect-execution-id.ts), and
42
+ * under the built-in posture it too is an identity: its bearer acts
43
+ * as the person who asked for the connect, whom that row was created
44
+ * by (bound-execution.ts, the `mcp-connect` binding).
45
+ * - `mintRunCredential(executionId)` — the RUN credential: the two
46
+ * execution engines put it on every dispatch's workflow input
47
+ * (dispatch-credential.ts), and under the built-in posture the
48
+ * exchange mints it too, for the run's own person only
49
+ * (built-in-runner-credential-provider.ts). NO `exp`. A run waits on
50
+ * humans with no timeout and outlives any clock; its credential's
51
+ * validity is the ROW's — the execution is live, or ended within a
52
+ * short grace (bound-execution.ts) — read by both lanes that accept
53
+ * the token, because a plaintext token in Temporal history must not
54
+ * decrypt a finished run's secrets, and the clock that prevented that
55
+ * is gone.
56
+ * `verify` enforces `exp` when present and accepts its absence; it never
57
+ * decides liveness, which needs the store.
58
+ *
59
+ * Consumers arrive with their own domains, through the provider seam
60
+ * (runner-credential-provider.ts): the platform exchange RPC and the two
61
+ * engine clients (mint), the executioncontext resolve step and the
62
+ * runner-subject verifier (verify). This module lands with the
63
+ * encryption sub-project because its signing key rides the shared key
64
+ * ladder and its boot posture is a ratified cross-domain invariant
32
65
  * (fatal — see compose.ts).
33
66
  */
34
67
  import { createHmac, timingSafeEqual } from "node:crypto";
@@ -105,10 +138,10 @@ export class RunnerAuthService {
105
138
  /**
106
139
  * Go NewServiceFromEnv: key via the shared ladder (env var → key file →
107
140
  * auto-generate). Errors only on unusable explicit configuration; the
108
- * composition root maps that to the BOOT-FATAL posture (the ratified D2
109
- * asymmetry: a server that cannot mint runner tokens would hand every
110
- * execution redaction markers instead of its secrets — the silent-junk
111
- * failure the oss#405 fail-loud doctrine forbids).
141
+ * composition root maps that to the BOOT-FATAL posture: a server that
142
+ * cannot mint runner tokens would hand every execution redaction markers
143
+ * instead of its secrets — the silent-junk failure the encryption work
144
+ * (stigmer#405) made fail-loud.
112
145
  */
113
146
  static fromEnv(options = {}) {
114
147
  const key = getOrCreateNamedKey(RUNNER_TOKEN_KEY_ENV_VAR, RUNNER_TOKEN_KEY_FILE_NAME, options);
@@ -123,25 +156,43 @@ export class RunnerAuthService {
123
156
  * (DEFAULT_TTL_SECONDS when <= 0).
124
157
  */
125
158
  mint(executionId, ttlSeconds = 0) {
159
+ const ttl = ttlSeconds > 0 ? ttlSeconds : DEFAULT_TTL_SECONDS;
160
+ const nowSeconds = Math.floor(Date.now() / 1000);
161
+ return {
162
+ token: this.signClaims(executionId, {
163
+ iat: nowSeconds,
164
+ exp: nowSeconds + ttl,
165
+ }),
166
+ ttlSeconds: ttl,
167
+ };
168
+ }
169
+ /**
170
+ * The run credential: bound to `executionId`, with NO `exp` (see the
171
+ * header — a run outlives any clock; the row decides). The dispatch
172
+ * path mints it into the workflow input; only the string travels, since
173
+ * there is no lifetime to report.
174
+ */
175
+ mintRunCredential(executionId) {
176
+ return this.signClaims(executionId, {
177
+ iat: Math.floor(Date.now() / 1000),
178
+ });
179
+ }
180
+ signClaims(executionId, clock) {
126
181
  if (this.key === undefined) {
127
182
  throw new MintingDisabledError();
128
183
  }
129
184
  if (executionId === "") {
130
185
  throw new Error("execution id is required to mint a runner token");
131
186
  }
132
- const ttl = ttlSeconds > 0 ? ttlSeconds : DEFAULT_TTL_SECONDS;
133
- const nowSeconds = Math.floor(Date.now() / 1000);
134
187
  const claims = {
135
188
  token_type: TOKEN_TYPE_EXECUTION_SCOPED,
136
189
  execution_id: executionId,
137
- iat: nowSeconds,
138
- exp: nowSeconds + ttl,
139
- };
140
- const signingInput = JWT_HEADER + "." + Buffer.from(JSON.stringify(claims)).toString("base64url");
141
- return {
142
- token: signingInput + "." + this.sign(signingInput),
143
- ttlSeconds: ttl,
190
+ ...clock,
144
191
  };
192
+ const signingInput = JWT_HEADER +
193
+ "." +
194
+ Buffer.from(JSON.stringify(claims)).toString("base64url");
195
+ return signingInput + "." + this.sign(signingInput);
145
196
  }
146
197
  /**
147
198
  * Go Verify: checks signature, algorithm, expiry, and token type, and
@@ -152,6 +203,8 @@ export class RunnerAuthService {
152
203
  * Check order mirrors Go: enabled → three parts → exact encoded-header
153
204
  * compare → constant-time HMAC → payload decode → claims. The expiry
154
205
  * boundary is `now >= exp` (a token in its expiring second is invalid).
206
+ * A token with no `exp` is a run credential and passes this check; a
207
+ * present `exp` that is not a number is a malformed clock and refuses.
155
208
  */
156
209
  verify(token) {
157
210
  if (this.key === undefined) {
@@ -183,9 +236,12 @@ export class RunnerAuthService {
183
236
  }
184
237
  if (claims.token_type !== TOKEN_TYPE_EXECUTION_SCOPED ||
185
238
  typeof claims.execution_id !== "string" ||
186
- claims.execution_id === "" ||
187
- typeof claims.exp !== "number" ||
188
- Math.floor(Date.now() / 1000) >= claims.exp) {
239
+ claims.execution_id === "") {
240
+ throw new InvalidTokenError();
241
+ }
242
+ if (claims.exp !== undefined &&
243
+ (typeof claims.exp !== "number" ||
244
+ Math.floor(Date.now() / 1000) >= claims.exp)) {
189
245
  throw new InvalidTokenError();
190
246
  }
191
247
  return claims.execution_id;
@@ -200,4 +256,44 @@ export class RunnerAuthService {
200
256
  .digest("base64url");
201
257
  }
202
258
  }
259
+ /**
260
+ * The `token_type` claim read off an UNVERIFIED token, or undefined for
261
+ * anything that is not a three-segment token with a JSON payload naming
262
+ * one. This is the runner-subject verifier's claim rule (the chassis
263
+ * contract: decide "is this ours?" before trusting anything), so it must
264
+ * never throw and must trust nothing it reads — `verify` runs afterwards
265
+ * on a claimed token. It is NOT a shortcut for reading claims a caller
266
+ * intends to act on.
267
+ */
268
+ export function peekTokenType(token) {
269
+ const claims = decodePayload(token);
270
+ const type = claims?.["token_type"];
271
+ return typeof type === "string" && type !== "" ? type : undefined;
272
+ }
273
+ /**
274
+ * Whether a token this module has ALREADY verified carries a clock. The
275
+ * decrypt lane reads it to know which validity rule applies (a clocked
276
+ * token's clock was enforced by `verify`; a run credential's validity is
277
+ * the row's). Reading the payload of a verified token is a read of
278
+ * trusted state, the GuardMemoryCapture precedent; on anything `verify`
279
+ * has not accepted the answer is meaningless, so callers verify first.
280
+ */
281
+ export function isClockedToken(verifiedToken) {
282
+ return typeof decodePayload(verifiedToken)?.["exp"] === "number";
283
+ }
284
+ function decodePayload(token) {
285
+ const segments = token.split(".");
286
+ if (segments.length !== 3) {
287
+ return undefined;
288
+ }
289
+ try {
290
+ const decoded = JSON.parse(Buffer.from(segments[1] ?? "", "base64url").toString("utf8"));
291
+ return typeof decoded === "object" && decoded !== null
292
+ ? decoded
293
+ : undefined;
294
+ }
295
+ catch {
296
+ return undefined;
297
+ }
298
+ }
203
299
  //# sourceMappingURL=runnerauth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runnerauth.js","sourceRoot":"","sources":["../../src/runnerauth/runnerauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;AAE9D,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAEnE,iEAAiE;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C;QACE,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C;QACE,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,QAAQ,CACpE,WAAW,CACZ,CAAC;AAgBF;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACX,GAAG,CAAqB;IAEzC,YAAoB,GAAuB;QACzC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM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