@tangle-network/agent-runtime 0.209.0 → 0.211.0
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/README.md +4 -0
- package/dist/{activation-Cjhm5Tds.js → activation-CJv8QcDd.js} +2 -2
- package/dist/{activation-Cjhm5Tds.js.map → activation-CJv8QcDd.js.map} +1 -1
- package/dist/{activation-tFdeirCa.d.ts → activation-r96R8a7k.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-C-hPz1zy.js → coordination-driver-urko7YZs.js} +2 -2
- package/dist/{coordination-driver-C-hPz1zy.js.map → coordination-driver-urko7YZs.js.map} +1 -1
- package/dist/{delegate-CB4CkJdV.js → delegate-BjIVctXq.js} +2 -2
- package/dist/{delegate-CB4CkJdV.js.map → delegate-BjIVctXq.js.map} +1 -1
- package/dist/durable.d.ts +20 -3
- package/dist/durable.js +20 -3
- package/dist/durable.js.map +1 -1
- package/dist/{graph-Ud2-Ytos.js → graph--JG8qLeG.js} +3 -3
- package/dist/{graph-Ud2-Ytos.js.map → graph--JG8qLeG.js.map} +1 -1
- package/dist/{improvement-cycle-B7ia6rTj.js → improvement-cycle-Djgc_dBQ.js} +3 -3
- package/dist/{improvement-cycle-B7ia6rTj.js.map → improvement-cycle-Djgc_dBQ.js.map} +1 -1
- package/dist/{index-0p5DiJoy.d.ts → index-BxIucF40.d.ts} +12 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +3 -3
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-q-xGzEK9.d.ts → loop-runner-bin-Bz0RR-dg.d.ts} +3 -3
- package/dist/{loop-runner-bin-B30d3Yla.js → loop-runner-bin-Cj4QWoqD.js} +3 -3
- package/dist/{loop-runner-bin-B30d3Yla.js.map → loop-runner-bin-Cj4QWoqD.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +4 -4
- package/dist/{provision-supervisor-C-nLaaQ_.js → provision-supervisor-D5vktn4-.js} +3 -3
- package/dist/{provision-supervisor-C-nLaaQ_.js.map → provision-supervisor-D5vktn4-.js.map} +1 -1
- package/dist/{redact-va_1mmv8.js → redact-CRUkFMwc.js} +6140 -6086
- package/dist/redact-CRUkFMwc.js.map +1 -0
- package/dist/{runtime-D0_b9wFH.js → runtime-BgaUFhvJ.js} +8 -8
- package/dist/{runtime-D0_b9wFH.js.map → runtime-BgaUFhvJ.js.map} +1 -1
- package/dist/{server-pq1x3C2i.js → server-CcvW0Y4S.js} +3 -3
- package/dist/{server-pq1x3C2i.js.map → server-CcvW0Y4S.js.map} +1 -1
- package/dist/{stream-agent-turn-BaKYHbHg.d.ts → stream-agent-turn-B7YnjmXV.d.ts} +417 -364
- package/dist/{structural-rollout-BaYBLUeI.js → structural-rollout-D8YEA37L.js} +2 -2
- package/dist/{structural-rollout-BaYBLUeI.js.map → structural-rollout-D8YEA37L.js.map} +1 -1
- package/dist/{supervise-CMWpmY_1.js → supervise-MA1BHLo5.js} +7 -3
- package/dist/supervise-MA1BHLo5.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +1 -1
- package/dist/redact-va_1mmv8.js.map +0 -1
- package/dist/supervise-CMWpmY_1.js.map +0 -1
|
@@ -28,6 +28,30 @@ interface ReservationTicket {
|
|
|
28
28
|
readonly usdBudgeted?: boolean;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
/** Where in the spawn lifecycle a reservation was last seen. `admitted` is the window between
|
|
32
|
+
* `reserve` and the hand-off to the child's execution, which the spawning code owns; `executing`
|
|
33
|
+
* means the child owns the ticket and only its settlement can close it. */
|
|
34
|
+
type ReservationStage = 'admitted' | 'executing';
|
|
35
|
+
/** Who holds a reservation. Recorded at `reserve` and refined through `attribute` once admission
|
|
36
|
+
* mints a node id, so a ticket stranded at the join barrier names the work that holds it instead
|
|
37
|
+
* of a bare counter. Every field except `stage` is optional: a pool used directly (no `Scope`)
|
|
38
|
+
* names nothing, and an unattributable leak must still be reportable. */
|
|
39
|
+
interface ReservationHolder {
|
|
40
|
+
/** The manager-scoped assignment identity the caller declared (`SpawnOpts.assignmentId`, else
|
|
41
|
+
* its `key`), when it declared one. */
|
|
42
|
+
readonly assignment?: string;
|
|
43
|
+
/** The spawn label — the name an operator recognizes in a journal. */
|
|
44
|
+
readonly label?: string;
|
|
45
|
+
/** The spawned node's id, once admission minted one. Absent for a reservation that escaped
|
|
46
|
+
* before its child had an identity. */
|
|
47
|
+
readonly childId?: string;
|
|
48
|
+
readonly stage: ReservationStage;
|
|
49
|
+
}
|
|
50
|
+
/** One reservation still open when a run reached its join barrier — a conserved-pool leak,
|
|
51
|
+
* reported with the holder that can be chased rather than only its ticket id. */
|
|
52
|
+
interface LeakedReservation extends ReservationHolder {
|
|
53
|
+
readonly ticketId: number;
|
|
54
|
+
}
|
|
31
55
|
/** Post-reservation pool readout — the shape `Scope.budget` exposes. `tokensLeft`,
|
|
32
56
|
* `usdLeft`, and `reservedTokens` reflect committed-but-unsettled reservations;
|
|
33
57
|
* `deadlineMs` is the ABSOLUTE wall-clock deadline (0 when the root set none).
|
|
@@ -88,13 +112,20 @@ interface BudgetPool {
|
|
|
88
112
|
* ({ ok: false }) when the pool can't cover standard or named channels — the
|
|
89
113
|
* caller inspects `ok` before `ticket`.
|
|
90
114
|
*/
|
|
91
|
-
reserve(b: Budget): {
|
|
115
|
+
reserve(b: Budget, holder?: ReservationHolder): {
|
|
92
116
|
ok: true;
|
|
93
117
|
ticket: ReservationTicket;
|
|
94
118
|
} | {
|
|
95
119
|
ok: false;
|
|
96
120
|
reason: ReservationRejection;
|
|
97
121
|
};
|
|
122
|
+
/**
|
|
123
|
+
* Name (or rename) who holds an open reservation. Merges into what `reserve` recorded, so a
|
|
124
|
+
* caller states only what it just learned — the node id admission minted, or the stage the
|
|
125
|
+
* ticket moved to. A settled or unknown ticket is ignored: attribution is leak EVIDENCE, never
|
|
126
|
+
* a lifecycle guard, and must not be able to fail a run that is otherwise healthy.
|
|
127
|
+
*/
|
|
128
|
+
attribute(ticket: ReservationTicket, holder: ReservationHolder): void;
|
|
98
129
|
/**
|
|
99
130
|
* Release a reservation: commit the actual `spent`, refund the unspent remainder
|
|
100
131
|
* to the free pool. Throws on an unknown or already-reconciled ticket (fail loud —
|
|
@@ -124,6 +155,9 @@ interface BudgetPool {
|
|
|
124
155
|
* supervisor's join barrier: once every child has settled, no ticket may remain (a leaked
|
|
125
156
|
* reservation would silently break `total ≡ free + reserved + committed`). */
|
|
126
157
|
assertNoOpenTickets(): void;
|
|
158
|
+
/** Every reservation still open, with its holder. Empty on a healthy pool. Read at the join
|
|
159
|
+
* barrier so a run that failed can REPORT a leak it must not also be destroyed by. */
|
|
160
|
+
openReservations(): ReadonlyArray<LeakedReservation>;
|
|
127
161
|
}
|
|
128
162
|
/** Fold a normalized `UsageEvent` array into a `Spend`. Tokens and usd are separate
|
|
129
163
|
* channels; iterations come from `'iteration'` events. Pure; `ms` stays zero (the
|
|
@@ -1219,6 +1253,10 @@ interface Agent<Task, Out> {
|
|
|
1219
1253
|
* path; returning `true` means the message was accepted for the current manager session.
|
|
1220
1254
|
*/
|
|
1221
1255
|
deliver?(msg: unknown): void | boolean;
|
|
1256
|
+
/** Optional live tool evidence exposed by executors that can observe it. */
|
|
1257
|
+
traceSource?(): TraceSource | undefined;
|
|
1258
|
+
/** Optional live execution progress exposed by executors that can observe it. */
|
|
1259
|
+
progress?(): ExecutorProgress | undefined;
|
|
1222
1260
|
}
|
|
1223
1261
|
/**
|
|
1224
1262
|
* The leaf runtime — ONE open interface, not a closed union. `execute` returns a
|
|
@@ -1572,11 +1610,12 @@ type UsageEvent = {
|
|
|
1572
1610
|
usdKnown: false;
|
|
1573
1611
|
usd: number;
|
|
1574
1612
|
/**
|
|
1575
|
-
* The part of `usd`
|
|
1576
|
-
*
|
|
1577
|
-
* measures what it did
|
|
1613
|
+
* The part of `usd` that is a PRICE rather than a charge: a model catalog's own number, or
|
|
1614
|
+
* a figure a provider stated with no billing receipt behind it. Either way it approximates
|
|
1615
|
+
* what a provider would bill and never measures what it did, so `usd - usdEstimated` stays
|
|
1616
|
+
* the amount a provider is known to have billed.
|
|
1578
1617
|
*
|
|
1579
|
-
* Absence means
|
|
1618
|
+
* Absence means nothing here was priced, NOT that `usd` is a receipt.
|
|
1580
1619
|
*/
|
|
1581
1620
|
usdEstimated?: number;
|
|
1582
1621
|
/**
|
|
@@ -1833,10 +1872,10 @@ interface Spend {
|
|
|
1833
1872
|
* when enforcing a dollar-denominated comparison or limit. */
|
|
1834
1873
|
usdKnown?: boolean;
|
|
1835
1874
|
usd: number;
|
|
1836
|
-
/** The part of `usd`
|
|
1875
|
+
/** The part of `usd` that is a PRICE rather than a charge, because no provider receipt covered
|
|
1876
|
+
* the work: a model catalog's own number, or a figure a provider stated but did not bill.
|
|
1837
1877
|
* `usd - usdEstimated` is what a provider is known to have billed. Present only with
|
|
1838
|
-
* `usdKnown: false`; absence means nothing here was
|
|
1839
|
-
* measured. */
|
|
1878
|
+
* `usdKnown: false`; absence means nothing here was priced, not that `usd` is measured. */
|
|
1840
1879
|
usdEstimated?: number;
|
|
1841
1880
|
ms: number;
|
|
1842
1881
|
/**
|
|
@@ -2715,6 +2754,12 @@ type SupervisedResult<Out> = {
|
|
|
2715
2754
|
* each is journaled as a `teardown-unconfirmed` event. Present exactly when non-empty; a
|
|
2716
2755
|
* healthy run never carries it. */
|
|
2717
2756
|
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
2757
|
+
/** Budget reservations still open when the run reached its join barrier, each named by the
|
|
2758
|
+
* assignment, child id, and lifecycle stage that holds it. The conserved-pool identity
|
|
2759
|
+
* `total ≡ free + reserved + committed` does not hold, so `spentTotal` is a floor rather
|
|
2760
|
+
* than a measurement — the run still settles with the tree and the spend the journal
|
|
2761
|
+
* recorded. Present exactly when non-empty; a healthy run never carries it. */
|
|
2762
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
2718
2763
|
/** The journaled nodes whose usage accounting is incomplete — the named gaps behind a
|
|
2719
2764
|
* `false` `tokensKnown`/`usdKnown` on `spentTotal`. Present exactly when non-empty. */
|
|
2720
2765
|
spendGaps?: ReadonlyArray<SpendGap>;
|
|
@@ -2754,6 +2799,12 @@ type SupervisedResult<Out> = {
|
|
|
2754
2799
|
* each is journaled as a `teardown-unconfirmed` event. Present exactly when non-empty; a
|
|
2755
2800
|
* healthy run never carries it. */
|
|
2756
2801
|
teardownUnconfirmed?: ReadonlyArray<UnconfirmedTeardown>;
|
|
2802
|
+
/** Budget reservations still open when the run reached its join barrier, each named by the
|
|
2803
|
+
* assignment, child id, and lifecycle stage that holds it. The conserved-pool identity
|
|
2804
|
+
* `total ≡ free + reserved + committed` does not hold, so `spentTotal` is a floor rather
|
|
2805
|
+
* than a measurement — the run still settles with the tree and the spend the journal
|
|
2806
|
+
* recorded. Present exactly when non-empty; a healthy run never carries it. */
|
|
2807
|
+
leakedReservations?: ReadonlyArray<LeakedReservation>;
|
|
2757
2808
|
/** The journaled nodes whose usage accounting is incomplete — the named gaps behind a
|
|
2758
2809
|
* `false` `tokensKnown`/`usdKnown` on `spentTotal`. Present exactly when non-empty. */
|
|
2759
2810
|
spendGaps?: ReadonlyArray<SpendGap>;
|
|
@@ -3587,177 +3638,6 @@ interface InPlaceHarnessResult {
|
|
|
3587
3638
|
harness: WorktreeHarnessResult['harness'];
|
|
3588
3639
|
}
|
|
3589
3640
|
//#endregion
|
|
3590
|
-
//#region src/runtime/harness-usage.d.ts
|
|
3591
|
-
/**
|
|
3592
|
-
* One harness's own token-usage report for one turn, in the runtime's field names.
|
|
3593
|
-
*
|
|
3594
|
-
* `input` is the provider's TOTAL prompt count and `output` is its TOTAL completion count.
|
|
3595
|
-
* The other three counters CLASSIFY a part of one of those totals; none of them adds to it.
|
|
3596
|
-
* `cachedInput` and `cacheWriteInput` classify `input`, which is the convention
|
|
3597
|
-
* `promptCacheTokenClasses` (`util.ts`) folds: `freshInput = input - cacheRead - cacheWrite`.
|
|
3598
|
-
* `reasoningOutput` classifies `output`.
|
|
3599
|
-
*
|
|
3600
|
-
* A counter the harness does not report stays absent, because a zero would claim the harness
|
|
3601
|
-
* measured none.
|
|
3602
|
-
*/
|
|
3603
|
-
interface HarnessUsage {
|
|
3604
|
-
/** The harness family whose adapter produced this report. */
|
|
3605
|
-
readonly harness: HarnessType;
|
|
3606
|
-
/** Total prompt tokens the provider charged for the turn, the cached ones included. */
|
|
3607
|
-
readonly input: number;
|
|
3608
|
-
/** Total completion tokens the provider charged for the turn, the reasoning ones included. */
|
|
3609
|
-
readonly output: number;
|
|
3610
|
-
/** The part of `input` the provider served from its prompt cache. */
|
|
3611
|
-
readonly cachedInput?: number;
|
|
3612
|
-
/** The part of `input` the provider wrote into its prompt cache. */
|
|
3613
|
-
readonly cacheWriteInput?: number;
|
|
3614
|
-
/** The part of `output` the model spent on reasoning. Never added to `output`. */
|
|
3615
|
-
readonly reasoningOutput?: number;
|
|
3616
|
-
}
|
|
3617
|
-
/**
|
|
3618
|
-
* Decode a sandbox event with one harness's adapter, or `undefined` when the event carries no
|
|
3619
|
-
* harness-native usage.
|
|
3620
|
-
*
|
|
3621
|
-
* A NAMED harness reads with that harness's adapter only, and a named harness with no adapter
|
|
3622
|
-
* reports nothing. It never falls through to another harness's adapter: a different harness's
|
|
3623
|
-
* `turn.completed` decoded as codex would either drop the counters codex does not name or fail on
|
|
3624
|
-
* a field codex requires, and both answers would be about the wrong harness. The composite over
|
|
3625
|
-
* every registered adapter runs only when the caller cannot name the harness.
|
|
3626
|
-
*
|
|
3627
|
-
* Throws `ValidationError` when an adapter recognizes the event as its harness's usage carrier and
|
|
3628
|
-
* cannot read the numbers.
|
|
3629
|
-
*/
|
|
3630
|
-
declare function decodeHarnessUsage(event: SandboxEvent, harness?: HarnessType): HarnessUsage | undefined;
|
|
3631
|
-
//#endregion
|
|
3632
|
-
//#region src/runtime/codex-rollout-store.d.ts
|
|
3633
|
-
/** Who wrote one rollout, exactly as its own `session_meta` states it. Nothing here is inferred. */
|
|
3634
|
-
interface CodexRolloutIdentity {
|
|
3635
|
-
/** The rollout's own thread id (`session_meta.payload.id`). */
|
|
3636
|
-
readonly sessionId: string;
|
|
3637
|
-
/** The thread this one was spawned or forked from, when it was. */
|
|
3638
|
-
readonly parentThreadId?: string;
|
|
3639
|
-
/** The thread whose rows are prepended into this file, when this file is a fork. */
|
|
3640
|
-
readonly forkedFromId?: string;
|
|
3641
|
-
/** True when `thread_source` reads `subagent`: a harness-native child, invisible to the journal. */
|
|
3642
|
-
readonly nativeChild: boolean;
|
|
3643
|
-
/** The child's own path in the harness's agent tree (`/root/c1_b_grid`), when it has one. */
|
|
3644
|
-
readonly agentPath?: string;
|
|
3645
|
-
/** The harness's own nickname for the child ("Turing"), when it has one. */
|
|
3646
|
-
readonly agentNickname?: string;
|
|
3647
|
-
/** Spawn depth the harness recorded. `1` is a direct child of the seat. */
|
|
3648
|
-
readonly depth?: number;
|
|
3649
|
-
/** The working directory the session ran in, used to attribute a store to a workspace. */
|
|
3650
|
-
readonly cwd?: string;
|
|
3651
|
-
/** The codex build that wrote it. */
|
|
3652
|
-
readonly cliVersion?: string;
|
|
3653
|
-
/** When the session itself started, from its own `session_meta` timestamp. */
|
|
3654
|
-
readonly startedAtMs?: number;
|
|
3655
|
-
}
|
|
3656
|
-
/** How this reader isolated the session's own rows from the parent rows prepended to its file. */
|
|
3657
|
-
type CodexForkBoundary =
|
|
3658
|
-
/** Not a fork: every row in the file belongs to this session. */
|
|
3659
|
-
{
|
|
3660
|
-
readonly kind: 'whole-file';
|
|
3661
|
-
} |
|
|
3662
|
-
/** A fork whose own first turn was isolated, and by which rule. */
|
|
3663
|
-
{
|
|
3664
|
-
readonly kind: 'resolved';
|
|
3665
|
-
readonly rule: 'history-start-ordinal' | 'turn-is-session' | 'turn-uuid-v7' | 'turn-start-time';
|
|
3666
|
-
/** The `turn_id` of the session's own first turn. */
|
|
3667
|
-
readonly turnId?: string;
|
|
3668
|
-
/** Rows credited to the parent and excluded from `own`. */
|
|
3669
|
-
readonly inheritedTurns: number;
|
|
3670
|
-
} |
|
|
3671
|
-
/** A fork this reader could not isolate. `own` is absent; nothing may be charged. */
|
|
3672
|
-
{
|
|
3673
|
-
readonly kind: 'unresolved';
|
|
3674
|
-
readonly reason: string;
|
|
3675
|
-
};
|
|
3676
|
-
/** One turn of one session, with the counters it added to the session's cumulative total. */
|
|
3677
|
-
interface CodexRolloutTurn {
|
|
3678
|
-
readonly turnId?: string;
|
|
3679
|
-
readonly startedAtMs?: number;
|
|
3680
|
-
readonly usage: HarnessUsage;
|
|
3681
|
-
}
|
|
3682
|
-
/** One rollout file, read. */
|
|
3683
|
-
interface CodexRolloutSession {
|
|
3684
|
-
readonly identity: CodexRolloutIdentity;
|
|
3685
|
-
readonly boundary: CodexForkBoundary;
|
|
3686
|
-
/**
|
|
3687
|
-
* The session's OWN spend — the cumulative delta from its fork boundary to its last report.
|
|
3688
|
-
* ABSENT when the boundary is unresolved: an unattributable number must not be charged.
|
|
3689
|
-
*/
|
|
3690
|
-
readonly own?: HarnessUsage;
|
|
3691
|
-
/** The session's own turns, newest last. Empty when the file reported no usage. */
|
|
3692
|
-
readonly turns: readonly CodexRolloutTurn[];
|
|
3693
|
-
/**
|
|
3694
|
-
* The file's final cumulative `total_token_usage`, kept ONLY as the diagnostic that shows how
|
|
3695
|
-
* far a naive file total is from the truth. Never charge this.
|
|
3696
|
-
*/
|
|
3697
|
-
readonly fileCumulativeInput: number;
|
|
3698
|
-
readonly fileCumulativeOutput: number;
|
|
3699
|
-
}
|
|
3700
|
-
/** What one incremental read of a store observed. */
|
|
3701
|
-
interface CodexStoreDelta {
|
|
3702
|
-
/** Spend by sessions that are NOT native children — the seat's own turns. */
|
|
3703
|
-
readonly seat: HarnessUsage;
|
|
3704
|
-
/** Spend by `thread_source: subagent` sessions — the harness-native children. */
|
|
3705
|
-
readonly native: HarnessUsage;
|
|
3706
|
-
/** Sessions whose fork boundary could not be isolated, so their spend is absent, not zero. */
|
|
3707
|
-
readonly unresolved: ReadonlyArray<{
|
|
3708
|
-
readonly sessionId: string;
|
|
3709
|
-
readonly reason: string;
|
|
3710
|
-
}>;
|
|
3711
|
-
/**
|
|
3712
|
-
* Every session this read touched, for evidence. Each one states its WHOLE own spend and turn
|
|
3713
|
-
* list, which is not the same number as `seat` / `native`: those two carry only what this read
|
|
3714
|
-
* newly observed.
|
|
3715
|
-
*/
|
|
3716
|
-
readonly sessions: readonly CodexRolloutSession[];
|
|
3717
|
-
}
|
|
3718
|
-
/** A store reader that credits each turn once: it tails only the bytes appended since the last read. */
|
|
3719
|
-
interface CodexRolloutStoreReader {
|
|
3720
|
-
/**
|
|
3721
|
-
* Read everything appended since the previous call and attribute it.
|
|
3722
|
-
*
|
|
3723
|
-
* The FIRST call establishes the baseline. Call it before the first turn so pre-existing rows are
|
|
3724
|
-
* consumed and credited to nothing; every later call returns exactly that turn's spend.
|
|
3725
|
-
*/
|
|
3726
|
-
read(): Promise<CodexStoreDelta>;
|
|
3727
|
-
}
|
|
3728
|
-
/** Where a harness keeps its own session store, and which workspace may be credited from it. */
|
|
3729
|
-
interface CodexRolloutStoreRef {
|
|
3730
|
-
/**
|
|
3731
|
-
* Absolute path to the harness home the CLI writes into — `CODEX_HOME`, or `$HOME/.codex`.
|
|
3732
|
-
* This MUST be the run's own isolated store. Pointing it at an ambient host store credits one
|
|
3733
|
-
* run with another run's files, which is the exact defect this reader exists to end.
|
|
3734
|
-
*/
|
|
3735
|
-
readonly root: string;
|
|
3736
|
-
/**
|
|
3737
|
-
* Credit only sessions whose recorded `cwd` is this path or below it. Absent credits every
|
|
3738
|
-
* session under `root`, which is correct only for a store no other run writes to.
|
|
3739
|
-
*/
|
|
3740
|
-
readonly workspaceRoot?: string;
|
|
3741
|
-
}
|
|
3742
|
-
/**
|
|
3743
|
-
* Read one rollout's rows into a session record.
|
|
3744
|
-
*
|
|
3745
|
-
* `rows` is the file's JSON values in file order. Pass the whole file to read a completed session;
|
|
3746
|
-
* the store reader passes appended slices and carries the identity forward itself.
|
|
3747
|
-
*/
|
|
3748
|
-
declare function readCodexRolloutSession(rows: Iterable<unknown>): CodexRolloutSession | undefined;
|
|
3749
|
-
/**
|
|
3750
|
-
* Open an incremental reader over a codex store.
|
|
3751
|
-
*
|
|
3752
|
-
* Nothing is read until `read()` is called, and every read is bounded by the bytes appended since
|
|
3753
|
-
* the previous one, so a 695MB rollout is scanned once rather than once per turn.
|
|
3754
|
-
*/
|
|
3755
|
-
declare function createCodexRolloutStoreReader(ref: CodexRolloutStoreRef): CodexRolloutStoreReader;
|
|
3756
|
-
/** Sum two usage reports on every counter both of them state. */
|
|
3757
|
-
declare function addHarnessUsage(left: HarnessUsage, right: HarnessUsage): HarnessUsage;
|
|
3758
|
-
/** True when a report states any spend at all. */
|
|
3759
|
-
declare function harnessUsageIsEmpty(usage: HarnessUsage): boolean;
|
|
3760
|
-
//#endregion
|
|
3761
3641
|
//#region src/runtime/provider-placement.d.ts
|
|
3762
3642
|
/** Caller-declared execution placement. Matching never changes the authored profile.
|
|
3763
3643
|
* @experimental */
|
|
@@ -3915,56 +3795,6 @@ interface ProviderExecutorOptions {
|
|
|
3915
3795
|
* @experimental */
|
|
3916
3796
|
declare function providerAsExecutor(provider: AgentEnvironmentProvider, options?: ProviderExecutorOptions): ExecutorFactory<unknown>;
|
|
3917
3797
|
//#endregion
|
|
3918
|
-
//#region src/runtime/key-provider.d.ts
|
|
3919
|
-
/** Resolve named secrets. The ONE seam every secret store adapts to. */
|
|
3920
|
-
interface KeyProvider {
|
|
3921
|
-
/** The value for `name`, or `undefined` when this provider does not hold it. */
|
|
3922
|
-
get(name: string): Promise<string | undefined>;
|
|
3923
|
-
}
|
|
3924
|
-
/** The env-backed provider: reads the (dotenvx-loaded) process env. Empty /
|
|
3925
|
-
* whitespace-only values count as absent — fail loud, not with a blank key. */
|
|
3926
|
-
declare function envKeyProvider(env?: Record<string, string | undefined>): KeyProvider;
|
|
3927
|
-
/** The `AgentProfileMcpServer.metadata` key the declarative secret-env map
|
|
3928
|
-
* rides under: `{ ENV_VAR_NAME: 'PROVIDER_KEY_NAME' }`. Names only — values
|
|
3929
|
-
* are resolved at materialize time and never stored. */
|
|
3930
|
-
declare const mcpSecretEnvMetadataKey = "secretEnv";
|
|
3931
|
-
/** Read (and validate) a server entry's declared secret-env map, if any.
|
|
3932
|
-
* Malformed metadata throws — a half-declared secret must never half-boot. */
|
|
3933
|
-
declare function secretEnvOfMcpServer(server: AgentProfileMcpServer): Record<string, string> | undefined;
|
|
3934
|
-
/**
|
|
3935
|
-
* Resolve a declared secret-env map into the real env entries for a server
|
|
3936
|
-
* spawn. Fail-closed: no provider or a missing key throws, naming the KEY
|
|
3937
|
-
* NAME only (the value never appears in any message). `label` names the
|
|
3938
|
-
* server for the error (e.g. `profile.mcp['exa']`).
|
|
3939
|
-
*/
|
|
3940
|
-
declare function resolveSecretEnv(secretEnv: Record<string, string>, keys: KeyProvider | undefined, label: string): Promise<Record<string, string>>;
|
|
3941
|
-
/** The spawn-ready strings for one stdio MCP server: profile config values
|
|
3942
|
-
* resolved, secrets separated so the client can redact them. */
|
|
3943
|
-
interface ResolvedMcpServerLaunch {
|
|
3944
|
-
args?: string[];
|
|
3945
|
-
/** Public env, safe to appear in diagnostics. */
|
|
3946
|
-
env?: Record<string, string>;
|
|
3947
|
-
/** Resolved secret env. Reaches only the child process; redacted everywhere else. */
|
|
3948
|
-
protectedEnv?: Record<string, string>;
|
|
3949
|
-
}
|
|
3950
|
-
/**
|
|
3951
|
-
* Resolve a profile MCP server's `args`/`env` config values (interface ≥0.40
|
|
3952
|
-
* `AgentProfileConfigValue`) plus the legacy `metadata.secretEnv` channel into
|
|
3953
|
-
* the plain strings a spawn needs.
|
|
3954
|
-
*
|
|
3955
|
-
* Rules, all fail-closed:
|
|
3956
|
-
* - `args` must be public values. A secret-ref in argv is refused: argv is
|
|
3957
|
-
* readable by every host process (/proc/PID/cmdline) and outside the
|
|
3958
|
-
* protected-value redaction channel, so a secret there cannot be contained.
|
|
3959
|
-
* - `env` secret-refs resolve through the KeyProvider (missing provider or key
|
|
3960
|
-
* throws, naming the KEY NAME only) and land in `protectedEnv`.
|
|
3961
|
-
* - An env var declared secret on BOTH channels (env secret-ref and
|
|
3962
|
-
* metadata.secretEnv) is ambiguous configuration and throws.
|
|
3963
|
-
* - A public `env` entry shadowed by a legacy metadata secret keeps the
|
|
3964
|
-
* pre-0.40 spawn precedence: the secret value wins in the child env.
|
|
3965
|
-
*/
|
|
3966
|
-
declare function resolveMcpServerLaunch(server: AgentProfileMcpServer, keys: KeyProvider | undefined, label: string): Promise<ResolvedMcpServerLaunch>;
|
|
3967
|
-
//#endregion
|
|
3968
3798
|
//#region src/runtime/sandbox-events.d.ts
|
|
3969
3799
|
/** The provider/model the platform reports it actually bound to a turn, when it reports one.
|
|
3970
3800
|
* `source` is the platform's own account of where that choice came from — `environment` means
|
|
@@ -4208,34 +4038,362 @@ interface SandboxLeafOut {
|
|
|
4208
4038
|
outcome?: AgentRunOutcome;
|
|
4209
4039
|
}
|
|
4210
4040
|
//#endregion
|
|
4211
|
-
//#region src/runtime/
|
|
4212
|
-
/**
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
*
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
readonly
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
/**
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4041
|
+
//#region src/runtime/harness-usage.d.ts
|
|
4042
|
+
/**
|
|
4043
|
+
* One harness's own token-usage report for one turn, in the runtime's field names.
|
|
4044
|
+
*
|
|
4045
|
+
* `input` is the provider's TOTAL prompt count and `output` is its TOTAL completion count.
|
|
4046
|
+
* The other three counters CLASSIFY a part of one of those totals; none of them adds to it.
|
|
4047
|
+
* `cachedInput` and `cacheWriteInput` classify `input`, which is the convention
|
|
4048
|
+
* `promptCacheTokenClasses` (`util.ts`) folds: `freshInput = input - cacheRead - cacheWrite`.
|
|
4049
|
+
* `reasoningOutput` classifies `output`.
|
|
4050
|
+
*
|
|
4051
|
+
* A counter the harness does not report stays absent, because a zero would claim the harness
|
|
4052
|
+
* measured none.
|
|
4053
|
+
*/
|
|
4054
|
+
interface HarnessUsage {
|
|
4055
|
+
/** The harness family whose adapter produced this report. */
|
|
4056
|
+
readonly harness: HarnessType;
|
|
4057
|
+
/** Total prompt tokens the provider charged for the turn, the cached ones included. */
|
|
4058
|
+
readonly input: number;
|
|
4059
|
+
/** Total completion tokens the provider charged for the turn, the reasoning ones included. */
|
|
4060
|
+
readonly output: number;
|
|
4061
|
+
/** The part of `input` the provider served from its prompt cache. */
|
|
4062
|
+
readonly cachedInput?: number;
|
|
4063
|
+
/** The part of `input` the provider wrote into its prompt cache. */
|
|
4064
|
+
readonly cacheWriteInput?: number;
|
|
4065
|
+
/** The part of `output` the model spent on reasoning. Never added to `output`. */
|
|
4066
|
+
readonly reasoningOutput?: number;
|
|
4067
|
+
}
|
|
4068
|
+
/**
|
|
4069
|
+
* Decode a sandbox event with one harness's adapter, or `undefined` when the event carries no
|
|
4070
|
+
* harness-native usage.
|
|
4071
|
+
*
|
|
4072
|
+
* A NAMED harness reads with that harness's adapter only, and a named harness with no adapter
|
|
4073
|
+
* reports nothing. It never falls through to another harness's adapter: a different harness's
|
|
4074
|
+
* `turn.completed` decoded as codex would either drop the counters codex does not name or fail on
|
|
4075
|
+
* a field codex requires, and both answers would be about the wrong harness. The composite over
|
|
4076
|
+
* every registered adapter runs only when the caller cannot name the harness.
|
|
4077
|
+
*
|
|
4078
|
+
* Throws `ValidationError` when an adapter recognizes the event as its harness's usage carrier and
|
|
4079
|
+
* cannot read the numbers.
|
|
4080
|
+
*/
|
|
4081
|
+
declare function decodeHarnessUsage(event: SandboxEvent, harness?: HarnessType): HarnessUsage | undefined;
|
|
4082
|
+
//#endregion
|
|
4083
|
+
//#region src/runtime/codex-rollout-store.d.ts
|
|
4084
|
+
/** Who wrote one rollout, exactly as its own `session_meta` states it. Nothing here is inferred. */
|
|
4085
|
+
interface CodexRolloutIdentity {
|
|
4086
|
+
/** The rollout's own thread id (`session_meta.payload.id`). */
|
|
4087
|
+
readonly sessionId: string;
|
|
4088
|
+
/** The thread this one was spawned or forked from, when it was. */
|
|
4089
|
+
readonly parentThreadId?: string;
|
|
4090
|
+
/** The thread whose rows are prepended into this file, when this file is a fork. */
|
|
4091
|
+
readonly forkedFromId?: string;
|
|
4092
|
+
/** True when `thread_source` reads `subagent`: a harness-native child, invisible to the journal. */
|
|
4093
|
+
readonly nativeChild: boolean;
|
|
4094
|
+
/** The child's own path in the harness's agent tree (`/root/c1_b_grid`), when it has one. */
|
|
4095
|
+
readonly agentPath?: string;
|
|
4096
|
+
/** The harness's own nickname for the child ("Turing"), when it has one. */
|
|
4097
|
+
readonly agentNickname?: string;
|
|
4098
|
+
/** Spawn depth the harness recorded. `1` is a direct child of the seat. */
|
|
4099
|
+
readonly depth?: number;
|
|
4100
|
+
/** The working directory the session ran in, used to attribute a store to a workspace. */
|
|
4101
|
+
readonly cwd?: string;
|
|
4102
|
+
/** The codex build that wrote it. */
|
|
4103
|
+
readonly cliVersion?: string;
|
|
4104
|
+
/** When the session itself started, from its own `session_meta` timestamp. */
|
|
4105
|
+
readonly startedAtMs?: number;
|
|
4106
|
+
}
|
|
4107
|
+
/** How this reader isolated the session's own rows from the parent rows prepended to its file. */
|
|
4108
|
+
type CodexForkBoundary =
|
|
4109
|
+
/** Not a fork: every row in the file belongs to this session. */
|
|
4110
|
+
{
|
|
4111
|
+
readonly kind: 'whole-file';
|
|
4112
|
+
} |
|
|
4113
|
+
/** A fork whose own first turn was isolated, and by which rule. */
|
|
4114
|
+
{
|
|
4115
|
+
readonly kind: 'resolved';
|
|
4116
|
+
readonly rule: 'history-start-ordinal' | 'turn-is-session' | 'turn-uuid-v7' | 'turn-start-time';
|
|
4117
|
+
/** The `turn_id` of the session's own first turn. */
|
|
4118
|
+
readonly turnId?: string;
|
|
4119
|
+
/** Rows credited to the parent and excluded from `own`. */
|
|
4120
|
+
readonly inheritedTurns: number;
|
|
4121
|
+
} |
|
|
4122
|
+
/** A fork this reader could not isolate. `own` is absent; nothing may be charged. */
|
|
4123
|
+
{
|
|
4124
|
+
readonly kind: 'unresolved';
|
|
4125
|
+
readonly reason: string;
|
|
4126
|
+
};
|
|
4127
|
+
/** One turn of one session, with the counters it added to the session's cumulative total. */
|
|
4128
|
+
interface CodexRolloutTurn {
|
|
4129
|
+
readonly turnId?: string;
|
|
4130
|
+
readonly startedAtMs?: number;
|
|
4131
|
+
readonly usage: HarnessUsage;
|
|
4132
|
+
}
|
|
4133
|
+
/** One rollout file, read. */
|
|
4134
|
+
interface CodexRolloutSession {
|
|
4135
|
+
readonly identity: CodexRolloutIdentity;
|
|
4136
|
+
readonly boundary: CodexForkBoundary;
|
|
4137
|
+
/**
|
|
4138
|
+
* The session's OWN spend — the cumulative delta from its fork boundary to its last report.
|
|
4139
|
+
* ABSENT when the boundary is unresolved: an unattributable number must not be charged.
|
|
4140
|
+
*/
|
|
4141
|
+
readonly own?: HarnessUsage;
|
|
4142
|
+
/** The session's own turns, newest last. Empty when the file reported no usage. */
|
|
4143
|
+
readonly turns: readonly CodexRolloutTurn[];
|
|
4144
|
+
/**
|
|
4145
|
+
* The file's final cumulative `total_token_usage`, kept ONLY as the diagnostic that shows how
|
|
4146
|
+
* far a naive file total is from the truth. Never charge this.
|
|
4147
|
+
*/
|
|
4148
|
+
readonly fileCumulativeInput: number;
|
|
4149
|
+
readonly fileCumulativeOutput: number;
|
|
4150
|
+
}
|
|
4151
|
+
/** What one incremental read of a store observed. */
|
|
4152
|
+
interface CodexStoreDelta {
|
|
4153
|
+
/** Spend by sessions that are NOT native children — the seat's own turns. */
|
|
4154
|
+
readonly seat: HarnessUsage;
|
|
4155
|
+
/** Spend by `thread_source: subagent` sessions — the harness-native children. */
|
|
4156
|
+
readonly native: HarnessUsage;
|
|
4157
|
+
/** Sessions whose fork boundary could not be isolated, so their spend is absent, not zero. */
|
|
4158
|
+
readonly unresolved: ReadonlyArray<{
|
|
4159
|
+
readonly sessionId: string;
|
|
4160
|
+
readonly reason: string;
|
|
4161
|
+
}>;
|
|
4162
|
+
/**
|
|
4163
|
+
* Every session this read touched, for evidence. Each one states its WHOLE own spend and turn
|
|
4164
|
+
* list, which is not the same number as `seat` / `native`: those two carry only what this read
|
|
4165
|
+
* newly observed.
|
|
4166
|
+
*/
|
|
4167
|
+
readonly sessions: readonly CodexRolloutSession[];
|
|
4168
|
+
}
|
|
4169
|
+
/** A store reader that credits each turn once: it tails only the bytes appended since the last read. */
|
|
4170
|
+
interface CodexRolloutStoreReader {
|
|
4171
|
+
/**
|
|
4172
|
+
* Read everything appended since the previous call and attribute it.
|
|
4173
|
+
*
|
|
4174
|
+
* The FIRST call establishes the baseline. Call it before the first turn so pre-existing rows are
|
|
4175
|
+
* consumed and credited to nothing; every later call returns exactly that turn's spend.
|
|
4176
|
+
*/
|
|
4177
|
+
read(): Promise<CodexStoreDelta>;
|
|
4178
|
+
}
|
|
4179
|
+
/** Where a harness keeps its own session store, and which workspace may be credited from it. */
|
|
4180
|
+
interface CodexRolloutStoreRef {
|
|
4181
|
+
/**
|
|
4182
|
+
* Absolute path to the harness home the CLI writes into — `CODEX_HOME`, or `$HOME/.codex`.
|
|
4183
|
+
* This MUST be the run's own isolated store. Pointing it at an ambient host store credits one
|
|
4184
|
+
* run with another run's files, which is the exact defect this reader exists to end.
|
|
4185
|
+
*/
|
|
4186
|
+
readonly root: string;
|
|
4187
|
+
/**
|
|
4188
|
+
* Credit only sessions whose recorded `cwd` is this path or below it. Absent credits every
|
|
4189
|
+
* session under `root`, which is correct only for a store no other run writes to.
|
|
4190
|
+
*/
|
|
4191
|
+
readonly workspaceRoot?: string;
|
|
4192
|
+
}
|
|
4193
|
+
/**
|
|
4194
|
+
* Read one rollout's rows into a session record.
|
|
4195
|
+
*
|
|
4196
|
+
* `rows` is the file's JSON values in file order. Pass the whole file to read a completed session;
|
|
4197
|
+
* the store reader passes appended slices and carries the identity forward itself.
|
|
4198
|
+
*/
|
|
4199
|
+
declare function readCodexRolloutSession(rows: Iterable<unknown>): CodexRolloutSession | undefined;
|
|
4200
|
+
/**
|
|
4201
|
+
* Open an incremental reader over a codex store.
|
|
4202
|
+
*
|
|
4203
|
+
* Nothing is read until `read()` is called, and every read is bounded by the bytes appended since
|
|
4204
|
+
* the previous one, so a 695MB rollout is scanned once rather than once per turn.
|
|
4205
|
+
*/
|
|
4206
|
+
declare function createCodexRolloutStoreReader(ref: CodexRolloutStoreRef): CodexRolloutStoreReader;
|
|
4207
|
+
/** Sum two usage reports on every counter both of them state. */
|
|
4208
|
+
declare function addHarnessUsage(left: HarnessUsage, right: HarnessUsage): HarnessUsage;
|
|
4209
|
+
/** True when a report states any spend at all. */
|
|
4210
|
+
declare function harnessUsageIsEmpty(usage: HarnessUsage): boolean;
|
|
4211
|
+
//#endregion
|
|
4212
|
+
//#region src/runtime/key-provider.d.ts
|
|
4213
|
+
/** Resolve named secrets. The ONE seam every secret store adapts to. */
|
|
4214
|
+
interface KeyProvider {
|
|
4215
|
+
/** The value for `name`, or `undefined` when this provider does not hold it. */
|
|
4216
|
+
get(name: string): Promise<string | undefined>;
|
|
4217
|
+
}
|
|
4218
|
+
/** The env-backed provider: reads the (dotenvx-loaded) process env. Empty /
|
|
4219
|
+
* whitespace-only values count as absent — fail loud, not with a blank key. */
|
|
4220
|
+
declare function envKeyProvider(env?: Record<string, string | undefined>): KeyProvider;
|
|
4221
|
+
/** The `AgentProfileMcpServer.metadata` key the declarative secret-env map
|
|
4222
|
+
* rides under: `{ ENV_VAR_NAME: 'PROVIDER_KEY_NAME' }`. Names only — values
|
|
4223
|
+
* are resolved at materialize time and never stored. */
|
|
4224
|
+
declare const mcpSecretEnvMetadataKey = "secretEnv";
|
|
4225
|
+
/** Read (and validate) a server entry's declared secret-env map, if any.
|
|
4226
|
+
* Malformed metadata throws — a half-declared secret must never half-boot. */
|
|
4227
|
+
declare function secretEnvOfMcpServer(server: AgentProfileMcpServer): Record<string, string> | undefined;
|
|
4228
|
+
/**
|
|
4229
|
+
* Resolve a declared secret-env map into the real env entries for a server
|
|
4230
|
+
* spawn. Fail-closed: no provider or a missing key throws, naming the KEY
|
|
4231
|
+
* NAME only (the value never appears in any message). `label` names the
|
|
4232
|
+
* server for the error (e.g. `profile.mcp['exa']`).
|
|
4233
|
+
*/
|
|
4234
|
+
declare function resolveSecretEnv(secretEnv: Record<string, string>, keys: KeyProvider | undefined, label: string): Promise<Record<string, string>>;
|
|
4235
|
+
/** The spawn-ready strings for one stdio MCP server: profile config values
|
|
4236
|
+
* resolved, secrets separated so the client can redact them. */
|
|
4237
|
+
interface ResolvedMcpServerLaunch {
|
|
4238
|
+
args?: string[];
|
|
4239
|
+
/** Public env, safe to appear in diagnostics. */
|
|
4240
|
+
env?: Record<string, string>;
|
|
4241
|
+
/** Resolved secret env. Reaches only the child process; redacted everywhere else. */
|
|
4242
|
+
protectedEnv?: Record<string, string>;
|
|
4243
|
+
}
|
|
4244
|
+
/**
|
|
4245
|
+
* Resolve a profile MCP server's `args`/`env` config values (interface ≥0.40
|
|
4246
|
+
* `AgentProfileConfigValue`) plus the legacy `metadata.secretEnv` channel into
|
|
4247
|
+
* the plain strings a spawn needs.
|
|
4248
|
+
*
|
|
4249
|
+
* Rules, all fail-closed:
|
|
4250
|
+
* - `args` must be public values. A secret-ref in argv is refused: argv is
|
|
4251
|
+
* readable by every host process (/proc/PID/cmdline) and outside the
|
|
4252
|
+
* protected-value redaction channel, so a secret there cannot be contained.
|
|
4253
|
+
* - `env` secret-refs resolve through the KeyProvider (missing provider or key
|
|
4254
|
+
* throws, naming the KEY NAME only) and land in `protectedEnv`.
|
|
4255
|
+
* - An env var declared secret on BOTH channels (env secret-ref and
|
|
4256
|
+
* metadata.secretEnv) is ambiguous configuration and throws.
|
|
4257
|
+
* - A public `env` entry shadowed by a legacy metadata secret keeps the
|
|
4258
|
+
* pre-0.40 spawn precedence: the secret value wins in the child env.
|
|
4259
|
+
*/
|
|
4260
|
+
declare function resolveMcpServerLaunch(server: AgentProfileMcpServer, keys: KeyProvider | undefined, label: string): Promise<ResolvedMcpServerLaunch>;
|
|
4261
|
+
//#endregion
|
|
4262
|
+
//#region src/runtime/supervise/bridge-config.d.ts
|
|
4263
|
+
/**
|
|
4264
|
+
* cli-bridge seam. A local OpenAI-compatible bridge that fronts harness CLIs
|
|
4265
|
+
* (claude-code / opencode / kimi / pi) behind one HTTP surface. The spawned
|
|
4266
|
+
* `AgentProfile` is the sole harness/provider/model and behavioral authority and
|
|
4267
|
+
* is forwarded verbatim per request; this seam carries transport data only.
|
|
4268
|
+
*
|
|
4269
|
+
* The executor opens a resumable cli-bridge session. `sessionId` identifies the
|
|
4270
|
+
* harness conversation across turns; each turn also receives its own durable run id.
|
|
4271
|
+
* A dropped HTTP reader reattaches to that exact run and explicit cancel is the only
|
|
4272
|
+
* operation allowed to stop it. Omit `sessionId` and the executor mints one per spawn.
|
|
4273
|
+
*
|
|
4274
|
+
* ── HOW TO CONTROL WHAT THE HARNESS LOADS (there is no argv field, by design) ──
|
|
4275
|
+
*
|
|
4276
|
+
* A worker often needs the harness started in a KNOWN state — no ambient extensions, skills,
|
|
4277
|
+
* context files, or prompt templates — because ambient state is how a paired experiment silently
|
|
4278
|
+
* loses its pairing: an installed extension that persists memory across runs carries arm A's state
|
|
4279
|
+
* into arm B, and nothing reports it.
|
|
4280
|
+
*
|
|
4281
|
+
* That is what the spawned `AgentProfile` is FOR. `agent_profile`
|
|
4282
|
+
* rides every request verbatim, and cli-bridge maps it onto each harness's own native controls:
|
|
4283
|
+
*
|
|
4284
|
+
* - Materializing any profile at all already starts the harness isolated from ambient
|
|
4285
|
+
* workspace state — for pi that is `--no-context-files --no-skills --no-prompt-templates`,
|
|
4286
|
+
* applied to every request that carries an `agent_profile`.
|
|
4287
|
+
* - `AgentProfile.extensions.<harness>` is the named, per-harness control channel. An explicit
|
|
4288
|
+
* `extensions: { pi: { load: [] } }` disables ambient extension discovery outright
|
|
4289
|
+
* (pi's `--no-extensions`); listing package names loads exactly those and nothing else.
|
|
4290
|
+
* - `permissions` / `tools` / `mcp` map onto the harness's native tool and server controls.
|
|
4291
|
+
*
|
|
4292
|
+
* A caller therefore does NOT need to hand-roll an `Executor` to isolate a harness run, and the
|
|
4293
|
+
* profile expressing it stays portable: the same declaration means the same thing on a different
|
|
4294
|
+
* harness, whereas an argv string means nothing anywhere else.
|
|
4295
|
+
*
|
|
4296
|
+
* WHY NOT A GENERAL ARGV PASSTHROUGH. `bridgeUrl` addresses a process-spawning server. Forwarding
|
|
4297
|
+
* an arbitrary argv array to it would let any caller holding a bearer token choose the flags of a
|
|
4298
|
+
* process on the bridge host — which for real harness CLIs includes flags that load code from a
|
|
4299
|
+
* path, read a file into the prompt, redirect the working directory, or turn off the isolation the
|
|
4300
|
+
* bridge applies. cli-bridge deliberately confines workers (a filesystem jail and deny-by-default
|
|
4301
|
+
* network egress), and every one of those confinements is expressed as spawn configuration, so an
|
|
4302
|
+
* argv channel is a channel for unwinding them. It would also break this executor's own contract:
|
|
4303
|
+
* the durable-run replay protocol, session pinning, and streaming mode are all argv the bridge
|
|
4304
|
+
* owns, and a caller-supplied duplicate silently wins or corrupts the parse. The structured profile
|
|
4305
|
+
* channel is validated, per-harness, portable, and refuses controls it does not understand — keep
|
|
4306
|
+
* new harness capability there.
|
|
4307
|
+
*/
|
|
4308
|
+
interface BridgeSeam {
|
|
4309
|
+
bridgeUrl: string;
|
|
4310
|
+
bridgeBearer: string;
|
|
4311
|
+
/**
|
|
4312
|
+
* Optional request-scoped model credential.
|
|
4313
|
+
*
|
|
4314
|
+
* The key name is portable configuration. The provider is a live service and is intentionally
|
|
4315
|
+
* not serialised. Runtime resolves both values immediately before every bridge POST and sends
|
|
4316
|
+
* them only to a loopback bridge through private request headers.
|
|
4317
|
+
*/
|
|
4318
|
+
modelCredential?: BridgeModelCredential;
|
|
4319
|
+
/** Optional working directory forwarded to cli-bridge and persisted with the session. */
|
|
4320
|
+
cwd?: string;
|
|
4321
|
+
/**
|
|
4322
|
+
* The harness's OWN on-disk session store, read as a spend receipt.
|
|
4323
|
+
*
|
|
4324
|
+
* cli-bridge forwards no token usage for a codex worker, so a turn whose provider counters exist
|
|
4325
|
+
* only in codex's rollout meters `{0, 0}` with `tokensKnown: false`. Measured on one live seat
|
|
4326
|
+
* (discovery#80): 9 of 9 `metered` events read zero while 27,320,482 codex tokens sat in the same
|
|
4327
|
+
* run directory, 1,453,948 of them belonging to harness-native children the journal never saw.
|
|
4328
|
+
*
|
|
4329
|
+
* Naming the store here turns those rows into evidence. The executor tails it once per turn and
|
|
4330
|
+
* credits the DELTA, so each turn is charged once, and it reports the counters with
|
|
4331
|
+
* `provenance: 'harness-store'` so a reader can tell a disk receipt from a stream receipt.
|
|
4332
|
+
*
|
|
4333
|
+
* The path must be the run's OWN isolated store. An ambient host store credits this run with
|
|
4334
|
+
* another run's files, and `workspaceRoot` is the structural guard against it.
|
|
4335
|
+
*/
|
|
4336
|
+
harnessStore?: BridgeHarnessStore;
|
|
4337
|
+
/** Caller-owned deadline for each bridge turn. Runtime enforces it locally and sends the
|
|
4338
|
+
* same value in `execution.timeoutMs` so the bridge-owned process follows the same policy. */
|
|
4339
|
+
timeoutMs?: number;
|
|
4340
|
+
/** Stable, caller-owned cli-bridge session id for harness-side resume. Defaults
|
|
4341
|
+
* to a freshly minted per-spawn id so each worker is its own resumable session. */
|
|
4342
|
+
sessionId?: string;
|
|
4343
|
+
/** Transport reconnects allowed after the first POST. Default 3; set 0 to disable. */
|
|
4344
|
+
maxReconnects?: number;
|
|
4345
|
+
/** Newest-last activity window `progress()` reports. Default 12. */
|
|
4346
|
+
activityWindow?: number;
|
|
4347
|
+
}
|
|
4348
|
+
/**
|
|
4349
|
+
* A harness's own session store on the bridge host, named so the runtime may read it.
|
|
4350
|
+
*
|
|
4351
|
+
* Only `codex` has a reader today. Any other harness is REFUSED rather than read with codex's
|
|
4352
|
+
* decoder: a different harness's file decoded as a codex rollout would either drop counters it does
|
|
4353
|
+
* not name or credit a number that is about the wrong wire shape.
|
|
4354
|
+
*/
|
|
4355
|
+
interface BridgeHarnessStore extends CodexRolloutStoreRef {
|
|
4356
|
+
/** The harness family that wrote the store. */
|
|
4357
|
+
readonly harness: HarnessType;
|
|
4358
|
+
}
|
|
4359
|
+
/** A live, request-scoped model credential reference for a local cli-bridge. */
|
|
4360
|
+
interface BridgeModelCredential {
|
|
4361
|
+
/** Provider key name for the scoped model token. */
|
|
4362
|
+
key: string;
|
|
4363
|
+
/** Provider key name for the exact scoped HTTPS model gateway URL. */
|
|
4364
|
+
baseUrlKey: string;
|
|
4365
|
+
/** Live credential service. Runtime retains this reference through reusable captures. */
|
|
4366
|
+
provider: KeyProvider;
|
|
4367
|
+
}
|
|
4368
|
+
//#endregion
|
|
4369
|
+
//#region src/runtime/supervise/inbox.d.ts
|
|
4370
|
+
/** A message from the run's AUTHORITY — the parent driver. These two kinds carry instruction. */
|
|
4371
|
+
interface AuthorityInboxMessage {
|
|
4372
|
+
readonly kind: 'steer' | 'answer';
|
|
4373
|
+
readonly text: string;
|
|
4374
|
+
/** Forceful messages abort the in-flight turn; queued ones wait for the boundary flush. */
|
|
4375
|
+
readonly interrupt: boolean;
|
|
4376
|
+
/** Present for an `answer` — the question id it resolves. */
|
|
4377
|
+
readonly questionId?: string;
|
|
4378
|
+
}
|
|
4379
|
+
/** A message from a SIBLING worker. Information, never instruction — the parent stays the only
|
|
4380
|
+
* authority over this worker's task. */
|
|
4381
|
+
interface PeerInboxMessage {
|
|
4382
|
+
readonly kind: 'mail';
|
|
4383
|
+
readonly text: string;
|
|
4384
|
+
/** Always false. Peer mail is queued by construction; see this file's header. */
|
|
4385
|
+
readonly interrupt: false;
|
|
4386
|
+
readonly envelope: PeerMailEnvelope;
|
|
4387
|
+
}
|
|
4388
|
+
type InboxMessage = AuthorityInboxMessage | PeerInboxMessage;
|
|
4389
|
+
interface Inbox {
|
|
4390
|
+
/** The `Executor.deliver` implementation. Returns false when the raw message is malformed and
|
|
4391
|
+
* therefore was not queued; callers must not acknowledge a message this inbox discarded. */
|
|
4392
|
+
deliver(msg: unknown): boolean;
|
|
4393
|
+
/** Remove and return all pending messages (the flush). */
|
|
4394
|
+
drain(): InboxMessage[];
|
|
4395
|
+
pending(): number;
|
|
4396
|
+
/** Pending messages from the run's AUTHORITY only. This is what the pre-settle fence counts:
|
|
4239
4397
|
* a worker may not finish while a steer or answer it never read is queued, but peer mail must
|
|
4240
4398
|
* never be able to hold a finished worker open. */
|
|
4241
4399
|
pendingAuthority(): number;
|
|
@@ -4462,111 +4620,6 @@ interface CliWorktreeBridgeSeam {
|
|
|
4462
4620
|
/** Transport reconnects allowed after the first POST. Default 3; set 0 to disable. */
|
|
4463
4621
|
maxReconnects?: number;
|
|
4464
4622
|
}
|
|
4465
|
-
/**
|
|
4466
|
-
* cli-bridge seam. A local OpenAI-compatible bridge that fronts harness CLIs
|
|
4467
|
-
* (claude-code / opencode / kimi / pi) behind one HTTP surface. The spawned
|
|
4468
|
-
* `AgentProfile` is the sole harness/provider/model and behavioral authority and
|
|
4469
|
-
* is forwarded verbatim per request; this seam carries transport data only.
|
|
4470
|
-
*
|
|
4471
|
-
* The executor opens a resumable cli-bridge session. `sessionId` identifies the
|
|
4472
|
-
* harness conversation across turns; each turn also receives its own durable run id.
|
|
4473
|
-
* A dropped HTTP reader reattaches to that exact run and explicit cancel is the only
|
|
4474
|
-
* operation allowed to stop it. Omit `sessionId` and the executor mints one per spawn.
|
|
4475
|
-
*
|
|
4476
|
-
* ── HOW TO CONTROL WHAT THE HARNESS LOADS (there is no argv field, by design) ──
|
|
4477
|
-
*
|
|
4478
|
-
* A worker often needs the harness started in a KNOWN state — no ambient extensions, skills,
|
|
4479
|
-
* context files, or prompt templates — because ambient state is how a paired experiment silently
|
|
4480
|
-
* loses its pairing: an installed extension that persists memory across runs carries arm A's state
|
|
4481
|
-
* into arm B, and nothing reports it.
|
|
4482
|
-
*
|
|
4483
|
-
* That is what the spawned `AgentProfile` is FOR. `agent_profile`
|
|
4484
|
-
* rides every request verbatim, and cli-bridge maps it onto each harness's own native controls:
|
|
4485
|
-
*
|
|
4486
|
-
* - Materializing any profile at all already starts the harness isolated from ambient
|
|
4487
|
-
* workspace state — for pi that is `--no-context-files --no-skills --no-prompt-templates`,
|
|
4488
|
-
* applied to every request that carries an `agent_profile`.
|
|
4489
|
-
* - `AgentProfile.extensions.<harness>` is the named, per-harness control channel. An explicit
|
|
4490
|
-
* `extensions: { pi: { load: [] } }` disables ambient extension discovery outright
|
|
4491
|
-
* (pi's `--no-extensions`); listing package names loads exactly those and nothing else.
|
|
4492
|
-
* - `permissions` / `tools` / `mcp` map onto the harness's native tool and server controls.
|
|
4493
|
-
*
|
|
4494
|
-
* A caller therefore does NOT need to hand-roll an `Executor` to isolate a harness run, and the
|
|
4495
|
-
* profile expressing it stays portable: the same declaration means the same thing on a different
|
|
4496
|
-
* harness, whereas an argv string means nothing anywhere else.
|
|
4497
|
-
*
|
|
4498
|
-
* WHY NOT A GENERAL ARGV PASSTHROUGH. `bridgeUrl` addresses a process-spawning server. Forwarding
|
|
4499
|
-
* an arbitrary argv array to it would let any caller holding a bearer token choose the flags of a
|
|
4500
|
-
* process on the bridge host — which for real harness CLIs includes flags that load code from a
|
|
4501
|
-
* path, read a file into the prompt, redirect the working directory, or turn off the isolation the
|
|
4502
|
-
* bridge applies. cli-bridge deliberately confines workers (a filesystem jail and deny-by-default
|
|
4503
|
-
* network egress), and every one of those confinements is expressed as spawn configuration, so an
|
|
4504
|
-
* argv channel is a channel for unwinding them. It would also break this executor's own contract:
|
|
4505
|
-
* the durable-run replay protocol, session pinning, and streaming mode are all argv the bridge
|
|
4506
|
-
* owns, and a caller-supplied duplicate silently wins or corrupts the parse. The structured profile
|
|
4507
|
-
* channel is validated, per-harness, portable, and refuses controls it does not understand — keep
|
|
4508
|
-
* new harness capability there.
|
|
4509
|
-
*/
|
|
4510
|
-
interface BridgeSeam {
|
|
4511
|
-
bridgeUrl: string;
|
|
4512
|
-
bridgeBearer: string;
|
|
4513
|
-
/**
|
|
4514
|
-
* Optional request-scoped model credential.
|
|
4515
|
-
*
|
|
4516
|
-
* The key name is portable configuration. The provider is a live service and is intentionally
|
|
4517
|
-
* not serialised. Runtime resolves both values immediately before every bridge POST and sends
|
|
4518
|
-
* them only to a loopback bridge through private request headers.
|
|
4519
|
-
*/
|
|
4520
|
-
modelCredential?: BridgeModelCredential;
|
|
4521
|
-
/** Optional working directory forwarded to cli-bridge and persisted with the session. */
|
|
4522
|
-
cwd?: string;
|
|
4523
|
-
/**
|
|
4524
|
-
* The harness's OWN on-disk session store, read as a spend receipt.
|
|
4525
|
-
*
|
|
4526
|
-
* cli-bridge forwards no token usage for a codex worker, so a turn whose provider counters exist
|
|
4527
|
-
* only in codex's rollout meters `{0, 0}` with `tokensKnown: false`. Measured on one live seat
|
|
4528
|
-
* (discovery#80): 9 of 9 `metered` events read zero while 27,320,482 codex tokens sat in the same
|
|
4529
|
-
* run directory, 1,453,948 of them belonging to harness-native children the journal never saw.
|
|
4530
|
-
*
|
|
4531
|
-
* Naming the store here turns those rows into evidence. The executor tails it once per turn and
|
|
4532
|
-
* credits the DELTA, so each turn is charged once, and it reports the counters with
|
|
4533
|
-
* `provenance: 'harness-store'` so a reader can tell a disk receipt from a stream receipt.
|
|
4534
|
-
*
|
|
4535
|
-
* The path must be the run's OWN isolated store. An ambient host store credits this run with
|
|
4536
|
-
* another run's files, and `workspaceRoot` is the structural guard against it.
|
|
4537
|
-
*/
|
|
4538
|
-
harnessStore?: BridgeHarnessStore;
|
|
4539
|
-
/** Caller-owned deadline for each bridge turn. Runtime enforces it locally and sends the
|
|
4540
|
-
* same value in `execution.timeoutMs` so the bridge-owned process follows the same policy. */
|
|
4541
|
-
timeoutMs?: number;
|
|
4542
|
-
/** Stable, caller-owned cli-bridge session id for harness-side resume. Defaults
|
|
4543
|
-
* to a freshly minted per-spawn id so each worker is its own resumable session. */
|
|
4544
|
-
sessionId?: string;
|
|
4545
|
-
/** Transport reconnects allowed after the first POST. Default 3; set 0 to disable. */
|
|
4546
|
-
maxReconnects?: number;
|
|
4547
|
-
/** Newest-last activity window `progress()` reports. Default 12. */
|
|
4548
|
-
activityWindow?: number;
|
|
4549
|
-
}
|
|
4550
|
-
/**
|
|
4551
|
-
* A harness's own session store on the bridge host, named so the runtime may read it.
|
|
4552
|
-
*
|
|
4553
|
-
* Only `codex` has a reader today. Any other harness is REFUSED rather than read with codex's
|
|
4554
|
-
* decoder: a different harness's file decoded as a codex rollout would either drop counters it does
|
|
4555
|
-
* not name or credit a number that is about the wrong wire shape.
|
|
4556
|
-
*/
|
|
4557
|
-
interface BridgeHarnessStore extends CodexRolloutStoreRef {
|
|
4558
|
-
/** The harness family that wrote the store. */
|
|
4559
|
-
readonly harness: HarnessType;
|
|
4560
|
-
}
|
|
4561
|
-
/** A live, request-scoped model credential reference for a local cli-bridge. */
|
|
4562
|
-
interface BridgeModelCredential {
|
|
4563
|
-
/** Provider key name for the scoped model token. */
|
|
4564
|
-
key: string;
|
|
4565
|
-
/** Provider key name for the exact scoped HTTPS model gateway URL. */
|
|
4566
|
-
baseUrlKey: string;
|
|
4567
|
-
/** Live credential service. Runtime retains this reference through reusable captures. */
|
|
4568
|
-
provider: KeyProvider;
|
|
4569
|
-
}
|
|
4570
4623
|
/**
|
|
4571
4624
|
* Generic environment provider executor config. External packages implement
|
|
4572
4625
|
* `AgentEnvironmentProvider`; this built-in wrapper lets `createExecutor` consume them as backend
|
|
@@ -4806,5 +4859,5 @@ declare function streamAgentTurn(backend: AgentTurnBackend, input: AgentTurnInpu
|
|
|
4806
4859
|
*/
|
|
4807
4860
|
declare function collectAgentTurn(stream: AsyncIterable<RuntimeStreamEvent>): Promise<CollectedAgentTurn>;
|
|
4808
4861
|
//#endregion
|
|
4809
|
-
export {
|
|
4810
|
-
//# sourceMappingURL=stream-agent-turn-
|
|
4862
|
+
export { decodeHarnessUsage as $, RetainedRunCancellation as $a, SanitizedKnowledgeRequirement as $i, Redactor as $n, SteerableRootHandle as $r, WorktreeCommandResult as $t, createInbox as A, createActivityLog as Aa, LoopSpanNode as Ai, ToolLoopToolCall as An, ProfileMaterializationReceipt as Ar, CreateAgentEnvironmentInput$1 as At, secretEnvOfMcpServer as B, NativeContextContinuationHandle as Ba, createOtelExporter as Bi, PeerMailRefusal as Bn, RootProviderModelEvidence as Br, SandboxClientProviderOptions as Bt, SteerableSandboxArgs as C, sandboxSessionTraceSource as Ca, readTraceContextFromEnv as Ci, RouterTransportConfig as Cn, MaterializedExecutionIdentity as Cr, AgentProfileRef$1 as Ct, Inbox as D, ExecutorProgress as Da, EvalRunsExportConfig as Di, ToolLoopCompaction as Dn, NodeId as Dr, AgentTurnResult$2 as Dt, AuthorityInboxMessage as E, DEFAULT_STALL_AFTER_MS as Ea, EvalRunGeneration as Ei, ToolLoopChat as En, NodeExecutionIdentity as Er, AgentSessionStatus$1 as Et, ResolvedMcpServerLaunch as F, RetainedInteractiveEnvironmentInput as Fa, RuntimeEventOtelOptions as Fi, PeerMailEvent as Fn, ResultBlobStore as Fr, ProviderAsSandboxClientOptions as Ft, CodexRolloutStoreRef as G, RecoverRetainedRunResult as Ga, padTraceId as Gi, createPeerMailbox as Gn, SpawnEvent as Gr, resolveAgentEnvironmentProvider as Gt, CodexRolloutIdentity as H, ReconnectRetainedRunOptions as Ha, generateSpanId as Hi, PeerMailbox as Hn, Runtime as Hr, createAgentEnvironmentProviderRegistry as Ht, envKeyProvider as I, RetainedInteractiveRunHandle as Ia, buildLoopOtelSpans as Ii, PeerMailKind as In, ResumedKeyState as Ir, ProviderExecutorOptions as It, addHarnessUsage as J, RetainedInteractiveIntentAdmission as Ja, RuntimeStreamEventCollector as Ji, peerMailVerbNames as Jn, SpawnPrior as Jr, SandboxControlClient as Jt, CodexRolloutTurn as K, RetainedInteractiveAdmission as Ka, toOtelAttributes as Ki, isPeerMailEnvelope as Kn, SpawnJournal as Kr, sandboxClientAsProvider as Kt, mcpSecretEnvMetadataKey as L, RetainedInteractiveStartMaterial as La, buildLoopSpanNodes as Li, PeerMailLimits as Ln, ResumedWork as Lr, ProviderLeafOut as Lt, BridgeModelCredential as M, ReconnectRetainedInteractiveRunOptions as Ma, OtelExportConfig as Mi, DEFAULT_PEER_MAIL_LIMITS as Mn, ProviderModelExecutionEvidence as Mr, ExecResult as Mt, BridgeSeam as N, RecoverRetainedInteractiveRunOptions as Na, OtelExporter as Ni, PEER_MAIL_WIRE_KEY as Nn, ResourceLimit as Nr, ForkRequest as Nt, InboxMessage as O, ScopeProgressInput as Oa, EvalRunsExportResult as Oi, ToolLoopCompactionOptions as On, NodeSnapshot as Or, CheckpointRef as Ot, KeyProvider as P, RetainedInteractiveAdmissionHook as Pa, OtelSpan as Pi, PeerMailEnvelope as Pn, ResourceSpend as Pr, PlacementInfo as Pt, HarnessUsage as Q, RetainedRunCancelOptions as Qa, SanitizedKnowledgeReadinessReport as Qi, McpTransport as Qn, SpendGap as Qr, WorktreeCheckRunner as Qt, resolveMcpServerLaunch as R, StartRetainedInteractiveRunOptions as Ra, buildRuntimeEventOtelSpans as Ri, PeerMailOutcome as Rn, RootHandle as Rr, ProviderPromptOptions as Rt, SandboxSteeringOptions as S, decodeToolPart as Sa, mergeTraceEnv as Si, runLocalHarness as Sn, Handle as Sr, AgentEnvironmentSummary as St, createSteerableSandboxSession as T, ActivityNote as Ta, EvalRunEvent as Ti, ToolLoopCallContext as Tn, NoWinnerError as Tr, AgentSessionRef as Tt, CodexRolloutSession as U, RecoverRetainedRunIntentOptions as Ua, loopEventToOtelSpan as Ui, PeerMailboxOptions as Un, Scope as Ur, providerAsExecutor as Ut, CodexForkBoundary as V, NativeContextContinuationInput as Va, exportEvalRuns as Vi, PeerMailSendInput as Vn, RootSignal as Vr, WorkspaceRequest as Vt, CodexRolloutStoreReader as W, RecoverRetainedRunOptions as Wa, padSpanId as Wi, claimsAuthority as Wn, Settled as Wr, providerAsSandboxClient as Wt, harnessUsageIsEmpty as X, RetainedRunAdmission as Xa, RuntimeStreamEventSummary as Xi, JsonRpcResponse as Xn, Spend as Xr, ProviderPlacement as Xt, createCodexRolloutStoreReader as Y, RetainedInteractiveStartedAdmission as Ya, RuntimeStreamEventSink as Yi, JsonRpcMessage as Yn, SpawnRejection as Yr, createTangleSandboxExactProcessProvider as Yt, readCodexRolloutSession as Z, RetainedRunAdmissionHook as Za, RuntimeTelemetryOptions as Zi, McpToolDescriptor as Zn, SpendChannel as Zr, InPlaceHarnessResult as Zt, cliInPlaceExecutor as _, SessionMessageLike as _a, workerTraceEnv as _i, LocalHarnessResult as _n, ReservationRejection as _o, ExecutorProgressEvent as _r, AgentEnvironmentProvider$1 as _t, StreamAgentTurnOptions as a, PendingWait as aa, UnconfirmedTeardown as ai, GitRunner as an, RetainedRunIntentAdmission as ao, Budget as ar, assertSandboxServedModel as at, createExecutorRegistry as b, TraceSource as ba, TraceContext as bi, localHarnessExecutable as bn, createBudgetPool as bo, ExecutorTeardownWarning as br, AgentEnvironmentQuery as bt, CliInPlaceSeam as c, WaitProbeRegistry as ca, WaitOpts as ci, captureWorktreeDiff as cn, RetainedRunStartMaterial as co, Executor as cr, extractLlmCallEvent as ct, CliWorktreeSeam as d, createWaitProbes as da, WorkerInteractiveUnavailableReason as di, CodexExecutionEvidence as dn, StartRetainedRunOptions as do, ExecutorCancellationRequest as dr, sandboxEventServedBackend as dt, createRuntimeEventCollector as ea, SupervisedResult as ei, WorktreeHarnessResult as en, RetainedRunDispatchedAdmission as eo, defaultRedactor as er, SandboxLeafOut as et, ExecutorConfig as f, isWaitOutcome as fa, WorkerTraceEvidence as fi, CodexExecutionPolicy as fn, BudgetPool as fo, ExecutorContext as fr, sandboxProgressEvents as ft, SandboxSeam as g, waitUntil as ga, readWorkerTraceContext as gi, LocalHarness as gn, ReservationHolder as go, ExecutorNodeContext as gr, AgentEnvironmentEvent$1 as gt, RouterToolsSeam as h, validateWaitSpec as ha, WorkerTraceSeamCarrier as hi, LOCAL_HARNESSES as hn, LeakedReservation as ho, ExecutorMaterialization as hr, AgentEnvironmentCapabilities$1 as ht, CollectedAgentTurn as i, sanitizeRuntimeStreamEvent as ia, TreeView as ii, DiffResult as in, RetainedRunHandle as io, AgentSpec as ir, SandboxUsageLedger as it, BridgeHarnessStore as j, readWorkerProgress as ja, OtelAttribute as ji, AUTHORITY_MARKERS as jn, ProviderModelAttemptEvidence as jr, ExecRequest as jt, PeerInboxMessage as k, WorkerProgress as ka, INTELLIGENCE_WIRE_VERSION as ki, ToolLoopMessageRecord as kn, NodeStatus as kr, CheckpointRequest as kt, CliSeam as l, WaitRejection as la, WidenGate as li, createWorktree as ln, RetainedRunTurnInput as lo, ExecutorAccounting as lr, mapSandboxEvent as lt, RouterSeam as m, timerAt as ma, WorkerTraceResolver as mi, DEFAULT_LOCAL_HARNESS as mn, BudgetReadout as mo, ExecutorFactory as mr, AgentEnvironment$1 as mt, AgentTurnInput$1 as n, sanitizeAgentRuntimeEvent as na, SupervisorOpts as ni, CreateWorktreeOptions as nn, RetainedRunEnvironmentAdmission as no, Agent as nr, SandboxServedBackend as nt, collectAgentTurn as o, WaitOutcome as oa, UnknownMaterializationReason as oi, RemoveWorktreeOptions as on, RetainedRunReplayPoint as oo, DefaultVerdict as or, createSandboxToolPartState as ot, ProviderSeam as p, pollFor as pa, WorkerTraceUnavailableReason as pi, CodexTokenUsage as pn, BudgetPoolRestore as po, ExecutorExecutionBinding as pr, sumSandboxUsage as pt, CodexStoreDelta as q, RetainedInteractiveEnvironmentAdmission as qa, RuntimeEventCollector as qi, peerMailTools as qn, SpawnOpts as qr, CreateTangleSandboxExactProcessProviderOptions as qt, AgentTurnUsage as r, sanitizeKnowledgeReadinessReport as ra, TokenUsageProvenance as ri, DiffOptions as rn, RetainedRunEventOptions as ro, AgentExecutionRef as rr, SandboxToolPartState as rt, streamAgentTurn as s, WaitProbe as sa, UsageEvent as si, WorktreeHandle as sn, RetainedRunSnapshot as so, ExecutionBindingReceipt as sr, createSandboxUsageLedger as st, AgentTurnBackend as t, createRuntimeStreamEventCollector as ta, Supervisor as ti, WorktreeProfileMaterializationReceipt as tn, RetainedRunEffect as to, resolveRedactor as tr, SandboxOutputMarker as tt, CliWorktreeBridgeSeam as u, WaitSpec as ua, WorkerInteractiveSession as ui, removeWorktree as un, StartRetainedRunInEnvironmentOptions as uo, ExecutorCancellation as ur, mapSandboxToolEvent as ut, cliWorktreeExecutor as v, SessionTraceBox as va, workerTraceHeaders as vi, RunLocalHarnessOptions as vn, ReservationStage as vo, ExecutorRegistry as vr, AgentEnvironmentProviderRef as vt, SteerableSandboxSession as w, ActivityLog as wa, traceContextToEnv as wi, ToolSpec as wn, MaterializedModelIdentity as wr, AgentSession as wt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as x, createPushTraceSource as xa, createPropagatingTraceEmitter as xi, parseCodexTokenUsage as xn, spendFromUsageEvents as xo, ExecutorToolCall as xr, AgentEnvironmentStatus as xt, createExecutor as y, ToolStepInput as ya, workerTraceSeamKey as yi, harnessSupportsReasoningEffort as yn, ReservationTicket as yo, ExecutorResult as yr, AgentEnvironmentProviderRegistry as yt, resolveSecretEnv as z, NativeContextContinuationExecution as za, createOpenInferenceFileExporter as zi, PeerMailReadout as zn, RootMaterialization as zr, ResourceRequest as zt };
|
|
4863
|
+
//# sourceMappingURL=stream-agent-turn-B7YnjmXV.d.ts.map
|