@sentropic/h2a 0.98.7-rc.2 → 0.98.7-rc.4

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 (57) hide show
  1. package/.codex-plugin/plugin.json +1 -0
  2. package/dist/bin.js +3 -0
  3. package/dist/bin.js.map +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +38 -38
  6. package/dist/cli.js.map +1 -1
  7. package/dist/focus-build.d.ts +10 -0
  8. package/dist/focus-build.d.ts.map +1 -0
  9. package/dist/focus-build.js +175 -0
  10. package/dist/focus-build.js.map +1 -0
  11. package/dist/hosts/native-convergence.d.ts +36 -0
  12. package/dist/hosts/native-convergence.d.ts.map +1 -1
  13. package/dist/hosts/native-convergence.js +60 -4
  14. package/dist/hosts/native-convergence.js.map +1 -1
  15. package/dist/hosts/native-files.d.ts +5 -0
  16. package/dist/hosts/native-files.d.ts.map +1 -1
  17. package/dist/hosts/native-files.js +4 -0
  18. package/dist/hosts/native-files.js.map +1 -1
  19. package/dist/hosts/native-inspection.js +1 -1
  20. package/dist/hosts/native-inspection.js.map +1 -1
  21. package/dist/hosts/native-questions.d.ts +2 -0
  22. package/dist/hosts/native-questions.d.ts.map +1 -0
  23. package/dist/hosts/native-questions.js +22 -0
  24. package/dist/hosts/native-questions.js.map +1 -0
  25. package/dist/hosts/native-toml.d.ts.map +1 -1
  26. package/dist/hosts/native-toml.js +2 -0
  27. package/dist/hosts/native-toml.js.map +1 -1
  28. package/dist/hosts/plugin.d.ts +27 -0
  29. package/dist/hosts/plugin.d.ts.map +1 -1
  30. package/dist/hosts/plugin.js +28 -2
  31. package/dist/hosts/plugin.js.map +1 -1
  32. package/dist/hosts/vibe-discovery.js +1 -1
  33. package/dist/hosts/vibe-discovery.js.map +1 -1
  34. package/dist/hosts/vibe-equipment.d.ts +1 -0
  35. package/dist/hosts/vibe-equipment.d.ts.map +1 -1
  36. package/dist/hosts/vibe-equipment.js +14 -1
  37. package/dist/hosts/vibe-equipment.js.map +1 -1
  38. package/dist/runtime/mcp/tools.d.ts.map +1 -1
  39. package/dist/runtime/mcp/tools.js +5 -4
  40. package/dist/runtime/mcp/tools.js.map +1 -1
  41. package/focus-kit/dossier.schema.json +193 -0
  42. package/focus-kit/dossier.template.json +39 -0
  43. package/focus-kit/ecosystem.json +853 -0
  44. package/focus-kit/renderer-manifest.json +24 -0
  45. package/focus-kit/renderer.html +278 -0
  46. package/focus-kit/validator.mjs +789 -0
  47. package/hooks/hooks.json +11 -1
  48. package/hooks/workspace-scope-grant.mjs +22 -0
  49. package/hooks/workspace-scope-guard.mjs +277 -0
  50. package/hooks/workspace-scope-shell.mjs +558 -0
  51. package/hooks/workspace-scope-state.mjs +71 -0
  52. package/package.json +12 -6
  53. package/skills/h2a/SKILL.md +19 -0
  54. package/skills/h2a-run/SKILL.md +19 -0
  55. package/skills/harness/SKILL.md +19 -0
  56. package/skills/harness/track-report/SKILL.md +78 -5
  57. package/skills/harness/using-harness/SKILL.md +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentropic/h2a",
3
- "version": "0.98.7-rc.2",
3
+ "version": "0.98.7-rc.4",
4
4
  "description": "h2a — the unified CLI + core for human-to-agent coordination.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -42,7 +42,13 @@
42
42
  "schema",
43
43
  "focus-app",
44
44
  "hooks",
