@bakers-build/addon-pi 0.7.1-next.5 → 0.7.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.
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +4 -5
- package/package.json +4 -4
package/dist/src/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare function piSessionDir(run?: AgentRunIdentity): string;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function encodePiHomeSessionSlug(cwd: string): string;
|
|
28
28
|
/**
|
|
29
|
-
* `
|
|
29
|
+
* `permissions` is `system` (default) or `custom`; `custom`'s `config` is
|
|
30
30
|
* `{ extensions: string[] }`, each passed as `-e`. Pi has no OS sandbox.
|
|
31
31
|
*/
|
|
32
32
|
export interface PiAgentOptions extends SecurityOptions {
|
package/dist/src/index.js
CHANGED
|
@@ -105,13 +105,12 @@ const NO_SANDBOX_DEFAULTS = {
|
|
|
105
105
|
function piSecurity(options) {
|
|
106
106
|
const { mode, config, runEnvPolicy, report } = resolveSecurityOptions({
|
|
107
107
|
...options,
|
|
108
|
-
|
|
109
|
-
'system'),
|
|
108
|
+
permissions: (validateOptionalString(options.permissions, 'permissions') ?? 'system'),
|
|
110
109
|
}, NO_SANDBOX_DEFAULTS);
|
|
111
110
|
if (mode === 'system')
|
|
112
111
|
return { extensions: undefined, runEnvPolicy, report };
|
|
113
112
|
if (mode !== 'custom') {
|
|
114
|
-
throw new Error(`Pi does not support
|
|
113
|
+
throw new Error(`Pi does not support permissions: '${mode}'; use 'system' or 'custom'`);
|
|
115
114
|
}
|
|
116
115
|
const keys = Object.keys(config ?? {});
|
|
117
116
|
const extensions = config?.extensions;
|
|
@@ -119,7 +118,7 @@ function piSecurity(options) {
|
|
|
119
118
|
!Array.isArray(extensions) ||
|
|
120
119
|
extensions.length === 0 ||
|
|
121
120
|
extensions.some((e) => typeof e !== 'string' || e === '' || e.includes('\0'))) {
|
|
122
|
-
throw new Error("Pi
|
|
121
|
+
throw new Error("Pi permissions: 'custom' needs config: { extensions: ['<path or builtin:name>', ...] } and nothing else");
|
|
123
122
|
}
|
|
124
123
|
return { extensions: [...extensions], runEnvPolicy, report };
|
|
125
124
|
}
|
|
@@ -221,7 +220,7 @@ export function piAgent(options = {}) {
|
|
|
221
220
|
kind: 'agent',
|
|
222
221
|
id: 'pi',
|
|
223
222
|
requiredModules: [],
|
|
224
|
-
|
|
223
|
+
permissions: agent.security,
|
|
225
224
|
async createAgent() {
|
|
226
225
|
return agent;
|
|
227
226
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-pi",
|
|
3
|
-
"version": "0.7.1-next.
|
|
3
|
+
"version": "0.7.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.7.1-next.
|
|
24
|
-
"@bakers-build/core": "^0.7.1-next.
|
|
23
|
+
"@bakers-build/conductor": "^0.7.1-next.7",
|
|
24
|
+
"@bakers-build/core": "^0.7.1-next.7"
|
|
25
25
|
},
|
|
26
26
|
"bakersBuild": {
|
|
27
|
-
"commit": "
|
|
27
|
+
"commit": "082d8c57436f78e751f5a9a26a4446cec42209ce",
|
|
28
28
|
"channel": "next"
|
|
29
29
|
}
|
|
30
30
|
}
|