@synergenius/flowweaver-pack-weaver 0.1.0 → 0.2.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/LICENSE +204 -0
- package/dist/bot/approvals.d.ts +18 -0
- package/dist/bot/approvals.d.ts.map +1 -0
- package/dist/bot/approvals.js +166 -0
- package/dist/bot/approvals.js.map +1 -0
- package/dist/bot/bot-agent-channel.d.ts +4 -4
- package/dist/bot/bot-agent-channel.d.ts.map +1 -1
- package/dist/bot/bot-agent-channel.js +8 -12
- package/dist/bot/bot-agent-channel.js.map +1 -1
- package/dist/bot/index.d.ts +4 -2
- package/dist/bot/index.d.ts.map +1 -1
- package/dist/bot/index.js +1 -0
- package/dist/bot/index.js.map +1 -1
- package/dist/bot/notifications.d.ts +3 -1
- package/dist/bot/notifications.d.ts.map +1 -1
- package/dist/bot/notifications.js +55 -25
- package/dist/bot/notifications.js.map +1 -1
- package/dist/bot/runner.d.ts +4 -1
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +57 -17
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/types.d.ts +13 -2
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +186 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/weaver-template.d.ts.map +1 -1
- package/dist/templates/weaver-template.js +24 -5
- package/dist/templates/weaver-template.js.map +1 -1
- package/flowweaver.manifest.json +2 -2
- package/package.json +17 -5
|
@@ -4,7 +4,12 @@ export const weaverTemplate = {
|
|
|
4
4
|
description: 'AI-powered runner that executes any Flow Weaver workflow autonomously, with auto-detected providers and notification support',
|
|
5
5
|
category: 'automation',
|
|
6
6
|
generate: (_opts) => {
|
|
7
|
-
return
|
|
7
|
+
return `// Generated by flowweaver-pack-weaver. Compile before running:
|
|
8
|
+
// flow-weaver compile weaver.ts
|
|
9
|
+
// flow-weaver run weaver.ts
|
|
10
|
+
// Or use the CLI directly: npx weaver weaver.ts
|
|
11
|
+
|
|
12
|
+
import { execSync } from 'node:child_process';
|
|
8
13
|
import * as fs from 'node:fs';
|
|
9
14
|
import * as path from 'node:path';
|
|
10
15
|
import * as os from 'node:os';
|
|
@@ -542,7 +547,7 @@ async function executeTarget(
|
|
|
542
547
|
info(\`Executing: \${targetPath}\`);
|
|
543
548
|
const startTime = Date.now();
|
|
544
549
|
|
|
545
|
-
const mod = '@synergenius/flow-weaver/
|
|
550
|
+
const mod = '@synergenius/flow-weaver/executor';
|
|
546
551
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
547
552
|
const { executeWorkflowFromFile } = await (import(mod) as Promise<any>);
|
|
548
553
|
const execResult = await executeWorkflowFromFile(targetPath, {}, {
|
|
@@ -552,9 +557,23 @@ async function executeTarget(
|
|
|
552
557
|
});
|
|
553
558
|
|
|
554
559
|
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
555
|
-
const result = execResult.result as
|
|
556
|
-
const ok = result?.onSuccess ?? false;
|
|
557
|
-
|
|
560
|
+
const result = execResult.result as Record<string, unknown> | null;
|
|
561
|
+
const ok = (result?.onSuccess as boolean) ?? false;
|
|
562
|
+
// Build summary from result fields, falling back gracefully
|
|
563
|
+
let summary: string;
|
|
564
|
+
if (typeof result?.summary === 'string') {
|
|
565
|
+
summary = result.summary;
|
|
566
|
+
} else if (result) {
|
|
567
|
+
const parts: string[] = [];
|
|
568
|
+
for (const [k, v] of Object.entries(result)) {
|
|
569
|
+
if (k === 'onSuccess' || k === 'onFailure' || v == null) continue;
|
|
570
|
+
const s = typeof v === 'string' ? v : JSON.stringify(v);
|
|
571
|
+
parts.push(k + ': ' + (s.length > 80 ? s.slice(0, 80) + '...' : s));
|
|
572
|
+
}
|
|
573
|
+
summary = parts.length > 0 ? parts.join(', ') : 'completed';
|
|
574
|
+
} else {
|
|
575
|
+
summary = 'completed';
|
|
576
|
+
}
|
|
558
577
|
|
|
559
578
|
if (ok) success(\`Completed in \${elapsed}s: \${summary}\`);
|
|
560
579
|
else warn(\`Failed after \${elapsed}s: \${summary}\`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weaver-template.js","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,8HAA8H;IAC3I,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO
|
|
1
|
+
{"version":3,"file":"weaver-template.js","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,8HAA8H;IAC3I,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyqBV,CAAC;IACA,CAAC;CACF,CAAC"}
|
package/flowweaver.manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 1,
|
|
3
3
|
"name": "@synergenius/flowweaver-pack-weaver",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "Autonomous workflow runner for Flow Weaver. Auto-detect providers, execute workflows, notify results.",
|
|
6
|
-
"engineVersion": ">=0.17.
|
|
6
|
+
"engineVersion": ">=0.17.13",
|
|
7
7
|
"categories": [
|
|
8
8
|
"automation",
|
|
9
9
|
"ai"
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synergenius/flowweaver-pack-weaver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Autonomous workflow runner for Flow Weaver. Auto-detect providers, execute workflows, notify results.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"weaver": "./dist/cli.js"
|
|
10
|
+
},
|
|
8
11
|
"keywords": [
|
|
9
12
|
"flowweaver-marketplace-pack",
|
|
10
13
|
"flow-weaver",
|
|
@@ -21,8 +24,8 @@
|
|
|
21
24
|
]
|
|
22
25
|
},
|
|
23
26
|
"peerDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
27
|
+
"@anthropic-ai/sdk": ">=0.30.0",
|
|
28
|
+
"@synergenius/flow-weaver": ">=0.17.13"
|
|
26
29
|
},
|
|
27
30
|
"peerDependenciesMeta": {
|
|
28
31
|
"@anthropic-ai/sdk": {
|
|
@@ -32,14 +35,23 @@
|
|
|
32
35
|
"files": [
|
|
33
36
|
"dist",
|
|
34
37
|
"flowweaver.manifest.json",
|
|
35
|
-
"templates.js"
|
|
38
|
+
"templates.js",
|
|
39
|
+
"LICENSE"
|
|
36
40
|
],
|
|
37
41
|
"scripts": {
|
|
38
42
|
"build": "tsc && cp -r src/docs dist/docs && node -e \"require('fs').writeFileSync('templates.js','export{workflowTemplates}from\\\"./dist/templates/index.js\\\";\\n')\"",
|
|
39
43
|
"prepublishOnly": "npm run build",
|
|
40
|
-
"typecheck": "tsc --noEmit"
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"release": "tsx scripts/release.ts"
|
|
41
46
|
},
|
|
42
47
|
"devDependencies": {
|
|
48
|
+
"@types/node": "^25.3.5",
|
|
49
|
+
"tsx": "^4.0.0",
|
|
43
50
|
"typescript": "^5.0.0"
|
|
51
|
+
},
|
|
52
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/synergenius-fw/flowweaver-pack-weaver"
|
|
44
56
|
}
|
|
45
57
|
}
|