@tangle-network/agent-app 3.0.25 → 3.0.27

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.
@@ -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;
@@ -62,7 +63,7 @@ export declare function createDefaultChatBackend<TContext, TResource>(projectId:
62
63
  modelPolicy: ModelPolicy<import("../policy-filters/index.js").PolicyFilterContext> | undefined;
63
64
  modelFailover: false;
64
65
  errorNotice: boolean;
65
- openEvents: ({ model, signal }: {
66
+ openEvents: ({ signal }: {
66
67
  model: string;
67
68
  signal: AbortSignal;
68
69
  }) => AsyncGenerator<unknown, any, any>;
@@ -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-5OE6SCHS.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,