@tangle-network/agent-runtime 0.311.2 → 0.313.1

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.
Files changed (57) hide show
  1. package/dist/{activation-Dvl9gE_g.js → activation-DEtkkjNW.js} +2 -2
  2. package/dist/{activation-Dvl9gE_g.js.map → activation-DEtkkjNW.js.map} +1 -1
  3. package/dist/{activation-BxR-Im_k.d.ts → activation-yAlZTwYG.d.ts} +2 -3
  4. package/dist/agent.d.ts +1 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-CIfgl4Yj.js → coordination-driver-CeXe3km2.js} +14 -14
  7. package/dist/coordination-driver-CeXe3km2.js.map +1 -0
  8. package/dist/{delegate-05Ddb4_L.js → delegate-CG_iTxla.js} +2 -2
  9. package/dist/{delegate-05Ddb4_L.js.map → delegate-CG_iTxla.js.map} +1 -1
  10. package/dist/durable.d.ts +1 -2
  11. package/dist/durable.js +2 -2
  12. package/dist/{graph-BNVGyp1P.js → graph-ua9uUqkA.js} +5 -5
  13. package/dist/graph-ua9uUqkA.js.map +1 -0
  14. package/dist/{improvement-cycle-Ig1_rWAw.js → improvement-cycle-Buz8X_hE.js} +3 -3
  15. package/dist/{improvement-cycle-Ig1_rWAw.js.map → improvement-cycle-Buz8X_hE.js.map} +1 -1
  16. package/dist/{index-B0c5PmmO.d.ts → index-Lm_RjfXs.d.ts} +11266 -2501
  17. package/dist/index.d.ts +46 -7
  18. package/dist/index.js +8 -8
  19. package/dist/intelligence.d.ts +2 -3
  20. package/dist/intelligence.js +3 -3
  21. package/dist/kernel.d.ts +2 -4
  22. package/dist/kernel.js +8 -8
  23. package/dist/{loop-runner-bin-drXESgaI.d.ts → loop-runner-bin-CliCf9sW.d.ts} +2 -3
  24. package/dist/{loop-runner-bin-Beh7PECB.js → loop-runner-bin-DVqUUMrG.js} +3 -3
  25. package/dist/{loop-runner-bin-Beh7PECB.js.map → loop-runner-bin-DVqUUMrG.js.map} +1 -1
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +2 -5
  30. package/dist/mcp/index.js +4 -4
  31. package/dist/{openai-tools-CJHfmFzg.d.ts → openai-tools-BrOgOw66.d.ts} +2 -2
  32. package/dist/profiles.d.ts +1 -1
  33. package/dist/{provision-supervisor-CfKlAMTb.js → provision-supervisor-_dpcZKRl.js} +3 -3
  34. package/dist/{provision-supervisor-CfKlAMTb.js.map → provision-supervisor-_dpcZKRl.js.map} +1 -1
  35. package/dist/{runtime-DsnHqwNx.js → runtime-UQT_8tFV.js} +8 -8
  36. package/dist/{runtime-DsnHqwNx.js.map → runtime-UQT_8tFV.js.map} +1 -1
  37. package/dist/{search-executor-BNLvgp0X.js → search-executor-CTPMXtJ8.js} +2 -2
  38. package/dist/{search-executor-BNLvgp0X.js.map → search-executor-CTPMXtJ8.js.map} +1 -1
  39. package/dist/{server-Bx4d5imQ.js → server-DjzdO6s6.js} +3 -3
  40. package/dist/{server-Bx4d5imQ.js.map → server-DjzdO6s6.js.map} +1 -1
  41. package/dist/{supervise-D6MgxpMI.js → supervise-DUR_nu2t.js} +54 -24
  42. package/dist/supervise-DUR_nu2t.js.map +1 -0
  43. package/dist/{supervisor-WYRLsCp1.js → supervisor-CBBb97-G.js} +541 -35
  44. package/dist/supervisor-CBBb97-G.js.map +1 -0
  45. package/dist/testing.d.ts +1 -2
  46. package/dist/testing.js +12 -12
  47. package/dist/tui/index.d.ts +1 -1
  48. package/dist/tui/index.js +1 -1
  49. package/package.json +1 -1
  50. package/skills/profile-authoring/SKILL.md +1 -1
  51. package/dist/coordination-driver-CIfgl4Yj.js.map +0 -1
  52. package/dist/graph-BNVGyp1P.js.map +0 -1
  53. package/dist/stream-agent-turn-fd2XzrTv.d.ts +0 -2252
  54. package/dist/substrate-GW6LFx4A.d.ts +0 -284
  55. package/dist/supervise-D6MgxpMI.js.map +0 -1
  56. package/dist/supervisor-WYRLsCp1.js.map +0 -1
  57. package/dist/types-RlLmOHFR.d.ts +0 -6210
@@ -5,7 +5,7 @@ import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutio
5
5
  import { n as assertNoSymlinkDescendant, r as publishExclusiveDurableFile } from "./durable-file-DWQA4ooo.js";
6
6
  import { i as notifyRuntimeHookEvent } from "./runtime-hooks-tXpAarhW.js";
7
7
  import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentEnvironmentCapabilitiesSchema, AgentExactRunControlRefSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStatusSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentNativeContextContinuationResultSchema, AgentRunCancellationAcknowledgementSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, AgentTurnResultSchema, CanonicalStreamEventSchema, ContextTransferRequestSchema, InteractionAcknowledgementSchema, InteractionResponseCommandSchema, NativeContextBoundaryProofSchema, NativeContextContinuationRequestSchema, REASONING_EFFORTS, RuntimeEventEnvelopeSchema, TerminalReplayWindowSchema, TerminalSessionRefSchema, agentCandidateArtifactRefSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentNativeContextContinuationResultMatchesRequest, agentProfileSchema, agentRunCancellationAcknowledgementMatchesRequest, agentRunCancellationRequestDigest, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, exactAgentInteractiveSessionStart, harnessTypeSchema, nativeContextContinuationTurnDigest, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sha256DigestSchema, workspaceCheckpointRequestDigest, workspaceCheckpointResultMatchesRequest, workspaceCleanupAcknowledgementMatches, workspaceCleanupRequestDigest, workspaceForkRequestDigest, workspaceForkResultMatchesRequest } from "@tangle-network/agent-interface";
