@stigmer/server 3.36.0 → 3.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/domain/agentexecution/artifacts.d.ts.map +1 -1
- package/dist/domain/agentexecution/artifacts.js +15 -6
- package/dist/domain/agentexecution/artifacts.js.map +1 -1
- package/dist/domain/agentexecution/constants.d.ts +0 -10
- package/dist/domain/agentexecution/constants.d.ts.map +1 -1
- package/dist/domain/agentexecution/constants.js +0 -12
- package/dist/domain/agentexecution/constants.js.map +1 -1
- package/dist/domain/agentexecution/lifecycle.d.ts.map +1 -1
- package/dist/domain/agentexecution/lifecycle.js +5 -3
- package/dist/domain/agentexecution/lifecycle.js.map +1 -1
- package/dist/domain/agentexecution/platform-rows.d.ts +63 -0
- package/dist/domain/agentexecution/platform-rows.d.ts.map +1 -0
- package/dist/domain/agentexecution/platform-rows.js +106 -0
- package/dist/domain/agentexecution/platform-rows.js.map +1 -0
- package/dist/domain/agentexecution/subscribe.d.ts.map +1 -1
- package/dist/domain/agentexecution/subscribe.js +7 -4
- package/dist/domain/agentexecution/subscribe.js.map +1 -1
- package/dist/domain/agentexecution/update-status.d.ts.map +1 -1
- package/dist/domain/agentexecution/update-status.js +48 -17
- package/dist/domain/agentexecution/update-status.js.map +1 -1
- package/dist/domain/agentexecution/usage.d.ts +0 -2
- package/dist/domain/agentexecution/usage.d.ts.map +1 -1
- package/dist/domain/agentexecution/usage.js +12 -10
- package/dist/domain/agentexecution/usage.js.map +1 -1
- package/dist/domain/organization/controller.d.ts +4 -1
- package/dist/domain/organization/controller.d.ts.map +1 -1
- package/dist/domain/organization/controller.js +30 -8
- package/dist/domain/organization/controller.js.map +1 -1
- package/dist/domain/workflow/controller.js +2 -1
- package/dist/domain/workflow/controller.js.map +1 -1
- package/dist/domain/workflow/steps.d.ts +7 -4
- package/dist/domain/workflow/steps.d.ts.map +1 -1
- package/dist/domain/workflow/steps.js +29 -17
- package/dist/domain/workflow/steps.js.map +1 -1
- package/dist/domain/workflowexecution/create-steps.d.ts.map +1 -1
- package/dist/domain/workflowexecution/create-steps.js +6 -2
- package/dist/domain/workflowexecution/create-steps.js.map +1 -1
- package/dist/domain/workflowexecution/lifecycle.d.ts.map +1 -1
- package/dist/domain/workflowexecution/lifecycle.js +5 -2
- package/dist/domain/workflowexecution/lifecycle.js.map +1 -1
- package/dist/domain/workflowexecution/send-signal.d.ts.map +1 -1
- package/dist/domain/workflowexecution/send-signal.js +6 -3
- package/dist/domain/workflowexecution/send-signal.js.map +1 -1
- package/dist/domain/workflowexecution/submit-approval.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-approval.js +6 -2
- package/dist/domain/workflowexecution/submit-approval.js.map +1 -1
- package/dist/domain/workflowexecution/submit-file-decision.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-file-decision.js +6 -2
- package/dist/domain/workflowexecution/submit-file-decision.js.map +1 -1
- package/dist/domain/workflowexecution/submit-workflow-task-approval.d.ts.map +1 -1
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js +6 -2
- package/dist/domain/workflowexecution/submit-workflow-task-approval.js.map +1 -1
- package/dist/domain/workflowexecution/subscribe-events.d.ts.map +1 -1
- package/dist/domain/workflowexecution/subscribe-events.js +6 -2
- package/dist/domain/workflowexecution/subscribe-events.js.map +1 -1
- package/dist/domain/workflowexecution/subscribe.d.ts.map +1 -1
- package/dist/domain/workflowexecution/subscribe.js +7 -4
- package/dist/domain/workflowexecution/subscribe.js.map +1 -1
- package/dist/extensions/organization-directory.d.ts +29 -6
- package/dist/extensions/organization-directory.d.ts.map +1 -1
- package/dist/extensions/organization-directory.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pipeline/steps/guard-memory-capture.d.ts +9 -4
- package/dist/pipeline/steps/guard-memory-capture.d.ts.map +1 -1
- package/dist/pipeline/steps/guard-memory-capture.js +10 -12
- package/dist/pipeline/steps/guard-memory-capture.js.map +1 -1
- package/dist/temporal/agentexecution/runner-result.d.ts +12 -0
- package/dist/temporal/agentexecution/runner-result.d.ts.map +1 -1
- package/dist/temporal/agentexecution/runner-result.js +15 -0
- package/dist/temporal/agentexecution/runner-result.js.map +1 -1
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.d.ts.map +1 -1
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js +44 -22
- package/dist/temporal/agentexecution/workflows/invoke-agent-execution.js.map +1 -1
- package/package.json +6 -6
- package/src/domain/agentexecution/__tests__/agentexecution.test.ts +2 -8
- package/src/domain/agentexecution/__tests__/store-faults.test.ts +315 -0
- package/src/domain/agentexecution/__tests__/update-status.test.ts +217 -0
- package/src/domain/agentexecution/artifacts.ts +21 -12
- package/src/domain/agentexecution/constants.ts +0 -15
- package/src/domain/agentexecution/lifecycle.ts +5 -3
- package/src/domain/agentexecution/platform-rows.ts +133 -0
- package/src/domain/agentexecution/subscribe.ts +7 -3
- package/src/domain/agentexecution/update-status.ts +70 -19
- package/src/domain/agentexecution/usage.ts +16 -13
- package/src/domain/organization/controller.ts +47 -10
- package/src/domain/workflow/__tests__/version-audit-degradation.test.ts +192 -0
- package/src/domain/workflow/controller.ts +2 -1
- package/src/domain/workflow/steps.ts +30 -18
- package/src/domain/workflowexecution/__tests__/store-faults.test.ts +418 -0
- package/src/domain/workflowexecution/create-steps.ts +6 -2
- package/src/domain/workflowexecution/lifecycle.ts +5 -2
- package/src/domain/workflowexecution/send-signal.ts +11 -4
- package/src/domain/workflowexecution/submit-approval.ts +6 -2
- package/src/domain/workflowexecution/submit-file-decision.ts +6 -2
- package/src/domain/workflowexecution/submit-workflow-task-approval.ts +6 -2
- package/src/domain/workflowexecution/subscribe-events.ts +6 -2
- package/src/domain/workflowexecution/subscribe.ts +11 -4
- package/src/extensions/__tests__/extension-composition.test.ts +90 -18
- package/src/extensions/organization-directory.ts +33 -7
- package/src/index.ts +5 -1
- package/src/pipeline/__tests__/blind-not-found.test.ts +297 -0
- package/src/pipeline/steps/__tests__/guard-memory-capture.test.ts +67 -5
- package/src/pipeline/steps/guard-memory-capture.ts +24 -19
- package/src/temporal/agentexecution/__tests__/invoke-workflow.test.ts +51 -1
- package/src/temporal/agentexecution/__tests__/own-behalf-status-writes.test.ts +149 -9
- package/src/temporal/agentexecution/__tests__/replay-histories/runner-failed.json +757 -0
- package/src/temporal/agentexecution/__tests__/replay-histories/user-cancel.json +755 -0
- package/src/temporal/agentexecution/__tests__/replay.test.ts +4 -2
- package/src/temporal/agentexecution/runner-result.ts +16 -0
- package/src/temporal/agentexecution/workflows/invoke-agent-execution.ts +49 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-events.js","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAGhH,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,gCAAgC,EAAE,MAAM,kEAAkE,CAAC;AAIpH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"subscribe-events.js","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAA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O,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACtC,mEAAmE;QACnE,sEAAsE;QACtE,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe.d.ts","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAKvH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"subscribe.d.ts","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AACjG,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAKvH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AASjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAMtE;AAED,wBAAuB,kBAAkB,CACvC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,iCAAiC,EAC1C,OAAO,EAAE,cAAc,GACtB,cAAc,CAAC,iBAAiB,CAAC,CAmGnC"}
|
|
@@ -32,8 +32,9 @@ import { ExecutionPhase } from "@stigmer/protos/ai/stigmer/agentic/workflowexecu
|
|
|
32
32
|
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
33
33
|
import { WorkflowExecutionQueryController } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/query_pb";
|
|
34
34
|
import { callerIdentityOf } from "../../pipeline/interceptors/auth.js";
|
|
35
|
-
import { invalidArgumentError, notFoundError } from "../../pipeline/errors.js";
|
|
35
|
+
import { internalError, invalidArgumentError, notFoundError, } from "../../pipeline/errors.js";
|
|
36
36
|
import { authorizeDirect } from "../../pipeline/steps/authorize.js";
|
|
37
|
+
import { ResourceNotFoundError } from "../../store/interface.js";
|
|
37
38
|
/**
|
|
38
39
|
* Go isWorkflowTerminalPhase (subscribe.go): the stream-closing set.
|
|
39
40
|
* Deliberately narrower than "the execution can never run again" —
|
|
@@ -67,9 +68,11 @@ export async function* subscribeExecution(deps, request, context) {
|
|
|
67
68
|
try {
|
|
68
69
|
snapshot = await deps.store.getResource(ApiResourceKind.workflow_execution, id, WorkflowExecutionSchema);
|
|
69
70
|
}
|
|
70
|
-
catch {
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error instanceof ResourceNotFoundError) {
|
|
73
|
+
throw notFoundError("WorkflowExecution", id);
|
|
74
|
+
}
|
|
75
|
+
throw internalError(error, "failed to load workflow execution");
|
|
73
76
|
}
|
|
74
77
|
yield snapshot;
|
|
75
78
|
deps.logger.debug("Sent initial workflow execution state, streaming live updates", { executionId: id });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAC;AAEzG,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,gCAAgC,EAAE,MAAM,kEAAkE,CAAC;AAIpH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../../../src/domain/workflowexecution/subscribe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAC;AAEzG,OAAO,EAAE,cAAc,EAAE,MAAM,iEAAiE,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,gCAAgC,EAAE,MAAM,kEAAkE,CAAC;AAIpH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAA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AAM,CAAC,uBAAuB,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;gBACvD,SAAS;YACX,CAAC;YAED,MAAM,OAAO,CAAC;YACd,QAAQ,GAAG,OAAO,CAAC;YAEnB,MAAM,KAAK,GACT,OAAO,CAAC,MAAM,EAAE,KAAK,IAAI,cAAc,CAAC,2BAA2B,CAAC;YACtE,IAAI,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC;gBACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,gEAAgE,EAChE,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,CAClD,CAAC;gBACF,OAAO;YACT,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qDAAqD,EAAE;YACtE,WAAW,EAAE,EAAE;SAChB,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
* and the built-in directory filter to what the caller may view.
|
|
16
16
|
* - `getByExternalOrgId` (capability `externalOrgLookup`): deliberately
|
|
17
17
|
* absent from the OSS partial registration (UNIMPLEMENTED by
|
|
18
|
-
* construction); the cloud resolves external IdP org ids.
|
|
18
|
+
* construction); the cloud resolves external IdP org ids. The lookup
|
|
19
|
+
* is scoped to the identity provider the request names: the directory
|
|
20
|
+
* resolves that provider and the external id within it, and the
|
|
21
|
+
* controller answers only a caller who may view the provider, so one
|
|
22
|
+
* integrator's tenant ids never answer another's organizations.
|
|
19
23
|
*
|
|
20
24
|
* No directory composed = the trusted-local behavior, byte-identical; the
|
|
21
25
|
* built-in directory (authorization/organization-directory.ts) composes
|
|
@@ -43,11 +47,30 @@ export interface OrganizationDirectory {
|
|
|
43
47
|
*/
|
|
44
48
|
listMyOrganizationIds(caller: CallerIdentity): Promise<ReadonlyArray<string> | typeof ALL_ORGANIZATIONS>;
|
|
45
49
|
/**
|
|
46
|
-
* Resolves
|
|
47
|
-
*
|
|
48
|
-
* registers `getByExternalOrgId` (its chain
|
|
49
|
-
*
|
|
50
|
+
* Resolves the identity provider a lookup names, and the external IdP
|
|
51
|
+
* organization id within that provider alone. When this method is
|
|
52
|
+
* present, the controller registers `getByExternalOrgId` (its chain,
|
|
53
|
+
* the provider's authorization included, stays controller-owned); when
|
|
54
|
+
* absent, the RPC stays unregistered and answers UNIMPLEMENTED.
|
|
50
55
|
*/
|
|
51
|
-
|
|
56
|
+
lookupExternalOrganization?(identityProviderRef: IdentityProviderRef, externalOrgId: string): Promise<ExternalOrganizationLookup>;
|
|
52
57
|
}
|
|
58
|
+
/** The identity provider a lookup names: its organization and its slug. */
|
|
59
|
+
export interface IdentityProviderRef {
|
|
60
|
+
readonly org: string;
|
|
61
|
+
readonly slug: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What a directory found for a lookup: no such identity provider, or the
|
|
65
|
+
* provider's id with the organization its external id maps to under it
|
|
66
|
+
* (undefined = no mapping). The controller authorizes on the provider's
|
|
67
|
+
* id before it reveals whether a mapping exists.
|
|
68
|
+
*/
|
|
69
|
+
export type ExternalOrganizationLookup = {
|
|
70
|
+
readonly kind: "no-identity-provider";
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: "resolved";
|
|
73
|
+
readonly identityProviderId: string;
|
|
74
|
+
readonly organizationId: string | undefined;
|
|
75
|
+
};
|
|
53
76
|
//# sourceMappingURL=organization-directory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-directory.d.ts","sourceRoot":"","sources":["../../src/extensions/organization-directory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"organization-directory.d.ts","sourceRoot":"","sources":["../../src/extensions/organization-directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,8FAA8F;AAC9F,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;;;OAIG;IACH,qBAAqB,CACnB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,iBAAiB,CAAC,CAAC;IAC7D;;;;;;OAMG;IACH,0BAA0B,CAAC,CACzB,mBAAmB,EAAE,mBAAmB,EACxC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACxC;AAED,2EAA2E;AAC3E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;CAAE,GACzC;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-directory.js","sourceRoot":"","sources":["../../src/extensions/organization-directory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organization-directory.js","sourceRoot":"","sources":["../../src/extensions/organization-directory.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export type { AgentExecutionResponseDecorator, AgentExecutionStatusHooks, AgentE
|
|
|
60
60
|
export type { ExtensionDrivers } from "./extensions/drivers.js";
|
|
61
61
|
export type { ResolvedExtensionDrivers } from "./extensions/registry.js";
|
|
62
62
|
export type { DefaultInstanceLinkedEvent, PolicyGrantedEvent, PolicyRevokedEvent, ResourceAuthorizationLifecycle, ResourceCreatedEvent, ResourceDeletedEvent, VisibilityChangedEvent, VisibilityTupleShape, ResolvedParentLink, } from "./extensions/resource-authorization.js";
|
|
63
|
-
export type { OrganizationDirectory } from "./extensions/organization-directory.js";
|
|
63
|
+
export type { ExternalOrganizationLookup, IdentityProviderRef, OrganizationDirectory, } from "./extensions/organization-directory.js";
|
|
64
64
|
export { ALL_ORGANIZATIONS } from "./extensions/organization-directory.js";
|
|
65
65
|
export type { LicenseStatusProvider, LicenseStatusReport, } from "./extensions/license-status.js";
|
|
66
66
|
export type { OutboundEgressPolicy } from "./extensions/outbound-egress.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,aAAa,EACb,QAAQ,EACR,OAAO,GACR,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC3B,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,WAAW,EACX,cAAc,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,CAAC;AACrG,YAAY,EACV,wBAAwB,EAKxB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EAKxB,qBAAqB,GACtB,MAAM,4CAA4C,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,4BAA4B,CAAC;AAcpC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMzD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,0BAA0B,CAAC;AAS9E,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,gBAAgB,IAAI,sCAAsC,GAC3D,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAQrE,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,0CAA0C,CAAC;AAOlD,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;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MAAM,0BAA0B,CAAC;AAE9E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,kDAAkD;AAClD,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,gBAAgB,IAAI,sCAAsC,GAC3D,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AA0BrE,oEAAoE;AACpE,yEAAyE;AACzE,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
* every Stigmer-minted non-first-party credential carries the
|
|
15
15
|
* `platform_client_id` claim (StigmerJwtIssuer stamps it on user, guest,
|
|
16
16
|
* channel, and schedule tokens alike), so its presence IS the exclusion
|
|
17
|
-
* the Java RequestCallerIdentity.isFirstPartyHumanOperator computes.
|
|
17
|
+
* the Java RequestCallerIdentity.isFirstPartyHumanOperator computes. The
|
|
18
|
+
* claim counts only on a platform token (`iss: "stigmer"`, read through
|
|
19
|
+
* decodeVerifiedPlatformTokenPayload as the PlatformClient origin guard
|
|
20
|
+
* reads it): a bearer another verifier claimed is some other issuer's,
|
|
21
|
+
* whatever claims it carries, and is never taken for a Stigmer-minted
|
|
22
|
+
* one (stigmer#1312).
|
|
18
23
|
*
|
|
19
24
|
* RUNNER credentials carry neither the machine class nor that claim —
|
|
20
25
|
* their eligibility is EDITION POLICY, so the gate consults the composed
|
|
@@ -30,9 +35,9 @@
|
|
|
30
35
|
* this gate's own logic applies). The capability throws its own
|
|
31
36
|
* byte-pinned refusal for the org-mismatch arm. With no capability
|
|
32
37
|
* composed the gate's logic is byte-identical to before the seam: OSS
|
|
33
|
-
* trusted-local callers carry no token and OIDC console logins
|
|
34
|
-
*
|
|
35
|
-
*
|
|
38
|
+
* trusted-local callers carry no token and OIDC console logins are not
|
|
39
|
+
* platform tokens — the step admits both, so the single-user posture is
|
|
40
|
+
* unchanged (proven by the rosters).
|
|
36
41
|
*/
|
|
37
42
|
import type { DescMessage } from "@bufbuild/protobuf";
|
|
38
43
|
import type { PipelineStep } from "../pipeline.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-memory-capture.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-memory-capture.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"guard-memory-capture.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-memory-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAG/F,wEAAwE;AACxE,eAAO,MAAM,6BAA6B,iEACsB,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AAEvE,wBAAgB,yBAAyB,CAAC,IAAI,SAAS,WAAW,EAChE,QAAQ,CAAC,EAAE,wBAAwB,GAClC,YAAY,CAAC,IAAI,CAAC,CAsDpB;AAED,4EAA4E;AAC5E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,SAAS,WAAW,EAChE,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,GACxB,uBAAuB,GAAG,SAAS,CAWrC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
2
|
+
import { USER_TOKEN_CLAIMS } from "../../domain/platformclient/constants.js";
|
|
2
3
|
import { isServerComposedRequest } from "../../extensions/identity.js";
|
|
4
|
+
import { decodeVerifiedPlatformTokenPayload, stringClaim, } from "../../platformtoken/envelope.js";
|
|
3
5
|
import { metadataOf } from "./shapes.js";
|
|
4
6
|
/** The Java MemoryPolicy.MEMORY_CAPTURE_CALLER_MESSAGE, byte-pinned. */
|
|
5
7
|
export const MEMORY_CAPTURE_CALLER_MESSAGE = "memory can only be captured for a first-party human operator";
|
|
@@ -69,18 +71,14 @@ export function memoryCaptureCredentialOf(ctx) {
|
|
|
69
71
|
}
|
|
70
72
|
return undefined;
|
|
71
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Whether the bearer is a platform token naming a PlatformClient. Anything
|
|
76
|
+
* that is not a platform token (no token, an API key, another issuer's
|
|
77
|
+
* JWT) is not one, whatever claims it carries.
|
|
78
|
+
*/
|
|
72
79
|
function carriesPlatformClientClaim(rawToken) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
try {
|
|
78
|
-
const payload = JSON.parse(Buffer.from(segments[1], "base64url").toString("utf8"));
|
|
79
|
-
return (typeof payload.platform_client_id === "string" &&
|
|
80
|
-
payload.platform_client_id !== "");
|
|
81
|
-
}
|
|
82
|
-
catch {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
80
|
+
const payload = decodeVerifiedPlatformTokenPayload(rawToken);
|
|
81
|
+
return (payload !== undefined &&
|
|
82
|
+
stringClaim(payload, USER_TOKEN_CLAIMS.platformClientId) !== undefined);
|
|
85
83
|
}
|
|
86
84
|
//# sourceMappingURL=guard-memory-capture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-memory-capture.js","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-memory-capture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guard-memory-capture.js","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-memory-capture.ts"],"names":[],"mappings":"AA0CA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EACL,kCAAkC,EAClC,WAAW,GACZ,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,wEAAwE;AACxE,MAAM,CAAC,MAAM,6BAA6B,GACxC,8DAA8D,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEvE,MAAM,UAAU,yBAAyB,CACvC,QAAmC;IAEnC,OAAO;QACL,IAAI,EAAE,oBAAoB;QAC1B,KAAK,CAAC,OAAO,CAAC,GAAyB;YACrC,MAAM,MAAM,GAAG,GAAG,CAAC,cAAc,CAAC;YAClC,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpC,6DAA6D;gBAC7D,+DAA+D;gBAC/D,OAAO;YACT,CAAC;YACD,MAAM,MAAM,GAAG,QAAQ,EAAE,sBAAsB,CAAC;YAChD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,gEAAgE;gBAChE,8DAA8D;gBAC9D,8DAA8D;gBAC9D,gEAAgE;gBAChE,2DAA2D;gBAC3D,4DAA4D;gBAC5D,uDAAuD;gBACvD,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;gBAChD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC1D,QAAQ,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W,CAAC,OAAO,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,KAAK,SAAS,CACvE,CAAC;AACJ,CAAC"}
|
|
@@ -24,4 +24,16 @@ export type RunnerActivityResult = Record<string, unknown>;
|
|
|
24
24
|
export declare function getPhaseFromResult(result: RunnerActivityResult | null | undefined): ExecutionPhase;
|
|
25
25
|
/** Extracts the error string from a runner activity result (Go GetErrorFromResult). */
|
|
26
26
|
export declare function getErrorFromResult(result: RunnerActivityResult | null | undefined): string;
|
|
27
|
+
/**
|
|
28
|
+
* The runner reported the turn FAILED (its result's phase), as opposed to
|
|
29
|
+
* the flow breaking around it. The runner has then already persisted the
|
|
30
|
+
* failed transcript with its own explanation rows (the runner's terminal
|
|
31
|
+
* table), so the workflow's failure-path status write carries phase and
|
|
32
|
+
* error only and adds no second explanation (stigmer#980). The message is
|
|
33
|
+
* the one the workflow always threw here, so the parent callback and the
|
|
34
|
+
* workflow failure read as before.
|
|
35
|
+
*/
|
|
36
|
+
export declare class RunnerReportedFailure extends Error {
|
|
37
|
+
constructor(runnerError: string);
|
|
38
|
+
}
|
|
27
39
|
//# sourceMappingURL=runner-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-result.d.ts","sourceRoot":"","sources":["../../../src/temporal/agentexecution/runner-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F,mEAAmE;AACnE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC9C,cAAc,CAmBhB;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC9C,MAAM,CAMR"}
|
|
1
|
+
{"version":3,"file":"runner-result.d.ts","sourceRoot":"","sources":["../../../src/temporal/agentexecution/runner-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F,mEAAmE;AACnE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC9C,cAAc,CAmBhB;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC9C,MAAM,CAMR;AAED;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,WAAW,EAAE,MAAM;CAIhC"}
|
|
@@ -47,4 +47,19 @@ export function getErrorFromResult(result) {
|
|
|
47
47
|
const error = result["error"];
|
|
48
48
|
return typeof error === "string" ? error : "";
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The runner reported the turn FAILED (its result's phase), as opposed to
|
|
52
|
+
* the flow breaking around it. The runner has then already persisted the
|
|
53
|
+
* failed transcript with its own explanation rows (the runner's terminal
|
|
54
|
+
* table), so the workflow's failure-path status write carries phase and
|
|
55
|
+
* error only and adds no second explanation (stigmer#980). The message is
|
|
56
|
+
* the one the workflow always threw here, so the parent callback and the
|
|
57
|
+
* workflow failure read as before.
|
|
58
|
+
*/
|
|
59
|
+
export class RunnerReportedFailure extends Error {
|
|
60
|
+
constructor(runnerError) {
|
|
61
|
+
super(`agent execution failed: ${runnerError}`);
|
|
62
|
+
this.name = "RunnerReportedFailure";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
50
65
|
//# sourceMappingURL=runner-result.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-result.js","sourceRoot":"","sources":["../../../src/temporal/agentexecution/runner-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAK9F;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAA+C;IAE/C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC5C,OAAO,cAAc,CAAC,2BAA2B,CAAC;IACpD,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,oEAAoE;QACpE,qEAAqE;QACrE,eAAe;QACf,MAAM,KAAK,GAAI,cAA0C,CAAC,KAAK,CAAC,CAAC;QACjE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAuB,CAAC;QACjC,CAAC;QACD,OAAO,cAAc,CAAC,2BAA2B,CAAC;IACpD,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAuB,CAAC;IACjC,CAAC;IACD,OAAO,cAAc,CAAC,2BAA2B,CAAC;AACpD,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,kBAAkB,CAChC,MAA+C;IAE/C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC5C,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC"}
|
|
1
|
+
{"version":3,"file":"runner-result.js","sourceRoot":"","sources":["../../../src/temporal/agentexecution/runner-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,C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"","sources":["../../../../src/temporal/agentexecution/workflows/invoke-agent-execution.ts"],"names":[],"mappings":"AA+
|
|
1
|
+
{"version":3,"file":"invoke-agent-execution.d.ts","sourceRoot":"","sources":["../../../../src/temporal/agentexecution/workflows/invoke-agent-execution.ts"],"names":[],"mappings":"AA+HA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAoO9E,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,iCAAiC,GACvC,OAAO,CAAC,IAAI,CAAC,CA8Kf"}
|
|
@@ -31,6 +31,16 @@
|
|
|
31
31
|
* context): CANCELLED persist (quiet terminal, NO status.error —
|
|
32
32
|
* stigmer#282), callback completion with "execution cancelled", EC
|
|
33
33
|
* delete.
|
|
34
|
+
* - Stop and failure copy (stigmer#980): the runner cannot tell a Pause
|
|
35
|
+
* from a Cancel (both reach its activity as the same cancellation), so
|
|
36
|
+
* this workflow, which knows which stop it runs, writes the stop row
|
|
37
|
+
* (platform-rows.ts) and the merge keeps it last. When the runner
|
|
38
|
+
* reported the turn FAILED it already explained the failure in the
|
|
39
|
+
* transcript, so the failure-path write adds no lines; only a flow
|
|
40
|
+
* that broke without a runner verdict gets the platform's two lines.
|
|
41
|
+
* Both are payload changes to activities scheduled as before, pinned
|
|
42
|
+
* by the runner-failed, user-cancel and pause-resume replay
|
|
43
|
+
* histories.
|
|
34
44
|
* - Recovery is terminate-and-start-fresh ONLY (stigmer#200); no
|
|
35
45
|
* version gates (OD-6 — no Go-era history can replay here).
|
|
36
46
|
*
|
|
@@ -42,8 +52,9 @@
|
|
|
42
52
|
* WORKFLOW-BUNDLE IMPORT DISCIPLINE: this file runs in Temporal's
|
|
43
53
|
* deterministic sandbox. Only @temporalio/workflow, @temporalio/common,
|
|
44
54
|
* @bufbuild/protobuf, generated protos, and verified-pure domain modules
|
|
45
|
-
* (filereview/gate.js by DIRECT path —
|
|
46
|
-
* node:crypto) may be imported. The SDK bundler
|
|
55
|
+
* (filereview/gate.js and platform-rows.js by DIRECT path — gate.js's
|
|
56
|
+
* sibling digest.ts pulls node:crypto) may be imported. The SDK bundler
|
|
57
|
+
* hard-fails otherwise.
|
|
47
58
|
*/
|
|
48
59
|
import { create, fromJson, toJson } from "@bufbuild/protobuf";
|
|
49
60
|
import { ApplicationFailure, CancelledFailure, TimeoutFailure, TimeoutType, } from "@temporalio/common";
|
|
@@ -52,9 +63,10 @@ import { AgentExecutionSchema, AgentExecutionStatusSchema, } from "@stigmer/prot
|
|
|
52
63
|
import { ExecutionPhase, MessageType, } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
53
64
|
import { Harness } from "@stigmer/protos/ai/stigmer/agentic/session/v1/enum_pb";
|
|
54
65
|
import { hasDecidedAwaitingReconcile, unresolvedGateCount, } from "../../../domain/agentexecution/filereview/gate.js";
|
|
66
|
+
import { CANCEL_STOP_ROW, PAUSE_STOP_ROW, } from "../../../domain/agentexecution/platform-rows.js";
|
|
55
67
|
import { isWorkerShutdown, WORKER_SHUTDOWN_STATUS_ERROR, } from "../../runner-failure.js";
|
|
56
68
|
import { COMPLETE_EXTERNAL_ACTIVITY_NAME, DEFAULT_ACTIVITY_TASK_QUEUE, ENSURE_THREAD_ACTIVITY_NAME, EXECUTE_CURSOR_ACTIVITY_NAME, EXECUTE_DEEP_AGENT_ACTIVITY_NAME, GENERATE_SESSION_SUBJECT_ACTIVITY_NAME, LOAD_AGENT_EXECUTION_ACTIVITY_NAME, MEMO_ACTIVITY_TASK_QUEUE, READ_HARNESS_STATE_ID_ACTIVITY_NAME, SIGNAL_APPROVAL_GATE_RESOLVED, SIGNAL_CHILD_APPROVAL_REQUIRED, SIGNAL_CHILD_EXECUTION_STARTED, SIGNAL_PAUSE, SIGNAL_RESUME, UPDATE_EXECUTION_STATUS_ACTIVITY_NAME, } from "../names.js";
|
|
57
|
-
import { getErrorFromResult, getPhaseFromResult, } from "../runner-result.js";
|
|
69
|
+
import { getErrorFromResult, getPhaseFromResult, RunnerReportedFailure, } from "../runner-result.js";
|
|
58
70
|
import { DELETE_EXECUTION_CONTEXT_ACTIVITY_NAME } from "../../../domain/executioncontext/temporal/delete-execution-context.js";
|
|
59
71
|
// ─── Loop-safety bounds (invoke_workflow_impl.go, values are contract) ──
|
|
60
72
|
/** Maximum HITL approval iterations — prevents infinite loops. */
|
|
@@ -490,11 +502,14 @@ async function runWithPauseAndRecovery(options) {
|
|
|
490
502
|
executionId,
|
|
491
503
|
pauseCycle,
|
|
492
504
|
});
|
|
493
|
-
// Defense-in-depth
|
|
494
|
-
//
|
|
495
|
-
//
|
|
505
|
+
// Defense-in-depth for the phase (the Pause RPC already set PAUSED)
|
|
506
|
+
// and the one writer of the pause row: the runner settles its
|
|
507
|
+
// transcript without a row because it cannot tell this stop from a
|
|
508
|
+
// cancel, and the merge appends the row and keeps it last across
|
|
509
|
+
// the runner's settle write, whichever lands first (stigmer#980).
|
|
496
510
|
await persistFinalStatus(executionId, create(AgentExecutionStatusSchema, {
|
|
497
511
|
phase: ExecutionPhase.EXECUTION_PAUSED,
|
|
512
|
+
messages: [{ type: MessageType.MESSAGE_SYSTEM, content: PAUSE_STOP_ROW }],
|
|
498
513
|
}), "Failed to persist PAUSED status (non-fatal)");
|
|
499
514
|
await signals.consumeResume();
|
|
500
515
|
log.info("Resume signal received — restarting activity from checkpoint", {
|
|
@@ -564,7 +579,7 @@ async function runWithPauseAndRecovery(options) {
|
|
|
564
579
|
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
565
580
|
error: finalError,
|
|
566
581
|
}), "Failed to persist fallback FAILED status");
|
|
567
|
-
throw new
|
|
582
|
+
throw new RunnerReportedFailure(finalError);
|
|
568
583
|
}
|
|
569
584
|
return finalResult;
|
|
570
585
|
}
|
|
@@ -768,7 +783,11 @@ async function executeWithHitlLoop(options) {
|
|
|
768
783
|
* persist the honest platform-failure copy instead of raw Temporal
|
|
769
784
|
* internals ("Worker is shutting down and this activity did not complete
|
|
770
785
|
* in time" reached users in the 2026-08-08 incident, #776) — the raw text
|
|
771
|
-
* stays in the workflow log; status.error is a user surface.
|
|
786
|
+
* stays in the workflow log; status.error is a user surface. The two
|
|
787
|
+
* transcript lines are the platform's explanation, sent only when the
|
|
788
|
+
* flow broke without the runner's verdict: a RunnerReportedFailure's
|
|
789
|
+
* transcript already carries the runner's own (stigmer#980), and the
|
|
790
|
+
* merge appends these rather than replacing the transcript.
|
|
772
791
|
*/
|
|
773
792
|
async function updateStatusOnFailure(executionId, originalError) {
|
|
774
793
|
log.info("Updating execution status to FAILED", { executionId });
|
|
@@ -778,16 +797,18 @@ async function updateStatusOnFailure(executionId, originalError) {
|
|
|
778
797
|
const failedStatus = create(AgentExecutionStatusSchema, {
|
|
779
798
|
phase: ExecutionPhase.EXECUTION_FAILED,
|
|
780
799
|
error: statusError,
|
|
781
|
-
messages:
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
800
|
+
messages: originalError instanceof RunnerReportedFailure
|
|
801
|
+
? []
|
|
802
|
+
: [
|
|
803
|
+
{
|
|
804
|
+
type: MessageType.MESSAGE_SYSTEM,
|
|
805
|
+
content: "Internal system error occurred during execution. Please contact support if this issue persists.",
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
type: MessageType.MESSAGE_SYSTEM,
|
|
809
|
+
content: `Error details: ${statusError}`,
|
|
810
|
+
},
|
|
811
|
+
],
|
|
791
812
|
});
|
|
792
813
|
await failurePathActivities[UPDATE_EXECUTION_STATUS_ACTIVITY_NAME](executionId, toJson(AgentExecutionStatusSchema, failedStatus));
|
|
793
814
|
log.info("Updated execution status to FAILED", { executionId });
|
|
@@ -822,9 +843,10 @@ async function handleCancellation(executionId, callbackToken) {
|
|
|
822
843
|
* CANCELLED persist. Deliberately sets NO status.error: a user-initiated
|
|
823
844
|
* cancel is a quiet terminal state, not a failure (stigmer#282) — display
|
|
824
845
|
* layers key error styling on phase, so a sentinel here would render the
|
|
825
|
-
* stop as a red failure. The muted
|
|
826
|
-
*
|
|
827
|
-
*
|
|
846
|
+
* stop as a red failure. The muted stop row is the durable in-transcript
|
|
847
|
+
* marker, written only here (stigmer#980): the merge appends it and keeps
|
|
848
|
+
* it last across the runner's settle write. Regular activity for the same
|
|
849
|
+
* replay-safety reasons as updateStatusOnFailure.
|
|
828
850
|
*/
|
|
829
851
|
async function updateStatusOnCancellation(executionId) {
|
|
830
852
|
const cancelledStatus = create(AgentExecutionStatusSchema, {
|
|
@@ -832,7 +854,7 @@ async function updateStatusOnCancellation(executionId) {
|
|
|
832
854
|
messages: [
|
|
833
855
|
{
|
|
834
856
|
type: MessageType.MESSAGE_SYSTEM,
|
|
835
|
-
content:
|
|
857
|
+
content: CANCEL_STOP_ROW,
|
|
836
858
|
},
|
|
837
859
|
],
|
|
838
860
|
});
|