45
- "scripts"
45
+ "scripts",
46
+ "focus-kit/renderer.html",
47
+ "focus-kit/renderer-manifest.json",
48
+ "focus-kit/validator.mjs",
49
+ "focus-kit/dossier.template.json",
50
+ "focus-kit/dossier.schema.json",
51
+ "focus-kit/ecosystem.json"
46
52
  ],
47
53
  "publishConfig": {
48
54
  "access": "public"
@@ -52,20 +58,20 @@
52
58
  },
53
59
  "scripts": {
54
60
  "build": "node ../../scripts/clean-workspace-dist.mjs && tsc -b --force && node ../../scripts/copy-vendored-engram-live.mjs",
55
- "prepack": "node ../../scripts/check-focus-app.mjs && chmod +x dist/bin.js"
61
+ "prepack": "node ../../scripts/check-focus-app.mjs && node ../../scripts/build-focus-dossier.mjs --check && chmod +x dist/bin.js"
56
62
  },
57
63
  "dependencies": {
58
64
  "@hono/mcp": "^0.3.0",
59
65
  "@hono/node-server": "^2.0.12",
60
66
  "@modelcontextprotocol/sdk": "^1.30.0",
61
- "@sentropic/cluster-mesh": "0.13.3",
67
+ "@sentropic/cluster-mesh": "0.16.0",
62
68
  "@sentropic/contracts": "^0.3.0",
63
69
  "@sentropic/events": "^0.2.0",
64
- "@sentropic/track": "0.98.7-rc.2",
70
+ "@sentropic/track": "0.98.7-rc.4",
65
71
  "hono": "^4.13.7",
66
72
  "toml-eslint-parser": "0.10.1"
67
73
  },
68
74
  "peerDependencies": {
69
- "@sentropic/h2a-runtime": "0.98.7-rc.2"
75
+ "@sentropic/h2a-runtime": "0.98.7-rc.4"
70
76
  }
71
77
  }
@@ -6,6 +6,25 @@ description: Coordinate with other CLI agents (Claude Code, Codex, Gemini) via t
6
6
 
7
7
  # /h2a
8
8
 
9
+ ## Questions for the human
10
+
11
+ When a useful clarification needs a human answer, use the native structured-question tool exposed in the current mode of the current host:
12
+
13
+ | Host | Native question tool |
14
+ | --- | --- |
15
+ | claude | `AskUserQuestion` |
16
+ | codex | `request_user_input` |
17
+ | muse | `request_user_input` |
18
+ | agy | `ask_question` |
19
+ | gemini | `ask_user` |
20
+ | vibe | `ask_user_question` |
21
+
22
+ Codex may expose `request_user_input_async` instead; use the variant actually available. Gemini disallows `ask_user` in non-interactive mode; Muse removes `request_user_input` in `--yolo` or when disabled. For other hosts, use their exposed native question tool without guessing its name.
23
+
24
+ Offer clear choices and preserve native free-text input. Do not change modes or permissions to obtain a tool. A preference is not authorization; existing authorization remains valid. Continue independent work when the mode allows.
25
+
26
+ For a decision with stakes, present a decision dossier with a diagram before the native question; never a bare text question or an unexplained option menu. If the native tool is unavailable, explain the limitation and leave the decision pending. Plain text is acceptable only for a low-stakes clarification when no native question tool is available.
27
+
9
28
  When invoked, parse the arguments and dispatch to the matching subcommand below. If no subcommand is given, default to `status`.
10
29
 
