@synergenius/flow-weaver-pack-weaver 0.9.14 → 0.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/ai-chat-provider.d.ts +34 -0
  2. package/dist/ai-chat-provider.d.ts.map +1 -0
  3. package/dist/ai-chat-provider.js +256 -0
  4. package/dist/ai-chat-provider.js.map +1 -0
  5. package/dist/docs/docs/weaver-bot-usage.md +34 -0
  6. package/dist/docs/docs/weaver-genesis.md +32 -0
  7. package/dist/docs/docs/weaver-task-queue.md +34 -0
  8. package/dist/docs/weaver-bot-usage.md +34 -0
  9. package/dist/docs/weaver-config.md +9 -15
  10. package/dist/docs/weaver-genesis.md +32 -0
  11. package/dist/docs/weaver-task-queue.md +34 -0
  12. package/dist/ui/evolution-panel.js +129 -56
  13. package/dist/ui/insights-widget.js +69 -37
  14. package/flowweaver.manifest.json +281 -4
  15. package/package.json +1 -1
  16. package/src/ai-chat-provider.ts +300 -0
  17. package/src/docs/weaver-bot-usage.md +34 -0
  18. package/src/docs/weaver-genesis.md +32 -0
  19. package/src/docs/weaver-task-queue.md +34 -0
  20. package/src/ui/evolution-panel.tsx +155 -70
  21. package/src/ui/insights-widget.tsx +86 -33
  22. package/dist/bot/agent-loop.d.ts +0 -20
  23. package/dist/bot/agent-loop.d.ts.map +0 -1
  24. package/dist/bot/agent-loop.js +0 -331
  25. package/dist/bot/agent-loop.js.map +0 -1
  26. package/dist/cli.d.ts +0 -3
  27. package/dist/cli.d.ts.map +0 -1
  28. package/dist/cli.js +0 -749
  29. package/dist/cli.js.map +0 -1
  30. package/dist/templates/weaver-template.d.ts +0 -11
  31. package/dist/templates/weaver-template.d.ts.map +0 -1
  32. package/dist/templates/weaver-template.js +0 -53
  33. package/dist/templates/weaver-template.js.map +0 -1
  34. package/dist/workflows/weaver-bot-session.d.ts +0 -65
  35. package/dist/workflows/weaver-bot-session.d.ts.map +0 -1
  36. package/dist/workflows/weaver-bot-session.js +0 -68
  37. package/dist/workflows/weaver-bot-session.js.map +0 -1
  38. package/dist/workflows/weaver.d.ts +0 -24
  39. package/dist/workflows/weaver.d.ts.map +0 -1
  40. package/dist/workflows/weaver.js +0 -28
  41. package/dist/workflows/weaver.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ /**
2
+ * AI Chat Provider for the Weaver pack.
3
+ *
4
+ * Thin adapter that bridges Weaver's existing capabilities into the
5
+ * platform's generic pack AI chat extension system.
6
+ *
7
+ * - executeTool() delegates to the same handlers used by MCP tools
8
+ * - getSystemPromptSections() composes from existing bot infrastructure
9
+ */
10
+ interface AiChatToolContext {
11
+ workspacePath: string;
12
+ userId: string;
13
+ }
14
+ interface AiChatToolResult {
15
+ result: string;
16
+ isError: boolean;
17
+ }
18
+ interface AiChatPromptSection {
19
+ id: string;
20
+ title: string;
21
+ content: string;
22
+ priority: number;
23
+ }
24
+ interface AiChatPromptContext {
25
+ workspacePath: string;
26
+ conversationId: string;
27
+ messageCount: number;
28
+ }
29
+ declare const _default: {
30
+ executeTool(name: string, args: Record<string, unknown>, context: AiChatToolContext): Promise<AiChatToolResult>;
31
+ getSystemPromptSections(context: AiChatPromptContext): Promise<AiChatPromptSection[]>;
32
+ };
33
+ export default _default;
34
+ //# sourceMappingURL=ai-chat-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-chat-provider.d.ts","sourceRoot":"","sources":["../src/ai-chat-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,UAAU,iBAAiB;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,mBAAmB;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;;sBAkLS,MAAM,QACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WACpB,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC;qCAcjB,mBAAmB,GAC3B,OAAO,CAAC,mBAAmB,EAAE,CAAC;;AApBnC,wBAuFE"}
@@ -0,0 +1,256 @@
1
+ /**
2
+ * AI Chat Provider for the Weaver pack.
3
+ *
4
+ * Thin adapter that bridges Weaver's existing capabilities into the
5
+ * platform's generic pack AI chat extension system.
6
+ *
7
+ * - executeTool() delegates to the same handlers used by MCP tools
8
+ * - getSystemPromptSections() composes from existing bot infrastructure
9
+ */
10
+ import { runWorkflow } from './bot/runner.js';
11
+ import { RunStore } from './bot/run-store.js';
12
+ import { CostStore } from './bot/cost-store.js';
13
+ import { defaultRegistry, discoverProviders } from './bot/provider-registry.js';
14
+ // ---------------------------------------------------------------------------
15
+ // Tool handlers — reuse the same logic as MCP tools
16
+ // ---------------------------------------------------------------------------
17
+ const toolHandlers = {
18
+ async fw_weaver_run(args, ctx) {
19
+ const result = await runWorkflow(args.file, {
20
+ params: args.params,
21
+ verbose: args.verbose,
22
+ dryRun: args.dryRun,
23
+ });
24
+ return JSON.stringify(result, null, 2);
25
+ },
26
+ async fw_weaver_history(args) {
27
+ const store = new RunStore();
28
+ if (args.id) {
29
+ const record = store.get(args.id);
30
+ return record ? JSON.stringify(record, null, 2) : `No run found matching "${args.id}"`;
31
+ }
32
+ const records = store.list({
33
+ outcome: args.outcome,
34
+ workflowFile: args.workflowFile,
35
+ limit: args.limit ?? 20,
36
+ });
37
+ return records.length === 0 ? 'No runs recorded yet.' : JSON.stringify(records, null, 2);
38
+ },
39
+ async fw_weaver_costs(args) {
40
+ const store = new CostStore();
41
+ let sinceTs;
42
+ if (args.since) {
43
+ const spec = args.since;
44
+ const match = spec.match(/^(\d+)([dhm])$/);
45
+ if (match) {
46
+ const n = parseInt(match[1], 10);
47
+ const unit = match[2];
48
+ const ms = unit === 'd' ? n * 86_400_000 : unit === 'h' ? n * 3_600_000 : n * 60_000;
49
+ sinceTs = Date.now() - ms;
50
+ }
51
+ else {
52
+ const ts = new Date(spec).getTime();
53
+ if (!isNaN(ts))
54
+ sinceTs = ts;
55
+ }
56
+ }
57
+ const summary = store.summarize({ since: sinceTs, model: args.model });
58
+ return JSON.stringify(summary, null, 2);
59
+ },
60
+ async fw_weaver_providers() {
61
+ await discoverProviders(defaultRegistry);
62
+ const providers = defaultRegistry.list();
63
+ const result = providers.map(({ name, metadata }) => ({
64
+ name,
65
+ source: metadata.source,
66
+ description: metadata.description,
67
+ requiredEnvVars: metadata.requiredEnvVars,
68
+ envVarsSet: metadata.requiredEnvVars?.every((v) => process.env[v]) ?? false,
69
+ detectCliCommand: metadata.detectCliCommand,
70
+ }));
71
+ return JSON.stringify(result, null, 2);
72
+ },
73
+ async fw_weaver_bot(args, ctx) {
74
+ const { fileURLToPath } = await import('node:url');
75
+ const { existsSync } = await import('node:fs');
76
+ const task = {
77
+ instruction: args.task,
78
+ mode: args.mode ?? 'create',
79
+ targets: args.targets,
80
+ options: {
81
+ template: args.template,
82
+ dryRun: args.dryRun,
83
+ autoApprove: args.autoApprove ?? true,
84
+ },
85
+ };
86
+ const packRoot = new URL('..', import.meta.url);
87
+ let workflowPath = fileURLToPath(new URL('src/workflows/weaver-bot.ts', packRoot));
88
+ if (!existsSync(workflowPath)) {
89
+ workflowPath = fileURLToPath(new URL('dist/workflows/weaver-bot.js', packRoot));
90
+ }
91
+ const result = await runWorkflow(workflowPath, {
92
+ params: { taskJson: JSON.stringify(task), projectDir: ctx.workspacePath || process.cwd() },
93
+ dryRun: args.dryRun,
94
+ });
95
+ return JSON.stringify(result, null, 2);
96
+ },
97
+ async fw_weaver_steer(args) {
98
+ const { SteeringController } = await import('./bot/steering.js');
99
+ const controller = new SteeringController();
100
+ await controller.write({
101
+ command: args.command,
102
+ payload: args.payload,
103
+ timestamp: Date.now(),
104
+ });
105
+ return `Steering command sent: ${args.command}`;
106
+ },
107
+ async fw_weaver_queue(args) {
108
+ const { TaskQueue } = await import('./bot/task-queue.js');
109
+ const queue = new TaskQueue();
110
+ switch (args.action) {
111
+ case 'add': {
112
+ if (!args.task)
113
+ return 'Error: task instruction required';
114
+ const { id, duplicate } = await queue.add({ instruction: args.task, priority: 0 });
115
+ return duplicate ? `Task already queued (${id})` : `Task added: ${id}`;
116
+ }
117
+ case 'list':
118
+ return JSON.stringify(await queue.list(), null, 2);
119
+ case 'clear': {
120
+ const count = await queue.clear();
121
+ return `Cleared ${count} task(s)`;
122
+ }
123
+ case 'remove': {
124
+ if (!args.id)
125
+ return 'Error: task ID required';
126
+ const removed = await queue.remove(args.id);
127
+ return removed ? `Removed ${args.id}` : `Not found: ${args.id}`;
128
+ }
129
+ default:
130
+ return `Unknown action: ${args.action}`;
131
+ }
132
+ },
133
+ async fw_weaver_status() {
134
+ const { SessionStore } = await import('./bot/session-state.js');
135
+ const store = new SessionStore();
136
+ const state = store.load();
137
+ return state ? JSON.stringify(state, null, 2) : JSON.stringify({ status: 'no active session' }, null, 2);
138
+ },
139
+ async fw_weaver_genesis(args, ctx) {
140
+ const { fileURLToPath } = await import('node:url');
141
+ const { existsSync } = await import('node:fs');
142
+ const packRoot = new URL('..', import.meta.url);
143
+ let workflowPath = fileURLToPath(new URL('src/workflows/genesis-task.ts', packRoot));
144
+ if (!existsSync(workflowPath)) {
145
+ workflowPath = fileURLToPath(new URL('dist/workflows/genesis-task.js', packRoot));
146
+ }
147
+ const result = await runWorkflow(workflowPath, {
148
+ params: { projectDir: ctx.workspacePath || process.cwd() },
149
+ dryRun: args.dryRun,
150
+ });
151
+ return JSON.stringify(result, null, 2);
152
+ },
153
+ async fw_weaver_insights(args, ctx) {
154
+ const { ProjectModelStore } = await import('./bot/project-model.js');
155
+ const { InsightEngine } = await import('./bot/insight-engine.js');
156
+ const projectDir = args.projectDir || ctx.workspacePath;
157
+ const pms = new ProjectModelStore(projectDir);
158
+ const model = await pms.getOrBuild();
159
+ const engine = new InsightEngine();
160
+ const insights = engine.analyze(model);
161
+ return JSON.stringify({
162
+ health: model.health,
163
+ bots: model.bots,
164
+ insights: insights.slice(0, 10),
165
+ trust: model.trust,
166
+ cost: model.cost,
167
+ evolution: {
168
+ totalCycles: model.evolution.totalCycles,
169
+ successRate: model.evolution.successRate,
170
+ },
171
+ }, null, 2);
172
+ },
173
+ };
174
+ // ---------------------------------------------------------------------------
175
+ // Provider implementation
176
+ // ---------------------------------------------------------------------------
177
+ export default {
178
+ async executeTool(name, args, context) {
179
+ const handler = toolHandlers[name];
180
+ if (!handler) {
181
+ return { result: `Unknown weaver tool: ${name}`, isError: true };
182
+ }
183
+ try {
184
+ const result = await handler(args, context);
185
+ return { result, isError: false };
186
+ }
187
+ catch (err) {
188
+ return { result: err instanceof Error ? err.message : String(err), isError: true };
189
+ }
190
+ },
191
+ async getSystemPromptSections(context) {
192
+ const sections = [];
193
+ // Weaver behavioral instructions
194
+ try {
195
+ const { buildBotSystemPrompt } = await import('./bot/system-prompt.js');
196
+ const prompt = buildBotSystemPrompt();
197
+ if (prompt) {
198
+ sections.push({
199
+ id: 'weaver-identity',
200
+ title: 'Weaver Behavioral Instructions',
201
+ content: prompt,
202
+ priority: 10,
203
+ });
204
+ }
205
+ }
206
+ catch {
207
+ // system-prompt module not available — skip
208
+ }
209
+ // Project intelligence
210
+ if (context.workspacePath) {
211
+ try {
212
+ const { ProjectModelStore } = await import('./bot/project-model.js');
213
+ const pms = new ProjectModelStore(context.workspacePath);
214
+ const model = await pms.getOrBuild();
215
+ if (model && (model.health.workflows.length > 0 || model.bots.length > 0)) {
216
+ sections.push({
217
+ id: 'project-intelligence',
218
+ title: 'Project Intelligence',
219
+ content: pms.formatSummary(model) +
220
+ '\n\nBe proactive: mention relevant insights when they relate to what the user is working on.',
221
+ priority: 20,
222
+ });
223
+ }
224
+ }
225
+ catch {
226
+ // ProjectModelStore not available — skip
227
+ }
228
+ }
229
+ // Proactive insights
230
+ if (context.workspacePath) {
231
+ try {
232
+ const { InsightEngine } = await import('./bot/insight-engine.js');
233
+ const engine = new InsightEngine();
234
+ const { ProjectModelStore } = await import('./bot/project-model.js');
235
+ const pms = new ProjectModelStore(context.workspacePath);
236
+ const model = await pms.getOrBuild();
237
+ if (model) {
238
+ const insights = engine.analyze(model).slice(0, 3);
239
+ if (insights.length > 0) {
240
+ sections.push({
241
+ id: 'proactive-insights',
242
+ title: 'Proactive Insights',
243
+ content: insights.map((i) => `- [${i.severity}] ${i.title}: ${i.description}`).join('\n'),
244
+ priority: 30,
245
+ });
246
+ }
247
+ }
248
+ }
249
+ catch {
250
+ // InsightEngine not available — skip
251
+ }
252
+ }
253
+ return sections;
254
+ },
255
+ };
256
+ //# sourceMappingURL=ai-chat-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-chat-provider.js","sourceRoot":"","sources":["../src/ai-chat-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAyBhF,8EAA8E;AAC9E,oDAAoD;AACpD,8EAA8E;AAE9E,MAAM,YAAY,GAGd;IACF,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG;QAC3B,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,IAAc,EAAE;YACpD,MAAM,EAAE,IAAI,CAAC,MAA6C;YAC1D,OAAO,EAAE,IAAI,CAAC,OAA8B;YAC5C,MAAM,EAAE,IAAI,CAAC,MAA6B;SAC3C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B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;gBACzD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC;gBACrC,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACnD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACxB,QAAQ,CAAC,IAAI,CAAC;4BACZ,EAAE,EAAE,oBAAoB;4BACxB,KAAK,EAAE,oBAAoB;4BAC3B,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1B,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,WAAW,EAAE,CACjD,CAAC,IAAI,CAAC,IAAI,CAAC;4BACZ,QAAQ,EAAE,EAAE;yBACb,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,qCAAqC;YACvC,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAC"}
@@ -0,0 +1,34 @@
1
+ ## Weaver Bot
2
+
3
+ The Weaver bot is an autonomous AI agent that creates and modifies Flow Weaver workflows from natural language instructions.
4
+
5
+ ### Running the bot
6
+
7
+ Use `fw_weaver_bot` with a task description:
8
+ - `task`: Natural language instruction (required)
9
+ - `mode`: `create` (new workflow), `modify` (edit existing), `read` (analyze), `batch` (multiple tasks)
10
+ - `targets`: File paths for modify/read mode
11
+ - `autoApprove`: Skip the approval gate (default: true in studio)
12
+
13
+ ### Execution flow
14
+
15
+ 1. **Receive task** — parses instruction and determines mode
16
+ 2. **Build context** — gathers project state, templates, and relevant files
17
+ 3. **Plan** — AI generates a step-by-step execution plan
18
+ 4. **Approval gate** — plan shown for review (skipped if autoApprove)
19
+ 5. **Execute + validate + retry** — runs steps, validates output, retries on errors (up to 3 attempts)
20
+ 6. **Git ops** — commits changes if successful
21
+ 7. **Report** — returns summary with outcome
22
+
23
+ ### Steering a running bot
24
+
25
+ Use `fw_weaver_steer` to control execution:
26
+ - `pause` — pause at next safe point
27
+ - `resume` — continue after pause
28
+ - `cancel` — abort execution
29
+ - `redirect` — change task mid-execution
30
+ - `queue` — add a follow-up task
31
+
32
+ ### Checking status
33
+
34
+ Use `fw_weaver_status` to see the current bot session state, active task, and completion count.
@@ -0,0 +1,32 @@
1
+ ## Genesis Self-Evolution
2
+
3
+ Genesis is Weaver's self-evolution protocol. It autonomously observes, proposes, applies, and validates changes to workflows.
4
+
5
+ ### Running a Genesis cycle
6
+
7
+ Use `fw_weaver_genesis` to trigger a single cycle:
8
+ - `projectDir`: Project directory (defaults to workspace)
9
+ - `dryRun`: Preview changes without applying
10
+
11
+ ### How it works
12
+
13
+ 1. **Observe** — scans project for workflows and their health
14
+ 2. **Fingerprint** — detects if workflows changed since last cycle (avoids duplicate proposals)
15
+ 3. **Stabilize check** — prevents rapid churn (cooldown between cycles)
16
+ 4. **Propose** — AI analyzes project state and proposes modifications within a budget
17
+ 5. **Validate proposal** — checks proposed changes are safe
18
+ 6. **Snapshot** — creates backup before applying
19
+ 7. **Apply** — executes proposed operations via `flow-weaver modify`
20
+ 8. **Validate result** — compiles and validates the modified workflow
21
+ 9. **Threshold check** — decides if changes meet the quality bar
22
+ 10. **Approve** — human approval gate (configurable)
23
+ 11. **Commit** — git commit with rollback capability
24
+ 12. **Escrow** — data safety pipeline for recovery
25
+
26
+ ### Safety features
27
+
28
+ - Pre-apply snapshots for rollback
29
+ - Escrow recovery from previous cycles
30
+ - Fingerprinting prevents duplicate proposals
31
+ - Threshold checking before committing
32
+ - Budget limits on proposed changes
@@ -0,0 +1,34 @@
1
+ ## Task Queue & Steering
2
+
3
+ Weaver supports queuing tasks for background processing and steering running bots in real-time.
4
+
5
+ ### Task queue
6
+
7
+ Use `fw_weaver_queue` to manage tasks:
8
+ - `add` — add a task to the queue (requires `task` instruction)
9
+ - `list` — show all queued tasks
10
+ - `clear` — remove all pending tasks
11
+ - `remove` — remove a specific task by ID
12
+
13
+ Tasks are stored in NDJSON format and processed sequentially by the bot session.
14
+
15
+ ### Steering commands
16
+
17
+ Use `fw_weaver_steer` to control a running bot:
18
+ - `pause` — pause execution at the next safe point
19
+ - `resume` — continue after a pause
20
+ - `cancel` — abort the current task
21
+ - `redirect` — change the task instruction mid-execution (requires `payload` with new instruction)
22
+ - `queue` — add a follow-up task without interrupting the current one
23
+
24
+ ### Batch mode
25
+
26
+ For multiple related tasks, use `fw_weaver_bot` with `mode: "batch"` to process them in sequence through the same bot session, sharing context between tasks.
27
+
28
+ ### Monitoring
29
+
30
+ Use `fw_weaver_status` to check the current session state:
31
+ - Session phase (idle, planning, executing, validating)
32
+ - Current task instruction
33
+ - Completed task count
34
+ - Error state if any
@@ -0,0 +1,34 @@
1
+ ## Weaver Bot
2
+
3
+ The Weaver bot is an autonomous AI agent that creates and modifies Flow Weaver workflows from natural language instructions.
4
+
5
+ ### Running the bot
6
+
7
+ Use `fw_weaver_bot` with a task description:
8
+ - `task`: Natural language instruction (required)
9
+ - `mode`: `create` (new workflow), `modify` (edit existing), `read` (analyze), `batch` (multiple tasks)
10
+ - `targets`: File paths for modify/read mode
11
+ - `autoApprove`: Skip the approval gate (default: true in studio)
12
+
13
+ ### Execution flow
14
+
15
+ 1. **Receive task** — parses instruction and determines mode
16
+ 2. **Build context** — gathers project state, templates, and relevant files
17
+ 3. **Plan** — AI generates a step-by-step execution plan
18
+ 4. **Approval gate** — plan shown for review (skipped if autoApprove)
19
+ 5. **Execute + validate + retry** — runs steps, validates output, retries on errors (up to 3 attempts)
20
+ 6. **Git ops** — commits changes if successful
21
+ 7. **Report** — returns summary with outcome
22
+
23
+ ### Steering a running bot
24
+
25
+ Use `fw_weaver_steer` to control execution:
26
+ - `pause` — pause at next safe point
27
+ - `resume` — continue after pause
28
+ - `cancel` — abort execution
29
+ - `redirect` — change task mid-execution
30
+ - `queue` — add a follow-up task
31
+
32
+ ### Checking status
33
+
34
+ Use `fw_weaver_status` to see the current bot session state, active task, and completion count.
@@ -1,26 +1,20 @@
1
- # Weaver Configuration Reference
1
+ # Weaver Bot Configuration Reference
2
2
 
