replicas-cli 0.2.121 → 0.2.123

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 (27) hide show
  1. package/dist/{chunk-NH63C5BC.mjs → chunk-4KZFIKR3.mjs} +1077 -1230
  2. package/dist/{chunk-HDHAEUVR.mjs → chunk-6E4PAXC5.mjs} +1 -1
  3. package/dist/{chunk-OMR2FLSI.mjs → chunk-AEKGTTWT.mjs} +2 -2
  4. package/dist/{chunk-R7VCWGZ2.mjs → chunk-CEE3Y7RM.mjs} +1 -1
  5. package/dist/{chunk-CPVJVKSG.mjs → chunk-F3ZHQCAZ.mjs} +195 -181
  6. package/dist/{chunk-H7SOGPWV.mjs → chunk-H57WOA7R.mjs} +309 -22
  7. package/dist/{chunk-43COQWMG.mjs → chunk-HMKFI7SL.mjs} +19 -19
  8. package/dist/{chunk-G3M3ZN6T.mjs → chunk-K7B6G3FP.mjs} +6 -6
  9. package/dist/{chunk-EHHAQWN3.mjs → chunk-KHHYAMUK.mjs} +12 -12
  10. package/dist/{chunk-ENRF2K6M.mjs → chunk-W27BU2E4.mjs} +72 -355
  11. package/dist/{chunk-PNVVO6MW.mjs → chunk-YZ62XZX5.mjs} +2 -2
  12. package/dist/{dist-es-XKOZULQT.mjs → dist-es-76ZS5ZGX.mjs} +19 -19
  13. package/dist/{dist-es-HC7MGS4M.mjs → dist-es-DRC4RUDF.mjs} +18 -18
  14. package/dist/{dist-es-VFOQQKFA.mjs → dist-es-FTV27CJE.mjs} +3 -3
  15. package/dist/{dist-es-WSBAYZQI.mjs → dist-es-MVWFIO2N.mjs} +7 -7
  16. package/dist/{dist-es-DZIRR447.mjs → dist-es-PGBT2GSM.mjs} +27 -27
  17. package/dist/{dist-es-URIWYPPF.mjs → dist-es-TKQAVPOM.mjs} +12 -14
  18. package/dist/{dist-es-I6P57CZS.mjs → dist-es-X7XEFTLU.mjs} +7 -7
  19. package/dist/index.mjs +114 -14
  20. package/dist/{interactive-P7CS3HLU.mjs → interactive-TRUNJWJL.mjs} +1 -1
  21. package/dist/{loadSso-WA3733QO.mjs → loadSso-PADWQIUG.mjs} +109 -148
  22. package/dist/{signin-QNS25VI4.mjs → signin-4DZRTUJH.mjs} +123 -177
  23. package/dist/{sso-oidc-KJ5X6WUQ.mjs → sso-oidc-VICR4TNH.mjs} +111 -150
  24. package/dist/{sts-7OF5CJSW.mjs → sts-WJPOT3CH.mjs} +2853 -660
  25. package/package.json +1 -1
  26. package/dist/chunk-GXZPN42X.mjs +0 -178
  27. package/dist/event-streams-T3U3ZQLC.mjs +0 -247
package/dist/index.mjs CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  GITHUB_TRIGGER,
4
+ MEDIA_KIND,
5
+ MEDIA_KINDS,
4
6
  REPLICAS_CONFIG_FILENAMES,
5
7
  SANDBOX_PATHS,
6
8
  deleteConfig,
@@ -8,6 +10,7 @@ import {
8
10
  getIdeCommand,
9
11
  getOrganizationId,
10
12
  getValidToken,
13
+ getWorkspaceDashboardUrl,
11
14
  isAgentMode,
12
15
  isAuthenticated,
13
16
  parseAgentEvents,
@@ -16,7 +19,7 @@ import {
16
19
  setIdeCommand,
17
20
  setOrganizationId,
18
21
  writeConfig
19
- } from "./chunk-CPVJVKSG.mjs";
22
+ } from "./chunk-F3ZHQCAZ.mjs";
20
23
  import "./chunk-FFDYI4OH.mjs";