11
30
  ```
@@ -5,6 +5,25 @@ description: Translate a friendly launch intent ("terra 5.6 xhigh", "codex sol h
5
5
 
6
6
  # h2a-run
7
7
 
8
+ ## Questions for the human
9
+
10
+ When a useful clarification needs a human answer, use the native structured-question tool exposed in the current mode of the current host:
11
+
12
+ | Host | Native question tool |
13
+ | --- | --- |
14
+ | claude | `AskUserQuestion` |
15
+ | codex | `request_user_input` |
16
+ | muse | `request_user_input` |
17
+ | agy | `ask_question` |
18
+ | gemini | `ask_user` |
19
+ | vibe | `ask_user_question` |
20
+
21
+ Codex may expose `request_user_input_async` instead; use the variant actually available. Gemini disallows `ask_user` in non-interactive mode; Muse removes `request_user_input` in `--yolo` or when disabled. For other hosts, use their exposed native question tool without guessing its name.
22
+
23
+ Offer clear choices and preserve native free-text input. Do not change modes or permissions to obtain a tool. A preference is not authorization; existing authorization remains valid. Continue independent work when the mode allows.
24
+
25
+ For a decision with stakes, present a decision dossier with a diagram before the native question; never a bare text question or an unexplained option menu. If the native tool is unavailable, explain the limitation and leave the decision pending. Plain text is acceptable only for a low-stakes clarification when no native question tool is available.
26
+
8
27
  ## When to use this
9
28
 
10
29
  - 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.
@@ -5,6 +5,25 @@ description: Route repository work through the sentropic harness method. Use in
5
5
 
6
6
  # Harness
7
7
 
8
+ ## Questions for the human
9
+
10
+ When a useful clarification needs a human answer, use the native structured-question tool exposed in the current mode of the current host:
11
+
12
+ | Host | Native question tool |
13
+ | --- | --- |
14
+ | claude | `AskUserQuestion` |
15
+ | codex | `request_user_input` |
16
+ | muse | `request_user_input` |
17
+ | agy | `ask_question` |
18
+ | gemini | `ask_user` |
19
+ | vibe | `ask_user_question` |
20
+
21
+ Codex may expose `request_user_input_async` instead; use the variant actually available. Gemini disallows `ask_user` in non-interactive mode; Muse removes `request_user_input` in `--yolo` or when disabled. For other hosts, use their exposed native question tool without guessing its name.
22
+
23
+ Offer clear choices and preserve native free-text input. Do not change modes or permissions to obtain a tool. A preference is not authorization; existing authorization remains valid. Continue independent work when the mode allows.
24
+
25
+ For a decision with stakes, present a decision dossier with a diagram before the native question; never a bare text question or an unexplained option menu. If the native tool is unavailable, explain the limitation and leave the decision pending. Plain text is acceptable only for a low-stakes clarification when no native question tool is available.
26
+
8
27
  Read `using-harness/SKILL.md` first in a sentropic repository. Then read only the workflow needed for the current task:
9
28
 
10
29
  - `brainstorm/SKILL.md` before creative or design work.
@@ -5,6 +5,76 @@ description: Use when the owner asks for a human contextual track report, status
5
5
 
6
6
  # harness/track-report
7
7
 
8
+ ## The served route: `--status-table`, rolling window, user language
9
+
10
+ For an owner status report, serve the validated report below with
11
+ `node "$track_bin" report --status-table --format md` (or `text`/`json`)
12
+ after the bootstrap. `--status-table` selects the validated four-section
13
+ route, never a separate table builder: over an identical period it renders
14
+ byte-identical sections, with DÉCISIONS and its decision expectations kept:
15
+ question, options with each consequence, readable in two minutes, dossier
16
+ link, then the owner's actual answer. Versions are supporting references in
17
+ parentheses, never the purpose.
18
+
19
+ The served window is rolling by default: `--status-table` without a selector
20
+ covers the last seven days (rolling `last-week`). `--period last-day`
21
+ restricts to the last day. An explicit `--period` or `--since`/`--until`
22
+ selector wins over the rolling default. Bounds always come from the journal
23
+ and the clock (`--now` pins the clock); never invent a period, a delivery, or
24
+ evidence. What the log does not record stays unrecorded: a missing stage,
25
+ merge or deployment proof is flagged, never fabricated.
26
+
27
+ The served synthesis is written in the user's language. `--lang <bcp47>`
28
+ selects the stage/status labels: exact match, then primary subtag, else the
29
+ neutral codes — never a silent French fallback. Quote machine tokens literally
30
+ — stage/status codes, `D1 A`-style replies, `[n.m]` handles, the
31
+ `ordre = priorité` line and renderer-emitted fixed lines — and write every
32
+ human sentence, including the meaning of those fixed lines, in the user's language.
33
+ A translated placeholder is still a placeholder: it fails the serving audit
34
+ below. Waiting on another lane and suspension belong in the action cell, with
35
+ no new color.
36
+
37
+ ## One row, one WP, one dossier — audited before serving
38
+
39
+ Every served À-FAIRE row carries exactly one strict WP attachment: the row's
40
+ WP cell names one WP, or `hors WP · items` with the outside-WP flag when no
41
+ strict ancestry exists — never silence, never two WPs. Every red row carries
42
+ exactly one investigated proposal; every blue-gated row carries exactly one
43
+ matching `D` number. A deferred dossier is not settled: it stays, with its
44
+ current answer need stated.
45
+
46
+ Stage and status are neutral codes over recorded evidence, never words to
47
+ guess: stage is one of `spec | dev | pr | merged | deployed`, status one of
48
+ `progressing | unforeseen | blocked | decision-awaited | not-qualified |
49
+ withdrawn`. Gates decide before stored marks: a live gate overrides a stored
50
+ green; nothing is
51
+ green without a conformity witness; `unforeseen` is a recorded reopening or
52
+ regression, or stale acceptance — never silence, never absence;
53
+ `not-qualified` and `withdrawn` carry no health colour. A withdrawal kept in
54
+ the served tables keeps its reason, or declares it missing.
55
+
56
+ Run the two structured audits before serving: `describeRowNextActions` plus
57
+ `auditNextActions(descriptors)` for the focus actions, and
58
+ `auditStatusProposals` plus `describeStatusProposals` (both in
59
+ `packages/track/src/report/audit.ts`) for red proposals and blue dossiers.
60
+ Presence and identity only: a green audit never certifies prose quality, and
61
+ the owner judges whether the sentence is right.
62
+
63
+ Audit the **served** data. Each À-FAIRE row carries machine `instruction`
64
+ (`to-instruct`, `not-instructed`, `structure-dossier`, `none-owed`, or
65
+ `investigated`) and `gateSteps` codes; translation must preserve those fields.
66
+ After investigating, set `instruction: investigated` and
67
+ `actionOrigin: investigated` beside the concrete `nextAction`. A gate-class
68
+ action keeps `actionOrigin: gate-class` in every language. Text alone never
69
+ certifies an instruction.
70
+
71
+ For each red item, add exactly one entry to the served view's `proposals`:
72
+ `{ itemId, proposal, proposalState: 'investigated' }`. Carry that exact proposal
73
+ in its row's `nextAction` and in RECOMMANDATION, in the requested language.
74
+ `proposalState: 'to-instruct'`, missing metadata, or absence from either served
75
+ section fails the audit. A stored `item.report-updated` proposal is a source
76
+ to investigate, never proof that the current report contains a fresh proposal.
77
+
8
78
  `track` supplies complete, deterministic facts and already renders the four sections the owner
9
79
  validated. The agent already in the conversation supplies the contextual synthesis on top of them. Do not
10
80
  call a model, adapter, gateway, or network-backed report path. Every command below is a local, read-only
@@ -112,7 +182,8 @@ bucket counters.
112
182
 
113
183
  **There is always a window, and it always has bounds.** "The whole log" *is* a window: first recorded
114
184
  event → journal head. With no selector, a self-evident header example is
115
- `période : <date du premier événement> → <date du dernier événement> (intégralité du journal, borne haute = dernier événement)`.
185
+ `période : <date du premier événement> → <date du dernier événement> (intégralité du journal, borne haute = dernier événement)` —
186
+ an example in the renderer's language, restated in the user's language in the served synthesis.
116
187
  The phrase `aucune fenêtre` is wrong — it described the absence of a flag, not the absence of a period.
117
188
 
118
189
  Scope the report to a measured period rather than filtering it by hand:
@@ -171,7 +242,7 @@ upward, nothing is lost — and the header declares how many (`8 sous-WP agrég
171
242
  re-expand them. They come back on a short window, or on the owner's explicit request
