@otto-code/protocol 0.7.3 → 0.7.5

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.
@@ -489,6 +489,18 @@ export interface ObservedSubagentUpdate {
489
489
  status: "initializing" | "running" | "idle" | "error" | "closed";
490
490
  requiresAttention?: boolean;
491
491
  usage?: AgentUsage;
492
+ /**
493
+ * True once this run is known to outlive an interrupt of the parent's turn —
494
+ * the provider backgrounded it, so the parent's teardown does not take it
495
+ * down. Sticky: the daemon keeps it set for the row's whole life, and
496
+ * propagates it to nested rows (a child of a backgrounded run survives too).
497
+ * Absent ⇒ foreground, i.e. the run dies with the turn that spawned it.
498
+ *
499
+ * Claude sets it for Workflow orchestration runs (always backgrounded) and
500
+ * for a Task/Agent whose tool_result turned out to be a launch ack rather
501
+ * than a final report. See docs/chat-lifecycle.md.
502
+ */
503
+ backgrounded?: boolean;
492
504
  /**
493
505
  * Tool invocations this subagent has made so far (cumulative). Neutral field
494
506
  * any provider can set; kept monotonic by the daemon so a status-only final
@@ -489,6 +489,11 @@ export declare const BrowserAutomationTabInfoSchema: z.ZodObject<{
489
489
  isLoading: z.ZodDefault<z.ZodBoolean>;
490
490
  canGoBack: z.ZodOptional<z.ZodBoolean>;
491
491
  canGoForward: z.ZodOptional<z.ZodBoolean>;
492
+ status: z.ZodOptional<z.ZodEnum<{
493
+ ready: "ready";
494
+ starting: "starting";
495
+ detached: "detached";
496
+ }>>;
492
497
  }, z.core.$strip>;
493
498
  export declare const BrowserAutomationListTabsResultSchema: z.ZodObject<{
494
499
  command: z.ZodLiteral<"list_tabs">;
@@ -501,6 +506,11 @@ export declare const BrowserAutomationListTabsResultSchema: z.ZodObject<{
501
506
  isLoading: z.ZodDefault<z.ZodBoolean>;
502
507
  canGoBack: z.ZodOptional<z.ZodBoolean>;
503
508
  canGoForward: z.ZodOptional<z.ZodBoolean>;
509
+ status: z.ZodOptional<z.ZodEnum<{
510
+ ready: "ready";
511
+ starting: "starting";
512
+ detached: "detached";
513
+ }>>;
504
514
  }, z.core.$strip>>;
505
515
  }, z.core.$strip>;
506
516
  export declare const BrowserAutomationNewTabResultSchema: z.ZodObject<{
@@ -783,6 +793,11 @@ export declare const BrowserAutomationResultSchema: z.ZodDiscriminatedUnion<[z.Z
783
793
  isLoading: z.ZodDefault<z.ZodBoolean>;
784
794
  canGoBack: z.ZodOptional<z.ZodBoolean>;
785
795
  canGoForward: z.ZodOptional<z.ZodBoolean>;
796
+ status: z.ZodOptional<z.ZodEnum<{
797
+ ready: "ready";
798
+ starting: "starting";
799
+ detached: "detached";
800
+ }>>;
786
801
  }, z.core.$strip>>;
787
802
  }, z.core.$strip>, z.ZodObject<{
788
803
  command: z.ZodLiteral<"new_tab">;
@@ -1250,6 +1265,11 @@ export declare const BrowserAutomationExecuteResponseSchema: z.ZodObject<{
1250
1265
  isLoading: z.ZodDefault<z.ZodBoolean>;
1251
1266
  canGoBack: z.ZodOptional<z.ZodBoolean>;
1252
1267
  canGoForward: z.ZodOptional<z.ZodBoolean>;
1268
+ status: z.ZodOptional<z.ZodEnum<{
1269
+ ready: "ready";
1270
+ starting: "starting";
1271
+ detached: "detached";
1272
+ }>>;
1253
1273
  }, z.core.$strip>>;
1254
1274
  }, z.core.$strip>, z.ZodObject<{
1255
1275
  command: z.ZodLiteral<"new_tab">;
@@ -1518,6 +1538,7 @@ export type BrowserAutomationColorScheme = z.infer<typeof BrowserAutomationColor
1518
1538
  export type BrowserAutomationCommandName = z.infer<typeof BrowserAutomationCommandNameSchema>;
1519
1539
  export type BrowserAutomationCommand = z.infer<typeof BrowserAutomationCommandSchema>;
1520
1540
  export type BrowserAutomationResult = z.infer<typeof BrowserAutomationResultSchema>;
1541
+ export type BrowserAutomationTabInfo = z.infer<typeof BrowserAutomationTabInfoSchema>;
1521
1542
  export type BrowserAutomationConsoleLogEntry = z.infer<typeof BrowserAutomationConsoleLogEntrySchema>;
1522
1543
  export type BrowserAutomationNetworkLogEntry = z.infer<typeof BrowserAutomationNetworkLogEntrySchema>;
1523
1544
  export type BrowserAutomationNetworkRequestEntry = z.infer<typeof BrowserAutomationNetworkRequestEntrySchema>;
@@ -306,6 +306,16 @@ export const BrowserAutomationTabInfoSchema = z.object({
306
306
  isLoading: z.boolean().default(false),
307
307
  canGoBack: z.boolean().optional(),
308
308
  canGoForward: z.boolean().optional(),
309
+ // Whether the tab's webview is attached and drivable. Reported explicitly so
310
+ // that "not drivable" is never expressed by leaving the tab OUT of the list:
311
+ // a tab the user can see on screen must always appear, or callers conclude it
312
+ // was closed and open a replacement. `starting` = registered, webview not
313
+ // attached yet; `detached` = it was attached and its contents are gone (a
314
+ // pane that stopped compositing looks like this). `url`/`title` are empty for
315
+ // both, because only the live webview knows them.
316
+ // COMPAT(browserTabStatus): added in v0.7.5; absent ⇒ "ready", which is how
317
+ // every pre-0.7.5 host behaved. Drop the gate when floor >= v0.7.5.
318
+ status: z.enum(["starting", "ready", "detached"]).optional(),
309
319
  });
310
320
  export const BrowserAutomationListTabsResultSchema = z.object({
311
321
  command: z.literal("list_tabs"),