paseo-acp-agy 1.1.6 → 1.1.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.
|
@@ -260,6 +260,7 @@ export class AntigravityProcess extends EventEmitter {
|
|
|
260
260
|
dangerouslySkipPermissions: this.permissions.dangerouslySkipPermissions,
|
|
261
261
|
mode: this.mode,
|
|
262
262
|
addDirs,
|
|
263
|
+
printTimeout: this.permissions.printTimeout,
|
|
263
264
|
}, extraArgs);
|
|
264
265
|
logger.info("Spawning agy process", {
|
|
265
266
|
binary: this.binaryPath,
|
package/dist/permissions.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ export interface PermissionSettings {
|
|
|
3
3
|
dangerouslySkipPermissions: boolean;
|
|
4
4
|
mode?: string;
|
|
5
5
|
addDirs?: string[];
|
|
6
|
+
printTimeout?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare function resolvePermissionSettings(options?: {
|
|
8
9
|
sandbox?: boolean;
|
|
9
10
|
dangerouslySkipPermissions?: boolean;
|
|
10
11
|
mode?: string;
|
|
11
12
|
addDirs?: string[];
|
|
13
|
+
printTimeout?: string;
|
|
12
14
|
}): PermissionSettings;
|
|
13
15
|
export declare function buildAgyArgs(settings: PermissionSettings, extraArgs?: string[]): string[];
|
package/dist/permissions.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export function resolvePermissionSettings(options) {
|
|
3
3
|
const envSandbox = process.env.AGY_ACP_SANDBOX;
|
|
4
4
|
const envSkipPerms = process.env.AGY_ACP_DANGEROUSLY_SKIP_PERMISSIONS;
|
|
5
|
+
const envPrintTimeout = process.env.AGY_ACP_PRINT_TIMEOUT;
|
|
5
6
|
const sandbox = options?.sandbox ?? (envSandbox === "true" || envSandbox === "1");
|
|
6
7
|
// In ACP mode, permissions and tool approvals are governed by the host application (e.g. Paseo).
|
|
7
8
|
// Because agy runs non-interactively over stream-json pipes without an interactive TTY, agy's
|
|
@@ -9,15 +10,21 @@ export function resolvePermissionSettings(options) {
|
|
|
9
10
|
// Therefore, dangerouslySkipPermissions defaults to true unless explicitly disabled.
|
|
10
11
|
const dangerouslySkipPermissions = options?.dangerouslySkipPermissions ??
|
|
11
12
|
(envSkipPerms !== undefined ? envSkipPerms === "true" || envSkipPerms === "1" : true);
|
|
13
|
+
// Default printTimeout to 24h (or env override) so that agy never terminates long turns prematurely
|
|
14
|
+
const printTimeout = options?.printTimeout ?? envPrintTimeout ?? "24h";
|
|
12
15
|
return {
|
|
13
16
|
sandbox,
|
|
14
17
|
dangerouslySkipPermissions,
|
|
15
18
|
mode: options?.mode,
|
|
16
19
|
addDirs: options?.addDirs,
|
|
20
|
+
printTimeout,
|
|
17
21
|
};
|
|
18
22
|
}
|
|
19
23
|
export function buildAgyArgs(settings, extraArgs) {
|
|
20
24
|
const args = ["--input-format", "stream-json", "--output-format", "stream-json", "--print="];
|
|
25
|
+
if (settings.printTimeout) {
|
|
26
|
+
args.push("--print-timeout", settings.printTimeout);
|
|
27
|
+
}
|
|
21
28
|
if (settings.sandbox) {
|
|
22
29
|
args.push("--sandbox");
|
|
23
30
|
}
|