@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.
- package/dist/chat/agent_session.d.ts.map +1 -1
- package/dist/chat/agent_session.js +132 -12
- package/dist/chat/agent_session.js.map +1 -1
- package/dist/chat/panel.d.ts.map +1 -1
- package/dist/chat/panel.js +31 -4
- package/dist/chat/panel.js.map +1 -1
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +29 -3
- package/dist/chat/server.js.map +1 -1
- package/dist/chat/tools/keys.d.ts.map +1 -1
- package/dist/chat/tools/keys.js +22 -2
- package/dist/chat/tools/keys.js.map +1 -1
- package/dist/chat/tools/pending.d.ts +3 -0
- package/dist/chat/tools/pending.d.ts.map +1 -1
- package/dist/chat/tools/pending.js +40 -3
- package/dist/chat/tools/pending.js.map +1 -1
- package/dist/chat/tools/session_verbs.d.ts +81 -0
- package/dist/chat/tools/session_verbs.d.ts.map +1 -1
- package/dist/chat/tools/session_verbs.js +188 -18
- package/dist/chat/tools/session_verbs.js.map +1 -1
- package/dist/chat/tools/shell.d.ts.map +1 -1
- package/dist/chat/tools/shell.js +22 -0
- package/dist/chat/tools/shell.js.map +1 -1
- package/dist/commands/limits.d.ts.map +1 -1
- package/dist/commands/limits.js +9 -1
- package/dist/commands/limits.js.map +1 -1
- package/dist/commands/pending.d.ts.map +1 -1
- package/dist/commands/pending.js +26 -1
- package/dist/commands/pending.js.map +1 -1
- package/dist/commands/urazuke.d.ts.map +1 -1
- package/dist/commands/urazuke.js +82 -0
- package/dist/commands/urazuke.js.map +1 -1
- package/dist/core/limits_config.d.ts +50 -0
- package/dist/core/limits_config.d.ts.map +1 -1
- package/dist/core/limits_config.js +59 -0
- package/dist/core/limits_config.js.map +1 -1
- package/dist/core/provider_keys.d.ts +33 -0
- package/dist/core/provider_keys.d.ts.map +1 -1
- package/dist/core/provider_keys.js +40 -3
- package/dist/core/provider_keys.js.map +1 -1
- package/dist/docs/doctrine/session-orchestration.md +91 -86
- package/dist/llm/sse_stream.d.ts +3 -0
- package/dist/llm/sse_stream.d.ts.map +1 -1
- package/dist/llm/sse_stream.js +16 -2
- package/dist/llm/sse_stream.js.map +1 -1
- package/dist/mcp/bridge_registry.d.ts +1 -1
- package/dist/pending/store.d.ts +12 -0
- package/dist/pending/store.d.ts.map +1 -1
- package/dist/pending/store.js +20 -0
- package/dist/pending/store.js.map +1 -1
- package/dist/pending/types.d.ts +11 -0
- package/dist/pending/types.d.ts.map +1 -1
- package/dist/pending/types.js.map +1 -1
- package/dist/tasks/supervisor.d.ts +31 -0
- package/dist/tasks/supervisor.d.ts.map +1 -1
- package/dist/tasks/supervisor.js +61 -5
- package/dist/tasks/supervisor.js.map +1 -1
- package/dist/urazuke/close_gate.d.ts +47 -3
- package/dist/urazuke/close_gate.d.ts.map +1 -1
- package/dist/urazuke/close_gate.js +57 -3
- package/dist/urazuke/close_gate.js.map +1 -1
- package/dist/urazuke/evidence.d.ts +5 -0
- package/dist/urazuke/evidence.d.ts.map +1 -1
- package/dist/urazuke/evidence.js +61 -3
- package/dist/urazuke/evidence.js.map +1 -1
- package/dist/urazuke/external_audit.d.ts +89 -0
- package/dist/urazuke/external_audit.d.ts.map +1 -0
- package/dist/urazuke/external_audit.js +309 -0
- package/dist/urazuke/external_audit.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/doctrine/session-orchestration.md +91 -86
- package/package.json +1 -1
- package/src/i18n/catalogs/ar.json +570 -568
- package/src/i18n/catalogs/de.json +570 -568
- package/src/i18n/catalogs/en.json +570 -568
- package/src/i18n/catalogs/es.json +570 -568
- package/src/i18n/catalogs/fr.json +570 -568
- package/src/i18n/catalogs/hi.json +570 -568
- package/src/i18n/catalogs/it.json +570 -568
- package/src/i18n/catalogs/ja.json +570 -568
- package/src/i18n/catalogs/pt.json +570 -568
- 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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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.
|
|
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>",
|