@synergenius/flow-weaver 0.21.3 → 0.21.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/cli/commands/market.js +5 -5
- package/dist/cli/flow-weaver.mjs +14 -14
- package/dist/cli/pack-commands.d.ts +1 -1
- package/dist/cli/pack-commands.js +4 -4
- package/dist/deployment/index.d.ts +1 -1
- package/dist/deployment/index.js +1 -1
- package/dist/export/index.js +1 -1
- package/dist/extensions/index.d.ts +2 -2
- package/dist/extensions/index.js +2 -2
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +1 -1
- package/dist/marketplace/registry.js +4 -4
- package/dist/marketplace/types.d.ts +2 -2
- package/dist/marketplace/types.js +1 -1
- package/dist/marketplace/validator.js +2 -2
- package/dist/mcp/tools-export.js +1 -1
- package/dist/mcp/tools-marketplace.js +1 -1
- package/package.json +1 -1
|
@@ -13,9 +13,9 @@ import { getErrorMessage } from '../../utils/error-utils.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export async function marketInitCommand(name, options = {}) {
|
|
15
15
|
// Validate name
|
|
16
|
-
if (!name.startsWith('
|
|
17
|
-
const suggested = `
|
|
18
|
-
logger.warn(`Name should follow "
|
|
16
|
+
if (!name.startsWith('flow-weaver-pack-')) {
|
|
17
|
+
const suggested = `flow-weaver-pack-${name}`;
|
|
18
|
+
logger.warn(`Name should follow "flow-weaver-pack-*" convention, using "${suggested}"`);
|
|
19
19
|
name = suggested;
|
|
20
20
|
}
|
|
21
21
|
const targetDir = path.resolve(name);
|
|
@@ -48,7 +48,7 @@ export async function marketInitCommand(name, options = {}) {
|
|
|
48
48
|
fs.mkdirSync(dir, { recursive: true });
|
|
49
49
|
}
|
|
50
50
|
// package.json
|
|
51
|
-
const shortName = name.replace(/^
|
|
51
|
+
const shortName = name.replace(/^flow-weaver-pack-/, '');
|
|
52
52
|
const pkg = {
|
|
53
53
|
name,
|
|
54
54
|
version: '1.0.0',
|
|
@@ -389,7 +389,7 @@ function resolvePackageName(spec) {
|
|
|
389
389
|
if (spec.endsWith('.tgz') || spec.endsWith('.tar.gz')) {
|
|
390
390
|
// For local tarballs, try to extract the package name
|
|
391
391
|
const base = path.basename(spec, spec.endsWith('.tar.gz') ? '.tar.gz' : '.tgz');
|
|
392
|
-
//
|
|
392
|
+
// flow-weaver-pack-test-1.0.0 → flow-weaver-pack-test
|
|
393
393
|
const match = base.match(/^(.+)-\d+\.\d+\.\d+/);
|
|
394
394
|
return match ? match[1] : base;
|
|
395
395
|
}
|
package/dist/cli/flow-weaver.mjs
CHANGED
|
@@ -9671,7 +9671,7 @@ var VERSION;
|
|
|
9671
9671
|
var init_generated_version = __esm({
|
|
9672
9672
|
"src/generated-version.ts"() {
|
|
9673
9673
|
"use strict";
|
|
9674
|
-
VERSION = "0.21.
|
|
9674
|
+
VERSION = "0.21.4";
|
|
9675
9675
|
}
|
|
9676
9676
|
});
|
|
9677
9677
|
|
|
@@ -35316,8 +35316,8 @@ async function listInstalledPackages(projectDir) {
|
|
|
35316
35316
|
const nodeModules = path5.join(projectDir, "node_modules");
|
|
35317
35317
|
if (!fs5.existsSync(nodeModules)) return [];
|
|
35318
35318
|
const patterns = [
|
|
35319
|
-
path5.join(nodeModules, "
|
|
35320
|
-
path5.join(nodeModules, "@*", "
|
|
35319
|
+
path5.join(nodeModules, "flow-weaver-pack-*", "flowweaver.manifest.json"),
|
|
35320
|
+
path5.join(nodeModules, "@*", "flow-weaver-pack-*", "flowweaver.manifest.json")
|
|
35321
35321
|
];
|
|
35322
35322
|
const results = [];
|
|
35323
35323
|
for (const pattern of patterns) {
|
|
@@ -35424,7 +35424,7 @@ var init_registry = __esm({
|
|
|
35424
35424
|
init_esm5();
|
|
35425
35425
|
MARKETPLACE_KEYWORD = "flowweaver-marketplace-pack";
|
|
35426
35426
|
NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
|
|
35427
|
-
PACK_NAME_RE = /^(@[^/]+\/)?
|
|
35427
|
+
PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
|
|
35428
35428
|
}
|
|
35429
35429
|
});
|
|
35430
35430
|
|
|
@@ -70106,7 +70106,7 @@ function checkPackEngineVersion2(pkg) {
|
|
|
70106
70106
|
}
|
|
70107
70107
|
function deriveNamespace(packageName) {
|
|
70108
70108
|
const base = packageName.replace(/^@[^/]+\//, "");
|
|
70109
|
-
return base.replace(/^
|
|
70109
|
+
return base.replace(/^flow-weaver-pack-/, "");
|
|
70110
70110
|
}
|
|
70111
70111
|
async function registerPackCommands(program3) {
|
|
70112
70112
|
const projectDir = process.cwd();
|
|
@@ -88007,7 +88007,7 @@ function registerExportTools(mcp) {
|
|
|
88007
88007
|
const available = registry2.getNames();
|
|
88008
88008
|
return makeErrorResult(
|
|
88009
88009
|
"INVALID_TARGET",
|
|
88010
|
-
available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install
|
|
88010
|
+
available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${args.target})` : `Unknown target: "${args.target}". Installed: ${available.join(", ")}`
|
|
88011
88011
|
);
|
|
88012
88012
|
}
|
|
88013
88013
|
let parseResult;
|
|
@@ -88342,7 +88342,7 @@ import * as path32 from "path";
|
|
|
88342
88342
|
function issue2(code, severity, message) {
|
|
88343
88343
|
return { code, severity, message };
|
|
88344
88344
|
}
|
|
88345
|
-
var PACK_NAME_RE2 = /^(@[^/]+\/)?
|
|
88345
|
+
var PACK_NAME_RE2 = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
|
|
88346
88346
|
var MARKETPLACE_KEYWORD2 = "flowweaver-marketplace-pack";
|
|
88347
88347
|
function validatePackageJson(pkg, directory) {
|
|
88348
88348
|
const issues = [];
|
|
@@ -88544,7 +88544,7 @@ function registerMarketplaceTools(mcp) {
|
|
|
88544
88544
|
"fw_market_install",
|
|
88545
88545
|
"Install a Flow Weaver marketplace package via npm. After installation, the package's node types, workflows, and patterns become available for use.",
|
|
88546
88546
|
{
|
|
88547
|
-
package: external_exports.string().describe('Package name or specifier (e.g., "
|
|
88547
|
+
package: external_exports.string().describe('Package name or specifier (e.g., "flow-weaver-pack-openai" or "flow-weaver-pack-openai@1.0.0")')
|
|
88548
88548
|
},
|
|
88549
88549
|
async (args) => {
|
|
88550
88550
|
try {
|
|
@@ -91318,7 +91318,7 @@ async function exportWorkflow(options) {
|
|
|
91318
91318
|
if (!target) {
|
|
91319
91319
|
const available = registry2.getNames();
|
|
91320
91320
|
throw new Error(
|
|
91321
|
-
available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install
|
|
91321
|
+
available.length === 0 ? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${options.target})` : `Unknown target "${options.target}". Installed: ${available.join(", ")}`
|
|
91322
91322
|
);
|
|
91323
91323
|
}
|
|
91324
91324
|
const inputPath = path40.resolve(options.input);
|
|
@@ -92435,9 +92435,9 @@ import * as path48 from "path";
|
|
|
92435
92435
|
import { execSync as execSync7 } from "child_process";
|
|
92436
92436
|
init_error_utils();
|
|
92437
92437
|
async function marketInitCommand(name, options = {}) {
|
|
92438
|
-
if (!name.startsWith("
|
|
92439
|
-
const suggested = `
|
|
92440
|
-
logger.warn(`Name should follow "
|
|
92438
|
+
if (!name.startsWith("flow-weaver-pack-")) {
|
|
92439
|
+
const suggested = `flow-weaver-pack-${name}`;
|
|
92440
|
+
logger.warn(`Name should follow "flow-weaver-pack-*" convention, using "${suggested}"`);
|
|
92441
92441
|
name = suggested;
|
|
92442
92442
|
}
|
|
92443
92443
|
const targetDir = path48.resolve(name);
|
|
@@ -92467,7 +92467,7 @@ async function marketInitCommand(name, options = {}) {
|
|
|
92467
92467
|
for (const dir of dirs) {
|
|
92468
92468
|
fs46.mkdirSync(dir, { recursive: true });
|
|
92469
92469
|
}
|
|
92470
|
-
const shortName = name.replace(/^
|
|
92470
|
+
const shortName = name.replace(/^flow-weaver-pack-/, "");
|
|
92471
92471
|
const pkg = {
|
|
92472
92472
|
name,
|
|
92473
92473
|
version: "1.0.0",
|
|
@@ -92836,7 +92836,7 @@ function displayInstalledPackage(pkg) {
|
|
|
92836
92836
|
// src/cli/index.ts
|
|
92837
92837
|
init_logger();
|
|
92838
92838
|
init_error_utils();
|
|
92839
|
-
var version2 = true ? "0.21.
|
|
92839
|
+
var version2 = true ? "0.21.4" : "0.0.0-dev";
|
|
92840
92840
|
var program2 = new Command();
|
|
92841
92841
|
program2.name("flow-weaver").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
|
|
92842
92842
|
logger.banner(version2);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Scans for packs with cliCommands in their manifest. For each pack,
|
|
5
5
|
* registers a Commander subcommand group under the pack namespace
|
|
6
|
-
* (e.g., @synergenius/
|
|
6
|
+
* (e.g., @synergenius/flow-weaver-pack-weaver -> "weaver").
|
|
7
7
|
*
|
|
8
8
|
* Command handlers are lazy: the pack's cliEntrypoint is only imported
|
|
9
9
|
* when the user actually invokes a pack command.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Scans for packs with cliCommands in their manifest. For each pack,
|
|
5
5
|
* registers a Commander subcommand group under the pack namespace
|
|
6
|
-
* (e.g., @synergenius/
|
|
6
|
+
* (e.g., @synergenius/flow-weaver-pack-weaver -> "weaver").
|
|
7
7
|
*
|
|
8
8
|
* Command handlers are lazy: the pack's cliEntrypoint is only imported
|
|
9
9
|
* when the user actually invokes a pack command.
|
|
@@ -34,12 +34,12 @@ function checkPackEngineVersion(pkg) {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Derive a short namespace from a pack's npm name.
|
|
37
|
-
* @synergenius/
|
|
38
|
-
*
|
|
37
|
+
* @synergenius/flow-weaver-pack-weaver -> weaver
|
|
38
|
+
* flow-weaver-pack-gitlab-ci -> gitlab-ci
|
|
39
39
|
*/
|
|
40
40
|
function deriveNamespace(packageName) {
|
|
41
41
|
const base = packageName.replace(/^@[^/]+\//, '');
|
|
42
|
-
return base.replace(/^
|
|
42
|
+
return base.replace(/^flow-weaver-pack-/, '');
|
|
43
43
|
}
|
|
44
44
|
export async function registerPackCommands(program) {
|
|
45
45
|
const projectDir = process.cwd();
|
|
@@ -20,7 +20,7 @@ import { ExportTargetRegistry } from './targets/base.js';
|
|
|
20
20
|
/**
|
|
21
21
|
* Create an export target registry via marketplace discovery.
|
|
22
22
|
*
|
|
23
|
-
* Scans `node_modules/` for installed `
|
|
23
|
+
* Scans `node_modules/` for installed `flow-weaver-pack-*` packages that
|
|
24
24
|
* declare `exportTargets` in their `flowweaver.manifest.json`.
|
|
25
25
|
* Each target class is eagerly imported (to resolve the async import) but
|
|
26
26
|
* lazily instantiated — the constructor only runs when `registry.get()` is called.
|
package/dist/deployment/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { ExportTargetRegistry } from './targets/base.js';
|
|
|
25
25
|
/**
|
|
26
26
|
* Create an export target registry via marketplace discovery.
|
|
27
27
|
*
|
|
28
|
-
* Scans `node_modules/` for installed `
|
|
28
|
+
* Scans `node_modules/` for installed `flow-weaver-pack-*` packages that
|
|
29
29
|
* declare `exportTargets` in their `flowweaver.manifest.json`.
|
|
30
30
|
* Each target class is eagerly imported (to resolve the async import) but
|
|
31
31
|
* lazily instantiated — the constructor only runs when `registry.get()` is called.
|
package/dist/export/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export async function exportWorkflow(options) {
|
|
|
21
21
|
if (!target) {
|
|
22
22
|
const available = registry.getNames();
|
|
23
23
|
throw new Error(available.length === 0
|
|
24
|
-
? `No export targets installed. Install a target pack (e.g. npm install
|
|
24
|
+
? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${options.target})`
|
|
25
25
|
: `Unknown target "${options.target}". Installed: ${available.join(', ')}`);
|
|
26
26
|
}
|
|
27
27
|
const inputPath = path.resolve(options.input);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Previously loaded built-in CI/CD and Inngest extensions via side-effect
|
|
5
5
|
* imports. Both have been extracted to marketplace packs:
|
|
6
6
|
*
|
|
7
|
-
* - CI/CD: @synergenius/
|
|
8
|
-
* - Inngest: @synergenius/
|
|
7
|
+
* - CI/CD: @synergenius/flow-weaver-pack-cicd
|
|
8
|
+
* - Inngest: @synergenius/flow-weaver-pack-inngest
|
|
9
9
|
*
|
|
10
10
|
* Extensions are now discovered via marketplace pack discovery in the parser
|
|
11
11
|
* (loadPackHandlers) or registered by packs during installation.
|
package/dist/extensions/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Previously loaded built-in CI/CD and Inngest extensions via side-effect
|
|
6
6
|
* imports. Both have been extracted to marketplace packs:
|
|
7
7
|
*
|
|
8
|
-
* - CI/CD: @synergenius/
|
|
9
|
-
* - Inngest: @synergenius/
|
|
8
|
+
* - CI/CD: @synergenius/flow-weaver-pack-cicd
|
|
9
|
+
* - Inngest: @synergenius/flow-weaver-pack-inngest
|
|
10
10
|
*
|
|
11
11
|
* Extensions are now discovered via marketplace pack discovery in the parser
|
|
12
12
|
* (loadPackHandlers) or registered by packs during installation.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.21.
|
|
1
|
+
export declare const VERSION = "0.21.4";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
|
@@ -10,7 +10,7 @@ import * as path from 'path';
|
|
|
10
10
|
import { glob } from 'glob';
|
|
11
11
|
const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
|
|
12
12
|
const NPM_SEARCH_URL = 'https://registry.npmjs.org/-/v1/search';
|
|
13
|
-
const PACK_NAME_RE = /^(@[^/]+\/)?
|
|
13
|
+
const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
|
|
14
14
|
/**
|
|
15
15
|
* Search the npm registry for marketplace packages.
|
|
16
16
|
*/
|
|
@@ -49,10 +49,10 @@ export async function listInstalledPackages(projectDir) {
|
|
|
49
49
|
const nodeModules = path.join(projectDir, 'node_modules');
|
|
50
50
|
if (!fs.existsSync(nodeModules))
|
|
51
51
|
return [];
|
|
52
|
-
// Look for
|
|
52
|
+
// Look for flow-weaver-pack-* and @*/flow-weaver-pack-* directories
|
|
53
53
|
const patterns = [
|
|
54
|
-
path.join(nodeModules, '
|
|
55
|
-
path.join(nodeModules, '@*', '
|
|
54
|
+
path.join(nodeModules, 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
|
|
55
|
+
path.join(nodeModules, '@*', 'flow-weaver-pack-*', 'flowweaver.manifest.json'),
|
|
56
56
|
];
|
|
57
57
|
const results = [];
|
|
58
58
|
for (const pattern of patterns) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Marketplace types for Flow Weaver package distribution.
|
|
3
3
|
*
|
|
4
|
-
* Packages follow the naming convention `
|
|
4
|
+
* Packages follow the naming convention `flow-weaver-pack-*` and use
|
|
5
5
|
* npm as the distribution backbone. The manifest is auto-generated
|
|
6
6
|
* from source annotations via the parser.
|
|
7
7
|
*/
|
|
@@ -256,7 +256,7 @@ export type TManifestMcpTool = {
|
|
|
256
256
|
description: string;
|
|
257
257
|
};
|
|
258
258
|
export type TMarketInitConfig = {
|
|
259
|
-
/** Package name (e.g.,
|
|
259
|
+
/** Package name (e.g., flow-weaver-pack-openai) */
|
|
260
260
|
name: string;
|
|
261
261
|
/** Target directory */
|
|
262
262
|
directory: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Marketplace types for Flow Weaver package distribution.
|
|
3
3
|
*
|
|
4
|
-
* Packages follow the naming convention `
|
|
4
|
+
* Packages follow the naming convention `flow-weaver-pack-*` and use
|
|
5
5
|
* npm as the distribution backbone. The manifest is auto-generated
|
|
6
6
|
* from source annotations via the parser.
|
|
7
7
|
*/
|
|
@@ -9,12 +9,12 @@ import { parseWorkflow, validateWorkflow } from '../api/index.js';
|
|
|
9
9
|
function issue(code, severity, message) {
|
|
10
10
|
return { code, severity, message };
|
|
11
11
|
}
|
|
12
|
-
const PACK_NAME_RE = /^(@[^/]+\/)?
|
|
12
|
+
const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
|
|
13
13
|
const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
|
|
14
14
|
// ── Package-level rules ──────────────────────────────────────────────────────
|
|
15
15
|
function validatePackageJson(pkg, directory) {
|
|
16
16
|
const issues = [];
|
|
17
|
-
// PKG-005: Name must match
|
|
17
|
+
// PKG-005: Name must match flow-weaver-pack-* or @*/flow-weaver-pack-*
|
|
18
18
|
const name = pkg.name;
|
|
19
19
|
if (!name || !PACK_NAME_RE.test(name)) {
|
|
20
20
|
issues.push(issue('PKG-005', 'error', `Package name must match "flow-weaver-pack-*" or "@<scope>/flow-weaver-pack-*", got "${name ?? ''}"`));
|
package/dist/mcp/tools-export.js
CHANGED
|
@@ -60,7 +60,7 @@ export function registerExportTools(mcp) {
|
|
|
60
60
|
if (!exportTarget) {
|
|
61
61
|
const available = registry.getNames();
|
|
62
62
|
return makeErrorResult('INVALID_TARGET', available.length === 0
|
|
63
|
-
? `No export targets installed. Install a target pack (e.g. npm install
|
|
63
|
+
? `No export targets installed. Install a target pack (e.g. npm install flow-weaver-pack-${args.target})`
|
|
64
64
|
: `Unknown target: "${args.target}". Installed: ${available.join(', ')}`);
|
|
65
65
|
}
|
|
66
66
|
// 3. Parse the file to discover workflows and node types
|
|
@@ -47,7 +47,7 @@ export function registerMarketplaceTools(mcp) {
|
|
|
47
47
|
});
|
|
48
48
|
// ── fw_market_install ────────────────────────────────────────────────────
|
|
49
49
|
mcp.tool('fw_market_install', 'Install a Flow Weaver marketplace package via npm. After installation, the package\'s node types, workflows, and patterns become available for use.', {
|
|
50
|
-
package: z.string().describe('Package name or specifier (e.g., "
|
|
50
|
+
package: z.string().describe('Package name or specifier (e.g., "flow-weaver-pack-openai" or "flow-weaver-pack-openai@1.0.0")'),
|
|
51
51
|
}, async (args) => {
|
|
52
52
|
try {
|
|
53
53
|
// Run npm install
|
package/package.json
CHANGED