@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,155 @@
1
+ import { z } from "zod";
2
+ import { ScheduleCadenceSchema, ScheduleRunSchema, ScheduleSummarySchema, StoredScheduleSchema, ScheduleTargetSchema, } from "./types.js";
3
+ const ScheduleCreateNewAgentConfigSchema = ScheduleTargetSchema.options[1].shape.config;
4
+ const ScheduleCreateTargetSchema = z.discriminatedUnion("type", [
5
+ z.object({
6
+ type: z.literal("self"),
7
+ agentId: z.guid(),
8
+ }),
9
+ z.object({
10
+ type: z.literal("agent"),
11
+ agentId: z.guid(),
12
+ }),
13
+ z.object({
14
+ type: z.literal("new-agent"),
15
+ config: ScheduleCreateNewAgentConfigSchema,
16
+ }),
17
+ ]);
18
+ export const ScheduleCreateRequestSchema = z.object({
19
+ type: z.literal("schedule/create"),
20
+ requestId: z.string(),
21
+ prompt: z.string().min(1),
22
+ name: z.string().optional(),
23
+ cadence: ScheduleCadenceSchema,
24
+ target: ScheduleCreateTargetSchema,
25
+ maxRuns: z.number().int().positive().optional(),
26
+ expiresAt: z.string().optional(),
27
+ runOnCreate: z.boolean().optional(),
28
+ });
29
+ export const ScheduleListRequestSchema = z.object({
30
+ type: z.literal("schedule/list"),
31
+ requestId: z.string(),
32
+ });
33
+ export const ScheduleInspectRequestSchema = z.object({
34
+ type: z.literal("schedule/inspect"),
35
+ requestId: z.string(),
36
+ scheduleId: z.string(),
37
+ });
38
+ export const ScheduleLogsRequestSchema = z.object({
39
+ type: z.literal("schedule/logs"),
40
+ requestId: z.string(),
41
+ scheduleId: z.string(),
42
+ });
43
+ export const SchedulePauseRequestSchema = z.object({
44
+ type: z.literal("schedule/pause"),
45
+ requestId: z.string(),
46
+ scheduleId: z.string(),
47
+ });
48
+ export const ScheduleResumeRequestSchema = z.object({
49
+ type: z.literal("schedule/resume"),
50
+ requestId: z.string(),
51
+ scheduleId: z.string(),
52
+ });
53
+ export const ScheduleDeleteRequestSchema = z.object({
54
+ type: z.literal("schedule/delete"),
55
+ requestId: z.string(),
56
+ scheduleId: z.string(),
57
+ });
58
+ export const ScheduleRunOnceRequestSchema = z.object({
59
+ type: z.literal("schedule/run-once"),
60
+ requestId: z.string(),
61
+ scheduleId: z.string(),
62
+ });
63
+ const ScheduleUpdateNewAgentConfigSchema = z.object({
64
+ provider: z.string().trim().min(1).optional(),
65
+ model: z.string().trim().min(1).nullable().optional(),
66
+ modeId: z.string().trim().min(1).nullable().optional(),
67
+ thinkingOptionId: z.string().trim().min(1).nullable().optional(),
68
+ archiveOnFinish: z.boolean().optional(),
69
+ isolation: z.enum(["local", "worktree"]).optional(),
70
+ cwd: z.string().trim().min(1).optional(),
71
+ });
72
+ export const ScheduleUpdateRequestSchema = z.object({
73
+ type: z.literal("schedule/update"),
74
+ requestId: z.string(),
75
+ scheduleId: z.string(),
76
+ name: z.string().nullable().optional(),
77
+ prompt: z.string().min(1).optional(),
78
+ cadence: ScheduleCadenceSchema.optional(),
79
+ newAgentConfig: ScheduleUpdateNewAgentConfigSchema.optional(),
80
+ maxRuns: z.number().int().positive().nullable().optional(),
81
+ expiresAt: z.string().nullable().optional(),
82
+ });
83
+ export const ScheduleCreateResponseSchema = z.object({
84
+ type: z.literal("schedule/create/response"),
85
+ payload: z.object({
86
+ requestId: z.string(),
87
+ schedule: ScheduleSummarySchema.nullable(),
88
+ error: z.string().nullable(),
89
+ }),
90
+ });
91
+ export const ScheduleListResponseSchema = z.object({
92
+ type: z.literal("schedule/list/response"),
93
+ payload: z.object({
94
+ requestId: z.string(),
95
+ schedules: z.array(ScheduleSummarySchema),
96
+ error: z.string().nullable(),
97
+ }),
98
+ });
99
+ export const ScheduleInspectResponseSchema = z.object({
100
+ type: z.literal("schedule/inspect/response"),
101
+ payload: z.object({
102
+ requestId: z.string(),
103
+ schedule: StoredScheduleSchema.nullable(),
104
+ error: z.string().nullable(),
105
+ }),
106
+ });
107
+ export const ScheduleLogsResponseSchema = z.object({
108
+ type: z.literal("schedule/logs/response"),
109
+ payload: z.object({
110
+ requestId: z.string(),
111
+ runs: z.array(ScheduleRunSchema),
112
+ error: z.string().nullable(),
113
+ }),
114
+ });
115
+ export const SchedulePauseResponseSchema = z.object({
116
+ type: z.literal("schedule/pause/response"),
117
+ payload: z.object({
118
+ requestId: z.string(),
119
+ schedule: ScheduleSummarySchema.nullable(),
120
+ error: z.string().nullable(),
121
+ }),
122
+ });
123
+ export const ScheduleResumeResponseSchema = z.object({
124
+ type: z.literal("schedule/resume/response"),
125
+ payload: z.object({
126
+ requestId: z.string(),
127
+ schedule: ScheduleSummarySchema.nullable(),
128
+ error: z.string().nullable(),
129
+ }),
130
+ });
131
+ export const ScheduleDeleteResponseSchema = z.object({
132
+ type: z.literal("schedule/delete/response"),
133
+ payload: z.object({
134
+ requestId: z.string(),
135
+ scheduleId: z.string(),
136
+ error: z.string().nullable(),
137
+ }),
138
+ });
139
+ export const ScheduleRunOnceResponseSchema = z.object({
140
+ type: z.literal("schedule/run-once/response"),
141
+ payload: z.object({
142
+ requestId: z.string(),
143
+ schedule: StoredScheduleSchema.nullable(),
144
+ error: z.string().nullable(),
145
+ }),
146
+ });
147
+ export const ScheduleUpdateResponseSchema = z.object({
148
+ type: z.literal("schedule/update/response"),
149
+ payload: z.object({
150
+ requestId: z.string(),
151
+ schedule: StoredScheduleSchema.nullable(),
152
+ error: z.string().nullable(),
153
+ }),
154
+ });
155
+ //# sourceMappingURL=rpc-schemas.js.map
@@ -0,0 +1,201 @@
1
+ import { z } from "zod";
2
+ export declare const ScheduleStatusSchema: z.ZodEnum<{
3
+ completed: "completed";
4
+ active: "active";
5
+ paused: "paused";
6
+ }>;
7
+ export type ScheduleStatus = z.infer<typeof ScheduleStatusSchema>;
8
+ export declare const ScheduleCadenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
9
+ type: z.ZodLiteral<"every">;
10
+ everyMs: z.ZodNumber;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ type: z.ZodLiteral<"cron">;
13
+ expression: z.ZodString;
14
+ timezone: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>], "type">;
16
+ export type ScheduleCadence = z.infer<typeof ScheduleCadenceSchema>;
17
+ export declare const ScheduleTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<"agent">;
19
+ agentId: z.ZodGUID;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ type: z.ZodLiteral<"new-agent">;
22
+ config: z.ZodObject<{
23
+ provider: z.ZodString;
24
+ cwd: z.ZodString;
25
+ modeId: z.ZodOptional<z.ZodString>;
26
+ model: z.ZodOptional<z.ZodString>;
27
+ thinkingOptionId: z.ZodOptional<z.ZodString>;
28
+ archiveOnFinish: z.ZodOptional<z.ZodBoolean>;
29
+ isolation: z.ZodOptional<z.ZodEnum<{
30
+ local: "local";
31
+ worktree: "worktree";
32
+ }>>;
33
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
35
+ featureValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
+ systemPrompt: z.ZodOptional<z.ZodString>;
37
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
38
+ }, z.core.$strip>;
39
+ }, z.core.$strip>], "type">;
40
+ export type ScheduleTarget = z.infer<typeof ScheduleTargetSchema>;
41
+ export declare const ScheduleRunSchema: z.ZodObject<{
42
+ id: z.ZodString;
43
+ scheduledFor: z.ZodString;
44
+ startedAt: z.ZodString;
45
+ endedAt: z.ZodNullable<z.ZodString>;
46
+ status: z.ZodEnum<{
47
+ running: "running";
48
+ failed: "failed";
49
+ succeeded: "succeeded";
50
+ }>;
51
+ agentId: z.ZodNullable<z.ZodGUID>;
52
+ workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ output: z.ZodNullable<z.ZodString>;
54
+ error: z.ZodNullable<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ export type ScheduleRun = z.infer<typeof ScheduleRunSchema>;
57
+ export declare const StoredScheduleSchema: z.ZodObject<{
58
+ id: z.ZodString;
59
+ name: z.ZodNullable<z.ZodString>;
60
+ prompt: z.ZodString;
61
+ cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
62
+ type: z.ZodLiteral<"every">;
63
+ everyMs: z.ZodNumber;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ type: z.ZodLiteral<"cron">;
66
+ expression: z.ZodString;
67
+ timezone: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>], "type">;
69
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ type: z.ZodLiteral<"agent">;
71
+ agentId: z.ZodGUID;
72
+ }, z.core.$strip>, z.ZodObject<{
73
+ type: z.ZodLiteral<"new-agent">;
74
+ config: z.ZodObject<{
75
+ provider: z.ZodString;
76
+ cwd: z.ZodString;
77
+ modeId: z.ZodOptional<z.ZodString>;
78
+ model: z.ZodOptional<z.ZodString>;
79
+ thinkingOptionId: z.ZodOptional<z.ZodString>;
80
+ archiveOnFinish: z.ZodOptional<z.ZodBoolean>;
81
+ isolation: z.ZodOptional<z.ZodEnum<{
82
+ local: "local";
83
+ worktree: "worktree";
84
+ }>>;
85
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
87
+ featureValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
88
+ systemPrompt: z.ZodOptional<z.ZodString>;
89
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
90
+ }, z.core.$strip>;
91
+ }, z.core.$strip>], "type">;
92
+ status: z.ZodEnum<{
93
+ completed: "completed";
94
+ active: "active";
95
+ paused: "paused";
96
+ }>;
97
+ createdAt: z.ZodString;
98
+ updatedAt: z.ZodString;
99
+ nextRunAt: z.ZodNullable<z.ZodString>;
100
+ lastRunAt: z.ZodNullable<z.ZodString>;
101
+ pausedAt: z.ZodNullable<z.ZodString>;
102
+ expiresAt: z.ZodNullable<z.ZodString>;
103
+ maxRuns: z.ZodNullable<z.ZodNumber>;
104
+ runs: z.ZodArray<z.ZodObject<{
105
+ id: z.ZodString;
106
+ scheduledFor: z.ZodString;
107
+ startedAt: z.ZodString;
108
+ endedAt: z.ZodNullable<z.ZodString>;
109
+ status: z.ZodEnum<{
110
+ running: "running";
111
+ failed: "failed";
112
+ succeeded: "succeeded";
113
+ }>;
114
+ agentId: z.ZodNullable<z.ZodGUID>;
115
+ workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
+ output: z.ZodNullable<z.ZodString>;
117
+ error: z.ZodNullable<z.ZodString>;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>;
120
+ export type StoredSchedule = z.infer<typeof StoredScheduleSchema>;
121
+ export declare const ScheduleSummarySchema: z.ZodObject<{
122
+ name: z.ZodNullable<z.ZodString>;
123
+ id: z.ZodString;
124
+ status: z.ZodEnum<{
125
+ completed: "completed";
126
+ active: "active";
127
+ paused: "paused";
128
+ }>;
129
+ createdAt: z.ZodString;
130
+ updatedAt: z.ZodString;
131
+ cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
132
+ type: z.ZodLiteral<"every">;
133
+ everyMs: z.ZodNumber;
134
+ }, z.core.$strip>, z.ZodObject<{
135
+ type: z.ZodLiteral<"cron">;
136
+ expression: z.ZodString;
137
+ timezone: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strip>], "type">;
139
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
140
+ type: z.ZodLiteral<"agent">;
141
+ agentId: z.ZodGUID;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ type: z.ZodLiteral<"new-agent">;
144
+ config: z.ZodObject<{
145
+ provider: z.ZodString;
146
+ cwd: z.ZodString;
147
+ modeId: z.ZodOptional<z.ZodString>;
148
+ model: z.ZodOptional<z.ZodString>;
149
+ thinkingOptionId: z.ZodOptional<z.ZodString>;
150
+ archiveOnFinish: z.ZodOptional<z.ZodBoolean>;
151
+ isolation: z.ZodOptional<z.ZodEnum<{
152
+ local: "local";
153
+ worktree: "worktree";
154
+ }>>;
155
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
157
+ featureValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
158
+ systemPrompt: z.ZodOptional<z.ZodString>;
159
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
160
+ }, z.core.$strip>;
161
+ }, z.core.$strip>], "type">;
162
+ prompt: z.ZodString;
163
+ nextRunAt: z.ZodNullable<z.ZodString>;
164
+ lastRunAt: z.ZodNullable<z.ZodString>;
165
+ pausedAt: z.ZodNullable<z.ZodString>;
166
+ expiresAt: z.ZodNullable<z.ZodString>;
167
+ maxRuns: z.ZodNullable<z.ZodNumber>;
168
+ }, z.core.$strip>;
169
+ export type ScheduleSummary = z.infer<typeof ScheduleSummarySchema>;
170
+ export interface CreateScheduleInput {
171
+ name?: string | null;
172
+ prompt: string;
173
+ cadence: ScheduleCadence;
174
+ target: ScheduleTarget;
175
+ maxRuns?: number | null;
176
+ expiresAt?: string | null;
177
+ runOnCreate?: boolean | null;
178
+ }
179
+ export interface UpdateScheduleNewAgentConfig {
180
+ provider?: string;
181
+ model?: string | null;
182
+ modeId?: string | null;
183
+ thinkingOptionId?: string | null;
184
+ archiveOnFinish?: boolean;
185
+ isolation?: "local" | "worktree";
186
+ cwd?: string;
187
+ }
188
+ export interface UpdateScheduleInput {
189
+ id: string;
190
+ name?: string | null;
191
+ prompt?: string;
192
+ cadence?: ScheduleCadence;
193
+ newAgentConfig?: UpdateScheduleNewAgentConfig;
194
+ maxRuns?: number | null;
195
+ expiresAt?: string | null;
196
+ }
197
+ export interface ScheduleExecutionResult {
198
+ agentId: string | null;
199
+ output: string | null;
200
+ }
201
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ import { AgentProviderSchema } from "../provider-manifest.js";
3
+ export const ScheduleStatusSchema = z.enum(["active", "paused", "completed"]);
4
+ export const ScheduleCadenceSchema = z.discriminatedUnion("type", [
5
+ z.object({
6
+ type: z.literal("every"),
7
+ everyMs: z.number().int().positive(),
8
+ }),
9
+ z.object({
10
+ type: z.literal("cron"),
11
+ expression: z.string().trim().min(1),
12
+ timezone: z.string().trim().min(1).optional(),
13
+ }),
14
+ ]);
15
+ export const ScheduleTargetSchema = z.discriminatedUnion("type", [
16
+ z.object({
17
+ type: z.literal("agent"),
18
+ agentId: z.guid(),
19
+ }),
20
+ z.object({
21
+ type: z.literal("new-agent"),
22
+ config: z.object({
23
+ provider: AgentProviderSchema,
24
+ cwd: z.string().trim().min(1),
25
+ modeId: z.string().trim().min(1).optional(),
26
+ model: z.string().trim().min(1).optional(),
27
+ thinkingOptionId: z.string().trim().min(1).optional(),
28
+ archiveOnFinish: z.boolean().optional(),
29
+ isolation: z.enum(["local", "worktree"]).optional(),
30
+ title: z.string().trim().min(1).nullable().optional(),
31
+ providerOptions: z.record(z.string(), z.json()).optional(),
32
+ featureValues: z.record(z.string(), z.unknown()).optional(),
33
+ systemPrompt: z.string().optional(),
34
+ mcpServers: z.record(z.string(), z.unknown()).optional(),
35
+ }),
36
+ }),
37
+ ]);
38
+ export const ScheduleRunSchema = z.object({
39
+ id: z.string(),
40
+ scheduledFor: z.string(),
41
+ startedAt: z.string(),
42
+ endedAt: z.string().nullable(),
43
+ status: z.enum(["running", "succeeded", "failed"]),
44
+ agentId: z.guid().nullable(),
45
+ workspaceId: z.string().nullable().optional(),
46
+ output: z.string().nullable(),
47
+ error: z.string().nullable(),
48
+ });
49
+ export const StoredScheduleSchema = z.object({
50
+ id: z.string(),
51
+ name: z.string().nullable(),
52
+ prompt: z.string().min(1),
53
+ cadence: ScheduleCadenceSchema,
54
+ target: ScheduleTargetSchema,
55
+ status: ScheduleStatusSchema,
56
+ createdAt: z.string(),
57
+ updatedAt: z.string(),
58
+ nextRunAt: z.string().nullable(),
59
+ lastRunAt: z.string().nullable(),
60
+ pausedAt: z.string().nullable(),
61
+ expiresAt: z.string().nullable(),
62
+ maxRuns: z.number().int().positive().nullable(),
63
+ runs: z.array(ScheduleRunSchema),
64
+ });
65
+ export const ScheduleSummarySchema = StoredScheduleSchema.omit({
66
+ runs: true,
67
+ });
68
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Ranked text matching shared by the app's pickers and the daemon's history
3
+ * search. A match is a tier plus the offset it was found at; lower is better on
4
+ * both, so callers sort ascending and never have to invent a scale.
5
+ *
6
+ * Typo tolerance is opt-in via `fuzzy`. The pickers leave it off — a combobox
7
+ * over a known list wants exact narrowing — while history search turns it on
8
+ * because the user is recalling a title from memory.
9
+ */
10
+ export interface MatchScore {
11
+ tier: number;
12
+ offset: number;
13
+ spread?: number;
14
+ }
15
+ export interface MatchOptions {
16
+ /** Omit or pass null to match exactly. `fuzzyPolicyForToken` picks a policy. */
17
+ fuzzy?: FuzzyPolicy | null;
18
+ /**
19
+ * Match characters that appear in order but not adjacently, so `pasbab` finds
20
+ * `paseo-babysit`. Defaults to on. Turn it off where a near miss has to read as
21
+ * no match at all: it widens far enough that most typos hit something, and a
22
+ * list that preselects its first row would then act on that row when the user
23
+ * presses Enter expecting nothing to happen.
24
+ */
25
+ subsequence?: boolean;
26
+ }
27
+ /**
28
+ * How much a typo in one query token is forgiven. Short tokens get
29
+ * transpositions and nothing else: at four characters a free substitution turns
30
+ * "main" into "mail", "maid", and "rain", while a swap can only ever reach the
31
+ * word the user meant. Null means the token is matched exactly.
32
+ */
33
+ export interface FuzzyPolicy {
34
+ maxEdits: number;
35
+ transpositionsOnly: boolean;
36
+ }
37
+ export declare function fuzzyPolicyForToken(token: string): FuzzyPolicy | null;
38
+ export declare function scoreMatch(query: string, text: string, options?: MatchOptions): MatchScore | null;
39
+ /** Match a query against a complete displayed path, including its separators. */
40
+ export declare function scorePathMatch(query: string, path: string): MatchScore | null;
41
+ export interface MatchRange {
42
+ start: number;
43
+ length: number;
44
+ }
45
+ /**
46
+ * Where a score's match actually landed, so a caller can mark it. Derived from
47
+ * a score rather than produced alongside one: ranking touches every candidate
48
+ * and needs no ranges, while only the handful of rows that get rendered do.
49
+ *
50
+ * The tier decides the shape. A substring hit is one span; a subsequence hit is
51
+ * the scattered characters it walked; a typo hit marks the whole word, because
52
+ * the characters the user got wrong are not in the text to point at.
53
+ */
54
+ export declare function matchRanges(query: string, text: string, score: MatchScore): MatchRange[];
55
+ export declare function compareMatchScores(a: MatchScore, b: MatchScore): number;
56
+ export declare function tokenizeQuery(query: string): string[];
57
+ export interface TextFieldsOptions {
58
+ /**
59
+ * Forgive typos. The budget is per token rather than per query, because a
60
+ * query mixes long words that can absorb an edit with short ones that cannot.
61
+ */
62
+ typoTolerant?: boolean;
63
+ /**
64
+ * See `MatchOptions.subsequence`. Applied per token, so turning it off means
65
+ * every token has to appear as a run of adjacent characters in some field —
66
+ * `lab des` still matches "Label as Design", `labdes` no longer does.
67
+ */
68
+ subsequence?: boolean;
69
+ }
70
+ export declare function scoreTextFields(query: string, fields: string[], options?: TextFieldsOptions): MatchScore | null;
71
+ //# sourceMappingURL=text-match.d.ts.map