agent-relay-sdk 0.2.11 → 0.2.13
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/http-client.d.ts +20 -2
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +34 -22
- package/dist/http-client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/speech-text.d.ts +48 -0
- package/dist/speech-text.d.ts.map +1 -0
- package/dist/speech-text.js +162 -0
- package/dist/speech-text.js.map +1 -0
- package/dist/sse.d.ts +16 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +35 -0
- package/dist/sse.js.map +1 -0
- package/dist/types.d.ts +35 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -1
- package/src/http-client.ts +42 -21
- package/src/index.ts +1 -0
- package/src/speech-text.ts +187 -0
- package/src/sse.ts +39 -0
- package/src/types.ts +36 -1
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 {
|
|
@@ -1264,6 +1271,12 @@ export interface WorkspaceMergePreview {
|
|
|
1264
1271
|
baseRef?: string;
|
|
1265
1272
|
/** Human-readable reason a merge can't proceed (no work, dirty, missing). */
|
|
1266
1273
|
reason?: string;
|
|
1274
|
+
/** True when there is nothing to land: ahead=0 with a clean worktree (branch tree
|
|
1275
|
+
* already in base — never diverged, or already landed via squash/cherry-pick/PR).
|
|
1276
|
+
* A no-op land resolves the workspace to a terminal state instead of parking it in
|
|
1277
|
+
* the steward queue (#230). Distinct from a dirty-worktree refusal, which also sets
|
|
1278
|
+
* `reason` but is not a no-op. */
|
|
1279
|
+
noop?: boolean;
|
|
1267
1280
|
/** Set when the worktree path no longer exists. */
|
|
1268
1281
|
missing?: boolean;
|
|
1269
1282
|
/** Populated when git interrogation failed. */
|
|
@@ -1277,6 +1290,10 @@ export interface WorkspaceMergeResult {
|
|
|
1277
1290
|
strategy: "pr" | "rebase-ff";
|
|
1278
1291
|
/** True when work was landed locally (rebase-ff into base). */
|
|
1279
1292
|
merged: boolean;
|
|
1293
|
+
/** True when the land was a no-op — nothing to merge (ahead=0, clean worktree),
|
|
1294
|
+
* resolved to a terminal `merged` status to clear the steward queue (#230). The
|
|
1295
|
+
* worktree/branch are reclaimed too when the owner is gone (`deleteBranch`). */
|
|
1296
|
+
noop?: boolean;
|
|
1280
1297
|
/** True when a merge was prevented by conflicts. */
|
|
1281
1298
|
conflict?: boolean;
|
|
1282
1299
|
/** PR URL when the pr strategy opened one. */
|
|
@@ -1516,6 +1533,12 @@ export interface AgentProfileAssetRef {
|
|
|
1516
1533
|
meta?: Record<string, unknown>;
|
|
1517
1534
|
}
|
|
1518
1535
|
|
|
1536
|
+
export interface AgentProfileProviderOptions extends Record<string, unknown> {
|
|
1537
|
+
codex?: {
|
|
1538
|
+
toolOutputTokenLimit?: number | null;
|
|
1539
|
+
} & Record<string, unknown>;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1519
1542
|
export interface AgentProfile {
|
|
1520
1543
|
name: string;
|
|
1521
1544
|
description?: string;
|
|
@@ -1554,7 +1577,13 @@ export interface AgentProfile {
|
|
|
1554
1577
|
filesystem: AgentProfileFilesystemScope;
|
|
1555
1578
|
};
|
|
1556
1579
|
env: Record<string, string>;
|
|
1557
|
-
providerOptions:
|
|
1580
|
+
providerOptions: AgentProfileProviderOptions;
|
|
1581
|
+
/** Spawn quota for agents granted this profile: max concurrent LIVE children they may
|
|
1582
|
+
* have at once. `0`/undefined = cannot spawn (the strict default). `N` = up to N live
|
|
1583
|
+
* children; a child exiting frees a slot. Drives both the minted token's `command:spawn`
|
|
1584
|
+
* scope (granted iff `> 0`) and the runtime quota count. Children never inherit it
|
|
1585
|
+
* (no grandchildren). */
|
|
1586
|
+
maxSpawnedAgents?: number;
|
|
1558
1587
|
}
|
|
1559
1588
|
|
|
1560
1589
|
export type AgentProfileProjectionResult = "applied" | "partial" | "unsupported" | "not-applicable";
|
|
@@ -2096,6 +2125,12 @@ export interface TokenConstraints {
|
|
|
2096
2125
|
agents?: string[];
|
|
2097
2126
|
policies?: string[];
|
|
2098
2127
|
parentAgents?: string[];
|
|
2128
|
+
/** Parent agent id stamped on a child's runner token at spawn; read at registration to
|
|
2129
|
+
* set the child agent card's `spawnedBy` authoritatively (the child can't forge it). */
|
|
2130
|
+
spawnedBy?: string;
|
|
2131
|
+
/** Spawn quota (max concurrent live children) baked into a spawn-capable agent's token,
|
|
2132
|
+
* resolved from its profile's `maxSpawnedAgents`. The runtime quota check reads it here. */
|
|
2133
|
+
maxSpawnedAgents?: number;
|
|
2099
2134
|
targets?: string[];
|
|
2100
2135
|
channels?: string[];
|
|
2101
2136
|
orchestrators?: string[];
|