@camerontaylor/paseo-protocol 0.11.2-fork.2 → 0.12.0-beta.1.fork.1

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.
@@ -0,0 +1,8 @@
1
+ import type { AgentMessage } from "./agent-message.js";
2
+ import type { ToolCallDetail } from "./agent-types.js";
3
+ /** Presentation shared by clients; never used to encode provider prompts. */
4
+ export declare function buildAgentMessageDisplay(message: AgentMessage): {
5
+ displayName: string;
6
+ detail: ToolCallDetail;
7
+ };
8
+ //# sourceMappingURL=agent-message-display.d.ts.map
@@ -0,0 +1,20 @@
1
+ /** Presentation shared by clients; never used to encode provider prompts. */
2
+ export function buildAgentMessageDisplay(message) {
3
+ const sender = message.sender.title ?? message.sender.id;
4
+ const headings = {
5
+ message: `Message from ${sender}`,
6
+ finished: `${sender} finished`,
7
+ errored: `${sender} errored`,
8
+ "permission-required": `${sender} needs permission`,
9
+ closed: `${sender} closed`,
10
+ };
11
+ return {
12
+ displayName: headings[message.event],
13
+ detail: {
14
+ type: "plain_text",
15
+ icon: "bot",
16
+ text: `From agent: ${message.sender.id}\n\n${message.text}`,
17
+ },
18
+ };
19
+ }
20
+ //# sourceMappingURL=agent-message-display.js.map
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ /** Semantic provenance, independent of provider envelopes and timeline presentation. */
3
+ export declare const AgentMessageSchema: z.ZodObject<{
4
+ event: z.ZodEnum<{
5
+ finished: "finished";
6
+ closed: "closed";
7
+ message: "message";
8
+ errored: "errored";
9
+ "permission-required": "permission-required";
10
+ }>;
11
+ sender: z.ZodObject<{
12
+ id: z.ZodString;
13
+ title: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ text: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export type AgentMessage = z.infer<typeof AgentMessageSchema>;
18
+ //# sourceMappingURL=agent-message.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ /** Semantic provenance, independent of provider envelopes and timeline presentation. */
3
+ export const AgentMessageSchema = z.object({
4
+ event: z.enum(["message", "finished", "errored", "permission-required", "closed"]),
5
+ sender: z.object({
6
+ id: z.string().min(1),
7
+ title: z.string().min(1).optional(),
8
+ }),
9
+ text: z.string(),
10
+ });
11
+ //# sourceMappingURL=agent-message.js.map
@@ -1,3 +1,4 @@
1
+ import type { AgentMessage } from "./agent-message.js";
1
2
  import type { AgentAttachment } from "./messages.js";
2
3
  export type AgentProvider = string;
3
4
  export type AgentArtifactKind = "html" | "markdown" | "image" | "svg" | "pdf" | "diff";
@@ -270,6 +271,7 @@ export type ToolCallDetail = {
270
271
  output: unknown;
271
272
  };
272
273
  interface ToolCallBase {
274
+ agentMessage?: AgentMessage;
273
275
  [key: string]: unknown;
274
276
  type: "tool_call";
275
277
  callId: string;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const BrowserAutomationHostCapabilitySchema: z.ZodObject<{
3
- supportedCommands: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("type" | "select" | "fill" | "logs" | "list_tabs" | "new_tab" | "snapshot" | "click" | "wait" | "keypress" | "navigate" | "back" | "forward" | "reload" | "screenshot" | "upload" | "hover" | "drag" | "evaluate" | "scroll" | "resize" | "close_tab")[], string[]>>;
3
+ supportedCommands: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("type" | "fill" | "logs" | "list_tabs" | "new_tab" | "snapshot" | "click" | "wait" | "keypress" | "navigate" | "back" | "forward" | "reload" | "screenshot" | "upload" | "select" | "hover" | "drag" | "evaluate" | "scroll" | "resize" | "close_tab")[], string[]>>;
4
4
  hostKind: z.ZodDefault<z.ZodString>;
5
5
  }, z.core.$loose>;
6
6
  export type BrowserAutomationHostCapability = z.infer<typeof BrowserAutomationHostCapabilitySchema>;
@@ -14,7 +14,6 @@ export declare const BrowserAutomationErrorCodeSchema: z.ZodEnum<{
14
14
  export declare const BROWSER_AUTOMATION_COMMAND_NAMES: readonly ["list_tabs", "new_tab", "snapshot", "click", "fill", "wait", "type", "keypress", "navigate", "back", "forward", "reload", "screenshot", "upload", "select", "hover", "drag", "logs", "evaluate", "scroll", "resize", "close_tab"];
15
15
  export declare const BrowserAutomationCommandNameSchema: z.ZodEnum<{
16
16
  type: "type";
17
- select: "select";
18
17
  fill: "fill";
19
18
  logs: "logs";
20
19
  list_tabs: "list_tabs";
@@ -29,6 +28,7 @@ export declare const BrowserAutomationCommandNameSchema: z.ZodEnum<{
29
28
  reload: "reload";
30
29
  screenshot: "screenshot";
31
30
  upload: "upload";
31
+ select: "select";
32
32
  hover: "hover";
33
33
  drag: "drag";
34
34
  evaluate: "evaluate";
@@ -423,8 +423,8 @@ export declare const BrowserAutomationWaitResultSchema: z.ZodObject<{
423
423
  command: z.ZodLiteral<"wait">;
424
424
  browserId: z.ZodString;
425
425
  matched: z.ZodEnum<{
426
- url: "url";
427
426
  text: "text";
427
+ url: "url";
428
428
  }>;
429
429
  }, z.core.$strip>;
430
430
  export declare const BrowserAutomationTypeResultSchema: z.ZodObject<{
@@ -604,8 +604,8 @@ export declare const BrowserAutomationResultSchema: z.ZodDiscriminatedUnion<[z.Z
604
604
  command: z.ZodLiteral<"wait">;
605
605
  browserId: z.ZodString;
606
606
  matched: z.ZodEnum<{
607
- url: "url";
608
607
  text: "text";
608
+ url: "url";
609
609
  }>;
610
610
  }, z.core.$strip>, z.ZodObject<{
611
611
  command: z.ZodLiteral<"type">;
@@ -946,8 +946,8 @@ export declare const BrowserAutomationExecuteResponseSchema: z.ZodObject<{
946
946
  command: z.ZodLiteral<"wait">;
947
947
  browserId: z.ZodString;
948
948
  matched: z.ZodEnum<{
949
- url: "url";
950
949
  text: "text";
950
+ url: "url";
951
951
  }>;
952
952
  }, z.core.$strip>, z.ZodObject<{
953
953
  command: z.ZodLiteral<"type">;