@nac3/forge-cli 1.26.0 → 1.27.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/panel.d.ts.map +1 -1
- package/dist/chat/panel.js +26 -0
- package/dist/chat/panel.js.map +1 -1
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +10 -1
- package/dist/chat/server.js.map +1 -1
- package/dist/chat/tools/reader.d.ts.map +1 -1
- package/dist/chat/tools/reader.js +24 -4
- package/dist/chat/tools/reader.js.map +1 -1
- package/dist/commands/operate.d.ts.map +1 -1
- package/dist/commands/operate.js +42 -0
- package/dist/commands/operate.js.map +1 -1
- package/dist/commands/urazuke.d.ts.map +1 -1
- package/dist/commands/urazuke.js +189 -9
- package/dist/commands/urazuke.js.map +1 -1
- package/dist/core/limits_config.d.ts +8 -0
- package/dist/core/limits_config.d.ts.map +1 -1
- package/dist/core/limits_config.js +19 -0
- package/dist/core/limits_config.js.map +1 -1
- package/dist/core/machine_files.d.ts +27 -0
- package/dist/core/machine_files.d.ts.map +1 -0
- package/dist/core/machine_files.js +97 -0
- package/dist/core/machine_files.js.map +1 -0
- package/dist/docs/doctrine/session-orchestration.md +109 -109
- package/dist/docs/doctrine/urazuke.md +221 -221
- package/dist/nac3/dispatch_log.d.ts +16 -1
- package/dist/nac3/dispatch_log.d.ts.map +1 -1
- package/dist/nac3/dispatch_log.js +29 -10
- package/dist/nac3/dispatch_log.js.map +1 -1
- package/dist/telemetry/battery_events.d.ts +91 -0
- package/dist/telemetry/battery_events.d.ts.map +1 -0
- package/dist/telemetry/battery_events.js +84 -0
- package/dist/telemetry/battery_events.js.map +1 -0
- package/dist/telemetry/usage.d.ts.map +1 -1
- package/dist/telemetry/usage.js +11 -25
- package/dist/telemetry/usage.js.map +1 -1
- package/dist/urazuke/freeze.d.ts.map +1 -1
- package/dist/urazuke/freeze.js +82 -16
- package/dist/urazuke/freeze.js.map +1 -1
- package/dist/urazuke/gates_data.d.ts +4 -1
- package/dist/urazuke/gates_data.d.ts.map +1 -1
- package/dist/urazuke/gates_data.js +7 -1
- package/dist/urazuke/gates_data.js.map +1 -1
- package/dist/urazuke/gates_ledger.d.ts +25 -1
- package/dist/urazuke/gates_ledger.d.ts.map +1 -1
- package/dist/urazuke/gates_ledger.js +30 -6
- package/dist/urazuke/gates_ledger.js.map +1 -1
- package/dist/urazuke/method_config.d.ts +116 -0
- package/dist/urazuke/method_config.d.ts.map +1 -0
- package/dist/urazuke/method_config.js +328 -0
- package/dist/urazuke/method_config.js.map +1 -0
- package/dist/urazuke/prompts_client.d.ts +42 -12
- package/dist/urazuke/prompts_client.d.ts.map +1 -1
- package/dist/urazuke/prompts_client.js +120 -16
- package/dist/urazuke/prompts_client.js.map +1 -1
- package/dist/urazuke/prompts_freeze.d.ts +186 -0
- package/dist/urazuke/prompts_freeze.d.ts.map +1 -0
- package/dist/urazuke/prompts_freeze.js +498 -0
- package/dist/urazuke/prompts_freeze.js.map +1 -0
- package/dist/urazuke/start.d.ts.map +1 -1
- package/dist/urazuke/start.js +42 -2
- package/dist/urazuke/start.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/doctrine/session-orchestration.md +109 -109
- package/docs/doctrine/urazuke.md +221 -221
- package/package.json +124 -124
package/dist/version.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Yujin Forge CLI version. Kept in sync with package.json by the npm
|
|
3
3
|
* "version" lifecycle (scripts/sync_version.mjs) so the two never drift.
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION = "1.
|
|
5
|
+
export declare const VERSION = "1.27.0";
|
|
6
6
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
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?, model? }`
|
|
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
|
-
`model` PINS the child brain as "provider/model" (PND-263). Without
|
|
29
|
-
it the child inherits the global `brain_config`, so its brain comes
|
|
30
|
-
out by OMISSION -- which is wrong whenever the brain is part of the
|
|
31
|
-
point. Measured in the Urazuke A/B experiment: the step-13 audit done
|
|
32
|
-
by the inherited non-frontier brain wrote FOUR of the nine findings it
|
|
33
|
-
announced, with a false P0; the same audit over the same commit with a
|
|
34
|
-
frontier brain wrote SEVENTEEN, all seventeen verified. The step asks
|
|
35
|
-
for a second opinion, and an inherited brain turns it into a
|
|
36
|
-
formality. Two rules on the pin, both deliberate: the slash is
|
|
37
|
-
REQUIRED (Forge never guesses the provider from the model name), and
|
|
38
|
-
an unknown provider -- or one whose key is not in the vault -- is
|
|
39
|
-
REFUSED at the door instead of silently falling back to another. A pin
|
|
40
|
-
also overrides the eco/frontier classifier and the escalation: it is a
|
|
41
|
-
request, not a preference.
|
|
42
|
-
- `yujin.session.collect { handle?, wait_ms? }` -- read the results
|
|
43
|
-
sub-sessions have published. `wait_ms` blocks up to that long for
|
|
44
|
-
at least one result; default 0 = return whatever has arrived.
|
|
45
|
-
- `yujin.session.list` -- what you have spawned, with TWO facts that are
|
|
46
|
-
not the same one (PND-256): `alive` is whether the process exists
|
|
47
|
-
(asked of the OS), and `registered` is whether the child already
|
|
48
|
-
published itself on the coordination bridge. A child can be alive and
|
|
49
|
-
not yet registered (booting), and a dead child can linger in the
|
|
50
|
-
roster. Reading one as the other costs either a needless relaunch or
|
|
51
|
-
an endless wait.
|
|
52
|
-
- `yujin.session.stop { handle }` -- terminate one.
|
|
53
|
-
|
|
54
|
-
## Spawn ONLY when it pays off
|
|
55
|
-
|
|
56
|
-
A sub-session boots a whole headless server and spends tokens, so the
|
|
57
|
-
overhead must be justified. Spawn when ALL of these hold:
|
|
58
|
-
|
|
59
|
-
1. **Orthogonal** -- the subtask is independent of the work you are
|
|
60
|
-
doing right now; it does not need the live conversation context.
|
|
61
|
-
(The child gets ONLY the `task` string you write -- be specific.)
|
|
62
|
-
2. **Parallelizable** -- it can run while you keep working, and you
|
|
63
|
-
genuinely benefit from not blocking on it (e.g. a wide read /
|
|
64
|
-
research / analysis sweep over a different subsystem).
|
|
65
|
-
3. **No write collision** -- it will not edit the same files you are
|
|
66
|
-
editing. If both might write, scope them to different paths or do
|
|
67
|
-
it yourself.
|
|
68
|
-
4. **Fits a budget** -- set `budget_tokens` to bound the spend.
|
|
69
|
-
5. **Brain chosen, not inherited** -- when the brain matters (an AUDIT
|
|
70
|
-
by another session, a review, a second opinion), pass `model`. An
|
|
71
|
-
auditor that comes out by omission satisfies the form of the step and
|
|
72
|
-
loses its point.
|
|
73
|
-
|
|
74
|
-
Do NOT spawn for:
|
|
75
|
-
|
|
76
|
-
- Trivial tasks (a single read, a one-line answer) -- the overhead
|
|
77
|
-
costs more than doing it inline.
|
|
78
|
-
- Anything that needs the user's live judgement or the chat history.
|
|
79
|
-
- Work you could do with one of your own verbs in this turn.
|
|
80
|
-
|
|
81
|
-
Typical good uses: "map how subsystem X wires together and report the
|
|
82
|
-
key files + entry points", "search the whole repo for every place
|
|
83
|
-
pattern Y appears and summarise", "read these 8 docs and extract the
|
|
84
|
-
constraints". Launch one per independent angle, then `collect`.
|
|
85
|
-
|
|
86
|
-
## The child's scope (enforced, not advisory)
|
|
87
|
-
|
|
88
|
-
A sub-session runs with a RESTRICTED verb scope (enforced in
|
|
89
|
-
`nac3_invoke` via `YF_AGENT_MODE`):
|
|
90
|
-
|
|
91
|
-
- CAN: read / search / write files in its project root, run SAFE
|
|
92
|
-
shell, query the graph / pendings / reader.
|
|
93
|
-
- CANNOT: `git push` / `git commit`, destructive actions, `fs.move`,
|
|
94
|
-
re-anchor the project, mutate the workflow / pending / keys, run
|
|
95
|
-
lifecycle servers, or spawn its OWN sub-sessions (no grandchildren).
|
|
96
|
-
|
|
97
|
-
So the child is a safe builder/analyst. Anything outward or
|
|
98
|
-
irreversible stays with YOU, the parent, where the user can approve
|
|
99
|
-
it. Have the child RETURN its deliverable; you surface it (pizarron,
|
|
100
|
-
etc.) and you do the push/commit.
|
|
101
|
-
|
|
102
|
-
## Lifecycle
|
|
103
|
-
|
|
104
|
-
Sub-sessions are one-shot: a child runs its task to completion (a
|
|
105
|
-
`[SESSION_DONE]` marker), publishes its result, and exits. The full
|
|
106
|
-
result is written to disk; the bridge signal carries a summary + the
|
|
107
|
-
path. Always `collect` what you spawn -- do not leave results
|
|
108
|
-
unread. If a child is no longer useful or is burning budget, `stop`
|
|
109
|
-
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?, model? }`
|
|
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
|
+
`model` PINS the child brain as "provider/model" (PND-263). Without
|
|
29
|
+
it the child inherits the global `brain_config`, so its brain comes
|
|
30
|
+
out by OMISSION -- which is wrong whenever the brain is part of the
|
|
31
|
+
point. Measured in the Urazuke A/B experiment: the step-13 audit done
|
|
32
|
+
by the inherited non-frontier brain wrote FOUR of the nine findings it
|
|
33
|
+
announced, with a false P0; the same audit over the same commit with a
|
|
34
|
+
frontier brain wrote SEVENTEEN, all seventeen verified. The step asks
|
|
35
|
+
for a second opinion, and an inherited brain turns it into a
|
|
36
|
+
formality. Two rules on the pin, both deliberate: the slash is
|
|
37
|
+
REQUIRED (Forge never guesses the provider from the model name), and
|
|
38
|
+
an unknown provider -- or one whose key is not in the vault -- is
|
|
39
|
+
REFUSED at the door instead of silently falling back to another. A pin
|
|
40
|
+
also overrides the eco/frontier classifier and the escalation: it is a
|
|
41
|
+
request, not a preference.
|
|
42
|
+
- `yujin.session.collect { handle?, wait_ms? }` -- read the results
|
|
43
|
+
sub-sessions have published. `wait_ms` blocks up to that long for
|
|
44
|
+
at least one result; default 0 = return whatever has arrived.
|
|
45
|
+
- `yujin.session.list` -- what you have spawned, with TWO facts that are
|
|
46
|
+
not the same one (PND-256): `alive` is whether the process exists
|
|
47
|
+
(asked of the OS), and `registered` is whether the child already
|
|
48
|
+
published itself on the coordination bridge. A child can be alive and
|
|
49
|
+
not yet registered (booting), and a dead child can linger in the
|
|
50
|
+
roster. Reading one as the other costs either a needless relaunch or
|
|
51
|
+
an endless wait.
|
|
52
|
+
- `yujin.session.stop { handle }` -- terminate one.
|
|
53
|
+
|
|
54
|
+
## Spawn ONLY when it pays off
|
|
55
|
+
|
|
56
|
+
A sub-session boots a whole headless server and spends tokens, so the
|
|
57
|
+
overhead must be justified. Spawn when ALL of these hold:
|
|
58
|
+
|
|
59
|
+
1. **Orthogonal** -- the subtask is independent of the work you are
|
|
60
|
+
doing right now; it does not need the live conversation context.
|
|
61
|
+
(The child gets ONLY the `task` string you write -- be specific.)
|
|
62
|
+
2. **Parallelizable** -- it can run while you keep working, and you
|
|
63
|
+
genuinely benefit from not blocking on it (e.g. a wide read /
|
|
64
|
+
research / analysis sweep over a different subsystem).
|
|
65
|
+
3. **No write collision** -- it will not edit the same files you are
|
|
66
|
+
editing. If both might write, scope them to different paths or do
|
|
67
|
+
it yourself.
|
|
68
|
+
4. **Fits a budget** -- set `budget_tokens` to bound the spend.
|
|
69
|
+
5. **Brain chosen, not inherited** -- when the brain matters (an AUDIT
|
|
70
|
+
by another session, a review, a second opinion), pass `model`. An
|
|
71
|
+
auditor that comes out by omission satisfies the form of the step and
|
|
72
|
+
loses its point.
|
|
73
|
+
|
|
74
|
+
Do NOT spawn for:
|
|
75
|
+
|
|
76
|
+
- Trivial tasks (a single read, a one-line answer) -- the overhead
|
|
77
|
+
costs more than doing it inline.
|
|
78
|
+
- Anything that needs the user's live judgement or the chat history.
|
|
79
|
+
- Work you could do with one of your own verbs in this turn.
|
|
80
|
+
|
|
81
|
+
Typical good uses: "map how subsystem X wires together and report the
|
|
82
|
+
key files + entry points", "search the whole repo for every place
|
|
83
|
+
pattern Y appears and summarise", "read these 8 docs and extract the
|
|
84
|
+
constraints". Launch one per independent angle, then `collect`.
|
|
85
|
+
|
|
86
|
+
## The child's scope (enforced, not advisory)
|
|
87
|
+
|
|
88
|
+
A sub-session runs with a RESTRICTED verb scope (enforced in
|
|
89
|
+
`nac3_invoke` via `YF_AGENT_MODE`):
|
|
90
|
+
|
|
91
|
+
- CAN: read / search / write files in its project root, run SAFE
|
|
92
|
+
shell, query the graph / pendings / reader.
|
|
93
|
+
- CANNOT: `git push` / `git commit`, destructive actions, `fs.move`,
|
|
94
|
+
re-anchor the project, mutate the workflow / pending / keys, run
|
|
95
|
+
lifecycle servers, or spawn its OWN sub-sessions (no grandchildren).
|
|
96
|
+
|
|
97
|
+
So the child is a safe builder/analyst. Anything outward or
|
|
98
|
+
irreversible stays with YOU, the parent, where the user can approve
|
|
99
|
+
it. Have the child RETURN its deliverable; you surface it (pizarron,
|
|
100
|
+
etc.) and you do the push/commit.
|
|
101
|
+
|
|
102
|
+
## Lifecycle
|
|
103
|
+
|
|
104
|
+
Sub-sessions are one-shot: a child runs its task to completion (a
|
|
105
|
+
`[SESSION_DONE]` marker), publishes its result, and exits. The full
|
|
106
|
+
result is written to disk; the bridge signal carries a summary + the
|
|
107
|
+
path. Always `collect` what you spawn -- do not leave results
|
|
108
|
+
unread. If a child is no longer useful or is burning budget, `stop`
|
|
109
|
+
it.
|