@nanobpm/nano-workforce 0.203.0 → 0.203.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-workforce",
3
- "version": "0.203.0",
3
+ "version": "0.203.1",
4
4
  "description": "Nano Workforce — an Agent Graph Orchestration application for Agentic SDLC: durable BPMN processes that coordinate a graph of AI agents across the software delivery lifecycle.",
5
5
  "type": "module",
6
6
  "main": "main.ts",
@@ -11,27 +11,15 @@ implements → converges** them across a fleet of coding agents, and runs
11
11
  **agent-authored delivery graphs** (heterogeneous cross-repo, human-in-the-loop
12
12
  DAGs — ADR 0005).
13
13
 
14
- **This skill is a thin bootstrap by design.** It does not describe the endpoints.
15
- Every running nwf instance is self-describing — over **MCP** where your client
16
- supports it, and over its **live operator guide** everywhere else. Your job is to
17
- reach that live surface and follow it, never to work from a cached copy that drifts
18
- across versions and instances.
19
-
20
- There are two paths. **Prefer MCP (§A).** If your client has no MCP support, use the
21
- fetch-the-live-guide fallback (§B). Both talk to the same app; MCP is a projection of
22
- the same OpenAPI contract, not a different system (ADR 0067).
14
+ **This skill is a thin bootstrap.** Every running instance describes itself, over **MCP**
15
+ (§A, preferred) or through its **live operator guide** (§B). Reach that live surface and
16
+ follow it rather than a cached copy that drifts between versions.
23
17
 
24
18
  ## A. Preferred — drive over MCP
25
19
 
26
- The Urban runtime serves a Streamable-HTTP MCP endpoint at **`/app/mcp`** for every
27
- instance, with **zero app-side MCP code**: the app's operations are projected into
28
- tools from its OpenAPI spec, alongside a framework-owned engine-debug tool family
29
- (process instances, wait states, variables, incidents) and the app's projection
30
- reads. The operator **guide** (the same guide as §B) is itself one of those projected
31
- tools — `GET /app/api/agent` becomes the `getAgentInstructions` read tool — so the
32
- workflow knowledge (orient first, preview before dispatch, escalations are for humans)
33
- is discoverable over the same channel as the drive tools; the runtime additionally
34
- serves its derived **system brief** as an MCP resource plus an orientation prompt.
20
+ Every instance serves a Streamable-HTTP MCP endpoint at **`/app/mcp`**. Its tools are the
21
+ app's operations (projected from its OpenAPI spec) plus framework engine-debug tools. The
22
+ operator guide itself is the `getAgentInstructions` tool.
35
23
 
36
24
  **Register one MCP server entry per instance.** Naming the instance
37
25
  (`"drive workforce-merlin"`) makes the wrong-instance mistake structurally
@@ -64,14 +52,9 @@ Then: start a session, confirm the `workforce-*` tools appear, and ask the agent
64
52
  use a **named** instance (`"Using workforce-local, show what's in flight and any open
65
53
  escalations"`). It should call the status operation tool, not curl.
66
54
 
67
- **Guard posture.** When `NANO_PR_WEBHOOK_SECRET` is **unset**, both reads (status,
68
- instances, incidents, projections, the operator guide) and mutations (submit work,
69
- answer escalations, cancel/retry/resolve) work from loopback with no credential. When it
70
- **is set**, that secret is required as an `x-hook-secret` header on **both reads and
71
- mutations** — read endpoints like `getAgentInstructions`/`getVersion` also return `401`
72
- without it — put it in the server entry's `headers`, never in chat. **Operator-only doors stay operator-only:** the delivery-graph
73
- dispatch/dismiss lifecycle (the human clicking Dispatch *is* the approval, ADR 0005)
74
- is `x-mcp`-excluded and is **not** a tool — dispatch stays a human action in the
55
+ **Guard posture.** If `NANO_PR_WEBHOOK_SECRET` is set, every read and mutation needs it as an
56
+ `x-hook-secret` header (otherwise `401`). Put it in the server entry's `headers`, never in
57
+ chat. Delivery-graph dispatch is deliberately **not** a tool: it stays a human action in the
75
58
  cockpit.
