@stigmer/server 3.18.0-dev.20260918103812 → 3.18.1-dev.20260919070736
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/boot/compose.d.ts +12 -0
- package/dist/boot/compose.d.ts.map +1 -1
- package/dist/boot/compose.js +46 -8
- package/dist/boot/compose.js.map +1 -1
- package/dist/boot/config.d.ts +6 -2
- package/dist/boot/config.d.ts.map +1 -1
- package/dist/boot/config.js.map +1 -1
- package/dist/boot/oauth-redirect-uri.d.ts +54 -0
- package/dist/boot/oauth-redirect-uri.d.ts.map +1 -0
- package/dist/boot/oauth-redirect-uri.js +37 -0
- package/dist/boot/oauth-redirect-uri.js.map +1 -0
- package/dist/domain/agentexecution/lifecycle.js +1 -1
- package/dist/domain/agentexecution/lifecycle.js.map +1 -1
- package/dist/domain/iampolicy/constants.d.ts +3 -3
- package/dist/domain/iampolicy/constants.js +3 -3
- package/dist/domain/mcpserver/complete-endpoint-auth.d.ts +16 -0
- package/dist/domain/mcpserver/complete-endpoint-auth.d.ts.map +1 -0
- package/dist/domain/mcpserver/complete-endpoint-auth.js +260 -0
- package/dist/domain/mcpserver/complete-endpoint-auth.js.map +1 -0
- package/dist/domain/mcpserver/complete-oauth-connect.d.ts.map +1 -1
- package/dist/domain/mcpserver/complete-oauth-connect.js +1 -1
- package/dist/domain/mcpserver/complete-oauth-connect.js.map +1 -1
- package/dist/domain/mcpserver/connect.d.ts +25 -0
- package/dist/domain/mcpserver/connect.d.ts.map +1 -1
- package/dist/domain/mcpserver/connect.js +8 -23
- package/dist/domain/mcpserver/connect.js.map +1 -1
- package/dist/domain/mcpserver/controller.d.ts.map +1 -1
- package/dist/domain/mcpserver/controller.js +12 -0
- package/dist/domain/mcpserver/controller.js.map +1 -1
- package/dist/domain/mcpserver/initiate-oauth-connect.d.ts.map +1 -1
- package/dist/domain/mcpserver/initiate-oauth-connect.js +16 -13
- package/dist/domain/mcpserver/initiate-oauth-connect.js.map +1 -1
- package/dist/domain/mcpserver/oauth/dcr.d.ts +10 -1
- package/dist/domain/mcpserver/oauth/dcr.d.ts.map +1 -1
- package/dist/domain/mcpserver/oauth/dcr.js +1 -9
- package/dist/domain/mcpserver/oauth/dcr.js.map +1 -1
- package/dist/domain/mcpserver/oauth/discovery.d.ts +43 -20
- package/dist/domain/mcpserver/oauth/discovery.d.ts.map +1 -1
- package/dist/domain/mcpserver/oauth/discovery.js +69 -54
- package/dist/domain/mcpserver/oauth/discovery.js.map +1 -1
- package/dist/domain/mcpserver/oauth/preflight.d.ts +27 -1
- package/dist/domain/mcpserver/oauth/preflight.d.ts.map +1 -1
- package/dist/domain/mcpserver/oauth/preflight.js +1 -26
- package/dist/domain/mcpserver/oauth/preflight.js.map +1 -1
- package/dist/domain/mcpserver/oauth/refresh.d.ts +2 -1
- package/dist/domain/mcpserver/oauth/refresh.d.ts.map +1 -1
- package/dist/domain/mcpserver/oauth/refresh.js +1 -1
- package/dist/domain/mcpserver/oauth/refresh.js.map +1 -1
- package/dist/domain/mcpserver/oauth/token.d.ts +9 -2
- package/dist/domain/mcpserver/oauth/token.d.ts.map +1 -1
- package/dist/domain/mcpserver/oauth/token.js +2 -8
- package/dist/domain/mcpserver/oauth/token.js.map +1 -1
- package/dist/domain/oauthapp/refresolution/refresolution.js +1 -1
- package/dist/domain/oauthapp/refresolution.js +1 -1
- package/dist/domain/platform/controller.d.ts +8 -1
- package/dist/domain/platform/controller.d.ts.map +1 -1
- package/dist/domain/platform/controller.js +2 -3
- package/dist/domain/platform/controller.js.map +1 -1
- package/dist/domain/plugin/constants.d.ts +7 -1
- package/dist/domain/plugin/constants.d.ts.map +1 -1
- package/dist/domain/plugin/constants.js +7 -1
- package/dist/domain/plugin/constants.js.map +1 -1
- package/dist/domain/plugin/materialize/plan.d.ts.map +1 -1
- package/dist/domain/plugin/materialize/plan.js +16 -1
- package/dist/domain/plugin/materialize/plan.js.map +1 -1
- package/dist/domain/plugin/members.d.ts +46 -0
- package/dist/domain/plugin/members.d.ts.map +1 -1
- package/dist/domain/plugin/members.js +31 -8
- package/dist/domain/plugin/members.js.map +1 -1
- package/dist/domain/plugin/push.d.ts +5 -3
- package/dist/domain/plugin/push.d.ts.map +1 -1
- package/dist/domain/plugin/push.js +58 -14
- package/dist/domain/plugin/push.js.map +1 -1
- package/dist/domain/workflowexecution/lifecycle.js +1 -1
- package/dist/domain/workflowexecution/lifecycle.js.map +1 -1
- package/dist/extensions/drivers.d.ts +17 -0
- package/dist/extensions/drivers.d.ts.map +1 -1
- package/dist/extensions/outbound-egress.d.ts +49 -0
- package/dist/extensions/outbound-egress.d.ts.map +1 -0
- package/dist/extensions/outbound-egress.js +51 -0
- package/dist/extensions/outbound-egress.js.map +1 -0
- package/dist/extensions/registry.d.ts +6 -0
- package/dist/extensions/registry.d.ts.map +1 -1
- package/dist/extensions/registry.js +10 -0
- package/dist/extensions/registry.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pipeline/apiresource-labels.d.ts +34 -1
- package/dist/pipeline/apiresource-labels.d.ts.map +1 -1
- package/dist/pipeline/apiresource-labels.js +31 -0
- package/dist/pipeline/apiresource-labels.js.map +1 -1
- package/dist/sandbox/kubernetes.d.ts.map +1 -1
- package/dist/sandbox/kubernetes.js +1 -8
- package/dist/sandbox/kubernetes.js.map +1 -1
- package/dist/sandbox/provisioner.d.ts +5 -20
- package/dist/sandbox/provisioner.d.ts.map +1 -1
- package/dist/sandbox/provisioner.js.map +1 -1
- package/dist/sandbox/steps.d.ts +8 -22
- package/dist/sandbox/steps.d.ts.map +1 -1
- package/dist/sandbox/steps.js +12 -17
- package/dist/sandbox/steps.js.map +1 -1
- package/dist/store/interface.d.ts +6 -2
- package/dist/store/interface.d.ts.map +1 -1
- package/dist/store/interface.js.map +1 -1
- package/package.json +6 -5
- package/src/boot/__tests__/oauth-redirect-uri.test.ts +38 -0
- package/src/boot/compose.ts +63 -10
- package/src/boot/config.ts +6 -2
- package/src/boot/oauth-redirect-uri.ts +53 -0
- package/src/domain/agentexecution/lifecycle.ts +1 -1
- package/src/domain/iampolicy/constants.ts +3 -3
- package/src/domain/mcpserver/__tests__/complete-endpoint-auth.test.ts +270 -0
- package/src/domain/mcpserver/__tests__/connect-authorization.test.ts +3 -0
- package/src/domain/mcpserver/__tests__/connect.test.ts +31 -0
- package/src/domain/mcpserver/complete-endpoint-auth.ts +277 -0
- package/src/domain/mcpserver/complete-oauth-connect.ts +1 -0
- package/src/domain/mcpserver/connect.ts +21 -15
- package/src/domain/mcpserver/controller.ts +16 -0
- package/src/domain/mcpserver/initiate-oauth-connect.ts +16 -12
- package/src/domain/mcpserver/oauth/__tests__/discovery.test.ts +120 -91
- package/src/domain/mcpserver/oauth/__tests__/token-refresh.test.ts +3 -1
- package/src/domain/mcpserver/oauth/dcr.ts +2 -1
- package/src/domain/mcpserver/oauth/discovery.ts +120 -89
- package/src/domain/mcpserver/oauth/preflight.ts +2 -1
- package/src/domain/mcpserver/oauth/refresh.ts +2 -1
- package/src/domain/mcpserver/oauth/token.ts +4 -3
- package/src/domain/oauthapp/__tests__/oauthapp.test.ts +2 -2
- package/src/domain/oauthapp/__tests__/refresolution.test.ts +2 -2
- package/src/domain/oauthapp/refresolution/refresolution.ts +1 -1
- package/src/domain/oauthapp/refresolution.ts +1 -1
- package/src/domain/platform/__tests__/platform.test.ts +47 -0
- package/src/domain/platform/controller.ts +10 -4
- package/src/domain/plugin/__tests__/materialize.test.ts +42 -47
- package/src/domain/plugin/__tests__/members.test.ts +149 -0
- package/src/domain/plugin/__tests__/plugin.test.ts +219 -8
- package/src/domain/plugin/constants.ts +7 -1
- package/src/domain/plugin/materialize/plan.ts +20 -1
- package/src/domain/plugin/members.ts +76 -7
- package/src/domain/plugin/push.ts +80 -20
- package/src/domain/workflowexecution/lifecycle.ts +1 -1
- package/src/extensions/__tests__/outbound-egress-points.test.ts +58 -0
- package/src/extensions/drivers.ts +17 -0
- package/src/extensions/outbound-egress.ts +55 -0
- package/src/extensions/registry.ts +19 -0
- package/src/index.ts +10 -0
- package/src/pipeline/apiresource-labels.ts +42 -1
- package/src/sandbox/__tests__/docker.integration.test.ts +0 -2
- package/src/sandbox/__tests__/kubernetes.test.ts +2 -10
- package/src/sandbox/__tests__/local-process.integration.test.ts +0 -3
- package/src/sandbox/__tests__/steps.test.ts +19 -72
- package/src/sandbox/kubernetes.ts +1 -8
- package/src/sandbox/provisioner.ts +5 -20
- package/src/sandbox/steps.ts +12 -29
- package/src/store/interface.ts +6 -2
package/src/sandbox/steps.ts
CHANGED
|
@@ -50,7 +50,6 @@ import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/
|
|
|
50
50
|
|
|
51
51
|
import type { Logger } from "../boot/logger.js";
|
|
52
52
|
import type { AgentExecutionTemporalConfig } from "../domain/agentexecution/temporal/config.js";
|
|
53
|
-
import type { CallerIdentity } from "../extensions/identity.js";
|
|
54
53
|
import {
|
|
55
54
|
WORKFLOW_ROUTING_EXECUTION,
|
|
56
55
|
type WorkflowExecutionTemporalConfig,
|
|
@@ -73,17 +72,6 @@ import { mintSandboxToken, type SandboxLane } from "./lane.js";
|
|
|
73
72
|
export const SANDBOX_PROVISIONING_FAILED_PREFIX =
|
|
74
73
|
"Sandbox provisioning failed: ";
|
|
75
74
|
|
|
76
|
-
/**
|
|
77
|
-
* The two facts about the requesting caller a sandbox ensure carries, cut
|
|
78
|
-
* from the chain's CallerIdentity (the domain/identityaccount/actor.ts
|
|
79
|
-
* shape): the id rides into the credential mint, so the session token is
|
|
80
|
-
* minted FOR the caller; the class rides onto the driver's environment,
|
|
81
|
-
* so a driver can decide the workspace's durability by who asked. A step
|
|
82
|
-
* hands `ctx.callerIdentity` in whole; the pick keeps a test's fixture to
|
|
83
|
-
* the two fields the body reads.
|
|
84
|
-
*/
|
|
85
|
-
export type SandboxCaller = Pick<CallerIdentity, "identityId" | "callerClass">;
|
|
86
|
-
|
|
87
75
|
type AgentExecutionCreateDesc = typeof AgentExecutionSchema;
|
|
88
76
|
|
|
89
77
|
export interface EnsureSessionSandboxDeps {
|
|
@@ -113,7 +101,7 @@ export function newEnsureSessionSandboxStep(
|
|
|
113
101
|
await ensureSessionSandboxForExecution(
|
|
114
102
|
deps,
|
|
115
103
|
ctx.newState,
|
|
116
|
-
ctx.callerIdentity,
|
|
104
|
+
ctx.callerIdentity.identityId,
|
|
117
105
|
);
|
|
118
106
|
},
|
|
119
107
|
};
|
|
@@ -126,18 +114,15 @@ export function newEnsureSessionSandboxStep(
|
|
|
126
114
|
* chains' differing context shapes (newState vs loaded execution) meet
|
|
127
115
|
* at this seam instead.
|
|
128
116
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* the driver's environment as the one request fact a driver may decide
|
|
134
|
-
* durability by. The chain always has a caller: the in-process transport
|
|
135
|
-
* mints `internal` for the server's own calls.
|
|
117
|
+
* `callerIdentityId` rides into the credential mint (lane.ts): the Java
|
|
118
|
+
* ensure step mints session tokens FOR the requesting caller, so the
|
|
119
|
+
* capability mint needs the identity the OSS execution-scoped mint never
|
|
120
|
+
* did. Empty when the invoking site has no caller.
|
|
136
121
|
*/
|
|
137
122
|
export async function ensureSessionSandboxForExecution(
|
|
138
123
|
deps: EnsureSessionSandboxDeps,
|
|
139
124
|
execution: AgentExecution,
|
|
140
|
-
|
|
125
|
+
callerIdentityId: string,
|
|
141
126
|
): Promise<void> {
|
|
142
127
|
if (!deps.lane.enabled) {
|
|
143
128
|
return;
|
|
@@ -182,11 +167,10 @@ export async function ensureSessionSandboxForExecution(
|
|
|
182
167
|
sessionId,
|
|
183
168
|
executionId,
|
|
184
169
|
org: execution.metadata?.org ?? "",
|
|
185
|
-
callerIdentityId
|
|
170
|
+
callerIdentityId,
|
|
186
171
|
},
|
|
187
172
|
deps.logger,
|
|
188
173
|
),
|
|
189
|
-
callerClass: caller.callerClass,
|
|
190
174
|
});
|
|
191
175
|
} catch (error) {
|
|
192
176
|
// Non-critical: never fail the launch — but never silent either
|
|
@@ -263,7 +247,7 @@ export function newEnsureWorkflowSandboxStep(
|
|
|
263
247
|
await ensureWorkflowSandboxForExecution(
|
|
264
248
|
deps,
|
|
265
249
|
ctx.newState,
|
|
266
|
-
ctx.callerIdentity,
|
|
250
|
+
ctx.callerIdentity.identityId,
|
|
267
251
|
);
|
|
268
252
|
},
|
|
269
253
|
};
|
|
@@ -274,13 +258,13 @@ export function newEnsureWorkflowSandboxStep(
|
|
|
274
258
|
* re-provision (lifecycle.ts — the previous sandbox was deprovisioned at
|
|
275
259
|
* the terminal FAILED, so a recovered execution needs a fresh one before
|
|
276
260
|
* its fresh workflow starts). Throws Unavailable on provisioning failure
|
|
277
|
-
* — the critical posture in both chains.
|
|
278
|
-
* the
|
|
261
|
+
* — the critical posture in both chains. `callerIdentityId` rides into
|
|
262
|
+
* the credential mint exactly as on the session body.
|
|
279
263
|
*/
|
|
280
264
|
export async function ensureWorkflowSandboxForExecution(
|
|
281
265
|
deps: EnsureWorkflowSandboxDeps,
|
|
282
266
|
execution: WorkflowExecution,
|
|
283
|
-
|
|
267
|
+
callerIdentityId: string,
|
|
284
268
|
): Promise<void> {
|
|
285
269
|
if (!deps.lane.enabled) {
|
|
286
270
|
return;
|
|
@@ -312,11 +296,10 @@ export async function ensureWorkflowSandboxForExecution(
|
|
|
312
296
|
sessionId: "",
|
|
313
297
|
executionId,
|
|
314
298
|
org: execution.metadata?.org ?? "",
|
|
315
|
-
callerIdentityId
|
|
299
|
+
callerIdentityId,
|
|
316
300
|
},
|
|
317
301
|
deps.logger,
|
|
318
302
|
),
|
|
319
|
-
callerClass: caller.callerClass,
|
|
320
303
|
});
|
|
321
304
|
} catch (error) {
|
|
322
305
|
deps.logger.error(
|
package/src/store/interface.ts
CHANGED
|
@@ -217,8 +217,12 @@ export interface SearchIndexQueryResult {
|
|
|
217
217
|
// =============================================================================
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
|
-
* Key-value state for
|
|
221
|
-
*
|
|
220
|
+
* Key-value state for one-shot boot work that must run once per database.
|
|
221
|
+
* The one writer today is the membership rules' reconciliation
|
|
222
|
+
* (`iampolicy/constants.ts` ROLES_RECONCILED_KEY). A database migrated
|
|
223
|
+
* from the Go server carries that server's bootstrap keys too; the
|
|
224
|
+
* migration preserves them (see sqlite/__tests__/migrations.test.ts) and
|
|
225
|
+
* nothing reads them.
|
|
222
226
|
*/
|
|
223
227
|
export interface BootstrapStateStore {
|
|
224
228
|
/** Returns "" (not an error) when the key does not exist — Go's contract. */
|