@agimon-ai/po-workflow 0.0.0-alpha.169 → 0.0.0-alpha.170

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 (37) hide show
  1. package/dist/contract-BpzJeyjh.mjs +33 -0
  2. package/dist/contract-BpzJeyjh.mjs.map +1 -0
  3. package/dist/contract-D80yV2d-.cjs +68 -0
  4. package/dist/contract-D80yV2d-.cjs.map +1 -0
  5. package/dist/extensions/native.mjs +24 -12
  6. package/dist/extensions/native.mjs.map +1 -1
  7. package/dist/extensions/server.cjs +600 -326
  8. package/dist/extensions/server.cjs.map +1 -1
  9. package/dist/extensions/server.mjs +601 -327
  10. package/dist/extensions/server.mjs.map +1 -1
  11. package/dist/extensions/web.mjs +65 -19
  12. package/dist/extensions/web.mjs.map +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.mts +3 -1
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/po-runtime-identity.json +1 -1
  18. package/dist/{type-0qB3eY2s.d.mts → type-PZ3Rbwwx.d.mts} +2 -2
  19. package/dist/{type-0qB3eY2s.d.mts.map → type-PZ3Rbwwx.d.mts.map} +1 -1
  20. package/dist/{workflowHost-Q25uuW-b.cjs → workflowHost-BZETMrK7.cjs} +9 -2
  21. package/dist/workflowHost-BZETMrK7.cjs.map +1 -0
  22. package/dist/{workflowHost-1H3qvh_Z.mjs → workflowHost-Btb8JrvA.mjs} +10 -3
  23. package/dist/workflowHost-Btb8JrvA.mjs.map +1 -0
  24. package/dist/workflowHost.cjs +2 -1
  25. package/dist/workflowHost.d.mts +14 -2
  26. package/dist/workflowHost.d.mts.map +1 -1
  27. package/dist/workflowHost.mjs +2 -2
  28. package/llms.txt +1 -1
  29. package/package.json +12 -12
  30. package/src/prompts/codemode-how-to-workflow/SKILL.md +21 -4
  31. package/src/prompts/help-how-to-workflow/SKILL.md +1 -1
  32. package/dist/contract-BNctH4rG.mjs +0 -9
  33. package/dist/contract-BNctH4rG.mjs.map +0 -1
  34. package/dist/contract-wO5MsRnu.cjs +0 -20
  35. package/dist/contract-wO5MsRnu.cjs.map +0 -1
  36. package/dist/workflowHost-1H3qvh_Z.mjs.map +0 -1
  37. package/dist/workflowHost-Q25uuW-b.cjs.map +0 -1
