@otto-code/protocol 0.8.10 → 0.8.13

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 (83) hide show
  1. package/dist/agent-labels.d.ts +3 -0
  2. package/dist/agent-labels.js +10 -0
  3. package/dist/agent-personalities.d.ts +4 -3
  4. package/dist/agent-personalities.js +13 -20
  5. package/dist/agent-queue.d.ts +87 -0
  6. package/dist/agent-queue.js +106 -0
  7. package/dist/agent-types.d.ts +24 -4
  8. package/dist/binary-frames/terminal.d.ts +4 -0
  9. package/dist/binary-frames/terminal.js +1 -0
  10. package/dist/brain.d.ts +2412 -0
  11. package/dist/brain.js +1100 -0
  12. package/dist/chat/rpc-schemas.js +1 -0
  13. package/dist/chat/types.js +1 -0
  14. package/dist/client-capabilities.d.ts +3 -0
  15. package/dist/client-capabilities.js +14 -0
  16. package/dist/code-intelligence.d.ts +917 -0
  17. package/dist/code-intelligence.js +699 -0
  18. package/dist/communications.d.ts +1106 -0
  19. package/dist/communications.js +384 -0
  20. package/dist/context.d.ts +787 -0
  21. package/dist/context.js +295 -0
  22. package/dist/daemon-config.d.ts +383 -0
  23. package/dist/daemon-config.js +401 -0
  24. package/dist/file-operations.d.ts +380 -0
  25. package/dist/file-operations.js +282 -0
  26. package/dist/generated/validation/ws-outbound.aot.js +67260 -57392
  27. package/dist/git-hosting.d.ts +117 -0
  28. package/dist/git-hosting.js +109 -0
  29. package/dist/git-operations.d.ts +255 -0
  30. package/dist/git-operations.js +221 -0
  31. package/dist/integration-authorization.d.ts +195 -0
  32. package/dist/integration-authorization.js +125 -0
  33. package/dist/kanban.d.ts +341 -0
  34. package/dist/kanban.js +273 -0
  35. package/dist/loop/rpc-schemas.d.ts +6 -6
  36. package/dist/loop/rpc-schemas.js +1 -0
  37. package/dist/meetings.d.ts +95 -0
  38. package/dist/meetings.js +57 -0
  39. package/dist/messages.d.ts +11175 -11039
  40. package/dist/messages.js +4756 -8700
  41. package/dist/orchestration.d.ts +726 -0
  42. package/dist/orchestration.js +232 -0
  43. package/dist/personality-schemas.d.ts +221 -0
  44. package/dist/personality-schemas.js +340 -0
  45. package/dist/preview.d.ts +140 -0
  46. package/dist/preview.js +98 -0
  47. package/dist/project-knowledge.d.ts +740 -0
  48. package/dist/project-knowledge.js +229 -0
  49. package/dist/project-links.d.ts +102 -0
  50. package/dist/project-links.js +62 -0
  51. package/dist/provider-config.d.ts +87 -2
  52. package/dist/provider-config.js +110 -0
  53. package/dist/provider-manifest.js +7 -0
  54. package/dist/provider-snapshot-codec.d.ts +18 -0
  55. package/dist/provider-snapshot-codec.js +71 -0
  56. package/dist/refine.d.ts +93 -0
  57. package/dist/refine.js +78 -0
  58. package/dist/schedule/rpc-schemas.d.ts +55 -111
  59. package/dist/schedule/types.d.ts +16 -37
  60. package/dist/schedule/types.js +1 -11
  61. package/dist/search/text-match.d.ts +55 -0
  62. package/dist/search/text-match.js +262 -0
  63. package/dist/speech.d.ts +180 -0
  64. package/dist/speech.js +177 -0
  65. package/dist/storage.d.ts +79 -0
  66. package/dist/storage.js +107 -0
  67. package/dist/suggested-tasks.d.ts +106 -0
  68. package/dist/suggested-tasks.js +81 -0
  69. package/dist/terminal-compatibility.d.ts +55 -0
  70. package/dist/terminal-compatibility.js +35 -0
  71. package/dist/terminal-input-mode.d.ts +4 -0
  72. package/dist/terminal-input-mode.js +35 -6
  73. package/dist/terminal-key-input.js +15 -6
  74. package/dist/terminal-profiles.d.ts +35 -0
  75. package/dist/terminal-profiles.js +246 -4
  76. package/dist/tool-call-display.d.ts +2 -2
  77. package/dist/tool-call-display.js +6 -6
  78. package/dist/usage-stats.d.ts +255 -0
  79. package/dist/usage-stats.js +162 -0
  80. package/dist/validation/ws-outbound-schema-metadata.d.ts +1906 -266
  81. package/dist/worktree-ops.d.ts +81 -0
  82. package/dist/worktree-ops.js +88 -0
  83. package/package.json +1 -1
