@sentropic/h2a 0.96.1 → 0.97.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.
Files changed (102) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +98 -29
  5. package/dist/cli.js.map +1 -1
  6. package/dist/index.d.ts +12 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/runtime/drive/cluster-mesh-outer.d.ts +44 -0
  11. package/dist/runtime/drive/cluster-mesh-outer.d.ts.map +1 -0
  12. package/dist/runtime/drive/cluster-mesh-outer.js +70 -0
  13. package/dist/runtime/drive/cluster-mesh-outer.js.map +1 -0
  14. package/dist/runtime/drive/inbox-wake.d.ts +5 -0
  15. package/dist/runtime/drive/inbox-wake.d.ts.map +1 -1
  16. package/dist/runtime/drive/inbox-wake.js +4 -1
  17. package/dist/runtime/drive/inbox-wake.js.map +1 -1
  18. package/dist/runtime/drive/index.d.ts +4 -0
  19. package/dist/runtime/drive/index.d.ts.map +1 -1
  20. package/dist/runtime/drive/index.js +12 -0
  21. package/dist/runtime/drive/index.js.map +1 -1
  22. package/dist/runtime/drive/pty-actuator.d.ts +54 -0
  23. package/dist/runtime/drive/pty-actuator.d.ts.map +1 -0
  24. package/dist/runtime/drive/pty-actuator.js +371 -0
  25. package/dist/runtime/drive/pty-actuator.js.map +1 -0
  26. package/dist/runtime/local-files/paths.js +1 -1
  27. package/dist/runtime/local-files/paths.js.map +1 -1
  28. package/dist/runtime/local-files/presence.d.ts.map +1 -1
  29. package/dist/runtime/local-files/presence.js +10 -1
  30. package/dist/runtime/local-files/presence.js.map +1 -1
  31. package/dist/runtime/loop/engine/adapters.d.ts +7 -1
  32. package/dist/runtime/loop/engine/adapters.d.ts.map +1 -1
  33. package/dist/runtime/loop/engine/adapters.js +43 -11
  34. package/dist/runtime/loop/engine/adapters.js.map +1 -1
  35. package/dist/runtime/loop/engine/decision.d.ts +5 -1
  36. package/dist/runtime/loop/engine/decision.d.ts.map +1 -1
  37. package/dist/runtime/loop/engine/decision.js +9 -3
  38. package/dist/runtime/loop/engine/decision.js.map +1 -1
  39. package/dist/runtime/loop/index.d.ts +2 -0
  40. package/dist/runtime/loop/index.d.ts.map +1 -1
  41. package/dist/runtime/loop/index.js +11 -3
  42. package/dist/runtime/loop/index.js.map +1 -1
  43. package/dist/runtime/mcp/agent-launch.d.ts +2 -1
  44. package/dist/runtime/mcp/agent-launch.d.ts.map +1 -1
  45. package/dist/runtime/mcp/agent-launch.js +51 -8
  46. package/dist/runtime/mcp/agent-launch.js.map +1 -1
  47. package/dist/runtime/mcp/handlers.d.ts.map +1 -1
  48. package/dist/runtime/mcp/handlers.js +17 -0
  49. package/dist/runtime/mcp/handlers.js.map +1 -1
  50. package/dist/runtime/mcp/stdio.d.ts +2 -0
  51. package/dist/runtime/mcp/stdio.d.ts.map +1 -1
  52. package/dist/runtime/mcp/stdio.js +8 -5
  53. package/dist/runtime/mcp/stdio.js.map +1 -1
  54. package/dist/runtime/mcp/tools.d.ts.map +1 -1
  55. package/dist/runtime/mcp/tools.js +19 -6
  56. package/dist/runtime/mcp/tools.js.map +1 -1
  57. package/dist/runtime/memory/admit-client.d.ts +30 -0
  58. package/dist/runtime/memory/admit-client.d.ts.map +1 -0
  59. package/dist/runtime/memory/admit-client.js +44 -0
  60. package/dist/runtime/memory/admit-client.js.map +1 -0
  61. package/dist/runtime/memory/d11-ceremony.d.ts +731 -0
  62. package/dist/runtime/memory/d11-ceremony.d.ts.map +1 -0
  63. package/dist/runtime/memory/d11-ceremony.js +1282 -0
  64. package/dist/runtime/memory/d11-ceremony.js.map +1 -0
  65. package/dist/runtime/memory/graphify-contracts-v2.vendored.d.ts +922 -0
  66. package/dist/runtime/memory/graphify-contracts-v2.vendored.d.ts.map +1 -0
  67. package/dist/runtime/memory/graphify-contracts-v2.vendored.js +2 -0
  68. package/dist/runtime/memory/graphify-contracts-v2.vendored.js.map +1 -0
  69. package/dist/runtime/memory/note-builder.d.ts +83 -0
  70. package/dist/runtime/memory/note-builder.d.ts.map +1 -0
  71. package/dist/runtime/memory/note-builder.js +89 -0
  72. package/dist/runtime/memory/note-builder.js.map +1 -0
  73. package/dist/runtime/memory/port-v1.d.ts +235 -0
  74. package/dist/runtime/memory/port-v1.d.ts.map +1 -0
  75. package/dist/runtime/memory/port-v1.js +129 -0
  76. package/dist/runtime/memory/port-v1.js.map +1 -0
  77. package/dist/runtime/memory/port-v2-adapter.d.ts +117 -0
  78. package/dist/runtime/memory/port-v2-adapter.d.ts.map +1 -0
  79. package/dist/runtime/memory/port-v2-adapter.js +140 -0
  80. package/dist/runtime/memory/port-v2-adapter.js.map +1 -0
  81. package/dist/runtime/memory/port-v2-compat.d.ts +50 -0
  82. package/dist/runtime/memory/port-v2-compat.d.ts.map +1 -0
  83. package/dist/runtime/memory/port-v2-compat.js +102 -0
  84. package/dist/runtime/memory/port-v2-compat.js.map +1 -0
  85. package/dist/runtime/memory/preflight.d.ts +17 -0
  86. package/dist/runtime/memory/preflight.d.ts.map +1 -0
  87. package/dist/runtime/memory/preflight.js +18 -0
  88. package/dist/runtime/memory/preflight.js.map +1 -0
  89. package/dist/runtime/memory/promote-client.d.ts +172 -0
  90. package/dist/runtime/memory/promote-client.d.ts.map +1 -0
  91. package/dist/runtime/memory/promote-client.js +168 -0
  92. package/dist/runtime/memory/promote-client.js.map +1 -0
  93. package/dist/runtime/memory/recall-client.d.ts +74 -0
  94. package/dist/runtime/memory/recall-client.d.ts.map +1 -0
  95. package/dist/runtime/memory/recall-client.js +91 -0
  96. package/dist/runtime/memory/recall-client.js.map +1 -0
  97. package/dist/session.d.ts +4 -0
  98. package/dist/session.d.ts.map +1 -1
  99. package/dist/session.js +7 -0
  100. package/dist/session.js.map +1 -1
  101. package/package.json +7 -4
  102. package/skills/h2a-run/SKILL.md +39 -6