@@ -0,0 +1,33 @@
1
+ import { relative } from "node:path";
2
+ //#region src/services/workflowLibrary/index.ts
3
+ /** Bound at host scope by a host that keeps workflows outside the session's repository; a computer binds nothing. */
4
+ const PO_WORKFLOW_LIBRARY_SERVICE = "po/workflow-library";
5
+ const REPO_SOURCE = "repo";
6
+ function readWorkflowLibrary(context) {
7
+ return (context.get("po/workflow-library")?.sources ?? []).filter((entry) => entry.source !== REPO_SOURCE);
8
+ }
9
+ /** The library source a workflow file lives in, if any. */
10
+ function librarySourceOf(workflowPath, library) {
11
+ return library?.find((entry) => workflowPath.startsWith(`${entry.directory}/`));
12
+ }
13
+ /** The definition a workflow file names: its library source's when it lives in one, else the repository's. */
14
+ function workflowDefinitionRef(workflowPath, repoRoot, library) {
15
+ const owner = librarySourceOf(workflowPath, library) ?? {
16
+ source: REPO_SOURCE,
17
+ directory: repoRoot
18
+ };
19
+ return {
20
+ source: owner.source,
21
+ key: relative(owner.directory, workflowPath).split("\\").join("/")
22
+ };
23
+ }
24
+ //#endregion
25
+ //#region src/services/workflowHost/contract.ts
26
+ const PO_WORKFLOW_HOST_SERVICE = "po/workflow-host";
27
+ function readPoWorkflowHost(context) {
28
+ return context.get(PO_WORKFLOW_HOST_SERVICE);
29
+ }
30
+ //#endregion
31
+ export { readWorkflowLibrary as a, librarySourceOf as i, readPoWorkflowHost as n, workflowDefinitionRef as o, PO_WORKFLOW_LIBRARY_SERVICE as r, PO_WORKFLOW_HOST_SERVICE as t };
32
+
33
+ //# sourceMappingURL=contract-BpzJeyjh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-BpzJeyjh.mjs","names":[],"sources":["../src/services/workflowLibrary/index.ts","../src/services/workflowHost/contract.ts"],"sourcesContent":["import { relative } from 'node:path';\n\nimport type { PoWorkflowDefinitionRef, PoWorkflowDefinitionSource } from '@agimon-ai/po-core/workflow';\nimport type { Context } from '@deepseek-ai/cordis';\n\n/** Bound at host scope by a host that keeps workflows outside the session's repository; a computer binds nothing. */\nexport const PO_WORKFLOW_LIBRARY_SERVICE = 'po/workflow-library';\n\nconst REPO_SOURCE = 'repo';\n\n/**\n * Workflow folders beside the repository, such as Po Cloud's org and personal sets. Each folder is a named source, so a\n * run started from one is recorded and admitted by that source's name rather than as a path outside the repository.\n */\nexport interface WorkflowLibrary {\n readonly sources: readonly PoWorkflowDefinitionSource[];\n}\n\nexport function readWorkflowLibrary(context: Context): readonly PoWorkflowDefinitionSource[] {\n const library = context.get(PO_WORKFLOW_LIBRARY_SERVICE) as WorkflowLibrary | undefined;\n return (library?.sources ?? []).filter((entry) => entry.source !== REPO_SOURCE);\n}\n\n/** The library source a workflow file lives in, if any. */\nexport function librarySourceOf(\n workflowPath: string,\n library: readonly PoWorkflowDefinitionSource[] | undefined,\n): PoWorkflowDefinitionSource | undefined {\n return library?.find((entry) => workflowPath.startsWith(`${entry.directory}/`));\n}\n\n/** The definition a workflow file names: its library source's when it lives in one, else the repository's. */\nexport function workflowDefinitionRef(\n workflowPath: string,\n repoRoot: string,\n library?: readonly PoWorkflowDefinitionSource[],\n): PoWorkflowDefinitionRef {\n const owner = librarySourceOf(workflowPath, library) ?? { source: REPO_SOURCE, directory: repoRoot };\n return { source: owner.source, key: relative(owner.directory, workflowPath).split('\\\\').join('/') };\n}\n","import type { Context } from '@deepseek-ai/cordis';\n\nimport type { WorkflowHost } from './type';\n\nexport const PO_WORKFLOW_HOST_SERVICE = 'po/workflow-host';\n\nexport function readPoWorkflowHost(context: Context): WorkflowHost | undefined {\n return context.get(PO_WORKFLOW_HOST_SERVICE) as WorkflowHost | undefined;\n}\n\nexport function requirePoWorkflowHost(context: Context): WorkflowHost {\n const host = readPoWorkflowHost(context);\n if (host === undefined) throw new Error('The workflow host capability is not bound on this Cordis root.');\n return host;\n}\n"],"mappings":";;;AAMA,MAAa,8BAA8B;AAE3C,MAAM,cAAc;AAUpB,SAAgB,oBAAoB,SAAyD;CAE3F,QADgB,QAAQ,IAAA,qBACV,CAAC,EAAE,WAAW,CAAC,EAAA,CAAG,QAAQ,UAAU,MAAM,WAAW,WAAW;AAChF;;AAGA,SAAgB,gBACd,cACA,SACwC;CACxC,OAAO,SAAS,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,UAAU,EAAE,CAAC;AAChF;;AAGA,SAAgB,sBACd,cACA,UACA,SACyB;CACzB,MAAM,QAAQ,gBAAgB,cAAc,OAAO,KAAK;EAAE,QAAQ;EAAa,WAAW;CAAS;CACnG,OAAO;EAAE,QAAQ,MAAM;EAAQ,KAAK,SAAS,MAAM,WAAW,YAAY,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG;CAAE;AACpG;;;ACnCA,MAAa,2BAA2B;AAExC,SAAgB,mBAAmB,SAA4C;CAC7E,OAAO,QAAQ,IAAI,wBAAwB;AAC7C"}
@@ -0,0 +1,68 @@
1
+ let node_path = require("node:path");
2
+ //#region src/services/workflowLibrary/index.ts
3
+ /** Bound at host scope by a host that keeps workflows outside the session's repository; a computer binds nothing. */
4
+ const PO_WORKFLOW_LIBRARY_SERVICE = "po/workflow-library";
5
+ const REPO_SOURCE = "repo";
6
+ function readWorkflowLibrary(context) {
7
+ return (context.get("po/workflow-library")?.sources ?? []).filter((entry) => entry.source !== REPO_SOURCE);
8
+ }
9
+ /** The library source a workflow file lives in, if any. */
10
+ function librarySourceOf(workflowPath, library) {
11
+ return library?.find((entry) => workflowPath.startsWith(`${entry.directory}/`));
12
+ }
13
+ /** The definition a workflow file names: its library source's when it lives in one, else the repository's. */
14
+ function workflowDefinitionRef(workflowPath, repoRoot, library) {
15
+ const owner = librarySourceOf(workflowPath, library) ?? {
16
+ source: REPO_SOURCE,
17
+ directory: repoRoot
18
+ };
19
+ return {
20
+ source: owner.source,
21
+ key: (0, node_path.relative)(owner.directory, workflowPath).split("\\").join("/")
22
+ };
23
+ }
24
+ //#endregion
25
+ //#region src/services/workflowHost/contract.ts
26
+ const PO_WORKFLOW_HOST_SERVICE = "po/workflow-host";
27
+ function readPoWorkflowHost(context) {
28
+ return context.get(PO_WORKFLOW_HOST_SERVICE);
29
+ }
30
+ //#endregion
31
+ Object.defineProperty(exports, "PO_WORKFLOW_HOST_SERVICE", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return PO_WORKFLOW_HOST_SERVICE;
35
+ }
36
+ });
37
+ Object.defineProperty(exports, "PO_WORKFLOW_LIBRARY_SERVICE", {
38
+ enumerable: true,
39
+ get: function() {
40
+ return PO_WORKFLOW_LIBRARY_SERVICE;
41
+ }
42
+ });
43
+ Object.defineProperty(exports, "librarySourceOf", {
44
+ enumerable: true,
45
+ get: function() {
46
+ return librarySourceOf;
47
+ }
48
+ });
49
+ Object.defineProperty(exports, "readPoWorkflowHost", {
50
+ enumerable: true,
51
+ get: function() {
52
+ return readPoWorkflowHost;
53
+ }
54
+ });
55
+ Object.defineProperty(exports, "readWorkflowLibrary", {
56
+ enumerable: true,
57
+ get: function() {
58
+ return readWorkflowLibrary;
59
+ }
60
+ });
61
+ Object.defineProperty(exports, "workflowDefinitionRef", {
62
+ enumerable: true,
63
+ get: function() {
64
+ return workflowDefinitionRef;
65
+ }
66
+ });
67
+
68
+ //# sourceMappingURL=contract-D80yV2d-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-D80yV2d-.cjs","names":["relative"],"sources":["../src/services/workflowLibrary/index.ts","../src/services/workflowHost/contract.ts"],"sourcesContent":["import { relative } from 'node:path';\n\nimport type { PoWorkflowDefinitionRef, PoWorkflowDefinitionSource } from '@agimon-ai/po-core/workflow';\nimport type { Context } from '@deepseek-ai/cordis';\n\n/** Bound at host scope by a host that keeps workflows outside the session's repository; a computer binds nothing. */\nexport const PO_WORKFLOW_LIBRARY_SERVICE = 'po/workflow-library';\n\nconst REPO_SOURCE = 'repo';\n\n/**\n * Workflow folders beside the repository, such as Po Cloud's org and personal sets. Each folder is a named source, so a\n * run started from one is recorded and admitted by that source's name rather than as a path outside the repository.\n */\nexport interface WorkflowLibrary {\n readonly sources: readonly PoWorkflowDefinitionSource[];\n}\n\nexport function readWorkflowLibrary(context: Context): readonly PoWorkflowDefinitionSource[] {\n const library = context.get(PO_WORKFLOW_LIBRARY_SERVICE) as WorkflowLibrary | undefined;\n return (library?.sources ?? []).filter((entry) => entry.source !== REPO_SOURCE);\n}\n\n/** The library source a workflow file lives in, if any. */\nexport function librarySourceOf(\n workflowPath: string,\n library: readonly PoWorkflowDefinitionSource[] | undefined,\n): PoWorkflowDefinitionSource | undefined {\n return library?.find((entry) => workflowPath.startsWith(`${entry.directory}/`));\n}\n\n/** The definition a workflow file names: its library source's when it lives in one, else the repository's. */\nexport function workflowDefinitionRef(\n workflowPath: string,\n repoRoot: string,\n library?: readonly PoWorkflowDefinitionSource[],\n): PoWorkflowDefinitionRef {\n const owner = librarySourceOf(workflowPath, library) ?? { source: REPO_SOURCE, directory: repoRoot };\n return { source: owner.source, key: relative(owner.directory, workflowPath).split('\\\\').join('/') };\n}\n","import type { Context } from '@deepseek-ai/cordis';\n\nimport type { WorkflowHost } from './type';\n\nexport const PO_WORKFLOW_HOST_SERVICE = 'po/workflow-host';\n\nexport function readPoWorkflowHost(context: Context): WorkflowHost | undefined {\n return context.get(PO_WORKFLOW_HOST_SERVICE) as WorkflowHost | undefined;\n}\n\nexport function requirePoWorkflowHost(context: Context): WorkflowHost {\n const host = readPoWorkflowHost(context);\n if (host === undefined) throw new Error('The workflow host capability is not bound on this Cordis root.');\n return host;\n}\n"],"mappings":";;;AAMA,MAAa,8BAA8B;AAE3C,MAAM,cAAc;AAUpB,SAAgB,oBAAoB,SAAyD;CAE3F,QADgB,QAAQ,IAAA,qBACV,CAAC,EAAE,WAAW,CAAC,EAAA,CAAG,QAAQ,UAAU,MAAM,WAAW,WAAW;AAChF;;AAGA,SAAgB,gBACd,cACA,SACwC;CACxC,OAAO,SAAS,MAAM,UAAU,aAAa,WAAW,GAAG,MAAM,UAAU,EAAE,CAAC;AAChF;;AAGA,SAAgB,sBACd,cACA,UACA,SACyB;CACzB,MAAM,QAAQ,gBAAgB,cAAc,OAAO,KAAK;EAAE,QAAQ;EAAa,WAAW;CAAS;CACnG,OAAO;EAAE,QAAQ,MAAM;EAAQ,MAAA,GAAKA,UAAAA,SAAAA,CAAS,MAAM,WAAW,YAAY,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG;CAAE;AACpG;;;ACnCA,MAAa,2BAA2B;AAExC,SAAgB,mBAAmB,SAA4C;CAC7E,OAAO,QAAQ,IAAI,wBAAwB;AAC7C"}
@@ -66,12 +66,14 @@ function ownsRun(run, sessionId) {
66
66
  }
