relayflows 2.0.1

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.
Files changed (3) hide show
  1. package/README.md +20 -0
  2. package/bin/flows.js +23 -0
  3. package/package.json +24 -0
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # relayflows
2
+
3
+ The `flows` CLI, published under the unscoped name so the install is just:
4
+
5
+ ```sh
6
+ npm install -g relayflows
7
+ ```
8
+
9
+ This package carries no logic of its own. It declares `@relayflows/sdk` as a
10
+ normal dependency and `bin/flows.js` forwards argv and stdio straight to that
11
+ dependency's `dist/cli.js`, resolved by filesystem path from this package's
12
+ own `node_modules` rather than by import specifier — the SDK's package
13
+ `exports` doesn't list that subpath, so a bare `import` would be refused.
14
+
15
+ Versioned and released in lockstep with `@relayflows/sdk`: the two always
16
+ carry the same version number, and this package pins its dependency to that
17
+ exact version rather than a range, so `npm install -g relayflows` always
18
+ resolves the SDK build it shipped with.
19
+
20
+ See `@relayflows/sdk` and `docs/SURFACE.md` for what the CLI actually does.
package/bin/flows.js ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { existsSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ // Not `import '@relayflows/sdk/dist/cli.js'`: that subpath isn't in the
8
+ // SDK's package "exports", so specifier resolution would refuse it. Locating
9
+ // the installed dependency's real CLI file directly sidesteps that — this
10
+ // package's only job is finding it and forwarding argv/stdio.
11
+ const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..');
12
+ const sdkCli = join(packageRoot, 'node_modules', '@relayflows', 'sdk', 'dist', 'cli.js');
13
+
14
+ if (!existsSync(sdkCli)) {
15
+ process.stderr.write(
16
+ `relayflows: could not find @relayflows/sdk at ${sdkCli}\n` +
17
+ 'Reinstall with `npm install -g relayflows`.\n',
18
+ );
19
+ process.exit(1);
20
+ }
21
+
22
+ const result = spawnSync(process.execPath, [sdkCli, ...process.argv.slice(2)], { stdio: 'inherit' });
23
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "relayflows",
3
+ "version": "2.0.1",
4
+ "description": "Relayflow v2 CLI. Installs the `flows` command — a thin wrapper around @relayflows/sdk, published under the unscoped name for `npm install -g relayflows`.",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/AgentWorkforce/flows.git",
10
+ "directory": "packages/relayflows"
11
+ },
12
+ "files": [
13
+ "bin"
14
+ ],
15
+ "bin": {
16
+ "flows": "./bin/flows.js"
17
+ },
18
+ "dependencies": {
19
+ "@relayflows/sdk": "2.0.1"
20
+ },
21
+ "engines": {
22
+ "node": ">=20"
23
+ }
24
+ }