@barnum/barnum 0.0.0-main-c9d44943 → 0.0.0-main-da2f51a0

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.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -28,6 +28,7 @@ const Command = z.discriminatedUnion("kind", [
28
28
  z.object({
29
29
  config: z.string().nullable().optional().describe("Config (JSON string or path to file). Required unless `--resume-from` is used."),
30
30
  entrypointValue: z.string().nullable().optional().describe("Initial value for the entrypoint step (JSON string or path to file). Only valid when config has an `entrypoint`. Defaults to `{}` if not provided."),
31
+ executor: z.string().nullable().optional().describe("Internal: executor command injected by cli.cjs. Not user-facing — hidden from --help."),
31
32
  initialState: z.string().nullable().optional().describe("Initial tasks (JSON string or path to file). Required if config has no `entrypoint`. Cannot be used with `--entrypoint-value`."),
32
33
  kind: z.literal("Run"),
33
34
  logFile: z.string().nullable().optional().describe("Log file path (logs emitted in addition to stderr)"),
package/cli.cjs CHANGED
@@ -23,10 +23,30 @@ if (process.platform === 'darwin' && process.arch === 'x64') {
23
23
  );
24
24
  }
25
25
 
26
- var input = process.argv.slice(2);
26
+ // --executor is internal. Error if the user passed it directly.
27
+ var userArgs = process.argv.slice(2);
28
+ if (userArgs.includes('--executor')) {
29
+ console.error('Error: --executor is an internal flag and cannot be passed directly.');
30
+ process.exit(1);
31
+ }
32
+
33
+ var executorPath = path.resolve(__dirname, 'actions', 'executor.ts');
34
+
35
+ function resolveExecutorCommand() {
36
+ if (typeof Bun !== 'undefined') {
37
+ // Bun runs .ts natively
38
+ return process.execPath + ' ' + executorPath;
39
+ }
40
+ // Node: use tsx
41
+ var tsxPath = require.resolve('tsx/cli');
42
+ return 'node ' + tsxPath + ' ' + executorPath;
43
+ }
44
+
45
+ var executor = resolveExecutorCommand();
46
+ var args = userArgs.concat('--executor', executor);
27
47
 
28
48
  try {
29
49
  chmodSync(bin, 0o755);
30
50
  } catch {}
31
51
 
32
- spawn(bin, input, { stdio: 'inherit' }).on('exit', process.exit);
52
+ spawn(bin, args, { stdio: 'inherit' }).on('exit', process.exit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barnum/barnum",
3
- "version": "0.0.0-main-c9d44943",
3
+ "version": "0.0.0-main-da2f51a0",
4
4
  "type": "module",
5
5
  "description": "Barnum CLI - workflow engine for agents.",
6
6
  "main": "index.ts",