67
67
  function toneOf(run) {
68
68
  if (run.stage === "running") return run.executionState !== void 0 && PAUSED_STATES.has(run.executionState) ? "paused" : "running";
69
+ if (run.waiting) return "waiting";
69
70
  if (run.stage === "error") return "failed";
70
71
  if (run.outcome !== void 0 && run.outcome !== "success") return run.outcome === "failed" ? "failed" : "skipped";
71
72
  return "done";
72
73
  }
73
74
  function detailOf(run, tone) {
74
75
  if (tone === "paused") return "paused; resume it from the owning session";
76
+ if (tone === "waiting") return "waiting for your approval";
75
77
  if (tone === "failed") return run.errorMessage ?? (run.failedJob === void 0 ? "failed" : `job '${run.failedJob}' failed`);
76
78
  if (tone === "running") {
77
79
  if (run.position === void 0) return "starting";
@@ -105,6 +107,7 @@ function workflowActivityRows(runs, now, sessionId = null) {
105
107
  const GROUP_OF = {
106
108
  running: "running",
107
109
  paused: "running",
110
+ waiting: "running",
108
111
  failed: "failed",
109
112
  done: "successful",
110
113
  skipped: "successful"
@@ -815,6 +818,13 @@ const ACTIVE_STATES = /* @__PURE__ */ new Set([
815
818
  "paused"
816
819
  ]);
817
820
  function attentionFor(run) {
821
+ if (run.waiting) {
822
+ const step = activeSteps(run)[0]?.step.name ?? run.position?.step;
823
+ return {
824
+ kind: "waiting",
825
+ text: step === void 0 ? "the run is waiting for your approval" : `step "${step}" is waiting for your approval`
826
+ };
827
+ }
818
828
  if (run.stage === "error") {
819
829
  const cause = run.errorMessage ?? "the run ended in the error stage";
820
830
  return {
@@ -832,6 +842,7 @@ function attentionFor(run) {
832
842
  };
833
843
  }
834
844
  function runState(run) {
845
+ if (run.waiting) return "waiting";
835
846
  if (run.stage === "error") return "failed";
836
847
  if (run.executionState === "paused" || run.executionState === "pause_requested") return "paused";
837
848
  if (run.stage === "running") return "running";
@@ -845,6 +856,7 @@ function activeSteps(run) {
845
856
  })));
846
857
  }
847
858
  function runFilterOf(run) {
859
+ if (run.waiting) return "running";
848
860
  if (run.stage === "error" || run.outcome === "failed") return "failed";
849
861
  if (run.executionState === "paused" || run.executionState === "pause_requested") return "paused";
850
862
  if (run.stage === "running") return "running";
@@ -1219,7 +1231,7 @@ function ItemRow({ item, run, now, defaultExpanded, onOpenAgent }) {
1219
1231
  children: [/* @__PURE__ */ jsxs(Button, {
1220
1232
  variant: "link",
1221
1233
  size: "sm",
1222
- onPress: () => onOpenAgent(agent.runId),
1234
+ onPress: () => onOpenAgent(agent.runId, agent.session),
1223
1235
  accessibilityLabel: `Open ${phase.label} agent ${index + 1} transcript`,
1224
1236
  children: [
1225
1237
  "Agent ",
@@ -1665,7 +1677,7 @@ const FILTER = {
1665
1677
  };
1666
1678
  function Status({ state }) {
1667
1679
  return /* @__PURE__ */ jsx(StatusBadge, {
1668
- tone: state === "failed" || state === "error" ? "error" : state === "completed" || state === "success" ? "ok" : state === "paused" || state === "pause_requested" ? "accent" : state === "running" || state === "resumed" ? "running" : "neutral",
1680
+ tone: state === "failed" || state === "error" ? "error" : state === "completed" || state === "success" ? "ok" : state === "paused" || state === "pause_requested" || state === "waiting" ? "accent" : state === "running" || state === "resumed" ? "running" : "neutral",
1669
1681
  children: state
1670
1682
  });
1671
1683
  }
@@ -1810,7 +1822,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
1810
1822
  const visibleRuns = runs.filter((item) => runSearchText(item).includes(search.trim().toLowerCase()) && (filter === FILTER.all || filter === FILTER.running && ["running", "paused"].includes(runFilterOf(item)) || filter === FILTER.failed && runFilterOf(item) === "failed" || filter === FILTER.done && runFilterOf(item) === "done"));
1811
1823
  const active = run ? activeSteps(run) : [];
1812
1824
  const attention = run ? attentionFor(run) : void 0;
1813
- const attentionText = attention?.kind === "paused" ? "Waiting to be resumed." : run?.errorMessage ?? run?.staleReason ?? (attention?.kind === "stale" ? "This run is no longer reporting progress." : attention?.text);
1825
+ const attentionText = attention?.kind === "paused" ? "Waiting to be resumed." : attention?.kind === "waiting" ? `${attention.text.charAt(0).toUpperCase()}${attention.text.slice(1)}.` : run?.errorMessage ?? run?.staleReason ?? (attention?.kind === "stale" ? "This run is no longer reporting progress." : attention?.text);
1814
1826
  const List = sheet ? SheetList : FlatList;
1815
1827
  const header = /* @__PURE__ */ jsxs(Fragment, { children: [
1816
1828
  dockHeader,
@@ -1844,11 +1856,11 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
1844
1856
  ]
1845
1857
  }) : null,
1846
1858
  attention ? /* @__PURE__ */ jsxs(View, {
1847
- style: [styles$7.attention, attention.kind === "paused" ? styles$7.ask : styles$7.failure],
1859
+ style: [styles$7.attention, attention.kind === "paused" || attention.kind === "waiting" ? styles$7.ask : styles$7.failure],
1848
1860
  children: [
1849
1861
  /* @__PURE__ */ jsx(Text, {
1850
1862
  style: styles$7.heading,
1851
- children: attention.kind === "error" ? "Run failed" : attention.kind === "stale" ? "Progress stopped" : "Paused"
1863
+ children: attention.kind === "error" ? "Run failed" : attention.kind === "stale" ? "Progress stopped" : attention.kind === "waiting" ? "Waiting for your approval" : "Paused"
1852
1864
  }),
1853
1865
  /* @__PURE__ */ jsx(Text, {
1854
1866
  style: styles$7.body,
@@ -1856,7 +1868,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
1856
1868
  }),
1857
1869
  /* @__PURE__ */ jsx(Text, {
1858
1870
  style: styles$7.meta,
1859
- children: attention.kind === "paused" ? "Ask the agent in this conversation to resume it." : "Ask the agent in this conversation to diagnose or recover it."
1871
+ children: attention.kind === "paused" ? "Ask the agent in this conversation to resume it." : attention.kind === "waiting" ? "It carries on once you answer." : "Ask the agent in this conversation to diagnose or recover it."
1860
1872
  })
1861
1873
  ]
1862
1874
  }) : null,
@@ -1866,7 +1878,7 @@ function WorkflowDockView({ run, runs, now, sheet = false, dockHeader, artifacts
1866
1878
  }), active.map(({ job, step }) => /* @__PURE__ */ jsx(ListRow, {
1867
1879
  title: step.name,
1868
1880
  description: [job, step.group ? `∥ ${step.group}` : void 0].filter(Boolean).join(" · "),
1869
- leading: /* @__PURE__ */ jsx(Dot, { tone: step.status === "running" || step.status === "resumed" ? "yellow" : "magenta" }),
1881
+ leading: /* @__PURE__ */ jsx(Dot, { tone: !run?.waiting && (step.status === "running" || step.status === "resumed") ? "yellow" : "magenta" }),
1870
1882
  trailing: /* @__PURE__ */ jsx(Duration, {
1871
1883
  start: step.startedAt,
1872
1884
  end: step.endedAt,
@@ -3322,11 +3334,11 @@ function dynamicWorkflowTab() {
3322
3334
  retainComposer: true
3323
3335
  };
3324
3336
  }
3325
- function workflowAgentTab(runId) {
3337
+ function workflowAgentTab(runId, session) {
3326
3338
  return {
3327
3339
  id: `dynamic-workflow-agent-${encodeURIComponent(runId)}`,
3328
3340
  label: "Agent transcript",
3329
- panel: ({ renderThread }) => /* @__PURE__ */ jsx(Fragment, { children: renderThread(runId) }),
3341
+ panel: ({ renderThread, renderSessionTranscript }) => /* @__PURE__ */ jsx(Fragment, { children: session ? renderSessionTranscript?.(runId) : renderThread(runId) }),
3330
3342
  retainComposer: true
3331
3343
  };
3332
3344
  }
@@ -3341,8 +3353,8 @@ function DynamicWorkflowPanel({ sessionId, openTransientTab }) {
3341
3353
  const snapshot = useDynamicWorkflows(sessionId);
3342
3354
  return /* @__PURE__ */ jsx(DynamicWorkflowView, {
3343
3355
  runs: snapshot?.runs ?? EMPTY_RUNS,
3344
- onOpenAgent: (runId) => {
3345
- if (sessionId !== null) openTransientTab(workflowAgentTab(runId));
3356
+ onOpenAgent: (runId, session) => {
3357
+ if (sessionId !== null) openTransientTab(workflowAgentTab(runId, session));
3346
3358
  }
3347
3359
  });
3348
3360
  }
@@ -3370,7 +3382,7 @@ function WorkflowsActivitySection({ sessionId, openSession, openTransientTab })
3370
3382
  group.rows.length
3371
3383
  ]
3372
3384
  }), open ? group.rows.map((row) => /* @__PURE__ */ jsx(ListRow, {
3373
- leading: /* @__PURE__ */ jsx(Dot, { tone: row.tone === "failed" ? "red" : row.tone === "running" || row.tone === "paused" ? "yellow" : row.tone === "done" ? "green" : "muted" }),
3385
+ leading: /* @__PURE__ */ jsx(Dot, { tone: row.tone === "failed" ? "red" : row.tone === "waiting" ? "magenta" : row.tone === "running" || row.tone === "paused" ? "yellow" : row.tone === "done" ? "green" : "muted" }),
3374
3386
  title: /* @__PURE__ */ jsx(Button, {
3375
3387
  variant: "ghost",
3376
3388
  testID: `activity-workflow-${row.runKey}`,