@getpaseo/server 0.1.97-beta.3 → 0.1.97
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/server/server/agent/agent-manager.js +1 -1
- package/dist/server/server/agent/agent-response-loop.js +9 -3
- package/dist/server/server/agent/agent-storage.d.ts +20 -240
- package/dist/server/server/agent/agent-storage.js +6 -6
- package/dist/server/server/agent/mcp-server.js +9 -4
- package/dist/server/server/agent/mcp-shared.d.ts +35 -179
- package/dist/server/server/agent/providers/claude/project-dir.js +9 -6
- package/dist/server/server/agent/providers/claude/task-notification-tool-call.d.ts +2 -22
- package/dist/server/server/agent/providers/codex/app-server-transport.d.ts +8 -118
- package/dist/server/server/agent/providers/generic-acp-agent.d.ts +1 -5
- package/dist/server/server/agent/providers/pi/agent.d.ts +1 -5
- package/dist/server/server/agent/providers/tool-call-detail-primitives.d.ts +391 -1261
- package/dist/server/server/agent/providers/tool-call-detail-primitives.js +26 -16
- package/dist/server/server/loop-service.d.ts +60 -359
- package/dist/server/server/migrations/backfill-workspace-id.migration.js +10 -6
- package/dist/server/server/package-version.d.ts +1 -7
- package/dist/server/server/paseo-worktree-service.js +15 -1
- package/dist/server/server/persisted-config.d.ts +138 -1009
- package/dist/server/server/persisted-config.js +1 -1
- package/dist/server/server/pid-lock.d.ts +1 -15
- package/dist/server/server/session.d.ts +6 -0
- package/dist/server/server/session.js +195 -25
- package/dist/server/server/speech/providers/local/sherpa/model-catalog.d.ts +2 -2
- package/dist/server/server/speech/speech-types.d.ts +9 -11
- package/dist/server/server/websocket-server.js +4 -0
- package/dist/server/server/workspace-registry.d.ts +17 -48
- package/dist/server/server/workspace-registry.js +9 -0
- package/dist/server/terminal/terminal-session-controller.d.ts +8 -0
- package/dist/server/terminal/terminal-session-controller.js +23 -3
- package/dist/server/utils/checkout-git.js +36 -76
- package/dist/server/utils/worktree-metadata.d.ts +7 -59
- package/dist/src/server/persisted-config.js +1 -1
- package/package.json +9 -9
|
@@ -6,26 +6,20 @@ import type { AgentStorage } from "./agent-storage.js";
|
|
|
6
6
|
import { StoredScheduleSchema } from "@getpaseo/protocol/schedule/types";
|
|
7
7
|
import type { AgentProvider } from "./agent-sdk-types.js";
|
|
8
8
|
export declare const AgentProviderEnum: z.ZodString;
|
|
9
|
-
export declare const AgentStatusEnum: z.ZodEnum<
|
|
9
|
+
export declare const AgentStatusEnum: z.ZodEnum<{
|
|
10
|
+
error: "error";
|
|
11
|
+
idle: "idle";
|
|
12
|
+
running: "running";
|
|
13
|
+
initializing: "initializing";
|
|
14
|
+
closed: "closed";
|
|
15
|
+
}>;
|
|
10
16
|
export declare const ProviderModeSchema: z.ZodObject<{
|
|
11
17
|
id: z.ZodString;
|
|
12
18
|
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
19
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
20
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
21
|
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
-
},
|
|
17
|
-
id: z.ZodString;
|
|
18
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
23
|
-
id: z.ZodString;
|
|
24
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
22
|
+
}, z.core.$loose>;
|
|
29
23
|
export declare const ProviderSummarySchema: z.ZodObject<{
|
|
30
24
|
id: z.ZodString;
|
|
31
25
|
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -37,87 +31,15 @@ export declare const ProviderSummarySchema: z.ZodObject<{
|
|
|
37
31
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
32
|
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
33
|
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
47
|
-
id: z.ZodString;
|
|
48
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
53
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
54
|
-
id: z.ZodString;
|
|
55
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
-
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
-
modes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
59
|
-
id: z.ZodString;
|
|
60
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
65
|
-
id: z.ZodString;
|
|
66
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
71
|
-
id: z.ZodString;
|
|
72
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
77
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
78
|
-
id: z.ZodString;
|
|
79
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
-
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
82
|
-
modes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
83
|
-
id: z.ZodString;
|
|
84
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
89
|
-
id: z.ZodString;
|
|
90
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
95
|
-
id: z.ZodString;
|
|
96
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
-
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
-
colorTier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
101
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
34
|
+
}, z.core.$loose>>>>;
|
|
35
|
+
}, z.core.$loose>;
|
|
102
36
|
export declare const AgentSelectOptionSchema: z.ZodObject<{
|
|
103
37
|
id: z.ZodString;
|
|
104
38
|
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
39
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
40
|
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
107
41
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
108
|
-
},
|
|
109
|
-
id: z.ZodString;
|
|
110
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
113
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
114
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
115
|
-
id: z.ZodString;
|
|
116
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
119
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
120
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
42
|
+
}, z.core.$loose>;
|
|
121
43
|
export declare const AgentModelSchema: z.ZodObject<{
|
|
122
44
|
provider: z.ZodString;
|
|
123
45
|
id: z.ZodString;
|
|
@@ -131,75 +53,9 @@ export declare const AgentModelSchema: z.ZodObject<{
|
|
|
131
53
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
54
|
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
133
55
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
134
|
-
},
|
|
135
|
-
id: z.ZodString;
|
|
136
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
137
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
139
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
140
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
141
|
-
id: z.ZodString;
|
|
142
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
145
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
146
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
56
|
+
}, z.core.$loose>>>>;
|
|
147
57
|
defaultThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
-
},
|
|
149
|
-
provider: z.ZodString;
|
|
150
|
-
id: z.ZodString;
|
|
151
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
153
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
154
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
155
|
-
thinkingOptions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
156
|
-
id: z.ZodString;
|
|
157
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
160
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
161
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
162
|
-
id: z.ZodString;
|
|
163
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
166
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
167
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
168
|
-
id: z.ZodString;
|
|
169
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
171
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
172
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
173
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
174
|
-
defaultThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
176
|
-
provider: z.ZodString;
|
|
177
|
-
id: z.ZodString;
|
|
178
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
181
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
182
|
-
thinkingOptions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
183
|
-
id: z.ZodString;
|
|
184
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
187
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
188
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
189
|
-
id: z.ZodString;
|
|
190
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
191
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
193
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
194
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
195
|
-
id: z.ZodString;
|
|
196
|
-
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
|
-
isDefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
199
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
200
|
-
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
201
|
-
defaultThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
202
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
58
|
+
}, z.core.$loose>;
|
|
203
59
|
export declare const AGENT_WAIT_TIMEOUT_MS = 30000;
|
|
204
60
|
export interface ResolvedProviderModel {
|
|
205
61
|
provider: AgentProvider;
|
|
@@ -220,64 +76,61 @@ export declare function sanitizePermissionRequest(permission: null | undefined):
|
|
|
220
76
|
export declare function sanitizePermissionRequest(permission: AgentPermissionRequest | null | undefined): AgentPermissionRequest | null;
|
|
221
77
|
export declare function resolveAgentTitle(agentStorage: AgentStorage, agentId: string, logger: Logger): Promise<string | null>;
|
|
222
78
|
export declare function serializeSnapshotWithMetadata(agentStorage: AgentStorage, snapshot: ManagedAgent, logger: Logger): Promise<{
|
|
223
|
-
title: string | null;
|
|
224
|
-
status: "error" | "initializing" | "idle" | "running" | "closed";
|
|
225
|
-
cwd: string;
|
|
226
79
|
id: string;
|
|
227
|
-
createdAt: string;
|
|
228
|
-
updatedAt: string;
|
|
229
80
|
provider: string;
|
|
81
|
+
cwd: string;
|
|
230
82
|
model: string | null;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
231
85
|
lastUserMessageAt: string | null;
|
|
86
|
+
status: "error" | "idle" | "running" | "initializing" | "closed";
|
|
232
87
|
capabilities: import("@getpaseo/protocol/agent-types").AgentCapabilityFlags;
|
|
233
88
|
currentModeId: string | null;
|
|
234
89
|
availableModes: import("@getpaseo/protocol/agent-types").AgentMode[];
|
|
235
90
|
pendingPermissions: import("@getpaseo/protocol/agent-types").AgentPermissionRequest[];
|
|
236
91
|
persistence: import("@getpaseo/protocol/agent-types").AgentPersistenceHandle | null;
|
|
92
|
+
title: string | null;
|
|
237
93
|
labels: Record<string, string>;
|
|
238
|
-
attentionReason?: "finished" | "error" | "permission" | null | undefined;
|
|
239
|
-
thinkingOptionId?: string | null | undefined;
|
|
240
94
|
workspaceId?: string | undefined;
|
|
241
95
|
features?: ({
|
|
242
|
-
value: boolean;
|
|
243
96
|
type: "toggle";
|
|
244
97
|
id: string;
|
|
245
98
|
label: string;
|
|
99
|
+
value: boolean;
|
|
246
100
|
description?: string | undefined;
|
|
247
|
-
icon?: string | undefined;
|
|
248
101
|
tooltip?: string | undefined;
|
|
102
|
+
icon?: string | undefined;
|
|
249
103
|
} | {
|
|
104
|
+
type: "select";
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
250
107
|
value: string | null;
|
|
251
108
|
options: {
|
|
252
109
|
id: string;
|
|
253
110
|
label: string;
|
|
254
111
|
description?: string | undefined;
|
|
255
|
-
metadata?: Record<string, unknown> | undefined;
|
|
256
112
|
isDefault?: boolean | undefined;
|
|
113
|
+
metadata?: Record<string, unknown> | undefined;
|
|
257
114
|
}[];
|
|
258
|
-
type: "select";
|
|
259
|
-
id: string;
|
|
260
|
-
label: string;
|
|
261
115
|
description?: string | undefined;
|
|
262
|
-
icon?: string | undefined;
|
|
263
116
|
tooltip?: string | undefined;
|
|
117
|
+
icon?: string | undefined;
|
|
264
118
|
})[] | undefined;
|
|
119
|
+
thinkingOptionId?: string | null | undefined;
|
|
265
120
|
effectiveThinkingOptionId?: string | null | undefined;
|
|
266
121
|
runtimeInfo?: import("@getpaseo/protocol/agent-types").AgentRuntimeInfo | undefined;
|
|
267
122
|
lastUsage?: import("@getpaseo/protocol/agent-types").AgentUsage | undefined;
|
|
268
123
|
lastError?: string | undefined;
|
|
269
124
|
requiresAttention?: boolean | undefined;
|
|
125
|
+
attentionReason?: "finished" | "error" | "permission" | null | undefined;
|
|
270
126
|
attentionTimestamp?: string | null | undefined;
|
|
271
127
|
archivedAt?: string | null | undefined;
|
|
272
128
|
providerUnavailable?: boolean | undefined;
|
|
273
129
|
}>;
|
|
274
130
|
export declare function parseDurationString(input: string): number;
|
|
275
131
|
export declare function toScheduleSummary(schedule: z.infer<typeof StoredScheduleSchema>): {
|
|
276
|
-
name: string | null;
|
|
277
|
-
status: "completed" | "active" | "paused";
|
|
278
132
|
id: string;
|
|
279
|
-
|
|
280
|
-
updatedAt: string;
|
|
133
|
+
name: string | null;
|
|
281
134
|
prompt: string;
|
|
282
135
|
cadence: {
|
|
283
136
|
type: "every";
|
|
@@ -288,30 +141,33 @@ export declare function toScheduleSummary(schedule: z.infer<typeof StoredSchedul
|
|
|
288
141
|
timezone?: string | undefined;
|
|
289
142
|
};
|
|
290
143
|
target: {
|
|
291
|
-
agentId: string;
|
|
292
144
|
type: "agent";
|
|
145
|
+
agentId: string;
|
|
293
146
|
} | {
|
|
294
147
|
type: "new-agent";
|
|
295
148
|
config: {
|
|
296
|
-
cwd: string;
|
|
297
149
|
provider: string;
|
|
298
|
-
|
|
150
|
+
cwd: string;
|
|
299
151
|
modeId?: string | undefined;
|
|
300
152
|
model?: string | undefined;
|
|
301
153
|
thinkingOptionId?: string | undefined;
|
|
154
|
+
title?: string | null | undefined;
|
|
302
155
|
approvalPolicy?: string | undefined;
|
|
303
156
|
sandboxMode?: string | undefined;
|
|
304
157
|
networkAccess?: boolean | undefined;
|
|
305
158
|
webSearch?: boolean | undefined;
|
|
306
159
|
featureValues?: Record<string, unknown> | undefined;
|
|
307
160
|
extra?: {
|
|
308
|
-
claude?: Record<string, unknown> | undefined;
|
|
309
161
|
codex?: Record<string, unknown> | undefined;
|
|
162
|
+
claude?: Record<string, unknown> | undefined;
|
|
310
163
|
} | undefined;
|
|
311
164
|
systemPrompt?: string | undefined;
|
|
312
165
|
mcpServers?: Record<string, unknown> | undefined;
|
|
313
166
|
};
|
|
314
167
|
};
|
|
168
|
+
status: "completed" | "active" | "paused";
|
|
169
|
+
createdAt: string;
|
|
170
|
+
updatedAt: string;
|
|
315
171
|
nextRunAt: string | null;
|
|
316
172
|
lastRunAt: string | null;
|
|
317
173
|
pausedAt: string | null;
|
|
@@ -5,8 +5,8 @@ import { join } from "node:path";
|
|
|
5
5
|
// Verbatim port of the Claude Agent SDK's project-directory encoding so
|
|
6
6
|
// paseo computes the same `~/.claude/projects/<dir>` path the SDK does.
|
|
7
7
|
// The SDK ships only as a precompiled bundle; grep the JS source at
|
|
8
|
-
// node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs for `function
|
|
9
|
-
// `function
|
|
8
|
+
// node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs for `function Ar`,
|
|
9
|
+
// `function So`, `async function wn`, `function Dy`, `Ni=200`.
|
|
10
10
|
const PROJECT_DIR_LENGTH_CAP = 200;
|
|
11
11
|
export async function claudeProjectDir(cwd, options) {
|
|
12
12
|
const canonical = await canonicalize(cwd);
|
|
@@ -20,20 +20,23 @@ export function claudeProjectDirSync(cwd, options) {
|
|
|
20
20
|
}
|
|
21
21
|
async function canonicalize(input) {
|
|
22
22
|
try {
|
|
23
|
-
return (await realpath(input))
|
|
23
|
+
return normalizeProjectPath(await realpath(input));
|
|
24
24
|
}
|
|
25
25
|
catch {
|
|
26
|
-
return input
|
|
26
|
+
return normalizeProjectPath(input);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
function canonicalizeSync(input) {
|
|
30
30
|
try {
|
|
31
|
-
return realpathSync.native(input)
|
|
31
|
+
return normalizeProjectPath(realpathSync.native(input));
|
|
32
32
|
}
|
|
33
33
|
catch {
|
|
34
|
-
return input
|
|
34
|
+
return normalizeProjectPath(input);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
function normalizeProjectPath(input) {
|
|
38
|
+
return process.platform === "darwin" ? input.normalize("NFC") : input;
|
|
39
|
+
}
|
|
37
40
|
function encode(input) {
|
|
38
41
|
const replaced = input.replace(/[^a-zA-Z0-9]/g, "-");
|
|
39
42
|
if (replaced.length <= PROJECT_DIR_LENGTH_CAP) {
|
|
@@ -7,31 +7,11 @@ declare const TaskNotificationEnvelopeSchema: z.ZodObject<{
|
|
|
7
7
|
summary: z.ZodNullable<z.ZodString>;
|
|
8
8
|
outputFile: z.ZodNullable<z.ZodString>;
|
|
9
9
|
rawText: z.ZodNullable<z.ZodString>;
|
|
10
|
-
},
|
|
11
|
-
status: string | null;
|
|
12
|
-
messageId: string | null;
|
|
13
|
-
summary: string | null;
|
|
14
|
-
taskId: string | null;
|
|
15
|
-
outputFile: string | null;
|
|
16
|
-
rawText: string | null;
|
|
17
|
-
}, {
|
|
18
|
-
status: string | null;
|
|
19
|
-
messageId: string | null;
|
|
20
|
-
summary: string | null;
|
|
21
|
-
taskId: string | null;
|
|
22
|
-
outputFile: string | null;
|
|
23
|
-
rawText: string | null;
|
|
24
|
-
}>;
|
|
10
|
+
}, z.core.$strip>;
|
|
25
11
|
declare const MapTaskNotificationUserContentToToolCallInputSchema: z.ZodObject<{
|
|
26
12
|
content: z.ZodUnknown;
|
|
27
13
|
messageId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
28
|
-
},
|
|
29
|
-
content?: unknown;
|
|
30
|
-
messageId?: string | null | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
content?: unknown;
|
|
33
|
-
messageId?: string | null | undefined;
|
|
34
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
35
15
|
export type TaskNotificationEnvelope = z.infer<typeof TaskNotificationEnvelopeSchema>;
|
|
36
16
|
export type MapTaskNotificationUserContentToToolCallInput = z.infer<typeof MapTaskNotificationUserContentToToolCallInputSchema>;
|
|
37
17
|
export interface TaskNotificationSystemMessageLike {
|
|
@@ -28,86 +28,20 @@ declare const CodexThreadForkResponseSchema: z.ZodObject<{
|
|
|
28
28
|
id: z.ZodString;
|
|
29
29
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
30
30
|
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
32
|
-
},
|
|
33
|
-
id: z.ZodString;
|
|
34
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
35
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
37
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
40
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
42
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
43
|
-
model: z.ZodString;
|
|
44
|
-
modelProvider: z.ZodString;
|
|
45
|
-
serviceTier: z.ZodNullable<z.ZodString>;
|
|
46
|
-
cwd: z.ZodString;
|
|
47
|
-
runtimeWorkspaceRoots: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
48
|
-
instructionSources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
49
|
-
approvalPolicy: z.ZodUnknown;
|
|
50
|
-
approvalsReviewer: z.ZodUnknown;
|
|
51
|
-
sandbox: z.ZodUnknown;
|
|
52
|
-
activePermissionProfile: z.ZodOptional<z.ZodUnknown>;
|
|
53
|
-
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
55
|
-
thread: z.ZodObject<{
|
|
56
|
-
id: z.ZodString;
|
|
57
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
58
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
60
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
61
|
-
id: z.ZodString;
|
|
62
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
63
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
65
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
66
|
-
id: z.ZodString;
|
|
67
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
68
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
70
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
71
|
-
model: z.ZodString;
|
|
72
|
-
modelProvider: z.ZodString;
|
|
73
|
-
serviceTier: z.ZodNullable<z.ZodString>;
|
|
74
|
-
cwd: z.ZodString;
|
|
75
|
-
runtimeWorkspaceRoots: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
76
|
-
instructionSources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
77
|
-
approvalPolicy: z.ZodUnknown;
|
|
78
|
-
approvalsReviewer: z.ZodUnknown;
|
|
79
|
-
sandbox: z.ZodUnknown;
|
|
80
|
-
activePermissionProfile: z.ZodOptional<z.ZodUnknown>;
|
|
81
|
-
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
83
|
-
thread: z.ZodObject<{
|
|
84
|
-
id: z.ZodString;
|
|
85
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
86
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
88
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
89
|
-
id: z.ZodString;
|
|
90
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
91
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
93
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
94
|
-
id: z.ZodString;
|
|
95
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
96
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
98
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
31
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
32
|
+
}, z.core.$loose>;
|
|
99
33
|
model: z.ZodString;
|
|
100
34
|
modelProvider: z.ZodString;
|
|
101
35
|
serviceTier: z.ZodNullable<z.ZodString>;
|
|
102
36
|
cwd: z.ZodString;
|
|
103
|
-
runtimeWorkspaceRoots: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString
|
|
104
|
-
instructionSources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString
|
|
37
|
+
runtimeWorkspaceRoots: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
38
|
+
instructionSources: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
105
39
|
approvalPolicy: z.ZodUnknown;
|
|
106
40
|
approvalsReviewer: z.ZodUnknown;
|
|
107
41
|
sandbox: z.ZodUnknown;
|
|
108
42
|
activePermissionProfile: z.ZodOptional<z.ZodUnknown>;
|
|
109
43
|
reasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
-
}, z.
|
|
44
|
+
}, z.core.$loose>;
|
|
111
45
|
export type CodexThreadForkResponse = z.infer<typeof CodexThreadForkResponseSchema>;
|
|
112
46
|
export declare function parseCodexThreadForkResponse(response: unknown): CodexThreadForkResponse;
|
|
113
47
|
export interface CodexThreadRollbackParams {
|
|
@@ -119,53 +53,9 @@ declare const CodexThreadRollbackResponseSchema: z.ZodObject<{
|
|
|
119
53
|
id: z.ZodString;
|
|
120
54
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
121
55
|
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
126
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
128
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
129
|
-
id: z.ZodString;
|
|
130
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
131
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
133
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
134
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
135
|
-
thread: z.ZodObject<{
|
|
136
|
-
id: z.ZodString;
|
|
137
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
138
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
140
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
141
|
-
id: z.ZodString;
|
|
142
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
143
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
145
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
146
|
-
id: z.ZodString;
|
|
147
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
148
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
150
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
151
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
152
|
-
thread: z.ZodObject<{
|
|
153
|
-
id: z.ZodString;
|
|
154
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
155
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
157
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
158
|
-
id: z.ZodString;
|
|
159
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
160
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
162
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
163
|
-
id: z.ZodString;
|
|
164
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
165
|
-
forkedFromId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
|
-
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
167
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
168
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
56
|
+
turns: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
57
|
+
}, z.core.$loose>;
|
|
58
|
+
}, z.core.$loose>;
|
|
169
59
|
export type CodexThreadRollbackResponse = z.infer<typeof CodexThreadRollbackResponseSchema>;
|
|
170
60
|
export declare function parseCodexThreadRollbackResponse(response: unknown): CodexThreadRollbackResponse;
|
|
171
61
|
export interface CodexAppServerTraceContext {
|
|
@@ -3,11 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
import { ACPAgentClient } from "./acp-agent.js";
|
|
4
4
|
export declare const GenericACPProviderParamsSchema: z.ZodObject<{
|
|
5
5
|
supportsMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
-
},
|
|
7
|
-
supportsMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
9
|
-
supportsMcpServers: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
6
|
+
}, z.core.$loose>;
|
|
11
7
|
interface GenericACPAgentClientOptions {
|
|
12
8
|
logger: Logger;
|
|
13
9
|
command: [string, ...string[]];
|
|
@@ -6,11 +6,7 @@ import type { PiRuntime, PiRuntimeSession } from "./runtime.js";
|
|
|
6
6
|
import type { PiSessionState } from "./rpc-types.js";
|
|
7
7
|
export declare const PiProviderParamsSchema: z.ZodObject<{
|
|
8
8
|
sessionDir: z.ZodOptional<z.ZodString>;
|
|
9
|
-
},
|
|
10
|
-
sessionDir?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
sessionDir?: string | undefined;
|
|
13
|
-
}>;
|
|
9
|
+
}, z.core.$strict>;
|
|
14
10
|
interface PiRpcAgentClientOptions {
|
|
15
11
|
logger: Logger;
|
|
16
12
|
runtimeSettings?: ProviderRuntimeSettings;
|