@frontmcp/sdk 1.9.3 → 1.9.4
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/agent/agent-builtin-tools.d.ts +75 -0
- package/agent/agent-builtin-tools.d.ts.map +1 -0
- package/agent/agent-execution-loop.d.ts +24 -1
- package/agent/agent-execution-loop.d.ts.map +1 -1
- package/agent/agent.instance.d.ts +15 -9
- package/agent/agent.instance.d.ts.map +1 -1
- package/agent/agent.scope.d.ts +3 -1
- package/agent/agent.scope.d.ts.map +1 -1
- package/agent/flows/call-agent.flow.d.ts +3 -1
- package/agent/flows/call-agent.flow.d.ts.map +1 -1
- package/agent/hooks/agent.hooks.d.ts +4 -4
- package/browser/index.cjs +3772 -2974
- package/browser/index.mjs +3341 -2544
- package/common/dynamic/dynamic.plugin.d.ts +5 -0
- package/common/dynamic/dynamic.plugin.d.ts.map +1 -1
- package/common/entries/workflow.entry.d.ts +2 -0
- package/common/entries/workflow.entry.d.ts.map +1 -1
- package/common/interfaces/agent.interface.d.ts +22 -2
- package/common/interfaces/agent.interface.d.ts.map +1 -1
- package/common/interfaces/execution-context.interface.d.ts +6 -2
- package/common/interfaces/execution-context.interface.d.ts.map +1 -1
- package/common/interfaces/flow.interface.d.ts +12 -0
- package/common/interfaces/flow.interface.d.ts.map +1 -1
- package/common/metadata/agent.metadata.d.ts +22 -8
- package/common/metadata/agent.metadata.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +28 -1
- package/common/metadata/app.metadata.d.ts.map +1 -1
- package/common/metadata/front-mcp.metadata.d.ts +226 -3
- package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
- package/common/metadata/ui-serving-mode.d.ts +30 -0
- package/common/metadata/ui-serving-mode.d.ts.map +1 -0
- package/common/schemas/annotated-class.schema.d.ts +1 -1
- package/common/tokens/app.tokens.d.ts.map +1 -1
- package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
- package/common/types/options/session/interfaces.d.ts +16 -24
- package/common/types/options/session/interfaces.d.ts.map +1 -1
- package/common/types/options/session/schema.d.ts +29 -0
- package/common/types/options/session/schema.d.ts.map +1 -1
- package/common/types/options/transport/interfaces.d.ts +29 -16
- package/common/types/options/transport/interfaces.d.ts.map +1 -1
- package/common/types/options/transport/schema.d.ts +2 -0
- package/common/types/options/transport/schema.d.ts.map +1 -1
- package/context/frontmcp-context-storage.d.ts +3 -2
- package/context/frontmcp-context-storage.d.ts.map +1 -1
- package/context/frontmcp-context.d.ts +4 -4
- package/direct/client.types.d.ts +10 -0
- package/direct/client.types.d.ts.map +1 -1
- package/direct/create.d.ts.map +1 -1
- package/direct/create.types.d.ts +4 -1
- package/direct/create.types.d.ts.map +1 -1
- package/direct/direct-server.d.ts +4 -2
- package/direct/direct-server.d.ts.map +1 -1
- package/direct/direct.types.d.ts +41 -0
- package/direct/direct.types.d.ts.map +1 -1
- package/direct/index.d.ts +1 -1
- package/direct/index.d.ts.map +1 -1
- package/errors/error-handler.d.ts.map +1 -1
- package/errors/mcp.error.d.ts +6 -0
- package/errors/mcp.error.d.ts.map +1 -1
- package/esm/index.mjs +3346 -2549
- package/flows/flow.instance.d.ts.map +1 -1
- package/flows/flow.registry.d.ts.map +1 -1
- package/flows/resolved-entries.d.ts +2 -0
- package/flows/resolved-entries.d.ts.map +1 -1
- package/front-mcp/front-mcp.d.ts +5 -2
- package/front-mcp/front-mcp.d.ts.map +1 -1
- package/hooks/entry-class-hooks.d.ts +8 -6
- package/hooks/entry-class-hooks.d.ts.map +1 -1
- package/hooks/hooks.utils.d.ts +12 -2
- package/hooks/hooks.utils.d.ts.map +1 -1
- package/index.d.ts +13 -5
- package/index.d.ts.map +1 -1
- package/index.js +3784 -2986
- package/job/execution/job-execution.manager.d.ts +12 -4
- package/job/execution/job-execution.manager.d.ts.map +1 -1
- package/job/flows/execute-job.flow.d.ts +124 -0
- package/job/flows/execute-job.flow.d.ts.map +1 -0
- package/job/index.d.ts +3 -0
- package/job/index.d.ts.map +1 -1
- package/job/job-attempt.d.ts +91 -0
- package/job/job-attempt.d.ts.map +1 -0
- package/job/job-scope.helper.d.ts +3 -0
- package/job/job-scope.helper.d.ts.map +1 -1
- package/job/job.instance.d.ts.map +1 -1
- package/job/job.utils.d.ts +0 -6
- package/job/job.utils.d.ts.map +1 -1
- package/package.json +10 -10
- package/plugin/plugin.registry.d.ts +2 -1
- package/plugin/plugin.registry.d.ts.map +1 -1
- package/prompt/flows/get-prompt.flow.d.ts +9 -3
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/prompt/flows/prompts-list.flow.d.ts +4 -1
- package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +3 -1
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/scope/scope.instance.d.ts.map +1 -1
- package/tool/flows/call-tool.flow.d.ts +3 -1
- package/tool/flows/call-tool.flow.d.ts.map +1 -1
- package/tool/tool.utils.d.ts +2 -0
- package/tool/tool.utils.d.ts.map +1 -1
- package/tool/ui/serving-mode-default.d.ts +24 -0
- package/tool/ui/serving-mode-default.d.ts.map +1 -0
- package/tool/ui/ui-option-warnings.d.ts +8 -0
- package/tool/ui/ui-option-warnings.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts +6 -0
- package/transport/in-memory-server.d.ts.map +1 -1
- package/transport/session-mode.check.d.ts +15 -5
- package/transport/session-mode.check.d.ts.map +1 -1
- package/transport/transport.registry.d.ts +16 -1
- package/transport/transport.registry.d.ts.map +1 -1
- package/workflow/engine/workflow-step.executor.d.ts +13 -2
- package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
- package/workflow/engine/workflow.engine.d.ts.map +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EntryLineage, ScopeEntry, ToolEntry, WidgetServingMode } from '../../common';
|
|
2
|
+
/** The parts of a tool the serving-mode lookup reads. */
|
|
3
|
+
type ServingModeTool = Pick<ToolEntry, 'metadata' | 'owner'>;
|
|
4
|
+
/** What the serving-mode lookup reads from a scope: its metadata, its apps and its tools' lineage. */
|
|
5
|
+
export interface ServingModeScope<Tool extends ServingModeTool = ToolEntry> {
|
|
6
|
+
readonly metadata: Pick<ScopeEntry['metadata'], 'ui'>;
|
|
7
|
+
readonly apps: Pick<ScopeEntry['apps'], 'getApps'>;
|
|
8
|
+
readonly tools: {
|
|
9
|
+
lineageOf(entry: Tool): EntryLineage | undefined;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The serving mode `tool`'s widget uses (#720): its own `ui.servingMode`, else its app's
|
|
14
|
+
* `@App({ ui: { servingMode } })`, else the server's `@FrontMcp({ ui: { servingMode } })`, else
|
|
15
|
+
* `'auto'`. `tools/call` (the `applyUI` stage) and the widget pre-compilation at startup both read
|
|
16
|
+
* it, so a tool is rendered and served by the same mode.
|
|
17
|
+
*
|
|
18
|
+
* @param tool - A tool with a `ui` config
|
|
19
|
+
* @param scope - The scope serving it
|
|
20
|
+
* @returns The configured serving mode, before platform resolution
|
|
21
|
+
*/
|
|
22
|
+
export declare function toolServingMode<Tool extends ServingModeTool>(tool: Tool, scope: ServingModeScope<Tool>): WidgetServingMode;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=serving-mode-default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serving-mode-default.d.ts","sourceRoot":"","sources":["../../../src/tool/ui/serving-mode-default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAI3F,yDAAyD;AACzD,KAAK,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAE7D,sGAAsG;AACtG,MAAM,WAAW,gBAAgB,CAAC,IAAI,SAAS,eAAe,GAAG,SAAS;IACxE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;IACtD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,YAAY,GAAG,SAAS,CAAA;KAAE,CAAC;CACtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,SAAS,eAAe,EAC1D,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAC5B,iBAAiB,CAQnB"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
/** Describe the parts of a tool's `ui` config that have no effect, one message per problem. */
|
|
2
2
|
export declare function describeIgnoredUiOptions(toolName: string, ui: Record<string, unknown> | undefined): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Describe a server or app `ui.servingMode` default (#720) that does not do what its name says,
|
|
5
|
+
* once for every tool that inherits it rather than once per tool.
|
|
6
|
+
*
|
|
7
|
+
* @param owner - Where the default is set, e.g. "`@FrontMcp({ ui })`"
|
|
8
|
+
* @param mode - The default, if set
|
|
9
|
+
*/
|
|
10
|
+
export declare function describeServingModeDefault(owner: string, mode: string | undefined): string[];
|
|
3
11
|
//# sourceMappingURL=ui-option-warnings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-option-warnings.d.ts","sourceRoot":"","sources":["../../../src/tool/ui/ui-option-warnings.ts"],"names":[],"mappings":"AAmBA,+FAA+F;AAC/F,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CA6B5G"}
|
|
1
|
+
{"version":3,"file":"ui-option-warnings.d.ts","sourceRoot":"","sources":["../../../src/tool/ui/ui-option-warnings.ts"],"names":[],"mappings":"AAmBA,+FAA+F;AAC/F,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CA6B5G;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAY5F"}
|
|
@@ -14,6 +14,12 @@ export interface CreateInMemoryServerOptions {
|
|
|
14
14
|
authInfo?: Partial<AuthInfo>;
|
|
15
15
|
/** Custom session ID (auto-generated if not provided) */
|
|
16
16
|
sessionId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Platform bindings for every request of this connection, read by the code it runs as
|
|
19
|
+
* `this.workerEnv` (on Cloudflare, the `env` of the Worker or Durable Object holding the client).
|
|
20
|
+
* Kept in each request's context only — never copied into `process.env`.
|
|
21
|
+
*/
|
|
22
|
+
workerEnv?: Readonly<Record<string, unknown>>;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* Result from creating an in-memory server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-server.d.ts","sourceRoot":"","sources":["../../src/transport/in-memory-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMnE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"in-memory-server.d.ts","sourceRoot":"","sources":["../../src/transport/in-memory-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMnE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,eAAe,EAAE,SAAS,CAAC;IAC3B,4CAA4C;IAC5C,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACnD,sCAAsC;IACtC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,oBAAoB,CAAC,CA6G/B"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Warn at startup when
|
|
2
|
+
* Warn at startup when a session option asks for something the server does not do (#678, #702).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* - `transport.sessionMode`: nothing reads it since v1.0 — whether the server keeps sessions follows
|
|
5
|
+
* `transport.protocol` (`'stateless-api'` serves without sessions). `'stateless'` (or a function)
|
|
6
|
+
* used to be ignored silently. `'stateful'`, the default, matches what the session-based protocols
|
|
7
|
+
* do and is left alone.
|
|
8
|
+
* - `session` (the pre-1.0 `@FrontMcp({ session })` option, replaced by `transport`): nothing reads
|
|
9
|
+
* it either. `session.sessionMode` is checked like `transport.sessionMode`, and
|
|
10
|
+
* `session.platformDetection` belongs in `transport.platformDetection`.
|
|
11
|
+
*
|
|
12
|
+
* Both stay accepted through 1.x (no behavior change) and are removed in the next major.
|
|
8
13
|
*/
|
|
9
14
|
export declare function warnIfSessionModeIgnored(options: {
|
|
10
15
|
logger: {
|
|
@@ -14,5 +19,10 @@ export declare function warnIfSessionModeIgnored(options: {
|
|
|
14
19
|
sessionMode?: unknown;
|
|
15
20
|
protocol?: unknown;
|
|
16
21
|
};
|
|
22
|
+
/** The deprecated top-level `session` option, accepted only to warn about it */
|
|
23
|
+
session?: {
|
|
24
|
+
sessionMode?: unknown;
|
|
25
|
+
platformDetection?: unknown;
|
|
26
|
+
};
|
|
17
27
|
}): void;
|
|
18
28
|
//# sourceMappingURL=session-mode.check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-mode.check.d.ts","sourceRoot":"","sources":["../../src/transport/session-mode.check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session-mode.check.d.ts","sourceRoot":"","sources":["../../src/transport/session-mode.check.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,EAAE;QAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACxC,SAAS,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC1D,gFAAgF;IAChF,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAClE,GAAG,IAAI,CA8BP"}
|
|
@@ -81,6 +81,10 @@ export declare class TransportService {
|
|
|
81
81
|
private readonly relinquishing;
|
|
82
82
|
/** Local sessions whose stored record this node wrote or read: a missing record means the session ended. */
|
|
83
83
|
private readonly storedLocalSessions;
|
|
84
|
+
/** How long the per-request check of a session held in memory waits for the session store. */
|
|
85
|
+
private readonly sessionCheckTimeoutMs;
|
|
86
|
+
/** Session-store reads of the per-request check that have not settled yet, by read and session. */
|
|
87
|
+
private readonly pendingSessionChecks;
|
|
84
88
|
/**
|
|
85
89
|
* Redis key prefix under which session records are stored.
|
|
86
90
|
* The session store appends `session:` to the transport key prefix.
|
|
@@ -176,9 +180,20 @@ export declare class TransportService {
|
|
|
176
180
|
/**
|
|
177
181
|
* Outside distributed mode several instances may hold one session in memory (#713). A session whose
|
|
178
182
|
* stored record this instance wrote or read is gone was deleted through another instance, or expired:
|
|
179
|
-
* it is dropped here too. When the store cannot be read
|
|
183
|
+
* it is dropped here too. When the store cannot be read, or does not answer within
|
|
184
|
+
* `persistence.sessionCheckTimeoutMs`, the session is served here.
|
|
180
185
|
*/
|
|
181
186
|
private isStillStored;
|
|
187
|
+
/**
|
|
188
|
+
* Bound a session-store read made while serving a session held in memory. A store that accepts the
|
|
189
|
+
* connection but never answers (a paused Redis, a partition that does not reset TCP) would otherwise
|
|
190
|
+
* hold the request open: the read rejects after `persistence.sessionCheckTimeoutMs` instead, so the
|
|
191
|
+
* caller takes its "store unreadable" path and serves the session from memory.
|
|
192
|
+
*
|
|
193
|
+
* The timer does not cancel the read. While one is unanswered, later requests for the same session
|
|
194
|
+
* wait on it rather than send another, so a silent store never accumulates a backlog of commands.
|
|
195
|
+
*/
|
|
196
|
+
private withSessionCheckTimeout;
|
|
182
197
|
/** Whether a node's heartbeat is present (`true` when liveness cannot be determined). */
|
|
183
198
|
private isNodeAlive;
|
|
184
199
|
/** Re-advertise a session this node serves, so its bus entry does not expire under it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.registry.d.ts","sourceRoot":"","sources":["../../src/transport/transport.registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKlE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAIhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAQtC,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAIhB,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.registry.d.ts","sourceRoot":"","sources":["../../src/transport/transport.registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKlE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAIhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAQtC,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAIhB,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;AAqB3B,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsC;IAC7D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAE9B;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IACjE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;IAE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AAG,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5G;;;OAGG;IACG,0CAA0C,CAC9C,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,WAAW,CAAC;IAuBvB;;;;;;;;;;;;OAYG;IACH,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAMjF;;;OAGG;IACG,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkBrG,OAAO,CAAC,MAAM;IAId;;;OAGG;IACH,OAAO,CAAC,cAAc;IAItB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;IA0DnB,OAAO,CAAC,UAAU;CAmBnB"}
|
|
@@ -6,7 +6,7 @@ import { type JobRegistryInterface } from '../../job/job.registry';
|
|
|
6
6
|
export interface WorkflowStepExecutorExtra {
|
|
7
7
|
authInfo: Partial<Record<string, unknown>>;
|
|
8
8
|
contextProviders?: unknown;
|
|
9
|
-
/** The run's request context; each step's
|
|
9
|
+
/** The run's request context; each step's attempts run their `jobs:execute-job` flow in it (#705, #700). */
|
|
10
10
|
context?: FrontMcpContext;
|
|
11
11
|
/**
|
|
12
12
|
* The scope's authorities context builder, so a step's permission check
|
|
@@ -14,9 +14,15 @@ export interface WorkflowStepExecutorExtra {
|
|
|
14
14
|
* second, divergent notion of where roles live.
|
|
15
15
|
*/
|
|
16
16
|
authoritiesContextBuilder?: AuthoritiesContextBuilder;
|
|
17
|
+
/** The workflow the steps belong to, as hooks on `jobs:execute-job` see it in `state.workflow`. */
|
|
18
|
+
workflowName?: string;
|
|
19
|
+
/** The workflow run the steps belong to, as hooks on `jobs:execute-job` see it in `state.workflow`. */
|
|
20
|
+
workflowRunId?: string;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
|
-
* Executes a single workflow step by resolving the job and running it
|
|
23
|
+
* Executes a single workflow step by resolving the job and running each attempt of it through the
|
|
24
|
+
* `jobs:execute-job` flow, which checks the STEP JOB's own permissions (GHSA-58v2-gpcc-jmqv) and runs
|
|
25
|
+
* every hook on that flow (#700).
|
|
20
26
|
*/
|
|
21
27
|
export declare class WorkflowStepExecutor {
|
|
22
28
|
private readonly jobRegistry;
|
|
@@ -24,6 +30,11 @@ export declare class WorkflowStepExecutor {
|
|
|
24
30
|
private readonly extra;
|
|
25
31
|
constructor(jobRegistry: JobRegistryInterface, logger: FrontMcpLogger, extra: WorkflowStepExecutorExtra);
|
|
26
32
|
executeStep(step: WorkflowStep, input: Record<string, unknown>): Promise<WorkflowStepResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Run one attempt, racing a timer. The timer does NOT cancel a job that already started; it rejects
|
|
35
|
+
* the attempt early and aborts its flow, so an attempt still building its providers or loading its
|
|
36
|
+
* auth when it times out never starts the job.
|
|
37
|
+
*/
|
|
27
38
|
private executeWithTimeout;
|
|
28
39
|
}
|
|
29
40
|
//# sourceMappingURL=workflow-step.executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step.executor.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow-step.executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-step.executor.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow-step.executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4GAA4G;IAC5G,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4B;gBAEtC,WAAW,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,yBAAyB;IAMjG,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAmClG;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;CAsC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.engine.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow.engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAwB,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAEhG;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;gBAGtC,QAAQ,EAAE,gBAAgB,EAC1B,WAAW,EAAE,oBAAoB,EACjC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,yBAAyB;
|
|
1
|
+
{"version":3,"file":"workflow.engine.d.ts","sourceRoot":"","sources":["../../../src/workflow/engine/workflow.engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAwB,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAEhG;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;IACpD,O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