@desplega.ai/agent-swarm 1.152.2 → 1.153.0

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 (224) hide show
  1. package/README.md +1 -1
  2. package/dist/{acp-adapter-pfeje2v5.js → acp-adapter-ahmjxhek.js} +4 -4
  3. package/dist/{actions-0sttc7f5.js → actions-jzrfpkmn.js} +30 -26
  4. package/dist/{anthropic-messages-2y8nktar.js → anthropic-messages-9vqsbznt.js} +112 -84
  5. package/dist/{app-p8teva95.js → app-03na2vwb.js} +9 -6
  6. package/dist/{assistant-r45jnsrt.js → assistant-hfkxvhgt.js} +31 -27
  7. package/dist/{azure-openai-responses-f38x2avq.js → azure-openai-responses-04qwdwfq.js} +27 -13
  8. package/dist/{boot-reembed-je26h5y7.js → boot-reembed-c98xrad3.js} +8 -6
  9. package/dist/{boot-reembed-1qmybsd4.js → boot-reembed-zt3qm9xn.js} +9 -7
  10. package/dist/{boot-scrub-logs-gte3h1mm.js → boot-scrub-logs-jcqd8ksj.js} +6 -4
  11. package/dist/{claude-adapter-csc1mzka.js → claude-adapter-mgryg8g3.js} +17 -15
  12. package/dist/{claude-managed-adapter-dsmkcrjy.js → claude-managed-adapter-ea2aga6w.js} +3 -3
  13. package/dist/{claude-sdk-session-fcd6f078.js → claude-sdk-session-jjf4zss1.js} +17 -15
  14. package/dist/{cli-r2fpe7cx.js → cli-00w2c66p.js} +61 -55
  15. package/dist/{cli-fm4ytsdk.js → cli-0d9nbqxf.js} +1 -1
  16. package/dist/cli-0x5qzvkg.js +4279 -0
  17. package/dist/{cli-d3p82erb.js → cli-18amys3y.js} +9 -9
  18. package/dist/{cli-wbyk465z.js → cli-1hwnb4hc.js} +1 -1
  19. package/dist/{cli-xw7vak96.js → cli-3bcmp015.js} +5 -5
  20. package/dist/cli-3er6gcsn.js +1849 -0
  21. package/dist/{cli-c4eeb5q2.js → cli-5b6b62tz.js} +1 -1
  22. package/dist/{cli-4ahpr4sw.js → cli-5mbmvxnn.js} +5 -5
  23. package/dist/{cli-xy1cchaf.js → cli-5taqtpze.js} +235 -8
  24. package/dist/{cli-fmy65jdn.js → cli-6ks9xf1n.js} +7 -5
  25. package/dist/cli-7g9s78jf.js +2827 -0
  26. package/dist/{cli-jew3jda5.js → cli-7pnz2v6s.js} +2 -2
  27. package/dist/{cli-r84ctdxn.js → cli-83wkg402.js} +2 -2
  28. package/dist/{cli-jvy9qgjs.js → cli-a9scg8sv.js} +4 -4
  29. package/dist/{cli-4yc5d8fk.js → cli-avkd6mqv.js} +50 -0
  30. package/dist/{cli-ht5rs63n.js → cli-b2g6mzjc.js} +15 -6
  31. package/dist/{cli-jbmc0r7r.js → cli-bw0dfwkr.js} +1 -1
  32. package/dist/{cli-8wrympd7.js → cli-bzr0ftht.js} +26 -7
  33. package/dist/{cli-wpv5rgg2.js → cli-cdq08v3r.js} +2 -2
  34. package/dist/cli-cgj4hc12.js +18902 -0
  35. package/dist/cli-d6hk10xx.js +14075 -0
  36. package/dist/{cli-zvgj5zg8.js → cli-djvxhnc4.js} +31 -3324
  37. package/dist/{cli-s25avqg9.js → cli-e781c6f9.js} +1 -0
  38. package/dist/{cli-3bpzj8me.js → cli-eazstkad.js} +2 -2
  39. package/dist/{cli-s2qjdd6z.js → cli-eetrvv91.js} +1 -1
  40. package/dist/cli-h38x0qhg.js +6912 -0
  41. package/dist/{cli-9xvdm3bx.js → cli-h60qfasa.js} +742 -278
  42. package/dist/{pi-mono-adapter-jcqt71cg.js → cli-ja7mrygn.js} +67343 -101083
  43. package/dist/{cli-j8dggbcr.js → cli-k0g1sjzm.js} +23 -31
  44. package/dist/{cli-gphgnvpf.js → cli-m04pt18h.js} +2 -2
  45. package/dist/{cli-rgvp6r2x.js → cli-mcnhgnn1.js} +193 -4
  46. package/dist/{cli-j4nv2wqy.js → cli-mzgyhxbe.js} +10 -4
  47. package/dist/{cli-qn042eh7.js → cli-n0q9b7j4.js} +46 -1870
  48. package/dist/cli-n7h1kqpf.js +29 -0
  49. package/dist/{cli-ckz5t2hb.js → cli-nq0kgyxe.js} +5 -5
  50. package/dist/{cli-z3wkng35.js → cli-qrqhc31j.js} +151 -125
  51. package/dist/{cli-56h18ng2.js → cli-r8tdds6s.js} +1 -1
  52. package/dist/{cli-ch38q5z4.js → cli-rj7de4b2.js} +6788 -2541
  53. package/dist/{cli-qd65dvr6.js → cli-s5s1f2yn.js} +56 -40
  54. package/dist/{cli-kj76p1ez.js → cli-scwq51gn.js} +13 -7
  55. package/dist/{cli-2nnd56zt.js → cli-tdh4hjr2.js} +3 -2
  56. package/dist/{cli-c2mk1kgf.js → cli-v4en75c5.js} +8 -1
  57. package/dist/{cli-b9dd0h3k.js → cli-vw03hg5t.js} +3 -2
  58. package/dist/{cli-zvkq5csn.js → cli-ybpp1srm.js} +6 -6
  59. package/dist/cli-yn0a417a.js +4069 -0
  60. package/dist/{cli-gpqcs935.js → cli-ysc1kbet.js} +2 -2
  61. package/dist/{cli-zfzznn7c.js → cli-ytxs7mn1.js} +26 -2
  62. package/dist/cli-zcsyfw2z.js +3335 -0
  63. package/dist/{cli-4j8k1m4w.js → cli-zt1227k1.js} +1162 -192
  64. package/dist/cli-zy5w9gpt.js +230 -0
  65. package/dist/cli.js +26 -34
  66. package/dist/{codex-adapter-fxmpsabw.js → codex-adapter-8548daap.js} +12 -11
  67. package/dist/{codex-session-runner-rr1e47ea.js → codex-session-runner-2dad8p4x.js} +12 -11
  68. package/dist/{commands-0f5rxz51.js → commands-355dbpa8.js} +6 -4
  69. package/dist/{db-r3jxf3wy.js → db-4jjvwz1s.js} +6 -4
  70. package/dist/{dispatcher-06vph6q4.js → dispatcher-ca590nkz.js} +29 -25
  71. package/dist/dsh-adapter-rgvj6ykp.js +19 -0
  72. package/dist/{e2b-413b8t4v.js → e2b-93x1k0j5.js} +6 -7
  73. package/dist/{google-generative-ai-ndjmj5fa.js → google-generative-ai-xtw7tggr.js} +33 -73
  74. package/dist/{google-vertex-fr665tqs.js → google-vertex-zdqpms6n.js} +38 -68
  75. package/dist/{handlers-0hgtc910.js → handlers-2y6dqpvf.js} +32 -28
  76. package/dist/{hook-9kvrv1er.js → hook-0s8knepr.js} +11 -9
  77. package/dist/{hook-fbfhkat3.js → hook-k0gec254.js} +12 -10
  78. package/dist/{http-xbyx8k5j.js → http-jp2nb4zw.js} +300 -237
  79. package/dist/{index-tfsdxyv6.js → index-0wzg3sp3.js} +39 -24
  80. package/dist/{index-rnyahfn5.js → index-3mq6ce93.js} +29 -25
  81. package/dist/{index-jsw3aynb.js → index-42s7eezq.js} +29 -25
  82. package/dist/{cli-pdz9qde4.js → index-9ch1n761.js} +10 -11
  83. package/dist/{index-gpfn1741.js → index-b56xkbc7.js} +8 -6
  84. package/dist/{index-66xz5e9j.js → index-h5gs261z.js} +521 -9
  85. package/dist/{index-2sp0384z.js → index-kkeftv5h.js} +738 -21
  86. package/dist/{index-sgk50mbg.js → index-s37dbevy.js} +30 -26
  87. package/dist/index-w097eg0x.js +5 -0
  88. package/dist/jiti-loader-b4837mtm.js +34 -0
  89. package/dist/jiti-static-loader-q2g5ds0y.js +31267 -0
  90. package/dist/{keepalive-s3xpr7sw.js → keepalive-9pfw7t02.js} +8 -6
  91. package/dist/{lead-rq4n5r16.js → lead-7vcmcdq4.js} +44 -39
  92. package/dist/{maintenance-f0atj1ab.js → maintenance-x277jbpd.js} +9 -7
  93. package/dist/{mistral-conversations-qhr84ph3.js → mistral-conversations-zx0kn554.js} +24 -18
  94. package/dist/{node-x1g4v0pq.js → node-5qtycf6a.js} +16 -11
  95. package/dist/{oauth-refresh-sweep-q0t3bxre.js → oauth-refresh-sweep-5fwa7th2.js} +7 -5
  96. package/dist/{onboard-br5j1kch.js → onboard-17sv0f51.js} +103 -35
  97. package/dist/{openai-codex-responses-wy6a43wd.js → openai-codex-responses-4vjqzvjp.js} +33 -27
  98. package/dist/{openai-completions-32rdwmze.js → openai-completions-pxsmym7g.js} +52 -64
  99. package/dist/{openai-responses-6xwf7bzg.js → openai-responses-tmn0rqp0.js} +23 -24
  100. package/dist/{opencode-adapter-28axqa09.js → opencode-adapter-qbmv4tpy.js} +6 -6
  101. package/dist/{otel-impl-vdqge2nt.js → otel-impl-srjy4be4.js} +4 -4
  102. package/dist/{pi-messages-b1mbr6gp.js → pi-messages-txpjj39q.js} +3 -3
  103. package/dist/pi-mono-adapter-946a0sdd.js +1316 -0
  104. package/dist/{pricing-refresh-hb3691fd.js → pricing-refresh-vetcm563.js} +8 -6
  105. package/dist/{rbac-roles-jh280k9g.js → rbac-roles-cfzgr6r1.js} +8 -6
  106. package/dist/{rbac-roles-t78xt39b.js → rbac-roles-cmxaddmy.js} +7 -5
  107. package/dist/{render-v2-7p8r2ymg.js → render-v2-f9hzff72.js} +9 -6
  108. package/dist/{seed-pricing-hf889enh.js → seed-pricing-jggk6rsy.js} +7 -5
  109. package/dist/{setup-w6mb03jv.js → setup-8mfceb9t.js} +4 -5
  110. package/dist/virtual-modules-ax661xp0.js +54 -0
  111. package/dist/{work-objects-nt8gy1kj.js → work-objects-vdsdcczj.js} +32 -28
  112. package/dist/{worker-dwy617t0.js → worker-cd0nhyv1.js} +44 -39
  113. package/openapi.json +36 -14
  114. package/package.json +6 -6
  115. package/src/be/automation-preflight.ts +6 -4
  116. package/src/be/extensions/db.ts +35 -4
  117. package/src/be/models-catalog.ts +2 -0
  118. package/src/be/modelsdev-cache.json +213 -0
  119. package/src/be/rbac-audit.ts +2 -0
  120. package/src/be/seed-pricing.ts +3 -1
  121. package/src/be/swarm-config-guard.ts +1 -0
  122. package/src/commands/onboard/compose-generator.ts +6 -1
  123. package/src/commands/onboard/env-generator.ts +6 -1
  124. package/src/commands/onboard/manifest.ts +1 -0
  125. package/src/commands/onboard/steps/integration-slack.tsx +56 -16
  126. package/src/commands/onboard/steps/review.tsx +5 -0
  127. package/src/commands/onboard/types.ts +6 -0
  128. package/src/commands/onboard.tsx +5 -1
  129. package/src/commands/provider-credentials.ts +14 -2
  130. package/src/extensions/lifecycle.ts +15 -21
  131. package/src/http/agents.ts +2 -2
  132. package/src/http/config.ts +1 -1
  133. package/src/http/core.ts +5 -3
  134. package/src/http/extensions.ts +108 -34
  135. package/src/http/status.ts +22 -10
  136. package/src/prompts/base-prompt.ts +15 -7
  137. package/src/providers/claude-managed-models.ts +8 -0
  138. package/src/providers/codex-models.ts +15 -1
  139. package/src/providers/dsh-adapter.ts +248 -0
  140. package/src/providers/index.ts +5 -1
  141. package/src/providers/modelsdev-reasoning.json +50 -0
  142. package/src/rbac/legacy-policy.ts +15 -1
  143. package/src/rbac/types.ts +2 -0
  144. package/src/server.ts +7 -1
  145. package/src/slack/app.ts +32 -10
  146. package/src/slack/config.ts +29 -0
  147. package/src/telemetry.ts +2 -3
  148. package/src/tests/agents-harness-provider.test.ts +19 -0
  149. package/src/tests/agents-list-model-display.test.ts +60 -1
  150. package/src/tests/base-prompt.test.ts +25 -0
  151. package/src/tests/claude-managed-adapter.test.ts +6 -0
  152. package/src/tests/codex-gpt6-release.test.ts +97 -0
  153. package/src/tests/config-api-only-keys.test.ts +9 -0
  154. package/src/tests/context-window.test.ts +1 -0
  155. package/src/tests/dsh-adapter.test.ts +276 -0
  156. package/src/tests/e2e-nightly-report.test.ts +3 -3
  157. package/src/tests/e2e-redact.test.ts +2 -0
  158. package/src/tests/env-flag.test.ts +6 -0
  159. package/src/tests/extensions-db.test.ts +41 -0
  160. package/src/tests/extensions-http.test.ts +148 -4
  161. package/src/tests/extensions-lifecycle.test.ts +18 -0
  162. package/src/tests/extensions-mcp-tools.test.ts +9 -5
  163. package/src/tests/internal-ai/complete-structured.test.ts +32 -9
  164. package/src/tests/internal-ai/credentials.test.ts +4 -4
  165. package/src/tests/internal-ai/models.test.ts +20 -0
  166. package/src/tests/migration-046-budgets.test.ts +2 -0
  167. package/src/tests/model-control.test.ts +2 -2
  168. package/src/tests/onboard-compose.test.ts +14 -0
  169. package/src/tests/onboard-env.test.ts +17 -0
  170. package/src/tests/onboard-manifest.test.ts +12 -0
  171. package/src/tests/opus-5-5-registry.test.ts +48 -0
  172. package/src/tests/pricing-refresh.test.ts +1 -1
  173. package/src/tests/pricing-routes.test.ts +15 -3
  174. package/src/tests/provider-registration.test.ts +5 -2
  175. package/src/tests/rbac-admission-e2e.test.ts +54 -0
  176. package/src/tests/rbac-e2e-helpers.ts +2 -0
  177. package/src/tests/rbac-engine.test.ts +32 -0
  178. package/src/tests/rbac-wire-e2e.test.ts +33 -0
  179. package/src/tests/reasoning-effort.test.ts +8 -0
  180. package/src/tests/reload-config.test.ts +33 -0
  181. package/src/tests/session-costs-model-key-normalize.test.ts +1 -0
  182. package/src/tests/slack-config.test.ts +136 -0
  183. package/src/tests/slack-mode-lifecycle.test.ts +69 -0
  184. package/src/tests/status.test.ts +22 -2
  185. package/src/tests/task-tool-preload-mcp.test.ts +3 -1
  186. package/src/tests/telemetry-init.test.ts +18 -0
  187. package/src/tests/workflow-llm.test.ts +3 -3
  188. package/src/tools/extension-common.ts +4 -0
  189. package/src/tools/extension-install.ts +1 -1
  190. package/src/tools/extension-list.ts +4 -3
  191. package/src/types.ts +17 -8
  192. package/src/utils/context-window.ts +1 -0
  193. package/src/utils/credentials.ts +8 -0
  194. package/src/utils/internal-ai/complete-structured.ts +8 -0
  195. package/src/utils/internal-ai/models.ts +5 -5
  196. package/templates/schedules/daily-status-report/content.md +25 -12
  197. package/templates/schedules/daily-workflow-health-audit/content.md +1 -1
  198. package/templates/skills/swarm-extensions/content.md +9 -5
  199. package/dist/cli-4wppfkcm.js +0 -16384
  200. package/dist/cli-55qrx3q8.js +0 -6041
  201. package/dist/cli-cg4vnyh4.js +0 -305
  202. package/dist/cli-jyetr64j.js +0 -52
  203. package/dist/cli-pp9ax9pa.js +0 -520
  204. package/dist/cli-qa66qaf0.js +0 -6076
  205. package/dist/cli-qghpvca2.js +0 -590
  206. package/dist/cli-rembwgt8.js +0 -861
  207. package/dist/cli-tcvj7j2r.js +0 -1971
  208. package/dist/cli-vfcth11k.js +0 -36
  209. package/dist/cli-w1d1bgkk.js +0 -1422
  210. package/dist/cli-y6x0gqtg.js +0 -5977
  211. package/dist/es5-tj3tn4jj.js +0 -844
  212. package/dist/index-1kq5hw2p.js +0 -467
  213. package/dist/index-1p8wdstt.js +0 -7
  214. package/dist/index-8fdjzb2f.js +0 -100
  215. package/dist/index-bxmwzbgw.js +0 -365
  216. package/dist/index-nzerxd5z.js +0 -7
  217. package/dist/index-pyymnzat.js +0 -1168
  218. package/dist/index-qv6atbab.js +0 -619
  219. package/dist/index-rja32qa7.js +0 -801
  220. package/dist/index-tzg5srfp.js +0 -211
  221. package/dist/index-vhncw983.js +0 -90
  222. package/dist/index-xk036zsk.js +0 -859
  223. package/dist/index-zyazbzcb.js +0 -6
  224. package/dist/{claude-managed-setup-48dwg9bv.js → claude-managed-setup-f5pmsyrp.js} +3 -3
