@agimon-ai/po-workflow 0.0.0-alpha.204 → 0.0.0-alpha.205
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.
|
@@ -4855,10 +4855,12 @@ async function createWorkflowTracker(config, warn = (message) => process.emitWar
|
|
|
4855
4855
|
async function mountWorkflowTracker(mount) {
|
|
4856
4856
|
const logger = mount.context.logger("po-workflow");
|
|
4857
4857
|
const tracker = await createWorkflowTracker(mount, (message) => logger.warn(message));
|
|
4858
|
-
const start = mount.agent?.registerHook({
|
|
4858
|
+
const start = mount.agent?.registerHook((0, _agimon_ai_po_core_extensionFile.defineHook)({
|
|
4859
|
+
name: "workflow-restore-dynamic-runs",
|
|
4860
|
+
description: "Discover interrupted dynamic workflows and enqueue prompts to resume them when the session starts.",
|
|
4859
4861
|
event: "session_start",
|
|
4860
4862
|
handle: (_event, execution) => tracker.start(execution)
|
|
4861
|
-
});
|
|
4863
|
+
}));
|
|
4862
4864
|
const stopInlineRuns = mount.context.on(_agimon_ai_po_core_delegation.PO_TEAM_INLINE_RUN_EVENT, (event) => tracker.inlineRun(event));
|
|
4863
4865
|
const stopInlineResume = mount.context.on(_agimon_ai_po_core_delegation.PO_TEAM_INLINE_RESUME_EVENT, (sessionId, promptHash) => tracker.previousInlineRun(sessionId, promptHash));
|
|
4864
4866
|
mount.context.inject([_agimon_ai_po_core_codemode.PO_CODEMODE_SERVICE], (scoped) => {
|
|
@@ -21343,22 +21345,28 @@ function createWorkflowServerRuntime(host, serverHost, runtime, resolveSecrets,
|
|
|
21343
21345
|
}
|
|
21344
21346
|
],
|
|
21345
21347
|
hooks: [
|
|
21346
|
-
{
|
|
21348
|
+
(0, _agimon_ai_po_core_extensionFile.defineHook)({
|
|
21349
|
+
name: "workflow-publish-lifecycle-after-tool",
|
|
21350
|
+
description: "Publish workflow runs and catalog updates and deliver completions after tool execution.",
|
|
21347
21351
|
event: "tool_execution_end",
|
|
21348
21352
|
handle: async (_event, executionContext) => {
|
|
21349
21353
|
await publishLifecycle(executionContext);
|
|
21350
21354
|
}
|
|
21351
|
-
},
|
|
21352
|
-
{
|
|
21355
|
+
}),
|
|
21356
|
+
(0, _agimon_ai_po_core_extensionFile.defineHook)({
|
|
21357
|
+
name: "workflow-release-session-control",
|
|
21358
|
+
description: "Release workflow control bindings and per-home controls when the session shuts down.",
|
|
21353
21359
|
event: "session_shutdown",
|
|
21354
21360
|
handle: disposeControl
|
|
21355
|
-
},
|
|
21356
|
-
{
|
|
21361
|
+
}),
|
|
21362
|
+
(0, _agimon_ai_po_core_extensionFile.defineHook)({
|
|
21363
|
+
name: "workflow-mark-agent-started",
|
|
21364
|
+
description: "Notify the workflow lifecycle that the agent has started.",
|
|
21357
21365
|
event: "agent_start",
|
|
21358
21366
|
handle: () => {
|
|
21359
21367
|
lifecycle?.agentStarted();
|
|
21360
21368
|
}
|
|
21361
|
-
}
|
|
21369
|
+
})
|
|
21362
21370
|
],
|
|
21363
21371
|
resources: [{
|
|
21364
21372
|
name: "workflow-session",
|
|
@@ -21909,16 +21917,44 @@ var route_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedCont
|
|
|
21909
21917
|
var workflow_launch_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) => context.root.commands?.[0], { cardinality: "optional" });
|
|
21910
21918
|
//#endregion
|
|
21911
21919
|
//#region src/extensions/workspaces/sessions/(backend)/hook/agent-settled.server.ts
|
|
21912
|
-
var agent_settled_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) =>
|
|
21920
|
+
var agent_settled_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((0, _agimon_ai_po_core_extensionFile.defineHook)((context) => {
|
|
21921
|
+
const hook = context.root.hooks?.[3];
|
|
21922
|
+
return hook === void 0 ? void 0 : {
|
|
21923
|
+
...hook,
|
|
21924
|
+
name: "workflow-delegate-optional-settle",
|
|
21925
|
+
description: "Delegate agent settling to the workflow runtime when it provides a settle handler."
|
|
21926
|
+
};
|
|
21927
|
+
}), { cardinality: "optional" });
|
|
21913
21928
|
//#endregion
|
|
21914
21929
|
//#region src/extensions/workspaces/sessions/(backend)/hook/agent-start.server.ts
|
|
21915
|
-
var agent_start_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) =>
|
|
21930
|
+
var agent_start_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((0, _agimon_ai_po_core_extensionFile.defineHook)((context) => {
|
|
21931
|
+
const hook = context.root.hooks?.[2];
|
|
21932
|
+
return hook === void 0 ? void 0 : {
|
|
21933
|
+
...hook,
|
|
21934
|
+
name: "workflow-mark-agent-started",
|
|
21935
|
+
description: "Notify the workflow lifecycle that the agent has started."
|
|
21936
|
+
};
|
|
21937
|
+
}), { cardinality: "optional" });
|
|
21916
21938
|
//#endregion
|
|
21917
21939
|
//#region src/extensions/workspaces/sessions/(backend)/hook/session-shutdown.server.ts
|
|
21918
|
-
var session_shutdown_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) =>
|
|
21940
|
+
var session_shutdown_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((0, _agimon_ai_po_core_extensionFile.defineHook)((context) => {
|
|
21941
|
+
const hook = context.root.hooks?.[1];
|
|
21942
|
+
return hook === void 0 ? void 0 : {
|
|
21943
|
+
...hook,
|
|
21944
|
+
name: "workflow-release-session-control",
|
|
21945
|
+
description: "Release workflow control bindings and per-home controls when the session shuts down."
|
|
21946
|
+
};
|
|
21947
|
+
}), { cardinality: "optional" });
|
|
21919
21948
|
//#endregion
|
|
21920
21949
|
//#region src/extensions/workspaces/sessions/(backend)/hook/tool-execution-end.server.ts
|
|
21921
|
-
var tool_execution_end_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((context) =>
|
|
21950
|
+
var tool_execution_end_server_default = (0, _agimon_ai_po_core_extensionFile.defineRoutedContribution)((0, _agimon_ai_po_core_extensionFile.defineHook)((context) => {
|
|
21951
|
+
const hook = context.root.hooks?.[0];
|
|
21952
|
+
return hook === void 0 ? void 0 : {
|
|
21953
|
+
...hook,
|
|
21954
|
+
name: "workflow-publish-lifecycle-after-tool",
|
|
21955
|
+
description: "Publish workflow runs and catalog updates and deliver completions after tool execution."
|
|
21956
|
+
};
|
|
21957
|
+
}), { cardinality: "optional" });
|
|
21922
21958
|
//#endregion
|
|
21923
21959
|
//#region src/extensions/workspaces/sessions/(backend)/resource/codemode-how-to-workflow.server.ts
|
|
21924
21960
|
var codemode_how_to_workflow_server_default = (0, _agimon_ai_po_core_extensionFile.defineResource)({
|