@tangle-network/agent-app 3.0.24 → 3.0.26

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.
@@ -186,6 +186,7 @@ export interface PlatformBillingClient<Plan extends string> {
186
186
  type: string;
187
187
  description: string;
188
188
  referenceId: string;
189
+ keyId?: string;
189
190
  }): Promise<void>;
190
191
  }
191
192
  /** Define shared billing state including user ID, plan, balances, concurrency, and overage permission */
@@ -243,6 +244,7 @@ export interface PlatformBalanceManager<Plan extends string> {
243
244
  type: string;
244
245
  description: string;
245
246
  referenceId: string;
247
+ keyId?: string;
246
248
  }): Promise<void>;
247
249
  /** This product's spend for the user (drives a usage panel). */
248
250
  getProductUsage(userId: string): Promise<{
@@ -4,7 +4,7 @@ import {
4
4
  createTcloudKeyProvisioner,
5
5
  createWorkspaceKeyManager,
6
6
  readSharedBillingState
7
- } from "../chunk-2SDX3OC4.js";
7
+ } from "../chunk-63JF23V6.js";
8
8
  import "../chunk-VGS2NXLB.js";
9
9
  export {
10
10
  createIdentityBoundWorkspaceKeyManager,
@@ -33,8 +33,9 @@ export interface ChatTurnDefaultBackend<TContext = unknown, TResource = unknown>
33
33
  shell?: SandboxRuntimeConfig;
34
34
  /** A model's own provider, keyed by the exact model id a turn carries; any other model runs on the shell's. The box is
35
35
  * created on the shell's provider, and only an api-mode keyless provider there gets the box its own Router key, so a
36
- * pool of an OpenCode free model and a Router model puts the Router member on the shell and the free one here. */
37
- providers?: Readonly<Record<string, ProviderResolutionConfig>>;
36
+ * pool of an OpenCode free model and a Router model puts the Router member on the shell and the free one here.
37
+ * A function is resolved for each turn, so a turn can carry its own key, e.g. a child of the caller's linked key. */
38
+ providers?: Readonly<Record<string, ProviderResolutionConfig | ((args: ChatTurnProduceArgs<TContext, TResource>) => ProviderResolutionConfig | Promise<ProviderResolutionConfig>)>>;
38
39
  /** Explicitly keep every turn on the sandbox lane. */
39
40
  router?: false;
40
41
  /** Who pays for the Router model call: the turn's key, or a per-turn lease (`createDelegatedTurnKeys`) the
@@ -49,7 +50,7 @@ export interface ChatTurnDefaultBackend<TContext = unknown, TResource = unknown>
49
50
  allowedModels?(args: ChatTurnProduceArgs<TContext, TResource>, signal: AbortSignal): Promise<Outcome<readonly string[] | null>>;
50
51
  };
51
52
  }
52
- export declare function defaultChatShell(projectId: string, env: ChatTurnEnvironment, config: ChatTurnDefaultBackend): SandboxRuntimeConfig;
53
+ export declare function defaultChatShell<TContext, TResource>(projectId: string, env: ChatTurnEnvironment, config: ChatTurnDefaultBackend<TContext, TResource>): SandboxRuntimeConfig;
53
54
  export declare function createDefaultChatBackend<TContext, TResource>(projectId: string, env: ChatTurnEnvironment, config: ChatTurnDefaultBackend<TContext, TResource>, bindings?: ChatTurnStoreBindings, modelPolicy?: ModelPolicy): {
54
55
  prewarm: (scope: {
55
56
  workspaceId: string;
@@ -65,6 +66,6 @@ export declare function createDefaultChatBackend<TContext, TResource>(projectId:
65
66
  openEvents: ({ model, signal }: {
66
67
  model: string;
67
68
  signal: AbortSignal;
68
- }) => AsyncGenerator<unknown, any, any>;
69
+ }) => AsyncGenerator<unknown, void, any>;
69
70
  }>;
70
71
  };
@@ -71,6 +71,8 @@ import {
71
71
  normalizeChatPromptForSandbox,
72
72
  observeTurnCancellation,
73
73
  projectDispatchHistory,
74
+ providerResetSentence,
75
+ providerRetryNotice,
74
76
  resolveEmptyTurnRetries,
75
77
  routerTurnHistory,
76
78
  sanitizeUploadFilename,
@@ -82,7 +84,7 @@ import {
82
84
  turnCarriesFiles,
83
85
  turnPromptText,
84
86
  withProducerStream
85
- } from "../chunk-FYWWQRLA.js";
87
+ } from "../chunk-IV2QLOA2.js";
86
88
  import "../chunk-SBHFMDR7.js";
87
89
  import "../chunk-H6BRJU5M.js";
88
90
  import "../chunk-4DBHC63F.js";
@@ -2025,6 +2027,8 @@ export {
2025
2027
  projectDispatchHistory,
2026
2028
  promoteAgentFilePart,
2027
2029
  promptPartsByteSize,
2030
+ providerResetSentence,
2031
+ providerRetryNotice,
2028
2032
  readCompletedSandboxTurn,
2029
2033
  reconcileStaleTurnLock,
2030
2034
  recoverSandboxAssistantMessage,