@synergenius/flow-weaver-pack-weaver 0.9.142 → 0.9.145
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/bot/behavior-defaults.d.ts +2 -2
- package/dist/bot/behavior-defaults.d.ts.map +1 -1
- package/dist/bot/behavior-defaults.js +11 -6
- package/dist/bot/behavior-defaults.js.map +1 -1
- package/dist/bot/capability-registry.d.ts +2 -0
- package/dist/bot/capability-registry.d.ts.map +1 -1
- package/dist/bot/capability-registry.js +97 -0
- package/dist/bot/capability-registry.js.map +1 -1
- package/dist/bot/profile-store.d.ts.map +1 -1
- package/dist/bot/profile-store.js +7 -0
- package/dist/bot/profile-store.js.map +1 -1
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +53 -8
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/step-executor.d.ts.map +1 -1
- package/dist/bot/step-executor.js +3 -0
- package/dist/bot/step-executor.js.map +1 -1
- package/dist/bot/swarm-controller.d.ts.map +1 -1
- package/dist/bot/swarm-controller.js +7 -3
- package/dist/bot/swarm-controller.js.map +1 -1
- package/dist/bot/task-prompt-builder.js +8 -0
- package/dist/bot/task-prompt-builder.js.map +1 -1
- package/dist/bot/task-types.d.ts +2 -0
- package/dist/bot/task-types.d.ts.map +1 -1
- package/dist/bot/types.d.ts +4 -0
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/node-types/bot-report.d.ts +3 -1
- package/dist/node-types/bot-report.d.ts.map +1 -1
- package/dist/node-types/bot-report.js +60 -9
- package/dist/node-types/bot-report.js.map +1 -1
- package/dist/node-types/report.d.ts +3 -1
- package/dist/node-types/report.d.ts.map +1 -1
- package/dist/node-types/report.js +7 -3
- package/dist/node-types/report.js.map +1 -1
- package/dist/ui/capability-editor.js +84 -0
- package/dist/ui/profile-editor.js +87 -3
- package/dist/ui/swarm-dashboard.js +96 -7
- package/dist/ui/task-detail-view.js +9 -4
- package/dist/ui/trace-to-timeline.d.ts +2 -0
- package/dist/ui/trace-to-timeline.d.ts.map +1 -1
- package/dist/ui/trace-to-timeline.js.map +1 -1
- package/dist/ui/use-stream-timeline.d.ts +2 -0
- package/dist/ui/use-stream-timeline.d.ts.map +1 -1
- package/dist/ui/use-stream-timeline.js +7 -5
- package/dist/ui/use-stream-timeline.js.map +1 -1
- package/flowweaver.manifest.json +1 -1
- package/package.json +1 -1
- package/src/bot/behavior-defaults.ts +12 -5
- package/src/bot/capability-registry.ts +104 -0
- package/src/bot/profile-store.ts +7 -0
- package/src/bot/runner.ts +55 -9
- package/src/bot/step-executor.ts +3 -0
- package/src/bot/swarm-controller.ts +7 -3
- package/src/bot/task-prompt-builder.ts +10 -0
- package/src/bot/task-types.ts +2 -0
- package/src/bot/types.ts +4 -0
- package/src/node-types/bot-report.ts +61 -10
- package/src/node-types/report.ts +8 -4
- package/src/ui/task-detail-view.tsx +3 -0
- package/src/ui/trace-to-timeline.ts +2 -0
- package/src/ui/use-stream-timeline.ts +8 -5
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
* @icon summarize
|
|
8
8
|
* @color cyan
|
|
9
9
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
10
|
-
* @output summary [order:0
|
|
10
|
+
* @output summary [order:0] - Summary string
|
|
11
|
+
* @output report [order:1] - Markdown report
|
|
11
12
|
* @output onFailure [hidden]
|
|
12
13
|
*/
|
|
13
14
|
export declare function weaverReport(ctx: string): {
|
|
14
15
|
summary: string;
|
|
16
|
+
report: string;
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=report.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/node-types/report.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/node-types/report.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA8D7E"}
|
|
@@ -8,14 +8,18 @@ import * as path from 'node:path';
|
|
|
8
8
|
* @icon summarize
|
|
9
9
|
* @color cyan
|
|
10
10
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
11
|
-
* @output summary [order:0
|
|
11
|
+
* @output summary [order:0] - Summary string
|
|
12
|
+
* @output report [order:1] - Markdown report
|
|
12
13
|
* @output onFailure [hidden]
|
|
13
14
|
*/
|
|
14
15
|
export function weaverReport(ctx) {
|
|
15
16
|
const context = JSON.parse(ctx);
|
|
16
17
|
const result = JSON.parse(context.resultJson);
|
|
17
18
|
const relPath = path.relative(context.env.projectDir, context.targetPath);
|
|
18
|
-
|
|
19
|
+
// Plain one-liner for notifications, task lists, logs
|
|
20
|
+
const summaryLine = `Weaver: ${result.outcome} (${relPath})${result.summary ? ' — ' + result.summary : ''}`;
|
|
21
|
+
console.log(`\x1b[32m✓ ${summaryLine}\x1b[0m`);
|
|
22
|
+
// Markdown report for rich UI display
|
|
19
23
|
const md = [];
|
|
20
24
|
md.push(`## ${result.outcome === 'success' ? 'Task Completed' : 'Task Failed'}`);
|
|
21
25
|
md.push('');
|
|
@@ -72,6 +76,6 @@ export function weaverReport(ctx) {
|
|
|
72
76
|
meta.push(`**Model:** ${context.env.providerInfo.model}`);
|
|
73
77
|
if (meta.length > 0)
|
|
74
78
|
md.push(meta.join(' | '));
|
|
75
|
-
return { summary: md.join('\n') };
|
|
79
|
+
return { summary: summaryLine, report: md.join('\n') };
|
|
76
80
|
}
|
|
77
81
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/node-types/report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/node-types/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
68
|
- Use patch_file for modifications, write_file only for new files.
|
|
69
69
|
- Be concise \u2014 let tool results speak.`
|
|
70
70
|
};
|
|
71
|
+
var CAP_ROLE_ORCHESTRATOR = {
|
|
72
|
+
name: "role-orchestrator",
|
|
73
|
+
description: "Orchestrator role: decomposes objectives into tasks, assigns profiles, creates project briefs.",
|
|
74
|
+
tools: [OP_TASK_CREATE, OP_LIST_FILES, OP_READ_FILE],
|
|
75
|
+
prompt: `## YOUR ROLE: Orchestrator
|
|
76
|
+
You DECOMPOSE and ASSIGN. You never write code or create files directly.
|
|
77
|
+
|
|
78
|
+
Your job:
|
|
79
|
+
1. Analyze the objective and understand the project scope
|
|
80
|
+
2. Create a PROJECT BRIEF (a concise description of what we're building, how pieces connect, conventions to follow)
|
|
81
|
+
3. Break the objective into focused subtasks using task_create
|
|
82
|
+
4. ALWAYS set assignedProfile on every subtask:
|
|
83
|
+
- Code writing, file creation \u2192 "developer"
|
|
84
|
+
- Code review, quality checks \u2192 "reviewer"
|
|
85
|
+
- Project setup, dependencies, config \u2192 "ops"
|
|
86
|
+
5. Set dependencies so tasks execute in the right order
|
|
87
|
+
6. Include the project brief in every subtask's description
|
|
88
|
+
|
|
89
|
+
You do NOT have write_file, patch_file, or run_shell. You cannot execute \u2014 only plan and delegate.
|
|
90
|
+
|
|
91
|
+
### Project Brief Format
|
|
92
|
+
Include this at the TOP of every subtask description:
|
|
93
|
+
"PROJECT: [what we're building]. STRUCTURE: [file layout]. CONVENTIONS: [naming, patterns, exports]."
|
|
94
|
+
|
|
95
|
+
### Subtask Quality
|
|
96
|
+
Each subtask must be:
|
|
97
|
+
- Focused (one file or one concern)
|
|
98
|
+
- Self-contained (has enough context to execute independently)
|
|
99
|
+
- Properly routed (assignedProfile is set)
|
|
100
|
+
- Ordered (dependsOn reflects real dependencies)`
|
|
101
|
+
};
|
|
102
|
+
var CAP_ROLE_DEVELOPER = {
|
|
103
|
+
name: "role-developer",
|
|
104
|
+
description: "Developer role: writes code, creates files, runs commands. Executes directly, never decomposes.",
|
|
105
|
+
prompt: `## YOUR ROLE: Developer
|
|
106
|
+
You WRITE CODE. Execute the task directly using write_file, patch_file, and run_shell.
|
|
107
|
+
|
|
108
|
+
Your job:
|
|
109
|
+
1. Read the task description (including the project brief)
|
|
110
|
+
2. Create a plan with CONCRETE file operations (write_file, patch_file, run_shell)
|
|
111
|
+
3. Execute every step \u2014 produce actual files on disk
|
|
112
|
+
4. Verify your work compiles and is correct
|
|
113
|
+
|
|
114
|
+
You do NOT have task_create. You cannot create subtasks or delegate.
|
|
115
|
+
If the task seems too large, do your best \u2014 the orchestrator already decomposed it for you.
|
|
116
|
+
|
|
117
|
+
### Output Requirements
|
|
118
|
+
Your plan MUST include at least one write_file, patch_file, or run_shell step.
|
|
119
|
+
A plan with only "respond" steps is a FAILURE \u2014 you must produce artifacts.`
|
|
120
|
+
};
|
|
121
|
+
var CAP_ROLE_REVIEWER = {
|
|
122
|
+
name: "role-reviewer",
|
|
123
|
+
description: "Reviewer role: reads and evaluates code quality, security, correctness.",
|
|
124
|
+
prompt: `## YOUR ROLE: Reviewer
|
|
125
|
+
You READ and EVALUATE code. Check quality, security, correctness, and consistency.
|
|
126
|
+
|
|
127
|
+
Your job:
|
|
128
|
+
1. Read the files that were created/modified
|
|
129
|
+
2. Check against the task description and project conventions
|
|
130
|
+
3. Report findings with file:line and severity
|
|
131
|
+
4. Use patch_file to fix minor issues directly
|
|
132
|
+
5. For major issues, document them clearly in your report
|
|
133
|
+
|
|
134
|
+
You do NOT have task_create or write_file. You can only read and patch.`
|
|
135
|
+
};
|
|
136
|
+
var CAP_ROLE_OPS = {
|
|
137
|
+
name: "role-ops",
|
|
138
|
+
description: "Ops role: sets up project infrastructure, configs, dependencies.",
|
|
139
|
+
prompt: `## YOUR ROLE: Ops
|
|
140
|
+
You SET UP infrastructure \u2014 package.json, tsconfig.json, directory structure, dependencies.
|
|
141
|
+
|
|
142
|
+
Your job:
|
|
143
|
+
1. Initialize project structure (create config files, directories)
|
|
144
|
+
2. Install dependencies with run_shell
|
|
145
|
+
3. Ensure the project builds and tests can run
|
|
146
|
+
|
|
147
|
+
You do NOT have task_create. You execute infrastructure tasks directly.`
|
|
148
|
+
};
|
|
71
149
|
var CAP_FILE_OPS = {
|
|
72
150
|
name: "file-ops",
|
|
73
151
|
description: "File read/write/patch operations and best practices for file manipulation.",
|
|
@@ -369,6 +447,12 @@ When you discover a new convention, remember it for future bots.`
|
|
|
369
447
|
};
|
|
370
448
|
var BUILT_IN_CAPABILITIES = [
|
|
371
449
|
CAP_CORE,
|
|
450
|
+
// Role capabilities
|
|
451
|
+
CAP_ROLE_ORCHESTRATOR,
|
|
452
|
+
CAP_ROLE_DEVELOPER,
|
|
453
|
+
CAP_ROLE_REVIEWER,
|
|
454
|
+
CAP_ROLE_OPS,
|
|
455
|
+
// Tool capabilities
|
|
372
456
|
CAP_FILE_OPS,
|
|
373
457
|
CAP_SHELL,
|
|
374
458
|
CAP_TASK_MGMT,
|
|
@@ -239,6 +239,84 @@ Do NOT describe what you would do \u2014 actually do it by calling tools.
|
|
|
239
239
|
- Use patch_file for modifications, write_file only for new files.
|
|
240
240
|
- Be concise \u2014 let tool results speak.`
|
|
241
241
|
};
|
|
242
|
+
var CAP_ROLE_ORCHESTRATOR = {
|
|
243
|
+
name: "role-orchestrator",
|
|
244
|
+
description: "Orchestrator role: decomposes objectives into tasks, assigns profiles, creates project briefs.",
|
|
245
|
+
tools: [OP_TASK_CREATE, OP_LIST_FILES, OP_READ_FILE],
|
|
246
|
+
prompt: `## YOUR ROLE: Orchestrator
|
|
247
|
+
You DECOMPOSE and ASSIGN. You never write code or create files directly.
|
|
248
|
+
|
|
249
|
+
Your job:
|
|
250
|
+
1. Analyze the objective and understand the project scope
|
|
251
|
+
2. Create a PROJECT BRIEF (a concise description of what we're building, how pieces connect, conventions to follow)
|
|
252
|
+
3. Break the objective into focused subtasks using task_create
|
|
253
|
+
4. ALWAYS set assignedProfile on every subtask:
|
|
254
|
+
- Code writing, file creation \u2192 "developer"
|
|
255
|
+
- Code review, quality checks \u2192 "reviewer"
|
|
256
|
+
- Project setup, dependencies, config \u2192 "ops"
|
|
257
|
+
5. Set dependencies so tasks execute in the right order
|
|
258
|
+
6. Include the project brief in every subtask's description
|
|
259
|
+
|
|
260
|
+
You do NOT have write_file, patch_file, or run_shell. You cannot execute \u2014 only plan and delegate.
|
|
261
|
+
|
|
262
|
+
### Project Brief Format
|
|
263
|
+
Include this at the TOP of every subtask description:
|
|
264
|
+
"PROJECT: [what we're building]. STRUCTURE: [file layout]. CONVENTIONS: [naming, patterns, exports]."
|
|
265
|
+
|
|
266
|
+
### Subtask Quality
|
|
267
|
+
Each subtask must be:
|
|
268
|
+
- Focused (one file or one concern)
|
|
269
|
+
- Self-contained (has enough context to execute independently)
|
|
270
|
+
- Properly routed (assignedProfile is set)
|
|
271
|
+
- Ordered (dependsOn reflects real dependencies)`
|
|
272
|
+
};
|
|
273
|
+
var CAP_ROLE_DEVELOPER = {
|
|
274
|
+
name: "role-developer",
|
|
275
|
+
description: "Developer role: writes code, creates files, runs commands. Executes directly, never decomposes.",
|
|
276
|
+
prompt: `## YOUR ROLE: Developer
|
|
277
|
+
You WRITE CODE. Execute the task directly using write_file, patch_file, and run_shell.
|
|
278
|
+
|
|
279
|
+
Your job:
|
|
280
|
+
1. Read the task description (including the project brief)
|
|
281
|
+
2. Create a plan with CONCRETE file operations (write_file, patch_file, run_shell)
|
|
282
|
+
3. Execute every step \u2014 produce actual files on disk
|
|
283
|
+
4. Verify your work compiles and is correct
|
|
284
|
+
|
|
285
|
+
You do NOT have task_create. You cannot create subtasks or delegate.
|
|
286
|
+
If the task seems too large, do your best \u2014 the orchestrator already decomposed it for you.
|
|
287
|
+
|
|
288
|
+
### Output Requirements
|
|
289
|
+
Your plan MUST include at least one write_file, patch_file, or run_shell step.
|
|
290
|
+
A plan with only "respond" steps is a FAILURE \u2014 you must produce artifacts.`
|
|
291
|
+
};
|
|
292
|
+
var CAP_ROLE_REVIEWER = {
|
|
293
|
+
name: "role-reviewer",
|
|
294
|
+
description: "Reviewer role: reads and evaluates code quality, security, correctness.",
|
|
295
|
+
prompt: `## YOUR ROLE: Reviewer
|
|
296
|
+
You READ and EVALUATE code. Check quality, security, correctness, and consistency.
|
|
297
|
+
|
|
298
|
+
Your job:
|
|
299
|
+
1. Read the files that were created/modified
|
|
300
|
+
2. Check against the task description and project conventions
|
|
301
|
+
3. Report findings with file:line and severity
|
|
302
|
+
4. Use patch_file to fix minor issues directly
|
|
303
|
+
5. For major issues, document them clearly in your report
|
|
304
|
+
|
|
305
|
+
You do NOT have task_create or write_file. You can only read and patch.`
|
|
306
|
+
};
|
|
307
|
+
var CAP_ROLE_OPS = {
|
|
308
|
+
name: "role-ops",
|
|
309
|
+
description: "Ops role: sets up project infrastructure, configs, dependencies.",
|
|
310
|
+
prompt: `## YOUR ROLE: Ops
|
|
311
|
+
You SET UP infrastructure \u2014 package.json, tsconfig.json, directory structure, dependencies.
|
|
312
|
+
|
|
313
|
+
Your job:
|
|
314
|
+
1. Initialize project structure (create config files, directories)
|
|
315
|
+
2. Install dependencies with run_shell
|
|
316
|
+
3. Ensure the project builds and tests can run
|
|
317
|
+
|
|
318
|
+
You do NOT have task_create. You execute infrastructure tasks directly.`
|
|
319
|
+
};
|
|
242
320
|
var CAP_FILE_OPS = {
|
|
243
321
|
name: "file-ops",
|
|
244
322
|
description: "File read/write/patch operations and best practices for file manipulation.",
|
|
@@ -540,6 +618,12 @@ When you discover a new convention, remember it for future bots.`
|
|
|
540
618
|
};
|
|
541
619
|
var BUILT_IN_CAPABILITIES = [
|
|
542
620
|
CAP_CORE,
|
|
621
|
+
// Role capabilities
|
|
622
|
+
CAP_ROLE_ORCHESTRATOR,
|
|
623
|
+
CAP_ROLE_DEVELOPER,
|
|
624
|
+
CAP_ROLE_REVIEWER,
|
|
625
|
+
CAP_ROLE_OPS,
|
|
626
|
+
// Tool capabilities
|
|
543
627
|
CAP_FILE_OPS,
|
|
544
628
|
CAP_SHELL,
|
|
545
629
|
CAP_TASK_MGMT,
|
|
@@ -565,9 +649,9 @@ var capabilityMap = new Map(
|
|
|
565
649
|
|
|
566
650
|
// src/bot/behavior-defaults.ts
|
|
567
651
|
var STRATEGY_CAPABILITIES = {
|
|
568
|
-
frugal: ["core", "file-ops", "shell", "context"],
|
|
569
|
-
balanced: ["core", "
|
|
570
|
-
performance: ["core", "
|
|
652
|
+
frugal: ["core", "role-developer", "file-ops", "shell", "context"],
|
|
653
|
+
balanced: ["core", "role-developer", "file-ops", "shell", "fw-grammar", "fw-validate", "context"],
|
|
654
|
+
performance: ["core", "role-developer", "file-ops", "shell", "fw-grammar", "fw-validate", "fw-genesis", "fw-cli", "code-review", "web", "context"]
|
|
571
655
|
};
|
|
572
656
|
var STRATEGY_BUDGETS = {
|
|
573
657
|
frugal: 0.1,
|
|
@@ -694,12 +694,13 @@ function useStreamTimeline(events, isDone) {
|
|
|
694
694
|
}
|
|
695
695
|
return entries;
|
|
696
696
|
}, [events]);
|
|
697
|
-
const { phase, instruction, cost, plan, awaitingApproval } = useMemo(() => {
|
|
697
|
+
const { phase, instruction, cost, plan, awaitingApproval, report } = useMemo(() => {
|
|
698
698
|
let phase2 = "idle";
|
|
699
699
|
let instruction2 = null;
|
|
700
700
|
let cost2 = null;
|
|
701
701
|
let plan2 = null;
|
|
702
702
|
let awaitingApproval2 = false;
|
|
703
|
+
let report2 = null;
|
|
703
704
|
for (const event of events) {
|
|
704
705
|
const d = event.data ?? {};
|
|
705
706
|
if (event.type === "bot-started") {
|
|
@@ -709,6 +710,7 @@ function useStreamTimeline(events, isDone) {
|
|
|
709
710
|
phase2 = "executing";
|
|
710
711
|
} else if (event.type === "bot-completed") {
|
|
711
712
|
phase2 = d.success ? "completed" : "failed";
|
|
713
|
+
if (typeof d.report === "string") report2 = d.report;
|
|
712
714
|
} else if (event.type === "bot-failed") {
|
|
713
715
|
phase2 = "failed";
|
|
714
716
|
} else if (event.type === "cost-update") {
|
|
@@ -729,9 +731,9 @@ function useStreamTimeline(events, isDone) {
|
|
|
729
731
|
if (isDone && phase2 !== "completed" && phase2 !== "failed") {
|
|
730
732
|
phase2 = "completed";
|
|
731
733
|
}
|
|
732
|
-
return { phase: phase2, instruction: instruction2, cost: cost2, plan: plan2, awaitingApproval: awaitingApproval2 };
|
|
734
|
+
return { phase: phase2, instruction: instruction2, cost: cost2, plan: plan2, awaitingApproval: awaitingApproval2, report: report2 };
|
|
733
735
|
}, [events, isDone]);
|
|
734
|
-
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval };
|
|
736
|
+
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval, report };
|
|
735
737
|
}
|
|
736
738
|
|
|
737
739
|
// src/ui/trace-to-timeline.ts
|
|
@@ -988,7 +990,8 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
988
990
|
elapsed,
|
|
989
991
|
cost: liveCost,
|
|
990
992
|
plan,
|
|
991
|
-
awaitingApproval
|
|
993
|
+
awaitingApproval,
|
|
994
|
+
report: liveReport
|
|
992
995
|
} = useStreamTimeline(stream.events, stream.isDone);
|
|
993
996
|
const currentRunId = task?.currentRunId;
|
|
994
997
|
const isLive = task?.status === "in-progress" && !!currentRunId;
|
|
@@ -1316,6 +1319,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
1316
1319
|
state: isSuccess ? "completed" : "failed",
|
|
1317
1320
|
instruction: extractInstruction(run),
|
|
1318
1321
|
timeline: runTimeline,
|
|
1322
|
+
report: run.report ?? null,
|
|
1319
1323
|
cost: typeof run.cost === "number" ? run.cost : run.costDetail?.totalCost ?? null,
|
|
1320
1324
|
plan: run.plan,
|
|
1321
1325
|
startedAt: run.startedAt,
|
|
@@ -1330,6 +1334,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
1330
1334
|
state: "running",
|
|
1331
1335
|
instruction: liveInstruction ?? task.title,
|
|
1332
1336
|
timeline: liveTimeline,
|
|
1337
|
+
report: liveReport,
|
|
1333
1338
|
phase: livePhase,
|
|
1334
1339
|
elapsed,
|
|
1335
1340
|
cost: liveCost,
|
|
@@ -2725,6 +2730,84 @@ Do NOT describe what you would do \u2014 actually do it by calling tools.
|
|
|
2725
2730
|
- Use patch_file for modifications, write_file only for new files.
|
|
2726
2731
|
- Be concise \u2014 let tool results speak.`
|
|
2727
2732
|
};
|
|
2733
|
+
var CAP_ROLE_ORCHESTRATOR = {
|
|
2734
|
+
name: "role-orchestrator",
|
|
2735
|
+
description: "Orchestrator role: decomposes objectives into tasks, assigns profiles, creates project briefs.",
|
|
2736
|
+
tools: [OP_TASK_CREATE, OP_LIST_FILES, OP_READ_FILE],
|
|
2737
|
+
prompt: `## YOUR ROLE: Orchestrator
|
|
2738
|
+
You DECOMPOSE and ASSIGN. You never write code or create files directly.
|
|
2739
|
+
|
|
2740
|
+
Your job:
|
|
2741
|
+
1. Analyze the objective and understand the project scope
|
|
2742
|
+
2. Create a PROJECT BRIEF (a concise description of what we're building, how pieces connect, conventions to follow)
|
|
2743
|
+
3. Break the objective into focused subtasks using task_create
|
|
2744
|
+
4. ALWAYS set assignedProfile on every subtask:
|
|
2745
|
+
- Code writing, file creation \u2192 "developer"
|
|
2746
|
+
- Code review, quality checks \u2192 "reviewer"
|
|
2747
|
+
- Project setup, dependencies, config \u2192 "ops"
|
|
2748
|
+
5. Set dependencies so tasks execute in the right order
|
|
2749
|
+
6. Include the project brief in every subtask's description
|
|
2750
|
+
|
|
2751
|
+
You do NOT have write_file, patch_file, or run_shell. You cannot execute \u2014 only plan and delegate.
|
|
2752
|
+
|
|
2753
|
+
### Project Brief Format
|
|
2754
|
+
Include this at the TOP of every subtask description:
|
|
2755
|
+
"PROJECT: [what we're building]. STRUCTURE: [file layout]. CONVENTIONS: [naming, patterns, exports]."
|
|
2756
|
+
|
|
2757
|
+
### Subtask Quality
|
|
2758
|
+
Each subtask must be:
|
|
2759
|
+
- Focused (one file or one concern)
|
|
2760
|
+
- Self-contained (has enough context to execute independently)
|
|
2761
|
+
- Properly routed (assignedProfile is set)
|
|
2762
|
+
- Ordered (dependsOn reflects real dependencies)`
|
|
2763
|
+
};
|
|
2764
|
+
var CAP_ROLE_DEVELOPER = {
|
|
2765
|
+
name: "role-developer",
|
|
2766
|
+
description: "Developer role: writes code, creates files, runs commands. Executes directly, never decomposes.",
|
|
2767
|
+
prompt: `## YOUR ROLE: Developer
|
|
2768
|
+
You WRITE CODE. Execute the task directly using write_file, patch_file, and run_shell.
|
|
2769
|
+
|
|
2770
|
+
Your job:
|
|
2771
|
+
1. Read the task description (including the project brief)
|
|
2772
|
+
2. Create a plan with CONCRETE file operations (write_file, patch_file, run_shell)
|
|
2773
|
+
3. Execute every step \u2014 produce actual files on disk
|
|
2774
|
+
4. Verify your work compiles and is correct
|
|
2775
|
+
|
|
2776
|
+
You do NOT have task_create. You cannot create subtasks or delegate.
|
|
2777
|
+
If the task seems too large, do your best \u2014 the orchestrator already decomposed it for you.
|
|
2778
|
+
|
|
2779
|
+
### Output Requirements
|
|
2780
|
+
Your plan MUST include at least one write_file, patch_file, or run_shell step.
|
|
2781
|
+
A plan with only "respond" steps is a FAILURE \u2014 you must produce artifacts.`
|
|
2782
|
+
};
|
|
2783
|
+
var CAP_ROLE_REVIEWER = {
|
|
2784
|
+
name: "role-reviewer",
|
|
2785
|
+
description: "Reviewer role: reads and evaluates code quality, security, correctness.",
|
|
2786
|
+
prompt: `## YOUR ROLE: Reviewer
|
|
2787
|
+
You READ and EVALUATE code. Check quality, security, correctness, and consistency.
|
|
2788
|
+
|
|
2789
|
+
Your job:
|
|
2790
|
+
1. Read the files that were created/modified
|
|
2791
|
+
2. Check against the task description and project conventions
|
|
2792
|
+
3. Report findings with file:line and severity
|
|
2793
|
+
4. Use patch_file to fix minor issues directly
|
|
2794
|
+
5. For major issues, document them clearly in your report
|
|
2795
|
+
|
|
2796
|
+
You do NOT have task_create or write_file. You can only read and patch.`
|
|
2797
|
+
};
|
|
2798
|
+
var CAP_ROLE_OPS = {
|
|
2799
|
+
name: "role-ops",
|
|
2800
|
+
description: "Ops role: sets up project infrastructure, configs, dependencies.",
|
|
2801
|
+
prompt: `## YOUR ROLE: Ops
|
|
2802
|
+
You SET UP infrastructure \u2014 package.json, tsconfig.json, directory structure, dependencies.
|
|
2803
|
+
|
|
2804
|
+
Your job:
|
|
2805
|
+
1. Initialize project structure (create config files, directories)
|
|
2806
|
+
2. Install dependencies with run_shell
|
|
2807
|
+
3. Ensure the project builds and tests can run
|
|
2808
|
+
|
|
2809
|
+
You do NOT have task_create. You execute infrastructure tasks directly.`
|
|
2810
|
+
};
|
|
2728
2811
|
var CAP_FILE_OPS = {
|
|
2729
2812
|
name: "file-ops",
|
|
2730
2813
|
description: "File read/write/patch operations and best practices for file manipulation.",
|
|
@@ -3026,6 +3109,12 @@ When you discover a new convention, remember it for future bots.`
|
|
|
3026
3109
|
};
|
|
3027
3110
|
var BUILT_IN_CAPABILITIES = [
|
|
3028
3111
|
CAP_CORE,
|
|
3112
|
+
// Role capabilities
|
|
3113
|
+
CAP_ROLE_ORCHESTRATOR,
|
|
3114
|
+
CAP_ROLE_DEVELOPER,
|
|
3115
|
+
CAP_ROLE_REVIEWER,
|
|
3116
|
+
CAP_ROLE_OPS,
|
|
3117
|
+
// Tool capabilities
|
|
3029
3118
|
CAP_FILE_OPS,
|
|
3030
3119
|
CAP_SHELL,
|
|
3031
3120
|
CAP_TASK_MGMT,
|
|
@@ -3051,9 +3140,9 @@ var capabilityMap = new Map(
|
|
|
3051
3140
|
|
|
3052
3141
|
// src/bot/behavior-defaults.ts
|
|
3053
3142
|
var STRATEGY_CAPABILITIES = {
|
|
3054
|
-
frugal: ["core", "file-ops", "shell", "context"],
|
|
3055
|
-
balanced: ["core", "
|
|
3056
|
-
performance: ["core", "
|
|
3143
|
+
frugal: ["core", "role-developer", "file-ops", "shell", "context"],
|
|
3144
|
+
balanced: ["core", "role-developer", "file-ops", "shell", "fw-grammar", "fw-validate", "context"],
|
|
3145
|
+
performance: ["core", "role-developer", "file-ops", "shell", "fw-grammar", "fw-validate", "fw-genesis", "fw-cli", "code-review", "web", "context"]
|
|
3057
3146
|
};
|
|
3058
3147
|
var STRATEGY_BUDGETS = {
|
|
3059
3148
|
frugal: 0.1,
|
|
@@ -188,12 +188,13 @@ function useStreamTimeline(events, isDone) {
|
|
|
188
188
|
}
|
|
189
189
|
return entries;
|
|
190
190
|
}, [events]);
|
|
191
|
-
const { phase, instruction, cost, plan, awaitingApproval } = useMemo(() => {
|
|
191
|
+
const { phase, instruction, cost, plan, awaitingApproval, report } = useMemo(() => {
|
|
192
192
|
let phase2 = "idle";
|
|
193
193
|
let instruction2 = null;
|
|
194
194
|
let cost2 = null;
|
|
195
195
|
let plan2 = null;
|
|
196
196
|
let awaitingApproval2 = false;
|
|
197
|
+
let report2 = null;
|
|
197
198
|
for (const event of events) {
|
|
198
199
|
const d = event.data ?? {};
|
|
199
200
|
if (event.type === "bot-started") {
|
|
@@ -203,6 +204,7 @@ function useStreamTimeline(events, isDone) {
|
|
|
203
204
|
phase2 = "executing";
|
|
204
205
|
} else if (event.type === "bot-completed") {
|
|
205
206
|
phase2 = d.success ? "completed" : "failed";
|
|
207
|
+
if (typeof d.report === "string") report2 = d.report;
|
|
206
208
|
} else if (event.type === "bot-failed") {
|
|
207
209
|
phase2 = "failed";
|
|
208
210
|
} else if (event.type === "cost-update") {
|
|
@@ -223,9 +225,9 @@ function useStreamTimeline(events, isDone) {
|
|
|
223
225
|
if (isDone && phase2 !== "completed" && phase2 !== "failed") {
|
|
224
226
|
phase2 = "completed";
|
|
225
227
|
}
|
|
226
|
-
return { phase: phase2, instruction: instruction2, cost: cost2, plan: plan2, awaitingApproval: awaitingApproval2 };
|
|
228
|
+
return { phase: phase2, instruction: instruction2, cost: cost2, plan: plan2, awaitingApproval: awaitingApproval2, report: report2 };
|
|
227
229
|
}, [events, isDone]);
|
|
228
|
-
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval };
|
|
230
|
+
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval, report };
|
|
229
231
|
}
|
|
230
232
|
|
|
231
233
|
// src/ui/trace-to-timeline.ts
|
|
@@ -482,7 +484,8 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
482
484
|
elapsed,
|
|
483
485
|
cost: liveCost,
|
|
484
486
|
plan,
|
|
485
|
-
awaitingApproval
|
|
487
|
+
awaitingApproval,
|
|
488
|
+
report: liveReport
|
|
486
489
|
} = useStreamTimeline(stream.events, stream.isDone);
|
|
487
490
|
const currentRunId = task?.currentRunId;
|
|
488
491
|
const isLive = task?.status === "in-progress" && !!currentRunId;
|
|
@@ -810,6 +813,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
810
813
|
state: isSuccess ? "completed" : "failed",
|
|
811
814
|
instruction: extractInstruction(run),
|
|
812
815
|
timeline: runTimeline,
|
|
816
|
+
report: run.report ?? null,
|
|
813
817
|
cost: typeof run.cost === "number" ? run.cost : run.costDetail?.totalCost ?? null,
|
|
814
818
|
plan: run.plan,
|
|
815
819
|
startedAt: run.startedAt,
|
|
@@ -824,6 +828,7 @@ function TaskDetailView({ taskId, onBack, onEdit }) {
|
|
|
824
828
|
state: "running",
|
|
825
829
|
instruction: liveInstruction ?? task.title,
|
|
826
830
|
timeline: liveTimeline,
|
|
831
|
+
report: liveReport,
|
|
827
832
|
phase: livePhase,
|
|
828
833
|
elapsed,
|
|
829
834
|
cost: liveCost,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-to-timeline.d.ts","sourceRoot":"","sources":["../../src/ui/trace-to-timeline.ts"],"names":[],"mappings":"AAEA,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,IAAI,CAAC;IAChB,IAAI,EAAE,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,aAAa,CAAC;IAC9I,MAAM,CAAC,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AAC;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7E,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACrC;AAID,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,EAAE,CAuHnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-to-timeline.js","sourceRoot":"","sources":["../../src/ui/trace-to-timeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trace-to-timeline.js","sourceRoot":"","sources":["../../src/ui/trace-to-timeline.ts"],"names":[],"mappings":"AAsFA,qCAAqC;AAErC,MAAM,UAAU,eAAe,CAAC,GAAkB;IAChD,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;IAEhC,6EAA6E;IAC7E,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;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AAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAClE,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,gBAAgB;YACvB,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC;gBAChC,CAAC,CAAC,GAAG,CAAC,OAAO;qBACR,KAAK,CAAC,GAAG,CAAC;qBACV,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;oBACrD,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;qBACxB,IAAI,EAAE;gBACX,CAAC,CAAC,SAAS;SACd,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IACtE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -42,6 +42,8 @@ export interface StreamTimelineState {
|
|
|
42
42
|
}>;
|
|
43
43
|
} | null;
|
|
44
44
|
awaitingApproval: boolean;
|
|
45
|
+
/** Markdown report from bot-completed event. */
|
|
46
|
+
report: string | null;
|
|
45
47
|
}
|
|
46
48
|
export declare function useStreamTimeline(events: StreamEvent[], isDone: boolean): StreamTimelineState;
|
|
47
49
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stream-timeline.d.ts","sourceRoot":"","sources":["../../src/ui/use-stream-timeline.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM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C;CACvB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAsP7F"}
|
|
@@ -193,12 +193,13 @@ export function useStreamTimeline(events, isDone) {
|
|
|
193
193
|
return entries;
|
|
194
194
|
}, [events]);
|
|
195
195
|
// Extract metadata from events
|
|
196
|
-
const { phase, instruction, cost, plan, awaitingApproval } = useMemo(() => {
|
|
196
|
+
const { phase, instruction, cost, plan, awaitingApproval, report } = useMemo(() => {
|
|
197
197
|
let phase = 'idle';
|
|
198
198
|
let instruction = null;
|
|
199
199
|
let cost = null;
|
|
200
200
|
let plan = null;
|
|
201
201
|
let awaitingApproval = false;
|
|
202
|
+
let report = null;
|
|
202
203
|
for (const event of events) {
|
|
203
204
|
const d = event.data ?? {};
|
|
204
205
|
if (event.type === 'bot-started') {
|
|
@@ -210,6 +211,8 @@ export function useStreamTimeline(events, isDone) {
|
|
|
210
211
|
}
|
|
211
212
|
else if (event.type === 'bot-completed') {
|
|
212
213
|
phase = d.success ? 'completed' : 'failed';
|
|
214
|
+
if (typeof d.report === 'string')
|
|
215
|
+
report = d.report;
|
|
213
216
|
}
|
|
214
217
|
else if (event.type === 'bot-failed') {
|
|
215
218
|
phase = 'failed';
|
|
@@ -218,7 +221,6 @@ export function useStreamTimeline(events, isDone) {
|
|
|
218
221
|
cost = d.totalCost ?? cost;
|
|
219
222
|
}
|
|
220
223
|
else if (event.type === 'audit:plan-created' || event.type === 'plan-created') {
|
|
221
|
-
// Plan data may be at d.plan (structured) or directly on d (audit event)
|
|
222
224
|
const planData = d.plan ?? d;
|
|
223
225
|
const summary = planData.summary ?? '';
|
|
224
226
|
const steps = planData.steps ?? [];
|
|
@@ -234,10 +236,10 @@ export function useStreamTimeline(events, isDone) {
|
|
|
234
236
|
}
|
|
235
237
|
}
|
|
236
238
|
if (isDone && phase !== 'completed' && phase !== 'failed') {
|
|
237
|
-
phase = 'completed';
|
|
239
|
+
phase = 'completed';
|
|
238
240
|
}
|
|
239
|
-
return { phase, instruction, cost, plan, awaitingApproval };
|
|
241
|
+
return { phase, instruction, cost, plan, awaitingApproval, report };
|
|
240
242
|
}, [events, isDone]);
|
|
241
|
-
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval };
|
|
243
|
+
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval, report };
|
|
242
244
|
}
|
|
243
245
|
//# sourceMappingURL=use-stream-timeline.js.map
|