@desplega.ai/agent-swarm 1.130.0 → 1.131.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 (138) hide show
  1. package/README.md +1 -1
  2. package/dist/{actions-73ee723n.js → actions-jgcy477k.js} +7 -7
  3. package/dist/{anthropic-messages-3xgme8my.js → anthropic-messages-rjmd2e7n.js} +5 -5
  4. package/dist/{app-hz5c2xay.js → app-5da78bd4.js} +4 -4
  5. package/dist/{assistant-08mr16yp.js → assistant-f2vkk1hj.js} +9 -9
  6. package/dist/{azure-openai-responses-xa4sh9f6.js → azure-openai-responses-c0yjmbfd.js} +8 -5
  7. package/dist/{boot-reembed-5bgan3cd.js → boot-reembed-q7mp8hcr.js} +4 -4
  8. package/dist/{boot-reembed-z7ykyeq8.js → boot-reembed-xmw8wcx6.js} +5 -5
  9. package/dist/{boot-scrub-logs-b2rjk8mv.js → boot-scrub-logs-dsqrv79n.js} +3 -3
  10. package/dist/{claude-adapter-qr0k17km.js → claude-adapter-q6x7yspx.js} +6 -6
  11. package/dist/{claude-managed-adapter-gv19tdew.js → claude-managed-adapter-wsg37bt8.js} +1 -1
  12. package/dist/{cli-vr2f46zj.js → cli-114fvtmj.js} +1 -1
  13. package/dist/{cli-mhr8tq3v.js → cli-2f07m0xr.js} +1 -1
  14. package/dist/{cli-mgerp0vs.js → cli-2rk0cx7s.js} +2 -2
  15. package/dist/{cli-tfw3c0y1.js → cli-3ty0t082.js} +2 -2
  16. package/dist/{cli-fs153s3x.js → cli-4rkfg1wx.js} +3 -3
  17. package/dist/{cli-s18zzkfp.js → cli-50vbt00w.js} +44 -7
  18. package/dist/{cli-vgexpfsr.js → cli-57khth04.js} +6 -3
  19. package/dist/{cli-n9yxcnvk.js → cli-5n6e5yfn.js} +29 -7
  20. package/dist/{cli-q8zwffx0.js → cli-6dp3ydxa.js} +158 -39
  21. package/dist/{cli-r62me33w.js → cli-6dpytdr2.js} +2 -2
  22. package/dist/{cli-ch7t5v7n.js → cli-6map995v.js} +9 -4
  23. package/dist/{cli-326083vb.js → cli-6pcz9h15.js} +14 -14
  24. package/dist/{cli-h3e66g5b.js → cli-793jvbsh.js} +1 -1
  25. package/dist/{cli-yj7z99vp.js → cli-7dm2zqy2.js} +2 -2
  26. package/dist/{cli-t5tsq67k.js → cli-9dr5qzc0.js} +39 -4
  27. package/dist/{cli-m8fs5ttq.js → cli-aca5pz9f.js} +1 -1
  28. package/dist/{cli-w10fkrf1.js → cli-akdvwc9v.js} +354 -115
  29. package/dist/{cli-hntzdchd.js → cli-bqw0mt1n.js} +1 -1
  30. package/dist/{cli-7v5dhmc8.js → cli-ccf9vy7q.js} +6 -6
  31. package/dist/{cli-6nh2qxvh.js → cli-darcwax3.js} +1 -1
  32. package/dist/{cli-xg2eezyv.js → cli-f1am9szv.js} +1 -1
  33. package/dist/{cli-1px8pn1s.js → cli-g1re8r05.js} +2 -2
  34. package/dist/{cli-z9q7pb38.js → cli-g74vpjp2.js} +4 -4
  35. package/dist/{cli-brebbsen.js → cli-gecy3z2s.js} +20 -8
  36. package/dist/{cli-epsvdckx.js → cli-gm9cbhbq.js} +20 -10
  37. package/dist/{cli-xdrmxvd4.js → cli-jbcva0xj.js} +55 -11
  38. package/dist/{cli-haanc4qd.js → cli-jevgrb4w.js} +22 -22
  39. package/dist/{cli-e5p3es48.js → cli-kd1ck4rx.js} +1 -1
  40. package/dist/{cli-1mj7yz1r.js → cli-nrkkknat.js} +1 -1
  41. package/dist/{cli-2pa5w9b6.js → cli-pxfxkx5m.js} +1 -1
  42. package/dist/{cli-qcsjdppx.js → cli-rgrfzg8z.js} +7 -7
  43. package/dist/{cli-mf009e0j.js → cli-se2p6rkb.js} +1 -1
  44. package/dist/{cli-tp519bjz.js → cli-sy7jk3tx.js} +2 -2
  45. package/dist/{cli-qbb2ten8.js → cli-t8d349cy.js} +2 -2
  46. package/dist/{cli-s21zzx4b.js → cli-w2wxd56v.js} +448 -184
  47. package/dist/{cli-qmdnhpej.js → cli-wz9115x0.js} +17 -7
  48. package/dist/{cli-4n4mdv21.js → cli-xpxde7rm.js} +7 -3
  49. package/dist/{cli-dakxgk70.js → cli-ycrnynpw.js} +4 -4
  50. package/dist/{cli-73bvdyxr.js → cli-ygrbmjja.js} +6 -6
  51. package/dist/cli.js +22 -22
  52. package/dist/{codex-adapter-6pc50x9q.js → codex-adapter-htjkn22b.js} +4 -4
  53. package/dist/{codex-hook-amndawyb.js → codex-hook-hq54t9ft.js} +2 -2
  54. package/dist/{codex-session-runner-tpg8hyj7.js → codex-session-runner-wjfc7smz.js} +4 -4
  55. package/dist/{commands-yfpwt11g.js → commands-xhrfwqsk.js} +3 -3
  56. package/dist/{db-jn499nmp.js → db-anvwb22f.js} +3 -3
  57. package/dist/{google-generative-ai-txgg2q58.js → google-generative-ai-hysrd8qx.js} +7 -5
  58. package/dist/{google-vertex-t663s1c3.js → google-vertex-p5arrga0.js} +7 -5
  59. package/dist/{handlers-eev4nng0.js → handlers-b9kbc621.js} +9 -9
  60. package/dist/{hook-9fkwkf3m.js → hook-cgk4wxmx.js} +5 -5
  61. package/dist/{hook-sn7pj75w.js → hook-xkvn6c5h.js} +4 -4
  62. package/dist/{http-xdbbtmhx.js → http-9xh6ta4r.js} +324 -82
  63. package/dist/{index-9vnkprkh.js → index-25wjsdv2.js} +10 -10
  64. package/dist/{index-5fdsemf0.js → index-eaxyqcmj.js} +155 -37
  65. package/dist/{index-fnack5vh.js → index-vg4snay4.js} +11 -11
  66. package/dist/{index-c0qedjh6.js → index-ywds4812.js} +9 -9
  67. package/dist/{keepalive-fc7a2hw9.js → keepalive-vc7s2aa6.js} +5 -5
  68. package/dist/{lead-1fva34y9.js → lead-r2yqfmx7.js} +29 -29
  69. package/dist/{maintenance-0rdb12vf.js → maintenance-mw70k468.js} +5 -5
  70. package/dist/{mistral-conversations-4swenhmf.js → mistral-conversations-81fwav0j.js} +2 -2
  71. package/dist/{oauth-refresh-sweep-f9rptqbt.js → oauth-refresh-sweep-yecgjpk4.js} +4 -4
  72. package/dist/{onboard-9zn0fx2m.js → onboard-xj0f73f9.js} +2 -2
  73. package/dist/{openai-codex-responses-xetseqvt.js → openai-codex-responses-5g27pd6f.js} +43 -23
  74. package/dist/{openai-completions-5r2g5axa.js → openai-completions-3vkmfz2a.js} +55 -11
  75. package/dist/{openai-responses-ce67hd23.js → openai-responses-dg4t7j7a.js} +8 -5
  76. package/dist/{openrouter-images-pzfp22jb.js → openrouter-images-g3gm8931.js} +1 -1
  77. package/dist/{otel-impl-thnttmbn.js → otel-impl-nxg0n0b3.js} +1 -1
  78. package/dist/{pi-mono-adapter-bpfrn6d7.js → pi-mono-adapter-4g5kby31.js} +17114 -7514
  79. package/dist/{pricing-refresh-n0ve0kh6.js → pricing-refresh-2cn6effr.js} +5 -5
  80. package/dist/{rbac-roles-w45bhahg.js → rbac-roles-1hcxdtg7.js} +4 -4
  81. package/dist/{rbac-roles-bbwb4wrm.js → rbac-roles-vynday5g.js} +5 -5
  82. package/dist/{render-v2-d675cp9r.js → render-v2-tc0bh8kk.js} +4 -4
  83. package/dist/{seed-pricing-47q77nw4.js → seed-pricing-8kceb43f.js} +4 -4
  84. package/dist/{setup-3vnv2m43.js → setup-46xtgq3c.js} +2 -2
  85. package/dist/{worker-7shsr8hk.js → worker-qrbz6hmv.js} +29 -29
  86. package/openapi.json +342 -10
  87. package/package.json +6 -6
  88. package/src/apps/store.ts +13 -4
  89. package/src/assets/key.ts +8 -1
  90. package/src/be/asset-key-audit.ts +3 -1
  91. package/src/be/db-queries/mcp-oauth.ts +26 -0
  92. package/src/be/db.ts +42 -1
  93. package/src/be/migrations/129_asset_keys_apps_scripts.sql +161 -0
  94. package/src/be/migrations/130_scratch_script_retention_grace.sql +6 -0
  95. package/src/be/scripts/db.ts +48 -3
  96. package/src/be/scripts/retention.ts +164 -0
  97. package/src/be/scripts/run-saved.ts +16 -1
  98. package/src/be/seed-skills/index.ts +7 -0
  99. package/src/http/assets.ts +120 -29
  100. package/src/http/index.ts +5 -0
  101. package/src/http/mcp-oauth.ts +69 -1
  102. package/src/http/scripts.ts +21 -3
  103. package/src/http/users.ts +45 -0
  104. package/src/http/x.ts +14 -0
  105. package/src/oauth/ensure-mcp-token.ts +7 -1
  106. package/src/oauth/mcp-wrapper.ts +247 -24
  107. package/src/providers/claude-managed-models.ts +34 -10
  108. package/src/providers/pi-mono-adapter.ts +1 -1
  109. package/src/tests/asset-key-api.test.ts +48 -2
  110. package/src/tests/asset-key-invariants.test.ts +92 -0
  111. package/src/tests/asset-key-migration.test.ts +174 -8
  112. package/src/tests/asset-key-normalization.test.ts +2 -0
  113. package/src/tests/claude-managed-adapter.test.ts +38 -7
  114. package/src/tests/mcp-oauth-dcr-reuse.test.ts +95 -0
  115. package/src/tests/mcp-oauth-ensure-token.test.ts +23 -0
  116. package/src/tests/mcp-oauth-manual-client.test.ts +135 -2
  117. package/src/tests/mcp-oauth-wrapper.test.ts +380 -0
  118. package/src/tests/rbac-admission-e2e.test.ts +68 -0
  119. package/src/tests/sandboxed-process.test.ts +45 -0
  120. package/src/tests/script-connections.test.ts +4 -0
  121. package/src/tests/scripts-external-api.test.ts +8 -3
  122. package/src/tests/scripts-http.test.ts +12 -0
  123. package/src/tests/scripts-retention.test.ts +384 -0
  124. package/src/tests/whoami-route.test.ts +127 -0
  125. package/src/tests/workflow-engine-v2.test.ts +80 -7
  126. package/src/tests/workflow-swarm-script.test.ts +118 -5
  127. package/src/tools/workflows/create-workflow.ts +4 -1
  128. package/src/types.ts +18 -5
  129. package/src/utils/sandboxed-process.ts +40 -14
  130. package/src/utils/template.ts +8 -1
  131. package/src/workflows/engine.ts +27 -4
  132. package/src/workflows/executors/swarm-script.ts +52 -1
  133. package/src/workflows/retry-poller.ts +19 -2
  134. package/templates/schedules/daily-compounding-reflection/content.md +12 -3
  135. package/templates/skills/asset-namespaces/content.md +2 -2
  136. package/templates/skills/scheduled-task-resilience/SKILL.md +102 -0
  137. package/templates/skills/scheduled-task-resilience/config.json +14 -0
  138. package/templates/skills/scheduled-task-resilience/content.md +97 -0