8
- import { estimateCost, isModelPriced, isToolSpan, toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
8
+ import { isToolSpan, toolSpansToTraceAnalysisStore } from "@tangle-network/agent-eval";
9
9
  import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
10
10
  import { createHash, randomBytes, randomUUID } from "node:crypto";
11
11
  import { spawn } from "node:child_process";
@@ -5393,6 +5393,479 @@ function generateTraceId() {
5393
5393
  return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
5394
5394
  }
5395
5395
  //#endregion
5396
+ //#region src/pricing/router-prices.generated.ts
5397
+ /** The Router catalog file and commit these prices were copied from. */
5398
+ const ROUTER_PRICE_SOURCE = {
5399
+ repository: "tangle-network/tangle-router",
5400
+ path: "pricing/researched-provider-prices.json",
5401
+ commit: "e3445f270eba5234a2f7e85dda1a88743c20f322"
5402
+ };
5403
+ /** USD per token for each model id the Router prices. */
5404
+ const ROUTER_TOKEN_PRICES = {
5405
+ "claude-fable-5-1": {
5406
+ provider: "anthropic",
5407
+ input: 1e-5,
5408
+ cachedInput: 25e-8,
5409
+ cacheWrite: null,
5410
+ output: 5e-5
5411
+ },
5412
+ "claude-haiku-5-5": {
5413
+ provider: "anthropic",
5414
+ input: 1e-7,
5415
+ cachedInput: 1e-8,
5416
+ cacheWrite: null,
5417
+ output: 5e-7
5418
+ },
5419
+ "claude-opus-5": {
5420
+ provider: "anthropic",
5421
+ input: 5e-6,
5422
+ cachedInput: 5e-7,
5423
+ cacheWrite: null,
5424
+ output: 25e-6
5425
+ },
5426
+ "claude-opus-5-5": {
5427
+ provider: "anthropic",
5428
+ input: 4e-6,
5429
+ cachedInput: 2e-7,
5430
+ cacheWrite: null,
5431
+ output: 2e-5
5432
+ },
5433
+ "claude-sonnet-5-5": {
5434
+ provider: "anthropic",
5435
+ input: 2e-6,
5436
+ cachedInput: 1e-7,
5437
+ cacheWrite: null,
5438
+ output: 1e-5
5439
+ },
5440
+ "deepseek-ai/DeepSeek-V4-Pro-0813": {
5441
+ provider: "together",
5442
+ input: 132e-8,
5443
+ cachedInput: 13e-8,
5444
+ cacheWrite: 132e-8,
5445
+ output: 396e-8
5446
+ },
5447
+ "deepseek-ai/DeepSeek-V4.1-Flash": {
5448
+ provider: "together",
5449
+ input: 3e-7,
5450
+ cachedInput: 6e-9,
5451
+ cacheWrite: 3e-7,
5452
+ output: 12e-7
5453
+ },
5454
+ "deepseek-chat": {
5455
+ provider: "deepseek",
5456
+ input: 15e-8,
5457
+ cachedInput: 3e-9,
5458
+ cacheWrite: 15e-8,
5459
+ output: 6e-7
5460
+ },
5461
+ "deepseek-flash": {
5462
+ provider: "deepseek",
5463
+ input: 15e-8,
5464
+ cachedInput: 3e-9,
5465
+ cacheWrite: 15e-8,
5466
+ output: 6e-7
5467
+ },
5468
+ "DeepSeek-V3.1": {
5469
+ provider: "sambanova",
5470
+ input: 3e-6,
5471
+ cachedInput: null,
5472
+ cacheWrite: null,
5473
+ output: 45e-7
5474
+ },
5475
+ "DeepSeek-V3.2": {
5476
+ provider: "sambanova",
5477
+ input: 3e-6,
5478
+ cachedInput: null,
5479
+ cacheWrite: null,
5480
+ output: 45e-7
5481
+ },
5482
+ "deepseek-v4-flash": {
5483
+ provider: "deepseek",
5484
+ input: 15e-8,
5485
+ cachedInput: 3e-9,
5486
+ cacheWrite: 15e-8,
5487
+ output: 6e-7
5488
+ },
5489
+ "deepseek-v4-flash-vision-exp": {
5490
+ provider: "deepseek",
5491
+ input: 44e-8,
5492
+ cachedInput: 14e-9,
5493
+ cacheWrite: null,
5494
+ output: 132e-8
5495
+ },
5496
+ "deepseek-v4-pro": {
5497
+ provider: "deepseek",
5498
+ input: 66e-8,
5499
+ cachedInput: 22e-9,
5500
+ cacheWrite: 66e-8,
5501
+ output: 198e-8
5502
+ },
5503
+ "deepseek-v4p1-flash": {
5504
+ provider: "fireworks",
5505
+ input: 3e-7,
5506
+ cachedInput: 6e-9,
5507
+ cacheWrite: 0,
5508
+ output: 12e-7
5509
+ },
5510
+ "ember-1": {
5511
+ provider: "fireworks",
5512
+ input: 3e-6,
5513
+ cachedInput: 3e-7,
5514
+ cacheWrite: 3e-6,
5515
+ output: 15e-6
5516
+ },
5517
+ "gemini-2.5-flash-lite": {
5518
+ provider: "google",
5519
+ input: 1e-7,
5520
+ cachedInput: 1e-8,
5521
+ cacheWrite: 1e-7,
5522
+ output: 4e-7
5523
+ },
5524
+ "gemini-3.1-pro-preview": {
5525
+ provider: "google",
5526
+ input: 2e-6,
5527
+ cachedInput: 2e-7,
5528
+ cacheWrite: 2e-6,
5529
+ output: 12e-6
5530
+ },
5531
+ "gemini-3.1-pro-preview-customtools": {
5532
+ provider: "google",
5533
+ input: 2e-6,
5534
+ cachedInput: 2e-7,
5535
+ cacheWrite: 2e-6,
5536
+ output: 12e-6
5537
+ },
5538
+ "gemini-3.8-flash": {
5539
+ provider: "google",
5540
+ input: 15e-7,
5541
+ cachedInput: 15e-8,
5542
+ cacheWrite: 15e-7,
5543
+ output: 75e-7
5544
+ },
5545
+ "gemini-3.8-flash-lite-tts": {
5546
+ provider: "google",
5547
+ input: 1e-6,
5548
+ cachedInput: 25e-8,
5549
+ cacheWrite: 1e-6,
5550
+ output: 12e-6
5551
+ },
5552
+ "gemini-3.8-flash-tts": {
5553
+ provider: "google",
5554
+ input: 1e-6,
5555
+ cachedInput: 25e-8,
5556
+ cacheWrite: 1e-6,
5557
+ output: 18e-6
5558
+ },
5559
+ "gemini-flash-latest": {
5560
+ provider: "google",
5561
+ input: 15e-7,
5562
+ cachedInput: null,
5563
+ cacheWrite: null,
5564
+ output: 75e-7
5565
+ },
5566
+ "glm-5.2": {
5567
+ provider: "zai",
5568
+ input: 14e-7,
5569
+ cachedInput: 26e-8,
5570
+ cacheWrite: 0,
5571
+ output: 44e-7
5572
+ },
5573
+ "glm-5.3": {
5574
+ provider: "zai",
5575
+ input: 14e-7,
5576
+ cachedInput: 26e-8,
5577
+ cacheWrite: 0,
5578
+ output: 44e-7
5579
+ },
5580
+ "glm-5p3": {
5581
+ provider: "fireworks",
5582
+ input: 14e-7,
5583
+ cachedInput: 26e-8,
5584
+ cacheWrite: 14e-7,
5585
+ output: 44e-7
5586
+ },
5587
+ "gpt-4o-mini-tts": {
5588
+ provider: "openai",
5589
+ input: 6e-7,
5590
+ cachedInput: 6e-7,
5591
+ cacheWrite: 0,
5592
+ output: 12e-6
5593
+ },
5594
+ "gpt-4o-mini-tts-2025-03-20": {
5595
+ provider: "openai",
5596
+ input: 6e-7,
5597
+ cachedInput: 6e-7,
5598
+ cacheWrite: 0,
5599
+ output: 12e-6
5600
+ },
5601
+ "gpt-4o-mini-tts-2025-12-15": {
5602
+ provider: "openai",
5603
+ input: 6e-7,
5604
+ cachedInput: 6e-7,
5605
+ cacheWrite: 0,
5606
+ output: 12e-6
5607
+ },
5608
+ "gpt-5.6-luna": {
5609
+ provider: "openai",
5610
+ input: 2e-7,
5611
+ cachedInput: 2e-8,
5612
+ cacheWrite: 25e-8,
5613
+ output: 12e-7
5614
+ },
5615
+ "gpt-5.6-sol": {
5616
+ provider: "openai",
5617
+ input: 5e-6,
5618
+ cachedInput: 5.000000000000001e-7,
5619
+ cacheWrite: 625e-8,
5620
+ output: 3e-5
5621
+ },
5622
+ "gpt-5.6-terra": {
5623
+ provider: "openai",
5624
+ input: 2e-6,
5625
+ cachedInput: 2e-7,
5626
+ cacheWrite: 25e-7,
5627
+ output: 12e-6
5628
+ },
5629
+ "gpt-6-astra": {
5630
+ provider: "openai",
5631
+ input: 1e-5,
5632
+ cachedInput: 1e-6,
5633
+ cacheWrite: 125e-7,
5634
+ output: 5e-5
5635
+ },
5636
+ "gpt-6-luna": {
5637
+ provider: "openai",
5638
+ input: 1e-7,
5639
+ cachedInput: 1e-8,
5640
+ cacheWrite: 125e-9,
5641
+ output: 5e-7
5642
+ },
5643
+ "gpt-6-sol": {
5644
+ provider: "openai",
5645
+ input: 2e-6,
5646
+ cachedInput: 2e-7,
5647
+ cacheWrite: 25e-7,
5648
+ output: 1e-5
5649
+ },
5650
+ "gpt-6.1-sol": {
5651
+ provider: "openai",
5652
+ input: 2e-6,
5653
+ cachedInput: 1e-7,
5654
+ cacheWrite: 25e-7,
5655
+ output: 1e-5
5656
+ },
5657
+ "gpt-audio": {
5658
+ provider: "openai",
5659
+ input: 25e-7,
5660
+ cachedInput: 25e-7,
5661
+ cacheWrite: 0,
5662
+ output: 1e-5
5663
+ },
5664
+ "gpt-audio-1.5": {
5665
+ provider: "openai",
5666
+ input: 25e-7,
5667
+ cachedInput: 25e-7,
5668
+ cacheWrite: 0,
5669
+ output: 1e-5
5670
+ },
5671
+ "gpt-audio-mini": {
5672
+ provider: "openai",
5673
+ input: 6e-7,
5674
+ cachedInput: 6e-7,
5675
+ cacheWrite: 0,
5676
+ output: 24e-7
5677
+ },
5678
+ "gpt-oss-120b": {
5679
+ provider: "sambanova",
5680
+ input: 22e-8,
5681
+ cachedInput: null,
5682
+ cacheWrite: null,
5683
+ output: 59e-8
5684
+ },
5685
+ "kimi-k3": {
5686
+ provider: "fireworks",
5687
+ input: 3e-6,
5688
+ cachedInput: 3e-7,
5689
+ cacheWrite: 3e-6,
5690
+ output: 15e-6
5691
+ },
5692
+ "labs-leanstral-1-5": {
5693
+ provider: "mistral",
5694
+ input: 0,
5695
+ cachedInput: 0,
5696
+ cacheWrite: 0,
5697
+ output: 0
5698
+ },
5699
+ "Meta-Llama-3.3-70B-Instruct": {
5700
+ provider: "sambanova",
5701
+ input: 6e-7,
5702
+ cachedInput: null,
5703
+ cacheWrite: null,
5704
+ output: 12e-7
5705
+ },
5706
+ "meta-llama/llama-prompt-guard-2-22m": {
5707
+ provider: "groq",
5708
+ input: 3e-8,
5709
+ cachedInput: null,
5710
+ cacheWrite: null,
5711
+ output: 3e-8
5712
+ },
5713
+ "meta-llama/llama-prompt-guard-2-86m": {
5714
+ provider: "groq",
5715
+ input: 4e-8,
5716
+ cachedInput: null,
5717
+ cacheWrite: null,
5718
+ output: 4e-8
5719
+ },
5720
+ "MiniMax-M3": {
5721
+ provider: "sambanova",
5722
+ input: 6e-7,
5723
+ cachedInput: null,
5724
+ cacheWrite: null,
5725
+ output: 24e-7
5726
+ },
5727
+ "mistral-medium-3": {
5728
+ provider: "mistral",
5729
+ input: 15e-7,
5730
+ cachedInput: 15e-8,
5731
+ cacheWrite: null,
5732
+ output: 75e-7
5733
+ },
5734
+ "mistral-medium-3-5": {
5735
+ provider: "mistral",
5736
+ input: 15e-7,
5737
+ cachedInput: 15e-8,
5738
+ cacheWrite: null,
5739
+ output: 75e-7
5740
+ },
5741
+ "mistral-moderation-2603": {
5742
+ provider: "mistral",
5743
+ input: 0,
5744
+ cachedInput: 0,
5745
+ cacheWrite: 0,
5746
+ output: 0
5747
+ },
5748
+ "moonshotai/Kimi-K3": {
5749
+ provider: "together",
5750
+ input: 3e-6,
5751
+ cachedInput: 3e-7,
5752
+ cacheWrite: 3e-6,
5753
+ output: 15e-6
5754
+ },
5755
+ "openai/gpt-oss-120b": {
5756
+ provider: "groq",
5757
+ input: 15e-8,
5758
+ cachedInput: null,
5759
+ cacheWrite: null,
5760
+ output: 6e-7
5761
+ },
5762
+ "openai/gpt-oss-20b": {
5763
+ provider: "groq",
5764
+ input: 75e-9,
5765
+ cachedInput: null,
5766
+ cacheWrite: null,
5767
+ output: 3e-7
5768
+ },
5769
+ "openai/gpt-oss-safeguard-20b": {
5770
+ provider: "groq",
5771
+ input: 75e-9,
5772
+ cachedInput: null,
5773
+ cacheWrite: null,
5774
+ output: 3e-7
5775
+ },
5776
+ "qwen-3.8-27b": {
5777
+ provider: "cerebras",
5778
+ input: 99e-8,
5779
+ cachedInput: 99e-8,
5780
+ cacheWrite: 99e-8,
5781
+ output: 149e-8
5782
+ },
5783
+ "qwen/qwen3.8-27b": {
5784
+ provider: "groq",
5785
+ input: 8e-7,
5786
+ cachedInput: 8e-7,
5787
+ cacheWrite: 8e-7,
5788
+ output: 4e-6
5789
+ },
5790
+ "voxtral-small-2507": {
5791
+ provider: "mistral",
5792
+ input: 1e-7,
5793
+ cachedInput: null,
5794
+ cacheWrite: null,
5795
+ output: 4e-7
5796
+ },
5797
+ "voxtral-small-latest": {
5798
+ provider: "mistral",
5799
+ input: 1e-7,
5800
+ cachedInput: null,
5801
+ cacheWrite: null,
5802
+ output: 4e-7
5803
+ },
5804
+ "zai-glm-5-2": {
5805
+ provider: "mistral",
5806
+ input: 14e-7,
5807
+ cachedInput: 14e-8,
5808
+ cacheWrite: null,
5809
+ output: 44e-7
5810
+ },
5811
+ "zai-org/GLM-5.3": {
5812
+ provider: "together",
5813
+ input: 14e-7,
5814
+ cachedInput: 26e-8,
5815
+ cacheWrite: 14e-7,
5816
+ output: 44e-7
5817
+ }
5818
+ };
5819
+ //#endregion
5820
+ //#region src/pricing/router-prices.ts
5821
+ /**
5822
+ * Model prices from the Router's catalog, the one source of model prices.
5823
+ *
5824
+ * `router-prices.generated.ts` is a copy of tangle-router `pricing/researched-provider-prices.json`
5825
+ * written by `scripts/sync-router-prices.mjs`; nothing here is maintained by hand. Runtime prices
5826
+ * every token a provider did not bill from it, so a run's API-equivalent cost and the Router's
5827
+ * charge for the same tokens use the same rates.
5828
+ */
5829
+ /**
5830
+ * The Router's price for a model id as a harness or provider reports it: exact, then without a
5831
+ * `@snapshot` suffix, then its last path segment (`openai/gpt-6.1-sol` is `gpt-6.1-sol`), each
5832
+ * as written and lowercased. Undefined when the Router prices no such model.
5833
+ */
5834
+ function routerTokenPrice(model) {
5835
+ const bare = (model.split("@")[0] ?? model).trim();
5836
+ const last = bare.slice(bare.lastIndexOf("/") + 1);
5837
+ for (const id of [
5838
+ model,
5839
+ bare,
5840
+ bare.toLowerCase(),
5841
+ last,
5842
+ last.toLowerCase()
5843
+ ]) {
5844
+ const price = ROUTER_TOKEN_PRICES[id];
5845
+ if (price !== void 0) return price;
5846
+ }
5847
+ }
5848
+ const count$1 = (value) => value !== void 0 && Number.isFinite(value) && value >= 0;
5849
+ /**
5850
+ * What the Router would charge for this work at the model's base rates, or undefined when it
5851
+ * prices no such model or a count is not a non-negative number. Cache reads and writes bill at
5852
+ * their own rates when the Router lists them. A per-request tier (some models charge more past a
5853
+ * prompt size) is not applied: a run total does not keep each request's prompt size.
5854
+ */
5855
+ function priceTokens(work) {
5856
+ const price = routerTokenPrice(work.model);
5857
+ if (price === void 0) return void 0;
5858
+ const cacheRead = work.cacheReadTokens ?? 0;
5859
+ const cacheWrite = work.cacheWriteTokens ?? 0;
5860
+ if (![
5861
+ work.inputTokens,
5862
+ work.outputTokens,
5863
+ cacheRead,
5864
+ cacheWrite
5865
+ ].every(count$1)) return void 0;
5866
+ return Math.max(0, work.inputTokens - cacheRead - cacheWrite) * price.input + cacheRead * (price.cachedInput ?? price.input) + cacheWrite * (price.cacheWrite ?? price.input) + work.outputTokens * price.output;
5867
+ }
5868
+ //#endregion
5396
5869
  //#region src/durable/content-address.ts
5397
5870
  /** Stable content address shared by result and trace artifacts. */
5398
5871
  function contentAddress(artifact) {
@@ -8199,6 +8672,7 @@ async function resolveBridgeModelCredential(credential, context) {
8199
8672
  * A turn whose provider reported no billed dollars used to reach the dollar channel as a
8200
8673
  * known `$0`, so a run that certainly spent money reported a dollar total of zero. A catalog
8201
8674
  * price is not a receipt, so what this module produces is always marked, never promoted.
8675
+ * The catalog is the Router's (`src/pricing/router-prices.ts`).
8202
8676
  */
8203
8677
  /**
8204
8678
  * Price one unit of work that no provider receipt covered.
@@ -8207,7 +8681,7 @@ async function resolveBridgeModelCredential(credential, context) {
8207
8681
  * WOULD bill, never measures what it did. The priced amount is repeated in `usdEstimated` so
8208
8682
  * a consumer can subtract it from `usd` and recover the dollars a provider actually billed.
8209
8683
  *
8210
- * A model with no catalog entry yields `usd: 0` with `usdKnown: false` and no `usdEstimated`.
8684
+ * A model the Router does not price yields `usd: 0` with `usdKnown: false` and no `usdEstimated`.
8211
8685
  * The turn then reads as unknown dollars, which is true, rather than as a free turn.
8212
8686
  */
8213
8687
  function priceUnreceiptedWork(work) {
@@ -8217,12 +8691,15 @@ function priceUnreceiptedWork(work) {
8217
8691
  usdKnown: false,
8218
8692
  provenance: "uncaptured"
8219
8693
  };
8220
- const { inputTokens, outputTokens, model } = work;
8221
- if (model === void 0 || !isModelPriced(model)) return unknown;
8222
- if (!Number.isFinite(inputTokens) || !Number.isFinite(outputTokens)) return unknown;
8223
- if (inputTokens < 0 || outputTokens < 0) return unknown;
8224
- const usd = estimateCost(inputTokens, outputTokens, model);
8225
- if (!Number.isFinite(usd) || usd <= 0) return unknown;
8694
+ if (work.model === void 0) return unknown;
8695
+ const usd = priceTokens({
8696
+ model: work.model,
8697
+ inputTokens: work.inputTokens,
8698
+ outputTokens: work.outputTokens,
8699
+ ...work.cacheReadTokens === void 0 ? {} : { cacheReadTokens: work.cacheReadTokens },
8700
+ ...work.cacheWriteTokens === void 0 ? {} : { cacheWriteTokens: work.cacheWriteTokens }
8701
+ });
8702
+ if (usd === void 0 || !Number.isFinite(usd) || usd <= 0) return unknown;
8226
8703
  return {
8227
8704
  kind: "cost",
8228
8705
  usd,
@@ -9904,7 +10381,7 @@ const outsideKinds = /* @__PURE__ */ new Set([
9904
10381
  "seat-segment",
9905
10382
  "seat-materialized",
9906
10383
  "seat-paused",
9907
- "model-changed",
10384
+ "root-segment",
9908
10385
  "paused",
9909
10386
  "driver-attempt",
9910
10387
  "node-inputs-resolved",
@@ -9986,7 +10463,7 @@ async function replaySpawnTree(journal, blobs, root) {
9986
10463
  if (ev.kind === "workspace-capture") continue;
9987
10464
  if (ev.kind === "trace-unpropagated") continue;
9988
10465
  if (ev.kind === "seat-segment" || ev.kind === "seat-materialized" || ev.kind === "seat-paused") continue;
9989
- if (ev.kind === "model-changed") continue;
10466
+ if (ev.kind === "root-segment") continue;
9990
10467
  if (ev.kind === "paused") continue;
9991
10468
  if (ev.kind === "driver-attempt") continue;
9992
10469
  if (ev.kind === "node-inputs-resolved") continue;
@@ -11904,6 +12381,8 @@ async function* streamProviderExecutor(args) {
11904
12381
  const priced = priceUnreceiptedWork({
11905
12382
  inputTokens: tokens.input,
11906
12383
  outputTokens: tokens.output,
12384
+ ...tokens.cacheRead === void 0 ? {} : { cacheReadTokens: tokens.cacheRead },
12385
+ ...tokens.cacheWrite === void 0 ? {} : { cacheWriteTokens: tokens.cacheWrite },
11907
12386
  model
11908
12387
  });
11909
12388
  if (priced.usdKnown === false && priced.usdEstimated !== void 0) return priced.usdEstimated;
@@ -13287,7 +13766,11 @@ function meterTurn(raw, model, transportAttempts) {
13287
13766
  ...billedCostUsd !== void 0 ? { billedCostUsd } : {},
13288
13767
  ...cache ? { cache } : {}
13289
13768
  };
13290
- const localEstimate = isModelPriced(model) ? estimateCost(usage.input, usage.output, model) : void 0;
13769
+ const localEstimate = priceTokens({
13770
+ model,
13771
+ inputTokens: usage.input,
13772
+ outputTokens: usage.output
13773
+ });
13291
13774
  const costUsd = localEstimate !== void 0 && cache?.readSavingsUsd !== void 0 ? Math.max(0, localEstimate - cache.readSavingsUsd) : localEstimate;
13292
13775
  return {
13293
13776
  usage,
@@ -19678,7 +20161,13 @@ const routerToolsInlineExecutor = (spec, ctx) => {
19678
20161
  } finally {
19679
20162
  await seam.onMessages?.(structuredClone(messages));
19680
20163
  }
19681
- const estimatedUsd = isModelPriced(model) ? estimateCost(tokens.input, tokens.output, model) : void 0;
20164
+ const estimatedUsd = priceTokens({
20165
+ model,
20166
+ inputTokens: tokens.input,
20167
+ outputTokens: tokens.output,
20168
+ ...tokens.cacheRead === void 0 ? {} : { cacheReadTokens: tokens.cacheRead },
20169
+ ...tokens.cacheWrite === void 0 ? {} : { cacheWriteTokens: tokens.cacheWrite }
20170
+ });
19682
20171
  const spent = {
19683
20172
  ...addResourceSpend(resources),
19684
20173
  iterations: turns,
@@ -24596,6 +25085,8 @@ async function prepareScopeRetainedOwnerTask(scope, task) {
24596
25085
  const latestSeat = segmentStarts.at(-1);
24597
25086
  const previousSeat = segmentStarts.at(-2);
24598
25087
  if (latestSeat && previousSeat && latestSeat.provider !== previousSeat.provider && owned.indexOf(latestSeat) > owned.indexOf(latestInput)) state.forceNewSession = true;
25088
+ const rootSegment = owned.filter((event) => event.kind === "root-segment").at(-1);
25089
+ if (rootSegment?.from !== void 0 && rootSegment.from.harness !== rootSegment.to.harness && owned.indexOf(rootSegment) > owned.indexOf(latestInput)) state.forceNewSession = true;
24599
25090
  if (state.forceNewSession) {
24600
25091
  delete state.priorSession;
24601
25092
  delete state.forceNewSession;
@@ -26362,6 +26853,13 @@ async function publishOwnerMaterialization(state, runtime, declaration, bindingI
26362
26853
  state.publishedThisProcess = true;
26363
26854
  return;
26364
26855
  }
26856
+ const rootSegment = [...events].reverse().find((event) => event.id === state.nodeId && event.kind === "root-segment");
26857
+ if (rootSegment !== void 0 && (latestMaterialization === void 0 || events.indexOf(rootSegment) > events.indexOf(latestMaterialization)) && receipt.status === "known" && receipt.authoredProfileDigest === committed.authoredProfileDigest && (rootSegment.to.model === void 0 || receipt.model.status === "known" && receipt.model.id === rootSegment.to.model)) {
26858
+ await appendOwnerSeatMaterialization(state, lastSegmentIndex + 1, receipt, binding);
26859
+ state.onReceipt?.(receipt, binding);
26860
+ state.publishedThisProcess = true;
26861
+ return;
26862
+ }
26365
26863
  }
26366
26864
  if (state.prior !== void 0 && state.receipt === void 0) {
26367
26865
  if (canonicalCandidateDigest(state.prior) !== canonicalCandidateDigest(receipt)) {
@@ -28716,23 +29214,30 @@ function rootExecutionBindingReceipt(opts, materialization, attemptId) {
28716
29214
  throw new RuntimeRunStateError(`supervisor: run '${opts.runId}' has invalid root execution binding`, { cause: error });
28717
29215
  }
28718
29216
  }
28719
- /** Append one `model-changed` record when the root's model differs from the one it last ran. The
28720
- * last record's `to`, or the recorded profile's model when there is none, is what it last ran, so
28721
- * every later entry on the same model appends nothing. */
28722
- async function recordRootModelChange(opts, events, at) {
28723
- const change = opts.rootModelChange;
28724
- if (change === void 0) return;
28725
- if (typeof change.reason !== "string" || change.reason.trim().length === 0) throw new ValidationError$1(`supervisor: run '${opts.runId}' model change needs a reason`);
28726
- const changes = events.filter((event) => event.kind === "model-changed" && event.id === opts.runId);
28727
- const last = changes.at(-1)?.to ?? change.from;
28728
- if (contentAddress(last) === contentAddress(change.to)) return;
29217
+ /** Whether a segment changes what the recorded profile runs, apart from the caller's stack. */
29218
+ function changesRootProfile(entry) {
29219
+ const { stack: _stack, ...current } = entry.current;
29220
+ return contentAddress(current) !== contentAddress(entry.registered);
29221
+ }
29222
+ /**
29223
+ * Append one `root-segment` record when the root enters a segment that differs from the one it
29224
+ * last ran. The last record's `to` is what it last ran; a resumed run with no record last ran its
29225
+ * recorded profile, and a fresh run ran nothing. Every later entry on the same segment appends
29226
+ * nothing, so a resume after a dead supervisor or a lost stream is a boundary, not a segment.
29227
+ */
29228
+ async function recordRootSegment(opts, events, at, fresh) {
29229
+ const entry = opts.rootSegment;
29230
+ if (entry === void 0) return;
29231
+ const records = events.filter((event) => event.kind === "root-segment" && event.id === opts.runId);
29232
+ const last = records.at(-1)?.to ?? (fresh ? void 0 : entry.registered);
29233
+ if (last !== void 0 && contentAddress(last) === contentAddress(entry.current)) return;
28729
29234
  await opts.journal.appendEvent(opts.runId, {
28730
- kind: "model-changed",
29235
+ kind: "root-segment",
28731
29236
  id: opts.runId,
28732
- from: last,
28733
- to: change.to,
28734
- reason: change.reason,
28735
- seq: changes.length,
29237
+ ...last === void 0 ? {} : { from: last },
29238
+ to: entry.current,
29239
+ reason: entry.reason,
29240
+ seq: records.length,
28736
29241
  at
28737
29242
  });
28738
29243
  }
@@ -28766,7 +29271,7 @@ function describeIdentityMismatch(recorded, requested) {
28766
29271
  "correlation"
28767
29272
  ].filter((field) => contentAddress(recorded[field]) !== contentAddress(requested[field])).map((field) => `${field} recorded ${short(recorded[field])} but resumed with ${short(requested[field])}`);
28768
29273
  if (differing.length === 0) return "the identity objects differ in shape while every known field matches";
28769
- return `${differing.join("; ")} — use a new runId to change any of these; a resume may change only the root model (modelChange)`;
29274
+ return `${differing.join("; ")} — a different task or root profile is a new run; a resume may change the root's model, reasoning effort and harness as a new segment of this run (segment)`;
28770
29275
  }
28771
29276
  /** Validate caller-supplied root identity before any journal access. Fresh runs may omit identity,
28772
29277
  * but once supplied it is trusted durable evidence and therefore must be complete and canonical;
@@ -28819,14 +29324,14 @@ function describeRejection(error) {
28819
29324
  function createSupervisor() {
28820
29325
  let attached;
28821
29326
  async function run(root, task, opts) {
28822
- const { budget, rootIdentity, rootModelChange, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, maxDepth, workerSlots, reservationPolicy, deadlineCheckIn, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, ownerWorkspaceRetention, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
29327
+ const { budget, rootIdentity, rootSegment, rootMaterialization, runId, journal: journalStore, blobs: blobStore, executors: executorRegistry, recoverExecutor, maxDepth, workerSlots, reservationPolicy, deadlineCheckIn, maxRestarts, withinMs, childSettleGraceMs, teardownConfirmMs, resume, retainedAtSettlement: requestedRetainedAtSettlement, ownerWorkspaceRetention, now: suppliedNow, signal, hooks, workerTrace, workerTraceUnpropagated, interactiveBindingDir } = opts;
28823
29328
  const input = detachedSnapshot({
28824
29329
  task,
28825
29330
  options: {
28826
29331
  budget,
28827
29332
  runId,
28828
29333
  ...rootIdentity === void 0 ? {} : { rootIdentity },
28829
- ...rootModelChange === void 0 ? {} : { rootModelChange },
29334
+ ...rootSegment === void 0 ? {} : { rootSegment },
28830
29335
  ...rootMaterialization === void 0 ? {} : { rootMaterialization },
28831
29336
  ...maxDepth === void 0 ? {} : { maxDepth },
28832
29337
  ...typeof workerSlots === "number" ? { workerSlots } : {},
@@ -28895,9 +29400,9 @@ function createSupervisor() {
28895
29400
  resumeFrom = restored.resumeFrom;
28896
29401
  prior = [...resumeFrom.events];
28897
29402
  pool = createBudgetPool(opts.budget, runEpochMs, restored.poolRestore);
28898
- if (opts.rootModelChange !== void 0) await recordRootModelChange(opts, prior, runStartedAt);
29403
+ await recordRootSegment(opts, prior, runStartedAt, false);
28899
29404
  } else {
28900
- if (opts.rootModelChange !== void 0) throw new RuntimeRunStateError(`supervisor: run '${opts.runId}' has no recorded root to change the model of; a new run takes its model from its profile`);
29405
+ if (opts.rootSegment !== void 0 && changesRootProfile(opts.rootSegment)) throw new RuntimeRunStateError(`supervisor: run '${opts.runId}' has no recorded root to change the model or harness of; a new run takes them from its profile`);
28901
29406
  pool = createBudgetPool(opts.budget, runStartedAtMs);
28902
29407
  if (existing === void 0) await opts.journal.beginTree(opts.runId, runStartedAt);
28903
29408
  const rootReceipt = rootMaterializationReceipt(opts);
@@ -28921,6 +29426,7 @@ function createSupervisor() {
28921
29426
  at: runStartedAt
28922
29427
  });
28923
29428
  await appendSpawnEvents(opts.journal, opts.runId, rootEvents);
29429
+ await recordRootSegment(opts, [], runStartedAt, true);
28924
29430
  }
28925
29431
  const stableRootReceipt = resuming ? prior?.find((event) => event.kind === "materialized" && event.id === opts.runId)?.receipt : rootMaterializationReceipt(opts);
28926
29432
  if (stableRootReceipt !== void 0) {
@@ -28948,7 +29454,7 @@ function createSupervisor() {
28948
29454
  else opts.signal.addEventListener("abort", onCallerAbort, { once: true });
28949
29455
  const breaker = createIntensityBreaker(opts, () => cascadeAbort("intensity breaker tripped"));
28950
29456
  const journal = wrapJournalForBreaker(opts.journal, breaker);
28951
- const priorRootMaterialization = prior?.find((event) => event.kind === "materialized" && event.id === opts.runId)?.receipt;
29457
+ const priorRootMaterialization = prior?.filter((event) => (event.kind === "materialized" || event.kind === "seat-materialized") && event.id === opts.runId).at(-1)?.receipt;
28952
29458
  const scope = createScope({
28953
29459
  parentId: opts.runId,
28954
29460
  root: opts.runId,
@@ -29602,6 +30108,6 @@ function isNonEmptySpend(s) {
29602
30108
  return s.iterations > 0 || s.tokens.input > 0 || s.tokens.output > 0 || s.usd > 0 || s.ms > 0 || s.tokensKnown === false || s.usdKnown === false || Object.values(s.resources ?? {}).some((resource) => resource.amount > 0 || !resource.known);
29603
30109
  }
29604
30110
  //#endregion
29605
- export { environmentReader as $, projectSandboxOutcome as $i, parseWorkerToolTraceArtifact as $n, sanitizeAgentRuntimeEvent as $r, PEER_MAIL_WIRE_KEY as $t, scopeOwnerExecutorNodeContext as A, worktreeCliProfileMaterialization as Ai, resolveAgentEnvironmentProvider as An, resolveHarnessTranscriptCapture as Ar, captureReusableExecutorConfig as At, consumeScopeRetainedOwnerResult as B, recordRuntimeOwnedDriveHarnessProviderEvidence as Bi, InMemoryResultBlobStore as Bn, buildLoopOtelSpans as Br, createInPlaceCliExecutor as Bt, deriveNodeExecutionIdentity as C, promptOnlyProfileMaterialization as Ci, readPromptOptions as Cn, abortError as Cr, createContinuationKeeper as Ct, recordScopeOwnerMaterialization as D, sandboxActProfileMaterialization as Di, createAgentEnvironmentProviderRegistry as Dn, harnessTranscriptArtifact as Dr, passedItems as Dt, recordScopeOwnerDriverAttempt as E, renderUnsupported as Ei, LEAF_CONTINUATION_TASK as En, captureHarnessTranscript as Er, failedItems as Et, seatExecutionProfile as F, inheritRuntimeOwnedExecutorAttestation as Fi, retainedExecutorSeamKey as Fn, readTraceContextFromEnv as Fr, snapshotExecutorConfig as Ft, scopeRetainedOwnerContext as G, runtimeOwnedPendingExecutorMaterialization as Gi, replaySpawnTree as Gn, flatOtelSpan as Gr, workerTraceSeamKey as Gt, prepareScopeRetainedOwnerSeatSwitch as H, runtimeOwnedExecutorExecutionBinding as Hi, insideCursorNamespace as Hn, buildRuntimeEventOtelSpans as Hr, readWorkerTraceContext as Ht, abandonScopeRetainedOwnerInvocation as I, knownExecutionBindingReceipt as Ii, unavailablePauseMs as In, traceContextToEnv as Ir, createWorktreeCliExecutor as It, scopeRetainedOwnerResourceReader as J, unknownMaterializationReceipt as Ji, readCommittedJsonLines as Jn, padSpanId as Jr, createActivityLog as Jt, scopeRetainedOwnerJournalRoot as K, runtimeOwnedScopeOwnerRuntime as Ki, isNoEntError as Kn, generateSpanId as Kr, taskToPrompt as Kt, beginScopeRetainedOwnerDrive as L, knownMaterializationReceipt as Li, unavailableSignalOfFailure as Ln, defaultRedactor as Lr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Lt, SeatChain as M, attestRuntimeOwnedScopeOwner as Mi, decodeToolPart as Mn, contentAddress as Mr, cliWorktreeExecutor as Mt, SeatChainExhaustedError as N, authoredProfileDigest as Ni, sandboxSessionTraceSource as Nn, createPropagatingTraceEmitter as Nr, createExecutor as Nt, recordScopeOwnerPause as O, unsupportedProfileDimensions as Oi, providerAsExecutor as On, persistHarnessTranscript as Or, verdictFromJudgeScore as Ot, authoredSeatStages as P, finalizeRuntimeOwnedPendingExecutor as Pi, registerRetainedExecutorPreparation as Pn, mergeTraceEnv as Pr, createExecutorRegistry as Pt, SPAWN_RESOURCE_PATH_MAX_BYTES as Q, detachedSnapshot as Qi, isTraceAnalysisStore as Qn, createRuntimeStreamEventCollector as Qr, DEFAULT_PEER_MAIL_LIMITS as Qt, bindScopeRetainedOwnerEnvironmentId as R, newExecutionAttemptId as Ri, FileResultBlobStore as Rn, defaultRedactorIdentityMaterial as Rr, createSteerableSandboxSession as Rt, createScope as S, promptModelProfileMaterialization as Si, assertBoxlessPromptOptions as Sn, RunCancellationReason as Sr, checkVerdictOf as St, meterRuntimeOwnedProviderAttempt as T, renderProfileMaterializationIssues as Ti, runBrainLoop as Tn, runAbortable as Tr, expandQuestions as Tt, prepareScopeRetainedOwnerTask as U, runtimeOwnedExecutorMaterialization as Ui, loadSpawnForest as Un, createOpenInferenceFileExporter as Ur, workerTraceEnv as Ut, noteScopeRetainedOwnerCoordination as V, runtimeOwnedDriveHarnessProviderEvidence as Vi, InMemorySpawnJournal as Vn, buildLoopSpanNodes as Vr, WORKER_TRACE_PROPAGATION as Vt, reconcileScopeRetainedOwnerEnvironment as W, runtimeOwnedExecutorProviderEvidence as Wi, materializeTreeView as Wn, createOtelExporter as Wr, workerTraceHeaders as Wt, scopeRetainedOwnerResult as X, executableAgentSpecSnapshot as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, toOtelAttributes as Xr, createInbox as Xt, scopeRetainedOwnerRestorePoint as Y, executableAgentProfileSnapshot as Yi, writeAllBytes as Yn, padTraceId as Yr, readWorkerProgress as Yt, scopeRetainedOwnerTurnEnded as Z, detachedFrozen as Zi, captureWorkerTraceEvidence as Zn, createRuntimeEventCollector as Zr, AUTHORITY_MARKERS as Zt, isDriverSpec as _, promptOptionsFromAgentTurnInput as _a, controlProfileMaterialization as _i, runAgentRounds as _n, retainedCreateMaterial as _r, CONTINUATION_FACTS as _t, collectDelivered as a, extractLlmCallEvent as aa, createWorktree as ai, isLiveNodeStatus as an, createBudgetPool as ar, interactiveAdmissionSeamKey as at, assertRecursiveReservationPolicy as b, profileMaterializationAxes$1 as bi, SandboxEvidenceRetentionError as bn, createWorkerSlots as br, admitFinding as bt, runTree as c, mapSandboxToolEvent as ca, LOCAL_HARNESSES as ci, bridgeModelRouteRefusal as cn, spendFromUsageEvents as cr, reconnectRetainedInteractiveRun as ct, classifyDriverFailure as d, sandboxProgressEvents as da, localHarnessExecutable as di, harnessUsageIsEmpty as dn, bridgeStopSignalKey as dr, freeSlots as dt, readSandboxOutcome as ea, sanitizeKnowledgeReadinessReport as ei, claimsAuthority as en, workerTraceAnalysisStore as er, hostDirectoryReader as et, runDriverWithRetry as f, sumSandboxUsage as fa, parseCodexTokenUsage as fi, readCodexRolloutSession as fn, errMessage as fr, queueOf as ft, driverExecutorFactory as g, promptFromAgentTurnInput as ga, assertProfileMaterialization as gi, isTerminalDecision as gn, startRetainedRunInEnvironment as gr, CONTINUATIONS_DIR as gt, driverChild as h, awaitAbortable$1 as ha, AGENT_PROFILE_MATERIALIZATION_AXES as hi, defaultSelectWinner as hn, startRetainedRun as hr, mapExecutorResult as ht, bestDelivered as i, createSandboxUsageLedger as ia, captureWorktreeDiff as ii, peerMailVerbNames as in, assertValidBudget as ir, providerVisibleProfile as it, settledToIteration as j, attestRuntimeOwnedPendingExecutor as ji, createPushTraceSource as jn, retainHarnessTranscript as jr, cliInPlaceExecutor as jt, restoreScopeOwnerAcceptedExecution as k, validateProfileMaterialization as ki, providerAsSandboxClient as kn, readHarnessTranscript as kr, bindReusableExecutorExecutionId as kt, DriverAttemptsExhaustedError as l, notifySandboxEventObserver as la, harnessInvocation as li, addHarnessUsage as ln, spendFromUsageTotals as lr, recoverRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, abortError$1 as ma, terminateProcessTreeAndConfirm as mi, createSandboxForSpec as mn, recoverRetainedRun as mr, gateOnDeliverable as mt, createRootHandle as n, canonicalStreamEventFromSandboxEvent as na, runSettledCommand as ni, isPeerMailEnvelope as nn, BudgetReconcileFault as nr, coordinationMcpAlias as nt, pickBestDelivered as o, isSandboxTerminalEvent as oa, removeWorktree as oi, isTerminalNodeStatus as on, meterUsageEvent as or, attachWorker as ot, summarizeDriverAttempts as p, decodeHarnessUsage as pa, CodexExecutionDiagnosticError as pi, TERMINAL_DECISIONS as pn, reconnectRetainedRun as pr, rollingDispatch as pt, scopeRetainedOwnerPriorSpend as q, unknownExecutionBindingReceipt as qi, prepareJsonlAppend as qn, loopEventToOtelSpan as qr, DEFAULT_STALL_AFTER_MS as qt, createSupervisor as r, createSandboxToolPartState as ra, runWorktreeHarness as ri, peerMailTools as rn, ReservationWaitRefused as rr, coordinationProfileToolPrefix as rt, runFinalizer as s, mapSandboxEvent as sa, DEFAULT_LOCAL_HARNESS as si, bridgeAdmissionRefusal as sn, newUsageTotals as sr, readWorkerInteractiveBinding as st, DEFAULT_MAX_DEPTH as t, assertSandboxServedModel as ta, sanitizeRuntimeStreamEvent as ti, createPeerMailbox as tn, executorFailure as tr, resolveSpawnResourcePaths as tt, HarnessTurnFailedError as u, sandboxEventServedBackend as ua, harnessSupportsReasoningEffort as ui, createCodexRolloutStoreReader as un, bridgeRuntimeAttachmentsKey as ur, startRetainedInteractiveRun as ut, withDriverExecutor as v, providerMessageText as va, defineProfileMaterializationContract as vi, createSandboxLineage as vn, destroyInteractiveEnvironment as vr, CheckUnavailableError as vt, meterRuntimeOwnedAccounting as w, promptResourceProfileMaterialization as wi, routerBrain as wn, linkAbort as wr, distillFindings as wt, beginScopeOwnerAttempt as x, promptControlProfileMaterialization as xi, captureBeforeDestroy as xn, openSlotGroup as xr, bestComposite as xt, SUBTREE_RESULT_LIMIT as y, fullProfileMaterialization as yi, acquireSandbox as yn, environmentGone as yr, admitContinuationPolicy as yt, bindScopeRetainedOwnerProvider as z, providerAttemptEvidence as zi, FileSpawnJournal as zn, resolveRedactor as zr, createRouterTranscript as zt };
30111
+ export { environmentReader as $, executableAgentSpecSnapshot as $i, parseWorkerToolTraceArtifact as $n, toOtelAttributes as $r, PEER_MAIL_WIRE_KEY as $t, scopeOwnerExecutorNodeContext as A, sandboxActProfileMaterialization as Ai, resolveAgentEnvironmentProvider as An, resolveHarnessTranscriptCapture as Ar, captureReusableExecutorConfig as At, consumeScopeRetainedOwnerResult as B, knownMaterializationReceipt as Bi, InMemoryResultBlobStore as Bn, defaultRedactor as Br, createInPlaceCliExecutor as Bt, deriveNodeExecutionIdentity as C, profileMaterializationAxes$1 as Ci, readPromptOptions as Cn, abortError as Cr, createContinuationKeeper as Ct, recordScopeOwnerMaterialization as D, promptResourceProfileMaterialization as Di, createAgentEnvironmentProviderRegistry as Dn, harnessTranscriptArtifact as Dr, passedItems as Dt, recordScopeOwnerDriverAttempt as E, promptOnlyProfileMaterialization as Ei, LEAF_CONTINUATION_TASK as En, captureHarnessTranscript as Er, failedItems as Et, seatExecutionProfile as F, attestRuntimeOwnedScopeOwner as Fi, retainedExecutorSeamKey as Fn, ROUTER_PRICE_SOURCE as Fr, snapshotExecutorConfig as Ft, scopeRetainedOwnerContext as G, runtimeOwnedExecutorExecutionBinding as Gi, replaySpawnTree as Gn, buildRuntimeEventOtelSpans as Gr, workerTraceSeamKey as Gt, prepareScopeRetainedOwnerSeatSwitch as H, providerAttemptEvidence as Hi, insideCursorNamespace as Hn, resolveRedactor as Hr, readWorkerTraceContext as Ht, abandonScopeRetainedOwnerInvocation as I, authoredProfileDigest as Ii, unavailablePauseMs as In, createPropagatingTraceEmitter as Ir, createWorktreeCliExecutor as It, scopeRetainedOwnerResourceReader as J, runtimeOwnedPendingExecutorMaterialization as Ji, readCommittedJsonLines as Jn, flatOtelSpan as Jr, createActivityLog as Jt, scopeRetainedOwnerJournalRoot as K, runtimeOwnedExecutorMaterialization as Ki, isNoEntError as Kn, createOpenInferenceFileExporter as Kr, taskToPrompt as Kt, beginScopeRetainedOwnerDrive as L, finalizeRuntimeOwnedPendingExecutor as Li, unavailableSignalOfFailure as Ln, mergeTraceEnv as Lr, DEFAULT_SANDBOX_STEERING_MAX_TURNS as Lt, SeatChain as M, validateProfileMaterialization as Mi, decodeToolPart as Mn, contentAddress as Mr, cliWorktreeExecutor as Mt, SeatChainExhaustedError as N, worktreeCliProfileMaterialization as Ni, sandboxSessionTraceSource as Nn, priceTokens as Nr, createExecutor as Nt, recordScopeOwnerPause as O, renderProfileMaterializationIssues as Oi, providerAsExecutor as On, persistHarnessTranscript as Or, verdictFromJudgeScore as Ot, authoredSeatStages as P, attestRuntimeOwnedPendingExecutor as Pi, registerRetainedExecutorPreparation as Pn, routerTokenPrice as Pr, createExecutorRegistry as Pt, SPAWN_RESOURCE_PATH_MAX_BYTES as Q, executableAgentProfileSnapshot as Qi, isTraceAnalysisStore as Qn, padTraceId as Qr, DEFAULT_PEER_MAIL_LIMITS as Qt, bindScopeRetainedOwnerEnvironmentId as R, inheritRuntimeOwnedExecutorAttestation as Ri, FileResultBlobStore as Rn, readTraceContextFromEnv as Rr, createSteerableSandboxSession as Rt, createScope as S, fullProfileMaterialization as Si, assertBoxlessPromptOptions as Sn, RunCancellationReason as Sr, checkVerdictOf as St, meterRuntimeOwnedProviderAttempt as T, promptModelProfileMaterialization as Ti, runBrainLoop as Tn, runAbortable as Tr, expandQuestions as Tt, prepareScopeRetainedOwnerTask as U, recordRuntimeOwnedDriveHarnessProviderEvidence as Ui, loadSpawnForest as Un, buildLoopOtelSpans as Ur, workerTraceEnv as Ut, noteScopeRetainedOwnerCoordination as V, newExecutionAttemptId as Vi, InMemorySpawnJournal as Vn, defaultRedactorIdentityMaterial as Vr, WORKER_TRACE_PROPAGATION as Vt, reconcileScopeRetainedOwnerEnvironment as W, runtimeOwnedDriveHarnessProviderEvidence as Wi, materializeTreeView as Wn, buildLoopSpanNodes as Wr, workerTraceHeaders as Wt, scopeRetainedOwnerResult as X, unknownExecutionBindingReceipt as Xi, WORKER_TOOL_TRACE_SCHEMA_VERSION as Xn, loopEventToOtelSpan as Xr, createInbox as Xt, scopeRetainedOwnerRestorePoint as Y, runtimeOwnedScopeOwnerRuntime as Yi, writeAllBytes as Yn, generateSpanId as Yr, readWorkerProgress as Yt, scopeRetainedOwnerTurnEnded as Z, unknownMaterializationReceipt as Zi, captureWorkerTraceEvidence as Zn, padSpanId as Zr, AUTHORITY_MARKERS as Zt, isDriverSpec as _, abortError$1 as _a, terminateProcessTreeAndConfirm as _i, runAgentRounds as _n, retainedCreateMaterial as _r, CONTINUATION_FACTS as _t, collectDelivered as a, canonicalStreamEventFromSandboxEvent as aa, runSettledCommand as ai, isLiveNodeStatus as an, createBudgetPool as ar, interactiveAdmissionSeamKey as at, assertRecursiveReservationPolicy as b, promptOptionsFromAgentTurnInput as ba, controlProfileMaterialization as bi, SandboxEvidenceRetentionError as bn, createWorkerSlots as br, admitFinding as bt, runTree as c, extractLlmCallEvent as ca, createWorktree as ci, bridgeModelRouteRefusal as cn, spendFromUsageEvents as cr, reconnectRetainedInteractiveRun as ct, classifyDriverFailure as d, mapSandboxToolEvent as da, LOCAL_HARNESSES as di, harnessUsageIsEmpty as dn, bridgeStopSignalKey as dr, freeSlots as dt, detachedFrozen as ea, createRuntimeEventCollector as ei, claimsAuthority as en, workerTraceAnalysisStore as er, hostDirectoryReader as et, runDriverWithRetry as f, notifySandboxEventObserver as fa, harnessInvocation as fi, readCodexRolloutSession as fn, errMessage as fr, queueOf as ft, driverExecutorFactory as g, decodeHarnessUsage as ga, CodexExecutionDiagnosticError as gi, isTerminalDecision as gn, startRetainedRunInEnvironment as gr, CONTINUATIONS_DIR as gt, driverChild as h, sumSandboxUsage as ha, parseCodexTokenUsage as hi, defaultSelectWinner as hn, startRetainedRun as hr, mapExecutorResult as ht, bestDelivered as i, assertSandboxServedModel as ia, sanitizeRuntimeStreamEvent as ii, peerMailVerbNames as in, assertValidBudget as ir, providerVisibleProfile as it, settledToIteration as j, unsupportedProfileDimensions as ji, createPushTraceSource as jn, retainHarnessTranscript as jr, cliInPlaceExecutor as jt, restoreScopeOwnerAcceptedExecution as k, renderUnsupported as ki, providerAsSandboxClient as kn, readHarnessTranscript as kr, bindReusableExecutorExecutionId as kt, DriverAttemptsExhaustedError as l, isSandboxTerminalEvent as la, removeWorktree as li, addHarnessUsage as ln, spendFromUsageTotals as lr, recoverRetainedInteractiveRun as lt, upstreamUnavailableSignal as m, sandboxProgressEvents as ma, localHarnessExecutable as mi, createSandboxForSpec as mn, recoverRetainedRun as mr, gateOnDeliverable as mt, createRootHandle as n, projectSandboxOutcome as na, sanitizeAgentRuntimeEvent as ni, isPeerMailEnvelope as nn, BudgetReconcileFault as nr, coordinationMcpAlias as nt, pickBestDelivered as o, createSandboxToolPartState as oa, runWorktreeHarness as oi, isTerminalNodeStatus as on, meterUsageEvent as or, attachWorker as ot, summarizeDriverAttempts as p, sandboxEventServedBackend as pa, harnessSupportsReasoningEffort as pi, TERMINAL_DECISIONS as pn, reconnectRetainedRun as pr, rollingDispatch as pt, scopeRetainedOwnerPriorSpend as q, runtimeOwnedExecutorProviderEvidence as qi, prepareJsonlAppend as qn, createOtelExporter as qr, DEFAULT_STALL_AFTER_MS as qt, createSupervisor as r, readSandboxOutcome as ra, sanitizeKnowledgeReadinessReport as ri, peerMailTools as rn, ReservationWaitRefused as rr, coordinationProfileToolPrefix as rt, runFinalizer as s, createSandboxUsageLedger as sa, captureWorktreeDiff as si, bridgeAdmissionRefusal as sn, newUsageTotals as sr, readWorkerInteractiveBinding as st, DEFAULT_MAX_DEPTH as t, detachedSnapshot as ta, createRuntimeStreamEventCollector as ti, createPeerMailbox as tn, executorFailure as tr, resolveSpawnResourcePaths as tt, HarnessTurnFailedError as u, mapSandboxEvent as ua, DEFAULT_LOCAL_HARNESS as ui, createCodexRolloutStoreReader as un, bridgeRuntimeAttachmentsKey as ur, startRetainedInteractiveRun as ut, withDriverExecutor as v, awaitAbortable$1 as va, AGENT_PROFILE_MATERIALIZATION_AXES as vi, createSandboxLineage as vn, destroyInteractiveEnvironment as vr, CheckUnavailableError as vt, meterRuntimeOwnedAccounting as w, promptControlProfileMaterialization as wi, routerBrain as wn, linkAbort as wr, distillFindings as wt, beginScopeOwnerAttempt as x, providerMessageText as xa, defineProfileMaterializationContract as xi, captureBeforeDestroy as xn, openSlotGroup as xr, bestComposite as xt, SUBTREE_RESULT_LIMIT as y, promptFromAgentTurnInput as ya, assertProfileMaterialization as yi, acquireSandbox as yn, environmentGone as yr, admitContinuationPolicy as yt, bindScopeRetainedOwnerProvider as z, knownExecutionBindingReceipt as zi, FileSpawnJournal as zn, traceContextToEnv as zr, createRouterTranscript as zt };
29606
30112
 
29607
- //# sourceMappingURL=supervisor-WYRLsCp1.js.map
30113
+ //# sourceMappingURL=supervisor-CBBb97-G.js.map