@otto-code/protocol 0.5.0
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/README.md +12 -0
- package/dist/agent-attention-notification.d.ts +41 -0
- package/dist/agent-attention-notification.js +140 -0
- package/dist/agent-labels.d.ts +7 -0
- package/dist/agent-labels.js +11 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-personalities.d.ts +32 -0
- package/dist/agent-personalities.js +69 -0
- package/dist/agent-state-bucket.d.ts +14 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +479 -0
- package/dist/agent-types.js +22 -0
- package/dist/artifacts/rpc-schemas.d.ts +396 -0
- package/dist/artifacts/rpc-schemas.js +175 -0
- package/dist/artifacts/types.d.ts +166 -0
- package/dist/artifacts/types.js +73 -0
- package/dist/binary-frames/demux.d.ts +11 -0
- package/dist/binary-frames/demux.js +23 -0
- package/dist/binary-frames/file-transfer.d.ts +50 -0
- package/dist/binary-frames/file-transfer.js +107 -0
- package/dist/binary-frames/index.d.ts +4 -0
- package/dist/binary-frames/index.js +4 -0
- package/dist/binary-frames/terminal.d.ts +31 -0
- package/dist/binary-frames/terminal.js +99 -0
- package/dist/branch-slug.d.ts +14 -0
- package/dist/branch-slug.js +49 -0
- package/dist/browser-automation/capabilities.d.ts +7 -0
- package/dist/browser-automation/capabilities.js +31 -0
- package/dist/browser-automation/rpc-schemas.d.ts +1329 -0
- package/dist/browser-automation/rpc-schemas.js +555 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +103 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +22 -0
- package/dist/client-capabilities.d.ts +8 -0
- package/dist/client-capabilities.js +16 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-endpoints.d.ts +47 -0
- package/dist/daemon-endpoints.js +201 -0
- package/dist/default-personalities.d.ts +3 -0
- package/dist/default-personalities.js +127 -0
- package/dist/effort.d.ts +32 -0
- package/dist/effort.js +99 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +2 -0
- package/dist/generated/validation/ws-outbound.aot.js +48755 -0
- package/dist/git-hosting.d.ts +21 -0
- package/dist/git-hosting.js +36 -0
- package/dist/git-remote.d.ts +18 -0
- package/dist/git-remote.js +84 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +636 -0
- package/dist/loop/rpc-schemas.js +163 -0
- package/dist/messages.d.ts +38505 -0
- package/dist/messages.js +4719 -0
- package/dist/otto-config-schema.d.ts +136 -0
- package/dist/otto-config-schema.js +96 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/provider-config.d.ts +266 -0
- package/dist/provider-config.js +238 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +52 -0
- package/dist/provider-manifest.d.ts +34 -0
- package/dist/provider-manifest.js +227 -0
- package/dist/schedule/cron-expression.d.ts +13 -0
- package/dist/schedule/cron-expression.js +97 -0
- package/dist/schedule/rpc-schemas.d.ts +667 -0
- package/dist/schedule/rpc-schemas.js +155 -0
- package/dist/schedule/types.d.ts +236 -0
- package/dist/schedule/types.js +84 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +26 -0
- package/dist/terminal-input-mode.js +151 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +201 -0
- package/dist/terminal-profiles.d.ts +6 -0
- package/dist/terminal-profiles.js +28 -0
- package/dist/terminal-snapshot.d.ts +3 -0
- package/dist/terminal-snapshot.js +178 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/dist/tool-call-display.d.ts +11 -0
- package/dist/tool-call-display.js +135 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +7256 -0
- package/dist/validation/ws-outbound-schema-metadata.js +3 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +8 -0
- package/package.json +42 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AgentProviderSchema } from "../provider-manifest.js";
|
|
3
|
+
export const LoopLogEntrySchema = z.object({
|
|
4
|
+
seq: z.number().int().positive(),
|
|
5
|
+
timestamp: z.string(),
|
|
6
|
+
iteration: z.number().int().positive().nullable(),
|
|
7
|
+
source: z.enum(["loop", "worker", "verifier", "verify-check"]),
|
|
8
|
+
level: z.enum(["info", "error"]),
|
|
9
|
+
text: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export const LoopVerifyCheckResultSchema = z.object({
|
|
12
|
+
command: z.string(),
|
|
13
|
+
exitCode: z.number().int(),
|
|
14
|
+
passed: z.boolean(),
|
|
15
|
+
stdout: z.string(),
|
|
16
|
+
stderr: z.string(),
|
|
17
|
+
startedAt: z.string(),
|
|
18
|
+
completedAt: z.string(),
|
|
19
|
+
});
|
|
20
|
+
export const LoopVerifyPromptResultSchema = z.object({
|
|
21
|
+
passed: z.boolean(),
|
|
22
|
+
reason: z.string(),
|
|
23
|
+
verifierAgentId: z.string().nullable(),
|
|
24
|
+
startedAt: z.string(),
|
|
25
|
+
completedAt: z.string(),
|
|
26
|
+
});
|
|
27
|
+
export const LoopIterationRecordSchema = z.object({
|
|
28
|
+
index: z.number().int().positive(),
|
|
29
|
+
workerAgentId: z.string().nullable(),
|
|
30
|
+
workerStartedAt: z.string(),
|
|
31
|
+
workerCompletedAt: z.string().nullable(),
|
|
32
|
+
verifierAgentId: z.string().nullable(),
|
|
33
|
+
status: z.enum(["running", "succeeded", "failed", "stopped"]),
|
|
34
|
+
workerOutcome: z.enum(["completed", "failed", "canceled"]).nullable(),
|
|
35
|
+
failureReason: z.string().nullable(),
|
|
36
|
+
verifyChecks: z.array(LoopVerifyCheckResultSchema),
|
|
37
|
+
verifyPrompt: LoopVerifyPromptResultSchema.nullable(),
|
|
38
|
+
});
|
|
39
|
+
export const LoopRecordSchema = z.object({
|
|
40
|
+
id: z.string(),
|
|
41
|
+
name: z.string().nullable(),
|
|
42
|
+
prompt: z.string(),
|
|
43
|
+
cwd: z.string(),
|
|
44
|
+
provider: AgentProviderSchema,
|
|
45
|
+
model: z.string().nullable(),
|
|
46
|
+
modeId: z.string().nullable().default(null),
|
|
47
|
+
workerProvider: AgentProviderSchema.nullable(),
|
|
48
|
+
workerModel: z.string().nullable(),
|
|
49
|
+
verifierProvider: AgentProviderSchema.nullable(),
|
|
50
|
+
verifierModel: z.string().nullable(),
|
|
51
|
+
verifierModeId: z.string().nullable().default(null),
|
|
52
|
+
verifyPrompt: z.string().nullable(),
|
|
53
|
+
verifyChecks: z.array(z.string()),
|
|
54
|
+
archive: z.boolean(),
|
|
55
|
+
sleepMs: z.number().int().nonnegative(),
|
|
56
|
+
maxIterations: z.number().int().positive().nullable(),
|
|
57
|
+
maxTimeMs: z.number().int().positive().nullable(),
|
|
58
|
+
status: z.enum(["running", "succeeded", "failed", "stopped"]),
|
|
59
|
+
createdAt: z.string(),
|
|
60
|
+
updatedAt: z.string(),
|
|
61
|
+
startedAt: z.string(),
|
|
62
|
+
completedAt: z.string().nullable(),
|
|
63
|
+
stopRequestedAt: z.string().nullable(),
|
|
64
|
+
iterations: z.array(LoopIterationRecordSchema),
|
|
65
|
+
logs: z.array(LoopLogEntrySchema),
|
|
66
|
+
nextLogSeq: z.number().int().positive(),
|
|
67
|
+
activeIteration: z.number().int().positive().nullable(),
|
|
68
|
+
activeWorkerAgentId: z.string().nullable(),
|
|
69
|
+
activeVerifierAgentId: z.string().nullable(),
|
|
70
|
+
});
|
|
71
|
+
export const LoopListItemSchema = z.object({
|
|
72
|
+
id: z.string(),
|
|
73
|
+
name: z.string().nullable(),
|
|
74
|
+
status: z.enum(["running", "succeeded", "failed", "stopped"]),
|
|
75
|
+
cwd: z.string(),
|
|
76
|
+
createdAt: z.string(),
|
|
77
|
+
updatedAt: z.string(),
|
|
78
|
+
activeIteration: z.number().int().positive().nullable(),
|
|
79
|
+
});
|
|
80
|
+
export const LoopRunRequestSchema = z.object({
|
|
81
|
+
type: z.literal("loop/run"),
|
|
82
|
+
requestId: z.string(),
|
|
83
|
+
prompt: z.string().trim().min(1),
|
|
84
|
+
cwd: z.string(),
|
|
85
|
+
provider: AgentProviderSchema.optional(),
|
|
86
|
+
model: z.string().trim().min(1).optional(),
|
|
87
|
+
modeId: z.string().trim().min(1).optional(),
|
|
88
|
+
workerProvider: AgentProviderSchema.optional(),
|
|
89
|
+
workerModel: z.string().trim().min(1).optional(),
|
|
90
|
+
verifierProvider: AgentProviderSchema.optional(),
|
|
91
|
+
verifierModel: z.string().trim().min(1).optional(),
|
|
92
|
+
verifierModeId: z.string().trim().min(1).optional(),
|
|
93
|
+
verifyPrompt: z.string().trim().min(1).optional(),
|
|
94
|
+
verifyChecks: z.array(z.string().trim().min(1)).optional(),
|
|
95
|
+
archive: z.boolean().optional(),
|
|
96
|
+
name: z.string().trim().min(1).optional(),
|
|
97
|
+
sleepMs: z.number().int().nonnegative().optional(),
|
|
98
|
+
maxIterations: z.number().int().positive().optional(),
|
|
99
|
+
maxTimeMs: z.number().int().positive().optional(),
|
|
100
|
+
});
|
|
101
|
+
export const LoopListRequestSchema = z.object({
|
|
102
|
+
type: z.literal("loop/list"),
|
|
103
|
+
requestId: z.string(),
|
|
104
|
+
});
|
|
105
|
+
export const LoopInspectRequestSchema = z.object({
|
|
106
|
+
type: z.literal("loop/inspect"),
|
|
107
|
+
requestId: z.string(),
|
|
108
|
+
id: z.string().trim().min(1),
|
|
109
|
+
});
|
|
110
|
+
export const LoopLogsRequestSchema = z.object({
|
|
111
|
+
type: z.literal("loop/logs"),
|
|
112
|
+
requestId: z.string(),
|
|
113
|
+
id: z.string().trim().min(1),
|
|
114
|
+
afterSeq: z.number().int().nonnegative().optional(),
|
|
115
|
+
});
|
|
116
|
+
export const LoopStopRequestSchema = z.object({
|
|
117
|
+
type: z.literal("loop/stop"),
|
|
118
|
+
requestId: z.string(),
|
|
119
|
+
id: z.string().trim().min(1),
|
|
120
|
+
});
|
|
121
|
+
export const LoopRunResponseSchema = z.object({
|
|
122
|
+
type: z.literal("loop/run/response"),
|
|
123
|
+
payload: z.object({
|
|
124
|
+
requestId: z.string(),
|
|
125
|
+
loop: LoopRecordSchema.nullable(),
|
|
126
|
+
error: z.string().nullable(),
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
export const LoopListResponseSchema = z.object({
|
|
130
|
+
type: z.literal("loop/list/response"),
|
|
131
|
+
payload: z.object({
|
|
132
|
+
requestId: z.string(),
|
|
133
|
+
loops: z.array(LoopListItemSchema),
|
|
134
|
+
error: z.string().nullable(),
|
|
135
|
+
}),
|
|
136
|
+
});
|
|
137
|
+
export const LoopInspectResponseSchema = z.object({
|
|
138
|
+
type: z.literal("loop/inspect/response"),
|
|
139
|
+
payload: z.object({
|
|
140
|
+
requestId: z.string(),
|
|
141
|
+
loop: LoopRecordSchema.nullable(),
|
|
142
|
+
error: z.string().nullable(),
|
|
143
|
+
}),
|
|
144
|
+
});
|
|
145
|
+
export const LoopLogsResponseSchema = z.object({
|
|
146
|
+
type: z.literal("loop/logs/response"),
|
|
147
|
+
payload: z.object({
|
|
148
|
+
requestId: z.string(),
|
|
149
|
+
loop: LoopRecordSchema.nullable(),
|
|
150
|
+
entries: z.array(LoopLogEntrySchema),
|
|
151
|
+
nextCursor: z.number().int().nonnegative(),
|
|
152
|
+
error: z.string().nullable(),
|
|
153
|
+
}),
|
|
154
|
+
});
|
|
155
|
+
export const LoopStopResponseSchema = z.object({
|
|
156
|
+
type: z.literal("loop/stop/response"),
|
|
157
|
+
payload: z.object({
|
|
158
|
+
requestId: z.string(),
|
|
159
|
+
loop: LoopRecordSchema.nullable(),
|
|
160
|
+
error: z.string().nullable(),
|
|
161
|
+
}),
|
|
162
|
+
});
|
|
163
|
+
//# sourceMappingURL=rpc-schemas.js.map
|