@wichayutdew/pi-workflows 3.2.0 → 3.3.0

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/index.js CHANGED
@@ -3144,10 +3144,11 @@ function formatWorkflowProgressStatus(snapshot, statusShortcutLabel) {
3144
3144
  const { run, workflow } = snapshot;
3145
3145
  const currentStep = formatStepName(stepTitle(workflow, run.currentStepId), run.currentStepId);
3146
3146
  const activity = run.status === "awaiting-gate" ? "awaiting review" : "working";
3147
+ const workerModel = snapshot.execution?.kind === "subagent" && snapshot.execution.model ? ` · model ${snapshot.execution.model}` : "";
3147
3148
  const workerProgress = snapshot.execution?.kind === "subagent" ? ` · ${snapshot.execution.progress}` : "";
3148
3149
  const usage = workflowUsage(run);
3149
3150
  const usageText = usage.models.length > 0 ? ` · ${formatUsage(usage)}` : "";
3150
- return `${workflowStatusIcon(run, snapshot.now)} ${run.workflowId} · step ${currentStep} · ${activity}${workerProgress}${usageText} · ${statusShortcutLabel}`;
3151
+ return `${workflowStatusIcon(run, snapshot.now)} ${run.workflowId} · step ${currentStep} · ${activity}${workerModel}${workerProgress}${usageText} · ${statusShortcutLabel}`;
3151
3152
  }
3152
3153
  // src/workflow-status/view.ts
3153
3154
  import {
@@ -3315,6 +3316,7 @@ function renderLiveWorkerSession(theme, snapshot, detail, width) {
3315
3316
  "",
3316
3317
  theme.bold(theme.fg("accent", "Live Worker Session")),
3317
3318
  ...keyValueLines(theme, "worker", snapshot.execution.agent, width, "accent"),
3319
+ ...snapshot.execution.model ? keyValueLines(theme, "model", snapshot.execution.model, width, "muted") : [],
3318
3320
  ...keyValueLines(theme, "state", snapshot.execution.progress, width, "accent"),
3319
3321
  "",
3320
3322
  theme.bold(theme.fg("accent", "● Input prompt")),
@@ -4422,7 +4424,8 @@ function workflowStatusSnapshot() {
4422
4424
  agent: this.activeDelegation.agent,
4423
4425
  requestId: this.activeDelegation.requestId,
4424
4426
  progress: this.activeDelegation.progress ?? "starting",
4425
- activityLog: this.activeDelegation.activityLog ?? []
4427
+ activityLog: this.activeDelegation.activityLog ?? [],
4428
+ ...this.activeDelegation.model ? { model: this.activeDelegation.model } : {}
4426
4429
  };
4427
4430
  } else if (this.mainSteps.activeStepId) {
4428
4431
  execution = { kind: "main" };
@@ -6693,7 +6696,8 @@ function createDelegationPlan(input, dependencies) {
6693
6696
  resultDirectory: workspace.resultDirectory,
6694
6697
  policy,
6695
6698
  transcriptTask: task,
6696
- agent
6699
+ agent,
6700
+ ...agentProfile.model ? { model: agentProfile.model } : {}
6697
6701
  };
6698
6702
  const request = {
6699
6703
  version: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wichayutdew/pi-workflows",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "A declarative, pauseable workflow harness for Pi",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -205,6 +205,7 @@ export function createDelegationPlan(
205
205
  policy,
206
206
  transcriptTask: task,
207
207
  agent,
208
+ ...(agentProfile.model ? { model: agentProfile.model } : {}),
208
209
  };
209
210
  const request: SubagentDelegationRequest = {
210
211
  version: 1,
@@ -64,6 +64,9 @@ function workflowStatusSnapshot(
64
64
  requestId: this.activeDelegation.requestId,
65
65
  progress: this.activeDelegation.progress ?? 'starting',
66
66
  activityLog: this.activeDelegation.activityLog ?? [],
67
+ ...(this.activeDelegation.model
68
+ ? { model: this.activeDelegation.model }
69
+ : {}),
67
70
  };
68
71
  } else if (this.mainSteps.activeStepId) {
69
72
  execution = { kind: 'main' };
@@ -11,6 +11,7 @@ export type ActiveDelegation = {
11
11
  policy: ChildStepPolicy;
12
12
  transcriptTask: string;
13
13
  agent: string;
14
+ model?: string;
14
15
  progress?: string;
15
16
  activityLog?: Array<string>;
16
17
  cancelling?: boolean;
@@ -27,13 +27,17 @@ export function formatWorkflowProgressStatus(
27
27
  );
28
28
  const activity =
29
29
  run.status === 'awaiting-gate' ? 'awaiting review' : 'working';
30
+ const workerModel =
31
+ snapshot.execution?.kind === 'subagent' && snapshot.execution.model
32
+ ? ` · model ${snapshot.execution.model}`
33
+ : '';
30
34
  const workerProgress =
31
35
  snapshot.execution?.kind === 'subagent'
32
36
  ? ` · ${snapshot.execution.progress}`
33
37
  : '';
34
38
  const usage = workflowUsage(run);
35
39
  const usageText = usage.models.length > 0 ? ` · ${formatUsage(usage)}` : '';
36
- return `${workflowStatusIcon(run, snapshot.now)} ${run.workflowId} · step ${currentStep} · ${activity}${workerProgress}${usageText} · ${statusShortcutLabel}`;
40
+ return `${workflowStatusIcon(run, snapshot.now)} ${run.workflowId} · step ${currentStep} · ${activity}${workerModel}${workerProgress}${usageText} · ${statusShortcutLabel}`;
37
41
  }
38
42
 
39
43
  /** Format a plain-text workflow status suitable for fallback notifications. */
@@ -311,6 +311,9 @@ function renderLiveWorkerSession(
311
311
  width,
312
312
  'accent',
313
313
  ),
314
+ ...(snapshot.execution.model
315
+ ? keyValueLines(theme, 'model', snapshot.execution.model, width, 'muted')
316
+ : []),
314
317
  ...keyValueLines(
315
318
  theme,
316
319
  'state',
@@ -15,6 +15,7 @@ export type WorkflowStatusExecution =
15
15
  readonly agent: string;
16
16
  readonly requestId: string;
17
17
  readonly progress: string;
18
+ readonly model?: string;
18
19
  readonly activityLog?: ReadonlyArray<string>;
19
20
  };
20
21