@bakers-build/addon-pi 0.6.1-next.5 → 0.6.1-next.7

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 SecurityOptions } from '@bakers-build/conductor/contract';
1
+ import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type BbAgent, type RunEnvPolicy, type SecurityOptions, type SecurityReport } from '@bakers-build/conductor/contract';
2
2
  export { parsePiTranscript } from './footprint.js';
3
3
  /**
4
4
  * The relative `--session-dir` pin — the single source of truth shared by
@@ -47,6 +47,7 @@ export declare class PiAgent implements BbAgent {
47
47
  private readonly home;
48
48
  readonly id = "pi";
49
49
  readonly runEnvPolicy: RunEnvPolicy;
50
+ readonly security: SecurityReport;
50
51
  private readonly args;
51
52
  private readonly model;
52
53
  private readonly provider;
package/dist/src/index.js CHANGED
@@ -103,13 +103,13 @@ const NO_SANDBOX_DEFAULTS = {
103
103
  * that sandboxes Pi's tools.
104
104
  */
105
105
  function piSecurity(options) {
106
- const { mode, config, runEnvPolicy } = resolveSecurityOptions({
106
+ const { mode, config, runEnvPolicy, report } = resolveSecurityOptions({
107
107
  ...options,
108
108
  security: (validateOptionalString(options.security, 'security') ??
109
109
  'system'),
110
110
  }, NO_SANDBOX_DEFAULTS);
111
111
  if (mode === 'system')
112
- return { extensions: undefined, runEnvPolicy };
112
+ return { extensions: undefined, runEnvPolicy, report };
113
113
  if (mode !== 'custom') {
114
114
  throw new Error(`Pi does not support security: '${mode}'; use 'system' or 'custom'`);
115
115
  }
@@ -121,12 +121,13 @@ function piSecurity(options) {
121
121
  extensions.some((e) => typeof e !== 'string' || e === '' || e.includes('\0'))) {
122
122
  throw new Error("Pi security: 'custom' needs config: { extensions: ['<path or builtin:name>', ...] } and nothing else");
123
123
  }
124
- return { extensions: [...extensions], runEnvPolicy };
124
+ return { extensions: [...extensions], runEnvPolicy, report };
125
125
  }
126
126
  export class PiAgent {
127
127
  home;
128
128
  id = 'pi';
129
129
  runEnvPolicy;
130
+ security;
130
131
  args;
131
132
  model;
132
133
  provider;
@@ -137,8 +138,11 @@ export class PiAgent {
137
138
  overrides;
138
139
  constructor(options = {}, home = homedir()) {
139
140
  this.home = home;
140
- ({ extensions: this.extensions, runEnvPolicy: this.runEnvPolicy } =
141
- piSecurity(options));
141
+ ({
142
+ extensions: this.extensions,
143
+ runEnvPolicy: this.runEnvPolicy,
144
+ report: this.security,
145
+ } = piSecurity(options));
142
146
  const cli = resolveAgentCliOptions(options, PI_RESERVED, PI_KNOWN);
143
147
  this.args = cli.args;
144
148
  this.model = cli.model;
@@ -217,6 +221,7 @@ export function piAgent(options = {}) {
217
221
  kind: 'agent',
218
222
  id: 'pi',
219
223
  requiredModules: [],
224
+ security: agent.security,
220
225
  async createAgent() {
221
226
  return agent;
222
227
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-pi",
3
- "version": "0.6.1-next.5",
3
+ "version": "0.6.1-next.7",
4
4
  "description": "bakers.build agent plugin for the pi coding CLI, with a real transcript footprint.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,11 +20,11 @@
20
20
  "directory": "bakers-cli/addons/pi"
21
21
  },
22
22
  "peerDependencies": {
23
- "@bakers-build/conductor": "^0.6.1-next.5",
24
- "@bakers-build/core": "^0.6.1-next.5"
23
+ "@bakers-build/conductor": "^0.6.1-next.7",
24
+ "@bakers-build/core": "^0.6.1-next.7"
25
25
  },
26
26
  "bakersBuild": {
27
- "commit": "314f28982940df736bea55293a81435d37864b31",
27
+ "commit": "b89398b187bf51f4f9ca5bfc1150469f73a879e6",
28
28
  "channel": "next"
29
29
  }
30
30
  }