3
- Weaver is a Flow Weaver workflow template that runs any other workflow autonomously. It auto-detects AI providers, resolves the target workflow, executes it with an agent channel, and sends notifications.
3
+ The weaver bot runs workflows, executes tasks from natural language, and evolves autonomously. It auto-detects AI providers, manages approval gates, handles git operations, and sends notifications.
4
4
 
5
- Weaver has deep knowledge of the full flow-weaver ecosystem: annotation grammar, CLI tools, node patterns, error diagnosis, and the genesis protocol (loaded dynamically from `@synergenius/flow-weaver/doc-metadata`).
5
+ The bot has deep knowledge of the full flow-weaver ecosystem: annotation grammar, CLI tools, node patterns, error diagnosis, and the genesis protocol (loaded dynamically from `@synergenius/flow-weaver/doc-metadata`).
6
6
 
7
7
  ## Getting started
8
8
 
9
- Scaffold via `flow-weaver init` and select the "AI Workflow Runner" use case, or use it programmatically:
10
-
11
- ```typescript
12
- import { weaverTemplate } from '@synergenius/flowweaver-pack-weaver/templates';
13
- const source = weaverTemplate.generate({ projectDir: '.' });
14
- ```
15
-
16
- Then compile and run:
9
+ Run the bot directly via CLI:
17
10
 
