@tangle-network/agent-app 0.53.8 → 0.53.10

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.
@@ -2,8 +2,8 @@ import {
2
2
  createAuthGuard,
3
3
  createBetterAuthSessionCookieMinter,
4
4
  createTangleSsoHandlers
5
- } from "../chunk-SMRF4UMN.js";
6
- import "../chunk-JML7WKWU.js";
5
+ } from "../chunk-L57CYCXN.js";
6
+ import "../chunk-CP36C5LZ.js";
7
7
  import "../chunk-YNSPVKMS.js";
8
8
  import "../chunk-3NCPXNBZ.js";
9
9
  import "../chunk-TXD5HXLE.js";
@@ -42,7 +42,7 @@ import {
42
42
  flattenHistory,
43
43
  readSandboxBinaryBytes,
44
44
  statSandboxFileSize
45
- } from "../chunk-2TZLCQ5U.js";
45
+ } from "../chunk-4KFM7VTH.js";
46
46
  import "../chunk-MCYJON3F.js";
47
47
  import "../chunk-LWSJK546.js";
48
48
  import "../chunk-P2GXQRFR.js";
@@ -55,7 +55,7 @@ import "../chunk-T52MKPHE.js";
55
55
  import {
56
56
  ProtectedModelSettlementError
57
57
  } from "../chunk-IMMCSVLV.js";
58
- import "../chunk-JML7WKWU.js";
58
+ import "../chunk-CP36C5LZ.js";
59
59
  import {
60
60
  assistantRowIdForTurn,
61
61
  createAssistantDraftWriter,
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  resolveTangleExecutionEnvironment,
15
15
  trimOrNull
16
- } from "./chunk-JML7WKWU.js";
16
+ } from "./chunk-CP36C5LZ.js";
17
17
 
18
18
  // src/sandbox/index.ts
19
19
  import {
@@ -30,6 +30,15 @@ var fail = (error) => ({
30
30
  });
31
31
 
32
32
  // src/sandbox/model.ts
33
+ function backendModelFields(model) {
34
+ const nested = {
35
+ model: model.model,
36
+ provider: model.provider,
37
+ ...model.apiKey !== void 0 ? { apiKey: model.apiKey } : {},
38
+ ...model.baseUrl !== void 0 ? { baseUrl: model.baseUrl } : {}
39
+ };
40
+ return { ...nested, modelId: model.model, model: nested };
41
+ }
33
42
  function resolveModelSelection(config, override) {
34
43
  const c = config ?? {};
35
44
  const explicitBaseUrl = trimOrNull(c.routerBaseUrl);
@@ -2151,7 +2160,7 @@ async function provisionWorkspaceSandbox(shell, options) {
2151
2160
  ...userId ? { permissions: { initialUsers: [{ userId, role }] } } : {},
2152
2161
  env,
2153
2162
  secrets,
2154
- backend: { type: harness, profile, ...model ? { model } : {} },
2163
+ backend: { type: harness, profile, ...model ? backendModelFields(model) : {} },
2155
2164
  ...storage ? { storage } : {},
2156
2165
  ...restore ? restore : {},
2157
2166
  ...shell.egressPolicy ? { egressPolicy: shell.egressPolicy } : {},
@@ -2514,7 +2523,7 @@ async function resolveSandboxPromptBackend(shell, options, operation = "sandbox
2514
2523
  return {
2515
2524
  type: harness,
2516
2525
  profile,
2517
- ...model ? { model } : {},
2526
+ ...model ? backendModelFields(model) : {},
2518
2527
  ...options.interactions ? { interactions: options.interactions } : {}
2519
2528
  };
2520
2529
  }
@@ -2741,6 +2750,7 @@ function firstQuestionText(value) {
2741
2750
  }
2742
2751
 
2743
2752
  export {
2753
+ backendModelFields,
2744
2754
  resolveModelSelection,
2745
2755
  resolveModel,
2746
2756
  SandboxModelResolutionError,
@@ -2842,4 +2852,4 @@ export {
2842
2852
  isTerminalPromptEvent,
2843
2853
  detectInteractiveQuestion
2844
2854
  };
2845
- //# sourceMappingURL=chunk-2TZLCQ5U.js.map
2855
+ //# sourceMappingURL=chunk-4KFM7VTH.js.map