@nac3/forge-cli 0.2.0-alpha.59z.123 → 0.2.0-alpha.59z.158
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/agents/bridge.d.ts +69 -0
- package/dist/agents/bridge.d.ts.map +1 -0
- package/dist/agents/bridge.js +295 -0
- package/dist/agents/bridge.js.map +1 -0
- package/dist/agents/cli_real.d.ts +38 -0
- package/dist/agents/cli_real.d.ts.map +1 -0
- package/dist/agents/cli_real.js +46 -0
- package/dist/agents/cli_real.js.map +1 -0
- package/dist/agents/config_schema.d.ts +1 -1
- package/dist/agents/config_schema.d.ts.map +1 -1
- package/dist/agents/config_schema.js +16 -0
- package/dist/agents/config_schema.js.map +1 -1
- package/dist/agents/defaults.d.ts.map +1 -1
- package/dist/agents/defaults.js.map +1 -1
- package/dist/agents/delegate.d.ts +36 -0
- package/dist/agents/delegate.d.ts.map +1 -0
- package/dist/agents/delegate.js +68 -0
- package/dist/agents/delegate.js.map +1 -0
- package/dist/agents/iterative_step.d.ts +95 -0
- package/dist/agents/iterative_step.d.ts.map +1 -0
- package/dist/agents/iterative_step.js +249 -0
- package/dist/agents/iterative_step.js.map +1 -0
- package/dist/agents/llm_step.d.ts +50 -0
- package/dist/agents/llm_step.d.ts.map +1 -0
- package/dist/agents/llm_step.js +28 -0
- package/dist/agents/llm_step.js.map +1 -0
- package/dist/agents/real_step_factory.d.ts +95 -0
- package/dist/agents/real_step_factory.d.ts.map +1 -0
- package/dist/agents/real_step_factory.js +51 -0
- package/dist/agents/real_step_factory.js.map +1 -0
- package/dist/agents/runner.d.ts +14 -0
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +10 -1
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/runtime.d.ts +115 -0
- package/dist/agents/runtime.d.ts.map +1 -0
- package/dist/agents/runtime.js +429 -0
- package/dist/agents/runtime.js.map +1 -0
- package/dist/agents/system_prompt.d.ts +36 -0
- package/dist/agents/system_prompt.d.ts.map +1 -0
- package/dist/agents/system_prompt.js +101 -0
- package/dist/agents/system_prompt.js.map +1 -0
- package/dist/agents/types.d.ts +12 -1
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/types.js.map +1 -1
- package/dist/bin/yf.d.ts.map +1 -1
- package/dist/bin/yf.js +9 -0
- package/dist/bin/yf.js.map +1 -1
- package/dist/chat/claude_cli.d.ts +42 -0
- package/dist/chat/claude_cli.d.ts.map +1 -0
- package/dist/chat/claude_cli.js +299 -0
- package/dist/chat/claude_cli.js.map +1 -0
- package/dist/chat/graph_snapshot.d.ts +38 -0
- package/dist/chat/graph_snapshot.d.ts.map +1 -0
- package/dist/chat/graph_snapshot.js +159 -0
- package/dist/chat/graph_snapshot.js.map +1 -0
- package/dist/chat/ingest_session.d.ts +24 -4
- package/dist/chat/ingest_session.d.ts.map +1 -1
- package/dist/chat/ingest_session.js +139 -4
- package/dist/chat/ingest_session.js.map +1 -1
- package/dist/chat/panel.d.ts.map +1 -1
- package/dist/chat/panel.js +1358 -0
- package/dist/chat/panel.js.map +1 -1
- package/dist/chat/server.d.ts +21 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +904 -4
- package/dist/chat/server.js.map +1 -1
- package/dist/chat/tools/nac3_invoke.d.ts +5 -0
- package/dist/chat/tools/nac3_invoke.d.ts.map +1 -1
- package/dist/chat/tools/nac3_invoke.js +1 -0
- package/dist/chat/tools/nac3_invoke.js.map +1 -1
- package/dist/chat/tools.d.ts.map +1 -1
- package/dist/chat/tools.js +12 -0
- package/dist/chat/tools.js.map +1 -1
- package/dist/commands/agent.d.ts +12 -1
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +92 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/chat.d.ts +10 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +12 -1
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/director.d.ts +37 -0
- package/dist/commands/director.d.ts.map +1 -0
- package/dist/commands/director.js +290 -0
- package/dist/commands/director.js.map +1 -0
- package/dist/core/pilot_setup.d.ts +14 -1
- package/dist/core/pilot_setup.d.ts.map +1 -1
- package/dist/core/pilot_setup.js +62 -1
- package/dist/core/pilot_setup.js.map +1 -1
- package/dist/design/yujin_design_resolver.d.ts +77 -0
- package/dist/design/yujin_design_resolver.d.ts.map +1 -0
- package/dist/design/yujin_design_resolver.js +113 -0
- package/dist/design/yujin_design_resolver.js.map +1 -0
- package/dist/docs/doctrine/default-design-system.md +120 -0
- package/dist/docs/doctrine/language-sovereignty.md +143 -0
- package/dist/docs/doctrine/testing-policy.md +211 -0
- package/dist/nac3/approval_queue.d.ts +8 -0
- package/dist/nac3/approval_queue.d.ts.map +1 -1
- package/dist/nac3/approval_queue.js.map +1 -1
- package/dist/nac3/internal_manifest.d.ts.map +1 -1
- package/dist/nac3/internal_manifest.js +178 -0
- package/dist/nac3/internal_manifest.js.map +1 -1
- package/dist/office/excel.d.ts +22 -0
- package/dist/office/excel.d.ts.map +1 -1
- package/dist/office/excel.js +82 -0
- package/dist/office/excel.js.map +1 -1
- package/dist/qa/brain_matrix/fixtures/scenario_a11y_focus_after_open.json +22 -0
- package/dist/qa/brain_matrix/fixtures/scenario_a11y_label_unlabeled_button.json +26 -0
- package/dist/qa/brain_matrix/fixtures/scenario_agent_director_consults_workflow_before_dispatch.json +42 -0
- package/dist/qa/brain_matrix/fixtures/scenario_analyst_extracts_then_returns.json +28 -0
- package/dist/qa/brain_matrix/fixtures/scenario_coder_consults_nac_spec_before_writing.json +28 -0
- package/dist/qa/brain_matrix/fixtures/scenario_default_design_system_override_shadcn.json +45 -0
- package/dist/qa/brain_matrix/fixtures/scenario_default_design_system_use_card_template.json +44 -0
- package/dist/qa/brain_matrix/fixtures/scenario_director_delegates_to_analyst.json +26 -0
- package/dist/qa/brain_matrix/fixtures/scenario_director_no_self_delegation.json +20 -0
- package/dist/qa/brain_matrix/fixtures/scenario_director_terminal_done_marker.json +19 -0
- package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_default_design_system.json +50 -0
- package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_language_sovereignty.json +53 -0
- package/dist/qa/brain_matrix/fixtures/scenario_doctrine_discover_testing_policy.json +55 -0
- package/dist/qa/brain_matrix/fixtures/scenario_language_sovereignty_not_conducive_spa_python.json +61 -0
- package/dist/qa/brain_matrix/fixtures/scenario_language_sovereignty_user_picks_python.json +48 -0
- package/dist/qa/brain_matrix/fixtures/scenario_mcp_invoke_destructive_pauses_for_r8.json +42 -0
- package/dist/qa/brain_matrix/fixtures/scenario_mcp_invoke_happy_path_writes_pizarron.json +76 -0
- package/dist/qa/brain_matrix/fixtures/scenario_mcp_invoke_network_timeout_graceful.json +41 -0
- package/dist/qa/brain_matrix/fixtures/scenario_no_hardcoded_color_use_token.json +47 -0
- package/dist/qa/brain_matrix/fixtures/scenario_office_excel_update_cell_picks_right_verb.json +26 -0
- package/dist/qa/brain_matrix/fixtures/scenario_scaffolder_destructive_pauses_for_approval.json +23 -0
- package/dist/qa/brain_matrix/fixtures/scenario_sumie_icon_pick_from_catalog.json +56 -0
- package/dist/qa/brain_matrix/fixtures/scenario_tester_uses_shell_exec_only.json +27 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflow/graph.d.ts +59 -0
- package/dist/workflow/graph.d.ts.map +1 -0
- package/dist/workflow/graph.js +137 -0
- package/dist/workflow/graph.js.map +1 -0
- package/dist/workflow/state.d.ts +34 -0
- package/dist/workflow/state.d.ts.map +1 -1
- package/dist/workflow/state.js.map +1 -1
- package/docs/doctrine/default-design-system.md +120 -0
- package/docs/doctrine/language-sovereignty.md +143 -0
- package/docs/doctrine/testing-policy.md +211 -0
- package/package.json +102 -100
- package/src/i18n/catalogs/ar.json +20 -1
- package/src/i18n/catalogs/de.json +20 -1
- package/src/i18n/catalogs/en.json +20 -21
- package/src/i18n/catalogs/es.json +20 -21
- package/src/i18n/catalogs/fr.json +20 -1
- package/src/i18n/catalogs/hi.json +20 -1
- package/src/i18n/catalogs/it.json +20 -1
- package/src/i18n/catalogs/ja.json +20 -1
- package/src/i18n/catalogs/pt.json +20 -1
- package/src/i18n/catalogs/zh.json +20 -1
- package/templates/sumi-context.template.md +57 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `yf director <spec>` (Director closure pendiente 2).
|
|
3
|
+
*
|
|
4
|
+
* Single-entry CLI that combines:
|
|
5
|
+
* 1. Spec ingest (read file -> recordIngest).
|
|
6
|
+
* 2. Director dispatch (via runAgent + factory or stub).
|
|
7
|
+
*
|
|
8
|
+
* Without --real: ingests + reports doc_id (smoke).
|
|
9
|
+
* With --real: also dispatches the live LLM step.
|
|
10
|
+
*
|
|
11
|
+
* Supported file formats: txt + md as plain UTF-8. Other formats
|
|
12
|
+
* (pdf, docx) follow-up via the reader registry.
|
|
13
|
+
*
|
|
14
|
+
* ASCII-only.
|
|
15
|
+
*/
|
|
16
|
+
import type { Command } from 'commander';
|
|
17
|
+
import { type StepFn } from '../agents/runner.js';
|
|
18
|
+
import type { AgentDefinition } from '../agents/types.js';
|
|
19
|
+
import { type Runtime } from '../agents/runtime.js';
|
|
20
|
+
export interface RegisterDirectorCommandDeps {
|
|
21
|
+
makeRealStep?: (opts: {
|
|
22
|
+
def: AgentDefinition;
|
|
23
|
+
trigger_reason: string;
|
|
24
|
+
project_root: string;
|
|
25
|
+
project_name: string;
|
|
26
|
+
forge_version: string;
|
|
27
|
+
/** Yuemail-dogfood fix #7: pass a Runtime so the Director's
|
|
28
|
+
* yujin.agent.delegate calls reach delegateToAgent + dispatch
|
|
29
|
+
* the target agent. Without this, the delegate callback in
|
|
30
|
+
* real_step_factory.ts stays undefined and every delegate
|
|
31
|
+
* invocation falls back to runNac3Invoke, which has no
|
|
32
|
+
* handler for agent.delegate and returns err. */
|
|
33
|
+
runtime?: Runtime;
|
|
34
|
+
}) => Promise<StepFn>;
|
|
35
|
+
}
|
|
36
|
+
export declare function registerDirectorCommand(program: Command, deps?: RegisterDirectorCommandDeps): void;
|
|
37
|
+
//# sourceMappingURL=director.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"director.d.ts","sourceRoot":"","sources":["../../src/commands/director.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,WAAW,2BAA2B;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QACpB,GAAG,EAAa,eAAe,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAI,MAAM,CAAC;QACvB,YAAY,EAAI,MAAM,CAAC;QACvB,aAAa,EAAG,MAAM,CAAC;QACvB;;;;;0DAKkD;QAClD,OAAO,CAAC,EAAQ,OAAO,CAAC;KACzB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvB;AAsED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,2BAAgC,GAAG,IAAI,CAgNtG"}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import crypto from 'node:crypto';
|
|
4
|
+
import { getAgentDefinition } from '../agents/store.js';
|
|
5
|
+
import { runAgent } from '../agents/runner.js';
|
|
6
|
+
import { recordIngest } from '../chat/ingest_session.js';
|
|
7
|
+
import { createRuntime } from '../agents/runtime.js';
|
|
8
|
+
function fileExtToFormat(filename) {
|
|
9
|
+
const ext = path.extname(filename).toLowerCase();
|
|
10
|
+
if (ext === '.md' || ext === '.markdown')
|
|
11
|
+
return 'markdown';
|
|
12
|
+
if (ext === '.txt')
|
|
13
|
+
return 'markdown'; /* parse as markdown */
|
|
14
|
+
if (ext === '.pdf')
|
|
15
|
+
return 'pdf';
|
|
16
|
+
if (ext === '.docx')
|
|
17
|
+
return 'docx';
|
|
18
|
+
return 'markdown'; /* best-effort default */
|
|
19
|
+
}
|
|
20
|
+
function buildDocFromText(filename, text) {
|
|
21
|
+
/* deterministic doc_id from file content -- 8-char sha1 hex slug. */
|
|
22
|
+
const hash = crypto.createHash('sha1').update(filename + ':' + text).digest('hex').slice(0, 12);
|
|
23
|
+
const slug = path.basename(filename).replace(/[^a-zA-Z0-9._-]/g, '-').slice(0, 60);
|
|
24
|
+
const id = slug + '-' + hash;
|
|
25
|
+
/* Split into sections per top-level heading. Fallback: one
|
|
26
|
+
* section with the whole text as a single paragraph block. */
|
|
27
|
+
const lines = text.split(/\r?\n/);
|
|
28
|
+
const sections = [];
|
|
29
|
+
let curHeading = '';
|
|
30
|
+
let curLevel = 0;
|
|
31
|
+
let curBlocks = [];
|
|
32
|
+
let sectionIdx = 0;
|
|
33
|
+
function flush() {
|
|
34
|
+
if (curBlocks.length === 0 && !curHeading)
|
|
35
|
+
return;
|
|
36
|
+
sections.push({
|
|
37
|
+
id: 'sec-' + sectionIdx,
|
|
38
|
+
heading: curHeading,
|
|
39
|
+
level: curLevel,
|
|
40
|
+
blocks: curBlocks.length > 0
|
|
41
|
+
? curBlocks.map((b) => ({ kind: 'paragraph', text: b }))
|
|
42
|
+
: [],
|
|
43
|
+
});
|
|
44
|
+
sectionIdx += 1;
|
|
45
|
+
curHeading = '';
|
|
46
|
+
curLevel = 0;
|
|
47
|
+
curBlocks = [];
|
|
48
|
+
}
|
|
49
|
+
for (const l of lines) {
|
|
50
|
+
const m = /^(#{1,6})\s+(.+)$/.exec(l.trim());
|
|
51
|
+
if (m) {
|
|
52
|
+
flush();
|
|
53
|
+
curHeading = m[2].trim();
|
|
54
|
+
curLevel = m[1].length;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (l.trim().length > 0) {
|
|
58
|
+
curBlocks.push(l.trim());
|
|
59
|
+
}
|
|
60
|
+
else if (curBlocks.length > 0) {
|
|
61
|
+
/* blank line -> next paragraph boundary; leave for next non-blank. */
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
flush();
|
|
65
|
+
if (sections.length === 0) {
|
|
66
|
+
sections.push({
|
|
67
|
+
id: 'sec-0', heading: '', level: 0,
|
|
68
|
+
blocks: [{ kind: 'paragraph', text }],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
id,
|
|
73
|
+
filename: path.basename(filename),
|
|
74
|
+
format: fileExtToFormat(filename),
|
|
75
|
+
bytes: Buffer.byteLength(text, 'utf-8'),
|
|
76
|
+
title: sections[0].heading || path.basename(filename),
|
|
77
|
+
sections,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function registerDirectorCommand(program, deps = {}) {
|
|
81
|
+
program.command('director')
|
|
82
|
+
.description('Single-entry orchestrator: ingest a spec + dispatch the Director. Default is a smoke run (ingest only). Pass --real to fire the live LLM step.')
|
|
83
|
+
.argument('<spec>', 'path to a spec file (.md / .txt; pdf/docx follow-up)')
|
|
84
|
+
.option('--reason <r>', 'override the auto-generated trigger reason')
|
|
85
|
+
.option('--real', 'use the real LLM step (slice 15e factory) -- requires anthropic_api_key')
|
|
86
|
+
.option('--json', 'emit JSON instead of human-readable summary')
|
|
87
|
+
.action(async (specPath, opts) => {
|
|
88
|
+
/* Step 1: read + ingest the spec. */
|
|
89
|
+
let text;
|
|
90
|
+
try {
|
|
91
|
+
text = await fs.readFile(path.resolve(specPath), 'utf-8');
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
95
|
+
console.error('Failed to read spec at ' + JSON.stringify(specPath) + ': ' + msg);
|
|
96
|
+
process.exitCode = 1;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const doc = buildDocFromText(specPath, text);
|
|
100
|
+
const session = recordIngest(doc);
|
|
101
|
+
/* Yuemail-dogfood fix #17: include the spec content in the
|
|
102
|
+
* Director's trigger_reason so the LLM has the actual
|
|
103
|
+
* requirements in its first turn. Without this, the
|
|
104
|
+
* Director only sees "spec doc_id=..." + the CLI --reason
|
|
105
|
+
* flag and starts asking the operator for a spec instead
|
|
106
|
+
* of delegating. The doc_id reference is kept in the
|
|
107
|
+
* header so the Director can quote it when delegating. */
|
|
108
|
+
const userReason = opts.reason || '';
|
|
109
|
+
const triggerReason = '## Task: orchestrate the implementation of the following spec.\n'
|
|
110
|
+
+ (userReason ? ('Operator note: ' + userReason + '\n\n') : '\n')
|
|
111
|
+
+ 'Spec doc_id: ' + session.doc_id + '\n'
|
|
112
|
+
+ 'Spec path: ' + specPath + '\n\n'
|
|
113
|
+
+ '--- BEGIN SPEC ---\n'
|
|
114
|
+
+ text
|
|
115
|
+
+ '\n--- END SPEC ---\n\n'
|
|
116
|
+
+ 'Per your YUEMAIL-DOGFOOD MANDATE: your first tool call MUST be '
|
|
117
|
+
+ 'yujin.agent.delegate({to_slug:"analyst", payload:<the spec above + "extract structured plan + tdd_first flag">, tokens_used:<n>}). '
|
|
118
|
+
+ 'Do NOT ask the operator for a spec -- it is included verbatim above.';
|
|
119
|
+
/* Step 2: ensure the Director is registered. */
|
|
120
|
+
const def = await getAgentDefinition('director');
|
|
121
|
+
if (!def) {
|
|
122
|
+
console.error('Director agent is not installed. Run `yf agent install --defaults` first.');
|
|
123
|
+
process.exitCode = 1;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
/* Step 3: dispatch the Director. */
|
|
127
|
+
let stepFn;
|
|
128
|
+
let runtimeForDelegate;
|
|
129
|
+
if (opts.real) {
|
|
130
|
+
/* Yuemail-dogfood fix #7 + #12 + #13: construct a
|
|
131
|
+
* Runtime up-front so yujin.agent.delegate has a
|
|
132
|
+
* dispatcher to call. The default runner adapter inside
|
|
133
|
+
* runtime.ts passes (slug, reason) to runAgent, which
|
|
134
|
+
* expects (def, opts) -- so sub-agents end up running
|
|
135
|
+
* with a broken adapter, the run fails immediately, and
|
|
136
|
+
* the Director sees ok=false from the delegate.
|
|
137
|
+
*
|
|
138
|
+
* Fix #12: inject a runner that, given a slug, loads
|
|
139
|
+
* the agent definition + builds a real LLM step via
|
|
140
|
+
* makeRealStep + runs the agent through runAgent with
|
|
141
|
+
* the correct shape. This is what makes a delegated
|
|
142
|
+
* Analyst / Coder / Tester / Scaffolder run with the
|
|
143
|
+
* actual Claude API instead of a no-op stub.
|
|
144
|
+
*
|
|
145
|
+
* Fix #13: actually CALL start() on the runtime. The
|
|
146
|
+
* initial Fix #7 comment said "no start() needed for
|
|
147
|
+
* one-shot CLI" which was wrong: runtime.ts:325 and
|
|
148
|
+
* :413 throw "runtime not started -- call start() first"
|
|
149
|
+
* inside dispatchAgent + dispatchAgentSoft if running is
|
|
150
|
+
* false. Without start(), every delegate raises that
|
|
151
|
+
* error and the Director falls back to inline. */
|
|
152
|
+
const projectCwd = process.cwd();
|
|
153
|
+
runtimeForDelegate = createRuntime({
|
|
154
|
+
runner: async (subSlug, subReason) => {
|
|
155
|
+
const subDef = await getAgentDefinition(subSlug);
|
|
156
|
+
if (!subDef) {
|
|
157
|
+
throw new Error('delegate target agent not installed: ' + subSlug);
|
|
158
|
+
}
|
|
159
|
+
const { makeRealStep } = await import('../agents/cli_real.js');
|
|
160
|
+
const subStep = await makeRealStep({
|
|
161
|
+
def: subDef,
|
|
162
|
+
trigger_reason: subReason,
|
|
163
|
+
project_root: projectCwd,
|
|
164
|
+
project_name: 'Director CLI (delegate)',
|
|
165
|
+
forge_version: 'cli',
|
|
166
|
+
/* The sub-agent does not own a sub-runtime; it
|
|
167
|
+
* is a leaf in this dispatch path. If a sub-
|
|
168
|
+
* agent itself invokes agent.delegate, that
|
|
169
|
+
* call will go through runtime.dispatchAgent
|
|
170
|
+
* on the SAME runtime instance -- so the
|
|
171
|
+
* director's runtime is sufficient for the
|
|
172
|
+
* whole tree. */
|
|
173
|
+
runtime: runtimeForDelegate,
|
|
174
|
+
});
|
|
175
|
+
const { runAgent } = await import('../agents/runner.js');
|
|
176
|
+
return runAgent(subDef, {
|
|
177
|
+
trigger_kind: 'manual',
|
|
178
|
+
trigger_reason: subReason,
|
|
179
|
+
step: subStep,
|
|
180
|
+
persist: true,
|
|
181
|
+
/* Cap sub-agents at 20 iterations -- same as the
|
|
182
|
+
* Director itself. Prevents a single delegated
|
|
183
|
+
* worker from runawaying the budget. */
|
|
184
|
+
max_iterations: 50,
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
/* Yuemail-dogfood fix #13: start the runtime BEFORE the
|
|
189
|
+
* director step is built. runtime.ts gates dispatchAgent
|
|
190
|
+
* on `running` and throws "runtime not started" if it
|
|
191
|
+
* is invoked before start(). The dispatch loop is on a
|
|
192
|
+
* setTimeout that unrefs itself, so node will still
|
|
193
|
+
* exit cleanly when stop() is called at the end. */
|
|
194
|
+
runtimeForDelegate.start();
|
|
195
|
+
const builder = deps.makeRealStep ?? (async (args) => {
|
|
196
|
+
const { makeRealStep } = await import('../agents/cli_real.js');
|
|
197
|
+
return makeRealStep({
|
|
198
|
+
def: args.def,
|
|
199
|
+
trigger_reason: args.trigger_reason,
|
|
200
|
+
project_root: args.project_root,
|
|
201
|
+
project_name: args.project_name,
|
|
202
|
+
forge_version: args.forge_version,
|
|
203
|
+
...(args.runtime ? { runtime: args.runtime } : {}),
|
|
204
|
+
/* Yuemail-dogfood fix #18: 8192 cap for the Director.
|
|
205
|
+
* The spec inlined in trigger_reason (~9 KB) + graph
|
|
206
|
+
* snapshot + R-strict mandate + system prompt easily
|
|
207
|
+
* burn the 4096 default on a single turn of textual
|
|
208
|
+
* acknowledgement before the LLM emits its first
|
|
209
|
+
* tool_use block. Sub-agents stay at the default. */
|
|
210
|
+
max_tokens: 8192,
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
try {
|
|
214
|
+
stepFn = await builder({
|
|
215
|
+
def, trigger_reason: triggerReason,
|
|
216
|
+
project_root: process.cwd(), project_name: 'Director CLI', forge_version: 'cli',
|
|
217
|
+
...(runtimeForDelegate ? { runtime: runtimeForDelegate } : {}),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
catch (err) {
|
|
221
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
222
|
+
console.error('Failed to build real LLM step: ' + msg);
|
|
223
|
+
if (err && typeof err === 'object' && err.code === 'no_claude_key') {
|
|
224
|
+
console.error('');
|
|
225
|
+
console.error('Tip: run `yf keys setup --provider anthropic --key <KEY>` to load a key.');
|
|
226
|
+
}
|
|
227
|
+
process.exitCode = 1;
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
stepFn = async () => ({
|
|
233
|
+
text: 'cli stub: ingest of "' + session.doc_id + '" recorded. Pass --real to dispatch Claude.',
|
|
234
|
+
tokens_in: 0, tokens_out: 0, tool_calls: 0, done: true,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
const run = await runAgent(def, {
|
|
238
|
+
trigger_kind: 'manual',
|
|
239
|
+
trigger_reason: triggerReason,
|
|
240
|
+
step: stepFn,
|
|
241
|
+
persist: true,
|
|
242
|
+
/* alpha.59z.156 E2E lesson -- the runner default
|
|
243
|
+
* max_iterations=100 lets a chatty Director burn ~200k
|
|
244
|
+
* tokens / >$5 before any human notices. Cap at 20 for
|
|
245
|
+
* the CLI single-entry path; users running through the
|
|
246
|
+
* panel keep the original 100 via runtime.dispatchAgent
|
|
247
|
+
* which doesn't override this.
|
|
248
|
+
*
|
|
249
|
+
* Yuemail-dogfood fix #19: cap raised from 20 -> 40.
|
|
250
|
+
* Sprint #10 exit-2'd at iter 20 with 27 tool calls and
|
|
251
|
+
* an in-flight scaffolder roundtrip. A full TDD cycle
|
|
252
|
+
* needs ~5 delegates per slice (analyst once + 3 slices
|
|
253
|
+
* x [coder, scaffolder, tester]) so 20 is a hair short.
|
|
254
|
+
* 40 still bounds blast radius -- at ~$0.4/iter via fix
|
|
255
|
+
* #20 loop discipline, max sprint cost is ~$16. */
|
|
256
|
+
max_iterations: 40,
|
|
257
|
+
});
|
|
258
|
+
if (opts.json) {
|
|
259
|
+
console.log(JSON.stringify({ doc_id: session.doc_id, run }, null, 2));
|
|
260
|
+
process.exitCode = run.status === 'succeeded' ? 0 : 2;
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
console.log('Spec ingested:');
|
|
264
|
+
console.log(' Doc ID: ' + session.doc_id);
|
|
265
|
+
console.log(' Title: ' + doc.title);
|
|
266
|
+
console.log(' Sections: ' + doc.sections.length);
|
|
267
|
+
console.log(' Bytes: ' + doc.bytes);
|
|
268
|
+
console.log('');
|
|
269
|
+
console.log('Director run:');
|
|
270
|
+
console.log(' Run ID: ' + run.id);
|
|
271
|
+
console.log(' Status: ' + run.status + (run.kill_reason ? ' (' + run.kill_reason + ')' : ''));
|
|
272
|
+
console.log(' Trigger: ' + run.trigger_reason);
|
|
273
|
+
console.log(' Tokens: in=' + run.tokens_in + ' out=' + run.tokens_out);
|
|
274
|
+
console.log(' Tool calls: ' + run.tool_calls);
|
|
275
|
+
if (run.last_reply_summary) {
|
|
276
|
+
console.log(' Last reply: ' + run.last_reply_summary);
|
|
277
|
+
}
|
|
278
|
+
/* Yuemail-dogfood fix #13: stop the runtime we started so
|
|
279
|
+
* node can exit cleanly without waiting for the (unref'd)
|
|
280
|
+
* tick timer to drain. Best-effort -- never throw. */
|
|
281
|
+
if (runtimeForDelegate) {
|
|
282
|
+
try {
|
|
283
|
+
await runtimeForDelegate.stop();
|
|
284
|
+
}
|
|
285
|
+
catch { /* ignore */ }
|
|
286
|
+
}
|
|
287
|
+
process.exitCode = run.status === 'succeeded' ? 0 : 2;
|
|
288
|
+
});
|
|
289
|
+
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AAC,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
export declare function detectExistingProject(projectRoot: string): Promise<boolean>;
|
|
1
2
|
export interface PilotSetupState {
|
|
2
3
|
pilot_completed: boolean;
|
|
3
4
|
target_pending: boolean;
|
|
4
5
|
mode_pending: boolean;
|
|
5
6
|
}
|
|
6
|
-
/** Read the current pilot setup state.
|
|
7
|
+
/** Read the current pilot setup state.
|
|
8
|
+
*
|
|
9
|
+
* Three branches:
|
|
10
|
+
* 1. `yujin.forge.json` exists -> trust the persisted `pilot_completed`.
|
|
11
|
+
* 2. No `yujin.forge.json`, but workspace IS an existing project (has
|
|
12
|
+
* `package.json`/`Cargo.toml`/etc) -> auto-skip warmup
|
|
13
|
+
* (`pilot_completed: true`). The user is opening Forge against a
|
|
14
|
+
* real codebase and wants Forge to start by discovering it, not
|
|
15
|
+
* by asking target/mode.
|
|
16
|
+
* 3. No `yujin.forge.json` and workspace is empty / greenfield ->
|
|
17
|
+
* trigger the warmup prompt (`pilot_completed: false`). This is
|
|
18
|
+
* the `yf new` path.
|
|
19
|
+
*/
|
|
7
20
|
export declare function readPilotState(projectRoot: string): Promise<PilotSetupState>;
|
|
8
21
|
/** Mark Pilot setup as completed (also bumps the persisted
|
|
9
22
|
* yujin.forge.json with default values if any are missing). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pilot_setup.d.ts","sourceRoot":"","sources":["../../src/core/pilot_setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pilot_setup.d.ts","sourceRoot":"","sources":["../../src/core/pilot_setup.ts"],"names":[],"mappings":"AAyDA,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUjF;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAG,OAAO,CAAC;IACzB,YAAY,EAAK,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAqBlF;AAED;gEACgE;AAChE,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAChD,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;gCAEgC;AAChC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAqBlE;AAED;;;;;;2DAM2D;AAC3D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,eAAe,EACtB,WAAW,EAAE,MAAM,GAClB;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAA;CAAE,CAkBrE"}
|
package/dist/core/pilot_setup.js
CHANGED
|
@@ -20,7 +20,63 @@
|
|
|
20
20
|
import { promises as fs } from 'node:fs';
|
|
21
21
|
import path from 'node:path';
|
|
22
22
|
const CONFIG = 'yujin.forge.json';
|
|
23
|
-
/**
|
|
23
|
+
/** Heuristic: detect whether `projectRoot` already contains an
|
|
24
|
+
* existing project. If it does, we skip the first-run Pilot setup
|
|
25
|
+
* (target/mode questions) because they are not relevant when the
|
|
26
|
+
* user is opening Forge against an existing codebase (bug fix,
|
|
27
|
+
* refactor, deploy, code review, doc gen, etc).
|
|
28
|
+
*
|
|
29
|
+
* An "existing project" is detected by the presence of ANY of the
|
|
30
|
+
* common dependency manifest files. Greenfield workspaces (empty
|
|
31
|
+
* dir or just a prompt.txt) do NOT match, so they still get the
|
|
32
|
+
* pilot setup -- preserving the F-series default for `yf new`.
|
|
33
|
+
*
|
|
34
|
+
* Added 2026-06-06 after the behavior-matrix run revealed that
|
|
35
|
+
* cloned existing repos were being misclassified as greenfield and
|
|
36
|
+
* intercepted by the warmup template, yielding "warmup-only" turns
|
|
37
|
+
* where Forge promised to read the codebase but only asked the two
|
|
38
|
+
* questions instead. */
|
|
39
|
+
const PROJECT_INDICATORS = [
|
|
40
|
+
'package.json',
|
|
41
|
+
'pyproject.toml',
|
|
42
|
+
'requirements.txt',
|
|
43
|
+
'Cargo.toml',
|
|
44
|
+
'go.mod',
|
|
45
|
+
'composer.json',
|
|
46
|
+
'Gemfile',
|
|
47
|
+
'mix.exs',
|
|
48
|
+
'pom.xml',
|
|
49
|
+
'build.gradle',
|
|
50
|
+
'build.gradle.kts',
|
|
51
|
+
'CMakeLists.txt',
|
|
52
|
+
'Makefile',
|
|
53
|
+
'pubspec.yaml',
|
|
54
|
+
];
|
|
55
|
+
export async function detectExistingProject(projectRoot) {
|
|
56
|
+
for (const indicator of PROJECT_INDICATORS) {
|
|
57
|
+
try {
|
|
58
|
+
await fs.access(path.join(projectRoot, indicator));
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
/* try next */
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
/** Read the current pilot setup state.
|
|
68
|
+
*
|
|
69
|
+
* Three branches:
|
|
70
|
+
* 1. `yujin.forge.json` exists -> trust the persisted `pilot_completed`.
|
|
71
|
+
* 2. No `yujin.forge.json`, but workspace IS an existing project (has
|
|
72
|
+
* `package.json`/`Cargo.toml`/etc) -> auto-skip warmup
|
|
73
|
+
* (`pilot_completed: true`). The user is opening Forge against a
|
|
74
|
+
* real codebase and wants Forge to start by discovering it, not
|
|
75
|
+
* by asking target/mode.
|
|
76
|
+
* 3. No `yujin.forge.json` and workspace is empty / greenfield ->
|
|
77
|
+
* trigger the warmup prompt (`pilot_completed: false`). This is
|
|
78
|
+
* the `yf new` path.
|
|
79
|
+
*/
|
|
24
80
|
export async function readPilotState(projectRoot) {
|
|
25
81
|
try {
|
|
26
82
|
const raw = await fs.readFile(path.join(projectRoot, CONFIG), 'utf-8');
|
|
@@ -36,6 +92,11 @@ export async function readPilotState(projectRoot) {
|
|
|
36
92
|
};
|
|
37
93
|
}
|
|
38
94
|
catch {
|
|
95
|
+
/* No config file. Decide between greenfield and existing-project. */
|
|
96
|
+
const existing = await detectExistingProject(projectRoot);
|
|
97
|
+
if (existing) {
|
|
98
|
+
return { pilot_completed: true, target_pending: false, mode_pending: false };
|
|
99
|
+
}
|
|
39
100
|
return { pilot_completed: false, target_pending: true, mode_pending: true };
|
|
40
101
|
}
|
|
41
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pilot_setup.js","sourceRoot":"","sources":["../../src/core/pilot_setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,MAAM,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"pilot_setup.js","sourceRoot":"","sources":["../../src/core/pilot_setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,MAAM,GAAG,kBAAkB,CAAC;AAElC;;;;;;;;;;;;;;;yBAeyB;AACzB,MAAM,kBAAkB,GAAG;IACzB,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,YAAY;IACZ,QAAQ;IACR,eAAe;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,UAAU;IACV,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,WAAmB;IAC7D,KAAK,MAAM,SAAS,IAAI,kBAAkB,EAAE,CAAC;QAC3C,IAAI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AI,YAAY,EAAE,CAAC;QACnC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAChD,CAAC;IACD;4CACwC;IACxC,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,IAAI,CAAC,cAAc,IAAI,CAAC,YAAY,EAAE,CAAC;QACxE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export interface DesignManifest {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
description: string;
|
|
5
|
+
tokens: {
|
|
6
|
+
file: string;
|
|
7
|
+
format: string;
|
|
8
|
+
css: string;
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
11
|
+
components: {
|
|
12
|
+
dir: string;
|
|
13
|
+
index: string;
|
|
14
|
+
count: number;
|
|
15
|
+
format: string;
|
|
16
|
+
};
|
|
17
|
+
icons: {
|
|
18
|
+
sumie: {
|
|
19
|
+
dir: string;
|
|
20
|
+
index: string;
|
|
21
|
+
count: number;
|
|
22
|
+
format: string;
|
|
23
|
+
tags: string[];
|
|
24
|
+
};
|
|
25
|
+
kanji: {
|
|
26
|
+
wordmarks: Record<string, string>;
|
|
27
|
+
single_chars: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
fonts: {
|
|
31
|
+
primary: {
|
|
32
|
+
family: string;
|
|
33
|
+
source: string;
|
|
34
|
+
url: string;
|
|
35
|
+
};
|
|
36
|
+
japanese: {
|
|
37
|
+
family: string;
|
|
38
|
+
source: string;
|
|
39
|
+
url: string;
|
|
40
|
+
};
|
|
41
|
+
monospace: {
|
|
42
|
+
family: string;
|
|
43
|
+
source: string;
|
|
44
|
+
url: string;
|
|
45
|
+
};
|
|
46
|
+
policy: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface ComponentTemplate {
|
|
50
|
+
slug: string;
|
|
51
|
+
category: string;
|
|
52
|
+
nac3_id: string;
|
|
53
|
+
description: string;
|
|
54
|
+
html: string;
|
|
55
|
+
css: string;
|
|
56
|
+
variants: string[];
|
|
57
|
+
props: string[];
|
|
58
|
+
token_refs: string[];
|
|
59
|
+
sumie_icon_hint: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface SumieIcon {
|
|
62
|
+
slug: string;
|
|
63
|
+
tags: string[];
|
|
64
|
+
file: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ResolverOpts {
|
|
67
|
+
/** Override the package root for tests. */
|
|
68
|
+
dir?: string;
|
|
69
|
+
}
|
|
70
|
+
export declare function getManifest(opts?: ResolverOpts): Promise<DesignManifest | null>;
|
|
71
|
+
export declare function listTemplates(opts?: ResolverOpts): Promise<ComponentTemplate[]>;
|
|
72
|
+
export declare function getTemplate(slug: string, opts?: ResolverOpts): Promise<ComponentTemplate | null>;
|
|
73
|
+
export declare function getTokens(opts?: ResolverOpts): Promise<unknown | null>;
|
|
74
|
+
export declare function listSumie(filterTag: string | null, opts?: ResolverOpts): Promise<SumieIcon[]>;
|
|
75
|
+
export declare function getSumieSvg(slug: string, opts?: ResolverOpts): Promise<string | null>;
|
|
76
|
+
export declare function _resetDesignCacheForTests(): void;
|
|
77
|
+
//# sourceMappingURL=yujin_design_resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yujin_design_resolver.d.ts","sourceRoot":"","sources":["../../src/design/yujin_design_resolver.ts"],"names":[],"mappings":"AAqDA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAS,MAAM,CAAC;IACpB,OAAO,EAAM,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAO;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,M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