@osolmaz/pi-workflows 0.8.1 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/viewer/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBb,CAAC;AAcF,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,MAAM,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,EAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACxF,IAAI,GAAG,GAAG,mBAAmB,EAAE,CAAC;IAChC,IAAI,aAAa,GAAG,6BAA6B,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACjE,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,MAAM,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AAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,aAAa,CAAC,IAAc,EAAE,MAAc;IACnD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,kBAAkB,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClC,MAAM,aAAa,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxF,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;IACzF,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc;IACtC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: Native Herdr piw integration plan
3
+ author: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
4
+ date: 2026-08-18
5
+ ---
6
+
7
+ # Native Herdr piw integration plan
8
+
9
+ ## Purpose
10
+
11
+ When Pi Workflows runs inside Herdr, show a shortcut that opens the current run in `piw`. The integration must belong to Pi Workflows and ship as one package, repository, version, and release. The same repository must also qualify for Herdr's public plugin marketplace.
12
+
13
+ ## Requirements
14
+
15
+ - Detect a live Herdr pane without polling.
16
+ - Show `Ctrl+Shift+R piw` inside the existing workflow widget only when the integration is available. Put it on the scroll-controls line when that line exists.
17
+ - Add `/piw` as a command fallback.
18
+ - Let the user open the viewer to the right, below, left, above, in a new tab, or in a new workspace.
19
+ - Open the exact run bundle rather than the runs list.
20
+ - Focus an existing viewer for the same run instead of opening a duplicate, including after Pi reload.
21
+ - Keep the workflow engine and run-bundle format independent of Herdr.
22
+ - Use Herdr's public plugin, pane, workspace, tab, label, and snapshot APIs. Do not construct commands from run data.
23
+ - Add the public repository to Herdr's plugin marketplace through the `herdr-plugin` topic.
24
+
25
+ ## Design
26
+
27
+ ### One package with two host entry points
28
+
29
+ The package root will contain `herdr-plugin.toml`. Pi loads the existing extension entry point. Herdr loads a `piw` pane entry point from the same package root. A small checked-in JavaScript launcher validates `PI_WORKFLOWS_RUN_DIR` and starts `piw` with an argv array.
30
+
31
+ `pi-workflows herdr setup` explicitly links the current package root with `herdr plugin link`. It is idempotent and never changes plugin registration during normal Pi startup.
32
+
33
+ ### Native extension adapter
34
+
35
+ A Herdr adapter under `src/extension/` will own capability checks and topology operations. It will use Pi's documented `pi.exec` API with bounded timeouts. The adapter will resolve the caller with `herdr pane current --current` on every open action, parse bounded JSON, and use only returned IDs.
36
+
37
+ The extension will keep a view target containing the exact run ID, workflow name, and bundle directory. The target starts after the bundle exists and lasts as long as the workflow widget. The widget renderer will keep the shortcut inside Pi's ten-line limit. It will append the call to action to the existing `shift+↑/↓ scroll` line when rows are hidden, and use a short standalone line only when no scroll-controls line exists.
38
+
39
+ ### Placement
40
+
41
+ Right and below use Herdr plugin splits. Left and above create the corresponding right or down split and then swap the new viewer with the caller. A tab uses the current workspace. A workspace is created transactionally; if plugin pane creation fails, only that new workspace is closed.
42
+
43
+ ### Viewer discovery
44
+
45
+ Herdr's public snapshot does not expose plugin metadata tokens. The launcher will therefore set an exact pane label derived from the run ID before starting `piw`. The adapter will inspect Herdr's public snapshot to find and focus an existing viewer after reload. It will discard stale pane references without adding a state file.
46
+
47
+ ## Non-goals
48
+
49
+ - Do not change Herdr core or `piw`.
50
+ - Do not add a companion Pi extension, event bridge, protocol version, daemon, poller, or new state store.
51
+ - Do not install or link the Herdr plugin automatically during Pi startup.
52
+ - Do not expose viewer control to the model-visible workflow tool.
53
+
54
+ ## Acceptance criteria
55
+
56
+ - A workflow started in a normal Pi TUI outside Herdr has unchanged UI and behavior.
57
+ - A workflow started in Herdr shows the shortcut and opens its exact bundle in `piw`.
58
+ - All six placements work and preserve the calling pane unless the user selects a focused viewer.
59
+ - Repeated opens and Pi reloads focus the existing run viewer.
60
+ - Failures produce bounded, useful messages and leave no empty tab or workspace.
61
+ - The package tarball contains the Herdr manifest and launcher.
62
+ - `osolmaz/pi-workflows` is public, has a root `herdr-plugin.toml`, and has the `herdr-plugin` GitHub topic.
63
+
64
+ ## Verification
65
+
66
+ - `npm run check`
67
+ - `npm run test:e2e`
68
+ - `npx slophammer-ts@latest dry .`
69
+ - `npx slophammer-ts@latest check . --only ts.dependency-boundaries-required`
70
+ - `npx -y @simpledoc/simpledoc check`
71
+ - `npm pack --dry-run`
72
+ - Link the package with `pi-workflows herdr setup` in a disposable Herdr test session.
73
+ - Start a finite test workflow in real Pi, open `piw` with `Ctrl+Shift+R`, verify the exact run ID, then test pane reuse and cleanup.
package/docs/MONITOR.md CHANGED
@@ -19,13 +19,13 @@ The monitor checks a target, sends one status notification after every accepted
19
19
 
