@getpaseo/protocol 0.3.1 → 0.4.0-beta.2
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/agent-labels.d.ts +3 -0
- package/dist/agent-labels.js +10 -0
- package/dist/agent-types.d.ts +8 -4
- package/dist/chat/rpc-schemas.js +1 -0
- package/dist/chat/types.js +1 -0
- package/dist/generated/validation/ws-outbound.aot.js +38413 -37756
- package/dist/loop/rpc-schemas.js +1 -0
- package/dist/messages.d.ts +997 -147
- package/dist/messages.js +213 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +142 -34
- package/package.json +1 -1
package/dist/agent-labels.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare const PARENT_AGENT_ID_LABEL = "paseo.parent-agent-id";
|
|
2
|
+
export declare function getOpenAgentTabLabel(clientId: string): string;
|
|
3
|
+
export declare function isOpenAgentTabLabel(label: string): boolean;
|
|
2
4
|
export interface AgentLabelSource {
|
|
3
5
|
labels?: Record<string, unknown> | null;
|
|
4
6
|
}
|
|
5
7
|
export declare function getParentAgentIdFromLabels(labels: Record<string, unknown> | null | undefined): string | null;
|
|
6
8
|
export declare function isDelegatedAgent(agent: AgentLabelSource): boolean;
|
|
9
|
+
export declare function hasOpenAgentTab(labels: Record<string, unknown> | null | undefined): boolean;
|
|
7
10
|
//# sourceMappingURL=agent-labels.d.ts.map
|
package/dist/agent-labels.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export const PARENT_AGENT_ID_LABEL = "paseo.parent-agent-id";
|
|
2
|
+
const OPEN_AGENT_TAB_LABEL_PREFIX = "paseo.open-agent-tab.";
|
|
3
|
+
export function getOpenAgentTabLabel(clientId) {
|
|
4
|
+
return `${OPEN_AGENT_TAB_LABEL_PREFIX}${clientId}`;
|
|
5
|
+
}
|
|
6
|
+
export function isOpenAgentTabLabel(label) {
|
|
7
|
+
return label.startsWith(OPEN_AGENT_TAB_LABEL_PREFIX);
|
|
8
|
+
}
|
|
2
9
|
export function getParentAgentIdFromLabels(labels) {
|
|
3
10
|
const parentAgentId = labels?.[PARENT_AGENT_ID_LABEL];
|
|
4
11
|
return typeof parentAgentId === "string" && parentAgentId.trim().length > 0
|
|
@@ -8,4 +15,7 @@ export function getParentAgentIdFromLabels(labels) {
|
|
|
8
15
|
export function isDelegatedAgent(agent) {
|
|
9
16
|
return getParentAgentIdFromLabels(agent.labels) !== null;
|
|
10
17
|
}
|
|
18
|
+
export function hasOpenAgentTab(labels) {
|
|
19
|
+
return Object.entries(labels ?? {}).some(([label, value]) => isOpenAgentTabLabel(label) && value === "true");
|
|
20
|
+
}
|
|
11
21
|
//# sourceMappingURL=agent-labels.js.map
|
package/dist/agent-types.d.ts
CHANGED
|
@@ -284,6 +284,13 @@ export interface CompactionTimelineItem {
|
|
|
284
284
|
trigger?: "auto" | "manual";
|
|
285
285
|
preTokens?: number;
|
|
286
286
|
}
|
|
287
|
+
export interface AgentTaskItem {
|
|
288
|
+
text: string;
|
|
289
|
+
completed: boolean;
|
|
290
|
+
id?: string;
|
|
291
|
+
status?: "pending" | "in_progress" | "completed";
|
|
292
|
+
activeForm?: string;
|
|
293
|
+
}
|
|
287
294
|
export type AgentTimelineItem = {
|
|
288
295
|
type: "user_message";
|
|
289
296
|
text: string;
|
|
@@ -298,10 +305,7 @@ export type AgentTimelineItem = {
|
|
|
298
305
|
text: string;
|
|
299
306
|
} | ToolCallTimelineItem | {
|
|
300
307
|
type: "todo";
|
|
301
|
-
items:
|
|
302
|
-
text: string;
|
|
303
|
-
completed: boolean;
|
|
304
|
-
}[];
|
|
308
|
+
items: AgentTaskItem[];
|
|
305
309
|
} | {
|
|
306
310
|
type: "error";
|
|
307
311
|
message: string;
|
package/dist/chat/rpc-schemas.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ChatMessageSchema, ChatRoomDetailSchema } from "./types.js";
|
|
3
|
+
// COMPAT(chatRooms): retained after the v0.3.0 feature removal; remove after 2027-02-09 when mixed-version peers no longer send legacy messages.
|
|
3
4
|
export const ChatCreateRequestSchema = z.object({
|
|
4
5
|
type: z.literal("chat/create"),
|
|
5
6
|
requestId: z.string(),
|
package/dist/chat/types.js
CHANGED