@otto-code/protocol 0.6.5 → 0.6.7

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.
@@ -4,4 +4,9 @@ export interface AgentLabelSource {
4
4
  }
5
5
  export declare function getParentAgentIdFromLabels(labels: Record<string, unknown> | null | undefined): string | null;
6
6
  export declare function isDelegatedAgent(agent: AgentLabelSource): boolean;
7
+ export declare const ORCHESTRATION_POLICY_LABEL = "otto.orchestration-policy";
8
+ export declare const ORCHESTRATION_POLICIES: readonly ["deterministic", "autonomous"];
9
+ export type OrchestrationPolicy = (typeof ORCHESTRATION_POLICIES)[number];
10
+ export declare function getOrchestrationPolicyFromLabels(labels: Record<string, unknown> | null | undefined): OrchestrationPolicy | null;
11
+ export declare const ORCHESTRATION_RUN_ID_LABEL = "otto.orchestration-run-id";
7
12
  //# sourceMappingURL=agent-labels.d.ts.map
@@ -8,4 +8,20 @@ export function getParentAgentIdFromLabels(labels) {
8
8
  export function isDelegatedAgent(agent) {
9
9
  return getParentAgentIdFromLabels(agent.labels) !== null;
10
10
  }
11
+ // ── Orchestration node labels (projects/orchestration-graphs) ───────────────
12
+ // Stamped by the daemon on agents it spawns as orchestration participants. The
13
+ // otto-tool catalog reads the policy label to enforce the tool binary:
14
+ // "deterministic" — the daemon does all linking; the node gets NO orchestration
15
+ // tools (spawning/steering agents, runs), NO preview/dev-server tools, and NO
16
+ // browser tools. "autonomous" — full otto toolset EXCEPT start_run
17
+ // (orchestrations never nest orchestrations).
18
+ export const ORCHESTRATION_POLICY_LABEL = "otto.orchestration-policy";
19
+ export const ORCHESTRATION_POLICIES = ["deterministic", "autonomous"];
20
+ export function getOrchestrationPolicyFromLabels(labels) {
21
+ const value = labels?.[ORCHESTRATION_POLICY_LABEL];
22
+ return value === "deterministic" || value === "autonomous" ? value : null;
23
+ }
24
+ // First-class run attribution for orchestration children (parentage rides
25
+ // PARENT_AGENT_ID_LABEL; this ties the child to the run record itself).
26
+ export const ORCHESTRATION_RUN_ID_LABEL = "otto.orchestration-run-id";
11
27
  //# sourceMappingURL=agent-labels.js.map
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const BrowserAutomationHostCapabilitySchema: z.ZodObject<{
3
- supportedCommands: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("type" | "select" | "fill" | "logs" | "list_tabs" | "new_tab" | "snapshot" | "click" | "wait" | "keypress" | "navigate" | "back" | "forward" | "reload" | "screenshot" | "upload" | "hover" | "drag" | "evaluate" | "inspect" | "network" | "scroll" | "resize" | "close_tab" | "focus_tab" | "page_text" | "set_color_scheme" | "screenshot_element")[], string[]>>;
3
+ supportedCommands: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<("type" | "fill" | "select" | "logs" | "list_tabs" | "new_tab" | "snapshot" | "click" | "wait" | "keypress" | "navigate" | "back" | "forward" | "reload" | "screenshot" | "upload" | "hover" | "drag" | "evaluate" | "inspect" | "network" | "scroll" | "resize" | "close_tab" | "focus_tab" | "page_text" | "set_color_scheme" | "screenshot_element")[], string[]>>;
4
4
  hostKind: z.ZodDefault<z.ZodString>;
5
5
  }, z.core.$loose>;
6
6
  export type BrowserAutomationHostCapability = z.infer<typeof BrowserAutomationHostCapabilitySchema>;
@@ -15,8 +15,8 @@ export declare const BrowserAutomationErrorCodeSchema: z.ZodEnum<{
15
15
  export declare const BROWSER_AUTOMATION_COMMAND_NAMES: readonly ["list_tabs", "new_tab", "snapshot", "click", "fill", "wait", "type", "keypress", "navigate", "back", "forward", "reload", "screenshot", "upload", "select", "hover", "drag", "logs", "evaluate", "inspect", "network", "scroll", "resize", "close_tab", "focus_tab", "page_text", "set_color_scheme", "screenshot_element"];
16
16
  export declare const BrowserAutomationCommandNameSchema: z.ZodEnum<{
17
17
  type: "type";
18
- select: "select";
19
18
  fill: "fill";
19
+ select: "select";
20
20
  logs: "logs";
21
21
  list_tabs: "list_tabs";
22
22
  new_tab: "new_tab";