package/dist/speech.js ADDED
@@ -0,0 +1,177 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto speech wire schemas: the speech.* settings, TTS preview and speak RPCs, the local STT/TTS model options, and the mutable speech daemon config. Fork-only capability, so it owns its schemas; messages.ts re-exports them.
4
+ */
5
+ // Speech engine ids and model ids stay plain strings on the wire so adding an
6
+ // engine or model never breaks an older peer; the daemon validates values
7
+ // against its own catalog when applying a patch.
8
+ export const MutableSpeechSttConfigSchema = z
9
+ .object({
10
+ provider: z.string().optional(),
11
+ model: z.string().optional(),
12
+ language: z.string().optional(),
13
+ })
14
+ .passthrough();
15
+ export const MutableSpeechTtsConfigSchema = z
16
+ .object({
17
+ provider: z.string().optional(),
18
+ model: z.string().optional(),
19
+ // Voice name (e.g. "af_heart" for local Kokoro, "alloy" for OpenAI). The
20
+ // daemon maps local voice names to sherpa speaker ids internally.
21
+ voice: z.string().optional(),
22
+ speed: z.number().optional(),
23
+ })
24
+ .passthrough();
25
+ export const MutableSpeechDictationConfigSchema = z
26
+ .object({
27
+ enabled: z.boolean().optional(),
28
+ stt: MutableSpeechSttConfigSchema.optional(),
29
+ })
30
+ .passthrough();
31
+ export const MutableSpeechVoiceModeConfigSchema = z
32
+ .object({
33
+ enabled: z.boolean().optional(),
34
+ stt: MutableSpeechSttConfigSchema.optional(),
35
+ tts: MutableSpeechTtsConfigSchema.optional(),
36
+ })
37
+ .passthrough();
38
+ // Credentials for the OpenAI speech engine. The key persists to config.json
39
+ // (providers.openai.apiKey) like provider env keys do, and is echoed back in
40
+ // get_daemon_config_response the same way provider connection keys are.
41
+ export const MutableSpeechOpenAiConfigSchema = z
42
+ .object({
43
+ apiKey: z.string().optional(),
44
+ })
45
+ .passthrough();
46
+ export const MutableSpeechConfigSchema = z
47
+ .object({
48
+ dictation: MutableSpeechDictationConfigSchema.optional(),
49
+ voiceMode: MutableSpeechVoiceModeConfigSchema.optional(),
50
+ openai: MutableSpeechOpenAiConfigSchema.optional(),
51
+ })
52
+ .passthrough();
53
+ export const SpeechSettingsGetOptionsRequestSchema = z.object({
54
+ type: z.literal("speech.settings.get_options.request"),
55
+ requestId: z.string(),
56
+ });
57
+ // One-shot "read this text aloud with this voice" for the voice-preview button.
58
+ // The voice binding is soft, matching personality-voice semantics: an
59
+ // unavailable voice degrades to the host default at synthesis time, and an
60
+ // absent voice uses the host default. Synthesis runs on the host's active TTS
61
+ // provider (there is no per-request provider switch); model/provider are hints.
62
+ export const SpeechTtsPreviewRequestSchema = z.object({
63
+ type: z.literal("speech.tts.preview.request"),
64
+ requestId: z.string(),
65
+ text: z.string(),
66
+ voice: z
67
+ .object({
68
+ provider: z.string().optional(),
69
+ model: z.string().optional(),
70
+ name: z.string(),
71
+ })
72
+ .passthrough()
73
+ .optional(),
74
+ });
75
+ // Read a full assistant message aloud on demand (the per-message playback
76
+ // button). Unlike the preview RPC - which truncates to a short sample and
77
+ // returns one buffered clip - this synthesizes the ENTIRE text and streams it
78
+ // back as `audio_output` chunks (isVoiceMode: false), one group per sentence, so
79
+ // playback starts after the first sentence instead of the whole message.
80
+ // `voice` (optional) is the speaking agent's personality voice, resolved on the
81
+ // client from the live personality (same soft-binding semantics as the preview
82
+ // button); absent uses the host default. The correlated response lands once
83
+ // playback finishes, is canceled, or errors.
84
+ export const SpeechTtsSpeakRequestSchema = z.object({
85
+ type: z.literal("speech.tts.speak.request"),
86
+ requestId: z.string(),
87
+ text: z.string(),
88
+ voice: z
89
+ .object({
90
+ provider: z.string().optional(),
91
+ model: z.string().optional(),
92
+ name: z.string(),
93
+ })
94
+ .passthrough()
95
+ .optional(),
96
+ });
97
+ // Stop the session's in-flight message playback (the button's stop press).
98
+ // Aborts synthesis on the host; the pending speak response then resolves as
99
+ // canceled and the client flushes its own audio queue.
100
+ export const SpeechTtsSpeakCancelRequestSchema = z.object({
101
+ type: z.literal("speech.tts.speak.cancel.request"),
102
+ requestId: z.string(),
103
+ });
104
+ export const SpeechEngineOptionSchema = z.object({
105
+ id: z.string(),
106
+ available: z.boolean(),
107
+ reason: z.string().optional(),
108
+ });
109
+ export const LocalSpeechSttModelOptionSchema = z.object({
110
+ id: z.string(),
111
+ // Short display name (e.g. "Parakeet v2 (English)"); older daemons omit it
112
+ // and clients fall back to the id.
113
+ label: z.string().optional(),
114
+ description: z.string(),
115
+ });
116
+ export const LocalSpeechTtsModelOptionSchema = z.object({
117
+ id: z.string(),
118
+ label: z.string().optional(),
119
+ description: z.string(),
120
+ voices: z.array(z.string()),
121
+ defaultVoice: z.string(),
122
+ });
123
+ export const SpeechSettingsGetOptionsResponseSchema = z.object({
124
+ type: z.literal("speech.settings.get_options.response"),
125
+ payload: z
126
+ .object({
127
+ requestId: z.string(),
128
+ options: z.object({
129
+ sttEngines: z.array(SpeechEngineOptionSchema),
130
+ ttsEngines: z.array(SpeechEngineOptionSchema),
131
+ local: z.object({
132
+ sttModels: z.array(LocalSpeechSttModelOptionSchema),
133
+ ttsModels: z.array(LocalSpeechTtsModelOptionSchema),
134
+ }),
135
+ openai: z.object({
136
+ configured: z.boolean(),
137
+ sttModels: z.array(z.string()),
138
+ ttsModels: z.array(z.string()),
139
+ ttsVoices: z.array(z.string()),
140
+ }),
141
+ }),
142
+ })
143
+ .passthrough(),
144
+ });
145
+ export const SpeechTtsPreviewResponseSchema = z.object({
146
+ type: z.literal("speech.tts.preview.response"),
147
+ payload: z
148
+ .object({
149
+ requestId: z.string(),
150
+ // base64-encoded audio bytes; absent when synthesis failed (see error).
151
+ audio: z.string().optional(),
152
+ // Media type carrying the sample rate, e.g. "audio/pcm;rate=24000",
153
+ // so the client audio engine plays it back at the correct pitch.
154
+ format: z.string().optional(),
155
+ // Human-readable failure reason when audio could not be produced.
156
+ error: z.string().optional(),
157
+ })
158
+ .passthrough(),
159
+ });
160
+ export const SpeechTtsSpeakResponseSchema = z.object({
161
+ type: z.literal("speech.tts.speak.response"),
162
+ payload: z
163
+ .object({
164
+ requestId: z.string(),
165
+ // True when the full message played to completion; absent/false when it was
166
+ // canceled or produced no audio. `error` carries a human-readable failure.
167
+ ok: z.boolean().optional(),
168
+ canceled: z.boolean().optional(),
169
+ error: z.string().optional(),
170
+ })
171
+ .passthrough(),
172
+ });
173
+ export const SpeechTtsSpeakCancelResponseSchema = z.object({
174
+ type: z.literal("speech.tts.speak.cancel.response"),
175
+ payload: z.object({ requestId: z.string() }).passthrough(),
176
+ });
177
+ //# sourceMappingURL=speech.js.map
@@ -0,0 +1,79 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto storage wire schemas: the history.agents.* archive and the attachments.images.* RPCs that report and clear daemon-side storage. Fork-only capability, so it owns its schemas; messages.ts re-exports them.
4
+ */
5
+ export declare const HistoryAgentsClearArchivedRequestSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"history.agents.clear_archived.request">;
7
+ olderThanDays: z.ZodDefault<z.ZodNumber>;
8
+ dryRun: z.ZodDefault<z.ZodBoolean>;
9
+ requestId: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const HistoryAgentsClearArchivedResponseSchema: z.ZodObject<{
12
+ type: z.ZodLiteral<"history.agents.clear_archived.response">;
13
+ payload: z.ZodObject<{
14
+ matched: z.ZodNumber;
15
+ deleted: z.ZodNumber;
16
+ failed: z.ZodNumber;
17
+ agentIds: z.ZodArray<z.ZodString>;
18
+ dryRun: z.ZodBoolean;
19
+ error: z.ZodNullable<z.ZodString>;
20
+ requestId: z.ZodString;
21
+ ottoBytes: z.ZodOptional<z.ZodNumber>;
22
+ reclaimedBytes: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>;
25
+ export declare const HistoryAgentsStorageStatsRequestSchema: z.ZodObject<{
26
+ type: z.ZodLiteral<"history.agents.get_storage_stats.request">;
27
+ requestId: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export declare const HistoryAgentsStorageStatsResponseSchema: z.ZodObject<{
30
+ type: z.ZodLiteral<"history.agents.get_storage_stats.response">;
31
+ payload: z.ZodObject<{
32
+ archivedCount: z.ZodNumber;
33
+ totalBytes: z.ZodNumber;
34
+ error: z.ZodNullable<z.ZodString>;
35
+ requestId: z.ZodString;
36
+ }, z.core.$strip>;
37
+ }, z.core.$strip>;
38
+ export declare const AttachmentsImagesStatsRequestSchema: z.ZodObject<{
39
+ type: z.ZodLiteral<"attachments.images.get_stats.request">;
40
+ requestId: z.ZodString;
41
+ }, z.core.$strip>;
42
+ export declare const AttachmentsImagesStatsResponseSchema: z.ZodObject<{
43
+ type: z.ZodLiteral<"attachments.images.get_stats.response">;
44
+ payload: z.ZodObject<{
45
+ fileCount: z.ZodNumber;
46
+ totalBytes: z.ZodNumber;
47
+ oldestAt: z.ZodNullable<z.ZodString>;
48
+ maxAgeDays: z.ZodNumber;
49
+ maxTotalMb: z.ZodNumber;
50
+ error: z.ZodNullable<z.ZodString>;
51
+ requestId: z.ZodString;
52
+ }, z.core.$strip>;
53
+ }, z.core.$strip>;
54
+ export declare const AttachmentsImagesClearRequestSchema: z.ZodObject<{
55
+ type: z.ZodLiteral<"attachments.images.clear.request">;
56
+ olderThanDays: z.ZodDefault<z.ZodNumber>;
57
+ dryRun: z.ZodDefault<z.ZodBoolean>;
58
+ requestId: z.ZodString;
59
+ }, z.core.$strip>;
60
+ export declare const AttachmentsImagesClearResponseSchema: z.ZodObject<{
61
+ type: z.ZodLiteral<"attachments.images.clear.response">;
62
+ payload: z.ZodObject<{
63
+ matched: z.ZodNumber;
64
+ deleted: z.ZodNumber;
65
+ freedBytes: z.ZodNumber;
66
+ dryRun: z.ZodBoolean;
67
+ error: z.ZodNullable<z.ZodString>;
68
+ requestId: z.ZodString;
69
+ }, z.core.$strip>;
70
+ }, z.core.$strip>;
71
+ export type HistoryAgentsClearArchivedRequest = z.infer<typeof HistoryAgentsClearArchivedRequestSchema>;
72
+ export type HistoryAgentsClearArchivedResponse = z.infer<typeof HistoryAgentsClearArchivedResponseSchema>;
73
+ export type HistoryAgentsStorageStatsRequest = z.infer<typeof HistoryAgentsStorageStatsRequestSchema>;
74
+ export type HistoryAgentsStorageStatsResponse = z.infer<typeof HistoryAgentsStorageStatsResponseSchema>;
75
+ export type AttachmentsImagesStatsRequest = z.infer<typeof AttachmentsImagesStatsRequestSchema>;
76
+ export type AttachmentsImagesStatsResponse = z.infer<typeof AttachmentsImagesStatsResponseSchema>;
77
+ export type AttachmentsImagesClearRequest = z.infer<typeof AttachmentsImagesClearRequestSchema>;
78
+ export type AttachmentsImagesClearResponse = z.infer<typeof AttachmentsImagesClearResponseSchema>;
79
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1,107 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto storage wire schemas: the history.agents.* archive and the attachments.images.* RPCs that report and clear daemon-side storage. Fork-only capability, so it owns its schemas; messages.ts re-exports them.
4
+ */
5
+ // ── History management ──────────────────────────────────────────────────────
6
+ // Bulk counterpart to the existing flat `delete_agent_request`: hard-delete
7
+ // every archived chat record at or past a cutoff in one server-side pass. It has
8
+ // to be server-side because the history list is cursor-paginated across hosts,
9
+ // so the client never holds the whole archived set.
10
+ //
11
+ // Deleting a chat removes Otto's record only. Provider-owned session data is
12
+ // deliberately left in place. See docs/chat-lifecycle.md.
13
+ // Gated by server_info.features.historyDelete.
14
+ export const HistoryAgentsClearArchivedRequestSchema = z.object({
15
+ type: z.literal("history.agents.clear_archived.request"),
16
+ // 0 = every archived chat. N = only chats archived at least N days ago.
17
+ olderThanDays: z.number().int().min(0).default(0),
18
+ // Safe by default: a request that omits the flag previews instead of deleting.
19
+ // The client always sends it explicitly.
20
+ dryRun: z.boolean().default(true),
21
+ requestId: z.string(),
22
+ });
23
+ export const HistoryAgentsClearArchivedResponseSchema = z.object({
24
+ type: z.literal("history.agents.clear_archived.response"),
25
+ payload: z.object({
26
+ // How many archived records the cutoff selected - the number the confirm
27
+ // dialog quotes back after a dry run.
28
+ matched: z.number().int().nonnegative(),
29
+ deleted: z.number().int().nonnegative(),
30
+ failed: z.number().int().nonnegative(),
31
+ // Ids actually deleted, so the client drops exactly those rows from its
32
+ // caches. Empty on a dry run. Unlike close_items_response, a destructive
33
+ // batch reports per-item outcome rather than silently omitting failures.
34
+ agentIds: z.array(z.string()),
35
+ dryRun: z.boolean(),
36
+ error: z.string().nullable(),
37
+ requestId: z.string(),
38
+ ottoBytes: z.number().int().nonnegative().optional(),
39
+ reclaimedBytes: z.number().int().nonnegative().optional(),
40
+ }),
41
+ });
42
+ export const HistoryAgentsStorageStatsRequestSchema = z.object({
43
+ type: z.literal("history.agents.get_storage_stats.request"),
44
+ requestId: z.string(),
45
+ });
46
+ export const HistoryAgentsStorageStatsResponseSchema = z.object({
47
+ type: z.literal("history.agents.get_storage_stats.response"),
48
+ payload: z.object({
49
+ archivedCount: z.number().int().nonnegative(),
50
+ totalBytes: z.number().nonnegative(),
51
+ error: z.string().nullable(),
52
+ requestId: z.string(),
53
+ }),
54
+ });
55
+ // ── Attachment storage ──────────────────────────────────────────────────────
56
+ // Agents produce image bytes continuously (browser screenshots above all), and
57
+ // the daemon materializes each one to $OTTO_HOME/attachments so the timeline has
58
+ // a file to point at. These two RPCs are the user's window into that store: how
59
+ // much is there, and give it back. See docs/attachment-lifecycle.md.
60
+ //
61
+ // Scope is deliberately global, not per-chat or per-workspace. Filenames are a
62
+ // content hash, so the same bytes may be referenced from several transcripts and
63
+ // "this workspace's images" is a fiction we would have to invent and maintain.
64
+ // Gated by server_info.features.attachmentStorage.
65
+ export const AttachmentsImagesStatsRequestSchema = z.object({
66
+ type: z.literal("attachments.images.get_stats.request"),
67
+ requestId: z.string(),
68
+ });
69
+ export const AttachmentsImagesStatsResponseSchema = z.object({
70
+ type: z.literal("attachments.images.get_stats.response"),
71
+ payload: z.object({
72
+ fileCount: z.number().int().nonnegative(),
73
+ totalBytes: z.number().nonnegative(),
74
+ // ISO timestamp of the oldest image, or null when the store is empty. The
75
+ // readout quotes it so "512 MB" comes with "since March".
76
+ oldestAt: z.string().nullable(),
77
+ // The policy currently in force, so the settings row shows real numbers
78
+ // rather than the client's idea of the defaults.
79
+ maxAgeDays: z.number().int().nonnegative(),
80
+ maxTotalMb: z.number().int().nonnegative(),
81
+ error: z.string().nullable(),
82
+ requestId: z.string(),
83
+ }),
84
+ });
85
+ export const AttachmentsImagesClearRequestSchema = z.object({
86
+ type: z.literal("attachments.images.clear.request"),
87
+ // 0 = every stored image. N = only images untouched for at least N days.
88
+ olderThanDays: z.number().int().min(0).default(0),
89
+ // Safe by default: a request that omits the flag previews instead of deleting.
90
+ // The client always sends it explicitly. Same contract as
91
+ // history.agents.clear_archived, and for the same reason - the client cannot
92
+ // enumerate the set, and there is no undo.
93
+ dryRun: z.boolean().default(true),
94
+ requestId: z.string(),
95
+ });
96
+ export const AttachmentsImagesClearResponseSchema = z.object({
97
+ type: z.literal("attachments.images.clear.response"),
98
+ payload: z.object({
99
+ matched: z.number().int().nonnegative(),
100
+ deleted: z.number().int().nonnegative(),
101
+ freedBytes: z.number().nonnegative(),
102
+ dryRun: z.boolean(),
103
+ error: z.string().nullable(),
104
+ requestId: z.string(),
105
+ }),
106
+ });
107
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1,106 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto suggested-task wire schemas: the tasks.suggested.* start and dismiss RPCs and the suggested-task payloads. Fork-only capability, so it owns its schemas; messages.ts re-exports them.
4
+ */
5
+ export declare const SuggestedTaskStateSchema: z.ZodEnum<{
6
+ pending: "pending";
7
+ started: "started";
8
+ dismissed: "dismissed";
9
+ }>;
10
+ export declare const SuggestedTaskInfoSchema: z.ZodObject<{
11
+ taskId: z.ZodString;
12
+ parentAgentId: z.ZodString;
13
+ title: z.ZodString;
14
+ tldr: z.ZodString;
15
+ cwd: z.ZodOptional<z.ZodString>;
16
+ state: z.ZodEnum<{
17
+ pending: "pending";
18
+ started: "started";
19
+ dismissed: "dismissed";
20
+ }>;
21
+ createdAt: z.ZodString;
22
+ updatedAt: z.ZodString;
23
+ }, z.core.$strip>;
24
+ export declare const SuggestedTasksChangedSchema: z.ZodObject<{
25
+ type: z.ZodLiteral<"suggested_tasks_changed">;
26
+ payload: z.ZodObject<{
27
+ parentAgentId: z.ZodString;
28
+ tasks: z.ZodArray<z.ZodObject<{
29
+ taskId: z.ZodString;
30
+ parentAgentId: z.ZodString;
31
+ title: z.ZodString;
32
+ tldr: z.ZodString;
33
+ cwd: z.ZodOptional<z.ZodString>;
34
+ state: z.ZodEnum<{
35
+ pending: "pending";
36
+ started: "started";
37
+ dismissed: "dismissed";
38
+ }>;
39
+ createdAt: z.ZodString;
40
+ updatedAt: z.ZodString;
41
+ }, z.core.$strip>>;
42
+ }, z.core.$strip>;
43
+ }, z.core.$strip>;
44
+ export declare const SuggestedTaskActionResponsePayloadSchema: z.ZodObject<{
45
+ requestId: z.ZodString;
46
+ parentAgentId: z.ZodString;
47
+ accepted: z.ZodBoolean;
48
+ succeeded: z.ZodNumber;
49
+ failed: z.ZodNumber;
50
+ error: z.ZodNullable<z.ZodString>;
51
+ }, z.core.$strip>;
52
+ export declare const TasksSuggestedStartModeSchema: z.ZodEnum<{
53
+ worktree: "worktree";
54
+ new_chat: "new_chat";
55
+ subagent: "subagent";
56
+ in_session: "in_session";
57
+ }>;
58
+ export declare const TasksSuggestedStartRequestMessageSchema: z.ZodObject<{
59
+ type: z.ZodLiteral<"tasks.suggested.start.request">;
60
+ parentAgentId: z.ZodString;
61
+ taskIds: z.ZodArray<z.ZodString>;
62
+ mode: z.ZodEnum<{
63
+ worktree: "worktree";
64
+ new_chat: "new_chat";
65
+ subagent: "subagent";
66
+ in_session: "in_session";
67
+ }>;
68
+ requestId: z.ZodString;
69
+ }, z.core.$strip>;
70
+ export declare const TasksSuggestedStartResponseMessageSchema: z.ZodObject<{
71
+ type: z.ZodLiteral<"tasks.suggested.start.response">;
72
+ payload: z.ZodObject<{
73
+ requestId: z.ZodString;
74
+ parentAgentId: z.ZodString;
75
+ accepted: z.ZodBoolean;
76
+ succeeded: z.ZodNumber;
77
+ failed: z.ZodNumber;
78
+ error: z.ZodNullable<z.ZodString>;
79
+ }, z.core.$strip>;
80
+ }, z.core.$strip>;
81
+ export declare const TasksSuggestedDismissRequestMessageSchema: z.ZodObject<{
82
+ type: z.ZodLiteral<"tasks.suggested.dismiss.request">;
83
+ parentAgentId: z.ZodString;
84
+ taskIds: z.ZodArray<z.ZodString>;
85
+ requestId: z.ZodString;
86
+ }, z.core.$strip>;
87
+ export declare const TasksSuggestedDismissResponseMessageSchema: z.ZodObject<{
88
+ type: z.ZodLiteral<"tasks.suggested.dismiss.response">;
89
+ payload: z.ZodObject<{
90
+ requestId: z.ZodString;
91
+ parentAgentId: z.ZodString;
92
+ accepted: z.ZodBoolean;
93
+ succeeded: z.ZodNumber;
94
+ failed: z.ZodNumber;
95
+ error: z.ZodNullable<z.ZodString>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strip>;
98
+ export type SuggestedTaskInfo = z.infer<typeof SuggestedTaskInfoSchema>;
99
+ export type SuggestedTaskState = z.infer<typeof SuggestedTaskStateSchema>;
100
+ export type SuggestedTasksChanged = z.infer<typeof SuggestedTasksChangedSchema>;
101
+ export type TasksSuggestedStartMode = z.infer<typeof TasksSuggestedStartModeSchema>;
102
+ export type TasksSuggestedStartResponseMessage = z.infer<typeof TasksSuggestedStartResponseMessageSchema>;
103
+ export type TasksSuggestedDismissResponseMessage = z.infer<typeof TasksSuggestedDismissResponseMessageSchema>;
104
+ export type TasksSuggestedStartRequestMessage = z.infer<typeof TasksSuggestedStartRequestMessageSchema>;
105
+ export type TasksSuggestedDismissRequestMessage = z.infer<typeof TasksSuggestedDismissRequestMessageSchema>;
106
+ //# sourceMappingURL=suggested-tasks.d.ts.map
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto suggested-task wire schemas: the tasks.suggested.* start and dismiss RPCs and the suggested-task payloads. Fork-only capability, so it owns its schemas; messages.ts re-exports them.
4
+ */
5
+ // A suggested task a chat surfaced via the `suggest_task` tool (Claude Desktop
6
+ // parity). Renders as a chip in the parent agent's session; the user starts it
7
+ // (new worktree / local / this session) or dismisses it. The `prompt` is
8
+ // deliberately NOT part of this wire shape - it stays server-side and is only
9
+ // used when the task is started ("not shown directly" in Claude Desktop).
10
+ // COMPAT(suggestedTasks): added in v0.5.6, drop the gate when daemon floor >= v0.5.6.
11
+ export const SuggestedTaskStateSchema = z.enum(["pending", "started", "dismissed"]);
12
+ export const SuggestedTaskInfoSchema = z.object({
13
+ taskId: z.string(),
14
+ parentAgentId: z.string(),
15
+ title: z.string(),
16
+ tldr: z.string(),
17
+ cwd: z.string().optional(),
18
+ state: SuggestedTaskStateSchema,
19
+ createdAt: z.string(),
20
+ updatedAt: z.string(),
21
+ });
22
+ // Pushed with the full current set of pending suggested tasks for a parent
23
+ // agent whenever any of them changes (spawn/start/dismiss) - same full-list
24
+ // reconciliation shape as BackgroundShellTasksChangedSchema.
25
+ export const SuggestedTasksChangedSchema = z.object({
26
+ type: z.literal("suggested_tasks_changed"),
27
+ payload: z.object({
28
+ parentAgentId: z.string(),
29
+ tasks: z.array(SuggestedTaskInfoSchema),
30
+ }),
31
+ });
32
+ // Aggregate outcome for a start/dismiss over one or more tasks. `succeeded`/
33
+ // `failed` count the tasks acted on so the client can report "Started 3 tasks";
34
+ // `error` collects any per-task failure messages (the failed tasks' chips stay).
35
+ export const SuggestedTaskActionResponsePayloadSchema = z.object({
36
+ requestId: z.string(),
37
+ parentAgentId: z.string(),
38
+ accepted: z.boolean(),
39
+ succeeded: z.number(),
40
+ failed: z.number(),
41
+ error: z.string().nullable(),
42
+ });
43
+ // Start one or more suggested tasks, applying the SAME mode to each - no
44
+ // combining. Four modes, only `subagent` links the new agent to the parent:
45
+ // - `new_chat`: a fresh independent agent in its own tab, same repo/cwd, NO
46
+ // parent link - survives the parent's cancel/archive.
47
+ // - `subagent`: a bound child agent that shows in the parent's Subagents
48
+ // track and archive-cascades with it.
49
+ // - `worktree`: an independent agent on a new git worktree (auto branch-off),
50
+ // isolated workspace - also unlinked from the parent.
51
+ // - `in_session`: steers the parent agent with the task prompt (no new agent).
52
+ // The daemon resolves the parent agent's brain (provider/model/personality) so a
53
+ // started task continues the suggesting agent.
54
+ export const TasksSuggestedStartModeSchema = z.enum([
55
+ "new_chat",
56
+ "subagent",
57
+ "worktree",
58
+ "in_session",
59
+ ]);
60
+ export const TasksSuggestedStartRequestMessageSchema = z.object({
61
+ type: z.literal("tasks.suggested.start.request"),
62
+ parentAgentId: z.string(),
63
+ taskIds: z.array(z.string()),
64
+ mode: TasksSuggestedStartModeSchema,
65
+ requestId: z.string(),
66
+ });
67
+ export const TasksSuggestedStartResponseMessageSchema = z.object({
68
+ type: z.literal("tasks.suggested.start.response"),
69
+ payload: SuggestedTaskActionResponsePayloadSchema,
70
+ });
71
+ export const TasksSuggestedDismissRequestMessageSchema = z.object({
72
+ type: z.literal("tasks.suggested.dismiss.request"),
73
+ parentAgentId: z.string(),
74
+ taskIds: z.array(z.string()),
75
+ requestId: z.string(),
76
+ });
77
+ export const TasksSuggestedDismissResponseMessageSchema = z.object({
78
+ type: z.literal("tasks.suggested.dismiss.response"),
79
+ payload: SuggestedTaskActionResponsePayloadSchema,
80
+ });
81
+ //# sourceMappingURL=suggested-tasks.js.map
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto terminal-compatibility wire schemas: the terminal.compatibility.* probe RPCs. Fork-only capability, so it owns its schemas; messages.ts re-exports them. New file rather than terminal-*.ts because those import from messages.ts.
4
+ */
5
+ export declare const TerminalCompatibilityDiagnosticRequestSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"terminal.compatibility.diagnostic.request">;
7
+ requestId: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export declare const TerminalCompatibilityDiagnosticStatusSchema: z.ZodEnum<{
10
+ unknown: "unknown";
11
+ pass: "pass";
12
+ fail: "fail";
13
+ warn: "warn";
14
+ }>;
15
+ export declare const TerminalCompatibilityDiagnosticCheckSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ label: z.ZodString;
18
+ status: z.ZodEnum<{
19
+ unknown: "unknown";
20
+ pass: "pass";
21
+ fail: "fail";
22
+ warn: "warn";
23
+ }>;
24
+ detail: z.ZodString;
25
+ evidence: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ export declare const TerminalCompatibilityDiagnosticResponseSchema: z.ZodObject<{
28
+ type: z.ZodLiteral<"terminal.compatibility.diagnostic.response">;
29
+ payload: z.ZodObject<{
30
+ requestId: z.ZodString;
31
+ success: z.ZodBoolean;
32
+ error: z.ZodNullable<z.ZodString>;
33
+ generatedAt: z.ZodString;
34
+ platform: z.ZodOptional<z.ZodString>;
35
+ term: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ termProgram: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ checks: z.ZodArray<z.ZodObject<{
38
+ id: z.ZodString;
39
+ label: z.ZodString;
40
+ status: z.ZodEnum<{
41
+ unknown: "unknown";
42
+ pass: "pass";
43
+ fail: "fail";
44
+ warn: "warn";
45
+ }>;
46
+ detail: z.ZodString;
47
+ evidence: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ }, z.core.$strip>;
51
+ export type TerminalCompatibilityDiagnosticStatus = z.infer<typeof TerminalCompatibilityDiagnosticStatusSchema>;
52
+ export type TerminalCompatibilityDiagnosticCheck = z.infer<typeof TerminalCompatibilityDiagnosticCheckSchema>;
53
+ export type TerminalCompatibilityDiagnosticRequest = z.infer<typeof TerminalCompatibilityDiagnosticRequestSchema>;
54
+ export type TerminalCompatibilityDiagnosticResponse = z.infer<typeof TerminalCompatibilityDiagnosticResponseSchema>;
55
+ //# sourceMappingURL=terminal-compatibility.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto terminal-compatibility wire schemas: the terminal.compatibility.* probe RPCs. Fork-only capability, so it owns its schemas; messages.ts re-exports them. New file rather than terminal-*.ts because those import from messages.ts.
4
+ */
5
+ export const TerminalCompatibilityDiagnosticRequestSchema = z.object({
6
+ type: z.literal("terminal.compatibility.diagnostic.request"),
7
+ requestId: z.string(),
8
+ });
9
+ export const TerminalCompatibilityDiagnosticStatusSchema = z.enum([
10
+ "pass",
11
+ "fail",
12
+ "warn",
13
+ "unknown",
14
+ ]);
15
+ export const TerminalCompatibilityDiagnosticCheckSchema = z.object({
16
+ id: z.string(),
17
+ label: z.string(),
18
+ status: TerminalCompatibilityDiagnosticStatusSchema,
19
+ detail: z.string(),
20
+ evidence: z.string().optional(),
21
+ });
22
+ export const TerminalCompatibilityDiagnosticResponseSchema = z.object({
23
+ type: z.literal("terminal.compatibility.diagnostic.response"),
24
+ payload: z.object({
25
+ requestId: z.string(),
26
+ success: z.boolean(),
27
+ error: z.string().nullable(),
28
+ generatedAt: z.string(),
29
+ platform: z.string().optional(),
30
+ term: z.string().nullable().optional(),
31
+ termProgram: z.string().nullable().optional(),
32
+ checks: z.array(TerminalCompatibilityDiagnosticCheckSchema),
33
+ }),
34
+ });
35
+ //# sourceMappingURL=terminal-compatibility.js.map
@@ -5,6 +5,8 @@ export interface TerminalInputModeFeedResult {
5
5
  export interface TerminalInputModeState {
6
6
  kittyKeyboardFlags: number;
7
7
  win32InputMode: boolean;
8
+ applicationCursorKeys?: boolean;
9
+ bracketedPaste?: boolean;
8
10
  }
9
11
  export declare const DEFAULT_TERMINAL_INPUT_MODE_STATE: TerminalInputModeState;
10
12
  export declare function terminalInputModeSupportsModifiedEnter(state: TerminalInputModeState): boolean;
@@ -12,6 +14,8 @@ export declare function terminalInputModeStatesEqual(left: TerminalInputModeStat
12
14
  export declare class TerminalInputModeTracker {
13
15
  private kittyKeyboardFlags;
14
16
  private win32InputMode;
17
+ private applicationCursorKeys;
18
+ private bracketedPaste;
15
19
  private readonly kittyKeyboardStack;
16
20
  private pending;
17
21
  feed(data: string): TerminalInputModeFeedResult;