@nac3/forge-cli 1.24.1 → 1.25.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 (83) hide show
  1. package/dist/chat/agent_session.d.ts.map +1 -1
  2. package/dist/chat/agent_session.js +132 -12
  3. package/dist/chat/agent_session.js.map +1 -1
  4. package/dist/chat/panel.d.ts.map +1 -1
  5. package/dist/chat/panel.js +31 -4
  6. package/dist/chat/panel.js.map +1 -1
  7. package/dist/chat/server.d.ts.map +1 -1
  8. package/dist/chat/server.js +29 -3
  9. package/dist/chat/server.js.map +1 -1
  10. package/dist/chat/tools/keys.d.ts.map +1 -1
  11. package/dist/chat/tools/keys.js +22 -2
  12. package/dist/chat/tools/keys.js.map +1 -1
  13. package/dist/chat/tools/pending.d.ts +3 -0
  14. package/dist/chat/tools/pending.d.ts.map +1 -1
  15. package/dist/chat/tools/pending.js +40 -3
  16. package/dist/chat/tools/pending.js.map +1 -1
  17. package/dist/chat/tools/session_verbs.d.ts +81 -0
  18. package/dist/chat/tools/session_verbs.d.ts.map +1 -1
  19. package/dist/chat/tools/session_verbs.js +188 -18
  20. package/dist/chat/tools/session_verbs.js.map +1 -1
  21. package/dist/chat/tools/shell.d.ts.map +1 -1
  22. package/dist/chat/tools/shell.js +22 -0
  23. package/dist/chat/tools/shell.js.map +1 -1
  24. package/dist/commands/limits.d.ts.map +1 -1
  25. package/dist/commands/limits.js +9 -1
  26. package/dist/commands/limits.js.map +1 -1
  27. package/dist/commands/pending.d.ts.map +1 -1
  28. package/dist/commands/pending.js +26 -1
  29. package/dist/commands/pending.js.map +1 -1
  30. package/dist/commands/urazuke.d.ts.map +1 -1
  31. package/dist/commands/urazuke.js +82 -0
  32. package/dist/commands/urazuke.js.map +1 -1
  33. package/dist/core/limits_config.d.ts +50 -0
  34. package/dist/core/limits_config.d.ts.map +1 -1
  35. package/dist/core/limits_config.js +59 -0
  36. package/dist/core/limits_config.js.map +1 -1
  37. package/dist/core/provider_keys.d.ts +33 -0
  38. package/dist/core/provider_keys.d.ts.map +1 -1
  39. package/dist/core/provider_keys.js +40 -3
  40. package/dist/core/provider_keys.js.map +1 -1
  41. package/dist/docs/doctrine/session-orchestration.md +91 -86
  42. package/dist/llm/sse_stream.d.ts +3 -0
  43. package/dist/llm/sse_stream.d.ts.map +1 -1
  44. package/dist/llm/sse_stream.js +16 -2
  45. package/dist/llm/sse_stream.js.map +1 -1
  46. package/dist/mcp/bridge_registry.d.ts +1 -1
  47. package/dist/pending/store.d.ts +12 -0
  48. package/dist/pending/store.d.ts.map +1 -1
  49. package/dist/pending/store.js +20 -0
  50. package/dist/pending/store.js.map +1 -1
  51. package/dist/pending/types.d.ts +11 -0
  52. package/dist/pending/types.d.ts.map +1 -1
  53. package/dist/pending/types.js.map +1 -1
  54. package/dist/tasks/supervisor.d.ts +31 -0
  55. package/dist/tasks/supervisor.d.ts.map +1 -1
  56. package/dist/tasks/supervisor.js +61 -5
  57. package/dist/tasks/supervisor.js.map +1 -1
  58. package/dist/urazuke/close_gate.d.ts +47 -3
  59. package/dist/urazuke/close_gate.d.ts.map +1 -1
  60. package/dist/urazuke/close_gate.js +57 -3
  61. package/dist/urazuke/close_gate.js.map +1 -1
  62. package/dist/urazuke/evidence.d.ts +5 -0
  63. package/dist/urazuke/evidence.d.ts.map +1 -1
  64. package/dist/urazuke/evidence.js +61 -3
  65. package/dist/urazuke/evidence.js.map +1 -1
  66. package/dist/urazuke/external_audit.d.ts +89 -0
  67. package/dist/urazuke/external_audit.d.ts.map +1 -0
  68. package/dist/urazuke/external_audit.js +309 -0
  69. package/dist/urazuke/external_audit.js.map +1 -0
  70. package/dist/version.d.ts +1 -1
  71. package/dist/version.js +1 -1
  72. package/docs/doctrine/session-orchestration.md +91 -86
  73. package/package.json +1 -1
  74. package/src/i18n/catalogs/ar.json +570 -568
  75. package/src/i18n/catalogs/de.json +570 -568
  76. package/src/i18n/catalogs/en.json +570 -568
  77. package/src/i18n/catalogs/es.json +570 -568
  78. package/src/i18n/catalogs/fr.json +570 -568
  79. package/src/i18n/catalogs/hi.json +570 -568
  80. package/src/i18n/catalogs/it.json +570 -568
  81. package/src/i18n/catalogs/ja.json +570 -568
  82. package/src/i18n/catalogs/pt.json +570 -568
  83. package/src/i18n/catalogs/zh.json +570 -568
