@bakers-build/conductor 0.4.1-next.353 → 0.4.1-next.438

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.
@@ -15,7 +15,12 @@ export { findBbDir, resolveConfigPath, } from '@bakers-build/core';
15
15
  * ticket content into a single typed pane line overran the PTY canonical line
16
16
  * cap and truncated the dispatch command. Instead the prompt is a bounded,
17
17
  * constant-size pointer and the agent reads the ticket + all comments at run
18
- * start via `bakers dropsh read … --include comments`.
18
+ * start.
19
+ *
20
+ * That read goes through the bakers tool `bakers_ticket_read`, the same path
21
+ * every skill step uses, so the run does not read its ticket twice in two
22
+ * formats. The prompt names both transports because the agent has not loaded
23
+ * a skill yet; why the fallback must run alone lives in bb-workflow's tools.md.
19
24
  *
20
25
  * herdr no longer types this into the pane: the launch command goes to a file
21
26
  * that a short `sh '<file>'` line runs (BB-635), so its length is not bound
@@ -23,7 +23,12 @@ export { findBbDir, resolveConfigPath, } from '@bakers-build/core';
23
23
  * ticket content into a single typed pane line overran the PTY canonical line
24
24
  * cap and truncated the dispatch command. Instead the prompt is a bounded,
25
25
  * constant-size pointer and the agent reads the ticket + all comments at run
26
- * start via `bakers dropsh read … --include comments`.
26
+ * start.
27
+ *
28
+ * That read goes through the bakers tool `bakers_ticket_read`, the same path
29
+ * every skill step uses, so the run does not read its ticket twice in two
30
+ * formats. The prompt names both transports because the agent has not loaded
31
+ * a skill yet; why the fallback must run alone lives in bb-workflow's tools.md.
27
32
  *
28
33
  * herdr no longer types this into the pane: the launch command goes to a file
29
34
  * that a short `sh '<file>'` line runs (BB-635), so its length is not bound
@@ -49,8 +54,10 @@ export { findBbDir, resolveConfigPath, } from '@bakers-build/core';
49
54
  * only against the most literal readers.
50
55
  */
51
56
  export const DEFAULT_AGENT_PROMPT = `You are working ticket {identifier}, current state: {state}. Read the ticket and all comments ` +
52
- `(bakers dropsh --format md read bb_ticket/bb_ticket/{ticketUuid} --include comments, ` +
53
- `run as a Bash call of its own: chained to another command it stays sandboxed without its config), ` +
57
+ `with the bakers tool bakers_ticket_read, arguments {"ticket":"{ticketUuid}"} ` +
58
+ `(MCP: tool_api__bakers_ticket_read, without a connector: ` +
59
+ `bakers dropsh tool tool_api__bakers_ticket_read --data '{"ticket":"{ticketUuid}"}', ` +
60
+ `run as a Bash call of its own), ` +
54
61
  `then read ./WORKFLOW.md, load the bakers.build skill its loader names for this ticket's work type ` +
55
62
  `and state, and execute only that skill's {state} section. ` +
56
63
  `Do not start or prepare a later state. ` +
@@ -1,6 +1,6 @@
1
1
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { basename, dirname, join } from 'node:path';
3
- import { stemForConfigFile } from '@bakers-build/core';
3
+ import { shellQuote, stemForConfigFile, } from '@bakers-build/core';
4
4
  import { DEFAULT_ENV_DENY, matchesEnvDeny, } from '../plugins/agent.js';
5
5
  import { resolveAgent } from '../plugins/plugins.js';
6
6
  import { ActionQueue } from './action-queue.js';
@@ -1210,6 +1210,7 @@ export class Conductor {
1210
1210
  }, `${chosen.agent.id}/${alias}: ${warning}`);
1211
1211
  }
1212
1212
  }
1213
+ const command = chosen.agent.launchCommand(prompt, identity);
1213
1214
  await this.executor.startRun({
1214
1215
  ticket: {
1215
1216
  uuid: t.uuid,
@@ -1222,7 +1223,7 @@ export class Conductor {
1222
1223
  run: { uuid: run.runUuid, id: run.runId, handler: run.handler },
1223
1224
  workspacePath: ws.path,
1224
1225
  instructions: ws.instructions,
1225
- command: chosen.agent.launchCommand(prompt, identity),
1226
+ command,
1226
1227
  env,
1227
1228
  });
1228
1229
  launch.started = true;
@@ -1233,6 +1234,10 @@ export class Conductor {
1233
1234
  workspace: ws.path,
1234
1235
  // Key names only — env values may be sensitive (BB-99).
1235
1236
  envKeys: Object.keys(env),
1237
+ harness: chosen.agent.id,
1238
+ alias: chosen.alias ?? chosen.id,
1239
+ // The launch with its options; the prompt is long and in the ticket.
1240
+ launch: command.replace(shellQuote(prompt), "'<prompt>'"),
1236
1241
  }, 'dispatched run');
1237
1242
  // The conductor — not the agent — knows the per-run git worktree path, so
1238
1243
  // it persists `worktree_path` to bb_run here alongside the running state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/conductor",
3
- "version": "0.4.1-next.353",
3
+ "version": "0.4.1-next.438",
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,8 +32,8 @@
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.4.1-next.353",
36
- "@bakers-build/message": "^0.4.1-next.353",
35
+ "@bakers-build/core": "^0.4.1-next.438",
36
+ "@bakers-build/message": "^0.4.1-next.438",
37
37
  "commander": "^12.1.0",
38
38
  "dropsh": "^0.8.2"
39
39
  }