@synergenius/flow-weaver-pack-weaver 0.9.0 → 0.9.4
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/ai-client.d.ts +22 -2
- package/dist/bot/ai-client.d.ts.map +1 -1
- package/dist/bot/ai-client.js +168 -20
- package/dist/bot/ai-client.js.map +1 -1
- package/dist/bot/ansi.d.ts +13 -0
- package/dist/bot/ansi.d.ts.map +1 -0
- package/dist/bot/ansi.js +13 -0
- package/dist/bot/ansi.js.map +1 -0
- package/dist/bot/assistant-core.d.ts +25 -0
- package/dist/bot/assistant-core.d.ts.map +1 -0
- package/dist/bot/assistant-core.js +272 -0
- package/dist/bot/assistant-core.js.map +1 -0
- package/dist/bot/assistant-tools.d.ts +10 -0
- package/dist/bot/assistant-tools.d.ts.map +1 -0
- package/dist/bot/assistant-tools.js +324 -0
- package/dist/bot/assistant-tools.js.map +1 -0
- package/dist/bot/audit-logger.d.ts.map +1 -1
- package/dist/bot/audit-logger.js +9 -5
- package/dist/bot/audit-logger.js.map +1 -1
- package/dist/bot/bot-manager.d.ts +49 -0
- package/dist/bot/bot-manager.d.ts.map +1 -0
- package/dist/bot/bot-manager.js +279 -0
- package/dist/bot/bot-manager.js.map +1 -0
- package/dist/bot/child-process-tracker.d.ts +6 -0
- package/dist/bot/child-process-tracker.d.ts.map +1 -0
- package/dist/bot/child-process-tracker.js +35 -0
- package/dist/bot/child-process-tracker.js.map +1 -0
- package/dist/bot/cli-provider.d.ts.map +1 -1
- package/dist/bot/cli-provider.js +13 -8
- package/dist/bot/cli-provider.js.map +1 -1
- package/dist/bot/conversation-store.d.ts +40 -0
- package/dist/bot/conversation-store.d.ts.map +1 -0
- package/dist/bot/conversation-store.js +182 -0
- package/dist/bot/conversation-store.js.map +1 -0
- package/dist/bot/error-classifier.d.ts +27 -0
- package/dist/bot/error-classifier.d.ts.map +1 -0
- package/dist/bot/error-classifier.js +71 -0
- package/dist/bot/error-classifier.js.map +1 -0
- package/dist/bot/error-guide.d.ts +5 -0
- package/dist/bot/error-guide.d.ts.map +1 -0
- package/dist/bot/error-guide.js +5 -0
- package/dist/bot/error-guide.js.map +1 -0
- package/dist/bot/knowledge-store.d.ts +17 -0
- package/dist/bot/knowledge-store.d.ts.map +1 -0
- package/dist/bot/knowledge-store.js +53 -0
- package/dist/bot/knowledge-store.js.map +1 -0
- package/dist/bot/paths.d.ts +11 -0
- package/dist/bot/paths.d.ts.map +1 -0
- package/dist/bot/paths.js +26 -0
- package/dist/bot/paths.js.map +1 -0
- package/dist/bot/retry-utils.d.ts +5 -0
- package/dist/bot/retry-utils.d.ts.map +1 -0
- package/dist/bot/retry-utils.js +5 -0
- package/dist/bot/retry-utils.js.map +1 -0
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +12 -1
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/safety.d.ts +10 -0
- package/dist/bot/safety.d.ts.map +1 -0
- package/dist/bot/safety.js +14 -0
- package/dist/bot/safety.js.map +1 -0
- package/dist/bot/session-state.d.ts.map +1 -1
- package/dist/bot/session-state.js +3 -1
- package/dist/bot/session-state.js.map +1 -1
- package/dist/bot/steering.js +2 -2
- package/dist/bot/steering.js.map +1 -1
- package/dist/bot/step-executor.d.ts +10 -5
- package/dist/bot/step-executor.d.ts.map +1 -1
- package/dist/bot/step-executor.js +252 -3
- package/dist/bot/step-executor.js.map +1 -1
- package/dist/bot/system-prompt.d.ts +1 -1
- package/dist/bot/system-prompt.d.ts.map +1 -1
- package/dist/bot/system-prompt.js +69 -43
- package/dist/bot/system-prompt.js.map +1 -1
- package/dist/bot/task-decomposer.d.ts +24 -0
- package/dist/bot/task-decomposer.d.ts.map +1 -0
- package/dist/bot/task-decomposer.js +75 -0
- package/dist/bot/task-decomposer.js.map +1 -0
- package/dist/bot/task-queue.d.ts +17 -4
- package/dist/bot/task-queue.d.ts.map +1 -1
- package/dist/bot/task-queue.js +83 -5
- package/dist/bot/task-queue.js.map +1 -1
- package/dist/bot/terminal-renderer.d.ts +60 -0
- package/dist/bot/terminal-renderer.d.ts.map +1 -0
- package/dist/bot/terminal-renderer.js +204 -0
- package/dist/bot/terminal-renderer.js.map +1 -0
- package/dist/bot/tool-registry.d.ts +24 -0
- package/dist/bot/tool-registry.d.ts.map +1 -0
- package/dist/bot/tool-registry.js +458 -0
- package/dist/bot/tool-registry.js.map +1 -0
- package/dist/bot/types.d.ts +7 -0
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/bot/weaver-tools.d.ts +18 -0
- package/dist/bot/weaver-tools.d.ts.map +1 -0
- package/dist/bot/weaver-tools.js +124 -0
- package/dist/bot/weaver-tools.js.map +1 -0
- package/dist/cli-bridge.d.ts.map +1 -1
- package/dist/cli-bridge.js +5 -1
- package/dist/cli-bridge.js.map +1 -1
- package/dist/cli-handlers.d.ts +13 -1
- package/dist/cli-handlers.d.ts.map +1 -1
- package/dist/cli-handlers.js +615 -48
- package/dist/cli-handlers.js.map +1 -1
- package/dist/mcp-tools.js +2 -2
- package/dist/mcp-tools.js.map +1 -1
- package/dist/node-types/abort-task.d.ts.map +1 -1
- package/dist/node-types/abort-task.js +4 -3
- package/dist/node-types/abort-task.js.map +1 -1
- package/dist/node-types/agent-execute.d.ts +38 -0
- package/dist/node-types/agent-execute.d.ts.map +1 -0
- package/dist/node-types/agent-execute.js +252 -0
- package/dist/node-types/agent-execute.js.map +1 -0
- package/dist/node-types/bot-report.d.ts +5 -3
- package/dist/node-types/bot-report.d.ts.map +1 -1
- package/dist/node-types/bot-report.js +39 -7
- package/dist/node-types/bot-report.js.map +1 -1
- package/dist/node-types/build-context.d.ts +3 -3
- package/dist/node-types/build-context.d.ts.map +1 -1
- package/dist/node-types/build-context.js +108 -24
- package/dist/node-types/build-context.js.map +1 -1
- package/dist/node-types/detect-provider.d.ts +2 -2
- package/dist/node-types/detect-provider.d.ts.map +1 -1
- package/dist/node-types/detect-provider.js +3 -1
- package/dist/node-types/detect-provider.js.map +1 -1
- package/dist/node-types/exec-validate-retry.d.ts.map +1 -1
- package/dist/node-types/exec-validate-retry.js +43 -6
- package/dist/node-types/exec-validate-retry.js.map +1 -1
- package/dist/node-types/execute-plan.d.ts.map +1 -1
- package/dist/node-types/execute-plan.js +31 -8
- package/dist/node-types/execute-plan.js.map +1 -1
- package/dist/node-types/execute-target.d.ts.map +1 -1
- package/dist/node-types/execute-target.js +3 -1
- package/dist/node-types/execute-target.js.map +1 -1
- package/dist/node-types/fix-errors.d.ts.map +1 -1
- package/dist/node-types/fix-errors.js +21 -5
- package/dist/node-types/fix-errors.js.map +1 -1
- package/dist/node-types/genesis-observe.d.ts.map +1 -1
- package/dist/node-types/genesis-observe.js +3 -1
- package/dist/node-types/genesis-observe.js.map +1 -1
- package/dist/node-types/genesis-report.js +4 -1
- package/dist/node-types/genesis-report.js.map +1 -1
- package/dist/node-types/git-ops.d.ts.map +1 -1
- package/dist/node-types/git-ops.js +98 -4
- package/dist/node-types/git-ops.js.map +1 -1
- package/dist/node-types/index.d.ts +2 -0
- package/dist/node-types/index.d.ts.map +1 -1
- package/dist/node-types/index.js +2 -0
- package/dist/node-types/index.js.map +1 -1
- package/dist/node-types/load-config.d.ts +2 -2
- package/dist/node-types/load-config.d.ts.map +1 -1
- package/dist/node-types/load-config.js.map +1 -1
- package/dist/node-types/plan-task.d.ts.map +1 -1
- package/dist/node-types/plan-task.js +14 -2
- package/dist/node-types/plan-task.js.map +1 -1
- package/dist/node-types/read-workflow.js +8 -2
- package/dist/node-types/read-workflow.js.map +1 -1
- package/dist/node-types/receive-task.d.ts.map +1 -1
- package/dist/node-types/receive-task.js +35 -26
- package/dist/node-types/receive-task.js.map +1 -1
- package/dist/node-types/send-notify.js +2 -1
- package/dist/node-types/send-notify.js.map +1 -1
- package/dist/node-types/validate-gate.d.ts +18 -0
- package/dist/node-types/validate-gate.d.ts.map +1 -0
- package/dist/node-types/validate-gate.js +96 -0
- package/dist/node-types/validate-gate.js.map +1 -0
- package/dist/workflows/genesis-task.d.ts +20 -12
- package/dist/workflows/genesis-task.d.ts.map +1 -1
- package/dist/workflows/genesis-task.js +20 -12
- package/dist/workflows/genesis-task.js.map +1 -1
- package/dist/workflows/weaver-agent.d.ts +35 -0
- package/dist/workflows/weaver-agent.d.ts.map +1 -0
- package/dist/workflows/weaver-agent.js +777 -0
- package/dist/workflows/weaver-agent.js.map +1 -0
- package/dist/workflows/weaver-bot-batch.d.ts +19 -26
- package/dist/workflows/weaver-bot-batch.d.ts.map +1 -1
- package/dist/workflows/weaver-bot-batch.js +1043 -27
- package/dist/workflows/weaver-bot-batch.js.map +1 -1
- package/dist/workflows/weaver-bot.d.ts +21 -35
- package/dist/workflows/weaver-bot.d.ts.map +1 -1
- package/dist/workflows/weaver-bot.js +1119 -36
- package/dist/workflows/weaver-bot.js.map +1 -1
- package/flowweaver.manifest.json +21 -1
- package/package.json +5 -2
- package/src/bot/ai-client.ts +180 -19
- package/src/bot/ansi.ts +12 -0
- package/src/bot/assistant-core.ts +312 -0
- package/src/bot/assistant-tools.ts +318 -0
- package/src/bot/audit-logger.ts +6 -5
- package/src/bot/bot-manager.ts +293 -0
- package/src/bot/child-process-tracker.ts +40 -0
- package/src/bot/cli-provider.ts +13 -8
- package/src/bot/conversation-store.ts +222 -0
- package/src/bot/error-classifier.ts +90 -0
- package/src/bot/error-guide.ts +4 -0
- package/src/bot/knowledge-store.ts +59 -0
- package/src/bot/paths.ts +27 -0
- package/src/bot/retry-utils.ts +4 -0
- package/src/bot/runner.ts +12 -1
- package/src/bot/safety.ts +16 -0
- package/src/bot/session-state.ts +2 -1
- package/src/bot/steering.ts +2 -2
- package/src/bot/step-executor.ts +313 -5
- package/src/bot/system-prompt.ts +70 -47
- package/src/bot/task-decomposer.ts +100 -0
- package/src/bot/task-queue.ts +100 -8
- package/src/bot/terminal-renderer.ts +238 -0
- package/src/bot/tool-registry.ts +477 -0
- package/src/bot/types.ts +8 -0
- package/src/bot/weaver-tools.ts +134 -0
- package/src/cli-bridge.ts +7 -1
- package/src/cli-handlers.ts +624 -48
- package/src/mcp-tools.ts +2 -2
- package/src/node-types/abort-task.ts +5 -4
- package/src/node-types/agent-execute.ts +303 -0
- package/src/node-types/bot-report.ts +40 -9
- package/src/node-types/build-context.ts +112 -25
- package/src/node-types/detect-provider.ts +4 -3
- package/src/node-types/exec-validate-retry.ts +47 -8
- package/src/node-types/execute-plan.ts +32 -8
- package/src/node-types/execute-target.ts +2 -1
- package/src/node-types/fix-errors.ts +20 -5
- package/src/node-types/genesis-observe.ts +2 -1
- package/src/node-types/genesis-report.ts +1 -1
- package/src/node-types/git-ops.ts +93 -4
- package/src/node-types/index.ts +2 -0
- package/src/node-types/load-config.ts +3 -3
- package/src/node-types/plan-task.ts +15 -3
- package/src/node-types/read-workflow.ts +2 -2
- package/src/node-types/receive-task.ts +31 -26
- package/src/node-types/send-notify.ts +1 -1
- package/src/node-types/validate-gate.ts +112 -0
- package/src/workflows/genesis-task.ts +20 -12
- package/src/workflows/weaver-agent.ts +799 -0
- package/src/workflows/weaver-bot-batch.ts +1049 -27
- package/src/workflows/weaver-bot.ts +1123 -36
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified tool registry — single source of truth for all weaver tool definitions.
|
|
3
|
+
* Merges assistant-tools.ts ASSISTANT_TOOLS and weaver-tools.ts WEAVER_TOOLS
|
|
4
|
+
* into one registry with metadata (category, contexts, verboseOutput).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { ToolDefinition } from '@synergenius/flow-weaver/agent';
|
|
8
|
+
|
|
9
|
+
export interface WeaverTool extends ToolDefinition {
|
|
10
|
+
verboseOutput?: boolean;
|
|
11
|
+
category: 'bot-management' | 'queue' | 'flow-weaver' | 'project' | 'knowledge' | 'conversation' | 'ci' | 'web';
|
|
12
|
+
contexts: Array<'bot' | 'assistant'>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ALL_TOOLS: WeaverTool[] = [
|
|
16
|
+
// ── Bot management (assistant only) ──────────────────────────────
|
|
17
|
+
{
|
|
18
|
+
name: 'bot_spawn',
|
|
19
|
+
description: 'Start a new bot session. Returns the bot name and status.',
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
name: { type: 'string', description: 'Unique name for this bot (e.g. "fix-templates")' },
|
|
24
|
+
project_dir: { type: 'string', description: 'Project directory for the bot to work in' },
|
|
25
|
+
parallel: { type: 'number', description: 'Number of parallel tasks (1-5, default 1)' },
|
|
26
|
+
deadline: { type: 'string', description: 'Stop time in HH:MM format (optional)' },
|
|
27
|
+
branch: { type: 'string', description: 'Git branch for commits (keeps main clean, good for overnight runs)' },
|
|
28
|
+
},
|
|
29
|
+
required: ['name'],
|
|
30
|
+
},
|
|
31
|
+
category: 'bot-management',
|
|
32
|
+
contexts: ['assistant'],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'bot_list',
|
|
36
|
+
description: 'List all bot sessions with their status, task counts, and cost.',
|
|
37
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
38
|
+
category: 'bot-management',
|
|
39
|
+
contexts: ['assistant'],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'bot_status',
|
|
43
|
+
description: 'Get detailed status of a specific bot including queue and recent activity.',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: { name: { type: 'string', description: 'Bot name' } },
|
|
47
|
+
required: ['name'],
|
|
48
|
+
},
|
|
49
|
+
category: 'bot-management',
|
|
50
|
+
contexts: ['assistant'],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'bot_pause',
|
|
54
|
+
description: 'Pause a running bot. It will finish its current task then wait.',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: { name: { type: 'string', description: 'Bot name' } },
|
|
58
|
+
required: ['name'],
|
|
59
|
+
},
|
|
60
|
+
category: 'bot-management',
|
|
61
|
+
contexts: ['assistant'],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'bot_resume',
|
|
65
|
+
description: 'Resume a paused bot.',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: { name: { type: 'string', description: 'Bot name' } },
|
|
69
|
+
required: ['name'],
|
|
70
|
+
},
|
|
71
|
+
category: 'bot-management',
|
|
72
|
+
contexts: ['assistant'],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'bot_stop',
|
|
76
|
+
description: 'Gracefully stop a bot (finishes current task, then exits).',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: { name: { type: 'string', description: 'Bot name' } },
|
|
80
|
+
required: ['name'],
|
|
81
|
+
},
|
|
82
|
+
category: 'bot-management',
|
|
83
|
+
contexts: ['assistant'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'bot_logs',
|
|
87
|
+
description: 'Get recent output log from a bot.',
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: {
|
|
91
|
+
name: { type: 'string', description: 'Bot name' },
|
|
92
|
+
lines: { type: 'number', description: 'Number of lines to return (default 30)' },
|
|
93
|
+
},
|
|
94
|
+
required: ['name'],
|
|
95
|
+
},
|
|
96
|
+
verboseOutput: true,
|
|
97
|
+
category: 'bot-management',
|
|
98
|
+
contexts: ['assistant'],
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
// ── Queue management (assistant only) ────────────────────────────
|
|
102
|
+
{
|
|
103
|
+
name: 'queue_add',
|
|
104
|
+
description: 'Add a task to a bot\'s queue.',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
bot: { type: 'string', description: 'Bot name' },
|
|
109
|
+
instruction: { type: 'string', description: 'Task instruction' },
|
|
110
|
+
targets: { type: 'array', items: { type: 'string' }, description: 'Target files (optional)' },
|
|
111
|
+
},
|
|
112
|
+
required: ['bot', 'instruction'],
|
|
113
|
+
},
|
|
114
|
+
category: 'queue',
|
|
115
|
+
contexts: ['assistant'],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'queue_add_batch',
|
|
119
|
+
description: 'Add multiple tasks to a bot\'s queue at once.',
|
|
120
|
+
inputSchema: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
properties: {
|
|
123
|
+
bot: { type: 'string', description: 'Bot name' },
|
|
124
|
+
tasks: {
|
|
125
|
+
type: 'array',
|
|
126
|
+
items: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
instruction: { type: 'string' },
|
|
130
|
+
targets: { type: 'array', items: { type: 'string' } },
|
|
131
|
+
},
|
|
132
|
+
required: ['instruction'],
|
|
133
|
+
},
|
|
134
|
+
description: 'Array of tasks to add',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
required: ['bot', 'tasks'],
|
|
138
|
+
},
|
|
139
|
+
category: 'queue',
|
|
140
|
+
contexts: ['assistant'],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'queue_list',
|
|
144
|
+
description: 'List all tasks in a bot\'s queue with their status.',
|
|
145
|
+
inputSchema: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
properties: { bot: { type: 'string', description: 'Bot name' } },
|
|
148
|
+
required: ['bot'],
|
|
149
|
+
},
|
|
150
|
+
category: 'queue',
|
|
151
|
+
contexts: ['assistant'],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'queue_retry',
|
|
155
|
+
description: 'Reset all failed tasks in a bot\'s queue to pending.',
|
|
156
|
+
inputSchema: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: { bot: { type: 'string', description: 'Bot name' } },
|
|
159
|
+
required: ['bot'],
|
|
160
|
+
},
|
|
161
|
+
category: 'queue',
|
|
162
|
+
contexts: ['assistant'],
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// ── Flow-weaver tools ────────────────────────────────────────────
|
|
166
|
+
{
|
|
167
|
+
name: 'validate',
|
|
168
|
+
description: 'Run flow-weaver validate on a workflow file. Returns JSON with errors and warnings. Use this FIRST to discover issues, and AFTER patching to confirm fixes.',
|
|
169
|
+
inputSchema: { type: 'object', properties: { file: { type: 'string', description: 'Path to the workflow file to validate' } }, required: ['file'] },
|
|
170
|
+
category: 'flow-weaver',
|
|
171
|
+
contexts: ['bot'],
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'fw_validate',
|
|
175
|
+
description: 'Validate a workflow or directory of workflows. Returns errors and warnings.',
|
|
176
|
+
inputSchema: {
|
|
177
|
+
type: 'object',
|
|
178
|
+
properties: { path: { type: 'string', description: 'File or directory path' } },
|
|
179
|
+
required: ['path'],
|
|
180
|
+
},
|
|
181
|
+
category: 'flow-weaver',
|
|
182
|
+
contexts: ['assistant'],
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'fw_diagram',
|
|
186
|
+
description: 'Generate a text diagram of a workflow.',
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
properties: { file: { type: 'string', description: 'Workflow file path' } },
|
|
190
|
+
required: ['file'],
|
|
191
|
+
},
|
|
192
|
+
verboseOutput: true,
|
|
193
|
+
category: 'flow-weaver',
|
|
194
|
+
contexts: ['assistant'],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: 'fw_describe',
|
|
198
|
+
description: 'Get a natural language description of a workflow.',
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
properties: { file: { type: 'string', description: 'Workflow file path' } },
|
|
202
|
+
required: ['file'],
|
|
203
|
+
},
|
|
204
|
+
verboseOutput: true,
|
|
205
|
+
category: 'flow-weaver',
|
|
206
|
+
contexts: ['assistant'],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: 'fw_docs',
|
|
210
|
+
description: 'Look up Flow Weaver documentation by topic. Topics: concepts, jsdoc-grammar, advanced-annotations, built-in-nodes, scaffold, node-conversion, patterns, error-codes, debugging, export-interface.',
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: { topic: { type: 'string', description: 'Documentation topic slug' } },
|
|
214
|
+
required: ['topic'],
|
|
215
|
+
},
|
|
216
|
+
verboseOutput: true,
|
|
217
|
+
category: 'flow-weaver',
|
|
218
|
+
contexts: ['assistant'],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'fw_diagram_mermaid',
|
|
222
|
+
description: 'Generate a Mermaid diagram of a workflow (can be rendered in any Mermaid viewer).',
|
|
223
|
+
inputSchema: {
|
|
224
|
+
type: 'object',
|
|
225
|
+
properties: { file: { type: 'string', description: 'Workflow file path' } },
|
|
226
|
+
required: ['file'],
|
|
227
|
+
},
|
|
228
|
+
verboseOutput: true,
|
|
229
|
+
category: 'flow-weaver',
|
|
230
|
+
contexts: ['assistant'],
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
// ── Project tools (shared or context-specific) ───────────────────
|
|
234
|
+
{
|
|
235
|
+
name: 'read_file',
|
|
236
|
+
description: 'Read a file and return its contents.',
|
|
237
|
+
inputSchema: {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: { file: { type: 'string', description: 'File path' } },
|
|
240
|
+
required: ['file'],
|
|
241
|
+
},
|
|
242
|
+
category: 'project',
|
|
243
|
+
contexts: ['bot', 'assistant'],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'list_files',
|
|
247
|
+
description: 'List files in a directory, optionally filtered by regex pattern.',
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: 'object',
|
|
250
|
+
properties: {
|
|
251
|
+
directory: { type: 'string', description: 'Directory to list' },
|
|
252
|
+
pattern: { type: 'string', description: 'Optional regex filter pattern' },
|
|
253
|
+
},
|
|
254
|
+
required: ['directory'],
|
|
255
|
+
},
|
|
256
|
+
category: 'project',
|
|
257
|
+
contexts: ['bot', 'assistant'],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'run_shell',
|
|
261
|
+
description: 'Run a shell command (read-only operations recommended). Blocked: rm -rf, git push, sudo.',
|
|
262
|
+
inputSchema: {
|
|
263
|
+
type: 'object',
|
|
264
|
+
properties: { command: { type: 'string', description: 'Shell command to execute' } },
|
|
265
|
+
required: ['command'],
|
|
266
|
+
},
|
|
267
|
+
category: 'project',
|
|
268
|
+
contexts: ['bot', 'assistant'],
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: 'patch_file',
|
|
272
|
+
description: 'Apply surgical find-and-replace patches to a file. Each patch must have exact "find" and "replace" strings. Preferred over write_file for modifications.',
|
|
273
|
+
inputSchema: {
|
|
274
|
+
type: 'object',
|
|
275
|
+
properties: {
|
|
276
|
+
file: { type: 'string', description: 'Path to the file to patch' },
|
|
277
|
+
patches: {
|
|
278
|
+
type: 'array',
|
|
279
|
+
items: {
|
|
280
|
+
type: 'object',
|
|
281
|
+
properties: {
|
|
282
|
+
find: { type: 'string', description: 'Exact string to find' },
|
|
283
|
+
replace: { type: 'string', description: 'String to replace with' },
|
|
284
|
+
},
|
|
285
|
+
required: ['find', 'replace'],
|
|
286
|
+
},
|
|
287
|
+
description: 'Array of find/replace patches',
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
required: ['file', 'patches'],
|
|
291
|
+
},
|
|
292
|
+
category: 'project',
|
|
293
|
+
contexts: ['bot'],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'write_file',
|
|
297
|
+
description: 'Write content to a file (creates or overwrites). Use patch_file instead for modifications to existing files.',
|
|
298
|
+
inputSchema: {
|
|
299
|
+
type: 'object',
|
|
300
|
+
properties: {
|
|
301
|
+
file: { type: 'string', description: 'Path to the file to write' },
|
|
302
|
+
content: { type: 'string', description: 'Complete file content' },
|
|
303
|
+
},
|
|
304
|
+
required: ['file', 'content'],
|
|
305
|
+
},
|
|
306
|
+
category: 'project',
|
|
307
|
+
contexts: ['bot'],
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'tsc_check',
|
|
311
|
+
description: 'Run TypeScript compiler check (no emit). Returns errors if any.',
|
|
312
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
313
|
+
verboseOutput: true,
|
|
314
|
+
category: 'project',
|
|
315
|
+
contexts: ['bot'],
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: 'run_tests',
|
|
319
|
+
description: 'Run project tests. Returns structured results with pass/fail counts.',
|
|
320
|
+
inputSchema: { type: 'object', properties: { pattern: { type: 'string', description: 'Test file pattern (optional)' } }, required: [] },
|
|
321
|
+
verboseOutput: true,
|
|
322
|
+
category: 'project',
|
|
323
|
+
contexts: ['bot'],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: 'project_list',
|
|
327
|
+
description: 'List known project directories that have been used with weaver.',
|
|
328
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
329
|
+
category: 'project',
|
|
330
|
+
contexts: ['assistant'],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'project_context',
|
|
334
|
+
description: 'Read package.json and .weaver-plan.md from a project directory to understand its context.',
|
|
335
|
+
inputSchema: {
|
|
336
|
+
type: 'object',
|
|
337
|
+
properties: { directory: { type: 'string', description: 'Absolute path to project directory' } },
|
|
338
|
+
required: ['directory'],
|
|
339
|
+
},
|
|
340
|
+
category: 'project',
|
|
341
|
+
contexts: ['assistant'],
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
// ── Knowledge tools ──────────────────────────────────────────────
|
|
345
|
+
{
|
|
346
|
+
name: 'knowledge_list',
|
|
347
|
+
description: 'List all stored knowledge entries for the current project.',
|
|
348
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
349
|
+
category: 'knowledge',
|
|
350
|
+
contexts: ['assistant'],
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
name: 'knowledge_search',
|
|
354
|
+
description: 'Search stored knowledge by keyword.',
|
|
355
|
+
inputSchema: {
|
|
356
|
+
type: 'object',
|
|
357
|
+
properties: { query: { type: 'string', description: 'Search query' } },
|
|
358
|
+
required: ['query'],
|
|
359
|
+
},
|
|
360
|
+
category: 'knowledge',
|
|
361
|
+
contexts: ['assistant'],
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: 'learn',
|
|
365
|
+
description: 'Store a fact for future tasks. Key should be descriptive (e.g. "file:src/agent.ts:port-issue").',
|
|
366
|
+
inputSchema: { type: 'object', properties: { key: { type: 'string' }, value: { type: 'string' } }, required: ['key', 'value'] },
|
|
367
|
+
category: 'knowledge',
|
|
368
|
+
contexts: ['bot'],
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'recall',
|
|
372
|
+
description: 'Look up stored knowledge. Returns matching entries.',
|
|
373
|
+
inputSchema: { type: 'object', properties: { query: { type: 'string' } }, required: ['query'] },
|
|
374
|
+
category: 'knowledge',
|
|
375
|
+
contexts: ['bot'],
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
// ── Conversation management (assistant only) ─────────────────────
|
|
379
|
+
{
|
|
380
|
+
name: 'conversation_list',
|
|
381
|
+
description: 'List saved assistant conversations with message counts and timestamps.',
|
|
382
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
383
|
+
category: 'conversation',
|
|
384
|
+
contexts: ['assistant'],
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'conversation_delete',
|
|
388
|
+
description: 'Delete a saved conversation by ID.',
|
|
389
|
+
inputSchema: {
|
|
390
|
+
type: 'object',
|
|
391
|
+
properties: { id: { type: 'string', description: 'Conversation ID to delete' } },
|
|
392
|
+
required: ['id'],
|
|
393
|
+
},
|
|
394
|
+
category: 'conversation',
|
|
395
|
+
contexts: ['assistant'],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'conversation_summary',
|
|
399
|
+
description: 'Get a summary of the current conversation (message count, tokens, bots spawned).',
|
|
400
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
401
|
+
category: 'conversation',
|
|
402
|
+
contexts: ['assistant'],
|
|
403
|
+
},
|
|
404
|
+
|
|
405
|
+
// ── CI/CD (assistant only) ───────────────────────────────────────
|
|
406
|
+
{
|
|
407
|
+
name: 'github_status',
|
|
408
|
+
description: 'Check GitHub Actions status for a branch or PR. Requires gh CLI installed.',
|
|
409
|
+
inputSchema: {
|
|
410
|
+
type: 'object',
|
|
411
|
+
properties: {
|
|
412
|
+
branch: { type: 'string', description: 'Branch name (optional, defaults to current)' },
|
|
413
|
+
pr: { type: 'number', description: 'PR number (optional, checks PR status instead of branch)' },
|
|
414
|
+
},
|
|
415
|
+
required: [],
|
|
416
|
+
},
|
|
417
|
+
category: 'ci',
|
|
418
|
+
contexts: ['assistant'],
|
|
419
|
+
},
|
|
420
|
+
|
|
421
|
+
// ── Web access (shared) ──────────────────────────────────────────
|
|
422
|
+
{
|
|
423
|
+
name: 'web_fetch',
|
|
424
|
+
description: 'Fetch HTTP content from a URL. Returns text body (max 10KB).',
|
|
425
|
+
inputSchema: {
|
|
426
|
+
type: 'object',
|
|
427
|
+
properties: {
|
|
428
|
+
url: { type: 'string', description: 'URL to fetch' },
|
|
429
|
+
method: { type: 'string', description: 'HTTP method (default GET)', enum: ['GET', 'POST'] },
|
|
430
|
+
},
|
|
431
|
+
required: ['url'],
|
|
432
|
+
},
|
|
433
|
+
category: 'web',
|
|
434
|
+
contexts: ['bot', 'assistant'],
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
// ── Bot-only interactive ─────────────────────────────────────────
|
|
438
|
+
{
|
|
439
|
+
name: 'ask_user',
|
|
440
|
+
description: 'Ask the user a question and wait for response. Use when you need a decision.',
|
|
441
|
+
inputSchema: { type: 'object', properties: { question: { type: 'string' } }, required: ['question'] },
|
|
442
|
+
category: 'project',
|
|
443
|
+
contexts: ['bot'],
|
|
444
|
+
},
|
|
445
|
+
];
|
|
446
|
+
|
|
447
|
+
// ── Derived exports ──────────────────────────────────────────────────
|
|
448
|
+
|
|
449
|
+
export const BOT_TOOLS: ToolDefinition[] = ALL_TOOLS.filter(t => t.contexts.includes('bot'));
|
|
450
|
+
export const ASSISTANT_TOOLS: ToolDefinition[] = ALL_TOOLS.filter(t => t.contexts.includes('assistant'));
|
|
451
|
+
export const VERBOSE_TOOL_NAMES = new Set(ALL_TOOLS.filter(t => t.verboseOutput).map(t => t.name));
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Generate a prompt section grouping assistant tools by category.
|
|
455
|
+
*/
|
|
456
|
+
export function generateToolPromptSection(): string {
|
|
457
|
+
const groups = new Map<string, WeaverTool[]>();
|
|
458
|
+
for (const t of ALL_TOOLS.filter(t => t.contexts.includes('assistant'))) {
|
|
459
|
+
const list = groups.get(t.category) ?? [];
|
|
460
|
+
list.push(t);
|
|
461
|
+
groups.set(t.category, list);
|
|
462
|
+
}
|
|
463
|
+
const lines: string[] = [];
|
|
464
|
+
for (const [cat, tools] of groups) {
|
|
465
|
+
lines.push(`${cat}:`);
|
|
466
|
+
for (const t of tools) lines.push(` - ${t.name}: ${t.description}`);
|
|
467
|
+
lines.push('');
|
|
468
|
+
}
|
|
469
|
+
return lines.join('\n');
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Generate a comma-separated list of tools that produce verbose output.
|
|
474
|
+
*/
|
|
475
|
+
export function generateVerboseToolList(): string {
|
|
476
|
+
return [...VERBOSE_TOOL_NAMES].join(', ');
|
|
477
|
+
}
|
package/src/bot/types.ts
CHANGED
|
@@ -171,6 +171,12 @@ export interface WorkflowResult {
|
|
|
171
171
|
|
|
172
172
|
export type RunOutcome = 'completed' | 'failed' | 'error' | 'skipped';
|
|
173
173
|
|
|
174
|
+
export interface StepLogEntry {
|
|
175
|
+
step: string;
|
|
176
|
+
status: 'ok' | 'blocked' | 'error';
|
|
177
|
+
detail?: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
174
180
|
export interface RunRecord {
|
|
175
181
|
id: string;
|
|
176
182
|
workflowFile: string;
|
|
@@ -187,6 +193,7 @@ export interface RunRecord {
|
|
|
187
193
|
provider?: string;
|
|
188
194
|
pipelineName?: string;
|
|
189
195
|
stageName?: string;
|
|
196
|
+
stepLog?: StepLogEntry[];
|
|
190
197
|
}
|
|
191
198
|
|
|
192
199
|
export interface RunFilter {
|
|
@@ -494,6 +501,7 @@ export interface WeaverContext {
|
|
|
494
501
|
resultJson?: string;
|
|
495
502
|
validationResultJson?: string;
|
|
496
503
|
filesModified?: string;
|
|
504
|
+
stepLogJson?: string;
|
|
497
505
|
allValid?: boolean;
|
|
498
506
|
gitResultJson?: string;
|
|
499
507
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weaver-specific tool definitions and executor.
|
|
3
|
+
*
|
|
4
|
+
* These are the tools the weaver bot uses: validate, read_file, patch_file,
|
|
5
|
+
* run_shell, list_files, write_file. Tool execution delegates to step-executor
|
|
6
|
+
* with all safety guards (path traversal, shrink detection, blocked commands).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { execFileSync } from 'node:child_process';
|
|
10
|
+
import { executeStep } from './step-executor.js';
|
|
11
|
+
import type { ToolDefinition } from '@synergenius/flow-weaver/agent';
|
|
12
|
+
import { BOT_TOOLS as WEAVER_TOOLS } from './tool-registry.js';
|
|
13
|
+
import { isBlockedUrl } from './safety.js';
|
|
14
|
+
|
|
15
|
+
export { WEAVER_TOOLS };
|
|
16
|
+
|
|
17
|
+
/** Map tool names to step-executor operations. */
|
|
18
|
+
const OPERATION_MAP: Record<string, string> = {
|
|
19
|
+
validate: 'run-shell',
|
|
20
|
+
read_file: 'read-file',
|
|
21
|
+
patch_file: 'patch-file',
|
|
22
|
+
run_shell: 'run-shell',
|
|
23
|
+
list_files: 'list-files',
|
|
24
|
+
write_file: 'write-file',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Execute a weaver tool call. Delegates to step-executor with safety guards.
|
|
29
|
+
* Bound to a specific project directory via closure.
|
|
30
|
+
*/
|
|
31
|
+
export function createWeaverExecutor(projectDir: string) {
|
|
32
|
+
return async (
|
|
33
|
+
name: string,
|
|
34
|
+
args: Record<string, unknown>,
|
|
35
|
+
): Promise<{ result: string; isError: boolean }> => {
|
|
36
|
+
// Handle new tools that bypass step-executor
|
|
37
|
+
switch (name) {
|
|
38
|
+
case 'web_fetch': {
|
|
39
|
+
const url = String(args.url);
|
|
40
|
+
// Safety: block localhost, internal IPs
|
|
41
|
+
if (isBlockedUrl(url)) {
|
|
42
|
+
return { result: 'Blocked: cannot fetch internal/localhost URLs.', isError: true };
|
|
43
|
+
}
|
|
44
|
+
const resp = await fetch(url, { method: (args.method as string) ?? 'GET', signal: AbortSignal.timeout(15_000) });
|
|
45
|
+
const text = await resp.text();
|
|
46
|
+
return { result: text.slice(0, 10_000), isError: !resp.ok };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
case 'tsc_check': {
|
|
50
|
+
try {
|
|
51
|
+
const output = execFileSync('npx', ['tsc', '--noEmit', '--pretty'], { cwd: projectDir, encoding: 'utf-8', timeout: 60_000, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
52
|
+
return { result: output.trim() || 'No TypeScript errors.', isError: false };
|
|
53
|
+
} catch (err: any) {
|
|
54
|
+
return { result: (err.stdout ?? err.message ?? '').slice(0, 5000), isError: true };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
case 'run_tests': {
|
|
59
|
+
try {
|
|
60
|
+
const pattern = args.pattern ? String(args.pattern) : '';
|
|
61
|
+
const testArgs = ['vitest', 'run', '--reporter', 'json'];
|
|
62
|
+
if (pattern) testArgs.push(pattern);
|
|
63
|
+
const output = execFileSync('npx', testArgs, { cwd: projectDir, encoding: 'utf-8', timeout: 120_000, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
64
|
+
try {
|
|
65
|
+
const json = JSON.parse(output);
|
|
66
|
+
const passed = json.numPassedTests ?? 0;
|
|
67
|
+
const failed = json.numFailedTests ?? 0;
|
|
68
|
+
const failures = (json.testResults ?? []).filter((t: any) => t.status === 'failed').map((t: any) => t.name).slice(0, 10);
|
|
69
|
+
return { result: JSON.stringify({ passed, failed, total: passed + failed, failures }), isError: failed > 0 };
|
|
70
|
+
} catch {
|
|
71
|
+
return { result: output.slice(0, 5000), isError: false };
|
|
72
|
+
}
|
|
73
|
+
} catch (err: any) {
|
|
74
|
+
return { result: (err.stdout ?? err.stderr ?? err.message ?? '').slice(0, 5000), isError: true };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
case 'ask_user': {
|
|
79
|
+
const question = String(args.question);
|
|
80
|
+
if (process.env.WEAVER_AUTO_APPROVE) {
|
|
81
|
+
return { result: '(Auto-approved — no user input available in autonomous mode)', isError: false };
|
|
82
|
+
}
|
|
83
|
+
// In interactive mode, prompt via readline
|
|
84
|
+
const readline = await import('node:readline');
|
|
85
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
86
|
+
const answer = await new Promise<string>((resolve) => {
|
|
87
|
+
rl.question(`\n Bot asks: ${question}\n > `, (ans) => { rl.close(); resolve(ans); });
|
|
88
|
+
});
|
|
89
|
+
return { result: answer || '(no answer)', isError: false };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
case 'learn': {
|
|
93
|
+
const { KnowledgeStore } = await import('./knowledge-store.js');
|
|
94
|
+
const store = new KnowledgeStore(projectDir);
|
|
95
|
+
store.learn(String(args.key), String(args.value), 'bot');
|
|
96
|
+
return { result: `Learned: ${args.key}`, isError: false };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
case 'recall': {
|
|
100
|
+
const { KnowledgeStore } = await import('./knowledge-store.js');
|
|
101
|
+
const store = new KnowledgeStore(projectDir);
|
|
102
|
+
const entries = store.recall(String(args.query));
|
|
103
|
+
if (entries.length === 0) return { result: 'No knowledge found.', isError: false };
|
|
104
|
+
return { result: entries.map(e => `${e.key}: ${e.value}`).join('\n'), isError: false };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
default:
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Existing step-executor-based tools
|
|
112
|
+
const operation = OPERATION_MAP[name];
|
|
113
|
+
if (!operation) {
|
|
114
|
+
return { result: `Unknown tool: ${name}`, isError: true };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Transform validate tool to run-shell with flow-weaver validate command
|
|
118
|
+
let stepArgs = { ...args };
|
|
119
|
+
if (name === 'validate') {
|
|
120
|
+
stepArgs = { command: `npx flow-weaver validate ${args.file} --json` };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const result = await executeStep({ operation, args: stepArgs }, projectDir);
|
|
125
|
+
if (result.blocked) {
|
|
126
|
+
return { result: result.blockReason ?? 'Blocked by safety guard', isError: true };
|
|
127
|
+
}
|
|
128
|
+
return { result: result.output ?? 'Done', isError: false };
|
|
129
|
+
} catch (err: unknown) {
|
|
130
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
131
|
+
return { result: msg, isError: true };
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
package/src/cli-bridge.ts
CHANGED
|
@@ -3,7 +3,9 @@ import {
|
|
|
3
3
|
handleRun, handleHistory, handleCosts, handleWatch,
|
|
4
4
|
handleCron, handlePipeline, handleDashboard, handleProviders,
|
|
5
5
|
handleEject, handleBot, handleSession, handleSteer, handleQueue,
|
|
6
|
-
handleGenesis, handleAudit, handleInit,
|
|
6
|
+
handleStatus, handleGenesis, handleAudit, handleInit, handleAssistant,
|
|
7
|
+
handleExamples, handleDoctor,
|
|
8
|
+
printHelp,
|
|
7
9
|
} from './cli-handlers.js';
|
|
8
10
|
|
|
9
11
|
const handlers: Record<string, (opts: ParsedArgs) => Promise<void>> = {
|
|
@@ -20,9 +22,13 @@ const handlers: Record<string, (opts: ParsedArgs) => Promise<void>> = {
|
|
|
20
22
|
session: handleSession,
|
|
21
23
|
steer: handleSteer,
|
|
22
24
|
queue: handleQueue,
|
|
25
|
+
status: handleStatus,
|
|
23
26
|
genesis: handleGenesis,
|
|
24
27
|
audit: handleAudit,
|
|
25
28
|
init: handleInit,
|
|
29
|
+
assistant: handleAssistant,
|
|
30
|
+
examples: handleExamples,
|
|
31
|
+
doctor: handleDoctor,
|
|
26
32
|
};
|
|
27
33
|
|
|
28
34
|
export async function handleCommand(
|