agent-relay-sdk 0.2.11 → 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;
@@ -1554,7 +1567,13 @@ export interface AgentProfile {
1554
1567
  filesystem: AgentProfileFilesystemScope;
1555
1568
  };
1556
1569
  env: Record<string, string>;
1557
- 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;
1558
1577
  }
1559
1578
 
1560
1579
  export type AgentProfileProjectionResult = "applied" | "partial" | "unsupported" | "not-applicable";
@@ -2096,6 +2115,12 @@ export interface TokenConstraints {
2096
2115
  agents?: string[];
2097
2116
  policies?: string[];
2098
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;
2099
2124
  targets?: string[];
2100
2125
  channels?: string[];
2101
2126
  orchestrators?: string[];