@@ -1,3 +1,6 @@
1
+ import {
2
+ retryProviderRequest
3
+ } from "./cli-s8s499xy.js";
1
4
  import {
2
5
  import_websocket
3
6
  } from "./cli-4w4fmq9x.js";
@@ -9,7 +12,7 @@ import {
9
12
  import {
10
13
  resolveJsonSchemaStrictSampling,
11
14
  transformMessages
12
- } from "./cli-vgexpfsr.js";
15
+ } from "./cli-57khth04.js";
13
16
  import {
14
17
  sanitizeSurrogates
15
18
  } from "./cli-y2apkfe2.js";
@@ -25054,7 +25057,8 @@ function resolveThoughtSignature(isSameProviderAndModel, signature) {
25054
25057
  return isSameProviderAndModel && isValidThoughtSignature(signature) ? signature : undefined;
25055
25058
  }
25056
25059
  function requiresToolCallId(modelId) {
25057
- return modelId.startsWith("claude-") || modelId.startsWith("gpt-oss-");
25060
+ const geminiMajorVersion = getGeminiMajorVersion(modelId);
25061
+ return modelId.startsWith("claude-") || modelId.startsWith("gpt-oss-") || geminiMajorVersion !== undefined && geminiMajorVersion >= 3;
25058
25062
  }
