@camerontaylor/paseo-protocol 0.8.0-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.
Files changed (118) hide show
  1. package/README.md +12 -0
  2. package/dist/agent-attention-notification.d.ts +43 -0
  3. package/dist/agent-attention-notification.js +141 -0
  4. package/dist/agent-deep-link.d.ts +8 -0
  5. package/dist/agent-deep-link.js +49 -0
  6. package/dist/agent-labels.d.ts +10 -0
  7. package/dist/agent-labels.js +21 -0
  8. package/dist/agent-lifecycle.d.ts +3 -0
  9. package/dist/agent-lifecycle.js +8 -0
  10. package/dist/agent-state-bucket.d.ts +14 -0
  11. package/dist/agent-state-bucket.js +41 -0
  12. package/dist/agent-title-limits.d.ts +2 -0
  13. package/dist/agent-title-limits.js +2 -0
  14. package/dist/agent-types.d.ts +478 -0
  15. package/dist/agent-types.js +22 -0
  16. package/dist/binary-frames/demux.d.ts +11 -0
  17. package/dist/binary-frames/demux.js +23 -0
  18. package/dist/binary-frames/file-transfer.d.ts +51 -0
  19. package/dist/binary-frames/file-transfer.js +108 -0
  20. package/dist/binary-frames/index.d.ts +4 -0
  21. package/dist/binary-frames/index.js +4 -0
  22. package/dist/binary-frames/terminal.d.ts +35 -0
  23. package/dist/binary-frames/terminal.js +100 -0
  24. package/dist/branch-slug.d.ts +14 -0
  25. package/dist/branch-slug.js +49 -0
  26. package/dist/browser-automation/capabilities.d.ts +7 -0
  27. package/dist/browser-automation/capabilities.js +31 -0
  28. package/dist/browser-automation/rpc-schemas.d.ts +1112 -0
  29. package/dist/browser-automation/rpc-schemas.js +462 -0
  30. package/dist/chat/rpc-schemas.d.ts +158 -0
  31. package/dist/chat/rpc-schemas.js +104 -0
  32. package/dist/chat/types.d.ts +30 -0
  33. package/dist/chat/types.js +23 -0
  34. package/dist/check-traits.d.ts +11 -0
  35. package/dist/check-traits.js +10 -0
  36. package/dist/client-capabilities.d.ts +20 -0
  37. package/dist/client-capabilities.js +47 -0
  38. package/dist/connection-offer.d.ts +36 -0
  39. package/dist/connection-offer.js +53 -0
  40. package/dist/daemon-endpoints.d.ts +47 -0
  41. package/dist/daemon-endpoints.js +201 -0
  42. package/dist/error-utils.d.ts +11 -0
  43. package/dist/error-utils.js +27 -0
  44. package/dist/forge-manifest.d.ts +66 -0
  45. package/dist/forge-manifest.js +92 -0
  46. package/dist/generated/validation/ws-outbound.aot.d.ts +2 -0
  47. package/dist/generated/validation/ws-outbound.aot.js +98097 -0
  48. package/dist/git-remote.d.ts +33 -0
  49. package/dist/git-remote.js +94 -0
  50. package/dist/gitea-status.d.ts +10 -0
  51. package/dist/gitea-status.js +23 -0
  52. package/dist/gitlab-pipeline.d.ts +10 -0
  53. package/dist/gitlab-pipeline.js +17 -0
  54. package/dist/host-connection-schema.d.ts +11 -0
  55. package/dist/host-connection-schema.js +9 -0
  56. package/dist/literal-union.d.ts +2 -0
  57. package/dist/literal-union.js +2 -0
  58. package/dist/loop/rpc-schemas.d.ts +636 -0
  59. package/dist/loop/rpc-schemas.js +164 -0
  60. package/dist/messages.d.ts +60742 -0
  61. package/dist/messages.js +6152 -0
  62. package/dist/paseo-config-schema.d.ts +138 -0
  63. package/dist/paseo-config-schema.js +98 -0
  64. package/dist/paseo-tool-call-detail.d.ts +15 -0
  65. package/dist/paseo-tool-call-detail.js +305 -0
  66. package/dist/path-utils.d.ts +2 -0
  67. package/dist/path-utils.js +16 -0
  68. package/dist/plugin-requirements.d.ts +11 -0
  69. package/dist/plugin-requirements.js +26 -0
  70. package/dist/plugin-source-reference.d.ts +7 -0
  71. package/dist/plugin-source-reference.js +41 -0
  72. package/dist/provider-config.d.ts +139 -0
  73. package/dist/provider-config.js +115 -0
  74. package/dist/provider-icon-names.d.ts +5 -0
  75. package/dist/provider-icon-names.js +54 -0
  76. package/dist/provider-manifest.d.ts +37 -0
  77. package/dist/provider-manifest.js +261 -0
  78. package/dist/provider-snapshot-codec.d.ts +18 -0
  79. package/dist/provider-snapshot-codec.js +71 -0
  80. package/dist/schedule/cadence.d.ts +6 -0
  81. package/dist/schedule/cadence.js +28 -0
  82. package/dist/schedule/cron-expression.d.ts +13 -0
  83. package/dist/schedule/cron-expression.js +97 -0
  84. package/dist/schedule/rpc-schemas.d.ts +568 -0
  85. package/dist/schedule/rpc-schemas.js +155 -0
  86. package/dist/schedule/types.d.ts +201 -0
  87. package/dist/schedule/types.js +68 -0
  88. package/dist/search/text-match.d.ts +71 -0
  89. package/dist/search/text-match.js +291 -0
  90. package/dist/ssh-transport.d.ts +11 -0
  91. package/dist/ssh-transport.js +72 -0
  92. package/dist/terminal-activity.d.ts +21 -0
  93. package/dist/terminal-activity.js +25 -0
  94. package/dist/terminal-input-mode.d.ts +30 -0
  95. package/dist/terminal-input-mode.js +180 -0
  96. package/dist/terminal-key-input.d.ts +13 -0
  97. package/dist/terminal-key-input.js +210 -0
  98. package/dist/terminal-profiles.d.ts +41 -0
  99. package/dist/terminal-profiles.js +270 -0
  100. package/dist/terminal-snapshot.d.ts +3 -0
  101. package/dist/terminal-snapshot.js +184 -0
  102. package/dist/terminal-stream-protocol.d.ts +2 -0
  103. package/dist/terminal-stream-protocol.js +2 -0
  104. package/dist/terminal-subscription-key.d.ts +2 -0
  105. package/dist/terminal-subscription-key.js +9 -0
  106. package/dist/timeline-identity.d.ts +3 -0
  107. package/dist/timeline-identity.js +8 -0
  108. package/dist/tool-call-display.d.ts +11 -0
  109. package/dist/tool-call-display.js +136 -0
  110. package/dist/tool-name-normalization.d.ts +9 -0
  111. package/dist/tool-name-normalization.js +82 -0
  112. package/dist/validation/ws-outbound-schema-metadata.d.ts +11418 -0
  113. package/dist/validation/ws-outbound-schema-metadata.js +3 -0
  114. package/dist/validation/ws-outbound.d.ts +12 -0
  115. package/dist/validation/ws-outbound.js +8 -0
  116. package/dist/workspace-labels.d.ts +9 -0
  117. package/dist/workspace-labels.js +19 -0
  118. package/package.json +44 -0
