@stigmer/server 3.15.3-dev.20260916211208 → 3.16.1-dev.20260917224426

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 (170) 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 +12 -0
  10. package/dist/boot/compose.d.ts.map +1 -1
  11. package/dist/boot/compose.js +68 -14
  12. package/dist/boot/compose.js.map +1 -1
  13. package/dist/boot/inprocess.d.ts.map +1 -1
  14. package/dist/boot/inprocess.js +6 -1
  15. package/dist/boot/inprocess.js.map +1 -1
  16. package/dist/domain/executioncontext/resolve-values-for-caller.d.ts +33 -14
  17. package/dist/domain/executioncontext/resolve-values-for-caller.d.ts.map +1 -1
  18. package/dist/domain/executioncontext/resolve-values-for-caller.js +32 -8
  19. package/dist/domain/executioncontext/resolve-values-for-caller.js.map +1 -1
  20. package/dist/domain/identityaccount/actor.d.ts +33 -18
  21. package/dist/domain/identityaccount/actor.d.ts.map +1 -1
  22. package/dist/domain/identityaccount/actor.js +20 -3
  23. package/dist/domain/identityaccount/actor.js.map +1 -1
  24. package/dist/domain/identityaccount/resolve.d.ts +19 -0
  25. package/dist/domain/identityaccount/resolve.d.ts.map +1 -1
  26. package/dist/domain/identityaccount/resolve.js +12 -0
  27. package/dist/domain/identityaccount/resolve.js.map +1 -1
  28. package/dist/domain/mcpserver/connect-execution-id.d.ts +5 -0
  29. package/dist/domain/mcpserver/connect-execution-id.d.ts.map +1 -0
  30. package/dist/domain/mcpserver/connect-execution-id.js +32 -0
  31. package/dist/domain/mcpserver/connect-execution-id.js.map +1 -0
  32. package/dist/domain/mcpserver/connect.d.ts +28 -2
  33. package/dist/domain/mcpserver/connect.d.ts.map +1 -1
  34. package/dist/domain/mcpserver/connect.js +27 -7
  35. package/dist/domain/mcpserver/connect.js.map +1 -1
  36. package/dist/domain/mcpserver/engine.d.ts +9 -3
  37. package/dist/domain/mcpserver/engine.d.ts.map +1 -1
  38. package/dist/domain/mcpserver/engine.js.map +1 -1
  39. package/dist/domain/mcpserver/start-connect.js +1 -1
  40. package/dist/domain/mcpserver/start-connect.js.map +1 -1
  41. package/dist/domain/platform/controller.d.ts +31 -11
  42. package/dist/domain/platform/controller.d.ts.map +1 -1
  43. package/dist/domain/platform/controller.js +2 -3
  44. package/dist/domain/platform/controller.js.map +1 -1
  45. package/dist/domain/plugin/materialize/agent.d.ts +10 -1
  46. package/dist/domain/plugin/materialize/agent.d.ts.map +1 -1
  47. package/dist/domain/plugin/materialize/agent.js +35 -1
  48. package/dist/domain/plugin/materialize/agent.js.map +1 -1
  49. package/dist/domain/plugin/materialize/plan.d.ts.map +1 -1
  50. package/dist/domain/plugin/materialize/plan.js +1 -1
  51. package/dist/domain/plugin/materialize/plan.js.map +1 -1
  52. package/dist/domain/plugin/overlay/sanitize.d.ts.map +1 -1
  53. package/dist/domain/plugin/overlay/sanitize.js +4 -2
  54. package/dist/domain/plugin/overlay/sanitize.js.map +1 -1
  55. package/dist/domain/project/reconcile.d.ts.map +1 -1
  56. package/dist/domain/project/reconcile.js +14 -10
  57. package/dist/domain/project/reconcile.js.map +1 -1
  58. package/dist/domain/workflowexecution/phases.d.ts +21 -0
  59. package/dist/domain/workflowexecution/phases.d.ts.map +1 -0
  60. package/dist/domain/workflowexecution/phases.js +31 -0
  61. package/dist/domain/workflowexecution/phases.js.map +1 -0
  62. package/dist/identity/oidc-verifier.js +8 -1
  63. package/dist/identity/oidc-verifier.js.map +1 -1
  64. package/dist/pipeline/apiresource-meta.d.ts +15 -0
  65. package/dist/pipeline/apiresource-meta.d.ts.map +1 -1
  66. package/dist/pipeline/apiresource-meta.js +34 -0
  67. package/dist/pipeline/apiresource-meta.js.map +1 -1
  68. package/dist/pipeline/steps/guard-memory-capture.d.ts.map +1 -1
  69. package/dist/pipeline/steps/guard-memory-capture.js +5 -3
  70. package/dist/pipeline/steps/guard-memory-capture.js.map +1 -1
  71. package/dist/runnerauth/bound-execution.d.ts +27 -0
  72. package/dist/runnerauth/bound-execution.d.ts.map +1 -0
  73. package/dist/runnerauth/bound-execution.js +137 -0
  74. package/dist/runnerauth/bound-execution.js.map +1 -0
  75. package/dist/runnerauth/built-in-runner-credential-provider.d.ts +28 -0
  76. package/dist/runnerauth/built-in-runner-credential-provider.d.ts.map +1 -0
  77. package/dist/runnerauth/built-in-runner-credential-provider.js +217 -0
  78. package/dist/runnerauth/built-in-runner-credential-provider.js.map +1 -0
  79. package/dist/runnerauth/constants.d.ts +63 -0
  80. package/dist/runnerauth/constants.d.ts.map +1 -0
  81. package/dist/runnerauth/constants.js +63 -0
  82. package/dist/runnerauth/constants.js.map +1 -0
  83. package/dist/runnerauth/dispatch-credential.d.ts +38 -0
  84. package/dist/runnerauth/dispatch-credential.d.ts.map +1 -0
  85. package/dist/runnerauth/dispatch-credential.js +17 -0
  86. package/dist/runnerauth/dispatch-credential.js.map +1 -0
  87. package/dist/runnerauth/runner-credential-provider.d.ts +49 -11
  88. package/dist/runnerauth/runner-credential-provider.d.ts.map +1 -1
  89. package/dist/runnerauth/runner-credential-provider.js +16 -4
  90. package/dist/runnerauth/runner-credential-provider.js.map +1 -1
  91. package/dist/runnerauth/runner-subject-verifier.d.ts +14 -0
  92. package/dist/runnerauth/runner-subject-verifier.d.ts.map +1 -0
  93. package/dist/runnerauth/runner-subject-verifier.js +115 -0
  94. package/dist/runnerauth/runner-subject-verifier.js.map +1 -0
  95. package/dist/runnerauth/runnerauth.d.ts +33 -4
  96. package/dist/runnerauth/runnerauth.d.ts.map +1 -1
  97. package/dist/runnerauth/runnerauth.js +131 -35
  98. package/dist/runnerauth/runnerauth.js.map +1 -1
  99. package/dist/temporal/agentexecution/engine-client.d.ts +13 -0
  100. package/dist/temporal/agentexecution/engine-client.d.ts.map +1 -1
  101. package/dist/temporal/agentexecution/engine-client.js +10 -2
  102. package/dist/temporal/agentexecution/engine-client.js.map +1 -1
  103. package/dist/temporal/agentexecution/workflow-input.d.ts +13 -0
  104. package/dist/temporal/agentexecution/workflow-input.d.ts.map +1 -1
  105. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.d.ts.map +1 -1
  106. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js +35 -31
  107. package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js.map +1 -1
  108. package/dist/temporal/workflowexecution/engine-client.d.ts +24 -0
  109. package/dist/temporal/workflowexecution/engine-client.d.ts.map +1 -1
  110. package/dist/temporal/workflowexecution/engine-client.js +26 -19
  111. package/dist/temporal/workflowexecution/engine-client.js.map +1 -1
  112. package/dist/temporal/workflowexecution/workflow-input.d.ts +14 -0
  113. package/dist/temporal/workflowexecution/workflow-input.d.ts.map +1 -1
  114. package/package.json +5 -5
  115. package/src/authorization/__tests__/lane-admission.test.ts +115 -0
  116. package/src/authorization/lane-admission.ts +73 -0
  117. package/src/authorization/schedule-fire-caller.ts +10 -14
  118. package/src/boot/compose.ts +93 -22
  119. package/src/boot/inprocess.ts +7 -1
  120. package/src/domain/executioncontext/__tests__/executioncontext.test.ts +104 -0
  121. package/src/domain/executioncontext/__tests__/resolve-values-capability.test.ts +33 -4
  122. package/src/domain/executioncontext/resolve-values-for-caller.ts +79 -22
  123. package/src/domain/identityaccount/__tests__/account-for-stamp.test.ts +111 -0
  124. package/src/domain/identityaccount/actor.ts +61 -21
  125. package/src/domain/identityaccount/resolve.ts +31 -0
  126. package/src/domain/mcpserver/__tests__/connect.test.ts +17 -2
  127. package/src/domain/mcpserver/connect-execution-id.ts +34 -0
  128. package/src/domain/mcpserver/connect.ts +38 -3
  129. package/src/domain/mcpserver/engine.ts +9 -3
  130. package/src/domain/mcpserver/start-connect.ts +1 -1
  131. package/src/domain/platform/__tests__/platform.test.ts +47 -1
  132. package/src/domain/platform/controller.ts +33 -14
  133. package/src/domain/plugin/__tests__/materialize.test.ts +60 -1
  134. package/src/domain/plugin/__tests__/plugin.test.ts +122 -1
  135. package/src/domain/plugin/__tests__/sanitize.test.ts +2 -2
  136. package/src/domain/plugin/materialize/agent.ts +38 -0
  137. package/src/domain/plugin/materialize/plan.ts +7 -1
  138. package/src/domain/plugin/overlay/sanitize.ts +4 -2
  139. package/src/domain/project/__tests__/reconcile.test.ts +51 -5
  140. package/src/domain/project/reconcile.ts +20 -15
  141. package/src/domain/workflowexecution/__tests__/phases.test.ts +58 -0
  142. package/src/domain/workflowexecution/phases.ts +33 -0
  143. package/src/extensions/__tests__/extension-composition.test.ts +7 -1
  144. package/src/identity/__tests__/oidc-verifier.test.ts +22 -0
  145. package/src/identity/oidc-verifier.ts +8 -1
  146. package/src/pipeline/__tests__/kind-by-id-prefix.test.ts +75 -0
  147. package/src/pipeline/apiresource-meta.ts +41 -0
  148. package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +55 -35
  149. package/src/pipeline/steps/guard-memory-capture.ts +5 -3
  150. package/src/runnerauth/__tests__/bound-execution.test.ts +334 -0
  151. package/src/runnerauth/__tests__/built-in-runner-credential-provider.test.ts +516 -0
  152. package/src/runnerauth/__tests__/dispatch-credential.test.ts +94 -0
  153. package/src/runnerauth/__tests__/runner-credential-provider.test.ts +27 -0
  154. package/src/runnerauth/__tests__/runner-subject-composed.test.ts +497 -0
  155. package/src/runnerauth/__tests__/runner-subject-verifier.test.ts +541 -0
  156. package/src/runnerauth/bound-execution.ts +270 -0
  157. package/src/runnerauth/built-in-runner-credential-provider.ts +300 -0
  158. package/src/runnerauth/constants.ts +74 -0
  159. package/src/runnerauth/dispatch-credential.ts +63 -0
  160. package/src/runnerauth/runner-credential-provider.ts +60 -11
  161. package/src/runnerauth/runner-subject-verifier.ts +152 -0
  162. package/src/runnerauth/runnerauth.ts +148 -38
  163. package/src/temporal/agentexecution/__tests__/engine-client.test.ts +107 -38
  164. package/src/temporal/agentexecution/__tests__/invoke-workflow.test.ts +105 -2
  165. package/src/temporal/agentexecution/engine-client.ts +27 -2
  166. package/src/temporal/agentexecution/workflow-input.ts +13 -0
  167. package/src/temporal/agentexecution/workflows/invoke-agent-execution.ts +90 -44
  168. package/src/temporal/workflowexecution/__tests__/engine-client.test.ts +139 -33
  169. package/src/temporal/workflowexecution/engine-client.ts +48 -21
  170. package/src/temporal/workflowexecution/workflow-input.ts +14 -0
