@sentropic/h2a 0.85.4 → 0.85.6

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": "@sentropic/h2a",
3
- "version": "0.85.4",
3
+ "version": "0.85.6",
4
4
  "description": "h2a — the unified CLI + core for human-to-agent coordination.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -47,7 +47,7 @@
47
47
  "@hono/mcp": "^0.3.0",
48
48
  "@hono/node-server": "^2.0.4",
49
49
  "@modelcontextprotocol/sdk": "^1.29.0",
50
- "@sentropic/track": "^0.85.4",
50
+ "@sentropic/track": "^0.85.6",
51
51
  "hono": "^4.12.23"
52
52
  },
53
53
  "peerDependencies": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: h2a
3
- version: 0.66.0
4
- description: Coordinate with other CLI agents (Claude Code, Codex, Gemini) via the h2a protocol — open a live session, list peers, exchange messages, drive a signed negotiation. Use when the user wants the current CLI to interact with another agent through a shared workspace.
3
+ version: 0.85.6
4
+ description: Coordinate with other CLI agents (Claude Code, Codex, Gemini) via the h2a protocol — open a live session, list peers, exchange messages, drive a signed negotiation or objective loop. Use when the user wants the current CLI to interact with another agent through a shared workspace.
5
5
  ---
6
6
 
7
7
  # /h2a
@@ -21,6 +21,7 @@ When invoked, parse the arguments and dispatch to the matching subcommand below.
21
21
  /h2a send <peer> "<text>" → put a message envelope in a peer's inbox
22
22
  /h2a receive → read this agent's inbox and react to new envelopes
23
23
  /h2a negotiate <verb> ... → drive a negotiation lifecycle (open|offer|sign|stabilize)
24
+ /h2a loop <verb> ... → create/join/report/done/stop an objective loop (multi-agent relay)
24
25
  /h2a model "<situation>" → propose a tailored h2a model for an org/situation
25
26
  /h2a disconnect → cleanly close the current session
26
27
  /h2a help → print this command map
@@ -221,6 +222,28 @@ Drive a step of the h2a negotiation lifecycle. The subverb is one of:
221
222
 
222
223
  For each verb, validate the required arguments, surface any tool error verbatim, and print a one-line confirmation with the latest journal entry id.
223
224
 
225
+ ### `/h2a loop <verb> ...`
226
+
227
+ Drive an objective loop: a durable, shared relay state where several CLI agents can join, report progress, mark references done, or stop the loop.
228
+
229
+ **Supported verbs:**
230
+
231
+ - `/h2a loop create --goal "<goal>" [--name <name>] [--id <loop-id>] [--agent <host:role:local>] [--ref <ref>]` — create the loop. CLI: `h2a loop create`. MCP: `h2a_loop_create`.
232
+ - `/h2a loop join <loop-id> --instance <self> [--agent-id <id>] [--role <role>] [--required=false]` — join an existing loop or fill a predeclared agent slot. CLI: `h2a loop join`. MCP: `h2a_loop_join`.
233
+ - `/h2a loop report <loop-id> --agent-id <id> --status <running|blocked|done> [--note "..."]` — append an agent status report. CLI: `h2a loop report`. MCP: `h2a_loop_report`.
234
+ - `/h2a loop done <loop-id> --ref <ref> [--agent-id <id>] [--note "..."]` — mark one loop reference done. CLI: `h2a loop done`. MCP: `h2a_loop_done`.
235
+ - `/h2a loop stop <loop-id> [--reason "..."]` — stop the loop; later `tick/run --execute` must not perform close actions. CLI: `h2a loop stop`. MCP: `h2a_loop_stop`.
236
+ - `/h2a loop list` / `/h2a loop status <loop-id>` — read-only projections. CLI or MCP: `h2a_loop_list`, `h2a_loop_status`.
237
+ - `/h2a loop run <loop-id>` — alias of `h2a loop watch`: continuously emits JSONL tick plans. Use `h2a loop tick <loop-id> --execute` for a single execution tick.
238
+
239
+ **Routing guidance:**
240
+
241
+ 1. Prefer MCP tools when the host exposes them; otherwise call the CLI with `--root <root>`.
242
+ 2. Always use the current resolved perennial `instance` from `/h2a connect`; do not invent agent ids except as local slot ids (`agent-1`, `reviewer`, etc.).
243
+ 3. If the user asks for a Codex/Claude relay, create the loop with predeclared `--agent` slots, ask each live peer to `join`, then use `report`/`done` to converge.
244
+ 4. Treat `stopped` as terminal. Do not restart or close a stopped loop unless the user explicitly creates a new loop.
245
+ 5. Print the loop id and the next concrete command/tool call for the peer.
246
+
224
247
  ### `/h2a model "<situation>"`
225
248
 
226
249
  Propose a **tailored h2a model** for a free-form organization or situation (e.g. *"a hospital coordinating with insurers and a regulator"*, *"a 3-team scaled-agile delivery with AI agents"*). This is an **advisory mapping**, not a protocol action — it emits a design, it does not write to the store.