@@ -0,0 +1,138 @@
1
+ import { z } from "zod";
2
+ export declare const PaseoServicePortAllocationSchema: z.ZodObject<{
3
+ range: z.ZodOptional<z.ZodString>;
4
+ portScript: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strict>;
6
+ export declare function normalizeLifecycleCommands(commands: unknown): string[];
7
+ export declare const PaseoLifecycleCommandRawSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
8
+ export declare const PaseoScriptEntryRawSchema: z.ZodObject<{
9
+ type: z.ZodOptional<z.ZodUnknown>;
10
+ command: z.ZodOptional<z.ZodUnknown>;
11
+ port: z.ZodOptional<z.ZodUnknown>;
12
+ }, z.core.$loose>;
13
+ export declare const PaseoWorktreeConfigRawSchema: z.ZodObject<{
14
+ setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
15
+ teardown: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
16
+ terminals: z.ZodOptional<z.ZodUnknown>;
17
+ servicePorts: z.ZodOptional<z.ZodObject<{
18
+ range: z.ZodOptional<z.ZodString>;
19
+ portScript: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strict>>;
21
+ }, z.core.$loose>;
22
+ export declare const PaseoMetadataGenerationEntrySchema: z.ZodCatch<z.ZodObject<{
23
+ instructions: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$loose>>;
25
+ export declare const PaseoMetadataGenerationSchema: z.ZodCatch<z.ZodObject<{
26
+ title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
27
+ instructions: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$loose>>>;
29
+ branchName: z.ZodOptional<z.ZodCatch<z.ZodObject<{
30
+ instructions: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$loose>>>;
32
+ commitMessage: z.ZodOptional<z.ZodCatch<z.ZodObject<{
33
+ instructions: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$loose>>>;
35
+ pullRequest: z.ZodOptional<z.ZodCatch<z.ZodObject<{
36
+ instructions: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$loose>>>;
38
+ }, z.core.$loose>>;
39
+ export declare const PaseoConfigRawSchema: z.ZodObject<{
40
+ worktree: z.ZodOptional<z.ZodObject<{
41
+ setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
42
+ teardown: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
43
+ terminals: z.ZodOptional<z.ZodUnknown>;
44
+ servicePorts: z.ZodOptional<z.ZodObject<{
45
+ range: z.ZodOptional<z.ZodString>;
46
+ portScript: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strict>>;
48
+ }, z.core.$loose>>;
49
+ scripts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
50
+ type: z.ZodOptional<z.ZodUnknown>;
51
+ command: z.ZodOptional<z.ZodUnknown>;
52
+ port: z.ZodOptional<z.ZodUnknown>;
53
+ }, z.core.$loose>>>;
54
+ metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
55
+ title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
56
+ instructions: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$loose>>>;
58
+ branchName: z.ZodOptional<z.ZodCatch<z.ZodObject<{
59
+ instructions: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$loose>>>;
61
+ commitMessage: z.ZodOptional<z.ZodCatch<z.ZodObject<{
62
+ instructions: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$loose>>>;
64
+ pullRequest: z.ZodOptional<z.ZodCatch<z.ZodObject<{
65
+ instructions: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$loose>>>;
67
+ }, z.core.$loose>>>;
68
+ }, z.core.$loose>;
69
+ export declare const WorktreeConfigSchema: z.ZodCatch<z.ZodObject<{
70
+ terminals: z.ZodOptional<z.ZodUnknown>;
71
+ servicePorts: z.ZodOptional<z.ZodObject<{
72
+ range: z.ZodOptional<z.ZodString>;
73
+ portScript: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strict>>;
75
+ setup: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
76
+ teardown: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
77
+ }, z.core.$loose>>;
78
+ export declare const ScriptEntrySchema: z.ZodCatch<z.ZodObject<{
79
+ type: z.ZodOptional<z.ZodUnknown>;
80
+ command: z.ZodOptional<z.ZodUnknown>;
81
+ port: z.ZodOptional<z.ZodUnknown>;
82
+ }, z.core.$loose>>;
83
+ export declare const PaseoConfigSchema: z.ZodCatch<z.ZodObject<{
84
+ worktree: z.ZodOptional<z.ZodCatch<z.ZodObject<{
85
+ terminals: z.ZodOptional<z.ZodUnknown>;
86
+ servicePorts: z.ZodOptional<z.ZodObject<{
87
+ range: z.ZodOptional<z.ZodString>;
88
+ portScript: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strict>>;
90
+ setup: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
91
+ teardown: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<string[], unknown>>;
92
+ }, z.core.$loose>>>;
93
+ scripts: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCatch<z.ZodObject<{
94
+ type: z.ZodOptional<z.ZodUnknown>;
95
+ command: z.ZodOptional<z.ZodUnknown>;
96
+ port: z.ZodOptional<z.ZodUnknown>;
97
+ }, z.core.$loose>>>>>;
98
+ metadataGeneration: z.ZodOptional<z.ZodCatch<z.ZodObject<{
99
+ title: z.ZodOptional<z.ZodCatch<z.ZodObject<{
100
+ instructions: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$loose>>>;
102
+ branchName: z.ZodOptional<z.ZodCatch<z.ZodObject<{
103
+ instructions: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$loose>>>;
105
+ commitMessage: z.ZodOptional<z.ZodCatch<z.ZodObject<{
106
+ instructions: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$loose>>>;
108
+ pullRequest: z.ZodOptional<z.ZodCatch<z.ZodObject<{
109
+ instructions: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$loose>>>;
111
+ }, z.core.$loose>>>;
112
+ }, z.core.$loose>>;
113
+ export declare const PaseoConfigRevisionSchema: z.ZodObject<{
114
+ mtimeMs: z.ZodNumber;
115
+ size: z.ZodNumber;
116
+ }, z.core.$strip>;
117
+ export declare const ProjectConfigRpcErrorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
118
+ code: z.ZodLiteral<"project_not_found">;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ code: z.ZodLiteral<"invalid_project_config">;
121
+ }, z.core.$strip>, z.ZodObject<{
122
+ code: z.ZodLiteral<"stale_project_config">;
123
+ currentRevision: z.ZodNullable<z.ZodObject<{
124
+ mtimeMs: z.ZodNumber;
125
+ size: z.ZodNumber;
126
+ }, z.core.$strip>>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ code: z.ZodLiteral<"write_failed">;
129
+ }, z.core.$strip>], "code">;
130
+ export type PaseoScriptEntryRaw = z.infer<typeof PaseoScriptEntryRawSchema>;
131
+ export type PaseoMetadataGenerationEntry = z.infer<typeof PaseoMetadataGenerationEntrySchema>;
132
+ export type PaseoMetadataGeneration = z.infer<typeof PaseoMetadataGenerationSchema>;
133
+ export type PaseoServicePortAllocation = z.infer<typeof PaseoServicePortAllocationSchema>;
134
+ export type PaseoConfigRaw = z.infer<typeof PaseoConfigRawSchema>;
135
+ export type PaseoConfig = z.infer<typeof PaseoConfigSchema>;
136
+ export type PaseoConfigRevision = z.infer<typeof PaseoConfigRevisionSchema>;
137
+ export type ProjectConfigRpcError = z.infer<typeof ProjectConfigRpcErrorSchema>;
138
+ //# sourceMappingURL=paseo-config-schema.d.ts.map
@@ -0,0 +1,98 @@
1
+ import { z } from "zod";
2
+ const TCP_PORT_RANGE_PATTERN = /^(\d{1,5})-(\d{1,5})$/;
3
+ export const PaseoServicePortAllocationSchema = z
4
+ .object({
5
+ range: z.string().trim().regex(TCP_PORT_RANGE_PATTERN).optional(),
6
+ portScript: z.string().trim().min(1).optional(),
7
+ })
8
+ .strict()
9
+ .refine((value) => value.range !== undefined || value.portScript !== undefined, "Expected range or portScript")
10
+ .refine((value) => {
11
+ if (!value.range)
12
+ return true;
13
+ const match = TCP_PORT_RANGE_PATTERN.exec(value.range);
14
+ if (!match)
15
+ return false;
16
+ const start = Number(match[1]);
17
+ const end = Number(match[2]);
18
+ return start >= 1 && end <= 65535 && start <= end;
19
+ }, "Expected an inclusive TCP port range from 1-65535");
20
+ export function normalizeLifecycleCommands(commands) {
21
+ if (typeof commands === "string") {
22
+ return commands.trim().length > 0 ? [commands] : [];
23
+ }
24
+ if (!Array.isArray(commands)) {
25
+ return [];
26
+ }
27
+ return commands.filter((command) => {
28
+ return typeof command === "string" && command.trim().length > 0;
29
+ });
30
+ }
31
+ export const PaseoLifecycleCommandRawSchema = z.union([z.string(), z.array(z.string())]);
32
+ export const PaseoScriptEntryRawSchema = z
33
+ .object({
34
+ type: z.unknown().optional(),
35
+ command: z.unknown().optional(),
36
+ port: z.unknown().optional(),
37
+ })
38
+ .passthrough();
39
+ export const PaseoWorktreeConfigRawSchema = z
40
+ .object({
41
+ setup: PaseoLifecycleCommandRawSchema.optional(),
42
+ teardown: PaseoLifecycleCommandRawSchema.optional(),
43
+ terminals: z.unknown().optional(),
44
+ servicePorts: PaseoServicePortAllocationSchema.optional(),
45
+ })
46
+ .passthrough();
47
+ export const PaseoMetadataGenerationEntrySchema = z
48
+ .object({
49
+ instructions: z.string().optional(),
50
+ })
51
+ .passthrough()
52
+ .catch({});
53
+ export const PaseoMetadataGenerationSchema = z
54
+ .object({
55
+ title: PaseoMetadataGenerationEntrySchema.optional(),
56
+ branchName: PaseoMetadataGenerationEntrySchema.optional(),
57
+ commitMessage: PaseoMetadataGenerationEntrySchema.optional(),
58
+ pullRequest: PaseoMetadataGenerationEntrySchema.optional(),
59
+ })
60
+ // COMPAT(projectMetadataAgentTitle): `agentTitle` project metadata prompts were removed
61
+ // in v0.1.96; keep legacy paseo.json parseable until 2026-12-16.
62
+ .passthrough()
63
+ .catch({});
64
+ export const PaseoConfigRawSchema = z
65
+ .object({
66
+ worktree: PaseoWorktreeConfigRawSchema.optional(),
67
+ scripts: z.record(z.string(), PaseoScriptEntryRawSchema).optional(),
68
+ metadataGeneration: PaseoMetadataGenerationSchema.optional(),
69
+ })
70
+ .passthrough();
71
+ export const WorktreeConfigSchema = PaseoWorktreeConfigRawSchema.extend({
72
+ setup: z.unknown().optional().transform(normalizeLifecycleCommands),
73
+ teardown: z.unknown().optional().transform(normalizeLifecycleCommands),
74
+ })
75
+ .passthrough()
76
+ .catch({ setup: [], teardown: [] });
77
+ export const ScriptEntrySchema = PaseoScriptEntryRawSchema.catch({});
78
+ export const PaseoConfigSchema = PaseoConfigRawSchema.extend({
79
+ worktree: WorktreeConfigSchema.optional(),
80
+ scripts: z.record(z.string(), ScriptEntrySchema).optional().catch({}),
81
+ metadataGeneration: PaseoMetadataGenerationSchema.optional(),
82
+ })
83
+ .passthrough()
84
+ .catch({});
85
+ export const PaseoConfigRevisionSchema = z.object({
86
+ mtimeMs: z.number(),
87
+ size: z.number(),
88
+ });
89
+ export const ProjectConfigRpcErrorSchema = z.discriminatedUnion("code", [
90
+ z.object({ code: z.literal("project_not_found") }),
91
+ z.object({ code: z.literal("invalid_project_config") }),
92
+ z.object({
93
+ code: z.literal("stale_project_config"),
94
+ currentRevision: PaseoConfigRevisionSchema.nullable(),
95
+ }),
96
+ z.object({ code: z.literal("write_failed") }),
97
+ ]);
98
+ //# sourceMappingURL=paseo-config-schema.js.map
@@ -0,0 +1,15 @@
1
+ export interface PaseoToolDetailField {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export type PaseoToolDetailSection = {
6
+ kind: "prose";
7
+ title: string;
8
+ text: string;
9
+ } | {
10
+ kind: "fields";
11
+ title: string;
12
+ fields: PaseoToolDetailField[];
13
+ };
14
+ export declare function buildPaseoToolDetailSections(toolName: string, input: unknown, output: unknown): PaseoToolDetailSection[] | null;
15
+ //# sourceMappingURL=paseo-tool-call-detail.d.ts.map
@@ -0,0 +1,305 @@
1
+ import { getPaseoToolLeafName } from "./tool-name-normalization.js";
2
+ const WORKSPACE_FIELDS = [
3
+ "title",
4
+ "workspaceId",
5
+ "projectId",
6
+ "isolation",
7
+ "path",
8
+ "mode",
9
+ "worktreeSlug",
10
+ "branchName",
11
+ "baseBranch",
12
+ "branch",
13
+ "prNumber",
14
+ "forge",
15
+ ];
16
+ const AGENT_FIELDS = [
17
+ "title",
18
+ "agentId",
19
+ "provider",
20
+ "workspaceId",
21
+ "cwd",
22
+ "sessionMode",
23
+ "modeId",
24
+ "background",
25
+ "notifyOnFinish",
26
+ "settings",
27
+ "labels",
28
+ ];
29
+ const AUTOMATION_FIELDS = [
30
+ "name",
31
+ "id",
32
+ "cron",
33
+ "timezone",
34
+ "provider",
35
+ "cwd",
36
+ "isolation",
37
+ "maxRuns",
38
+ "expiresIn",
39
+ "clearExpires",
40
+ ];
41
+ const BROWSER_FIELDS = [
42
+ "browserId",
43
+ "url",
44
+ "ref",
45
+ "sourceRef",
46
+ "targetRef",
47
+ "value",
48
+ "text",
49
+ "key",
50
+ "button",
51
+ "doubleClick",
52
+ "modifiers",
53
+ "filePaths",
54
+ "fullPage",
55
+ "maxEntries",
56
+ "timeoutMs",
57
+ "deltaX",
58
+ "deltaY",
59
+ "width",
60
+ "height",
61
+ "function",
62
+ ];
63
+ const TOOL_SPECS = {
64
+ create_workspace: {
65
+ inputOrder: WORKSPACE_FIELDS,
66
+ outputFields: ["workspaceId", "projectId"],
67
+ },
68
+ list_workspaces: {},
69
+ archive_workspace: {
70
+ inputOrder: ["workspaceId"],
71
+ outputFields: ["workspaceId", "archivedAgentIds", "removedDirectory"],
72
+ },
73
+ rename_workspace: { inputOrder: ["title", "workspaceId"] },
74
+ create_agent: {
75
+ promptField: "initialPrompt",
76
+ inputOrder: AGENT_FIELDS,
77
+ outputFields: ["agentId", "status", "currentModeId", "cwd"],
78
+ },
79
+ send_agent_prompt: {
80
+ promptField: "prompt",
81
+ inputOrder: AGENT_FIELDS,
82
+ outputFields: ["status", "lastMessage", "permission"],
83
+ },
84
+ get_agent_status: { inputOrder: ["agentId"] },
85
+ list_agents: { inputOrder: ["cwd", "statuses", "sinceHours", "limit", "includeArchived"] },
86
+ cancel_agent: { inputOrder: ["agentId"] },
87
+ archive_agent: { inputOrder: ["agentId"] },
88
+ kill_agent: { inputOrder: ["agentId"] },
89
+ update_agent: { inputOrder: AGENT_FIELDS },
90
+ get_agent_activity: { inputOrder: ["agentId", "limit"] },
91
+ set_agent_mode: { inputOrder: ["agentId", "modeId"] },
92
+ list_workspace_scripts: { inputOrder: ["workspaceId"] },
93
+ start_workspace_script: { inputOrder: ["workspaceId", "scriptName"] },
94
+ stop_workspace_script: { inputOrder: ["workspaceId", "scriptName"] },
95
+ list_terminals: { inputOrder: ["cwd", "all"] },
96
+ create_terminal: { inputOrder: ["cwd", "workspaceId", "name", "command"] },
97
+ kill_terminal: { inputOrder: ["terminalId"] },
98
+ capture_terminal: { inputOrder: ["terminalId", "lines"] },
99
+ send_terminal_keys: { inputOrder: ["terminalId", "keys", "literal"] },
100
+ create_schedule: {
101
+ promptField: "prompt",
102
+ inputOrder: AUTOMATION_FIELDS,
103
+ outputFields: ["id", "status", "nextRunAt", "expiresAt"],
104
+ },
105
+ create_heartbeat: {
106
+ promptField: "prompt",
107
+ inputOrder: AUTOMATION_FIELDS,
108
+ outputFields: ["id", "status", "nextRunAt", "expiresAt"],
109
+ },
110
+ delete_heartbeat: { inputOrder: ["id"] },
111
+ list_schedules: {},
112
+ inspect_schedule: { inputOrder: ["id"] },
113
+ pause_schedule: { inputOrder: ["id"] },
114
+ resume_schedule: { inputOrder: ["id"] },
115
+ delete_schedule: { inputOrder: ["id"] },
116
+ update_schedule: { promptField: "prompt", inputOrder: AUTOMATION_FIELDS },
117
+ schedule_logs: { inputOrder: ["id"] },
118
+ run_schedule_once: { inputOrder: ["id"] },
119
+ list_providers: {},
120
+ list_models: { inputOrder: ["provider"] },
121
+ list_profiles: {},
122
+ inspect_provider: { inputOrder: ["provider", "cwd", "settings"] },
123
+ list_pending_permissions: {},
124
+ respond_to_permission: { inputOrder: ["agentId", "requestId", "response"] },
125
+ browser_list_tabs: {},
126
+ browser_new_tab: { inputOrder: BROWSER_FIELDS },
127
+ browser_snapshot: { inputOrder: BROWSER_FIELDS },
128
+ browser_click: { inputOrder: BROWSER_FIELDS },
129
+ browser_fill: { inputOrder: BROWSER_FIELDS },
130
+ browser_wait: { inputOrder: BROWSER_FIELDS },
131
+ browser_type: { inputOrder: BROWSER_FIELDS },
132
+ browser_keypress: { inputOrder: BROWSER_FIELDS },
133
+ browser_navigate: { inputOrder: BROWSER_FIELDS },
134
+ browser_back: { inputOrder: BROWSER_FIELDS },
135
+ browser_forward: { inputOrder: BROWSER_FIELDS },
136
+ browser_reload: { inputOrder: BROWSER_FIELDS },
137
+ browser_screenshot: { inputOrder: BROWSER_FIELDS },
138
+ browser_upload: { inputOrder: BROWSER_FIELDS },
139
+ browser_hover: { inputOrder: BROWSER_FIELDS },
140
+ browser_select: { inputOrder: BROWSER_FIELDS },
141
+ browser_drag: { inputOrder: BROWSER_FIELDS },
142
+ browser_logs: { inputOrder: BROWSER_FIELDS },
143
+ browser_evaluate: { inputOrder: BROWSER_FIELDS },
144
+ browser_scroll: { inputOrder: BROWSER_FIELDS },
145
+ browser_resize: { inputOrder: BROWSER_FIELDS },
146
+ browser_close_tab: { inputOrder: BROWSER_FIELDS },
147
+ };
148
+ const FIELD_LABELS = {
149
+ agentId: "Agent",
150
+ archivedAgentIds: "Archived agents",
151
+ baseBranch: "Base branch",
152
+ branchName: "New branch",
153
+ browserId: "Browser tab",
154
+ clearExpires: "Clear expiry",
155
+ currentModeId: "Current mode",
156
+ cwd: "Working directory",
157
+ deltaX: "Horizontal delta",
158
+ deltaY: "Vertical delta",
159
+ doubleClick: "Double click",
160
+ expiresIn: "Expires in",
161
+ expiresAt: "Expires",
162
+ filePaths: "Files",
163
+ fullPage: "Full page",
164
+ initialPrompt: "Prompt",
165
+ id: "ID",
166
+ lastMessage: "Last message",
167
+ maxEntries: "Maximum entries",
168
+ maxRuns: "Maximum runs",
169
+ modeId: "Mode",
170
+ newMode: "New mode",
171
+ nextRunAt: "Next run",
172
+ notifyOnFinish: "Notify on finish",
173
+ prNumber: "Change request",
174
+ projectId: "Project",
175
+ removedDirectory: "Removed directory",
176
+ requestId: "Request",
177
+ scriptName: "Script",
178
+ sessionMode: "Session mode",
179
+ sinceHours: "Since (hours)",
180
+ sourceRef: "Source",
181
+ targetRef: "Target",
182
+ terminalId: "Terminal",
183
+ thinkingOptionId: "Thinking",
184
+ timeoutMs: "Timeout (ms)",
185
+ updateCount: "Updates",
186
+ workspaceId: "Workspace",
187
+ worktreeSlug: "Worktree",
188
+ };
189
+ function isRecord(value) {
190
+ return typeof value === "object" && value !== null && !Array.isArray(value);
191
+ }
192
+ function humanizeKey(key) {
193
+ const known = FIELD_LABELS[key];
194
+ if (known)
195
+ return known;
196
+ const words = key
197
+ .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
198
+ .replace(/[._-]+/g, " ")
199
+ .split(" ")
200
+ .filter(Boolean);
201
+ const sentence = words.join(" ").toLowerCase();
202
+ return `${sentence[0]?.toUpperCase() ?? ""}${sentence.slice(1)}`;
203
+ }
204
+ function formatValue(value, depth = 0) {
205
+ if (value === null)
206
+ return "None";
207
+ if (value === undefined)
208
+ return "";
209
+ if (typeof value === "boolean")
210
+ return value ? "Yes" : "No";
211
+ if (typeof value === "string" || typeof value === "number" || typeof value === "bigint") {
212
+ return String(value);
213
+ }
214
+ if (Array.isArray(value)) {
215
+ if (value.length === 0)
216
+ return "None";
217
+ return value.map((item) => `• ${indentMultiline(formatValue(item, depth + 1), 2)}`).join("\n");
218
+ }
219
+ if (isRecord(value)) {
220
+ const entries = Object.entries(value).filter(([, child]) => child !== undefined);
221
+ if (entries.length === 0)
222
+ return "None";
223
+ return entries
224
+ .map(([key, child]) => {
225
+ const formatted = formatValue(child, depth + 1);
226
+ return `${humanizeKey(key)}: ${indentMultiline(formatted, 2)}`;
227
+ })
228
+ .join("\n");
229
+ }
230
+ return String(value);
231
+ }
232
+ function indentMultiline(value, spaces) {
233
+ const indentation = " ".repeat(spaces);
234
+ return value.replace(/\n/g, `\n${indentation}`);
235
+ }
236
+ function orderedEntries(value, order = [], omittedKey, includedKeys) {
237
+ const included = includedKeys ? new Set(includedKeys) : null;
238
+ const keys = Object.keys(value).filter((key) => key !== omittedKey && value[key] !== undefined && (!included || included.has(key)));
239
+ const rank = new Map(order.map((key, index) => [key, index]));
240
+ keys.sort((left, right) => {
241
+ const leftRank = rank.get(left) ?? Number.MAX_SAFE_INTEGER;
242
+ const rightRank = rank.get(right) ?? Number.MAX_SAFE_INTEGER;
243
+ return leftRank - rightRank || left.localeCompare(right);
244
+ });
245
+ return keys.map((key) => [key, value[key]]);
246
+ }
247
+ function fieldsFromValue(value, order, omittedKey, includedKeys) {
248
+ if (value === null || value === undefined)
249
+ return [];
250
+ if (!isRecord(value)) {
251
+ const formatted = formatValue(value);
252
+ return formatted ? [{ label: "Value", value: formatted }] : [];
253
+ }
254
+ return orderedEntries(value, order, omittedKey, includedKeys).map(([key, child]) => ({
255
+ label: humanizeKey(key),
256
+ value: formatValue(child),
257
+ }));
258
+ }
259
+ function parseJsonText(value) {
260
+ if (typeof value !== "string")
261
+ return undefined;
262
+ try {
263
+ return JSON.parse(value);
264
+ }
265
+ catch {
266
+ return undefined;
267
+ }
268
+ }
269
+ function unwrapMcpResult(output) {
270
+ if (!isRecord(output))
271
+ return output;
272
+ if (output.structuredContent !== undefined) {
273
+ return output.structuredContent;
274
+ }
275
+ if (Array.isArray(output.content) && output.content.length === 1) {
276
+ const item = output.content[0];
277
+ if (isRecord(item) && item.type === "text") {
278
+ return parseJsonText(item.text) ?? item.text;
279
+ }
280
+ }
281
+ return output;
282
+ }
283
+ export function buildPaseoToolDetailSections(toolName, input, output) {
284
+ const leafName = getPaseoToolLeafName(toolName);
285
+ if (!leafName)
286
+ return null;
287
+ const spec = TOOL_SPECS[leafName] ?? {};
288
+ const sections = [];
289
+ if (spec.promptField && isRecord(input)) {
290
+ const prompt = input[spec.promptField];
291
+ if (typeof prompt === "string" && prompt.length > 0) {
292
+ sections.push({ kind: "prose", title: "Prompt", text: prompt });
293
+ }
294
+ }
295
+ const inputFields = fieldsFromValue(input, spec.inputOrder, spec.promptField);
296
+ if (inputFields.length > 0) {
297
+ sections.push({ kind: "fields", title: "Details", fields: inputFields });
298
+ }
299
+ const outputFields = fieldsFromValue(unwrapMcpResult(output), spec.outputFields, undefined, spec.outputFields);
300
+ if (outputFields.length > 0) {
301
+ sections.push({ kind: "fields", title: "Result", fields: outputFields });
302
+ }
303
+ return sections;
304
+ }
305
+ //# sourceMappingURL=paseo-tool-call-detail.js.map
@@ -0,0 +1,2 @@
1
+ export declare function stripCwdPrefix(filePath: string, cwd?: string): string;
2
+ //# sourceMappingURL=path-utils.d.ts.map
@@ -0,0 +1,16 @@
1
+ export function stripCwdPrefix(filePath, cwd) {
2
+ if (!cwd || !filePath) {
3
+ return filePath;
4
+ }
5
+ const normalizedCwd = cwd.replace(/\\/g, "/").replace(/\/+$/, "");
6
+ const normalizedPath = filePath.replace(/\\/g, "/");
7
+ const prefix = `${normalizedCwd}/`;
8
+ if (normalizedPath.startsWith(prefix)) {
9
+ return normalizedPath.slice(prefix.length);
10
+ }
11
+ if (normalizedPath === normalizedCwd) {
12
+ return ".";
13
+ }
14
+ return filePath;
15
+ }
16
+ //# sourceMappingURL=path-utils.js.map
@@ -0,0 +1,11 @@
1
+ import type { PluginRequirements } from "./messages.js";
2
+ export declare function validatePluginRequirements(requirements: PluginRequirements | undefined): void;
3
+ interface PluginCompatibilityInput {
4
+ id: string;
5
+ requirements?: PluginRequirements;
6
+ version: string | null;
7
+ runtime: "daemon" | "app";
8
+ }
9
+ export declare function assertPluginCompatibility(input: PluginCompatibilityInput): void;
10
+ export {};
11
+ //# sourceMappingURL=plugin-requirements.d.ts.map
@@ -0,0 +1,26 @@
1
+ import parse from "semver/functions/parse.js";
2
+ import validRange from "semver/ranges/valid.js";
3
+ import satisfies from "semver/functions/satisfies.js";
4
+ export function validatePluginRequirements(requirements) {
5
+ const range = requirements?.paseo;
6
+ if (range !== undefined && (!range.trim() || validRange(range) === null)) {
7
+ throw new Error(`Invalid requirements.paseo: ${JSON.stringify(range)}. Use an npm semver range such as ">=0.8.0".`);
8
+ }
9
+ }
10
+ export function assertPluginCompatibility(input) {
11
+ validatePluginRequirements(input.requirements);
12
+ // COMPAT(plugin-requirements): added in v0.8.0-beta.1; remove after 2027-03-07 once pre-0.8 plugins and catalogs are unsupported. The legacy range excludes 0.8 prereleases and their stable core.
13
+ const range = input.requirements?.paseo ?? "<0.8.0";
14
+ const version = input.version ? parse(input.version) : null;
15
+ if (!version) {
16
+ throw new Error(`Cannot check plugin "${input.id}" requirements: Paseo ${input.runtime} version is unknown. Update the ${input.runtime}.`);
17
+ }
18
+ const stableCore = `${version.major}.${version.minor}.${version.patch}`;
19
+ if (satisfies(version, range) || satisfies(stableCore, range))
20
+ return;
21
+ const action = input.requirements?.paseo === undefined
22
+ ? "This plugin has no requirements.paseo and targets Paseo before 0.8. Ask its author to migrate it: https://paseo.sh/docs/plugins/v0.8/migration"
23
+ : `Use a compatible plugin version or update the ${input.runtime}.`;
24
+ throw new Error(`Plugin "${input.id}" requires Paseo ${range}. Your ${input.runtime} is ${input.version}. ${action}`);
25
+ }
26
+ //# sourceMappingURL=plugin-requirements.js.map
@@ -0,0 +1,7 @@
1
+ export interface PluginSourceReference {
2
+ source: string;
3
+ pluginPath: string | undefined;
4
+ }
5
+ export declare function parsePluginSourceReference(reference: string): PluginSourceReference;
6
+ export declare function formatPluginSourceReference(source: string, pluginPath: string | undefined): string;
7
+ //# sourceMappingURL=plugin-source-reference.d.ts.map
@@ -0,0 +1,41 @@
1
+ export function parsePluginSourceReference(reference) {
2
+ const separator = reference.lastIndexOf(":");
3
+ if (separator === -1)
4
+ return { source: reference, pluginPath: undefined };
5
+ const pluginPath = reference.slice(separator + 1);
6
+ if (!isPortableRelativePluginPath(pluginPath)) {
7
+ return { source: reference, pluginPath: undefined };
8
+ }
9
+ const scheme = reference.indexOf("://");
10
+ if (scheme !== -1) {
11
+ const pathStart = reference.indexOf("/", scheme + 3);
12
+ if (pathStart === -1 || separator < pathStart) {
13
+ return { source: reference, pluginPath: undefined };
14
+ }
15
+ }
16
+ else {
17
+ const scpSeparator = reference.match(/^[^/@\s]+@[^:\s]+:/)?.[0].length;
18
+ if (scpSeparator !== undefined && separator === scpSeparator - 1) {
19
+ return { source: reference, pluginPath: undefined };
20
+ }
21
+ }
22
+ return { source: reference.slice(0, separator), pluginPath };
23
+ }
24
+ export function formatPluginSourceReference(source, pluginPath) {
25
+ if (pluginPath === undefined)
26
+ return source;
27
+ if (!isPortableRelativePluginPath(pluginPath)) {
28
+ throw new Error("Plugin path must be a portable path relative to the repository");
29
+ }
30
+ return `${source}:${pluginPath}`;
31
+ }
32
+ function isPortableRelativePluginPath(pluginPath) {
33
+ if (pluginPath === ".")
34
+ return true;
35
+ if (!pluginPath || pluginPath.startsWith("/") || pluginPath.startsWith("\\"))
36
+ return false;
37
+ if (/^[A-Za-z]:/.test(pluginPath) || pluginPath.includes(":"))
38
+ return false;
39
+ return pluginPath.split(/[\\/]/).every((part) => part !== "" && part !== "." && part !== "..");
40
+ }
41
+ //# sourceMappingURL=plugin-source-reference.js.map