@@ -1,86 +1,91 @@
1
- # Doctrine: session orchestration (yujin.session.*)
2
-
3
- When it is optimal, you may launch other `yf chat` instances as
4
- HEADLESS AGENT sub-sessions to do orthogonal, well-scoped work in
5
- parallel with this conversation, and collect their results over the
6
- coordination bridge. This is the `yujin.session.*` verb family.
7
-
8
- This doctrine is about WHEN to spawn and how to keep it safe and
9
- cheap. It is distinct from `agent-orchestrator` (product-side agents
10
- the generated software dispatches on the user's machine).
11
-
12
- ## Off by default
13
-
14
- The whole capability is gated by `multiagent.enabled` in the limits
15
- config (Ajustes > Limites), DEFAULT OFF. While off, the
16
- `yujin.session.*` verbs are hidden from the manifest, this doctrine is
17
- not injected, the system prompt tells you it is OFF, and the handlers
18
- refuse. So you only see + use these verbs when the user has explicitly
19
- turned multi-agent on. If the user asks for parallel sub-sessions while
20
- it is off, tell them to enable it in Ajustes > Limites.
21
-
22
- ## The verbs
23
-
24
- - `yujin.session.spawn { task, project_root?, budget_tokens?, label? }`
25
- -- launch a sub-session for one self-contained task. Returns a
26
- handle immediately (NON-blocking). The user approves each spawn
27
- (it spends BYOK tokens autonomously).
28
- - `yujin.session.collect { handle?, wait_ms? }` -- read the results
29
- sub-sessions have published. `wait_ms` blocks up to that long for
30
- at least one result; default 0 = return whatever has arrived.
31
- - `yujin.session.list` -- what you have spawned + whether each is
32
- still alive.
33
- - `yujin.session.stop { handle }` -- terminate one.
34
-
35
- ## Spawn ONLY when it pays off
36
-
37
- A sub-session boots a whole headless server and spends tokens, so the
38
- overhead must be justified. Spawn when ALL of these hold:
39
-
40
- 1. **Orthogonal** -- the subtask is independent of the work you are
41
- doing right now; it does not need the live conversation context.
42
- (The child gets ONLY the `task` string you write -- be specific.)
43
- 2. **Parallelizable** -- it can run while you keep working, and you
44
- genuinely benefit from not blocking on it (e.g. a wide read /
45
- research / analysis sweep over a different subsystem).
46
- 3. **No write collision** -- it will not edit the same files you are
47
- editing. If both might write, scope them to different paths or do
48
- it yourself.
49
- 4. **Fits a budget** -- set `budget_tokens` to bound the spend.
50
-
51
- Do NOT spawn for:
52
-
53
- - Trivial tasks (a single read, a one-line answer) -- the overhead
54
- costs more than doing it inline.
55
- - Anything that needs the user's live judgement or the chat history.
56
- - Work you could do with one of your own verbs in this turn.
57
-
58
- Typical good uses: "map how subsystem X wires together and report the
59
- key files + entry points", "search the whole repo for every place
60
- pattern Y appears and summarise", "read these 8 docs and extract the
61
- constraints". Launch one per independent angle, then `collect`.
62
-
63
- ## The child's scope (enforced, not advisory)
64
-
65
- A sub-session runs with a RESTRICTED verb scope (enforced in
66
- `nac3_invoke` via `YF_AGENT_MODE`):
67
-
68
- - CAN: read / search / write files in its project root, run SAFE
69
- shell, query the graph / pendings / reader.
70
- - CANNOT: `git push` / `git commit`, destructive actions, `fs.move`,
71
- re-anchor the project, mutate the workflow / pending / keys, run
72
- lifecycle servers, or spawn its OWN sub-sessions (no grandchildren).
73
-
74
- So the child is a safe builder/analyst. Anything outward or
75
- irreversible stays with YOU, the parent, where the user can approve
76
- it. Have the child RETURN its deliverable; you surface it (pizarron,
77
- etc.) and you do the push/commit.
78
-
79
- ## Lifecycle
80
-
81
- Sub-sessions are one-shot: a child runs its task to completion (a
82
- `[SESSION_DONE]` marker), publishes its result, and exits. The full
83
- result is written to disk; the bridge signal carries a summary + the
84
- path. Always `collect` what you spawn -- do not leave results
85
- unread. If a child is no longer useful or is burning budget, `stop`
86
- it.
1
+ # Doctrine: session orchestration (yujin.session.*)
2
+
3
+ When it is optimal, you may launch other `yf chat` instances as
4
+ HEADLESS AGENT sub-sessions to do orthogonal, well-scoped work in
5
+ parallel with this conversation, and collect their results over the
6
+ coordination bridge. This is the `yujin.session.*` verb family.
7
+
8
+ This doctrine is about WHEN to spawn and how to keep it safe and
9
+ cheap. It is distinct from `agent-orchestrator` (product-side agents
10
+ the generated software dispatches on the user's machine).
11
+
12
+ ## Off by default
13
+
14
+ The whole capability is gated by `multiagent.enabled` in the limits
15
+ config (Ajustes > Limites), DEFAULT OFF. While off, the
16
+ `yujin.session.*` verbs are hidden from the manifest, this doctrine is
17
+ not injected, the system prompt tells you it is OFF, and the handlers
18
+ refuse. So you only see + use these verbs when the user has explicitly
19
+ turned multi-agent on. If the user asks for parallel sub-sessions while
20
+ it is off, tell them to enable it in Ajustes > Limites.
21
+
22
+ ## The verbs
23
+
24
+ - `yujin.session.spawn { task, project_root?, budget_tokens?, label? }`
25
+ -- launch a sub-session for one self-contained task. Returns a
26
+ handle immediately (NON-blocking). The user approves each spawn
27
+ (it spends BYOK tokens autonomously).
28
+ - `yujin.session.collect { handle?, wait_ms? }` -- read the results
29
+ sub-sessions have published. `wait_ms` blocks up to that long for
30
+ at least one result; default 0 = return whatever has arrived.
31
+ - `yujin.session.list` -- what you have spawned, with TWO facts that are
32
+ not the same one (PND-256): `alive` is whether the process exists
33
+ (asked of the OS), and `registered` is whether the child already
34
+ published itself on the coordination bridge. A child can be alive and
35
+ not yet registered (booting), and a dead child can linger in the
36
+ roster. Reading one as the other costs either a needless relaunch or
37
+ an endless wait.
38
+ - `yujin.session.stop { handle }` -- terminate one.
39
+
40
+ ## Spawn ONLY when it pays off
41
+
42
+ A sub-session boots a whole headless server and spends tokens, so the
43
+ overhead must be justified. Spawn when ALL of these hold:
44
+
45
+ 1. **Orthogonal** -- the subtask is independent of the work you are
46
+ doing right now; it does not need the live conversation context.
47
+ (The child gets ONLY the `task` string you write -- be specific.)
48
+ 2. **Parallelizable** -- it can run while you keep working, and you
49
+ genuinely benefit from not blocking on it (e.g. a wide read /
50
+ research / analysis sweep over a different subsystem).
51
+ 3. **No write collision** -- it will not edit the same files you are
52
+ editing. If both might write, scope them to different paths or do
53
+ it yourself.
54
+ 4. **Fits a budget** -- set `budget_tokens` to bound the spend.
55
+
56
+ Do NOT spawn for:
57
+
58
+ - Trivial tasks (a single read, a one-line answer) -- the overhead
59
+ costs more than doing it inline.
60
+ - Anything that needs the user's live judgement or the chat history.
61
+ - Work you could do with one of your own verbs in this turn.
62
+
63
+ Typical good uses: "map how subsystem X wires together and report the
64
+ key files + entry points", "search the whole repo for every place
65
+ pattern Y appears and summarise", "read these 8 docs and extract the
66
+ constraints". Launch one per independent angle, then `collect`.
67
+
68
+ ## The child's scope (enforced, not advisory)
69
+
70
+ A sub-session runs with a RESTRICTED verb scope (enforced in
71
+ `nac3_invoke` via `YF_AGENT_MODE`):
72
+
73
+ - CAN: read / search / write files in its project root, run SAFE
74
+ shell, query the graph / pendings / reader.
75
+ - CANNOT: `git push` / `git commit`, destructive actions, `fs.move`,
76
+ re-anchor the project, mutate the workflow / pending / keys, run
77
+ lifecycle servers, or spawn its OWN sub-sessions (no grandchildren).
78
+
79
+ So the child is a safe builder/analyst. Anything outward or
80
+ irreversible stays with YOU, the parent, where the user can approve
81
+ it. Have the child RETURN its deliverable; you surface it (pizarron,
82
+ etc.) and you do the push/commit.
83
+
84
+ ## Lifecycle
85
+
86
+ Sub-sessions are one-shot: a child runs its task to completion (a
87
+ `[SESSION_DONE]` marker), publishes its result, and exits. The full
88
+ result is written to disk; the bridge signal carries a summary + the
89
+ path. Always `collect` what you spawn -- do not leave results
90
+ unread. If a child is no longer useful or is burning budget, `stop`
91
+ it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nac3/forge-cli",
3
- "version": "1.24.1",
3
+ "version": "1.25.0",
4
4
  "description": "Yujin Forge -- voice-first NAC-3 React development framework. CLI + chat panel + spec ingest + 10-format document reader + voice loop.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Pablo Kuschnirof <pablo@rpaforce.com>",