25059
25063
  function getGeminiMajorVersion(modelId) {
25060
25064
  const match = modelId.toLowerCase().match(/^gemini(?:-live)?-(\d+)/);
@@ -25109,24 +25113,26 @@ function convertMessages(model, context) {
25109
25113
  const isSameProviderAndModel = msg.provider === model.provider && msg.model === model.id;
25110
25114
  for (const block of msg.content) {
25111
25115
  if (block.type === "text") {
25112
- if (!block.text || block.text.trim() === "")
25113
- continue;
25114
25116
  const thoughtSignature = resolveThoughtSignature(isSameProviderAndModel, block.textSignature);
25117
+ if ((!block.text || block.text.trim() === "") && !thoughtSignature)
25118
+ continue;
25115
25119
  parts.push({
25116
25120
  text: sanitizeSurrogates(block.text),
25117
25121
  ...thoughtSignature && { thoughtSignature }
25118
25122
  });
25119
25123
  } else if (block.type === "thinking") {
25120
- if (!block.thinking || block.thinking.trim() === "")
25121
- continue;
25122
25124
  if (isSameProviderAndModel) {
25123
25125
  const thoughtSignature = resolveThoughtSignature(isSameProviderAndModel, block.thinkingSignature);
25126
+ if ((!block.thinking || block.thinking.trim() === "") && !thoughtSignature)
25127
+ continue;
25124
25128
  parts.push({
25125
25129
  thought: true,
25126
25130
  text: sanitizeSurrogates(block.thinking),
25127
25131
  ...thoughtSignature && { thoughtSignature }
25128
25132
  });
25129
25133
  } else {
25134
+ if (!block.thinking || block.thinking.trim() === "")
25135
+ continue;
25130
25136
  parts.push({
25131
25137
  text: sanitizeSurrogates(block.thinking)
25132
25138
  });
@@ -25282,5 +25288,21 @@ function mapStopReason(reason) {
25282
25288
  }
25283
25289
  }
25284
25290
  }
25291
+ function retryGoogleRequest(request, options) {
25292
+ return retryProviderRequest(async () => {
25293
+ try {
25294
+ return await request();
25295
+ } catch (error) {
25296
+ if (error instanceof Error && "status" in error && !("headers" in error)) {
25297
+ error.headers = undefined;
25298
+ }
25299
+ throw error;
25300
+ }
25301
+ }, {
25302
+ maxRetries: options?.maxRetries,
25303
+ maxRetryDelayMs: options?.maxRetryDelayMs,
25304
+ signal: options?.signal
25305
+ });
25306
+ }
25285
25307
 
25286
- export { ThinkingLevel, ResourceScope, GoogleGenAI, isThinkingPart, retainThoughtSignature, convertMessages, convertTools, supportsGoogleStrictToolSampling, resolveGoogleFunctionCallingMode, mapStopReason };
25308
+ export { ThinkingLevel, ResourceScope, GoogleGenAI, isThinkingPart, retainThoughtSignature, convertMessages, convertTools, supportsGoogleStrictToolSampling, resolveGoogleFunctionCallingMode, mapStopReason, retryGoogleRequest };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./cli-f14fvzag.js";
7
7
  import {
8
8
  embedScript
9
- } from "./cli-1px8pn1s.js";
9
+ } from "./cli-g1re8r05.js";
10
10
  import {
11
11
  calculatePKCECodeChallenge,
12
12
  ensureAuthorizationTokenOrThrow,
@@ -18,12 +18,13 @@ import {
18
18
  oauthAppRowToProviderConfig,
19
19
  updateAuthorizationTokens,
20
20
  upsertAuthorization
21
- } from "./cli-1mj7yz1r.js";
21
+ } from "./cli-nrkkknat.js";
22
22
  import {
23
23
  CredentialBroker,
24
24
  DEFAULT_CREDENTIAL_BINDINGS,
25
25
  computeContentHash,
26
26
  decryptSecret,
27
+ defaultAssetKey,
27
28
  encryptSecret,
28
29
  getDb,
29
30
  getEncryptionKey,
@@ -33,14 +34,15 @@ import {
33
34
  init_crypto,
34
35
  init_date_utils,
35
36
  init_db,
37
+ init_key,
36
38
  normalizeDateRequired,
37
39
  placeholderForConfigKey,
38
40
  upsertSwarmConfig
39
- } from "./cli-s18zzkfp.js";
41
+ } from "./cli-50vbt00w.js";
40
42
  import {
41
43
  init_env_flag,
42
44
  isEnvFlagEnabled
43
- } from "./cli-4n4mdv21.js";
45
+ } from "./cli-xpxde7rm.js";
44
46
  import {
45
47
  init_zod
46
48
  } from "./cli-zsspvvm2.js";
@@ -168933,6 +168935,75 @@ async function discoverAuthorizationServerMetadata(issuer) {
168933
168935
  }
168934
168936
  throw lastError ?? new Error(`Authorization server metadata not found at ${issuer}`);
168935
168937
  }
