@wichayutdew/pi-workflows 2.5.1 → 2.7.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/README.md +34 -1
- package/dist/index.js +1315 -2467
- package/examples/starter-kit/agents/planner.md +11 -0
- package/examples/starter-kit/agents/reviewer.md +10 -0
- package/examples/starter-kit/agents/scout.md +10 -0
- package/examples/starter-kit/agents/worker.md +11 -0
- package/examples/starter-kit/agents/workspace-preparer.md +10 -0
- package/examples/starter-kit/investigate.workflow.yaml +84 -0
- package/examples/starter-kit/jira.workflow.yaml +75 -0
- package/examples/starter-kit/mr-comment.workflow.yaml +86 -93
- package/examples/starter-kit/mr-review.workflow.yaml +52 -88
- package/examples/starter-kit/settings.yaml +4 -0
- package/examples/starter-kit/steps/investigate/investigate.md +40 -0
- package/examples/starter-kit/steps/investigate/retrieve.md +28 -0
- package/examples/starter-kit/steps/investigate/validate.md +20 -0
- package/examples/starter-kit/steps/jira/create.md +25 -0
- package/examples/starter-kit/steps/jira/draft.md +18 -0
- package/examples/starter-kit/steps/jira/plan.md +30 -0
- package/examples/starter-kit/steps/mr-comment/checkout-source.md +14 -0
- package/examples/starter-kit/steps/mr-comment/fetch.md +11 -28
- package/examples/starter-kit/steps/mr-comment/implement.md +9 -26
- package/examples/starter-kit/steps/mr-comment/plan.md +46 -55
- package/examples/starter-kit/steps/mr-comment/publish.md +11 -31
- package/examples/starter-kit/steps/mr-comment/verify.md +7 -34
- package/examples/starter-kit/steps/mr-review/fetch.md +13 -21
- package/examples/starter-kit/steps/mr-review/publish-approved.md +18 -0
- package/examples/starter-kit/steps/mr-review/review-for-approval.md +53 -0
- package/examples/starter-kit/steps/mr-review/verify-published.md +16 -0
- package/examples/starter-kit/steps/shared/prepare-workspace.md +11 -89
- package/examples/starter-kit/steps/shared/publish-remote.md +16 -0
- package/examples/starter-kit/steps/ticket/implement.md +10 -23
- package/examples/starter-kit/steps/ticket/plan.md +49 -98
- package/examples/starter-kit/steps/ticket/verify.md +14 -65
- package/examples/starter-kit/steps/work/implement.md +11 -22
- package/examples/starter-kit/steps/work/plan.md +43 -59
- package/examples/starter-kit/steps/work/verify.md +14 -25
- package/examples/starter-kit/ticket.workflow.yaml +57 -61
- package/examples/starter-kit/work.workflow.yaml +49 -57
- package/package.json +9 -19
- package/schemas/workflow.schema.json +63 -15
- package/scripts/patch-herdr-agent-state.mjs +36 -0
- package/src/agents/profile.ts +98 -0
- package/src/config/ceiling.ts +0 -82
- package/src/config/types.ts +15 -53
- package/src/config/validation/settings.ts +2 -14
- package/src/config/validation/step.ts +129 -8
- package/src/config/validation/workflow.ts +1 -10
- package/src/engine/run-workflow-validation.ts +0 -3
- package/src/engine/state-types.ts +1 -1
- package/src/harness/action-context.ts +1 -13
- package/src/harness/artifact-contract.ts +46 -0
- package/src/harness/delegation-control-actions.ts +4 -63
- package/src/harness/delegation-plan.ts +26 -80
- package/src/harness/delegation-response-actions.ts +22 -135
- package/src/harness/dependencies.ts +1 -12
- package/src/harness/gate-submission-action.ts +28 -0
- package/src/harness/status-actions.ts +20 -0
- package/src/harness/step-execution-actions.ts +2 -9
- package/src/harness/types.ts +2 -40
- package/src/harness.ts +2 -17
- package/src/herdr-workflow-state.ts +65 -0
- package/src/index.ts +4 -9
- package/src/integrations/subagents/child-policy-validation.ts +6 -7
- package/src/integrations/subagents/child-runtime-dependencies.ts +1 -1
- package/src/integrations/subagents/child-runtime-policy.ts +1 -7
- package/src/integrations/subagents/child-runtime.ts +18 -9
- package/src/integrations/subagents/client.ts +240 -98
- package/src/integrations/subagents/protocol-events.ts +32 -15
- package/src/integrations/subagents/protocol.ts +1 -1
- package/src/preflight.ts +0 -8
- package/src/prompt/main-workflow-notice.ts +8 -15
- package/src/prompt/step-task.ts +7 -6
- package/src/workflow-status/format-status.ts +5 -1
- package/src/workflow-status/render-step-detail.ts +94 -0
- package/src/workflow-status/types.ts +1 -0
- package/src/workflow-status/view.ts +49 -14
- package/agents/step.md +0 -32
- package/examples/mr-comments.workflow.yaml +0 -125
- package/examples/prompts/mr-comments/implement.md +0 -17
- package/examples/prompts/mr-comments/inspect.md +0 -5
- package/examples/prompts/mr-comments/plan.md +0 -54
- package/examples/prompts/mr-comments/verify.md +0 -9
- package/examples/settings.yaml +0 -27
- package/examples/starter-kit/steps/mr-review/publish.md +0 -48
- package/examples/starter-kit/steps/mr-review/review.md +0 -76
- package/examples/starter-kit/steps/mr-review/verify.md +0 -35
- package/src/config/validation/subagent.ts +0 -288
- package/src/harness/delegation-failure.ts +0 -248
- package/src/harness/delegation-recovery-validation.ts +0 -161
- package/src/harness/delegation-retry-policy.ts +0 -120
- package/src/integrations/subagents/client-delegation.ts +0 -181
- package/src/integrations/subagents/client-messages.ts +0 -66
- package/src/integrations/subagents/client-types.ts +0 -36
- package/src/integrations/subagents/diagnostic-format.ts +0 -45
- package/src/integrations/subagents/diagnostic-text.ts +0 -114
- package/src/integrations/subagents/diagnostic-types.ts +0 -83
- package/src/integrations/subagents/diagnostics.ts +0 -26
- package/src/integrations/subagents/failure-correlation.ts +0 -285
- package/src/integrations/subagents/failure-transcript.ts +0 -252
- package/src/integrations/subagents/hidden-bash-failure.ts +0 -98
- package/src/integrations/subagents/replay-audit.ts +0 -146
- package/src/integrations/subagents/replay-safety.ts +0 -67
- package/src/integrations/subagents/session-diagnostics.ts +0 -357
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Pi Workflows is a declarative, pauseable workflow harness for Pi. Define steps,
|
|
8
8
|
tools, prompts, approvals, and outcomes in YAML; it provides bounded execution,
|
|
9
|
-
durable checkpoints,
|
|
9
|
+
durable checkpoints, main-session step policy, and a live status view without
|
|
10
10
|
dictating your language, framework, or delivery process.
|
|
11
11
|
|
|
12
12
|
## See it in action
|
|
@@ -32,6 +32,39 @@ dictating your language, framework, or delivery process.
|
|
|
32
32
|
- Pause for human approval and resume from the same durable checkpoint.
|
|
33
33
|
- Keep worktree-bound iterations safe, including follow-up enhancements.
|
|
34
34
|
- Enforce declared resources and stop unsafe loops before they run away.
|
|
35
|
+
- Assign a workflow-owned role prompt with `agent: planner`, `worker`,
|
|
36
|
+
`reviewer`, or `scout`; customize profiles under your user workflow
|
|
37
|
+
directory's `agents/` folder.
|
|
38
|
+
|
|
39
|
+
## Herdr workflow status
|
|
40
|
+
|
|
41
|
+
When Pi runs delegated workflow steps, the parent agent may be idle while child work continues. Pi Workflows includes a Herdr companion extension that reports workflow lifecycle state so the pane remains **working** until the workflow completes, pauses, or is interrupted.
|
|
42
|
+
|
|
43
|
+
The companion is inactive unless Herdr provides `HERDR_ENV=1`, `HERDR_SOCKET_PATH`, and `HERDR_PANE_ID`. It uses Herdr's existing managed Pi reporter, so it does not create a competing pane agent.
|
|
44
|
+
|
|
45
|
+
### Install from npm
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pi install npm:@wichayutdew/pi-workflows
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Start a new Pi session in Herdr, then run a workflow normally. Herdr should show the pane as working while the workflow is active and display the terminal workflow message after completion or interruption.
|
|
52
|
+
|
|
53
|
+
### Reapply after a Herdr update
|
|
54
|
+
|
|
55
|
+
Herdr manages `~/.pi/agent/extensions/herdr-agent-state.ts`; an integration update can replace the workflow lifecycle patch. Locate the installed package with `pi list`, change into that package directory, and run:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm run patch:herdr
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The script patches the managed integration at its default location. It is idempotent, so it is safe to run after every Herdr update. To patch a non-default integration path, set `HERDR_PI_EXTENSION_PATH` before running the script:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
HERDR_PI_EXTENSION_PATH=/path/to/herdr-agent-state.ts npm run patch:herdr
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Restart Pi or run `/reload` after patching. If Herdr's managed extension changes shape and the script reports an unsupported layout, do not edit it manually; update Pi Workflows or report the integration change.
|
|
35
68
|
|
|
36
69
|
## Explore
|
|
37
70
|
|