agent-relay-sdk 0.2.10 → 0.2.12

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/src/types.ts CHANGED
@@ -16,6 +16,10 @@ export interface AgentCard {
16
16
  providerCapabilities?: ProviderCapabilities;
17
17
  context?: ContextState;
18
18
  meta?: Record<string, unknown>;
19
+ /** Agent id of the parent that spawned this one (set authoritatively from the child's
20
+ * signed runner token at registration). Absent for top-level/user/system agents. Powers
21
+ * spawn quotas, the `spawnedBy:` search filter, scoped shutdown, and the no-grandchild gate. */
22
+ spawnedBy?: string;
19
23
  lastSeen: number;
20
24
  createdAt: number;
21
25
  }
@@ -661,6 +665,9 @@ export interface RegisterAgentInput {
661
665
  providerCapabilities?: ProviderCapabilities;
662
666
  context?: ContextState;
663
667
  meta?: Record<string, unknown>;
668
+ /** Parent agent id. Server sets this authoritatively from the registering token's
669
+ * `spawnedBy`/`parentAgents` constraint; any client-supplied value is ignored. */
670
+ spawnedBy?: string;
664
671
  }
665
672
 
666
673
  export interface AgentSessionGuard {
@@ -1516,6 +1523,12 @@ export interface AgentProfileAssetRef {
1516
1523
  meta?: Record<string, unknown>;
1517
1524
  }
1518
1525
 
1526
+ export interface AgentProfileProviderOptions extends Record<string, unknown> {
1527
+ codex?: {
1528
+ toolOutputTokenLimit?: number | null;
1529
+ } & Record<string, unknown>;
1530
+ }
1531
+
1519
1532
  export interface AgentProfile {
1520
1533
  name: string;
1521
1534
  description?: string;
@@ -1533,6 +1546,12 @@ export interface AgentProfile {
1533
1546
  skills: boolean;
1534
1547
  plugins: boolean;
1535
1548
  statusLine: boolean;
1549
+ // Inject the relay HTTP MCP endpoint into the spawned agent. Default-on for
1550
+ // host/minimal; isolated clean-room profiles disable it like they disable
1551
+ // plugins. Optional so existing profile literals stay valid; the gate
1552
+ // (profileAllowsRelayFeature) treats absent as enabled and config-store
1553
+ // resolves a concrete default at write time.
1554
+ mcp?: boolean;
1536
1555
  };
1537
1556
  skills: AgentProfileAssetRef[];
1538
1557
  plugins: AgentProfileAssetRef[];
@@ -1548,7 +1567,13 @@ export interface AgentProfile {
1548
1567
  filesystem: AgentProfileFilesystemScope;
1549
1568
  };
1550
1569
  env: Record<string, string>;
1551
- providerOptions: Record<string, unknown>;
1570
+ providerOptions: AgentProfileProviderOptions;
1571
+ /** Spawn quota for agents granted this profile: max concurrent LIVE children they may
1572
+ * have at once. `0`/undefined = cannot spawn (the strict default). `N` = up to N live
1573
+ * children; a child exiting frees a slot. Drives both the minted token's `command:spawn`
1574
+ * scope (granted iff `> 0`) and the runtime quota count. Children never inherit it
1575
+ * (no grandchildren). */
1576
+ maxSpawnedAgents?: number;
1552
1577
  }
1553
1578
 
1554
1579
  export type AgentProfileProjectionResult = "applied" | "partial" | "unsupported" | "not-applicable";
@@ -2090,6 +2115,12 @@ export interface TokenConstraints {
2090
2115
  agents?: string[];
2091
2116
  policies?: string[];
2092
2117
  parentAgents?: string[];
2118
+ /** Parent agent id stamped on a child's runner token at spawn; read at registration to
2119
+ * set the child agent card's `spawnedBy` authoritatively (the child can't forge it). */
2120
+ spawnedBy?: string;
2121
+ /** Spawn quota (max concurrent live children) baked into a spawn-capable agent's token,
2122
+ * resolved from its profile's `maxSpawnedAgents`. The runtime quota check reads it here. */
2123
+ maxSpawnedAgents?: number;
2093
2124
  targets?: string[];
2094
2125
  channels?: string[];
2095
2126
  orchestrators?: string[];