@getpaseo/protocol 0.1.103 → 0.1.104-beta.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.
package/dist/messages.js CHANGED
@@ -8,6 +8,7 @@ import { normalizeAgentModelDefinition, TOOL_CALL_ICON_NAMES } from "./agent-typ
8
8
  import { ChatCreateRequestSchema, ChatListRequestSchema, ChatInspectRequestSchema, ChatDeleteRequestSchema, ChatPostRequestSchema, ChatReadRequestSchema, ChatWaitRequestSchema, ChatCreateResponseSchema, ChatListResponseSchema, ChatInspectResponseSchema, ChatDeleteResponseSchema, ChatPostResponseSchema, ChatReadResponseSchema, ChatWaitResponseSchema, } from "./chat/rpc-schemas.js";
9
9
  import { ScheduleCreateRequestSchema, ScheduleListRequestSchema, ScheduleInspectRequestSchema, ScheduleLogsRequestSchema, SchedulePauseRequestSchema, ScheduleResumeRequestSchema, ScheduleDeleteRequestSchema, ScheduleRunOnceRequestSchema, ScheduleUpdateRequestSchema, ScheduleCreateResponseSchema, ScheduleListResponseSchema, ScheduleInspectResponseSchema, ScheduleLogsResponseSchema, SchedulePauseResponseSchema, ScheduleResumeResponseSchema, ScheduleDeleteResponseSchema, ScheduleRunOnceResponseSchema, ScheduleUpdateResponseSchema, } from "@getpaseo/protocol/schedule/rpc-schemas";
10
10
  import { LoopRunRequestSchema, LoopListRequestSchema, LoopInspectRequestSchema, LoopLogsRequestSchema, LoopStopRequestSchema, LoopRunResponseSchema, LoopListResponseSchema, LoopInspectResponseSchema, LoopLogsResponseSchema, LoopStopResponseSchema, } from "@getpaseo/protocol/loop/rpc-schemas";
11
+ import { BrowserAutomationExecuteRequestSchema, BrowserAutomationExecuteResponseSchema, } from "./browser-automation/rpc-schemas.js";
11
12
  import { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, PaseoConfigRevisionSchema, ProjectConfigRpcErrorSchema, } from "@getpaseo/protocol/paseo-config-schema";
12
13
  export { PaseoConfigRawSchema, PaseoLifecycleCommandRawSchema, PaseoMetadataGenerationEntrySchema, PaseoMetadataGenerationSchema, PaseoScriptEntryRawSchema, PaseoWorktreeConfigRawSchema, };
13
14
  // ---------------------------------------------------------------------------
@@ -48,6 +49,11 @@ export const TerminalProfileSchema = z
48
49
  icon: z.string().optional(),
49
50
  })
50
51
  .passthrough();
52
+ const MutableBrowserToolsConfigSchema = z
53
+ .object({
54
+ enabled: z.boolean().default(false),
55
+ })
56
+ .passthrough();
51
57
  export const MutableDaemonConfigSchema = z
52
58
  .object({
53
59
  mcp: z
@@ -55,6 +61,7 @@ export const MutableDaemonConfigSchema = z
55
61
  injectIntoAgents: z.boolean(),
56
62
  })
57
63
  .passthrough(),
64
+ browserTools: MutableBrowserToolsConfigSchema.default({ enabled: false }),
58
65
  providers: z.record(z.string(), MutableDaemonProviderConfigSchema).default({}),
59
66
  metadataGeneration: MutableMetadataGenerationConfigSchema.default({ providers: [] }),
60
67
  autoArchiveAfterMerge: z.boolean().default(false),
@@ -66,6 +73,7 @@ export const MutableDaemonConfigSchema = z
66
73
  export const MutableDaemonConfigPatchSchema = z
67
74
  .object({
68
75
  mcp: MutableDaemonConfigSchema.shape.mcp.partial().optional(),
76
+ browserTools: MutableBrowserToolsConfigSchema.partial().optional(),
69
77
  providers: z
70
78
  .record(z.string(), MutableDaemonProviderConfigSchema.partial().passthrough())
71
79
  .optional(),
@@ -133,8 +141,8 @@ const AgentModelDefinitionSchema = z
133
141
  label: z.string(),
134
142
  description: z.string().optional(),
135
143
  isDefault: z.boolean().optional(),
136
- contextWindowMaxTokens: z.number().optional(),
137
144
  metadata: z.record(z.string(), z.unknown()).optional(),
145
+ contextWindowMaxTokens: z.number().optional(),
138
146
  thinkingOptions: z.array(AgentSelectOptionSchema).optional(),
139
147
  defaultThinkingOptionId: z.string().optional(),
140
148
  })
@@ -1697,6 +1705,7 @@ export const CaptureTerminalRequestSchema = z.object({
1697
1705
  requestId: z.string(),
1698
1706
  });
1699
1707
  export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
1708
+ BrowserAutomationExecuteResponseSchema,
1700
1709
  VoiceAudioChunkMessageSchema,
1701
1710
  AbortRequestMessageSchema,
1702
1711
  AudioPlayedMessageSchema,
@@ -3618,6 +3627,7 @@ export const DaemonUpdateProgressMessageSchema = z.object({
3618
3627
  }),
3619
3628
  });
3620
3629
  export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
3630
+ BrowserAutomationExecuteRequestSchema,
3621
3631
  ActivityLogMessageSchema,
3622
3632
  AssistantChunkMessageSchema,
3623
3633
  AudioOutputMessageSchema,