@@ -0,0 +1,217 @@
1
+ /**
2
+ * The built-in RunnerCredentialProvider — the open-source execution-scoped
3
+ * default (runner-credential-provider.ts) plus the three capabilities an
4
+ * ENFORCING self-host needs, composed under the built-in authorization
5
+ * posture beside the runner-subject verifier (boot/compose.ts). The
6
+ * cloud's shape, kept on purpose: one provider object carries the
7
+ * edition's whole credential story, so the composition root binds one
8
+ * thing and every OSS touchpoint that consults the seam sees the same
9
+ * policy. Mint, verify, isEnabled and the dispatch's `mintRunCredential`
10
+ * are the default provider's, byte for byte; under trusted-local the
11
+ * default alone is composed and none of what follows exists.
12
+ *
13
+ * ONE reading of "what is this runner bound to" — `runnerBindingOf` —
14
+ * feeds everything here and the Authorizer's lane admission
15
+ * (authorization/lane-admission.ts). It re-verifies the caller's own
16
+ * `rawToken` (the cloud's `verifiedClaims(caller.rawToken)` pattern: one
17
+ * HMAC, no store read) and reads the kind off the bound id's prefix
18
+ * through the contract's table (bound-execution.ts). It checks the
19
+ * caller CLASS first: the lane admission runs on every run-gate check
20
+ * for every caller, and only the runner-subject verifier mints `runner`,
21
+ * so a person costs nothing here. It never throws: a person, a runner
22
+ * holding no token, a token this server did not sign, or a binding that
23
+ * names no kind is simply "not a runner binding", and each caller
24
+ * answers its own default for that. A CONNECT binding (`mcp-connect`, a
25
+ * runner reading one discovery's secrets as the person who asked) IS a
26
+ * runner binding, and every capability below answers it by name: it is
27
+ * admitted on no run gate, vouches no lineage, captures no memory, and
28
+ * the exchange mints nothing for it.
29
+ *
30
+ * The capabilities, and where they follow or narrow the cloud:
31
+ *
32
+ * - `vouchRunnerLineageLabels`: a WORKFLOW-bound runner vouches the two
33
+ * lineage keys for its own workflow execution and REFUSES a stamp
34
+ * naming another (the cloud's byte-pinned copy, constants.ts). Without
35
+ * this, a self-host with sign-in on cannot run any workflow that
36
+ * calls an agent: the child create's GuardReservedLabels asks the
37
+ * Authorizer for `can_write_reserved_labels` on the platform object,
38
+ * which the built-in Authorizer denies for everyone. NARROWER than the
39
+ * cloud on purpose: the cloud vouches for every runner-class
40
+ * credential and binds only its workflow lane; here an agent-bound
41
+ * runner vouches nothing, because the workflow's `agent_call` activity
42
+ * is the only producer of the lineage labels and it runs under the
43
+ * workflow's credential (runner: activities/call-agent.ts). Nothing
44
+ * observable diverges; do not widen this toward the cloud without a
45
+ * producer that needs it.
46
+ * - `authorizeMemoryCapture`: an AGENT-bound runner is ADMITTED with the
47
+ * human the verifier resolved as the memory's subject — the row's one
48
+ * principal under the model; without it every memory an enforcing
49
+ * self-host writes belongs to nobody — and the run's session as the
50
+ * proved provenance. The cloud reads both off its session-scoped
51
+ * token; our token names only the execution, so this reads the row
52
+ * (one primary-key read per `remember` call) and the seam allows the
53
+ * promise. The cloud's org arm is kept: a capture addressed to an org
54
+ * that is not the run's is "a forged address, not a routing choice"
55
+ * (its byte-pinned copy). A workflow-bound runner is refused (the
56
+ * cloud refuses every non-session lane); a person, or a runner whose
57
+ * token does not verify, is no-opinion and the gate's own logic
58
+ * applies. A run that has vanished between the verifier's read and
59
+ * this one is refused: a memory the server cannot attribute to a run
60
+ * must not be written as nobody's (fail closed).
61
+ * - `exchangeScopedToken`: the platform exchange (getRunnerScopedToken)
62
+ * becomes a MINT GATE. Under trusted-local the controller's own arms
63
+ * mint a clocked decrypt-lane token for any caller naming an
64
+ * execution, and that is harmless — the token unlocks a decrypt lane
65
+ * and nothing more. Under this posture the same token IS an identity
66
+ * (the verifier admits its bearer as the run's human), so minting
67
+ * one for another person's run would be impersonation. The execution
68
+ * arms therefore mint only for the run's own person — the account
69
+ * the row's creator stamp resolves to, the same reading the verifier
70
+ * makes — and mint the RUN credential (no `exp`; `expires_in_seconds`
71
+ * 0, the proto default), so under the posture there is one credential
72
+ * shape and the exchange is the runner's true fallback for a dispatch
73
+ * that carried none. The ladder is the platform's own: a row that
74
+ * does not exist → NOT_FOUND with the load-first copy (what a `get`
75
+ * on that id answers), a caller who is not the run's person, or a run
76
+ * whose stamp names nobody → PERMISSION_DENIED with one sentence
77
+ * (constants.ts). The id decides which execution kind is read (the
78
+ * lane's rule everywhere); the request's arm only chooses the
79
+ * not-found copy; an id that resolves to a CONNECT binding is
80
+ * NOT_FOUND too, because the exchange mints run credentials and a
81
+ * connect is not a run. Liveness is NOT judged at mint — both lanes that
82
+ * accept the token judge it, by one rule (bound-execution.ts), and a
83
+ * third judge here would be a divergence waiting to happen. The
84
+ * pool-claim, renewal and unset arms answer not-minted, the
85
+ * controller's arms verbatim; keyless answers not-minted too.
86
+ *
87
+ * Deliberately UNDEFINED here: `bootstrapCredentials`,
88
+ * `mintSandboxCredential`, `authorizeExecutionContextRead`,
89
+ * `resolvePayloadKey`. Their open-source arms stay where they are (the
90
+ * sandbox lane's mint, the decrypt lane's binding-equality decision);
91
+ * this provider adds policy an enforcing server lacks and takes over
92
+ * nothing that already works.
93
+ */
94
+ import { Code, ConnectError } from "@connectrpc/connect";
95
+ import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
96
+ import { accountForStamp } from "../domain/identityaccount/resolve.js";
97
+ import { getKindName } from "../pipeline/apiresource-meta.js";
98
+ import { notFoundError } from "../pipeline/errors.js";
99
+ import { bindsARun, boundExecutionKindOf, loadBoundExecution, } from "./bound-execution.js";
100
+ import { MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE, RUN_CREDENTIAL_NOT_RUNS_PERSON_MESSAGE, WORKFLOW_LINEAGE_BINDING_MISMATCH_MESSAGE, } from "./constants.js";
101
+ import { newExecutionScopedRunnerCredentialProvider } from "./runner-credential-provider.js";
102
+ /**
103
+ * The one reading of a runner's binding. `undefined` for anything that
104
+ * is not a runner-class caller holding a token this service signed whose
105
+ * binding names an execution kind; never a throw.
106
+ */
107
+ export function runnerBindingOf(service, caller) {
108
+ if (caller.callerClass !== "runner" || caller.rawToken === "") {
109
+ return undefined;
110
+ }
111
+ let executionId;
112
+ try {
113
+ executionId = service.verify(caller.rawToken);
114
+ }
115
+ catch {
116
+ return undefined;
117
+ }
118
+ const kind = boundExecutionKindOf(executionId);
119
+ return kind === undefined ? undefined : { kind, executionId };
120
+ }
121
+ /** The lane-admission predicate: a runner acting for a WORKFLOW execution (the cloud's `workflow_sandbox`). */
122
+ export function isWorkflowBoundRunner(service, caller) {
123
+ return runnerBindingOf(service, caller)?.kind === "workflow-execution";
124
+ }
125
+ /** The kind name the not-found copy carries, by the request's arm (what a `get` on that kind would say). */
126
+ function requestedKindName(arm) {
127
+ switch (arm) {
128
+ case "agent-execution":
129
+ return getKindName(ApiResourceKind.agent_execution);
130
+ case "workflow-execution":
131
+ return getKindName(ApiResourceKind.workflow_execution);
132
+ default: {
133
+ const exhaustive = arm;
134
+ throw new Error(`unhandled exchange arm: ${JSON.stringify(exhaustive)}`);
135
+ }
136
+ }
137
+ }
138
+ export function newBuiltInRunnerCredentialProvider(deps) {
139
+ const { service, store, accounts } = deps;
140
+ const lane = newExecutionScopedRunnerCredentialProvider(service);
141
+ const mintRunCredential = lane.mintRunCredential.bind(lane);
142
+ return {
143
+ isEnabled: lane.isEnabled,
144
+ mint: lane.mint,
145
+ verify: lane.verify,
146
+ mintRunCredential,
147
+ async exchangeScopedToken(request, caller) {
148
+ switch (request.arm) {
149
+ case "agent-execution":
150
+ case "workflow-execution": {
151
+ if (request.executionId === "" || !service.isEnabled()) {
152
+ return { minted: false };
153
+ }
154
+ const execution = await loadBoundExecution(store, request.executionId);
155
+ // A connect binding is not a run: the exchange mints RUN
156
+ // credentials, and the requested kind's row does not exist.
157
+ if (execution === undefined || !bindsARun(execution.kind)) {
158
+ throw notFoundError(requestedKindName(request.arm), request.executionId);
159
+ }
160
+ const person = await accountForStamp(accounts, execution.createdBy);
161
+ if (person === undefined ||
162
+ person.metadata?.id !== caller.identityId) {
163
+ throw new ConnectError(RUN_CREDENTIAL_NOT_RUNS_PERSON_MESSAGE, Code.PermissionDenied);
164
+ }
165
+ return {
166
+ minted: true,
167
+ token: mintRunCredential(execution.executionId),
168
+ // No `exp` on a run credential; 0 is the proto default and
169
+ // the runner's acquire sites read no expiry from it.
170
+ expiresInSeconds: 0,
171
+ };
172
+ }
173
+ case "pool-claim":
174
+ case "renewal":
175
+ case "unset":
176
+ return { minted: false };
177
+ default: {
178
+ const exhaustive = request;
179
+ throw new Error(`unhandled exchange arm: ${JSON.stringify(exhaustive)}`);
180
+ }
181
+ }
182
+ },
183
+ vouchRunnerLineageLabels(caller, stampedWorkflowExecutionId) {
184
+ const binding = runnerBindingOf(service, caller);
185
+ if (binding?.kind !== "workflow-execution") {
186
+ return false;
187
+ }
188
+ if (stampedWorkflowExecutionId !== "" &&
189
+ stampedWorkflowExecutionId !== binding.executionId) {
190
+ throw new ConnectError(WORKFLOW_LINEAGE_BINDING_MISMATCH_MESSAGE, Code.InvalidArgument);
191
+ }
192
+ return true;
193
+ },
194
+ async authorizeMemoryCapture(caller, captureOrg) {
195
+ const binding = runnerBindingOf(service, caller);
196
+ if (binding === undefined) {
197
+ return { verdict: "no-opinion" };
198
+ }
199
+ if (binding.kind !== "agent-execution") {
200
+ return { verdict: "refuse" };
201
+ }
202
+ const execution = await loadBoundExecution(store, binding.executionId);
203
+ if (execution === undefined) {
204
+ return { verdict: "refuse" };
205
+ }
206
+ if (captureOrg !== "" && captureOrg !== execution.org) {
207
+ throw new ConnectError(MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE, Code.PermissionDenied);
208
+ }
209
+ return {
210
+ verdict: "admit",
211
+ subjectIdentityAccountId: caller.identityId,
212
+ provedSessionId: execution.sessionId,
213
+ };
214
+ },
215
+ };
216
+ }
217
+ //# sourceMappingURL=built-in-runner-credential-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"built-in-runner-credential-provider.js","sourceRoot":"","sources":["../../src/runnerauth/built-in-runner-credential-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,0CAA0C,EAAE,MAAM,iCAAiC,CAAC;AAkB7F;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA0B,EAC1B,MAAsB;IAEtB,IAAI,MAAM,CAAC,WAAW,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,WAAmB,CAAC;IACxB,IAAI,CAAC;QACH,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;I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AO;gBACL,OAAO,EAAE,OAAO;gBAChB,wBAAwB,EAAE,MAAM,CAAC,UAAU;gBAC3C,eAAe,EAAE,SAAS,CAAC,SAAS;aACrC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The runner-subject lane's pinned names and copy — the one constants
3
+ * module for the runner-credential domain (the ts-server guideline:
4
+ * byte-pinned copy lives in one constants module per domain, never
5
+ * inline at the refusal site).
6
+ *
7
+ * Two refusal sentences for a PRESENTED credential, deliberately not
8
+ * more (the InvalidTokenError doctrine of runnerauth.ts: a finer reason
9
+ * invites branching on it). The runner is the only caller that ever
10
+ * presents a run credential, and the person reading these is its
11
+ * operator, in the runner's log:
12
+ *
13
+ * - the TOKEN sentence: the credential itself is not one this server
14
+ * will honor — forged, the wrong shape, bound to an execution or a
15
+ * connect this server does not have (a connect's row is gone once
16
+ * the connect settles), a clockless token bound to a connect (a shape
17
+ * no mint produces), a present `exp` in the past, or minted by a key
18
+ * this server does not hold. A missing row is this sentence and not
19
+ * NOT_FOUND on purpose: the credential is invalid, and the run is
20
+ * not the caller's to learn about.
21
+ * - the LIVENESS sentence: the credential is genuine but its run is
22
+ * over, or its run or connect was created by nobody this server
23
+ * recognizes as a person (the schedule fire caller's
24
+ * deterministic-refusal shape: no retry will make that run anyone's).
25
+ *
26
+ * And one for a REQUESTED credential — the platform exchange under the
27
+ * built-in posture (built-in-runner-credential-provider.ts), where the
28
+ * caller is a signed-in person asking for a run's credential and the
29
+ * answer is a permission, not a token verdict: only the person whose run
30
+ * it is may hold its credential. A run whose creator stamp names nobody
31
+ * gets the same sentence — no one is its person.
32
+ *
33
+ * The lineage mismatch copy is the cloud edition's, transcribed byte for
34
+ * byte (credentials/provider.ts in the composition; the Java
35
+ * RecordRunnerLineageLabelsStep before it) so the two editions refuse a
36
+ * mis-stamped lineage label with one sentence.
37
+ */
38
+ /** The verifier's name in the boot log and in auth failures (the `oidc` / `apikey` precedent). */
39
+ export declare const RUNNER_VERIFIER_NAME = "runner";
40
+ /** The token arms: forged, wrong shape, unknown execution, past `exp`, keyless. */
41
+ export declare const RUNNER_CREDENTIAL_INVALID_MESSAGE = "runner credential is not valid on this server";
42
+ /** The resolution arms: a terminal execution; a run stamped by nobody the server recognizes. */
43
+ export declare const RUNNER_CREDENTIAL_NOT_LIVE_MESSAGE = "runner credential names a run that is over or belongs to nobody this server recognizes";
44
+ /** The exchange's refusal under the built-in posture: the caller is not the run's person (PERMISSION_DENIED). */
45
+ export declare const RUN_CREDENTIAL_NOT_RUNS_PERSON_MESSAGE = "a run credential is minted only for the person whose run it is";
46
+ /** The cloud's byte-pinned lineage refusal (the Java step's copy). */
47
+ export declare const WORKFLOW_LINEAGE_BINDING_MISMATCH_MESSAGE = "workflow lineage label names a workflow execution this runner credential is not bound to";
48
+ /** The cloud's byte-pinned org-mismatch refusal (MemoryPolicy.MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE). */
49
+ export declare const MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE = "memory capture is scoped to the session's organization";
50
+ /**
51
+ * How long a run credential outlives its run, measured from the row's
52
+ * `status.completed_at`. A run's credential is valid while the run is
53
+ * not terminal — runs wait on humans with no timeout, so no clock can
54
+ * bound them — and for this long after, because two legitimate runner
55
+ * writes land after the terminal stamp: the session-subject generation
56
+ * the workflow fires and does not await (issue #665), and a Temporal
57
+ * activity retried after its completion failed to reach the engine.
58
+ * Ten minutes covers one model call and one retry backoff; today's
59
+ * exchange-lane token outlives a run by up to an hour. A terminal row
60
+ * with no `completed_at` gets no grace: fail closed.
61
+ */
62
+ export declare const RUN_CREDENTIAL_GRACE_AFTER_TERMINAL_MS: number;
63
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/runnerauth/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,mFAAmF;AACnF,eAAO,MAAM,iCAAiC,kDACG,CAAC;AAElD,gGAAgG;AAChG,eAAO,MAAM,kCAAkC,2FAC2C,CAAC;AAE3F,iHAAiH;AACjH,eAAO,MAAM,sCAAsC,mEACe,CAAC;AAEnE,sEAAsE;AACtE,eAAO,MAAM,yCAAyC,6FACsC,CAAC;AAE7F,uGAAuG;AACvG,eAAO,MAAM,mCAAmC,2DACU,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sCAAsC,QAAiB,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The runner-subject lane's pinned names and copy — the one constants
3
+ * module for the runner-credential domain (the ts-server guideline:
4
+ * byte-pinned copy lives in one constants module per domain, never
5
+ * inline at the refusal site).
6
+ *
7
+ * Two refusal sentences for a PRESENTED credential, deliberately not
8
+ * more (the InvalidTokenError doctrine of runnerauth.ts: a finer reason
9
+ * invites branching on it). The runner is the only caller that ever
10
+ * presents a run credential, and the person reading these is its
11
+ * operator, in the runner's log:
12
+ *
13
+ * - the TOKEN sentence: the credential itself is not one this server
14
+ * will honor — forged, the wrong shape, bound to an execution or a
15
+ * connect this server does not have (a connect's row is gone once
16
+ * the connect settles), a clockless token bound to a connect (a shape
17
+ * no mint produces), a present `exp` in the past, or minted by a key
18
+ * this server does not hold. A missing row is this sentence and not
19
+ * NOT_FOUND on purpose: the credential is invalid, and the run is
20
+ * not the caller's to learn about.
21
+ * - the LIVENESS sentence: the credential is genuine but its run is
22
+ * over, or its run or connect was created by nobody this server
23
+ * recognizes as a person (the schedule fire caller's
24
+ * deterministic-refusal shape: no retry will make that run anyone's).
25
+ *
26
+ * And one for a REQUESTED credential — the platform exchange under the
27
+ * built-in posture (built-in-runner-credential-provider.ts), where the
28
+ * caller is a signed-in person asking for a run's credential and the
29
+ * answer is a permission, not a token verdict: only the person whose run
30
+ * it is may hold its credential. A run whose creator stamp names nobody
31
+ * gets the same sentence — no one is its person.
32
+ *
33
+ * The lineage mismatch copy is the cloud edition's, transcribed byte for
34
+ * byte (credentials/provider.ts in the composition; the Java
35
+ * RecordRunnerLineageLabelsStep before it) so the two editions refuse a
36
+ * mis-stamped lineage label with one sentence.
37
+ */
38
+ /** The verifier's name in the boot log and in auth failures (the `oidc` / `apikey` precedent). */
39
+ export const RUNNER_VERIFIER_NAME = "runner";
40
+ /** The token arms: forged, wrong shape, unknown execution, past `exp`, keyless. */
41
+ export const RUNNER_CREDENTIAL_INVALID_MESSAGE = "runner credential is not valid on this server";
42
+ /** The resolution arms: a terminal execution; a run stamped by nobody the server recognizes. */
43
+ export const RUNNER_CREDENTIAL_NOT_LIVE_MESSAGE = "runner credential names a run that is over or belongs to nobody this server recognizes";
44
+ /** The exchange's refusal under the built-in posture: the caller is not the run's person (PERMISSION_DENIED). */
45
+ export const RUN_CREDENTIAL_NOT_RUNS_PERSON_MESSAGE = "a run credential is minted only for the person whose run it is";
46
+ /** The cloud's byte-pinned lineage refusal (the Java step's copy). */
47
+ export const WORKFLOW_LINEAGE_BINDING_MISMATCH_MESSAGE = "workflow lineage label names a workflow execution this runner credential is not bound to";
48
+ /** The cloud's byte-pinned org-mismatch refusal (MemoryPolicy.MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE). */
49
+ export const MEMORY_CAPTURE_ORG_MISMATCH_MESSAGE = "memory capture is scoped to the session's organization";
50
+ /**
51
+ * How long a run credential outlives its run, measured from the row's
52
+ * `status.completed_at`. A run's credential is valid while the run is
53
+ * not terminal — runs wait on humans with no timeout, so no clock can
54
+ * bound them — and for this long after, because two legitimate runner
55
+ * writes land after the terminal stamp: the session-subject generation
56
+ * the workflow fires and does not await (issue #665), and a Temporal
57
+ * activity retried after its completion failed to reach the engine.
58
+ * Ten minutes covers one model call and one retry backoff; today's
59
+ * exchange-lane token outlives a run by up to an hour. A terminal row
60
+ * with no `completed_at` gets no grace: fail closed.
61
+ */
62
+ export const RUN_CREDENTIAL_GRACE_AFTER_TERMINAL_MS = 10 * 60 * 1000;
63
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/runnerauth/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kGAAkG;AAClG,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAE7C,mFAAmF;AACnF,MAAM,CAAC,MAAM,iCAAiC,GAC5C,+CAA+C,CAAC;AAElD,gGAAgG;AAChG,MAAM,CAAC,MAAM,kCAAkC,GAC7C,wFAAwF,CAAC;AAE3F,iHAAiH;AACjH,MAAM,CAAC,MAAM,sCAAsC,GACjD,gEAAgE,CAAC;AAEnE,sEAAsE;AACtE,MAAM,CAAC,MAAM,yCAAyC,GACpD,0FAA0F,CAAC;AAE7F,uGAAuG;AACvG,MAAM,CAAC,MAAM,mCAAmC,GAC9C,wDAAwD,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The one reader of the provider's `mintRunCredential` capability for the
3
+ * two dispatch paths (temporal/agentexecution/engine-client.ts and
4
+ * temporal/workflowexecution/engine-client.ts). Both engines put the
5
+ * answer on the invoke workflow input as `execution_context_token` — the
6
+ * connect lane's key for the same token type (domain/mcpserver/engine.ts)
7
+ * — and omit the key when the answer is "".
8
+ *
9
+ * Three answers, one rule each:
10
+ *
11
+ * - the capability is absent: "" — this edition's runner is
12
+ * credentialed another way (the cloud bakes a sandbox credential at
13
+ * provision; runner-credential-provider.ts). Nothing to log: it is
14
+ * the composition's shape, not a condition.
15
+ * - the capability answers "": "" — the lane cannot mint (keyless, the
16
+ * modeled disabled state). The composition root makes a keyless
17
+ * server boot-fatal, so this is a test-only arm in practice.
18
+ * - the capability THROWS: one warning naming the execution, then "" —
19
+ * a dispatch never fails because a credential could not be minted
20
+ * (the connect lane's precedent, ruled 2026-09-16). The runner then
21
+ * falls back to the platform exchange and, refused there for a run
22
+ * that is not the key-holder's, reads redacted and fails the run
23
+ * loudly at its first read — attributable, never silent. The default
24
+ * provider throws only for an empty execution id (a programming
25
+ * error), so this arm exists to be pinned, not expected.
26
+ *
27
+ * The credential is never logged: the warning carries the execution id
28
+ * and the error's message, and the engines' own "Started …" lines carry
29
+ * ids and queues (a test pins the field names). A run credential in a log
30
+ * line would let anyone who reads the log act as the run's human for as
31
+ * long as the run lives.
32
+ */
33
+ import type { Logger } from "../boot/logger.js";
34
+ import type { RunnerCredentialProvider } from "./runner-credential-provider.js";
35
+ /** The dispatch's view of the seam: the one capability it reads. */
36
+ export type RunCredentialMint = Pick<RunnerCredentialProvider, "mintRunCredential">;
37
+ export declare function runCredentialForDispatch(credentials: RunCredentialMint, executionId: string, logger: Logger): string;
38
+ //# sourceMappingURL=dispatch-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-credential.d.ts","sourceRoot":"","sources":["../../src/runnerauth/dispatch-credential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,oEAAoE;AACpE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,wBAAwB,EACxB,mBAAmB,CACpB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,iBAAiB,EAC9B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CAiBR"}
@@ -0,0 +1,17 @@
1
+ export function runCredentialForDispatch(credentials, executionId, logger) {
2
+ const mintRunCredential = credentials.mintRunCredential?.bind(credentials);
3
+ if (mintRunCredential === undefined) {
4
+ return "";
5
+ }
6
+ try {
7
+ return mintRunCredential(executionId);
8
+ }
9
+ catch (error) {
10
+ logger.warn("Failed to mint the run credential — dispatching without it; the runner will fall back to the platform exchange", {
11
+ execution_id: executionId,
12
+ error: error instanceof Error ? error.message : String(error),
13
+ });
14
+ return "";
15
+ }
16
+ }
17
+ //# sourceMappingURL=dispatch-credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-credential.js","sourceRoot":"","sources":["../../src/runnerauth/dispatch-credential.ts"],"names":[],"mappings":"AAyCA,MAAM,UAAU,wBAAwB,CACtC,WAA8B,EAC9B,WAAmB,EACnB,MAAc;IAEd,MAAM,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3E,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC;QACH,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CACT,gHAAgH,EAChH;YACE,YAAY,EAAE,WAAW;YACzB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CACF,CAAC;QACF,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,M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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,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACpE;IAAE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;;;;;;;;;;;;;;;;;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"}