@@ -1,211 +0,0 @@
1
- import {
2
- require_tslib
3
- } from "./cli-qghpvca2.js";
4
- import {
5
- require_dist_cjs
6
- } from "./cli-rembwgt8.js";
7
- import {
8
- require_client
9
- } from "./cli-tcvj7j2r.js";
10
- import {
11
- require_config,
12
- require_protocols,
13
- require_serde
14
- } from "./cli-qa66qaf0.js";
15
- import {
16
- __commonJS,
17
- __esm,
18
- __require
19
- } from "./cli-bc05qbss.js";
20
-
21
- // node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js
22
- var require_checkUrl = __commonJS(function(exports) {
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.checkUrl = undefined;
25
- var config_1 = require_config();
26
- var ECS_CONTAINER_HOST = "169.254.170.2";
27
- var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
28
- var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
29
- var checkUrl = (url, logger) => {
30
- if (url.protocol === "https:") {
31
- return;
32
- }
33
- if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
34
- return;
35
- }
36
- if (url.hostname.includes("[")) {
37
- if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
38
- return;
39
- }
40
- } else {
41
- if (url.hostname === "localhost") {
42
- return;
43
- }
44
- const ipComponents = url.hostname.split(".");
45
- const inRange = (component) => {
46
- const num = parseInt(component, 10);
47
- return 0 <= num && num <= 255;
48
- };
49
- if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
50
- return;
51
- }
52
- }
53
- throw new config_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
54
- - loopback CIDR 127.0.0.0/8 or [::1/128]
55
- - ECS container host 169.254.170.2
56
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
57
- };
58
- exports.checkUrl = checkUrl;
59
- });
60
-
61
- // node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js
62
- var require_requestHelpers = __commonJS(function(exports) {
63
- Object.defineProperty(exports, "__esModule", { value: true });
64
- exports.createGetRequest = createGetRequest;
65
- exports.getCredentials = getCredentials;
66
- var config_1 = require_config();
67
- var protocols_1 = require_protocols();
68
- var serde_1 = require_serde();
69
- var serde_2 = require_serde();
70
- function createGetRequest(url) {
71
- return new protocols_1.HttpRequest({
72
- protocol: url.protocol,
73
- hostname: url.hostname,
74
- port: Number(url.port),
75
- path: url.pathname,
76
- query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
77
- acc[k] = v;
78
- return acc;
79
- }, {}),
80
- fragment: url.hash
81
- });
82
- }
83
- async function getCredentials(response, logger) {
84
- const stream = (0, serde_2.sdkStreamMixin)(response.body);
85
- const str = await stream.transformToString();
86
- if (response.statusCode === 200) {
87
- const parsed = JSON.parse(str);
88
- if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
89
- throw new config_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
90
- }
91
- return {
92
- accessKeyId: parsed.AccessKeyId,
93
- secretAccessKey: parsed.SecretAccessKey,
94
- sessionToken: parsed.Token,
95
- expiration: (0, serde_1.parseRfc3339DateTime)(parsed.Expiration)
96
- };
97
- }
98
- if (response.statusCode >= 400 && response.statusCode < 500) {
99
- let parsedBody = {};
100
- try {
101
- parsedBody = JSON.parse(str);
102
- } catch (e) {}
103
- throw Object.assign(new config_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
104
- Code: parsedBody.Code,
105
- Message: parsedBody.Message
106
- });
107
- }
108
- throw new config_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
109
- }
110
- });
111
-
112
- // node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js
113
- var require_retry_wrapper = __commonJS(function(exports) {
114
- Object.defineProperty(exports, "__esModule", { value: true });
115
- exports.retryWrapper = undefined;
116
- var retryWrapper = (toRetry, maxRetries, delayMs) => {
117
- return async () => {
118
- for (let i = 0;i < maxRetries; ++i) {
119
- try {
120
- return await toRetry();
121
- } catch (e) {
122
- await new Promise((resolve) => setTimeout(resolve, delayMs));
123
- }
124
- }
125
- return await toRetry();
126
- };
127
- };
128
- exports.retryWrapper = retryWrapper;
129
- });
130
-
131
- // node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js
132
- var require_fromHttp = __commonJS(function(exports) {
133
- Object.defineProperty(exports, "__esModule", { value: true });
134
- exports.fromHttp = undefined;
135
- var tslib_1 = require_tslib();
136
- var client_1 = require_client();
137
- var config_1 = require_config();
138
- var node_http_handler_1 = require_dist_cjs();
139
- var promises_1 = tslib_1.__importDefault(__require("node:fs/promises"));
140
- var checkUrl_1 = require_checkUrl();
141
- var requestHelpers_1 = require_requestHelpers();
142
- var retry_wrapper_1 = require_retry_wrapper();
143
- var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
144
- var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
145
- var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
146
- var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
147
- var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
148
- var fromHttp = (options = {}) => {
149
- options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
150
- let host;
151
- const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
152
- const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
153
- const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
154
- const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
155
- const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
156
- if (relative && full) {
157
- warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
158
- warn("awsContainerCredentialsFullUri will take precedence.");
159
- }
160
- if (token && tokenFile) {
161
- warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
162
- warn("awsContainerAuthorizationToken will take precedence.");
163
- }
164
- if (full) {
165
- host = full;
166
- } else if (relative) {
167
- host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
168
- } else {
169
- throw new config_1.CredentialsProviderError(`No HTTP credential provider host provided.
170
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
171
- }
172
- const url = new URL(host);
173
- (0, checkUrl_1.checkUrl)(url, options.logger);
174
- const requestHandler = node_http_handler_1.NodeHttpHandler.create({
175
- requestTimeout: options.timeout ?? 1000,
176
- connectionTimeout: options.timeout ?? 1000
177
- });
178
- return (0, retry_wrapper_1.retryWrapper)(async () => {
179
- const request = (0, requestHelpers_1.createGetRequest)(url);
180
- if (token) {
181
- request.headers.Authorization = token;
182
- } else if (tokenFile) {
183
- request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();
184
- }
185
- try {
186
- const result = await requestHandler.handle(request);
187
- return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z"));
188
- } catch (e) {
189
- throw new config_1.CredentialsProviderError(String(e), { logger: options.logger });
190
- }
191
- }, options.maxRetries ?? 3, options.timeout ?? 1000);
192
- };
193
- exports.fromHttp = fromHttp;
194
- });
195
-
196
- // node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js
197
- var fromHttp, $fromHttp;
198
- var init_dist_cjs = __esm(() => {
199
- fromHttp = require_fromHttp();
200
- $fromHttp = fromHttp.fromHttp;
201
- });
202
- init_dist_cjs();
203
-
204
- export {
205
- $fromHttp as fromHttp
206
- };
207
- export default {
208
- get fromHttp() {
209
- return $fromHttp;
210
- }
211
- };
@@ -1,90 +0,0 @@
1
- import {
2
- require_client
3
- } from "./cli-tcvj7j2r.js";
4
- import {
5
- require_config
6
- } from "./cli-qa66qaf0.js";
7
- import {
8
- __esm,
9
- __require
10
- } from "./cli-bc05qbss.js";
11
-
12
- // node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
13
- var config, node_child_process, node_util, client, getValidatedProcessCredentials = (profileName, data, profiles) => {
14
- if (data.Version !== 1) {
15
- throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
16
- }
17
- if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {
18
- throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
19
- }
20
- if (data.Expiration) {
21
- const currentTime = new Date;
22
- const expireTime = new Date(data.Expiration);
23
- if (expireTime < currentTime) {
24
- throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
25
- }
26
- }
27
- let accountId = data.AccountId;
28
- if (!accountId && profiles?.[profileName]?.aws_account_id) {
29
- accountId = profiles[profileName].aws_account_id;
30
- }
31
- const credentials = {
32
- accessKeyId: data.AccessKeyId,
33
- secretAccessKey: data.SecretAccessKey,
34
- ...data.SessionToken && { sessionToken: data.SessionToken },
35
- ...data.Expiration && { expiration: new Date(data.Expiration) },
36
- ...data.CredentialScope && { credentialScope: data.CredentialScope },
37
- ...accountId && { accountId }
38
- };
39
- client.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
40
- return credentials;
41
- }, resolveProcessCredentials = async (profileName, profiles, logger) => {
42
- const profile = profiles[profileName];
43
- if (profiles[profileName]) {
44
- const credentialProcess = profile["credential_process"];
45
- if (credentialProcess !== undefined) {
46
- const execPromise = node_util.promisify(config.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
47
- try {
48
- const { stdout } = await execPromise(credentialProcess);
49
- let data;
50
- try {
51
- data = JSON.parse(stdout.trim());
52
- } catch {
53
- throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
54
- }
55
- return getValidatedProcessCredentials(profileName, data, profiles);
56
- } catch (error) {
57
- throw new config.CredentialsProviderError(error.message, { logger });
58
- }
59
- } else {
60
- throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
61
- }
62
- } else {
63
- throw new config.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
64
- logger
65
- });
66
- }
67
- }, fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
68
- init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
69
- const profiles = await config.parseKnownFiles(init);
70
- return resolveProcessCredentials(config.getProfileName({
71
- profile: init.profile ?? callerClientConfig?.profile
72
- }), profiles, init.logger);
73
- }, $fromProcess;
74
- var init_dist_cjs = __esm(() => {
75
- config = require_config();
76
- node_child_process = __require("node:child_process");
77
- node_util = __require("node:util");
78
- client = require_client();
79
- $fromProcess = fromProcess;
80
- });
81
- init_dist_cjs();
82
-
83
- export {
84
- $fromProcess as fromProcess
85
- };
86
- export default {
87
- get fromProcess() {
88
- return $fromProcess;
89
- }
90
- };