@otto-code/protocol 0.9.7 → 0.9.9

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
@@ -1724,6 +1724,15 @@ export const ConnectorsOauthAuthorizeRequestSchema = z.object({
1724
1724
  connectorId: z.string(),
1725
1725
  /** Scopes to request, when the catalog entry names them. */
1726
1726
  scope: z.string().optional(),
1727
+ /** COMPAT(connectorOwnClient): accepted since v0.9.9; remove after 2027-03-12.
1728
+ * Parse the former caller-supplied registration shape, but the broker rejects it.
1729
+ * Native Google registration is publisher-owned and never supplied by the app. */
1730
+ oauthClient: z
1731
+ .object({
1732
+ clientId: z.string().min(1).max(1024),
1733
+ clientSecret: z.string().min(1).max(4096),
1734
+ })
1735
+ .optional(),
1727
1736
  });
1728
1737
  export const ConnectorsOauthAuthorizeResponseSchema = z.object({
1729
1738
  type: z.literal("connectors.oauth.authorize.response"),
@@ -1978,6 +1987,14 @@ export const ProviderSubagentListRequestMessageSchema = z.object({
1978
1987
  parentAgentId: z.string(),
1979
1988
  requestId: z.string(),
1980
1989
  });
1990
+ export const ProviderSubagentControlRequestMessageSchema = z.object({
1991
+ type: z.literal("agent.provider_subagents.control.request"),
1992
+ requestId: z.string(),
1993
+ parentAgentId: z.string(),
1994
+ subagentId: z.string(),
1995
+ action: z.enum(["stop", "archive"]),
1996
+ allowStopParent: z.boolean().optional(),
1997
+ });
1981
1998
  export const ProviderSubagentTimelineRequestMessageSchema = z.object({
1982
1999
  type: z.literal("agent.provider_subagents.timeline.get.request"),
1983
2000
  parentAgentId: z.string(),
@@ -3132,6 +3149,45 @@ export const ProjectIconRequestSchema = z.object({
3132
3149
  cwd: z.string(),
3133
3150
  requestId: z.string(),
3134
3151
  });
3152
+ export const BrowserHistoryEntrySchema = z.object({
3153
+ url: z.string().max(8192),
3154
+ title: z.string().max(512),
3155
+ visitedAt: z.string(),
3156
+ });
3157
+ export const BrowserHistorySearchRequestSchema = z.object({
3158
+ type: z.literal("browser.history.search.request"),
3159
+ workspaceId: z.string(),
3160
+ query: z.string().max(8192),
3161
+ requestId: z.string(),
3162
+ });
3163
+ export const BrowserHistoryRecordRequestSchema = z.object({
3164
+ type: z.literal("browser.history.record.request"),
3165
+ workspaceId: z.string(),
3166
+ url: z.string().max(8192),
3167
+ title: z.string().max(512),
3168
+ requestId: z.string(),
3169
+ });
3170
+ export const BrowserHistoryClearRequestSchema = z.object({
3171
+ type: z.literal("browser.history.clear.request"),
3172
+ projectId: z.string(),
3173
+ requestId: z.string(),
3174
+ });
3175
+ export const BrowserHistorySearchResponseSchema = z.object({
3176
+ type: z.literal("browser.history.search.response"),
3177
+ payload: z.object({
3178
+ entries: z.array(BrowserHistoryEntrySchema),
3179
+ error: z.string().nullable(),
3180
+ requestId: z.string(),
3181
+ }),
3182
+ });
3183
+ export const BrowserHistoryRecordResponseSchema = z.object({
3184
+ type: z.literal("browser.history.record.response"),
3185
+ payload: z.object({ error: z.string().nullable(), requestId: z.string() }),
3186
+ });
3187
+ export const BrowserHistoryClearResponseSchema = z.object({
3188
+ type: z.literal("browser.history.clear.response"),
3189
+ payload: z.object({ error: z.string().nullable(), requestId: z.string() }),
3190
+ });
3135
3191
  export const ProjectIconGetRequestSchema = z.object({
3136
3192
  type: z.literal("project.icon.get.request"),
3137
3193
  projectId: z.string(),
@@ -3609,6 +3665,7 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
3609
3665
  FetchAgentTimelineRequestMessageSchema,
3610
3666
  AgentTimelineListPromptsRequestMessageSchema,
3611
3667
  ProviderSubagentListRequestMessageSchema,
3668
+ ProviderSubagentControlRequestMessageSchema,
3612
3669
  ProviderSubagentTimelineRequestMessageSchema,
3613
3670
  SetAgentTimelineSubscriptionRequestMessageSchema,
3614
3671
  AgentForkContextRequestMessageSchema,
@@ -3738,6 +3795,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
3738
3795
  FileEntryDeleteRequestSchema,
3739
3796
  ProjectIconRequestSchema,
3740
3797
  ProjectIconGetRequestSchema,
3798
+ BrowserHistorySearchRequestSchema,
3799
+ BrowserHistoryRecordRequestSchema,
3800
+ BrowserHistoryClearRequestSchema,
3741
3801
  FileDownloadTokenRequestSchema,
3742
3802
  FileUploadRequestSchema,
3743
3803
  FileWriteRequestSchema,
@@ -4150,6 +4210,7 @@ export const ServerInfoStatusPayloadSchema = z
4150
4210
  brainLogWatch: z.boolean().optional(),
4151
4211
  // COMPAT(agentForkContext): added in v0.1.102, remove gate after 2026-12-28.
4152
4212
  agentForkContext: z.boolean().optional(),
4213
+ browserHistory: z.boolean().optional(),
4153
4214
  // COMPAT(providerRemove): added in v0.1.105, drop the gate when daemon floor >= v0.1.105.
4154
4215
  providerRemove: z.boolean().optional(),
4155
4216
  // COMPAT(agentContextUsage): added in v0.3.4, drop the gate when daemon floor >= v0.3.4.
@@ -4461,6 +4522,8 @@ export const ServerInfoStatusPayloadSchema = z
4461
4522
  // daemons have no broker and no way to hold a token, so the client hides
4462
4523
  // Connect / Disconnect and offers only the paste-a-token connectors.
4463
4524
  connectorOauth: z.boolean().optional(),
4525
+ connectorGoogleOauth: z.boolean().optional(),
4526
+ connectorNativeGoogle: z.boolean().optional(),
4464
4527
  // COMPAT(communications): added in v0.8.11, drop the gate when daemon floor >= v0.8.11.
4465
4528
  // The daemon owns the provider-neutral communications overview. An old
4466
4529
  // host must not receive a communications RPC from a newer frontend.
@@ -4580,6 +4643,7 @@ export const ServerInfoStatusPayloadSchema = z
4580
4643
  agentForkContextCursor: z.boolean().optional(),
4581
4644
  // COMPAT(providerSubagents): added in v0.1.107, remove gate after 2027-01-12.
4582
4645
  providerSubagents: z.boolean().optional(),
4646
+ providerSubagentControl: z.boolean().optional(),
4583
4647
  // COMPAT(workspacePinning): added in v0.1.107, remove gate after 2027-01-12.
4584
4648
  workspacePinning: z.boolean().optional(),
4585
4649
  // COMPAT(hubRelationship): added in v0.1.X, drop the gate when floor >= v0.1.X.
@@ -5628,6 +5692,8 @@ export const ProviderSubagentDescriptorPayloadSchema = z.object({
5628
5692
  // Compact provider-owned context for the shared track. Providers choose what belongs here and
5629
5693
  // format it for display; clients must not parse provider-specific facts out of this string.
5630
5694
  subtitle: z.string().nullable().optional(),
5695
+ archivedAt: z.string().optional(),
5696
+ stopScope: z.enum(["child", "parent"]).optional(),
5631
5697
  });
5632
5698
  export const ProviderSubagentListResponseMessageSchema = z.object({
5633
5699
  type: z.literal("agent.provider_subagents.list.response"),
@@ -5638,6 +5704,15 @@ export const ProviderSubagentListResponseMessageSchema = z.object({
5638
5704
  error: z.string().nullable(),
5639
5705
  }),
5640
5706
  });
5707
+ export const ProviderSubagentControlResponseMessageSchema = z.object({
5708
+ type: z.literal("agent.provider_subagents.control.response"),
5709
+ payload: z.object({
5710
+ requestId: z.string(),
5711
+ parentAgentId: z.string(),
5712
+ subagentId: z.string(),
5713
+ error: z.string().nullable(),
5714
+ }),
5715
+ });
5641
5716
  export const ProviderSubagentTimelineResponseMessageSchema = z.object({
5642
5717
  type: z.literal("agent.provider_subagents.timeline.get.response"),
5643
5718
  payload: z.object({
@@ -7573,6 +7648,7 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
7573
7648
  FetchAgentTimelineResponseMessageSchema,
7574
7649
  AgentTimelineListPromptsResponseMessageSchema,
7575
7650
  ProviderSubagentListResponseMessageSchema,
7651
+ ProviderSubagentControlResponseMessageSchema,
7576
7652
  ProviderSubagentTimelineResponseMessageSchema,
7577
7653
  ProviderSubagentUpdateMessageSchema,
7578
7654
  SetAgentTimelineSubscriptionResponseMessageSchema,
@@ -7806,6 +7882,9 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
7806
7882
  FileUpdateSchema,
7807
7883
  ProjectIconResponseSchema,
7808
7884
  ProjectIconGetResponseSchema,
7885
+ BrowserHistorySearchResponseSchema,
7886
+ BrowserHistoryRecordResponseSchema,
7887
+ BrowserHistoryClearResponseSchema,
7809
7888
  FileDownloadTokenResponseSchema,
7810
7889
  FileUploadResponseSchema,
7811
7890
  FileWriteResponseSchema,
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { AgentProvider } from "./agent-types.js";
3
+ export { GOOGLE_CONNECTOR_SERVICES, GOOGLE_CONNECTOR_SOURCE, CONNECTOR_OAUTH_REDIRECT_URI, googleConnectorForUrl, googleConnectorForConfig, type GoogleConnectorService, } from "./google-connectors.js";
3
4
  export declare const ProviderCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
5
  mode: z.ZodLiteral<"default">;
5
6
  }, z.core.$strip>, z.ZodObject<{
@@ -172,6 +173,7 @@ export declare const ConnectorOAuthClientSchema: z.ZodObject<{
172
173
  * is only for the interactive OAuth path.
173
174
  */
174
175
  export declare const ConnectorAuthStateSchema: z.ZodObject<{
176
+ resourceUrl: z.ZodOptional<z.ZodString>;
175
177
  kind: z.ZodLiteral<"oauth">;
176
178
  tokens: z.ZodOptional<z.ZodObject<{
177
179
  accessToken: z.ZodString;
@@ -207,6 +209,7 @@ export declare const ConnectorWorkspaceStateSchema: z.ZodObject<{
207
209
  * old configs and old daemons behaving exactly as before.
208
210
  */
209
211
  export declare const ConnectorConfigSchema: z.ZodObject<{
212
+ builtin: z.ZodOptional<z.ZodString>;
210
213
  id: z.ZodString;
211
214
  label: z.ZodOptional<z.ZodString>;
212
215
  server: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -229,6 +232,7 @@ export declare const ConnectorConfigSchema: z.ZodObject<{
229
232
  enabled: z.ZodOptional<z.ZodBoolean>;
230
233
  disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
234
  auth: z.ZodOptional<z.ZodObject<{
235
+ resourceUrl: z.ZodOptional<z.ZodString>;
232
236
  kind: z.ZodLiteral<"oauth">;
233
237
  tokens: z.ZodOptional<z.ZodObject<{
234
238
  accessToken: z.ZodString;
@@ -256,6 +260,7 @@ export declare const ConnectorConfigSchema: z.ZodObject<{
256
260
  */
257
261
  export declare const ConnectorsConfigSchema: z.ZodObject<{
258
262
  connectors: z.ZodOptional<z.ZodArray<z.ZodObject<{
263
+ builtin: z.ZodOptional<z.ZodString>;
259
264
  id: z.ZodString;
260
265
  label: z.ZodOptional<z.ZodString>;
261
266
  server: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -278,6 +283,7 @@ export declare const ConnectorsConfigSchema: z.ZodObject<{
278
283
  enabled: z.ZodOptional<z.ZodBoolean>;
279
284
  disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
285
  auth: z.ZodOptional<z.ZodObject<{
286
+ resourceUrl: z.ZodOptional<z.ZodString>;
281
287
  kind: z.ZodLiteral<"oauth">;
282
288
  tokens: z.ZodOptional<z.ZodObject<{
283
289
  accessToken: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { AgentProviderSchema, OTTO_BRAIN_PROVIDER_ID } from "./provider-manifest.js";
3
+ export { GOOGLE_CONNECTOR_SERVICES, GOOGLE_CONNECTOR_SOURCE, CONNECTOR_OAUTH_REDIRECT_URI, googleConnectorForUrl, googleConnectorForConfig, } from "./google-connectors.js";
3
4
  const ProviderCommandDefaultSchema = z.object({
4
5
  mode: z.literal("default"),
5
6
  });
@@ -282,6 +283,8 @@ export const ConnectorOAuthClientSchema = z.object({
282
283
  * is only for the interactive OAuth path.
283
284
  */
284
285
  export const ConnectorAuthStateSchema = z.object({
286
+ /** Binds new authorizations to the exact resource that owns them. */
287
+ resourceUrl: z.string().optional(),
285
288
  kind: z.literal("oauth"),
286
289
  tokens: ConnectorOAuthTokensSchema.optional(),
287
290
  client: ConnectorOAuthClientSchema.optional(),
@@ -310,6 +313,9 @@ export const ConnectorWorkspaceStateSchema = z.object({
310
313
  * old configs and old daemons behaving exactly as before.
311
314
  */
312
315
  export const ConnectorConfigSchema = z.object({
316
+ /** COMPAT(connectorBuiltin): added in v0.9.9, remove gate after 2027-03-12.
317
+ * Native implementation identity; transport union remains backward compatible. */
318
+ builtin: z.string().optional(),
313
319
  /** Stable key; doubles as the MCP server name used by the tool namespacer. */
314
320
  id: z.string().min(1),
315
321
  /** Human-facing name shown in the Connectors UI. Falls back to id when absent. */
@@ -5195,9 +5195,22 @@ export declare const WSOutboundMessageSchema: {
5195
5195
  toolCallId: import("zod").ZodNullable<import("zod").ZodString>;
5196
5196
  cwd: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
5197
5197
  subtitle: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
5198
+ archivedAt: import("zod").ZodOptional<import("zod").ZodString>;
5199
+ stopScope: import("zod").ZodOptional<import("zod").ZodEnum<{
5200
+ child: "child";
5201
+ parent: "parent";
5202
+ }>>;
5198
5203
  }, import("zod/v4/core").$strip>>;
5199
5204
  error: import("zod").ZodNullable<import("zod").ZodString>;
5200
5205
  }, import("zod/v4/core").$strip>;
5206
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
5207
+ type: import("zod").ZodLiteral<"agent.provider_subagents.control.response">;
5208
+ payload: import("zod").ZodObject<{
5209
+ requestId: import("zod").ZodString;
5210
+ parentAgentId: import("zod").ZodString;
5211
+ subagentId: import("zod").ZodString;
5212
+ error: import("zod").ZodNullable<import("zod").ZodString>;
5213
+ }, import("zod/v4/core").$strip>;
5201
5214
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
5202
5215
  type: import("zod").ZodLiteral<"agent.provider_subagents.timeline.get.response">;
5203
5216
  payload: import("zod").ZodObject<{
@@ -5249,6 +5262,11 @@ export declare const WSOutboundMessageSchema: {
5249
5262
  toolCallId: import("zod").ZodNullable<import("zod").ZodString>;
5250
5263
  cwd: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
5251
5264
  subtitle: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
5265
+ archivedAt: import("zod").ZodOptional<import("zod").ZodString>;
5266
+ stopScope: import("zod").ZodOptional<import("zod").ZodEnum<{
5267
+ child: "child";
5268
+ parent: "parent";
5269
+ }>>;
5252
5270
  }, import("zod/v4/core").$strip>;
5253
5271
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
5254
5272
  kind: import("zod").ZodLiteral<"timeline">;
@@ -6476,6 +6494,7 @@ export declare const WSOutboundMessageSchema: {
6476
6494
  }, import("zod/v4/core").$loose>>;
6477
6495
  }, import("zod/v4/core").$loose>>;
6478
6496
  connectors: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
6497
+ builtin: import("zod").ZodOptional<import("zod").ZodString>;
6479
6498
  id: import("zod").ZodString;
6480
6499
  label: import("zod").ZodOptional<import("zod").ZodString>;
6481
6500
  server: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
@@ -6498,6 +6517,7 @@ export declare const WSOutboundMessageSchema: {
6498
6517
  enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
6499
6518
  disabledTools: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
6500
6519
  auth: import("zod").ZodOptional<import("zod").ZodObject<{
6520
+ resourceUrl: import("zod").ZodOptional<import("zod").ZodString>;
6501
6521
  kind: import("zod").ZodLiteral<"oauth">;
6502
6522
  tokens: import("zod").ZodOptional<import("zod").ZodObject<{
6503
6523
  accessToken: import("zod").ZodString;
@@ -6853,6 +6873,7 @@ export declare const WSOutboundMessageSchema: {
6853
6873
  }, import("zod/v4/core").$loose>>;
6854
6874
  }, import("zod/v4/core").$loose>>;
6855
6875
  connectors: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
6876
+ builtin: import("zod").ZodOptional<import("zod").ZodString>;
6856
6877
  id: import("zod").ZodString;
6857
6878
  label: import("zod").ZodOptional<import("zod").ZodString>;
6858
6879
  server: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
@@ -6875,6 +6896,7 @@ export declare const WSOutboundMessageSchema: {
6875
6896
  enabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
6876
6897
  disabledTools: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
6877
6898
  auth: import("zod").ZodOptional<import("zod").ZodObject<{
6899
+ resourceUrl: import("zod").ZodOptional<import("zod").ZodString>;
6878
6900
  kind: import("zod").ZodLiteral<"oauth">;
6879
6901
  tokens: import("zod").ZodOptional<import("zod").ZodObject<{
6880
6902
  accessToken: import("zod").ZodString;
@@ -13794,6 +13816,29 @@ export declare const WSOutboundMessageSchema: {
13794
13816
  error: import("zod").ZodNullable<import("zod").ZodString>;
13795
13817
  requestId: import("zod").ZodString;
13796
13818
  }, import("zod/v4/core").$strip>;
13819
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
13820
+ type: import("zod").ZodLiteral<"browser.history.search.response">;
13821
+ payload: import("zod").ZodObject<{
13822
+ entries: import("zod").ZodArray<import("zod").ZodObject<{
13823
+ url: import("zod").ZodString;
13824
+ title: import("zod").ZodString;
13825
+ visitedAt: import("zod").ZodString;
13826
+ }, import("zod/v4/core").$strip>>;
13827
+ error: import("zod").ZodNullable<import("zod").ZodString>;
13828
+ requestId: import("zod").ZodString;
13829
+ }, import("zod/v4/core").$strip>;
13830
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
13831
+ type: import("zod").ZodLiteral<"browser.history.record.response">;
13832
+ payload: import("zod").ZodObject<{
13833
+ error: import("zod").ZodNullable<import("zod").ZodString>;
13834
+ requestId: import("zod").ZodString;
13835
+ }, import("zod/v4/core").$strip>;
13836
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
13837
+ type: import("zod").ZodLiteral<"browser.history.clear.response">;
13838
+ payload: import("zod").ZodObject<{
13839
+ error: import("zod").ZodNullable<import("zod").ZodString>;
13840
+ requestId: import("zod").ZodString;
13841
+ }, import("zod/v4/core").$strip>;
13797
13842
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
13798
13843
  type: import("zod").ZodLiteral<"file_download_token_response">;
13799
13844
  payload: import("zod").ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/protocol",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "Otto shared protocol schemas and wire types",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "files": [