20
20
  | Field | Required | Type | Default | Meaning |
21
21
  | --------------------- | -------- | ------- | ------------------ | -------------------------------- |
22
- | `task` | Yes | string | None | Self-contained observation task. |
22
+ | `task` | Yes | string | None | Self-contained monitor task. |
23
23
  | `everyMinutes` | No | integer | `30` | Minutes between accepted checks. |
24
24
  | `stopWhen` | No | string | Explicit user stop | Condition that ends monitoring. |
25
25
  | `maxChecks` | No | integer | `1000` | Run safety limit. |
26
26
  | `checkTimeoutMinutes` | No | integer | Derived | Timeout for one agent check. |
27
27
 
28
- `task` is 1 to 8,000 characters after trimming. It should name the target, stable identifier, source of truth, durable outputs, and observation boundary. It must state any authorized mutations. Monitoring is read-only when the task does not authorize a mutation.
28
+ `task` is 1 to 8,000 characters after trimming. It should name the target, stable identifier, source of truth, durable outputs, authorized routine work, and safety boundary. It must state any authorized mutations. Monitoring is read-only when the task does not authorize a mutation.
29
29
 
30
30
  `everyMinutes` is from 1 through 1,440. The interval begins after a check report is durably queued. It does not delay the first check.
31
31
 
@@ -260,11 +260,11 @@ The monitor skill must disclose a surfaced host limit and must never invent a sm
260
260
 
261
261
  ## Safety boundaries
262
262
 
263
- Monitoring authorizes observation and scheduled checks. It does not authorize retries, restarts, scaling, deployment, publication, cancellation of the target, or higher spending.
263
+ An observation-only request authorizes only observation and scheduled checks. When the user asks the monitor to keep an objective running or finish it, the monitor skill may record routine, bounded work in `task`, including retries, restarts, pinned task code, tests, configuration repairs, and temporary cleanup. The task must preserve the exact objective and state every mutation boundary.
264
264
 
265
265
  A progress object is data. It cannot contain a command or grant execution authority. Fixed probes belong in workflow-authored `action` or `shell` nodes.
266
266
 
267
- Paid compute, inference runtime, and other domain policies continue to apply to every check.
267
+ A monitoring request does not create spending approval or a default spending ceiling. Existing approvals can cover paid actions, and the monitor should continue without another prompt while each action stays within them. Paid compute, inference runtime, and other domain policies continue to apply to every check.
268
268
 
269
269
  ## Validation and acceptance
270
270
 
@@ -30,6 +30,20 @@ cargo install pi-workflows
30
30
  Direct filesystem mode and connected mode use the same semantic run view.
31
31
  The protocol is the network form of that view.
32
32
 
33
+ ## Herdr
34
+
35
+ The npm package contains a native Herdr plugin. Link the installed package with
36
+ `pi-workflows herdr setup`. A workflow running in Pi inside Herdr then shows
37
+ `Ctrl+Shift+R piw` in its widget. When rows are hidden, the call to action shares
38
+ the scroll-controls line. The shortcut and `/piw` command open
39
+ the current bundle directly in a managed Herdr pane. The placement menu supports
40
+ right, below, left, above, a new tab, and a new workspace.
41
+
42
+ The integration resolves the calling pane at invocation time and uses returned
43
+ Herdr IDs for every layout change. Existing viewers are found from their exact
44
+ run title and focused after Pi reload. Normal Pi sessions do not probe Herdr or
45
+ show the shortcut.
46
+
33
47
  ## Layout
