@synergenius/flowweaver-pack-weaver 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bot/ai-client.d.ts +1 -0
- package/dist/bot/ai-client.d.ts.map +1 -1
- package/dist/bot/ai-client.js +52 -1
- package/dist/bot/ai-client.js.map +1 -1
- package/dist/bot/audit-logger.d.ts +5 -0
- package/dist/bot/audit-logger.d.ts.map +1 -0
- package/dist/bot/audit-logger.js +42 -0
- package/dist/bot/audit-logger.js.map +1 -0
- package/dist/bot/audit-store.d.ts +13 -0
- package/dist/bot/audit-store.d.ts.map +1 -0
- package/dist/bot/audit-store.js +59 -0
- package/dist/bot/audit-store.js.map +1 -0
- package/dist/bot/cli-provider.d.ts +1 -0
- package/dist/bot/cli-provider.d.ts.map +1 -1
- package/dist/bot/cli-provider.js +86 -22
- package/dist/bot/cli-provider.js.map +1 -1
- package/dist/bot/cli-stream-parser.d.ts +11 -0
- package/dist/bot/cli-stream-parser.d.ts.map +1 -0
- package/dist/bot/cli-stream-parser.js +53 -0
- package/dist/bot/cli-stream-parser.js.map +1 -0
- package/dist/bot/file-validator.d.ts +1 -1
- package/dist/bot/file-validator.d.ts.map +1 -1
- package/dist/bot/file-validator.js +13 -27
- package/dist/bot/file-validator.js.map +1 -1
- package/dist/bot/fw-api.d.ts +8 -0
- package/dist/bot/fw-api.d.ts.map +1 -0
- package/dist/bot/fw-api.js +12 -0
- package/dist/bot/fw-api.js.map +1 -0
- package/dist/bot/runner.d.ts +2 -1
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +8 -0
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/step-executor.d.ts +3 -2
- package/dist/bot/step-executor.d.ts.map +1 -1
- package/dist/bot/step-executor.js +9 -30
- package/dist/bot/step-executor.js.map +1 -1
- package/dist/bot/system-prompt.d.ts +13 -1
- package/dist/bot/system-prompt.d.ts.map +1 -1
- package/dist/bot/system-prompt.js +28 -22
- package/dist/bot/system-prompt.js.map +1 -1
- package/dist/bot/types.d.ts +9 -1
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/cli-bridge.d.ts.map +1 -1
- package/dist/cli-bridge.js +2 -1
- package/dist/cli-bridge.js.map +1 -1
- package/dist/cli-handlers.d.ts +2 -1
- package/dist/cli-handlers.d.ts.map +1 -1
- package/dist/cli-handlers.js +69 -0
- package/dist/cli-handlers.js.map +1 -1
- package/dist/node-types/approval-gate.d.ts.map +1 -1
- package/dist/node-types/approval-gate.js +4 -0
- package/dist/node-types/approval-gate.js.map +1 -1
- package/dist/node-types/exec-validate-retry.d.ts.map +1 -1
- package/dist/node-types/exec-validate-retry.js +10 -4
- package/dist/node-types/exec-validate-retry.js.map +1 -1
- package/dist/node-types/execute-plan.js +1 -1
- package/dist/node-types/execute-plan.js.map +1 -1
- package/dist/node-types/git-ops.d.ts.map +1 -1
- package/dist/node-types/git-ops.js +2 -0
- package/dist/node-types/git-ops.js.map +1 -1
- package/dist/node-types/plan-task.d.ts.map +1 -1
- package/dist/node-types/plan-task.js +9 -1
- package/dist/node-types/plan-task.js.map +1 -1
- package/dist/node-types/send-notify.d.ts.map +1 -1
- package/dist/node-types/send-notify.js +4 -1
- package/dist/node-types/send-notify.js.map +1 -1
- package/dist/node-types/validate-result.d.ts +2 -2
- package/dist/node-types/validate-result.d.ts.map +1 -1
- package/dist/node-types/validate-result.js +2 -2
- package/dist/node-types/validate-result.js.map +1 -1
- package/dist/workflows/weaver-bot-batch.d.ts +4 -1
- package/dist/workflows/weaver-bot-batch.d.ts.map +1 -1
- package/dist/workflows/weaver-bot-batch.js +1 -1
- package/dist/workflows/weaver-bot-batch.js.map +1 -1
- package/dist/workflows/weaver-bot.d.ts +4 -1
- package/dist/workflows/weaver-bot.d.ts.map +1 -1
- package/dist/workflows/weaver-bot.js +1 -1
- package/dist/workflows/weaver-bot.js.map +1 -1
- package/flowweaver.manifest.json +1 -1
- package/package.json +3 -2
- package/src/bot/agent-provider.ts +273 -0
- package/src/bot/ai-client.ts +109 -0
- package/src/bot/approvals.ts +273 -0
- package/src/bot/audit-logger.ts +45 -0
- package/src/bot/audit-store.ts +69 -0
- package/src/bot/bot-agent-channel.ts +99 -0
- package/src/bot/cli-provider.ts +169 -0
- package/src/bot/cli-stream-parser.ts +59 -0
- package/src/bot/cost-store.ts +92 -0
- package/src/bot/cost-tracker.ts +72 -0
- package/src/bot/cron-parser.ts +153 -0
- package/src/bot/cron-scheduler.ts +48 -0
- package/src/bot/dashboard.ts +658 -0
- package/src/bot/design-checker.ts +327 -0
- package/src/bot/file-lock.ts +73 -0
- package/src/bot/file-validator.ts +41 -0
- package/src/bot/file-watcher.ts +103 -0
- package/src/bot/fw-api.ts +18 -0
- package/src/bot/genesis-prompt-context.ts +135 -0
- package/src/bot/genesis-store.ts +180 -0
- package/src/bot/index.ts +127 -0
- package/src/bot/notifications.ts +263 -0
- package/src/bot/pipeline-runner.ts +324 -0
- package/src/bot/provider-registry.ts +236 -0
- package/src/bot/run-store.ts +169 -0
- package/src/bot/runner.ts +311 -0
- package/src/bot/session-state.ts +73 -0
- package/src/bot/steering.ts +44 -0
- package/src/bot/step-executor.ts +34 -0
- package/src/bot/system-prompt.ts +280 -0
- package/src/bot/task-queue.ts +111 -0
- package/src/bot/types.ts +571 -0
- package/src/bot/utils.ts +17 -0
- package/src/bot/watch-daemon.ts +203 -0
- package/src/bot/web-approval.ts +240 -0
- package/src/cli-bridge.ts +41 -0
- package/src/cli-handlers.ts +1271 -0
- package/src/docs/weaver-config.md +135 -0
- package/src/index.ts +173 -0
- package/src/mcp-tools.ts +274 -0
- package/src/node-types/abort-task.ts +31 -0
- package/src/node-types/approval-gate.ts +75 -0
- package/src/node-types/bot-report.ts +82 -0
- package/src/node-types/build-context.ts +65 -0
- package/src/node-types/detect-provider.ts +75 -0
- package/src/node-types/exec-validate-retry.ts +175 -0
- package/src/node-types/execute-plan.ts +130 -0
- package/src/node-types/execute-target.ts +267 -0
- package/src/node-types/fix-errors.ts +68 -0
- package/src/node-types/genesis-apply-retry.ts +138 -0
- package/src/node-types/genesis-apply.ts +96 -0
- package/src/node-types/genesis-approve.ts +73 -0
- package/src/node-types/genesis-check-stabilize.ts +37 -0
- package/src/node-types/genesis-check-threshold.ts +34 -0
- package/src/node-types/genesis-commit.ts +71 -0
- package/src/node-types/genesis-compile-validate.ts +77 -0
- package/src/node-types/genesis-diff-fingerprint.ts +67 -0
- package/src/node-types/genesis-diff-workflow.ts +71 -0
- package/src/node-types/genesis-escrow-grace.ts +62 -0
- package/src/node-types/genesis-escrow-migrate.ts +138 -0
- package/src/node-types/genesis-escrow-recover.ts +99 -0
- package/src/node-types/genesis-escrow-stage.ts +104 -0
- package/src/node-types/genesis-escrow-validate.ts +120 -0
- package/src/node-types/genesis-load-config.ts +44 -0
- package/src/node-types/genesis-observe.ts +119 -0
- package/src/node-types/genesis-propose.ts +97 -0
- package/src/node-types/genesis-report.ts +95 -0
- package/src/node-types/genesis-snapshot.ts +30 -0
- package/src/node-types/genesis-try-apply.ts +165 -0
- package/src/node-types/genesis-update-history.ts +72 -0
- package/src/node-types/genesis-validate-proposal.ts +124 -0
- package/src/node-types/git-ops.ts +72 -0
- package/src/node-types/index.ts +36 -0
- package/src/node-types/load-config.ts +27 -0
- package/src/node-types/plan-task.ts +77 -0
- package/src/node-types/read-workflow.ts +68 -0
- package/src/node-types/receive-task.ts +92 -0
- package/src/node-types/report.ts +25 -0
- package/src/node-types/resolve-target.ts +64 -0
- package/src/node-types/route-task.ts +25 -0
- package/src/node-types/send-notify.ts +75 -0
- package/src/node-types/validate-result.ts +49 -0
- package/src/templates/index.ts +5 -0
- package/src/templates/weaver-bot-template.ts +106 -0
- package/src/workflows/genesis-task.ts +91 -0
- package/src/workflows/index.ts +3 -0
- package/src/workflows/weaver-bot-batch.ts +65 -0
- package/src/workflows/weaver-bot.ts +79 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Managed weaver bot workflow - autonomous task creation and management.
|
|
2
|
+
// Run `weaver eject` to customize.
|
|
3
|
+
|
|
4
|
+
import { weaverLoadConfig } from '../node-types/load-config.js';
|
|
5
|
+
import { weaverDetectProvider } from '../node-types/detect-provider.js';
|
|
6
|
+
import { weaverReceiveTask } from '../node-types/receive-task.js';
|
|
7
|
+
import { weaverRouteTask } from '../node-types/route-task.js';
|
|
8
|
+
import { weaverReadWorkflow } from '../node-types/read-workflow.js';
|
|
9
|
+
import { weaverBuildContext } from '../node-types/build-context.js';
|
|
10
|
+
import { weaverPlanTask } from '../node-types/plan-task.js';
|
|
11
|
+
import { weaverApprovalGate } from '../node-types/approval-gate.js';
|
|
12
|
+
import { weaverAbortTask } from '../node-types/abort-task.js';
|
|
13
|
+
import { weaverExecValidateRetry } from '../node-types/exec-validate-retry.js';
|
|
14
|
+
import { weaverGitOps } from '../node-types/git-ops.js';
|
|
15
|
+
import { weaverSendNotify } from '../node-types/send-notify.js';
|
|
16
|
+
import { weaverBotReport } from '../node-types/bot-report.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Autonomous workflow bot. Routes by task type, branches on approval,
|
|
20
|
+
* retries validation failures via scoped execution, fans out to git
|
|
21
|
+
* and notifications in parallel, merges all paths at report.
|
|
22
|
+
*
|
|
23
|
+
* @flowWeaver workflow
|
|
24
|
+
*
|
|
25
|
+
* @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 200 200]
|
|
26
|
+
* @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 400 200]
|
|
27
|
+
* @node receive weaverReceiveTask [color: "blue"] [icon: "send"] [position: 600 200]
|
|
28
|
+
* @node route weaverRouteTask [color: "purple"] [icon: "flow"] [position: 800 200]
|
|
29
|
+
*
|
|
30
|
+
* @node readWf weaverReadWorkflow [color: "cyan"] [icon: "description"] [position: 1000 450]
|
|
31
|
+
*
|
|
32
|
+
* @node context weaverBuildContext [color: "teal"] [icon: "code"] [position: 1000 200]
|
|
33
|
+
* @node plan weaverPlanTask [color: "blue"] [icon: "psychology"] [position: 1200 200]
|
|
34
|
+
* @node approve weaverApprovalGate [color: "orange"] [icon: "send"] [position: 1400 200]
|
|
35
|
+
*
|
|
36
|
+
* @node abort weaverAbortTask [color: "red"] [icon: "code"] [position: 1600 450]
|
|
37
|
+
*
|
|
38
|
+
* @node execRetry weaverExecValidateRetry [color: "purple"] [icon: "code"] [position: 1600 200]
|
|
39
|
+
*
|
|
40
|
+
* @node gitOps weaverGitOps [color: "green"] [icon: "code"] [position: 1800 100]
|
|
41
|
+
* @node notify weaverSendNotify [color: "yellow"] [icon: "send"] [position: 1800 300]
|
|
42
|
+
*
|
|
43
|
+
* @node report weaverBotReport [color: "green"] [icon: "description"] [position: 2000 200]
|
|
44
|
+
*
|
|
45
|
+
* @path Start -> cfg -> detect -> receive -> route -> context -> plan -> approve -> execRetry -> gitOps -> report -> Exit
|
|
46
|
+
* @path execRetry -> notify
|
|
47
|
+
* @path route:fail -> readWf
|
|
48
|
+
* @path approve:fail -> abort
|
|
49
|
+
*
|
|
50
|
+
* @connect readWf.onSuccess -> report.execute
|
|
51
|
+
* @connect abort.onSuccess -> report.execute
|
|
52
|
+
* @connect notify.onSuccess -> report.execute
|
|
53
|
+
*
|
|
54
|
+
* @connect gitOps.ctx -> report.mainCtx
|
|
55
|
+
* @connect readWf.ctx -> report.readCtx
|
|
56
|
+
* @connect abort.ctx -> report.abortCtx
|
|
57
|
+
*
|
|
58
|
+
* @connect report.summary -> Exit.summary
|
|
59
|
+
*
|
|
60
|
+
* @position Start 0 200
|
|
61
|
+
* @position Exit 2200 200
|
|
62
|
+
*
|
|
63
|
+
* @param execute [order:-1] - Execute
|
|
64
|
+
* @param taskJson [order:0] [optional] - Task instruction (JSON)
|
|
65
|
+
* @param projectDir [order:1] [optional] - Project directory
|
|
66
|
+
* @returns onSuccess [order:-2] - On Success
|
|
67
|
+
* @returns onFailure [order:-1] [hidden] - On Failure
|
|
68
|
+
* @returns summary [order:0] - Summary text
|
|
69
|
+
*/
|
|
70
|
+
export async function weaverBot(
|
|
71
|
+
execute: boolean,
|
|
72
|
+
params: { taskJson?: string; projectDir?: string },
|
|
73
|
+
__abortSignal__?: AbortSignal,
|
|
74
|
+
): Promise<{ onSuccess: boolean; onFailure: boolean; summary: string | null }> {
|
|
75
|
+
// @flow-weaver-body-start
|
|
76
|
+
// (auto-generated by compiler)
|
|
77
|
+
// @flow-weaver-body-end
|
|
78
|
+
return { onSuccess: false, onFailure: true, summary: null };
|
|
79
|
+
}
|