@@ -3779,6 +3789,7 @@ export const WSHelloMessageSchema = z.object({
3779
3789
  [CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
3780
3790
  [CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
3781
3791
  [CLIENT_CAPS.terminalReflowableSnapshot]: z.boolean().optional(),
3792
+ [CLIENT_CAPS.desktopBrowserAutomation]: z.boolean().optional(),
3782
3793
  })
3783
3794
  .passthrough()
3784
3795
  .optional(),
@@ -40,6 +40,7 @@ export const ACP_PROVIDER_ICON_NAMES = [
40
40
  "qwen-code",
41
41
  "sigit",
42
42
  "stakpak",
43
+ "traecli",
43
44
  "vtcode",
44
45
  ];
45
46
  export const TERMINAL_PROFILE_ICON_NAMES = ["agy"];
@@ -0,0 +1,13 @@
1
+ export interface CronFieldMatcher {
2
+ matches(value: number): boolean;
3
+ }
4
+ export interface ParsedCronExpression {
5
+ minute: CronFieldMatcher;
6
+ hour: CronFieldMatcher;
7
+ dayOfMonth: CronFieldMatcher;
8
+ month: CronFieldMatcher;
9
+ dayOfWeek: CronFieldMatcher;
10
+ }
11
+ export declare function parseCronExpression(expression: string): ParsedCronExpression;
12
+ export declare function validateCronExpression(expression: string): string | null;
13
+ //# sourceMappingURL=cron-expression.d.ts.map
@@ -0,0 +1,97 @@
1
+ const CRON_FIELD_BOUNDS = [
2
+ { min: 0, max: 59, name: "minute" },
3
+ { min: 0, max: 23, name: "hour" },
4
+ { min: 1, max: 31, name: "day-of-month" },
5
+ { min: 1, max: 12, name: "month" },
6
+ { min: 0, max: 6, name: "day-of-week" },
7
+ ];
8
+ function createRange(start, end, step) {
9
+ const values = [];
10
+ for (let value = start; value <= end; value += step) {
11
+ values.push(value);
12
+ }
13
+ return values;
14
+ }
15
+ function parseStepPart(part, bounds) {
16
+ const stepParts = part.split("/");
17
+ if (stepParts.length > 2) {
18
+ throw new Error(`Invalid cron ${bounds.name} step`);
19
+ }
20
+ const [base, stepSource] = stepParts;
21
+ const normalizedStep = stepSource?.trim();
22
+ const step = normalizedStep === undefined ? 1 : Number.parseInt(normalizedStep, 10);
23
+ if (!Number.isInteger(step) ||
24
+ step <= 0 ||
25
+ (normalizedStep !== undefined && String(step) !== normalizedStep)) {
26
+ throw new Error(`Invalid cron ${bounds.name} step`);
27
+ }
28
+ return { base, step };
29
+ }
30
+ function parseField(source, bounds) {
31
+ const trimmed = source.trim();
32
+ if (!trimmed) {
33
+ throw new Error(`Invalid cron ${bounds.name} field`);
34
+ }
35
+ const allowed = new Set();
36
+ for (const rawPart of trimmed.split(",")) {
37
+ const part = rawPart.trim();
38
+ if (!part) {
39
+ throw new Error(`Invalid cron ${bounds.name} field`);
40
+ }
41
+ const { base, step } = parseStepPart(part, bounds);
42
+ if (base === "*") {
43
+ for (const value of createRange(bounds.min, bounds.max, step)) {
44
+ allowed.add(value);
45
+ }
46
+ continue;
47
+ }
48
+ const rangeMatch = base.match(/^(\d+)-(\d+)$/);
49
+ if (rangeMatch) {
50
+ const start = Number.parseInt(rangeMatch[1], 10);
51
+ const end = Number.parseInt(rangeMatch[2], 10);
52
+ if (start > end || start < bounds.min || end > bounds.max) {
53
+ throw new Error(`Invalid cron ${bounds.name} range`);
54
+ }
55
+ for (const value of createRange(start, end, step)) {
56
+ allowed.add(value);
57
+ }
58
+ continue;
59
+ }
60
+ if (!/^\d+$/.test(base)) {
61
+ throw new Error(`Invalid cron ${bounds.name} value`);
62
+ }
63
+ const value = Number.parseInt(base, 10);
64
+ if (!Number.isInteger(value) || value < bounds.min || value > bounds.max) {
65
+ throw new Error(`Invalid cron ${bounds.name} value`);
66
+ }
67
+ allowed.add(value);
68
+ }
69
+ return {
70
+ matches(value) {
71
+ return allowed.has(value);
72
+ },
73
+ };
74
+ }
75
+ export function parseCronExpression(expression) {
76
+ const parts = expression.trim().split(/\s+/);
77
+ if (parts.length !== 5) {
78
+ throw new Error("Cron expressions must have 5 fields");
79
+ }
80
+ return {
81
+ minute: parseField(parts[0], CRON_FIELD_BOUNDS[0]),
82
+ hour: parseField(parts[1], CRON_FIELD_BOUNDS[1]),
83
+ dayOfMonth: parseField(parts[2], CRON_FIELD_BOUNDS[2]),
84
+ month: parseField(parts[3], CRON_FIELD_BOUNDS[3]),
85
+ dayOfWeek: parseField(parts[4], CRON_FIELD_BOUNDS[4]),
86
+ };
87
+ }
88
+ export function validateCronExpression(expression) {
89
+ try {
90
+ parseCronExpression(expression);
91
+ return null;
92
+ }
93
+ catch (error) {
94
+ return error instanceof Error ? error.message : "Invalid cron expression";
95
+ }
96
+ }
97
+ //# sourceMappingURL=cron-expression.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/protocol",
3
- "version": "0.1.103",
3
+ "version": "0.1.104-beta.1",
4
4
  "description": "Paseo shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",