34
48
 
35
49
  The normal layout contains a run browser, graph, inspector, and two-line replay
@@ -0,0 +1,12 @@
1
+ id = "osolmaz.pi-workflows"
2
+ name = "Pi Workflows"
3
+ version = "0.9.0"
4
+ min_herdr_version = "0.7.0"
5
+ description = "Open the active Pi Workflows run in piw from a managed Herdr pane."
6
+ platforms = ["linux", "macos"]
7
+
8
+ [[panes]]
9
+ id = "piw"
10
+ title = "piw"
11
+ placement = "split"
12
+ command = ["node", "plugins/herdr/viewer.mjs"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osolmaz/pi-workflows",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Workflow and controller runtime with a live terminal viewer for the pi coding agent",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -23,6 +23,8 @@
23
23
  "skills",
24
24
  "examples",
25
25
  "docs",
26
+ "plugins/herdr",
27
+ "herdr-plugin.toml",
26
28
  "README.md",
27
29
  "LICENSE"
28
30
  ],
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn, spawnSync } from "node:child_process";
4
+ import fs from "node:fs";
5
+ import path from "node:path";
6
+
7
+ const runId = process.env.PI_WORKFLOWS_RUN_ID ?? "";
8
+ const runDir = process.env.PI_WORKFLOWS_RUN_DIR ?? "";
9
+
10
+ if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$/u.test(runId)) {
11
+ fail("PI_WORKFLOWS_RUN_ID is missing or invalid.");
12
+ }
13
+ if (!path.isAbsolute(runDir) || path.basename(runDir) !== runId) {
14
+ fail("PI_WORKFLOWS_RUN_DIR must be the absolute bundle directory for the selected run.");
15
+ }
16
+ if (!fs.existsSync(path.join(runDir, "manifest.json"))) {
17
+ fail(`Workflow bundle not found: ${runDir}`);
18
+ }
19
+
20
+ const paneId = process.env.HERDR_PANE_ID ?? "";
21
+ if (!/^[A-Za-z0-9]+:p[A-Za-z0-9]+$/u.test(paneId)) {
22
+ fail("HERDR_PANE_ID is missing or invalid.");
23
+ }
24
+
25
+ const herdr = process.env.HERDR_BIN_PATH ?? "herdr";
26
+ const label = `piw · ${runId}`;
27
+ const labeled = spawnSync(herdr, ["pane", "rename", paneId, label], {
28
+ encoding: "utf8",
29
+ stdio: ["ignore", "ignore", "pipe"],
30
+ });
31
+ if (labeled.error) fail(`Could not label the Herdr viewer pane: ${labeled.error.message}`);
32
+ if (labeled.status !== 0) {
33
+ fail(`Could not label the Herdr viewer pane: ${bounded(labeled.stderr) || "unknown error"}`);
34
+ }
35
+
36
+ const viewer = spawn("piw", [runDir], { stdio: "inherit" });
37
+ for (const signal of ["SIGINT", "SIGTERM"]) {
38
+ process.on(signal, () => viewer.kill(signal));
39
+ }
40
+ viewer.on("error", (error) => fail(`Could not start piw: ${error.message}`));
41
+ viewer.on("exit", (code, signal) => {
42
+ process.exitCode = signal ? 1 : (code ?? 1);
43
+ });
44
+
45
+ function fail(message) {
46
+ process.stderr.write(`${message}\n`);
47
+ process.exit(1);
48
+ }
49
+
50
+ function bounded(value) {
51
+ const compact = String(value ?? "")
52
+ .replace(/[\r\n\t]+/gu, " ")
53
+ .replace(/ +/gu, " ")
54
+ .trim();
55
+ return compact.length <= 300 ? compact : `${compact.slice(0, 299)}…`;
56
+ }
@@ -8,7 +8,7 @@ compatibility: Requires Pi Workflows and the built-in monitor workflow.
8
8
 
9
9
  Use the built-in Pi `monitor` workflow as an autopilot for the requested objective. Monitoring is not passive status polling. The agent must maintain nominal operation, repair recoverable failures, resume durable work, and continue until the complete objective is verified or a material blocker makes safe continuation impossible.
10
10
 
