@bakers-build/conductor 0.9.1-next.9 → 0.10.0

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.
@@ -22,7 +22,7 @@ export function assertProtectedEntryPoints(hooks, protectedPaths) {
22
22
  ? [[`hooks.${name}`, value]]
23
23
  : Object.entries(value ?? {}).map(([key, command]) => [
24
24
  `hooks.${name}.${key}`,
25
- typeof command === 'string' ? command : command.command,
25
+ command,
26
26
  ]);
27
27
  for (const [label, command] of commands) {
28
28
  const entry = hostCommandEntry(command);
@@ -49,8 +49,6 @@ export interface RuntimePlugin {
49
49
  readonly id: string;
50
50
  /** True when runs are isolated from the host; agent permissions remain unchanged. */
51
51
  readonly isolates: boolean;
52
- /** Run clones borrow the parent's objects (`git clone --shared`); undefined = the workspace decides. */
53
- readonly shared?: boolean;
54
52
  readonly requiredModules: string[];
55
53
  createRuntime(config: ConductorFileConfig, deps: {
56
54
  logger: ConductorLogger;
@@ -1,6 +1,6 @@
1
1
  import type { ConductorLogger } from '@bakers-build/core';
2
2
  import { type MessageInput } from '@bakers-build/message';
3
- import type { ConductorEngineConfig, ProvisionExecCommand } from '../types.js';
3
+ import type { ConductorEngineConfig } from '../types.js';
4
4
  import type { Ticket } from './remote.js';
5
5
  export type AgentCatalog = Pick<ConductorEngineConfig, 'agents' | 'enabled_agents' | 'disabled_agents' | 'default_agent' | 'routes'>;
6
6
  export interface ToolHost {
@@ -87,7 +87,7 @@ export interface ProvisionRuns {
87
87
  export declare function provisionRuns(timeoutMs?: number): ProvisionRuns;
88
88
  export interface ProvisionOptions {
89
89
  /** `hooks.provision_exec`: commands by key. */
90
- exec?: Record<string, ProvisionExecCommand>;
90
+ exec?: Record<string, string>;
91
91
  /** Whether the runtime isolates runs; exported to every host command. */
92
92
  isolates?: boolean;
93
93
  }
@@ -86,9 +86,8 @@ export function provisionTools(hook, runs = provisionRuns(), options = {}) {
86
86
  handlers.provision_up = async (req) => report(await runs.run(req.worktreePath, commandFor(req.args.profile), envFor(req.worktreePath)));
87
87
  }
88
88
  if (Object.keys(exec).length > 0) {
89
- const withArgs = Object.keys(exec).filter((key) => typeof exec[key] === 'object' && exec[key].args === true);
90
89
  tools.provision_exec = {
91
- description: `Run one of the project's configured commands (${Object.keys(exec).join(', ')}) for this worktree, such as a command in its site container. Each key is a fixed command; only ${withArgs.length ? withArgs.join(', ') : 'none'} also take \`args\`, passed as separate arguments after \`--\`, never through a shell. Returns the exit code and the output tail.`,
90
+ description: `Run one of the project's configured commands (${Object.keys(exec).join(', ')}) for this worktree, such as a command in its site container. \`args\` reach the command as separate arguments after \`--\`, never through a shell. Returns the exit code and the output tail.`,
92
91
  input: {
93
92
  type: 'object',
94
93
  required: ['key'],
@@ -98,19 +97,7 @@ export function provisionTools(hook, runs = provisionRuns(), options = {}) {
98
97
  },
99
98
  },
100
99
  };
101
- handlers.provision_exec = async (req) => {
102
- const key = String(req.args.key);
103
- const entry = exec[key];
104
- const args = req.args.args ?? [];
105
- // A plain key is the whole command: the run cannot widen it.
106
- if (typeof entry === 'string' || entry.args !== true) {
107
- if (args.length > 0)
108
- throw new Error(`provision_exec: ${key} takes no arguments`);
109
- const command = typeof entry === 'string' ? entry : entry.command;
110
- return report(await shell(command, req.worktreePath, req.signal, PROVISION_TIMEOUT_MS, envFor(req.worktreePath), []));
111
- }
112
- return report(await shell(`${entry.command} -- "$@"`, req.worktreePath, req.signal, PROVISION_TIMEOUT_MS, envFor(req.worktreePath), args));
113
- };
100
+ handlers.provision_exec = async (req) => report(await shell(`${exec[String(req.args.key)]} -- "$@"`, req.worktreePath, req.signal, PROVISION_TIMEOUT_MS, envFor(req.worktreePath), req.args.args ?? []));
114
101
  }
115
102
  return [
116
103
  {
@@ -71,7 +71,7 @@ export interface ConductorSettings {
71
71
  /** Never runs on its own: offered to runs as the `provision_up(profile?)` tool. */
72
72
  provision_up?: ProvisionHook;
73
73
  /** Never runs on its own: offered to runs as the `provision_exec(key, args?)` tool. */
74
- provision_exec?: Record<string, ProvisionExecCommand>;
74
+ provision_exec?: Record<string, string>;
75
75
  };
76
76
  /** Control-plane site settings used for dropsh and agent env. */
77
77
  site: {
@@ -153,8 +153,3 @@ export type ConductorEngineConfig = Omit<ConductorFileConfig, 'site' | 'plugins'
153
153
  /** Absent when the project names no server; the connection or the default fills it. */
154
154
  remote?: RemotePlugin;
155
155
  };
156
- /** A fixed command, or one that also receives the run's arguments as argv. */
157
- export type ProvisionExecCommand = string | {
158
- command: string;
159
- args?: boolean;
160
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/conductor",
3
- "version": "0.9.1-next.9",
3
+ "version": "0.10.0",
4
4
  "description": "bakers.build conductor engine + CLI: registers, claims tickets via JSON:API, dispatches agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,14 +32,14 @@
32
32
  "dependencies": {
33
33
  "@dropsh/plugin-jsonapi-schema": "^0.8.2",
34
34
  "@dropsh/plugin-oauth2": "^0.8.2",
35
- "@bakers-build/core": "^0.9.1-next.9",
36
- "@bakers-build/message": "^0.9.1-next.9",
35
+ "@bakers-build/core": "^0.10.0",
36
+ "@bakers-build/message": "^0.10.0",
37
37
  "@modelcontextprotocol/sdk": "1.32.1",
38
38
  "commander": "^12.1.0",
39
39
  "dropsh": "^0.8.2"
40
40
  },
41
41
  "bakersBuild": {
42
- "commit": "fa0565441ae1aee6535c9205b3a37f87e9b52054",
43
- "channel": "next"
42
+ "commit": "5857b00008bc0926fd52fdc8d9366d6d52444e35",
43
+ "channel": "latest"
44
44
  }
45
45
  }