@synergenius/flow-weaver 0.23.0 → 0.23.3

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/index.js CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  // Must be imported first: sets up env vars before picocolors reads them
9
9
  import './env-setup.js';
10
+ import * as path from 'node:path';
10
11
  // Load built-in extensions (CI/CD, etc.) before any commands run
11
12
  import '../extensions/index.js';
12
13
  import { Command, Option } from 'commander';
@@ -717,6 +718,14 @@ if (!process.env['VITEST']) {
717
718
  const { cloudStatusCommand } = await import('./commands/deploy.js');
718
719
  await cloudStatusCommand();
719
720
  });
721
+ // Connect command — connect this device to the platform
722
+ program
723
+ .command('connect [dir]')
724
+ .description('Connect this device to the Flow Weaver platform')
725
+ .action(async (dir) => {
726
+ const { handleConnect } = await import('./commands/connect.js');
727
+ await handleConnect(path.resolve(dir ?? '.'));
728
+ });
720
729
  // Fallback weaver shim if pack not installed
721
730
  if (!program.commands.some(c => c.name() === 'weaver')) {
722
731
  program
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.23.0";
1
+ export declare const VERSION = "0.23.3";
2
2
  //# sourceMappingURL=generated-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.ts — do not edit manually
2
- export const VERSION = '0.23.0';
2
+ export const VERSION = '0.23.3';
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -7,5 +7,5 @@
7
7
  export type { TMarketplaceManifest, TManifestNodeType, TManifestWorkflow, TManifestPattern, TManifestExportTarget, TManifestPort, TValidationIssue, TValidationSeverity, TPackageValidationResult, TMarketplacePackageInfo, TInstalledPackage, TMarketInitConfig, TManifestTagHandler, TManifestValidationRuleSet, TManifestDocTopic, TManifestInitContribution, TManifestCliCommand, TManifestMcpTool, } from './types.js';
8
8
  export { generateManifest, writeManifest, readManifest, type GenerateManifestOptions, type GenerateManifestResult, } from './manifest.js';
9
9
  export { validatePackage } from './validator.js';
10
- export { searchPackages, listInstalledPackages, getInstalledPackageManifest, discoverTagHandlers, discoverValidationRuleSets, discoverDocTopics, discoverInitContributions, type SearchOptions, type TDiscoveredTagHandler, type TDiscoveredValidationRuleSet, type TDiscoveredDocTopic, type TDiscoveredInitContribution, } from './registry.js';
10
+ export { searchPackages, listInstalledPackages, getInstalledPackageManifest, discoverTagHandlers, discoverValidationRuleSets, discoverDocTopics, discoverInitContributions, discoverDeviceHandlers, type SearchOptions, type TDiscoveredTagHandler, type TDiscoveredValidationRuleSet, type TDiscoveredDocTopic, type TDiscoveredInitContribution, type TDiscoveredDeviceHandler, } from './registry.js';
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -6,5 +6,5 @@
6
6
  */
7
7
  export { generateManifest, writeManifest, readManifest, } from './manifest.js';
8
8
  export { validatePackage } from './validator.js';
9
- export { searchPackages, listInstalledPackages, getInstalledPackageManifest, discoverTagHandlers, discoverValidationRuleSets, discoverDocTopics, discoverInitContributions, } from './registry.js';
9
+ export { searchPackages, listInstalledPackages, getInstalledPackageManifest, discoverTagHandlers, discoverValidationRuleSets, discoverDocTopics, discoverInitContributions, discoverDeviceHandlers, } from './registry.js';
10
10
  //# sourceMappingURL=index.js.map
@@ -49,6 +49,15 @@ export type TDiscoveredInitContribution = TManifestInitContribution & {
49
49
  /** Package name this contribution belongs to */
50
50
  packageName: string;
51
51
  };
52
+ /** A device handler entry point discovered from an installed pack manifest. */
53
+ export type TDiscoveredDeviceHandler = {
54
+ /** npm package name */
55
+ packageName: string;
56
+ /** Absolute path to the installed package */
57
+ packagePath: string;
58
+ /** Absolute path to the device handler entrypoint module */
59
+ entrypoint: string;
60
+ };
52
61
  /**
53
62
  * Discover all tag handlers from installed pack manifests.
54
63
  */
@@ -65,4 +74,11 @@ export declare function discoverDocTopics(projectDir: string): Promise<TDiscover
65
74
  * Discover all init contributions from installed pack manifests.
66
75
  */
67
76
  export declare function discoverInitContributions(projectDir: string): Promise<TDiscoveredInitContribution[]>;
77
+ /**
78
+ * Discover all device handler entry points from installed pack manifests.
79
+ *
80
+ * Returns packs that declare a `deviceHandlers` field in their manifest,
81
+ * resolved to an absolute entrypoint path.
82
+ */
83
+ export declare function discoverDeviceHandlers(projectDir: string): Promise<TDiscoveredDeviceHandler[]>;
68
84
  //# sourceMappingURL=registry.d.ts.map
@@ -174,4 +174,25 @@ export async function discoverInitContributions(projectDir) {
174
174
  }
175
175
  return contributions;
176
176
  }
177
+ /**
178
+ * Discover all device handler entry points from installed pack manifests.
179
+ *
180
+ * Returns packs that declare a `deviceHandlers` field in their manifest,
181
+ * resolved to an absolute entrypoint path.
182
+ */
183
+ export async function discoverDeviceHandlers(projectDir) {
184
+ const packages = await listInstalledPackages(projectDir);
185
+ const handlers = [];
186
+ for (const pkg of packages) {
187
+ const manifest = pkg.manifest;
188
+ if (!manifest.deviceHandlers)
189
+ continue;
190
+ handlers.push({
191
+ packageName: pkg.name,
192
+ packagePath: pkg.path,
193
+ entrypoint: path.join(pkg.path, manifest.deviceHandlers),
194
+ });
195
+ }
196
+ return handlers;
197
+ }
177
198
  //# sourceMappingURL=registry.js.map
@@ -44,6 +44,8 @@ export type TMarketplaceManifest = {
44
44
  mcpEntrypoint?: string;
45
45
  /** MCP tools contributed by this pack */
46
46
  mcpTools?: TManifestMcpTool[];
47
+ /** Entry point for device connection handler registration */
48
+ deviceHandlers?: string;
47
49
  /** External dependency information */
48
50
  dependencies?: {
49
51
  /** Flow Weaver peer dependency constraints */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.23.0",
3
+ "version": "0.23.3",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -129,7 +129,7 @@
129
129
  "typecheck": "tsc --noEmit -p tsconfig.build.json",
130
130
  "docs": "typedoc && tsx scripts/generate-grammar-docs.ts",
131
131
  "docs:serve": "npm run docs && npx http-server docs/api -c-1 -o",
132
- "prepare": "npm run build",
132
+ "prepare": "npm run build && husky || true",
133
133
  "cli": "tsx src/cli/index.ts",
134
134
  "diagram": "tsx scripts/generate-diagram.ts"
135
135
  },
@@ -179,6 +179,7 @@
179
179
  "@types/react": "^19.0.0",
180
180
  "@types/ws": "^8.18.1",
181
181
  "@vitest/coverage-v8": "^4.0.18",
182
+ "husky": "^9.1.7",
182
183
  "prettier": "^3.1.1",
183
184
  "rimraf": "6.1.2",
184
185
  "ts-node": "^10.9.2",