@wichayutdew/pi-workflows 3.4.0 → 3.5.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
|
@@ -3195,6 +3195,9 @@ function wrapPlain(value, width, theme, color = "text") {
|
|
|
3195
3195
|
});
|
|
3196
3196
|
return wrapped.length > 0 ? wrapped : [theme.fg(color, " ")];
|
|
3197
3197
|
}
|
|
3198
|
+
function summaryLines(theme, value, width) {
|
|
3199
|
+
return [theme.fg("muted", "summary"), ...wrapPlain(value, width, theme)];
|
|
3200
|
+
}
|
|
3198
3201
|
function boundedArtifact(value) {
|
|
3199
3202
|
return value.length <= MAX_DETAIL_ARTIFACT_CHARS ? { value, truncated: false } : {
|
|
3200
3203
|
value: value.slice(0, MAX_DETAIL_ARTIFACT_CHARS),
|
|
@@ -3210,7 +3213,8 @@ function renderResult(theme, attempt, width) {
|
|
|
3210
3213
|
"",
|
|
3211
3214
|
theme.bold(theme.fg("accent", "Submitted result")),
|
|
3212
3215
|
...keyValueLines(theme, "outcome", result.outcome, width, "success"),
|
|
3213
|
-
...
|
|
3216
|
+
...summaryLines(theme, `${result.summary}${result.summaryTruncated ? `
|
|
3217
|
+
… [trace truncated]` : ""}`, width),
|
|
3214
3218
|
...result.workspaceCwd ? keyValueLines(theme, "workspace", result.workspaceCwd, width) : [],
|
|
3215
3219
|
...artifact ? [
|
|
3216
3220
|
theme.fg("muted", "artifact"),
|
|
@@ -3364,7 +3368,7 @@ function renderStepDetail(theme, snapshot, selectedIndex, cache, width) {
|
|
|
3364
3368
|
] : [],
|
|
3365
3369
|
...history ? [
|
|
3366
3370
|
...keyValueLines(theme, "outcome", history.outcome, width, "success"),
|
|
3367
|
-
...
|
|
3371
|
+
...summaryLines(theme, history.summary, width)
|
|
3368
3372
|
] : [],
|
|
3369
3373
|
...currentReason ? keyValueLines(theme, "reason", currentReason, width, "warning") : [],
|
|
3370
3374
|
...entry.isCurrent && snapshot.run.gateFeedback ? keyValueLines(theme, "feedback", snapshot.run.gateFeedback, width, "warning") : [],
|
|
@@ -6122,6 +6126,8 @@ function buildStepTask(options) {
|
|
|
6122
6126
|
...contract.workspaceLines,
|
|
6123
6127
|
"",
|
|
6124
6128
|
"Put a self-contained compact handoff in `summary`; this is the only step context passed to the next fresh child.",
|
|
6129
|
+
"Format all human-facing output—including summaries, gate artifacts, Markdown plans, reports, comments, and replies—for scanning: short headings, then one distinct fact, action, or metadata value per bullet or paragraph. Never pack unrelated values into one line or dense prose.",
|
|
6130
|
+
"When a schema needs several related fields, use a bullet list with one `field`: `value` per row; use JSON only for machine-readable data under `## Machine-readable handoff` in a fenced valid `json` block. Keep prose outside that block.",
|
|
6125
6131
|
...buildNonSuccessSummaryInstructions(contract.outcomes),
|
|
6126
6132
|
...isDelegated ? buildDelegatedCompletionInstructions() : [],
|
|
6127
6133
|
"Do not call the completion tool alongside other tool calls."
|
package/package.json
CHANGED
package/src/prompt/step-task.ts
CHANGED
|
@@ -151,6 +151,8 @@ export function buildStepTask(options: BuildStepTaskOptions): string {
|
|
|
151
151
|
...contract.workspaceLines,
|
|
152
152
|
'',
|
|
153
153
|
'Put a self-contained compact handoff in `summary`; this is the only step context passed to the next fresh child.',
|
|
154
|
+
'Format all human-facing output—including summaries, gate artifacts, Markdown plans, reports, comments, and replies—for scanning: short headings, then one distinct fact, action, or metadata value per bullet or paragraph. Never pack unrelated values into one line or dense prose.',
|
|
155
|
+
'When a schema needs several related fields, use a bullet list with one `field`: `value` per row; use JSON only for machine-readable data under `## Machine-readable handoff` in a fenced valid `json` block. Keep prose outside that block.',
|
|
154
156
|
...buildNonSuccessSummaryInstructions(contract.outcomes),
|
|
155
157
|
...(isDelegated ? buildDelegatedCompletionInstructions() : []),
|
|
156
158
|
'Do not call the completion tool alongside other tool calls.',
|
|
@@ -74,6 +74,14 @@ function wrapPlain(
|
|
|
74
74
|
return wrapped.length > 0 ? wrapped : [theme.fg(color, ' ')];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
function summaryLines(
|
|
78
|
+
theme: WorkflowStatusTheme,
|
|
79
|
+
value: string,
|
|
80
|
+
width: number,
|
|
81
|
+
): Array<string> {
|
|
82
|
+
return [theme.fg('muted', 'summary'), ...wrapPlain(value, width, theme)];
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
function boundedArtifact(value: string): {
|
|
78
86
|
readonly value: string;
|
|
79
87
|
readonly truncated: boolean;
|
|
@@ -101,10 +109,9 @@ function renderResult(
|
|
|
101
109
|
'',
|
|
102
110
|
theme.bold(theme.fg('accent', 'Submitted result')),
|
|
103
111
|
...keyValueLines(theme, 'outcome', result.outcome, width, 'success'),
|
|
104
|
-
...
|
|
112
|
+
...summaryLines(
|
|
105
113
|
theme,
|
|
106
|
-
|
|
107
|
-
`${result.summary}${result.summaryTruncated ? ' … [trace truncated]' : ''}`,
|
|
114
|
+
`${result.summary}${result.summaryTruncated ? '\n… [trace truncated]' : ''}`,
|
|
108
115
|
width,
|
|
109
116
|
),
|
|
110
117
|
...(result.workspaceCwd
|
|
@@ -439,7 +446,7 @@ export function renderStepDetail(
|
|
|
439
446
|
...(history
|
|
440
447
|
? [
|
|
441
448
|
...keyValueLines(theme, 'outcome', history.outcome, width, 'success'),
|
|
442
|
-
...
|
|
449
|
+
...summaryLines(theme, history.summary, width),
|
|
443
450
|
]
|
|
444
451
|
: []),
|
|
445
452
|
...(currentReason
|