@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 +7 -3
- package/package.json +1 -1
- package/src/harness/delegation-plan.ts +1 -0
- package/src/harness/status-actions.ts +3 -0
- package/src/harness/types.ts +1 -0
- package/src/workflow-status/format-status.ts +5 -1
- package/src/workflow-status/render-step-detail.ts +3 -0
- package/src/workflow-status/types.ts +1 -0
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
|
@@ -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' };
|
package/src/harness/types.ts
CHANGED
|
@@ -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. */
|