@trim21/personal-pi-extensions 0.0.402 → 0.0.403
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/package.json +1 -1
- package/src/bwrap/runtime.ts +2 -7
- package/src/claude-code/shell.ts +1 -1
- package/src/opencode/bash.ts +4 -0
package/package.json
CHANGED
package/src/bwrap/runtime.ts
CHANGED
|
@@ -87,7 +87,7 @@ export interface BwrapExecutionRequest {
|
|
|
87
87
|
command: string;
|
|
88
88
|
timeout?: number;
|
|
89
89
|
requestFullAccess?: boolean;
|
|
90
|
-
|
|
90
|
+
description?: string;
|
|
91
91
|
/** 解析后的实际执行目录;缺省时与 ctx.cwd 相同。ctx.cwd 始终是 session 工作区。 */
|
|
92
92
|
cwd?: string;
|
|
93
93
|
signal?: AbortSignal;
|
|
@@ -354,12 +354,7 @@ export class BwrapRuntime {
|
|
|
354
354
|
throw new Error(`Command denied by bwrap approval rule: ${request.command}`);
|
|
355
355
|
}
|
|
356
356
|
if (decision === undefined) {
|
|
357
|
-
await this.approveFullAccess(
|
|
358
|
-
request.ctx,
|
|
359
|
-
request.command,
|
|
360
|
-
request.requestFullAccessReason,
|
|
361
|
-
execCwd,
|
|
362
|
-
);
|
|
357
|
+
await this.approveFullAccess(request.ctx, request.command, request.description, execCwd);
|
|
363
358
|
}
|
|
364
359
|
}
|
|
365
360
|
const operations =
|
package/src/claude-code/shell.ts
CHANGED
|
@@ -127,7 +127,7 @@ export function registerShellTools(
|
|
|
127
127
|
command: params.command,
|
|
128
128
|
timeout: timeout / 1000,
|
|
129
129
|
requestFullAccess: params.dangerouslyDisableSandbox,
|
|
130
|
-
|
|
130
|
+
description: params.description,
|
|
131
131
|
signal,
|
|
132
132
|
onUpdate,
|
|
133
133
|
});
|
package/src/opencode/bash.ts
CHANGED
|
@@ -42,6 +42,9 @@ export default function opencodeBash(
|
|
|
42
42
|
parameters: Type.Object(
|
|
43
43
|
{
|
|
44
44
|
command: Type.String({ description: "The command to execute" }),
|
|
45
|
+
description: Type.Optional(
|
|
46
|
+
Type.String({ description: "Clear, concise description of the command" }),
|
|
47
|
+
),
|
|
45
48
|
workdir: Type.Optional(
|
|
46
49
|
Type.String({
|
|
47
50
|
description:
|
|
@@ -80,6 +83,7 @@ export default function opencodeBash(
|
|
|
80
83
|
command: params.command,
|
|
81
84
|
timeout: timeout / 1000,
|
|
82
85
|
requestFullAccess: params.dangerouslyDisableSandbox,
|
|
86
|
+
description: params.description,
|
|
83
87
|
signal,
|
|
84
88
|
onUpdate,
|
|
85
89
|
});
|