@bakers-build/addon-claude 0.6.1-next.5 → 0.6.1-next.6

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.
@@ -1,4 +1,4 @@
1
- import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type BbAgent, type RunEnvPolicy, type SandboxHost, type SandboxPreflight, type SecurityOptions } from '@bakers-build/conductor/contract';
1
+ import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type BbAgent, type ResolvedSecurity, type RunEnvPolicy, type SandboxHost, type SandboxPreflight, type SecurityOptions } from '@bakers-build/conductor/contract';
2
2
  export { parseClaudeTranscript } from './footprint.js';
3
3
  /**
4
4
  * Encode an absolute cwd the way Claude Code names its per-project transcript
@@ -22,14 +22,17 @@ export declare class ClaudeAgent implements BbAgent {
22
22
  private readonly args;
23
23
  private readonly model;
24
24
  private readonly effort;
25
- private readonly security;
25
+ readonly security: ResolvedSecurity;
26
26
  /** The sandbox's own MCP servers, strict; undefined outside the sandbox. */
27
27
  private readonly sandboxMcpServers;
28
28
  private readonly securityMode;
29
29
  readonly runEnvPolicy: RunEnvPolicy;
30
+ /** Set by the last launch: the conductor's server replaced the sandbox's own `bakers`. */
31
+ private replacedBakersServer;
30
32
  private readonly measure;
31
33
  private readonly overrides;
32
34
  constructor(options?: ClaudeAgentOptions, home?: string);
35
+ get launchWarnings(): readonly string[];
33
36
  /** A measured run stays without the conductor's tools, MCP or bridge. */
34
37
  get withoutConductorTools(): boolean;
35
38
  launchCommand(prompt: string, run?: AgentRunIdentity, workspacePath?: string, tools?: {
package/dist/src/index.js CHANGED
@@ -58,7 +58,13 @@ function securityFlags({ mode, sandbox, config }, workspacePath) {
58
58
  // Bash command is either sandboxed or a trusted command, and the Read
59
59
  // deny covers the Read tool, which the OS sandbox does not confine.
60
60
  permissions: {
61
- allow: ['Bash', 'Edit(./**)', 'AskUserQuestion'],
61
+ // The conductor's server binds every call to this run's worktree and project.
62
+ allow: [
63
+ 'Bash',
64
+ 'Edit(./**)',
65
+ 'AskUserQuestion',
66
+ `mcp__${CONDUCTOR_TOOLS_SERVER}`,
67
+ ],
62
68
  // Claude reads a single leading `/` as relative to the settings file;
63
69
  // the plain rule covers a file entry, `/**` a directory's contents.
64
70
  deny: sandbox.deny_read.flatMap((path) => {
@@ -108,6 +114,8 @@ export class ClaudeAgent {
108
114
  sandboxMcpServers;
109
115
  securityMode;
110
116
  runEnvPolicy;
117
+ /** Set by the last launch: the conductor's server replaced the sandbox's own `bakers`. */
118
+ replacedBakersServer = false;
111
119
  measure;
112
120
  overrides;
113
121
  constructor(options = {}, home = homedir()) {
@@ -131,6 +139,13 @@ export class ClaudeAgent {
131
139
  this.runEnvPolicy = security.runEnvPolicy;
132
140
  this.measure = validateOptionalBoolean(options.measure, 'measure') ?? false;
133
141
  }
142
+ get launchWarnings() {
143
+ return this.replacedBakersServer
144
+ ? [
145
+ `sandbox.mcp_servers.${CONDUCTOR_TOOLS_SERVER} is replaced by the conductor's ${CONDUCTOR_TOOLS_SERVER} server`,
146
+ ]
147
+ : [];
148
+ }
134
149
  /** A measured run stays without the conductor's tools, MCP or bridge. */
135
150
  get withoutConductorTools() {
136
151
  return this.measure;
@@ -191,6 +206,9 @@ export class ClaudeAgent {
191
206
  },
192
207
  }
193
208
  : {};
209
+ this.replacedBakersServer =
210
+ CONDUCTOR_TOOLS_SERVER in conductor &&
211
+ Object.hasOwn(this.sandboxMcpServers ?? {}, CONDUCTOR_TOOLS_SERVER);
194
212
  const config = (servers) => JSON.stringify({ mcpServers: servers });
195
213
  if (this.sandboxMcpServers !== undefined)
196
214
  return [
@@ -355,6 +373,7 @@ export function claudeAgent(options = {}) {
355
373
  kind: 'agent',
356
374
  id: 'claude',
357
375
  requiredModules: [],
376
+ security: agent.security.report,
358
377
  async createAgent() {
359
378
  return agent;
360
379
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-claude",
3
- "version": "0.6.1-next.5",
3
+ "version": "0.6.1-next.6",
4
4
  "description": "bakers.build agent plugin for the Claude CLI.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -23,11 +23,11 @@
23
23
  "directory": "bakers-cli/addons/claude"
24
24
  },
25
25
  "peerDependencies": {
26
- "@bakers-build/conductor": "^0.6.1-next.5",
27
- "@bakers-build/core": "^0.6.1-next.5"
26
+ "@bakers-build/conductor": "^0.6.1-next.6",
27
+ "@bakers-build/core": "^0.6.1-next.6"
28
28
  },
29
29
  "bakersBuild": {
30
- "commit": "314f28982940df736bea55293a81435d37864b31",
30
+ "commit": "12b97ff4aa2422d69dab286141f3234609f32351",
31
31
  "channel": "next"
32
32
  }
33
33
  }