76
59
 
77
60
  The full server-entry recipes (multiple instances, Basic-Auth-fronted instances,
@@ -129,45 +112,17 @@ curl -sS ${NANO_PR_WEBHOOK_SECRET:+-H "x-hook-secret: $NANO_PR_WEBHOOK_SECRET"}
129
112
  `GET /app/api/agent` (`getAgentInstructions`) returns
130
113
  `{ format, appVersion, generatedAt, baseUrl, engineBase, instructions }` — the
131
114
  authoritative, version-matched operator guide, every example keyed to this
132
- instance. Read it in full and follow it for orientation, submitting work, answering
133
- escalations, and debugging. **Re-fetch it at the start of every session.** (This is
134
- the same prose the `getAgentInstructions` MCP tool serves in §A.)
135
-
136
- ### B.3 Orient before acting
137
-
138
- ```bash
139
- curl -sS "$BASE/version" | jq # app/urban version, git sha, uptime
140
- curl -sS "$BASE/status" | jq # every PR/instance in flight + open escalations
141
- ```
142
-
143
- `/status` is the primary situational-awareness endpoint — check it before you submit
144
- or unstick anything.
145
-
146
- ### B.4 What you can drive (all detailed in the live guide)
147
-
148
- - **Submit a PR** for review convergence — `POST $BASE/actions/start/convergence-loop`.
149
- - **Submit an issue/epic** for plan → implement → converge — `POST $BASE/actions/start/plan-fanout`.
150
- - **Submit a delivery graph** (ADR 0005) — propose → preview → approve → **dispatch**.
151
- Compile/preview is a pure, side-effect-free path; **dispatch is an operator action
152
- in the cockpit**, not an agent door.
153
- - **Answer an escalation** — `POST $BASE/actions/complete-user-task`, or the agent
154
- hook `POST $BASE/hooks/agent-complete` (`agentCompleteEscalation`).
155
- - **Debug** — relate an in-flight PR to its engine process instance via `processKey`
156
- from `/status`, then inspect and unstick it against the engine REST base
157
- (`engineBase` from the guide).
115
+ instance. Read it and follow it: orientation, submitting work, answering escalations,
116
+ debugging. **Re-fetch it every session.** For one section, use
117
+ `GET $BASE/agent/guide?section=<id>` (no `section` = table of contents).
158
118
 
159
119
  ## Principles
160
120
 
161
- - **Discover, don't declare.** Prefer the live surface (MCP tools including the
162
- operator-guide tool, or the live guide and `/status`) over any assumption baked into
163
- this file. If this skill and the live surface disagree, the live surface wins.
164
- - **Confirm the target instance.** Never run a side-effecting call against an assumed
165
- base URL. With MCP, name the server entry; with the fallback, know — and when
166
- ambiguous, ask — which instance you're driving.
167
- - **Preview before dispatch.** For delivery graphs and any bulk action, use the pure
168
- preview/validate path first and show the user the plan before the side-effecting
169
- start. Dispatch itself is the operator's call.
170
- - **Idempotency.** Submissions carry dedupe keys; re-submitting the same work must not
171
- double-dispatch. Honour the keys the guide documents.
172
- - **Escalations are for humans.** When the workforce parks on a human node, surface it
173
- with options; don't silently auto-answer design/product decisions.
121
+ - **The live surface wins.** If this skill and the instance disagree, follow the instance.
122
+ - **Confirm the target instance** before any side-effecting call (name the MCP server entry,
123
+ or ask when the base URL is ambiguous).
124
+ - **Preview before dispatch.** Show the user the plan before any bulk or side-effecting start.
125
+ Dispatching a delivery graph is the operator's call.
126
+ - **Submissions are idempotent.** Re-submitting the same work must not double-dispatch.
127
+ - **Escalations are for humans.** Surface them with options; don't silently answer design or
128
+ product decisions.