172
243
  (`track report --sub-wp`).
173
244
 
174
- **À-FAIRE** — exactly five columns: `WP · av. · à faire · bloqué · prochaine action`. There is no
245
+ **À-FAIRE** — exactly seven columns: `WP · av. · étape · statut · à faire · bloqué · prochaine action`. There is no
175
246
  `cible action` column; a DONE item carrying acceptance debt is named inside `à faire` with its bucket.
176
247
  Print the line `ordre = priorité ; les cinq premiers sont le focus` under the heading.
177
248
 
@@ -240,8 +311,9 @@ The renderer marks them `à instruire : ouvrir l'item et nommer le geste`; you m
240
311
  those markers before serving the report. Every other row keeps `non instruite`, which says plainly that
241
312
  the action has not been instructed — that is honest, and it is what you leave there.
242
313
 
243
- Checkable, and to be run before serving: `auditNextActions(values, gateClauses)` from
244
- `@sentropic/track` returns `{ uninstructed, repeated, gateClauses, ok }`. `uninstructed > 0` means focus
314
+ Checkable, and to be run before serving: `describeRowNextActions(rows)` from
315
+ `@sentropic/track` turns the served rows into audit descriptors, and
316
+ `auditNextActions(descriptors)` returns `{ uninstructed, repeated, gateClauses, ok }`. `uninstructed > 0` means focus
245
317
  rows still carry the renderer's marker — finish them. `ok === false` means a substantive action repeats