@@ -8,7 +8,7 @@ description: Translate a friendly launch intent ("terra 5.6 xhigh", "codex sol h
8
8
  ## When to use this
9
9
 
10
10
  - The user names a launch by nickname + effort ("terra 5.6 xhigh", "sol en max", "relance codex en xhigh") instead of a provider model id.
11
- - The user wants a background or interactive Claude/Codex session with a specific reasoning effort, with or without the llm-mesh gateway, and needs the exact CLI flags or MCP parameters.
11
+ - The user wants a background or interactive Claude/Codex/AGY session with a specific reasoning effort, with or without the llm-mesh gateway, and needs the exact CLI flags or MCP parameters.
12
12
  - **Not** for deciding *which* flavor is best for a task (that is a human/model-delegation call, not this skill's job), and **not** for resolving alias→upstream-provider routing — that table is owned by the llm-mesh gateway, not this skill (see Step 2).
13
13
 
14
14
  ## Hard rule: never call the raw `h2a` binary from Bash
@@ -19,9 +19,9 @@ This plugin's PreToolUse hook (`packages/h2a/hooks/deny-manual-h2a-cli.mjs`) blo
19
19
 
20
20
  None of these require knowing a provider model id up front:
21
21
 
22
- 1. **Profile** — `claude` or `codex` (which CLI to launch). Default to whichever CLI the user is already in if unstated; ask if genuinely ambiguous.
22
+ 1. **Profile** — `claude`, `codex`, or `agy` (which CLI to launch). Default to whichever CLI the user is already in if unstated; ask if genuinely ambiguous.
23
23
  2. **Model flavor** — a nickname like *terra*, *sol* (aka *fable*), *luna*, or unstated (→ the CLI's own default model). Resolves to a `--model` / `model` value (Step 2).
24
- 3. **Effort** — `low | medium | high | xhigh`. "max" said by the user means `xhigh` — there is no higher tier for `h2a run` / `h2a_run` today.
24
+ 3. **Effort** — `low | medium | high | xhigh`. For Claude/Codex, "max" means `xhigh`; AGY accepts only `low | medium | high` and rejects both `xhigh` and "max".
25
25
 
26
26
  ## Step 2 — resolve the model flavor (source-of-truth caveat)
27
27
 
@@ -39,11 +39,13 @@ Any non-default flavor needs the llm-mesh gateway to translate the Anthropic-sha
39
39
  - CLI: `--gw` (alias `--llm-gateway`) forces it on, `--no-gw` (alias `--no-llm-gateway`) forces it off, omit for the CLI's own default.
40
40
  - MCP `h2a_run`: `gateway: "required"` forces it on, `"off"` forces it off, `"auto"` (default) decides. **`"required"` is rejected when `profile` is `"codex"`** — codex already talks to llm-mesh over an Anthropic-compatible surface, use `"auto"` there.
41
41
 
42
+ AGY is the exception to the named-flavor rule: it talks to its provider directly. Use `gateway: "off"` for `profile: "agy"`; `"required"` is rejected. AGY accepts effort `low|medium|high`, not `xhigh`, and supports run-once mode through its verified `--print` stdin contract. Resolve the exact AGY model with `agy models`; for example, the displayed "Gemini 3.7 Flash (High)" id is `gemini-3.7-flash-high`.
43
+
42
44
  ## Step 4 — compose the call
43
45
 
44
46
  ### `h2a_run` MCP tool (what this agent must use)
45
47
 
46
- Required: `profile` (`"claude"|"codex"`), `name` (`^[A-Za-z0-9_-]{1,64}$`), `workspace` (absolute path, must exist, must stay inside the MCP server's startup workspace root), `prompt` (1–65536 UTF-8 bytes, sent on stdin — never put it in argv), `background` (must be literal `true`). Optional: `model` (free-text, format-checked only — see Step 2 for the value), `effort` (`"low"|"medium"|"high"|"xhigh"`), `gateway` (`"auto"|"required"|"off"`, default `"auto"`), `headless` (default `false`), `h2aSidecar` (default `!headless`; cannot be `true` together with `headless: true`).
48
+ Required: `profile` (`"claude"|"codex"|"agy"`), `name` (`^[A-Za-z0-9_-]{1,64}$`), `workspace` (absolute path, must exist, must stay inside the MCP server's startup workspace root), `prompt` (1–65536 UTF-8 bytes, sent on stdin — never put it in argv), `background` (must be literal `true`). Optional: `agent` (AGY only; for example `"stp"`), `model` (free-text, format-checked only — see Step 2 for the value), `effort` (`"low"|"medium"|"high"|"xhigh"`; AGY rejects `xhigh`), `gateway` (`"auto"|"required"|"off"`, default `"auto"`; AGY uses `"off"`), `headless` (default `false`; AGY maps `true` to `--print`), `h2aSidecar` (default `!headless`; cannot be `true` together with `headless: true`).
47
49
 
48
50
  Example — "terra, xhigh, headless, on this repo":
49
51
 
@@ -63,6 +65,24 @@ Example — "terra, xhigh, headless, on this repo":
63
65
 
64
66
  The tool returns an `h2a.run.result` contract with `session.tmuxSession`, `session.pane`, `session.gateway` (`"gateway"|"direct"`). Read those fields back to confirm what actually launched — do not assume the request was honored silently.
65
67
 
68
+ Example — direct AGY run-once:
69
+
70
+ ```json
71
+ {
72
+ "profile": "agy",
73
+ "name": "gemini-review",
74
+ "workspace": "/abs/path/to/repo",
75
+ "prompt": "<initial instructions>",
76
+ "background": true,
77
+ "agent": "stp",
78
+ "model": "gemini-3.7-flash-high",
79
+ "effort": "high",
80
+ "gateway": "off",
81
+ "headless": true,
82
+ "h2aSidecar": false
83
+ }
84
+ ```
85
+
66
86
  ### `h2a run` CLI (reference only — non-Claude-Code hosts / humans at a terminal)
67
87
 
68
88
  ```
@@ -75,10 +95,23 @@ Interactive/attached form (drop the background-launch flags, add nothing else):
75
95
  h2a run claude . --model gpt-5.6-terra --effort xhigh --gw --name terra-review
76
96
  ```
77
97
 
98
+ Direct AGY run-once form (prompt delivered on stdin):
99
+
100
+ ```
101
+ h2a run agy . --agent stp --model gemini-3.7-flash-high --effort high --no-gw --name gemini-review --no-attach --background --json --headless --no-h2a --prompt-stdin
102
+ ```
103
+
104
+ Interactive AGY keeps the TUI and accepts the same prompt-over-stdin contract; resume uses AGY's native `--conversation` argv through h2a's `-r/--resume` option:
105
+
106
+ ```
107
+ h2a run agy . --agent stp --model gemini-3.7-flash-high --effort high --no-gw --name gemini-review --prompt-stdin
108
+ h2a run agy . -r <conversation-id> --agent stp --model gemini-3.7-flash-high --effort high --no-gw --name gemini-review
109
+ ```
110
+
78
111
  Other `h2a run` flags worth knowing:
79
112
 
80
- - `-r, --resume <convId>` — continue a conversation; combine with `--model`/`--effort` to relaunch the same conversation at a different flavor/effort.
81
- - `--headless` — run once, record output under `.h2a/runs/<name>`, then exit (cannot combine with `--h2a`).
113
+ - `-r, --resume <convId>` — continue a conversation; combine with `--model`/`--effort` to relaunch the same conversation at a different flavor/effort (AGY maps this to `--conversation <convId>`).
114
+ - `--headless` — run once, record output under `.h2a/runs/<name>`, then exit (cannot combine with `--h2a`; AGY uses `--input-format stream-json --output-format stream-json`, with one escaped `user` event on stdin).
82
115
  - `--count <n>` — fan out N fresh sessions; incompatible with `--model`/`--effort`/`--resume`/any structured launch (each fanned session is a fresh conversation).
83
116
  - `--h2a` / `--no-h2a` — start (or skip) the side-window h2a MCP server; defaults on unless `--headless`.
84
117
  - `--name <label>` — tmux slug + tab label; defaults to the workspace dirname. Pick one deliberately when launching more than one session against the same repo.