18
11
  ```bash
19
- flow-weaver compile weaver.ts
20
- tsx weaver.ts
12
+ flow-weaver weaver bot "Create a workflow that processes CSV files"
13
+ flow-weaver weaver run my-workflow.ts
14
+ flow-weaver weaver session
21
15
  ```
22
16
 
23
- Or run via MCP: `fw_execute_workflow` pointing at the compiled `weaver.ts`.
17
+ Or scaffold a project via `flow-weaver init` and select the "AI Workflow Runner" use case.
24
18
 
25
19
  ## .weaver.json
26
20
 
@@ -127,7 +121,7 @@ import {
127
121
  detectProvider,
128
122
  runWorkflow,
129
123
  BotAgentChannel,
130
- } from '@synergenius/flowweaver-pack-weaver';
124
+ } from '@synergenius/flow-weaver-pack-weaver';
131
125
 
132
126
  // Auto-detect and run
133
127
  const result = await runWorkflow('path/to/workflow.ts', { verbose: true });
@@ -0,0 +1,32 @@
1
+ ## Genesis Self-Evolution
2
+
3
+ Genesis is Weaver's self-evolution protocol. It autonomously observes, proposes, applies, and validates changes to workflows.
4
+
5
+ ### Running a Genesis cycle
6
+
7
+ Use `fw_weaver_genesis` to trigger a single cycle:
8
+ - `projectDir`: Project directory (defaults to workspace)
9
+ - `dryRun`: Preview changes without applying
10
+
11
+ ### How it works
12
+
13
+ 1. **Observe** — scans project for workflows and their health
14
+ 2. **Fingerprint** — detects if workflows changed since last cycle (avoids duplicate proposals)
15
+ 3. **Stabilize check** — prevents rapid churn (cooldown between cycles)
16
+ 4. **Propose** — AI analyzes project state and proposes modifications within a budget
17
+ 5. **Validate proposal** — checks proposed changes are safe
18
+ 6. **Snapshot** — creates backup before applying
19
+ 7. **Apply** — executes proposed operations via `flow-weaver modify`
20
+ 8. **Validate result** — compiles and validates the modified workflow
21
+ 9. **Threshold check** — decides if changes meet the quality bar
22
+ 10. **Approve** — human approval gate (configurable)
23
+ 11. **Commit** — git commit with rollback capability
24
+ 12. **Escrow** — data safety pipeline for recovery
25
+
26
+ ### Safety features
27
+
28
+ - Pre-apply snapshots for rollback
29
+ - Escrow recovery from previous cycles
30
+ - Fingerprinting prevents duplicate proposals
31
+ - Threshold checking before committing
32
+ - Budget limits on proposed changes
@@ -0,0 +1,34 @@
1
+ ## Task Queue & Steering
2
+
3
+ Weaver supports queuing tasks for background processing and steering running bots in real-time.
4
+
5
+ ### Task queue
6
+
7
+ Use `fw_weaver_queue` to manage tasks:
8
+ - `add` — add a task to the queue (requires `task` instruction)
9
+ - `list` — show all queued tasks
10
+ - `clear` — remove all pending tasks
11
+ - `remove` — remove a specific task by ID
12
+
13
+ Tasks are stored in NDJSON format and processed sequentially by the bot session.
14
+
15
+ ### Steering commands
16
+
17
+ Use `fw_weaver_steer` to control a running bot:
18
+ - `pause` — pause execution at the next safe point
19
+ - `resume` — continue after a pause
20
+ - `cancel` — abort the current task
21
+ - `redirect` — change the task instruction mid-execution (requires `payload` with new instruction)
22
+ - `queue` — add a follow-up task without interrupting the current one
23
+
24
+ ### Batch mode
25
+
26
+ For multiple related tasks, use `fw_weaver_bot` with `mode: "batch"` to process them in sequence through the same bot session, sharing context between tasks.
27
+
28
+ ### Monitoring
29
+
30
+ Use `fw_weaver_status` to check the current session state:
31
+ - Session phase (idle, planning, executing, validating)
32
+ - Current task instruction
33
+ - Completed task count
34
+ - Error state if any