246
318
  on three or more rows, or equals a gate clause: in both cases it names a class, not a gesture. Not
247
319
  checkable, and the part that actually failed the UAT: whether the sentence is *right*. The owner judges
@@ -298,7 +370,8 @@ owner statement in this report request/current conversation, or (2) an explicitl
298
370
  session artifact that maps this exact item, WP, or directive to an executor (and, if claimed, model/effort).
299
371
  It excludes project memory, repository documents, installed configuration, defaults, prior conventions, and
300
372
  inference. Context may enrich executor prose only; it never overrides emitted order, gates, or facts. When
301
- the report needs model/effort but that narrow context is absent, write exactly:
373
+ the report needs model/effort but that narrow context is absent, write that meaning in
374
+ the user's language — the French reference wording is
302
375
  `exécuteur: contexte owner requis (modèle/effort non présents dans le journal)`.
303
376
 
304
377
  Do not call an absent `facts.wsjf` subjective "priority". A `priority-missing` directive means the log has
@@ -5,6 +5,25 @@ description: Load FIRST in any sentropic repo — establishes the harness method
5
5
 
6
6
  # Using harness
7
7
 
8
+ ## Questions for the human
9
+
10
+ When a useful clarification needs a human answer, use the native structured-question tool exposed in the current mode of the current host:
11
+
12
+ | Host | Native question tool |
13
+ | --- | --- |
14
+ | claude | `AskUserQuestion` |
15
+ | codex | `request_user_input` |
16
+ | muse | `request_user_input` |
17
+ | agy | `ask_question` |
18
+ | gemini | `ask_user` |
19
+ | vibe | `ask_user_question` |
20
+
21
+ Codex may expose `request_user_input_async` instead; use the variant actually available. Gemini disallows `ask_user` in non-interactive mode; Muse removes `request_user_input` in `--yolo` or when disabled. For other hosts, use their exposed native question tool without guessing its name.
22
+
23
+ Offer clear choices and preserve native free-text input. Do not change modes or permissions to obtain a tool. A preference is not authorization; existing authorization remains valid. Continue independent work when the mode allows.
24
+
25
+ For a decision with stakes, present a decision dossier with a diagram before the native question; never a bare text question or an unexplained option menu. If the native tool is unavailable, explain the limitation and leave the decision pending. Plain text is acceptable only for a low-stakes clarification when no native question tool is available.
26
+
8
27
  `@sentropic/harness` is the native dev-discipline layer for sentropic repos. Its verbs and `harness/*`
9
28
  skills are the SINGLE front door for code-work and PR-workflow. This skill is the index — load it
10
29
  before any other so the replacement directive below is in effect.