21
24
 
22
25
  // src/index.ts
@@ -88,8 +91,8 @@ async function orgAuthenticatedFetch(url, options) {
88
91
  }
89
92
  const headers = {
90
93
  "Authorization": `Bearer ${token}`,
91
- "Replicas-Org-Id": organizationId,
92
94
  "Content-Type": "application/json",
95
+ "Replicas-Org-Id": organizationId,
93
96
  ...options?.headers || {}
94
97
  };
95
98
  const absoluteUrl = `${MONOLITH_URL}${url}`;
@@ -2305,21 +2308,24 @@ import chalk17 from "chalk";
2305
2308
  // src/lib/agent-api.ts
2306
2309
  var MONOLITH_URL3 = process.env.MONOLITH_URL || process.env.REPLICAS_MONOLITH_URL || "https://api.replicas.dev";
2307
2310
  var ENGINE_PORT = process.env.REPLICAS_ENGINE_PORT || "3737";
2308
- async function agentFetch(path4, options) {
2311
+ async function agentFetch(path5, options) {
2309
2312
  const config2 = readAgentConfig();
2310
2313
  if (!config2) {
2311
2314
  throw new Error("Agent mode config not found");
2312
2315
  }
2316
+ const isFormData = options?.body instanceof FormData;
2313
2317
  const headers = {
2314
2318
  "Authorization": `Bearer ${config2.engine_secret}`,
2315
2319
  "X-Workspace-Id": config2.workspace_id,
2316
- "Content-Type": "application/json",
2320
+ // FormData sets its own multipart Content-Type with boundary.
2321
+ ...isFormData ? {} : { "Content-Type": "application/json" },
2317
2322
  ...options?.headers || {}
2318
2323
  };
2319
- const response = await fetch(`${MONOLITH_URL3}${path4}`, {
2324
+ const body = options?.body === void 0 ? void 0 : isFormData ? options.body : JSON.stringify(options.body);
2325
+ const response = await fetch(`${MONOLITH_URL3}${path5}`, {
2320
2326
  ...options,
2321
2327
  headers,
2322
- body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0
2328
+ body
2323
2329
  });
2324
2330
  if (!response.ok) {
2325
2331
  const error = await response.json().catch(() => ({ error: "Request failed" }));
@@ -2327,7 +2333,7 @@ async function agentFetch(path4, options) {
2327
2333
  }
2328
2334
  return response.json();
2329
2335
  }
2330
- async function engineFetch(path4, options) {
2336
+ async function engineFetch(path5, options) {
2331
2337
  const config2 = readAgentConfig();
2332
2338
  if (!config2) {
2333
2339
  throw new Error("Agent mode config not found");
@@ -2337,7 +2343,7 @@ async function engineFetch(path4, options) {
2337
2343
  "Content-Type": "application/json",
2338
2344
  ...options?.headers || {}
2339
2345
  };
2340
- const response = await fetch(`http://localhost:${ENGINE_PORT}${path4}`, {
2346
+ const response = await fetch(`http://localhost:${ENGINE_PORT}${path5}`, {
2341
2347
  ...options,
2342
2348
  headers,
2343
2349
  body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0
@@ -2406,6 +2412,76 @@ async function previewAddCommand(workspaceId, options) {
2406
2412
  console.log(chalk17.green(`Preview created: ${result.preview.publicUrl}`));
2407
2413
  }
2408
2414
 
2415
+ // src/commands/media.ts
2416
+ import fs3 from "fs";
2417
+ import path4 from "path";
2418
+ var MONOLITH_URL4 = process.env.MONOLITH_URL || process.env.REPLICAS_MONOLITH_URL || "https://api.replicas.dev";
2419
+ var EXT_INFO = {
2420
+ png: { kind: MEDIA_KIND.IMAGE, contentType: "image/png" },
2421
+ jpg: { kind: MEDIA_KIND.IMAGE, contentType: "image/jpeg" },
2422
+ jpeg: { kind: MEDIA_KIND.IMAGE, contentType: "image/jpeg" },
2423
+ webp: { kind: MEDIA_KIND.IMAGE, contentType: "image/webp" },
2424
+ svg: { kind: MEDIA_KIND.IMAGE, contentType: "image/svg+xml" },
2425
+ mp4: { kind: MEDIA_KIND.VIDEO, contentType: "video/mp4" },
2426
+ webm: { kind: MEDIA_KIND.VIDEO, contentType: "video/webm" },
2427
+ mp3: { kind: MEDIA_KIND.AUDIO, contentType: "audio/mpeg" },
2428
+ wav: { kind: MEDIA_KIND.AUDIO, contentType: "audio/wav" }
2429
+ };
2430
+ function resolveKind(ext, override) {
2431
+ if (override) {
2432
+ if (!MEDIA_KINDS.includes(override)) {
2433
+ throw new Error(`Invalid kind '${override}'. Must be one of: ${MEDIA_KINDS.join(", ")}`);
2434
+ }
2435
+ return override;
2436
+ }
2437
+ const inferred = EXT_INFO[ext]?.kind;
2438
+ if (!inferred) {
2439
+ throw new Error(`Cannot infer kind from extension '.${ext}'. Pass --kind explicitly.`);
2440
+ }
2441
+ return inferred;
2442
+ }
2443
+ async function mediaUploadCommand(filePath, options) {
2444
+ const absPath = path4.resolve(filePath);
2445
+ if (!fs3.existsSync(absPath)) {
2446
+ throw new Error(`File not found: ${absPath}`);
2447
+ }
2448
+ const stat = fs3.statSync(absPath);
2449
+ if (!stat.isFile()) {
2450
+ throw new Error(`Not a file: ${absPath}`);
2451
+ }
2452
+ if (stat.size === 0) {
2453
+ throw new Error("File is empty");
2454
+ }
2455
+ const fileName = path4.basename(absPath);
2456
+ const ext = path4.extname(absPath).slice(1).toLowerCase();
2457
+ const kind = resolveKind(ext, options.kind);
2458
+ const contentType = EXT_INFO[ext]?.contentType ?? "application/octet-stream";
2459
+ const form = new FormData();
2460
+ form.append("file", new Blob([fs3.readFileSync(absPath)], { type: contentType }), fileName);
2461
+ form.append("kind", kind);
2462
+ if (options.sessionId) form.append("session_id", options.sessionId);
2463
+ const { media } = await agentFetch("/v1/engine/media", {
2464
+ method: "POST",
2465
+ body: form
2466
+ });
2467
+ console.log(`![${fileName}](${MONOLITH_URL4}/v1/media/${media.id})`);
2468
+ const config2 = readAgentConfig();
2469
+ if (config2?.workspace_id) {
2470
+ console.log(`View in Replicas: ${getWorkspaceDashboardUrl(config2.workspace_id, { mode: "media" })}`);
2471
+ }
2472
+ }
2473
+ async function mediaListCommand(options) {
2474
+ const qs = new URLSearchParams();
2475
+ if (options.kind) qs.set("kind", options.kind);
2476
+ if (options.limit) qs.set("limit", options.limit);
2477
+ if (options.page) qs.set("page", options.page);
2478
+ const query = qs.toString() ? `?${qs.toString()}` : "";
2479
+ const { media } = await agentFetch(`/v1/engine/media${query}`);
2480
+ for (const m of media) {
2481
+ console.log(`${MONOLITH_URL4}/v1/media/${m.id} ${m.kind} ${m.size} ${m.created_at}`);
2482
+ }
2483
+ }
2484
+
2409
2485
  // src/commands/interactive.ts
2410
2486
  import chalk18 from "chalk";
2411
2487
  async function interactiveCommand() {
@@ -2421,12 +2497,12 @@ async function interactiveCommand() {
2421
2497
  );
2422
2498
  }
2423
2499
  console.log(chalk18.gray("Starting interactive mode..."));
2424
- const { launchInteractive } = await import("./interactive-P7CS3HLU.mjs");
2500
+ const { launchInteractive } = await import("./interactive-TRUNJWJL.mjs");
2425
2501
  await launchInteractive();
2426
2502
  }
2427
2503
 
2428
2504
  // src/index.ts
2429
- var CLI_VERSION = "0.2.121";
2505
+ var CLI_VERSION = "0.2.123";
2430
2506
  var program = new Command();
2431
2507
  program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
2432
2508
  program.command("login").description("Authenticate with your Replicas account").action(async () => {
@@ -2839,12 +2915,36 @@ if (isAgentMode()) {
2839
2915
  });
2840
2916
  }
2841
2917
  if (isAgentMode()) {
2842
- const previewCmd = program.commands.find((cmd) => cmd.name() === "preview");
2918
+ const media = program.command("media").description("Share workspace media (screenshots, videos, audio) inline in chat");
2919
+ media.command("upload <file>").description("Upload a screenshot, video, or audio file. Prints a markdown embed for the assistant reply.").option("-k, --kind <kind>", "Media kind: image, video, or audio (inferred from extension if omitted)").option("-s, --session-id <id>", "Session ID to associate the asset with").action(async (file, options) => {
2920
+ try {
2921
+ await mediaUploadCommand(file, options);
2922
+ } catch (error) {
2923
+ if (error instanceof Error) {
2924
+ console.error(chalk19.red(`
2925
+ \u2717 ${error.message}
2926
+ `));
2927
+ }
2928
+ process.exit(1);
2929
+ }
2930
+ });
2931
+ media.command("list").description("List media uploaded for this workspace").option("-k, --kind <kind>", "Filter by kind: image, video, or audio").option("-l, --limit <n>", "Page size (default 50, max 200)").option("-p, --page <n>", "Page number (default 1)").action(async (options) => {
2932
+ try {
2933
+ await mediaListCommand(options);
2934
+ } catch (error) {
2935
+ if (error instanceof Error) {
2936
+ console.error(chalk19.red(`
2937
+ \u2717 ${error.message}
2938
+ `));
2939
+ }
2940
+ process.exit(1);
2941
+ }
2942
+ });
2943
+ const allowed = /* @__PURE__ */ new Set(["preview", "media"]);
2944
+ const kept = program.commands.filter((cmd) => allowed.has(cmd.name()));
2843
2945
  const cmds = program.commands;
2844
2946
  cmds.length = 0;
2845
- if (previewCmd) {
2846
- cmds.push(previewCmd);
2847
- }
2947
+ cmds.push(...kept);
2848
2948
  }
2849
2949
  var versionCheckPromise = checkForUpdates(CLI_VERSION);
2850
2950
  program.parse();
@@ -12,7 +12,7 @@ import {
12
12
  isAgentBackendEvent,
13
13
  parseAgentEvents,
14
14
  parseUserMessage
15
- } from "./chunk-CPVJVKSG.mjs";
15
+ } from "./chunk-F3ZHQCAZ.mjs";
16
16
  import "./chunk-FFDYI4OH.mjs";
17
17
 
18
18
  // src/interactive/index.tsx
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
3
  AwsRestJsonProtocol
4
- } from "./chunk-ENRF2K6M.mjs";
4
+ } from "./chunk-W27BU2E4.mjs";
5
5
  import {
6
6
  AwsSdkSigV4Signer,
7
+ BinaryDecisionDiagram,
7
8
  Client,
8
9
  Command,
9
10
  DEFAULT_RETRY_MODE,
@@ -26,6 +27,7 @@ import {
26
27
  calculateBodyLength,
27
28
  createDefaultUserAgentProvider,
28
29
  customEndpointFunctions,
30
+ decideEndpoint,
29
31
  emitWarningIfUnsupportedVersion,
30
32
  emitWarningIfUnsupportedVersion2,
31
33
  getAwsRegionExtensionConfiguration,
@@ -49,39 +51,38 @@ import {
49
51
  resolveAwsSdkSigV4Config,
50
52
  resolveDefaultRuntimeConfig,
51
53
  resolveDefaultsModeConfig,
52
- resolveEndpoint,
53
54
  resolveEndpointConfig,
54
55
  resolveHostHeaderConfig,
55
56
  resolveHttpHandlerRuntimeConfig,
56
57
  resolveRegionConfig,
57
58
  resolveRetryConfig,
58
59
  resolveUserAgentConfig
59
- } from "./chunk-NH63C5BC.mjs";
60
+ } from "./chunk-4KZFIKR3.mjs";
60
61
  import {
61
62
  loadConfig,
62
63
  parseUrl
63
- } from "./chunk-EHHAQWN3.mjs";
64
- import "./chunk-PNVVO6MW.mjs";
65
- import "./chunk-43COQWMG.mjs";
66
- import "./chunk-G3M3ZN6T.mjs";
64
+ } from "./chunk-KHHYAMUK.mjs";
65
+ import "./chunk-YZ62XZX5.mjs";
66
+ import "./chunk-K7B6G3FP.mjs";
67
67
  import {
68
68
  NodeHttpHandler,
69
69
  fromBase64,
70
70
  streamCollector,
71
71
  toBase64
72
- } from "./chunk-H7SOGPWV.mjs";
73
- import "./chunk-HDHAEUVR.mjs";
72
+ } from "./chunk-H57WOA7R.mjs";
73
+ import "./chunk-6E4PAXC5.mjs";
74
74
  import {
75
75
  fromUtf8,
76
76
  toUtf8
77
77
  } from "./chunk-S6VA5TIO.mjs";
78
- import "./chunk-R7VCWGZ2.mjs";
79
- import "./chunk-OMR2FLSI.mjs";
78
+ import "./chunk-HMKFI7SL.mjs";
79
+ import "./chunk-CEE3Y7RM.mjs";
80
+ import "./chunk-AEKGTTWT.mjs";
80
81
  import {
81
82
  __publicField
82
83
  } from "./chunk-FFDYI4OH.mjs";
83
84
 
84
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js
85
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js
85
86
  var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
86
87
  return {
87
88
  operation: getSmithyContext(context).operation,
@@ -130,7 +131,7 @@ var resolveHttpAuthSchemeConfig = (config) => {
130
131
  });
131
132
  };
132
133
 
133
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js
134
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js
134
135
  var resolveClientEndpointParameters = (options) => {
135
136
  return Object.assign(options, {
136
137
  useDualstackEndpoint: options.useDualstackEndpoint ?? false,
@@ -145,147 +146,107 @@ var commonParams = {
145
146
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
146
147
  };
147
148
 
148
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js
149
- var u = "required";
150
- var v = "fn";
151
- var w = "argv";
152
- var x = "ref";
153
- var a = true;
154
- var b = "isSet";
155
- var c = "booleanEquals";
156
- var d = "error";
157
- var e = "endpoint";
158
- var f = "tree";
159
- var g = "PartitionResult";
160
- var h = "getAttr";
161
- var i = { [u]: false, type: "string" };
162
- var j = { [u]: true, default: false, type: "boolean" };
163
- var k = { [x]: "Endpoint" };
164
- var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] };
165
- var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] };
166
- var n = {};
167
- var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] };
168
- var p = { [x]: g };
169
- var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] };
170
- var r = [l];
171
- var s = [m];
172
- var t = [{ [x]: "Region" }];
149
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js
150
+ var k = "ref";
151
+ var a = -1;
152
+ var b = true;
153
+ var c = "isSet";
154
+ var d = "PartitionResult";
155
+ var e = "booleanEquals";
156
+ var f = "getAttr";
157
+ var g = { [k]: "Endpoint" };
158
+ var h = { [k]: d };
159
+ var i = {};
160
+ var j = [{ [k]: "Region" }];
173
161
  var _data = {
174
- version: "1.0",
175
- parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
176
- rules: [
177
- {
178
- conditions: [{ [v]: b, [w]: [k] }],
179
- rules: [
180
- { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
181
- { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
182
- { endpoint: { url: k, properties: n, headers: n }, type: e }
183
- ],
184
- type: f
185
- },
186
- {
187
- conditions: [{ [v]: b, [w]: t }],
188
- rules: [
189
- {
190
- conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
191
- rules: [
192
- {
193
- conditions: [l, m],
194
- rules: [
195
- {
196
- conditions: [{ [v]: c, [w]: [a, o] }, q],
197
- rules: [
198
- {
199
- endpoint: {
200
- url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
201
- properties: n,
202
- headers: n
203
- },
204
- type: e
205
- }
206
- ],
207
- type: f
208
- },
209
- { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }
210
- ],
211
- type: f
212
- },
213
- {
214
- conditions: r,
215
- rules: [
216
- {
217
- conditions: [{ [v]: c, [w]: [o, a] }],
218
- rules: [
219
- {
220
- conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
221
- endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n },
222
- type: e
223
- },
224
- {
225
- endpoint: {
226
- url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
227
- properties: n,
228
- headers: n
229
- },
230
- type: e
231
- }
232
- ],
233
- type: f
234
- },
235
- { error: "FIPS is enabled but this partition does not support FIPS", type: d }
236
- ],
237
- type: f
238
- },
239
- {
240
- conditions: s,
241
- rules: [
242
- {
243
- conditions: [q],
244
- rules: [
245
- {
246
- endpoint: {
247
- url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
248
- properties: n,
249
- headers: n
250
- },
251
- type: e
252
- }
253
- ],
254
- type: f
255
- },
256
- { error: "DualStack is enabled but this partition does not support DualStack", type: d }
257
- ],
258
- type: f
259
- },
260
- {
261
- endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
262
- type: e
263
- }
264
- ],
265
- type: f
266
- }
267
- ],
268
- type: f
269
- },
270
- { error: "Invalid Configuration: Missing Region", type: d }
162
+ conditions: [
163
+ [c, [g]],
164
+ [c, j],
165
+ ["aws.partition", j, d],
166
+ [e, [{ [k]: "UseFIPS" }, b]],
167
+ [e, [{ [k]: "UseDualStack" }, b]],
168
+ [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
169
+ [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]],
170
+ ["stringEquals", [{ fn: f, argv: [h, "name"] }, "aws-us-gov"]]
171
+ ],
172
+ results: [
173
+ [a],
174
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
175
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
176
+ [g, i],
177
+ ["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
178
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
179
+ ["https://portal.sso.{Region}.amazonaws.com", i],
180
+ ["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", i],
181
+ [a, "FIPS is enabled but this partition does not support FIPS"],
182
+ ["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
183
+ [a, "DualStack is enabled but this partition does not support DualStack"],
184
+ ["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", i],
185
+ [a, "Invalid Configuration: Missing Region"]
271
186
  ]
272
187
  };
273
- var ruleSet = _data;
188
+ var root = 2;
189
+ var r = 1e8;
190
+ var nodes = new Int32Array([
191
+ -1,
192
+ 1,
193
+ -1,
194
+ 0,
195
+ 13,
196
+ 3,
197
+ 1,
198
+ 4,
199
+ r + 12,
200
+ 2,
201
+ 5,
202
+ r + 12,
203
+ 3,
204
+ 8,
205
+ 6,
206
+ 4,
207
+ 7,
208
+ r + 11,
209
+ 5,
210
+ r + 9,
211
+ r + 10,
212
+ 4,
213
+ 11,
214
+ 9,
215
+ 6,
216
+ 10,
217
+ r + 8,
218
+ 7,
219
+ r + 6,
220
+ r + 7,
221
+ 5,
222
+ 12,
223
+ r + 5,
224
+ 6,
225
+ r + 4,
226
+ r + 5,
227
+ 3,
228
+ r + 1,
229
+ 14,
230
+ 4,
231
+ r + 2,
232
+ r + 3
233
+ ]);
234
+ var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
274
235
 
275
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js
236
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js
276
237
  var cache = new EndpointCache({
277
238
  size: 50,
278
239
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
279
240
  });
280
241
  var defaultEndpointResolver = (endpointParams, context = {}) => {
281
- return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
242
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
282
243
  endpointParams,
283
244
  logger: context.logger
284
245
  }));
285
246
  };
286
247
  customEndpointFunctions.aws = awsEndpointFunctions;
287
248
 
288
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js
249
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js
289
250
  var SSOServiceException = class _SSOServiceException extends ServiceException {
290
251
  constructor(options) {
291
252
  super(options);
@@ -293,7 +254,7 @@ var SSOServiceException = class _SSOServiceException extends ServiceException {
293
254
  }
294
255
  };
295
256
 
296
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js
257
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js
297
258
  var InvalidRequestException = class _InvalidRequestException extends SSOServiceException {
298
259
  constructor(opts) {
299
260
  super({
@@ -343,7 +304,7 @@ var UnauthorizedException = class _UnauthorizedException extends SSOServiceExcep
343
304
  }
344
305
  };
345
306
 
346
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js
307
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js
347
308
  var _ATT = "AccessTokenType";
348
309
  var _GRC = "GetRoleCredentials";
349
310
  var _GRCR = "GetRoleCredentialsRequest";
@@ -429,7 +390,7 @@ var GetRoleCredentials$ = [
429
390
  () => GetRoleCredentialsResponse$
430
391
  ];
431
392
 
432
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js
393
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js
433
394
  var getRuntimeConfig = (config) => {
434
395
  return {
435
396
  apiVersion: "2019-06-10",
@@ -466,7 +427,7 @@ var getRuntimeConfig = (config) => {
466
427
  };
467
428
  };
468
429
 
469
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js
430
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js
470
431
  var getRuntimeConfig2 = (config) => {
471
432
  emitWarningIfUnsupportedVersion2(process.version);
472
433
  const defaultsMode = resolveDefaultsModeConfig(config);
@@ -500,7 +461,7 @@ var getRuntimeConfig2 = (config) => {
500
461
  };
501
462
  };
502
463
 
503
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js
464
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js
504
465
  var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
505
466
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
506
467
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
@@ -539,14 +500,14 @@ var resolveHttpAuthRuntimeConfig = (config) => {
539
500
  };
540
501
  };
541
502
 
542
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js
503
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js
543
504
  var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
544
505
  const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
545
506
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
546
507
  return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
547
508
  };
548
509
 
549
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js
510
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js
550
511
  var SSOClient = class extends Client {
551
512
  constructor(...[configuration]) {
552
513
  const _config_0 = getRuntimeConfig2(configuration || {});
@@ -582,8 +543,8 @@ var SSOClient = class extends Client {
582
543
  }
583
544
  };
584
545
 
585
- // ../node_modules/.bun/@aws-sdk+nested-clients@3.996.18/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js
586
- var GetRoleCredentialsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
546
+ // ../node_modules/.bun/@aws-sdk+nested-clients@3.997.6/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js
547
+ var GetRoleCredentialsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o) {
587
548
  return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
588
549
  }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() {
589
550
  };