168938
+ var KNOWN_TOKEN_ENDPOINT_AUTH_METHODS = [
168939
+ "client_secret_basic",
168940
+ "client_secret_post",
168941
+ "none"
168942
+ ];
168943
+ var DEFAULT_TOKEN_ENDPOINT_AUTH_METHOD = "client_secret_basic";
168944
+ function normalizeTokenEndpointAuthMethod(value) {
168945
+ return KNOWN_TOKEN_ENDPOINT_AUTH_METHODS.includes(value ?? "") ? value : DEFAULT_TOKEN_ENDPOINT_AUTH_METHOD;
168946
+ }
168947
+
168948
+ class UnsupportedTokenEndpointAuthMethodError extends Error {
168949
+ constructor(value, source) {
168950
+ super(`Authorization server ${source} token_endpoint_auth_method "${value}", which agent-swarm cannot perform. ` + `Supported methods: ${KNOWN_TOKEN_ENDPOINT_AUTH_METHODS.join(", ")}. ` + `Register a client manually via POST /api/mcp-oauth/:id/manual-client with a supported method.`);
168951
+ this.name = "UnsupportedTokenEndpointAuthMethodError";
168952
+ }
168953
+ }
168954
+ function resolveAdvertisedTokenEndpointAuthMethod(value, source) {
168955
+ if (value == null || value === "")
168956
+ return DEFAULT_TOKEN_ENDPOINT_AUTH_METHOD;
168957
+ if (!KNOWN_TOKEN_ENDPOINT_AUTH_METHODS.includes(value)) {
168958
+ throw new UnsupportedTokenEndpointAuthMethodError(value, source);
168959
+ }
168960
+ return value;
168961
+ }
168962
+ function authMethodForStoredClient(value) {
168963
+ if (value == null || value === "")
168964
+ return "client_secret_post";
168965
+ return normalizeTokenEndpointAuthMethod(value);
168966
+ }
168967
+ function selectDcrTokenEndpointAuthMethod(supportedMethods) {
168968
+ if (!supportedMethods || supportedMethods.length === 0) {
168969
+ return DEFAULT_TOKEN_ENDPOINT_AUTH_METHOD;
168970
+ }
168971
+ for (const method of KNOWN_TOKEN_ENDPOINT_AUTH_METHODS) {
168972
+ if (supportedMethods.includes(method))
168973
+ return method;
168974
+ }
168975
+ throw new UnsupportedTokenEndpointAuthMethodError(supportedMethods.join(", "), "advertises only");
168976
+ }
168977
+ function formUrlEncodeComponent(value) {
168978
+ return new URLSearchParams({ v: value }).toString().slice(2);
168979
+ }
168980
+ function redactSentCredentials(text, sent) {
168981
+ let out = scrubSecrets(text);
168982
+ for (const value of sent) {
168983
+ if (!value)
168984
+ continue;
168985
+ for (const shape of new Set([value, formUrlEncodeComponent(value)])) {
168986
+ out = out.split(shape).join("[REDACTED]");
168987
+ }
168988
+ }
168989
+ return out;
168990
+ }
168991
+ function applyClientAuthentication(method, clientId, clientSecret, body, headers) {
168992
+ if (method === "client_secret_basic" && clientSecret) {
168993
+ const encodedSecret = formUrlEncodeComponent(clientSecret);
168994
+ const credentials = `${formUrlEncodeComponent(clientId)}:${encodedSecret}`;
168995
+ const encoded = Buffer.from(credentials).toString("base64");
168996
+ registerVolatileSecret(encoded, "mcp_oauth_basic_credential");
168997
+ headers.Authorization = `Basic ${encoded}`;
168998
+ return [clientSecret, encodedSecret, encoded, credentials];
168999
+ }
169000
+ body.set("client_id", clientId);
169001
+ if (method === "client_secret_post" && clientSecret) {
169002
+ body.set("client_secret", clientSecret);
169003
+ return [clientSecret, formUrlEncodeComponent(clientSecret)];
169004
+ }
169005
+ return [];
169006
+ }
168936
169007
  async function registerClient(registrationEndpoint, req) {
168937
169008
  const res = await safeFetch(registrationEndpoint, {
168938
169009
  method: "POST",
@@ -168985,27 +169056,33 @@ async function buildAuthorizeUrl(input) {
168985
169056
  return { url: url.toString(), state, codeVerifier, codeChallenge };
168986
169057
  }
168987
169058
  async function exchangeCodeForTokens(input) {
169059
+ if (input.clientSecret)
169060
+ registerVolatileSecret(input.clientSecret, "mcp_oauth_client_secret");
169061
+ const method = normalizeTokenEndpointAuthMethod(input.tokenEndpointAuthMethod);
168988
169062
  const body = new URLSearchParams({
168989
169063
  grant_type: "authorization_code",
168990
169064
  code: input.code,
168991
169065
  redirect_uri: input.redirectUri,
168992
- client_id: input.clientId,
168993
169066
  code_verifier: input.codeVerifier,
168994
169067
  resource: input.resource
168995
169068
  });
168996
- if (input.clientSecret)
168997
- body.set("client_secret", input.clientSecret);
169069
+ const headers = {
169070
+ "Content-Type": "application/x-www-form-urlencoded",
169071
+ Accept: "application/json"
169072
+ };
169073
+ const sentCredentials = applyClientAuthentication(method, input.clientId, input.clientSecret, body, headers);
168998
169074
  const res = await safeFetch(input.tokenUrl, {
168999
169075
  method: "POST",
169000
- headers: {
169001
- "Content-Type": "application/x-www-form-urlencoded",
169002
- Accept: "application/json"
169003
- },
169076
+ headers,
169004
169077
  body: body.toString()
169005
169078
  });
169006
169079
  if (!res.ok) {
169007
169080
  const text = await res.text().catch(() => "");
169008
- throw new Error(`Token exchange failed (${res.status}): ${text}`);
169081
+ throw new Error(`Token exchange failed (${res.status}): ${redactSentCredentials(text, [
169082
+ ...sentCredentials,
169083
+ input.code,
169084
+ input.codeVerifier
169085
+ ])}`);
169009
169086
  }
169010
169087
  return await res.json();
169011
169088
  }
@@ -169013,50 +169090,57 @@ async function refreshMcpToken(input) {
169013
169090
  if (input.clientSecret)
169014
169091
  registerVolatileSecret(input.clientSecret, "mcp_oauth_client_secret");
169015
169092
  registerVolatileSecret(input.refreshToken, "mcp_oauth_refresh_token");
169093
+ const method = normalizeTokenEndpointAuthMethod(input.tokenEndpointAuthMethod);
169016
169094
  const body = new URLSearchParams({
169017
169095
  grant_type: "refresh_token",
169018
169096
  refresh_token: input.refreshToken,
169019
- client_id: input.clientId,
169020
169097
  resource: input.resource
169021
169098
  });
169022
- if (input.clientSecret)
169023
- body.set("client_secret", input.clientSecret);
169024
169099
  if (input.scopes && input.scopes.length > 0)
169025
169100
  body.set("scope", input.scopes.join(" "));
169101
+ const headers = {
169102
+ "Content-Type": "application/x-www-form-urlencoded",
169103
+ Accept: "application/json"
169104
+ };
169105
+ const sentCredentials = applyClientAuthentication(method, input.clientId, input.clientSecret, body, headers);
169026
169106
  const res = await safeFetch(input.tokenUrl, {
169027
169107
  method: "POST",
169028
- headers: {
169029
- "Content-Type": "application/x-www-form-urlencoded",
169030
- Accept: "application/json"
169031
- },
169108
+ headers,
169032
169109
  body: body.toString()
169033
169110
  });
169034
169111
  if (!res.ok) {
169035
169112
  const text = await res.text().catch(() => "");
169036
- throw new Error(`Token refresh failed (${res.status}): ${scrubSecrets(text)}`);
169113
+ throw new Error(`Token refresh failed (${res.status}): ${redactSentCredentials(text, [
169114
+ ...sentCredentials,
169115
+ input.refreshToken
169116
+ ])}`);
169037
169117
  }
169038
169118
  return await res.json();
169039
169119
  }
169040
169120
  async function revokeMcpToken(input) {
169041
- const body = new URLSearchParams({
169042
- token: input.token,
169043
- client_id: input.clientId
169044
- });
169121
+ if (input.clientSecret)
169122
+ registerVolatileSecret(input.clientSecret, "mcp_oauth_client_secret");
169123
+ registerVolatileSecret(input.token, "mcp_oauth_revoked_token");
169124
+ const method = normalizeTokenEndpointAuthMethod(input.tokenEndpointAuthMethod);
169125
+ const body = new URLSearchParams({ token: input.token });
169045
169126
  if (input.tokenTypeHint)
169046
169127
  body.set("token_type_hint", input.tokenTypeHint);
169047
- if (input.clientSecret)
169048
- body.set("client_secret", input.clientSecret);
169128
+ const headers = {
169129
+ "Content-Type": "application/x-www-form-urlencoded",
169130
+ Accept: "application/json"
169131
+ };
169132
+ const sentCredentials = applyClientAuthentication(method, input.clientId, input.clientSecret, body, headers);
169049
169133
  const res = await safeFetch(input.revocationUrl, {
169050
169134
  method: "POST",
169051
- headers: {
169052
- "Content-Type": "application/x-www-form-urlencoded",
169053
- Accept: "application/json"
169054
- },
169135
+ headers,
169055
169136
  body: body.toString()
169056
169137
  });
169057
169138
  if (!res.ok && res.status !== 200 && res.status !== 204) {
169058
169139
  const text = await res.text().catch(() => "");
169059
- throw new Error(`Token revocation failed (${res.status}): ${text}`);
169140
+ throw new Error(`Token revocation failed (${res.status}): ${redactSentCredentials(text, [
169141
+ ...sentCredentials,
169142
+ input.token
169143
+ ])}`);
169060
169144
  }
169061
169145
  }
169062
169146
  function computeExpiresAt(expiresInSeconds) {
@@ -169136,6 +169220,7 @@ function decryptTokenRow(row) {
169136
169220
  revocationUrl: row.revocationUrl,
169137
169221
  dcrClientId: row.clientId || null,
169138
169222
  dcrClientSecret: row.clientSecret == null ? null : clientKey ? decryptSecret(row.clientSecret, clientKey) : row.clientSecret,
169223
+ tokenEndpointAuthMethod: typeof metadata.tokenEndpointAuthMethod === "string" ? metadata.tokenEndpointAuthMethod : null,
169139
169224
  clientSource,
169140
169225
  status: statusFromUnified(row.status),
169141
169226
  lastErrorMessage: row.lastErrorMessage,
@@ -169157,6 +169242,7 @@ function upsertMcpApp(input) {
169157
169242
  authorizationServerIssuer: input.authorizationServerIssuer,
169158
169243
  registrationEndpoint: input.registrationEndpoint ?? null,
169159
169244
  clientSource: input.clientSource,
169245
+ ...input.tokenEndpointAuthMethod !== undefined ? { tokenEndpointAuthMethod: input.tokenEndpointAuthMethod } : {},
169160
169246
  registeredScopes: input.registeredScopes !== undefined ? input.registeredScopes : existingMetadata.registeredScopes ?? null,
169161
169247
  invalidated: false
169162
169248
  });
@@ -169216,6 +169302,7 @@ function readMcpOAuthApp(appId) {
169216
169302
  authorizationServerIssuer: typeof metadata.authorizationServerIssuer === "string" ? metadata.authorizationServerIssuer : "",
169217
169303
  registrationEndpoint: typeof metadata.registrationEndpoint === "string" ? metadata.registrationEndpoint : null,
169218
169304
  registeredScopes: Array.isArray(metadata.registeredScopes) ? metadata.registeredScopes : null,
169305
+ tokenEndpointAuthMethod: typeof metadata.tokenEndpointAuthMethod === "string" ? metadata.tokenEndpointAuthMethod : null,
169219
169306
  clientSource
169220
169307
  };
169221
169308
  }
@@ -169277,6 +169364,7 @@ function upsertMcpOAuthToken(input) {
169277
169364
  registeredScopes: input.registeredScopes,
169278
169365
  dcrClientId: input.dcrClientId,
169279
169366
  dcrClientSecret: input.dcrClientSecret,
169367
+ tokenEndpointAuthMethod: input.tokenEndpointAuthMethod,
169280
169368
  clientSource: input.clientSource
169281
169369
  });
169282
169370
  upsertAuthorization({
@@ -169359,6 +169447,7 @@ function insertMcpOAuthPending(input) {
169359
169447
  registeredScopes: input.registeredScopes,
169360
169448
  dcrClientId: input.dcrClientId,
169361
169449
  dcrClientSecret: input.dcrClientSecret,
169450
+ tokenEndpointAuthMethod: input.tokenEndpointAuthMethod,
169362
169451
  clientSource,
169363
169452
  redirectUri: input.redirectUri
169364
169453
  });
@@ -169373,6 +169462,7 @@ function insertMcpOAuthPending(input) {
169373
169462
  registeredScopes: input.registeredScopes ?? null,
169374
169463
  dcrClientId: input.dcrClientId ?? null,
169375
169464
  dcrClientSecret: input.dcrClientSecret == null ? null : encryptSecret(input.dcrClientSecret, getEncryptionKey()),
169465
+ tokenEndpointAuthMethod: input.tokenEndpointAuthMethod ?? null,
169376
169466
  clientSource
169377
169467
  });
169378
169468
  getDb().query(`INSERT INTO oauth_pending (
@@ -169420,6 +169510,7 @@ function consumeMcpOAuthPending(state) {
169420
169510
  registeredScopes: Array.isArray(context.registeredScopes) ? context.registeredScopes : null,
169421
169511
  dcrClientId: typeof context.dcrClientId === "string" ? context.dcrClientId : null,
169422
169512
  dcrClientSecret: encryptedClientSecret ? decryptSecret(encryptedClientSecret, getEncryptionKey()) : null,
169513
+ tokenEndpointAuthMethod: typeof context.tokenEndpointAuthMethod === "string" ? context.tokenEndpointAuthMethod : null,
169423
169514
  redirectUri: row.redirectUri,
169424
169515
  finalRedirect: row.finalRedirect,
169425
169516
  createdAt: normalizeDateRequired(row.createdAt)
@@ -169465,6 +169556,7 @@ async function ensureMcpToken(mcpServerId, opts = {}) {
169465
169556
  tokenUrl: token.tokenUrl,
169466
169557
  clientId: token.dcrClientId ?? "",
169467
169558
  clientSecret: token.dcrClientSecret ?? undefined,
169559
+ tokenEndpointAuthMethod: authMethodForStoredClient(token.tokenEndpointAuthMethod),
169468
169560
  refreshToken: token.refreshToken,
169469
169561
  resource: token.resourceUrl,
169470
169562
  scopes: token.scope ? token.scope.split(" ").filter(Boolean) : undefined
@@ -170915,6 +171007,7 @@ ${members.join(`
170915
171007
  }
170916
171008
 
170917
171009
  // src/be/scripts/db.ts
171010
+ init_key();
170918
171011
  init_secret_scrubber();
170919
171012
 
170920
171013
  // src/utils/short-id.ts
@@ -170988,12 +171081,12 @@ function insertScript(args) {
170988
171081
  const typeChecked = args.typeChecked ? 1 : 0;
170989
171082
  const txn = getDb().transaction(() => {
170990
171083
  const row = getDb().prepare(`INSERT INTO scripts (
170991
- id, name, scope, scopeId, source, description, intent, signatureJson,
171084
+ id, "key", name, scope, scopeId, source, description, intent, signatureJson,
170992
171085
  argsJsonSchema, contentHash, isScratch, typeChecked, fsMode, createdByAgentId, createdAt, updatedAt,
170993
171086
  created_by, updated_by
170994
171087
  )
170995
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
170996
- RETURNING *`).get(id, args.name, args.scope, scopeId, args.source, args.description, args.intent, args.signatureJson, args.argsJsonSchema ?? null, contentHash, isScratch, typeChecked, fsMode, args.agentId ?? null, now, now, args.createdBy ?? null, args.createdBy ?? null);
171088
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
171089
+ RETURNING *`).get(id, defaultAssetKey("script", id), args.name, args.scope, scopeId, args.source, args.description, args.intent, args.signatureJson, args.argsJsonSchema ?? null, contentHash, isScratch, typeChecked, fsMode, args.agentId ?? null, now, now, args.createdBy ?? null, args.createdBy ?? null);
170997
171090
  if (!row)
170998
171091
  throw new Error("Failed to insert script");
170999
171092
  insertScriptVersion({
@@ -171033,7 +171126,8 @@ async function upsertScriptByName(args) {
171033
171126
  const argsJsonSchema2 = args.argsJsonSchema !== undefined ? args.argsJsonSchema : existing.argsJsonSchema;
171034
171127
  const trackedMetadataChanged = args.description !== existing.description || args.intent !== existing.intent || args.signatureJson !== existing.signatureJson || argsJsonSchema2 !== existing.argsJsonSchema;
171035
171128
  const promotedFromScratch = existing.isScratch && !isScratch2;
171036
- if (fsMode2 !== existing.fsMode || isScratch2 !== existing.isScratch || typeChecked2 !== existing.typeChecked || trackedMetadataChanged) {
171129
+ const refreshScratchLastUsed = existing.scope === "agent" && existing.name.startsWith("scratch-") && existing.isScratch && isScratch2;
171130
+ if (fsMode2 !== existing.fsMode || isScratch2 !== existing.isScratch || typeChecked2 !== existing.typeChecked || trackedMetadataChanged || refreshScratchLastUsed) {
171037
171131
  const row = getDb().prepare(`UPDATE scripts
171038
171132
  SET description = ?, intent = ?, signatureJson = ?, argsJsonSchema = ?,
171039
171133
  isScratch = ?, typeChecked = ?, fsMode = ?, updatedAt = ?, updated_by = ?
@@ -171142,6 +171236,15 @@ function deleteScript(args) {
171142
171236
  const result = getDb().run("DELETE FROM scripts WHERE id = ?", [existing.id]);
171143
171237
  return result.changes > 0;
171144
171238
  }
171239
+ function touchScratchScriptLastUsed(id, at = new Date().toISOString()) {
171240
+ const result = getDb().prepare(`UPDATE scripts SET updatedAt = ?
171241
+ WHERE id = ? AND scope = 'agent' AND isScratch = 1 AND name GLOB 'scratch-*'`).run(at, id);
171242
+ return result.changes > 0 ? at : null;
171243
+ }
171244
+ function restoreScratchScriptLastUsedIfUnchanged(id, priorUpdatedAt, expectedUpdatedAt) {
171245
+ return getDb().prepare(`UPDATE scripts SET updatedAt = ?
171246
+ WHERE id = ? AND scope = 'agent' AND isScratch = 1 AND name GLOB 'scratch-*' AND updatedAt = ?`).run(priorUpdatedAt, id, expectedUpdatedAt).changes > 0;
171247
+ }
171145
171248
  var SCRIPT_API_ID_LEN = 12;
171146
171249
  function rowToScriptApi(row) {
171147
171250
  return {
@@ -171266,23 +171369,39 @@ var DEFAULT_SANDBOX_LIMITS = {
171266
171369
  maxFdCount: 64
171267
171370
  };
171268
171371
  var BUN_SANDBOX_VIRTUAL_MEMORY_MB = 4096;
171372
+ var JAVASCRIPT_RUNTIME_SANDBOX_MAX_PROCS = 512;
171373
+ var JAVASCRIPT_RUNTIMES = new Set(["bun", "bunx", "node", "nodejs", "npx"]);
171374
+ var SHELL_RUNTIMES = new Set(["bash", "dash", "sh"]);
171375
+ function commandBasename(command) {
171376
+ return command.slice(command.lastIndexOf("/") + 1);
171377
+ }
171378
+ function usesInterpreterSandboxProfile(innerCommand) {
171379
+ const runtime = commandBasename(innerCommand[0] ?? "");
171380
+ return JAVASCRIPT_RUNTIMES.has(runtime) || SHELL_RUNTIMES.has(runtime);
171381
+ }
171269
171382
  function shellQuote(value) {
171270
171383
  return `'${value.replaceAll("'", "'\\''")}'`;
171271
171384
  }
171272
171385
  function buildSandboxedCommand(innerCommand, env, limits = DEFAULT_SANDBOX_LIMITS) {
171273
171386
  if (process.platform === "win32")
171274
171387
  return [...innerCommand];
171275
- const virtualMemoryMb = innerCommand[0] === "bun" ? Math.max(limits.virtualMemoryMb, BUN_SANDBOX_VIRTUAL_MEMORY_MB) : limits.virtualMemoryMb;
171388
+ const usesInterpreterProfile = usesInterpreterSandboxProfile(innerCommand);
171389
+ const virtualMemoryMb = usesInterpreterProfile ? Math.max(limits.virtualMemoryMb, BUN_SANDBOX_VIRTUAL_MEMORY_MB) : limits.virtualMemoryMb;
171390
+ const maxProcs = usesInterpreterProfile ? Math.max(limits.maxProcs, JAVASCRIPT_RUNTIME_SANDBOX_MAX_PROCS) : limits.maxProcs;
171276
171391
  const ulimits = [
171277
171392
  `ulimit -v ${Math.floor(virtualMemoryMb * 1024)} 2>/dev/null || true`,
171278
171393
  `ulimit -t ${limits.cpuTimeSec} 2>/dev/null || true`,
171279
- `ulimit -u ${limits.maxProcs} 2>/dev/null || true`,
171394
+ `ulimit -u ${maxProcs} 2>/dev/null || true`,
171280
171395
  `ulimit -f ${limits.maxFileKb} 2>/dev/null || true`,
171281
171396
  `ulimit -n ${limits.maxFdCount} 2>/dev/null || true`
171282
171397
  ].join("; ");
171283
171398
  const envAssignments = Object.entries(env).map(([key, value]) => `${key}=${shellQuote(value)}`).join(" ");
171284
171399
  const quotedInner = innerCommand.map(shellQuote).join(" ");
171285
- return ["sh", "-c", `${ulimits}; exec env -i ${envAssignments} ${quotedInner}`];
171400
+ return [
171401
+ usesInterpreterProfile ? "bash" : "sh",
171402
+ "-c",
171403
+ `${ulimits}; exec env -i ${envAssignments} ${quotedInner}`
171404
+ ];
171286
171405
  }
171287
171406
  function sandboxSpawnEnv(env) {
171288
171407
  return process.platform === "win32" ? { ...env } : { PATH: env.PATH ?? "" };
@@ -171729,4 +171848,4 @@ async function buildScriptCredentialBindings(input) {
171729
171848
  return (await buildScriptCredentialBindingsWithFailures(input)).egressSecrets;
171730
171849
  }
171731
171850
 
171732
- export { MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, listVendoredOpenapiEntries, ConnectionAuthInputSchema, connectionAuthSummary, listRelationalCredentialBindings, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, getScriptConnectionById, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, require_typescript, validateScriptImports, runScript, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildScriptCredentialBindings };
171851
+ export { MIN_SCRIPT_WALL_CLOCK_MS, SCRIPT_LONG_TIMEOUT_HINT_MS, MAX_SCRIPT_WALL_CLOCK_MS, DEFAULT_SCRIPT_RESOURCES, isInvalidClientError, assertUrlSafe, publicEndpointSsrfOptions, discoverProtectedResourceMetadata, discoverAuthorizationServerMetadata, normalizeTokenEndpointAuthMethod, resolveAdvertisedTokenEndpointAuthMethod, authMethodForStoredClient, selectDcrTokenEndpointAuthMethod, registerClient, buildAuthorizeUrl, exchangeCodeForTokens, refreshMcpToken, revokeMcpToken, computeExpiresAt, getMcpOAuthToken, findReusableMcpOAuthClient, invalidateMcpOAuthClient, upsertMcpOAuthToken, applyMcpOAuthRefresh, markMcpOAuthTokenStatus, deleteMcpOAuthToken, insertMcpOAuthPending, consumeMcpOAuthPending, gcMcpOAuthPending, setMcpServerAuthMethod, ensureMcpToken, callMcpServerTool, listVendoredOpenapiEntries, ConnectionAuthInputSchema, connectionAuthSummary, listRelationalCredentialBindings, upsertCredentialBinding, disableCredentialBinding, listScriptConnections, getScriptConnectionById, connectionAuthInputFromFlat, upsertScriptConnection, refreshScriptConnection, setScriptConnectionEnabled, getScriptApiConnectionDescriptors, getScriptMcpConnectionDescriptors, getScriptApiTypes, getScriptMcpTypes, upsertScriptByName, getScript, getScriptById, getScriptVersion, listScripts, listScriptVersions, deleteScript, touchScratchScriptLastUsed, restoreScratchScriptLastUsedIfUnchanged, createScriptApi, listScriptApisForScript, getScriptApiById, getScriptApiSecret, updateScriptApi, rotateScriptApiSecret, deleteScriptApi, recordScriptApiUsage, buildSandboxedCommand, sandboxSpawnEnv, createCappedStreamState, snapshotCapped, readStreamCapped, require_typescript, validateScriptImports, runScript, oauthAppToProviderConfig, getOAuthProviderConfig, getOAuthBindingTokenStatus, buildScriptCredentialBindingsWithFailures, buildScriptCredentialBindings };
@@ -3,11 +3,11 @@ import {
3
3
  getAgentWorkingOnThread,
4
4
  getAllAgents,
5
5
  init_db
6
- } from "./cli-s18zzkfp.js";
6
+ } from "./cli-50vbt00w.js";
7
7
  import {
8
8
  init_env_flag,
9
9
  isEnvFlagEnabled
10
- } from "./cli-4n4mdv21.js";
10
+ } from "./cli-xpxde7rm.js";
11
11
 
12
12
  // src/slack/router.ts
13
13
  init_db();
@@ -38,22 +38,27 @@ function extractBody(error) {
38
38
  function pickBodyText(error) {
39
39
  if (typeof error.body === "string")
40
40
  return error.body;
41
- if (isNonEmptyObject(error.error))
41
+ if (isPlainNonEmptyObject(error.error))
42
42
  return safeJsonStringify(error.error);
43
43
  const responseBody = error.$response?.body;
44
44
  if (typeof responseBody === "string")
45
45
  return responseBody;
46
46
  if (isReadableStreamLike(responseBody))
47
47
  return;
48
- if (isNonEmptyObject(responseBody))
48
+ if (isPlainNonEmptyObject(responseBody))
49
49
  return safeJsonStringify(responseBody);
50
50
  return;
51
51
  }
52
52
  function isReadableStreamLike(value) {
53
53
  return typeof value === "object" && value !== null && "pipe" in value && typeof value.pipe === "function";
54
54
  }
55
- function isNonEmptyObject(value) {
56
- return typeof value === "object" && value !== null && Object.keys(value).length > 0;
55
+ function isPlainNonEmptyObject(value) {
56
+ if (typeof value !== "object" || value === null)
57
+ return false;
58
+ const proto = Object.getPrototypeOf(value);
59
+ if (proto !== Object.prototype && proto !== null)
60
+ return false;
61
+ return Object.keys(value).length > 0;
57
62
  }
58
63
  function formatProviderError(norm, prefix) {
59
64
  if (norm.messageCarriesBody || norm.status === undefined || norm.body === undefined) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  renderSteeringDelivery
3
- } from "./cli-xg2eezyv.js";
3
+ } from "./cli-f1am9szv.js";
4
4
  import {
5
5
  checkCodexCredentials
6
- } from "./cli-h3e66g5b.js";
6
+ } from "./cli-793jvbsh.js";
7
7
  import {
8
8
  checkClaudeManagedCredentials
9
- } from "./cli-qmdnhpej.js";
9
+ } from "./cli-wz9115x0.js";
10
10
  import {
11
11
  checkDevinCredentials
12
12
  } from "./cli-9b13ggd1.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./cli-n6h8qt8n.js";
16
16
  import {
17
17
  checkClaudeCredentials
18
- } from "./cli-e5p3es48.js";
18
+ } from "./cli-kd1ck4rx.js";
19
19
  import {
20
20
  MAX_RATE_LIMIT_RESET_MS,
21
21
  isCodexCreditsExhaustedMessage,
@@ -35,7 +35,7 @@ import {
35
35
  withSpan,
36
36
  withSpanContext,
37
37
  writeSkillsToFilesystem
38
- } from "./cli-haanc4qd.js";
38
+ } from "./cli-jevgrb4w.js";
39
39
  import {
40
40
  authJsonToCredentialSelection,
41
41
  credentialsToAuthJson,
@@ -44,10 +44,10 @@ import {
44
44
  import {
45
45
  ensure,
46
46
  initialize
47
- } from "./cli-dakxgk70.js";
47
+ } from "./cli-ycrnynpw.js";
48
48
  import {
49
49
  validateJsonSchema
50
- } from "./cli-xdrmxvd4.js";
50
+ } from "./cli-jbcva0xj.js";
51
51
  import {
52
52
  getOpenRouterBaseUrl
53
53
  } from "./cli-3dpj7atn.js";
@@ -78,7 +78,7 @@ import {
78
78
  init_types,
79
79
  resolveTaskModelSelection,
80
80
  telemetry
81
- } from "./cli-s18zzkfp.js";
81
+ } from "./cli-50vbt00w.js";
82
82
  import {
83
83
  configureHttpResolver,
84
84
  init_resolver,
@@ -88,7 +88,7 @@ import {
88
88
  interpolate,
89
89
  isSteeringEnabled,
90
90
  resolveTemplateAsync
91
- } from "./cli-4n4mdv21.js";
91
+ } from "./cli-xpxde7rm.js";
92
92
  import {
93
93
  getMcpBaseUrl,
94
94
  init_constants
@@ -495,19 +495,19 @@ async function materializeCodexAuthJson(_slot, creds, deps = {}) {
495
495
  async function createProviderAdapter(provider) {
496
496
  switch (provider) {
497
497
  case "claude": {
498
- const { ClaudeAdapter } = await import("./claude-adapter-qr0k17km.js");
498
+ const { ClaudeAdapter } = await import("./claude-adapter-q6x7yspx.js");
499
499
  return new ClaudeAdapter;
500
500
  }
501
501
  case "pi": {
502
- const { PiMonoAdapter } = await import("./pi-mono-adapter-bpfrn6d7.js");
502
+ const { PiMonoAdapter } = await import("./pi-mono-adapter-4g5kby31.js");
503
503
  return new PiMonoAdapter;
504
504
  }
505
505
  case "codex": {
506
- const { CodexAdapter } = await import("./codex-adapter-6pc50x9q.js");
506
+ const { CodexAdapter } = await import("./codex-adapter-htjkn22b.js");
507
507
  return new CodexAdapter;
508
508
  }
509
509
  case "claude-managed": {
510
- const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-gv19tdew.js");
510
+ const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-wsg37bt8.js");
511
511
  return new ClaudeManagedAdapter;
512
512
  }
513
513
  case "devin": {
@@ -1201,7 +1201,7 @@ async function checkProviderCredentials(provider, env, opts) {
1201
1201
  case "opencode":
1202
1202
  return checkOpencodeCredentials(env, opts);
1203
1203
  case "pi": {
1204
- const { checkPiMonoCredentials } = await import("./pi-mono-adapter-bpfrn6d7.js");
1204
+ const { checkPiMonoCredentials } = await import("./pi-mono-adapter-4g5kby31.js");
1205
1205
  return checkPiMonoCredentials(env, opts);
1206
1206
  }
1207
1207
  default:
@@ -13,7 +13,7 @@ import {
13
13
  } from "./cli-psrqtw2m.js";
14
14
  import {
15
15
  summarizeSession
16
- } from "./cli-s21zzx4b.js";
16
+ } from "./cli-w2wxd56v.js";
17
17
  import {
18
18
  CTX_MODE_NUDGE_EVERY
19
19
  } from "./cli-zm7njwzd.js";
@@ -4,12 +4,12 @@ import {
4
4
  linkIdentity,
5
5
  recordUnmappedIdentity,
6
6
  resolveIdentity
7
- } from "./cli-m8fs5ttq.js";
7
+ } from "./cli-aca5pz9f.js";
8
8
  import {
9
9
  getKv,
10
10
  init_db,
11
11
  upsertKv
12
- } from "./cli-s18zzkfp.js";
12
+ } from "./cli-50vbt00w.js";
13
13
 
14
14
  // src/slack/enrich.ts
15
15
  init_db();