@barnum/barnum 0.0.0-main-1b7a5ffd → 0.0.0-main-8942b419

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
@@ -31,7 +31,6 @@ const Command = z.discriminatedUnion("kind", [
31
31
  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
32
  kind: z.literal("Run"),
33
33
  logFile: z.string().nullable().optional().describe("Log file path (logs emitted in addition to stderr)"),
34
- pool: z.string().nullable().optional().describe("Agent pool ID (e.g., `abc123` resolves to `<root>/pools/abc123/`). Defaults to `default`."),
35
34
  resumeFrom: z.string().nullable().optional().describe("Resume from a previous state log file. Incompatible with `--config`, `--initial-state`, and `--entrypoint-value`."),
36
35
  stateLog: z.string().nullable().optional().describe("State log file path (NDJSON file for persistence/resume)"),
37
36
  wake: z.string().nullable().optional().describe("Wake script to call before starting"),
@@ -58,7 +57,6 @@ const LogLevel = z.union([
58
57
  export const cliSchema = z.object({
59
58
  command: Command.describe("Subcommand to run."),
60
59
  logLevel: LogLevel.describe("Log level (debug shows task return values)"),
61
- root: z.string().nullable().optional().describe("Root directory. Pools live in `<root>/pools/<id>/`. Defaults to `/tmp/troupe` on Unix."),
62
60
  }).describe("Top-level CLI arguments for barnum.");
63
61
 
64
62
  export type Cli = z.infer<typeof cliSchema>;
@@ -72,6 +72,32 @@
72
72
  "enum": [
73
73
  "Pool"
74
74
  ]
75
+ },
76
+ "pool": {
77
+ "description": "Pool name (e.g., `\"demo\"`, `\"reviewers\"`). If omitted, the pool infrastructure uses its own default.",
78
+ "default": null,
79
+ "type": [
80
+ "string",
81
+ "null"
82
+ ]
83
+ },
84
+ "root": {
85
+ "description": "Pool root directory. If omitted, the pool infrastructure uses its own default.",
86
+ "default": null,
87
+ "type": [
88
+ "string",
89
+ "null"
90
+ ]
91
+ },
92
+ "timeout": {
93
+ "description": "Agent timeout in seconds. Passed to the pool as `timeout_seconds` in the task payload. Controls how long the agent gets to work. Separate from the step-level `timeout` which controls barnum's worker timeout.",
94
+ "default": null,
95
+ "type": [
96
+ "integer",
97
+ "null"
98
+ ],
99
+ "format": "uint64",
100
+ "minimum": 0.0
75
101
  }
76
102
  }
77
103
  },
@@ -15,6 +15,9 @@ const ActionFile = z.discriminatedUnion("kind", [
15
15
  z.object({
16
16
  instructions: MaybeLinked_for_String.describe("Markdown prompt shown to the agent processing this task. This is the core of what tells the agent what to do. Use `{\"kind\": \"Inline\", \"value\": \"...\"}` to write the markdown directly, or `{\"kind\": \"Link\", \"path\": \"path/to/file.md\"}` to reference an external file."),
17
17
  kind: z.literal("Pool"),
18
+ pool: z.string().nullable().optional().default(null).describe("Pool name (e.g., `\"demo\"`, `\"reviewers\"`). If omitted, the pool infrastructure uses its own default."),
19
+ root: z.string().nullable().optional().default(null).describe("Pool root directory. If omitted, the pool infrastructure uses its own default."),
20
+ timeout: z.number().int().nonnegative().nullable().optional().default(null).describe("Agent timeout in seconds. Passed to the pool as `timeout_seconds` in the task payload. Controls how long the agent gets to work. Separate from the step-level `timeout` which controls barnum's worker timeout."),
18
21
  }).describe("Send the task to the agent pool for processing."),
19
22
  z.object({
20
23
  kind: z.literal("Command"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barnum/barnum",
3
- "version": "0.0.0-main-1b7a5ffd",
3
+ "version": "0.0.0-main-8942b419",
4
4
  "type": "module",
5
5
  "description": "Barnum CLI - workflow engine for agents.",
6
6
  "main": "index.ts",
package/run.ts CHANGED
@@ -15,10 +15,8 @@ function spawnBarnum(args: string[]): ChildProcess {
15
15
  }
16
16
 
17
17
  export interface RunOptions {
18
- pool?: string;
19
18
  entrypointValue?: string;
20
19
  resumeFrom?: string;
21
- root?: string;
22
20
  logLevel?: string;
23
21
  logFile?: string;
24
22
  stateLog?: string;
@@ -40,9 +38,7 @@ export class BarnumConfig {
40
38
  const args = opts?.resumeFrom
41
39
  ? ["run", "--resume-from", opts.resumeFrom]
42
40
  : ["run", "--config", JSON.stringify(this.config)];
43
- if (opts?.pool) args.push("--pool", opts.pool);
44
41
  if (opts?.entrypointValue) args.push("--entrypoint-value", opts.entrypointValue);
45
- if (opts?.root) args.push("--root", opts.root);
46
42
  if (opts?.logLevel) args.push("--log-level", opts.logLevel);
47
43
  if (opts?.logFile) args.push("--log-file", opts.logFile);
48
44
  if (opts?.stateLog) args.push("--state-log", opts.stateLog);