11
- A monitor request authorizes routine operational actions that are necessary to preserve and finish the stated objective, subject to the conversation and repository approval boundaries. These actions can include restarting or resuming the same non-paid Job or process, repairing an exact operational configuration or storage-path error, retrying transient infrastructure failures, restoring a verified checkpoint, and replacing a failed physical attempt with the same immutable execution contract. Paid launches, resumes, retries, or replacements require the explicit approval described below. Monitoring does not authorize changing the objective, method, model, data source, production selection, or other consequential contract.
11
+ A monitor request authorizes routine, bounded work needed to preserve and finish the stated objective, subject to the conversation and repository approval boundaries. Apply other skills as safety and operating instructions. Do not turn their normal checks into new approval requests when the monitored objective and an existing approval already cover the action. Monitoring does not authorize changing the objective, method, model, data source, production selection, or other consequential contract.
12
12
 
13
13
  ## Prepare and start without delay
14
14
 
@@ -26,7 +26,7 @@ Do not finish the initiating turn before the workflow start call. If a safe cont
26
26
 
27
27
  Derive the workflow input from the full conversation:
28
28
 
29
- - `task`: State the complete objective, the exact current target and stable identifiers, authoritative status sources, durable progress and final-output surfaces, approved recovery actions, immutable boundaries, cost and credential rules, and required validation or downstream operations.
29
+ - `task`: State the complete objective, the exact current target and stable identifiers, authoritative status sources, durable progress and final-output surfaces, routine actions authorized by the monitor request, other recorded approvals, immutable boundaries, cost and credential rules, and required validation or downstream operations.
30
30
  - `everyMinutes`: Use the user's interval when present. Use `30` when the user gives no interval. The built-in workflow accepts intervals from 1 minute through 24 hours.
31
31
  - `stopWhen`: Infer verified completion from the full conversation. Describe completion of the complete objective, not only the end of one physical process. Also name material blockers that require human intervention.
32
32
 
@@ -34,11 +34,24 @@ When the conversation gives no clear finish criterion, set `stopWhen` to `Stop o
34
34
 
35
35
  Do not invent a finite check count. Omit `maxChecks` unless the user explicitly requests one. The workflow host can apply its own safety upper bound. Disclose that bound if it appears.
36
36
 
37
+ ## Keep routine work moving
38
+
39
+ While the workflow is active, do routine, bounded work required by the exact objective without asking for another confirmation. This includes:
40
+
41
+ - downloading, building, and running code pinned by the monitored objective;
42
+ - building and running task containers from a pinned benchmark or repository revision;
43
+ - installing pinned dependencies in the planned isolated environment;
44
+ - running canaries, tests, retries, restarts, and temporary cleanup;
45
+ - repairing configuration or storage-path errors without changing the method; and
46
+ - continuing paid work that already has applicable approval.
47
+
48
+ Pinned third-party code is part of the objective when the task names its exact repository, revision, lock file, image digest, or benchmark release. Resolve mutable references to immutable revisions when the applicable safety rules require it. Do not ask once per image, package, or task. New unpinned code, unrelated code, or broader privileges remain outside the monitor's authority.
49
+
37
50
  ## Paid infrastructure authority
38
51
 
39
- A monitoring request does not grant spending approval or create a default spending ceiling. Before launching, resuming, retrying, or replacing paid work, load and follow the paid-compute, provider, Job-control, and runtime skills that apply. Present the required estimate and obtain explicit approval when those policies require it.
52
+ A monitoring request does not grant spending approval or create a default spending ceiling. Before launching, resuming, retrying, or replacing paid work, load and follow the paid-compute, provider, Job-control, and runtime skills that apply. Use any applicable approval already recorded in the conversation or repository instructions.
40
53
 
41
- After approval, preserve the exact method, hardware, concurrency, cumulative cost ceiling, and recovery assumptions in the monitor task. Continue only within that approved contract. Stop for a decision before new paid work when there is no applicable approval, when the ceiling would be exceeded, or when evidence invalidates an approved assumption.
54
+ When the paid action remains within the approved method, hardware, concurrency, cumulative cost ceiling, and recovery assumptions, continue without asking again. Stop for a decision before new paid work only when there is no applicable approval, the ceiling would be exceeded, or evidence invalidates an approved assumption.
42
55
 
43
56
  The monitor may use a credential only when the conversation or repository has already authorized that credential's source, destination, and purpose. It may reuse that authorization for retries and replacement attempts under the same objective. It must not discover unrelated credentials, broaden scopes, copy credentials to a new store, or print secret values.
44
57