@wayai/cli 0.3.71 → 0.3.73

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.
package/dist/index.js CHANGED
@@ -7859,6 +7859,7 @@ var workspace_exports = {};
7859
7859
  __export(workspace_exports, {
7860
7860
  autoRenameHubFolder: () => autoRenameHubFolder,
7861
7861
  detectWorkspace: () => detectWorkspace,
7862
+ filterPreviewHubs: () => filterPreviewHubs,
7862
7863
  findEnclosingHubFolder: () => findEnclosingHubFolder,
7863
7864
  findGitRoot: () => findGitRoot,
7864
7865
  findHubByFolderName: () => findHubByFolderName,
@@ -7866,10 +7867,12 @@ __export(workspace_exports, {
7866
7867
  findRepoRootSync: () => findRepoRootSync,
7867
7868
  getChangedHubs: () => getChangedHubs,
7868
7869
  getHubFolderSlug: () => getHubFolderSlug,
7870
+ isPreviewHub: () => isPreviewHub,
7869
7871
  resolveActiveHubId: () => resolveActiveHubId,
7870
7872
  resolveExplicitHubPath: () => resolveExplicitHubPath,
7871
7873
  resolveHubFolder: () => resolveHubFolder,
7872
7874
  resolveHubFolderBySelector: () => resolveHubFolderBySelector,
7875
+ resolveWorkspaceDir: () => resolveWorkspaceDir,
7873
7876
  scanNewHubs: () => scanNewHubs,
7874
7877
  scanWorkspaceHubs: () => scanWorkspaceHubs
7875
7878
  });
@@ -7905,6 +7908,16 @@ function detectWorkspace() {
7905
7908
  }
7906
7909
  return { gitRoot, workspaceDir: hubsDir };
7907
7910
  }
7911
+ function resolveWorkspaceDir() {
7912
+ const workspace = detectWorkspace();
7913
+ if (workspace) return workspace.workspaceDir;
7914
+ const gitRoot = findGitRoot();
7915
+ if (!gitRoot) {
7916
+ console.error("Not inside a git repository.");
7917
+ process.exit(1);
7918
+ }
7919
+ return resolveLayout(gitRoot).hubsDir;
7920
+ }
7908
7921
  function readHubYaml(yamlPath) {
7909
7922
  if (!fs2.existsSync(yamlPath)) return null;
7910
7923
  try {
@@ -7928,6 +7941,12 @@ function scanWorkspaceHubs(workspaceDir) {
7928
7941
  }
7929
7942
  return hubs;
7930
7943
  }
7944
+ function isPreviewHub(hub) {
7945
+ return hub.hubEnvironment === "preview";
7946
+ }
7947
+ function filterPreviewHubs(hubs) {
7948
+ return hubs.filter(isPreviewHub);
7949
+ }
7931
7950
  function readNewHubYaml(yamlPath) {
7932
7951
  if (!fs2.existsSync(yamlPath)) return null;
7933
7952
  try {
@@ -8020,7 +8039,7 @@ function getChangedHubs(workspaceDir) {
8020
8039
  hubs.push({ hubFolder, hubId: meta.hubId, hubEnvironment: meta.hubEnvironment });
8021
8040
  }
8022
8041
  }
8023
- return hubs;
8042
+ return filterPreviewHubs(hubs);
8024
8043
  }
8025
8044
  function resolveExplicitHubPath(hubPath) {
8026
8045
  const parts = hubPath.split("/");
@@ -8128,13 +8147,14 @@ function resolveActiveHubId(args2) {
8128
8147
  }
8129
8148
  const enclosing = findEnclosingHubFolder(workspaceDir);
8130
8149
  if (enclosing) return enclosing.hubId;
8131
- if (allHubs.length === 1) return allHubs[0].hubId;
8132
- if (allHubs.length === 0) {
8150
+ const previewHubs = filterPreviewHubs(allHubs);
8151
+ if (previewHubs.length === 1) return previewHubs[0].hubId;
8152
+ if (previewHubs.length === 0) {
8133
8153
  console.error(`No hub folders found in ${wsLabel}/. Run \`wayai pull --hub <uuid>\` to fetch a hub for the first time, or pass --hub <uuid>.`);
8134
8154
  process.exit(1);
8135
8155
  }
8136
8156
  console.error(`Multiple hubs in ${wsLabel}/. Pass --hub <uuid|folder-name> or run from inside a hub folder:`);
8137
- for (const h of allHubs) {
8157
+ for (const h of previewHubs) {
8138
8158
  console.error(` ${path2.basename(h.hubFolder)} (${h.hubId})`);
8139
8159
  }
8140
8160
  process.exit(1);
@@ -9712,6 +9732,44 @@ var init_whoami = __esm({
9712
9732
  }
9713
9733
  });
9714
9734
 
9735
+ // ../../packages/core/dist/constants.js
9736
+ var AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, SKILL_INSTALL_COMMAND;
9737
+ var init_constants = __esm({
9738
+ "../../packages/core/dist/constants.js"() {
9739
+ "use strict";
9740
+ AUTH_TYPE2 = {
9741
+ OAUTH: "oauth",
9742
+ API_KEY: "api_key",
9743
+ BASIC_AUTH: "basic_auth",
9744
+ BEARER: "bearer",
9745
+ NONE: "none"
9746
+ };
9747
+ ORG_CREDENTIAL_AUTH_TYPES2 = [
9748
+ AUTH_TYPE2.API_KEY,
9749
+ AUTH_TYPE2.BEARER,
9750
+ AUTH_TYPE2.BASIC_AUTH
9751
+ ];
9752
+ AUTH_TYPE_DISPLAY2 = {
9753
+ [AUTH_TYPE2.OAUTH]: "OAuth",
9754
+ [AUTH_TYPE2.API_KEY]: "API Key",
9755
+ [AUTH_TYPE2.BASIC_AUTH]: "Basic Auth",
9756
+ [AUTH_TYPE2.BEARER]: "Bearer Token",
9757
+ [AUTH_TYPE2.NONE]: "No Authentication"
9758
+ };
9759
+ LEGACY_AUTH_TYPE_MAP2 = {
9760
+ "OAuth": AUTH_TYPE2.OAUTH,
9761
+ "API Key": AUTH_TYPE2.API_KEY,
9762
+ "Basic Auth": AUTH_TYPE2.BASIC_AUTH,
9763
+ "Bearer Token": AUTH_TYPE2.BEARER,
9764
+ "No authentication": AUTH_TYPE2.NONE,
9765
+ // Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
9766
+ "basic": AUTH_TYPE2.BASIC_AUTH
9767
+ };
9768
+ VALID_AUTH_TYPES2 = new Set(Object.values(AUTH_TYPE2));
9769
+ SKILL_INSTALL_COMMAND = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
9770
+ }
9771
+ });
9772
+
9715
9773
  // src/commands/init.ts
9716
9774
  var init_exports = {};
9717
9775
  __export(init_exports, {
@@ -9850,7 +9908,8 @@ var init_init = __esm({
9850
9908
  init_workspace();
9851
9909
  init_layout();
9852
9910
  init_utils();
9853
- SKILL_INSTALL_CMD = "mkdir -p .claude && npx skills add wayai-pro/wayai-skill -y";
9911
+ init_constants();
9912
+ SKILL_INSTALL_CMD = SKILL_INSTALL_COMMAND;
9854
9913
  }
9855
9914
  });
9856
9915
 
@@ -10670,7 +10729,9 @@ var pull_exports = {};
10670
10729
  __export(pull_exports, {
10671
10730
  connectionsEqual: () => connectionsEqual,
10672
10731
  downloadBinaryResourceFiles: () => downloadBinaryResourceFiles,
10673
- pullCommand: () => pullCommand
10732
+ pullCommand: () => pullCommand,
10733
+ resolveHubTarget: () => resolveHubTarget,
10734
+ writeProductionMirror: () => writeProductionMirror
10674
10735
  });
10675
10736
  import * as fs11 from "fs";
10676
10737
  import * as path13 from "path";
@@ -10701,13 +10762,14 @@ function resolveHubTarget(workspaceDir, selector) {
10701
10762
  }
10702
10763
  const enclosing = findEnclosingHubFolder(workspaceDir);
10703
10764
  if (enclosing) return { hubId: enclosing.hubId, hubFolder: enclosing.hubFolder };
10704
- if (allHubs.length === 1) return { hubId: allHubs[0].hubId, hubFolder: allHubs[0].hubFolder };
10705
- if (allHubs.length === 0) {
10765
+ const previewHubs = filterPreviewHubs(allHubs);
10766
+ if (previewHubs.length === 1) return { hubId: previewHubs[0].hubId, hubFolder: previewHubs[0].hubFolder };
10767
+ if (previewHubs.length === 0) {
10706
10768
  console.error(`No hub folders found in ${wsLabel}/. Pass --hub <uuid> to fetch a hub for the first time.`);
10707
10769
  process.exit(1);
10708
10770
  }
10709
10771
  console.error(`Multiple hubs found in ${wsLabel}/. Pass --hub <uuid|folder-name> to choose, or run from inside a hub folder:`);
10710
- for (const h of allHubs) {
10772
+ for (const h of previewHubs) {
10711
10773
  console.error(` ${path13.basename(h.hubFolder)} (${h.hubId})`);
10712
10774
  }
10713
10775
  process.exit(1);
@@ -10718,27 +10780,18 @@ async function pullCommand(args2) {
10718
10780
  const { organization_id: organizationId } = repoConfig;
10719
10781
  const { config, accessToken } = await requireAuth();
10720
10782
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
10721
- let workspaceDir;
10722
- const workspace = detectWorkspace();
10783
+ const workspaceDir = resolveWorkspaceDir();
10723
10784
  const gitRoot = findGitRoot();
10724
- if (workspace) {
10725
- workspaceDir = workspace.workspaceDir;
10726
- } else {
10727
- if (!gitRoot) {
10728
- console.error("Not inside a git repository.");
10729
- process.exit(1);
10730
- }
10731
- workspaceDir = resolveLayout(gitRoot).hubsDir;
10732
- }
10733
10785
  if (gitRoot) warnLayoutOnce(gitRoot);
10734
10786
  const { hubId, hubFolder: existingFolder } = resolveHubTarget(workspaceDir, hubSelector);
10735
- assertHubMatchesBinding(hubId);
10736
10787
  console.log("Fetching hub configuration...");
10737
10788
  const payload = await client.pull(hubId, organizationId);
10738
10789
  if (payload.hub_environment === "production") {
10739
- console.log("Skipping production hub \u2014 production hubs are not tracked in the repository. Edit the linked preview hub instead.");
10790
+ const folder = await writeProductionMirror(workspaceDir, payload);
10791
+ console.log(`Production hub mirrored (read-only) \u2192 ${folder}`);
10740
10792
  return;
10741
10793
  }
10794
+ assertHubMatchesBinding(hubId);
10742
10795
  let hubFolder = existingFolder;
10743
10796
  let wroteFiles = false;
10744
10797
  if (!hubFolder) {
@@ -10805,6 +10858,38 @@ async function pullCommand(args2) {
10805
10858
  if (cancelled) return;
10806
10859
  }
10807
10860
  if (wroteFiles) autoBindIfUnbound(hubId);
10861
+ if (payload.production_hub_id) {
10862
+ await mirrorLinkedProduction(client, workspaceDir, payload.production_hub_id, organizationId);
10863
+ }
10864
+ }
10865
+ async function writeProductionMirror(workspaceDir, prodPayload) {
10866
+ const folder = resolveHubFolder(workspaceDir, prodPayload.hub_id, prodPayload.hub.name, "production", null, null);
10867
+ fs11.mkdirSync(path13.dirname(folder), { recursive: true });
10868
+ writeHubFolder(folder, prodPayload);
10869
+ await downloadBinaryResourceFiles(folder, prodPayload);
10870
+ const finalFolder = autoRenameHubFolder(folder, prodPayload.hub.name, "production", prodPayload.hub_id, null, null);
10871
+ prependMirrorMarker(finalFolder, prodPayload.hub_id);
10872
+ return finalFolder;
10873
+ }
10874
+ async function mirrorLinkedProduction(client, workspaceDir, productionHubId, organizationId) {
10875
+ try {
10876
+ const prodPayload = await client.pull(productionHubId, organizationId);
10877
+ const folder = await writeProductionMirror(workspaceDir, prodPayload);
10878
+ console.log(`Mirrored production hub \u2192 ${folder} (read-only)`);
10879
+ } catch (err) {
10880
+ console.warn(`Warning: could not mirror production hub (${err instanceof Error ? err.message : String(err)}). Preview pull is unaffected.`);
10881
+ }
10882
+ }
10883
+ function prependMirrorMarker(hubFolder, productionHubId) {
10884
+ const hubYaml = path13.join(hubFolder, "hub.yaml");
10885
+ try {
10886
+ const content = fs11.readFileSync(hubYaml, "utf-8");
10887
+ if (content.startsWith(MIRROR_MARKER_PREFIX)) return;
10888
+ const marker = `${MIRROR_MARKER_PREFIX} ${productionHubId}. Edits are ignored; push is blocked. Edit the linked preview hub instead.
10889
+ `;
10890
+ fs11.writeFileSync(hubYaml, marker + content, "utf-8");
10891
+ } catch {
10892
+ }
10808
10893
  }
10809
10894
  async function downloadBinaryResourceFiles(hubFolder, payload) {
10810
10895
  const resources = payload.resources || [];
@@ -10831,6 +10916,7 @@ function connectionsEqual(a, b) {
10831
10916
  }
10832
10917
  return true;
10833
10918
  }
10919
+ var MIRROR_MARKER_PREFIX;
10834
10920
  var init_pull = __esm({
10835
10921
  "src/commands/pull.ts"() {
10836
10922
  "use strict";
@@ -10845,6 +10931,7 @@ var init_pull = __esm({
10845
10931
  init_layout();
10846
10932
  init_repo_config();
10847
10933
  init_hub_binding();
10934
+ MIRROR_MARKER_PREFIX = "# Read-only mirror of production hub";
10848
10935
  }
10849
10936
  });
10850
10937
 
@@ -11110,16 +11197,6 @@ async function pushSingleHub(client, hubId, hubFolder, autoConfirm, organization
11110
11197
  autoBindIfUnbound(hubId);
11111
11198
  return true;
11112
11199
  }
11113
- function resolveWorkspaceDir() {
11114
- const workspace = detectWorkspace();
11115
- if (workspace) return workspace.workspaceDir;
11116
- const gitRoot = findGitRoot();
11117
- if (!gitRoot) {
11118
- console.error("Not inside a git repository.");
11119
- process.exit(1);
11120
- }
11121
- return resolveLayout(gitRoot).hubsDir;
11122
- }
11123
11200
  function selectExistingHub(workspaceDir, allHubs, selector, wsLabel) {
11124
11201
  if (selector) {
11125
11202
  const match = allHubs.find(
@@ -11133,7 +11210,8 @@ function selectExistingHub(workspaceDir, allHubs, selector, wsLabel) {
11133
11210
  }
11134
11211
  const enclosing = findEnclosingHubFolder(workspaceDir);
11135
11212
  if (enclosing) return enclosing;
11136
- if (allHubs.length === 1) return allHubs[0];
11213
+ const previewHubs = filterPreviewHubs(allHubs);
11214
+ if (previewHubs.length === 1) return previewHubs[0];
11137
11215
  return null;
11138
11216
  }
11139
11217
  function selectNewHub(newHubs, selector) {
@@ -11166,6 +11244,10 @@ async function pushCommand(args2) {
11166
11244
  const newHubs = scanNewHubs(workspaceDir);
11167
11245
  const existing = selectExistingHub(workspaceDir, existingHubs, hubSelector, wsLabel);
11168
11246
  if (existing) {
11247
+ if (existing.hubEnvironment === "production") {
11248
+ console.log("This is a read-only production mirror \u2014 production hubs cannot be pushed. Edit the linked preview hub instead.");
11249
+ return;
11250
+ }
11169
11251
  assertHubMatchesBinding(existing.hubId, path14.basename(existing.hubFolder));
11170
11252
  await pushSingleHub(client, existing.hubId, existing.hubFolder, autoConfirm, organizationId);
11171
11253
  return;
@@ -11247,6 +11329,85 @@ var init_push = __esm({
11247
11329
  }
11248
11330
  });
11249
11331
 
11332
+ // src/commands/diff.ts
11333
+ var diff_exports = {};
11334
+ __export(diff_exports, {
11335
+ diffCommand: () => diffCommand,
11336
+ parseArgs: () => parseArgs6
11337
+ });
11338
+ function parseArgs6(args2) {
11339
+ let production = false;
11340
+ let hubSelector;
11341
+ for (let i = 0; i < args2.length; i++) {
11342
+ const arg = args2[i];
11343
+ if (arg === "--production") {
11344
+ production = true;
11345
+ } else if (arg === "--hub" && args2[i + 1]) {
11346
+ hubSelector = args2[++i];
11347
+ }
11348
+ }
11349
+ return { production, hubSelector };
11350
+ }
11351
+ async function diffCommand(args2) {
11352
+ const { production, hubSelector } = parseArgs6(args2);
11353
+ const repoConfig = requireRepoConfig();
11354
+ const { organization_id: organizationId } = repoConfig;
11355
+ const { config, accessToken } = await requireAuth();
11356
+ const client = new ApiClient({ apiUrl: config.api_url, accessToken });
11357
+ const workspaceDir = resolveWorkspaceDir();
11358
+ const gitRoot = findGitRoot();
11359
+ if (gitRoot) warnLayoutOnce(gitRoot);
11360
+ const { hubId: previewHubId, hubFolder } = resolveHubTarget(workspaceDir, hubSelector);
11361
+ if (!hubFolder) {
11362
+ console.error("Hub is not materialized locally \u2014 nothing to diff. Run `wayai pull` first.");
11363
+ process.exit(1);
11364
+ }
11365
+ console.log("Parsing local configuration...");
11366
+ const localConfig = parseHubFolder(hubFolder);
11367
+ let targetHubId = previewHubId;
11368
+ let label = "preview";
11369
+ if (production) {
11370
+ if (localConfig.hub_environment === "production") {
11371
+ console.log("This is a read-only production mirror \u2014 run `wayai diff --production` from the preview workspace instead.");
11372
+ return;
11373
+ }
11374
+ const { hubs } = await client.listHubs(organizationId);
11375
+ const entry = hubs.find((h) => h.hub_id === previewHubId);
11376
+ const productionHubId = entry?.production_hub_id ?? null;
11377
+ if (!productionHubId) {
11378
+ console.log("This preview has no linked production hub yet (never published) \u2014 nothing to diff against production.");
11379
+ return;
11380
+ }
11381
+ targetHubId = productionHubId;
11382
+ label = "production";
11383
+ }
11384
+ console.log(`Computing diff against ${label}...`);
11385
+ const result = await client.diff(targetHubId, localConfig, "push", organizationId);
11386
+ printWarnings(result.warnings);
11387
+ if (!result.has_changes) {
11388
+ console.log(`
11389
+ No differences \u2014 local files match ${label}.`);
11390
+ return;
11391
+ }
11392
+ console.log(`
11393
+ Local files vs ${label.toUpperCase()}:`);
11394
+ printDiff(result.summary);
11395
+ }
11396
+ var init_diff = __esm({
11397
+ "src/commands/diff.ts"() {
11398
+ "use strict";
11399
+ init_auth();
11400
+ init_api_client();
11401
+ init_parser();
11402
+ init_diff_display();
11403
+ init_push();
11404
+ init_pull();
11405
+ init_repo_config();
11406
+ init_layout();
11407
+ init_workspace();
11408
+ }
11409
+ });
11410
+
11250
11411
  // src/commands/use.ts
11251
11412
  var use_exports = {};
11252
11413
  __export(use_exports, {
@@ -11987,10 +12148,10 @@ var init_delete_history = __esm({
11987
12148
  // src/commands/sync-skills.ts
11988
12149
  var sync_skills_exports = {};
11989
12150
  __export(sync_skills_exports, {
11990
- parseArgs: () => parseArgs6,
12151
+ parseArgs: () => parseArgs7,
11991
12152
  syncSkillsCommand: () => syncSkillsCommand
11992
12153
  });
11993
- function parseArgs6(args2) {
12154
+ function parseArgs7(args2) {
11994
12155
  let connectionId;
11995
12156
  const idx = args2.indexOf("--connection-id");
11996
12157
  if (idx !== -1 && args2[idx + 1]) {
@@ -12013,7 +12174,7 @@ function printSyncResults(response) {
12013
12174
  }
12014
12175
  async function syncSkillsCommand(args2) {
12015
12176
  const hubId = resolveActiveHubId(args2);
12016
- const { connectionId } = parseArgs6(args2);
12177
+ const { connectionId } = parseArgs7(args2);
12017
12178
  requireRepoConfig();
12018
12179
  const { config, accessToken } = await requireAuth();
12019
12180
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
@@ -12038,10 +12199,10 @@ var init_sync_skills = __esm({
12038
12199
  // src/commands/sync-mcp.ts
12039
12200
  var sync_mcp_exports = {};
12040
12201
  __export(sync_mcp_exports, {
12041
- parseArgs: () => parseArgs7,
12202
+ parseArgs: () => parseArgs8,
12042
12203
  syncMcpCommand: () => syncMcpCommand
12043
12204
  });
12044
- function parseArgs7(args2) {
12205
+ function parseArgs8(args2) {
12045
12206
  let connection;
12046
12207
  for (let i = 0; i < args2.length; i++) {
12047
12208
  const arg = args2[i];
@@ -12053,7 +12214,7 @@ function parseArgs7(args2) {
12053
12214
  }
12054
12215
  async function syncMcpCommand(args2) {
12055
12216
  const hubId = resolveActiveHubId(args2);
12056
- const { connection } = parseArgs7(args2);
12217
+ const { connection } = parseArgs8(args2);
12057
12218
  if (!connection) {
12058
12219
  console.error("Usage: wayai sync-mcp --connection <name> [--hub <uuid|folder-name>]");
12059
12220
  console.error("");
@@ -12669,7 +12830,7 @@ function isValidSetName(name) {
12669
12830
  if (name.startsWith(".")) return false;
12670
12831
  return !/[\/\\\0]/.test(name);
12671
12832
  }
12672
- function parseArgs8(args2) {
12833
+ function parseArgs9(args2) {
12673
12834
  if (args2.length === 0 || args2[0].startsWith("-")) {
12674
12835
  console.error("Usage: wayai eval capture <conversation_id> [--set <name>] [--name <eval_name>] [--instructions <text>]");
12675
12836
  process.exit(1);
@@ -12715,7 +12876,7 @@ function parseArgs8(args2) {
12715
12876
  }
12716
12877
  async function evalCaptureCommand(args2) {
12717
12878
  const hubId = resolveActiveHubId(args2);
12718
- const parsed = parseArgs8(args2);
12879
+ const parsed = parseArgs9(args2);
12719
12880
  const { config, accessToken } = await requireAuth();
12720
12881
  requireRepoConfig();
12721
12882
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
@@ -12792,7 +12953,7 @@ var journey_capture_exports = {};
12792
12953
  __export(journey_capture_exports, {
12793
12954
  journeyCaptureCommand: () => journeyCaptureCommand
12794
12955
  });
12795
- function parseArgs9(args2) {
12956
+ function parseArgs10(args2) {
12796
12957
  if (args2.length === 0 || args2[0].startsWith("-")) {
12797
12958
  console.error("Usage: wayai eval journey capture <conversation_id> [--name <journey_name>] [--instructions <text>]");
12798
12959
  process.exit(1);
@@ -12827,7 +12988,7 @@ function parseArgs9(args2) {
12827
12988
  }
12828
12989
  async function journeyCaptureCommand(args2) {
12829
12990
  const hubId = resolveActiveHubId(args2);
12830
- const parsed = parseArgs9(args2);
12991
+ const parsed = parseArgs10(args2);
12831
12992
  const { config, accessToken } = await requireAuth();
12832
12993
  requireRepoConfig();
12833
12994
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
@@ -13035,8 +13196,8 @@ var init_eval = __esm({
13035
13196
 
13036
13197
  // ../../packages/core/dist/contracts/index.js
13037
13198
  function normalizeAuthType2(raw) {
13038
- if (VALID_AUTH_TYPES2.has(raw)) return raw;
13039
- return LEGACY_AUTH_TYPE_MAP2[raw] ?? raw;
13199
+ if (VALID_AUTH_TYPES3.has(raw)) return raw;
13200
+ return LEGACY_AUTH_TYPE_MAP3[raw] ?? raw;
13040
13201
  }
13041
13202
  function visibleLength2(s) {
13042
13203
  return s.replace(INVISIBLE_NAME_CHARS2, "").length;
@@ -13410,7 +13571,7 @@ function isSanitizableSliceFile(path22) {
13410
13571
  function distinctUsesBackends(uses) {
13411
13572
  return [...new Set((uses ?? []).map((u) => u.backend))];
13412
13573
  }
13413
- var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, AUTH_TYPE2, ORG_CREDENTIAL_AUTH_TYPES2, AUTH_TYPE_DISPLAY2, LEGACY_AUTH_TYPE_MAP2, VALID_AUTH_TYPES2, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, AGENT_PARAMETER_TYPES2, AGENT_PARAMETER_NAME_REGEX2, agentParameterCreateSchema2, MAX_AGENT_PARAMETERS_PER_REQUEST2, createAgentParametersBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_LANES2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, registerWhatsappQuery2, registerWhatsappBody2, retryProvisioningQuery2, resendDomainStatusQuery2, PLACEHOLDER_TOKENS2, ALLOWED_TYPES2, SUBSCHEMA_OBJECT_KEYWORDS2, SUBSCHEMA_LIST_KEYWORDS2, SUBSCHEMA_MAP_KEYWORDS2, MAX_SCHEMA_DEPTH2, toolIdParam2, listToolsQuery2, toolAgentQuery2, deleteToolQuery2, toolConnectionsQuery2, nativeToolIdSchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, variantAiModeSchema2, experimentStatusSchema2, overlayUpdateSchema2, experimentIdParam2, variantIdParam2, listExperimentsQuery2, listVariantsQuery2, listOverridesQuery2, deleteOverrideQuery2, createExperimentBody2, updateExperimentBody2, setExperimentStatusBody2, createVariantBody2, updateVariantBody2, upsertOverrideBody2, orgTagIdParam2, listOrgTagsQuery2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, createJourneyBody2, updateJourneyBody2, getConversationsQuery2, getMessagesQuery2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, downloadBody2, uploadQuery2, signUrlBody2, completionsBody2, outboundSchemaQuery2, templateIdParam2, listTemplatesQuery2, deleteTemplateQuery2, templateStatusQuery2, createTemplateBody2, updateTemplateBody2, submitTemplateBody2, testTemplateBody2, contactIdParam2, listContactsQuery2, createContactBody2, updateContactBody2, listIdParam2, listListsQuery2, listListContactsQuery2, createListBody2, updateListBody2, addListContactsBody2, removeListContactsBody2, scheduleIdParam2, listSchedulesQuery2, listExecutionsQuery2, createScheduleBody2, updateScheduleBody2, uuidPattern2, ciUuidSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, contestReportBody2, reporterListQuery2, listReportsQuery2, GITHUB_ISSUE_URL_REGEX2, githubIssueUrlSchema2, transitionReportBody2, groupReportsBody2, holdReportBody2, clickhouseReadyResponse2, bootstrapQuery2, requestSnapshotChunkMessage2, MAX_NAME_LENGTH3, MAX_VALUE_LENGTH2, MAX_TAGS2, MAX_TAG_LENGTH2, MAX_SCOPE_HUBS2, MAX_SCOPE_TAGS2, vaultSecretScopeSchema2, vaultCreateBody2, vaultUpdateBody2, PERMISSIONS2, MAX_NAME_LENGTH22, MAX_HUBS_PER_GRANT2, MAX_HUB_TAGS_PER_GRANT2, MAX_GRANTS2, permissionEnum2, grantScopeSchema2, grantSchema2, createTokenBody2, tokenOrgIdParam2, tokenGrantScopeSchema2, tokenGrantSchema2, tokenMetadataSchema2, listTokensResponse2, createTokenResponse2, orgTokenSummarySchema2, listOrgTokensResponse2, invitePreviewQuery2, invitePreviewResponse2, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2;
13574
+ var uuidSchema2, paginationSchema3, timestampSchema2, idParamSchema2, primaryRegionSchema2, placementSourceSchema2, orgIdParam2, orgAdminIdParam2, createOrganizationBody2, updateOrganizationBody2, addOrgAdminBody2, AUTH_TYPE3, ORG_CREDENTIAL_AUTH_TYPES3, AUTH_TYPE_DISPLAY3, LEGACY_AUTH_TYPE_MAP3, VALID_AUTH_TYPES3, AGENT_ROLES2, SAFE_USER_ID_REGEX2, SUPPORTED_LOCALES2, SUMMARIZATION_THRESHOLD_MIN2, SUMMARIZATION_THRESHOLD_MAX2, summarizationThresholdField2, monitorConfigField2, agentIdParam2, listAgentsQuery2, agentConnectionsQuery2, createAgentBody2, updateAgentBody2, AGENT_PARAMETER_TYPES2, AGENT_PARAMETER_NAME_REGEX2, agentParameterCreateSchema2, MAX_AGENT_PARAMETERS_PER_REQUEST2, createAgentParametersBody2, SLUG_REGEX2, slugSchema2, INVISIBLE_NAME_CHARS2, MAX_KANBAN_STATUSES2, MAX_FOLLOWUPS_PER_STATUS2, MAX_LANES2, MAX_ADDITIONAL_CONTEXT_SCHEMA_BYTES2, RESERVED_TEMPLATE_DUMP_NAME2, kanbanStatusSlugSchema2, followupSchema2, EXCLUSIVE_FLAG_PAIRS2, kanbanStatusSchema2, kanbanStatusesArraySchema2, laneSchema2, lanesArraySchema2, hubIdParam2, hubAdminIdParam2, hubUserIdParam2, hubIdentityIdParam2, hubTeamIdParam2, hubTeamUserDeleteParam2, hubSchemaQuery2, createHubBody2, updateHubBody2, addHubAdminBody2, addHubIdentityAuthorizationBody2, contactDecisionBody2, approveContactBody2, listContactAccessQuery2, createHubTeamBody2, updateHubTeamBody2, addHubTeamUserBody2, reassignHubUserBody2, replicatePreviewBody2, claimCodeChannelParam2, claimCodeDeleteParam2, connectionIdParam2, connectorIdParam2, listConnectionsQuery2, deleteConnectionQuery2, addConnectionBody2, editConnectionBody2, registerWhatsappQuery2, registerWhatsappBody2, retryProvisioningQuery2, resendDomainStatusQuery2, PLACEHOLDER_TOKENS2, ALLOWED_TYPES2, SUBSCHEMA_OBJECT_KEYWORDS2, SUBSCHEMA_LIST_KEYWORDS2, SUBSCHEMA_MAP_KEYWORDS2, MAX_SCHEMA_DEPTH2, toolIdParam2, listToolsQuery2, toolAgentQuery2, deleteToolQuery2, toolConnectionsQuery2, nativeToolIdSchema2, addNativeToolBody2, addMcpToolBody2, createCustomToolBody2, updateCustomToolBody2, updateToolExecutionConfigBody2, initialValueCreateSchema2, initialValueUpdateSchema2, stateIdParam2, listStatesQuery2, stateNameSchema2, createStateBody2, updateStateBody2, reorderStatesBody2, variantAiModeSchema2, experimentStatusSchema2, overlayUpdateSchema2, experimentIdParam2, variantIdParam2, listExperimentsQuery2, listVariantsQuery2, listOverridesQuery2, deleteOverrideQuery2, createExperimentBody2, updateExperimentBody2, setExperimentStatusBody2, createVariantBody2, updateVariantBody2, upsertOverrideBody2, orgTagIdParam2, listOrgTagsQuery2, createOrgTagBody2, updateOrgTagBody2, orgCredentialIdParam2, listOrgCredentialsQuery2, createOrgCredentialBody2, updateOrgCredentialBody2, orgResourceIdParam2, orgResourceFileIdParam2, orgResourceFolderIdParam2, hubOrgResourceParam2, listOrgResourcesQuery2, orgIdQuery2, createOrgResourceBody2, updateOrgResourceBody2, createOrgResourceFolderBody2, updateOrgResourceFolderBody2, uploadOrgResourceFileBody2, updateOrgResourceFileBody2, uploadOrgSkillZipBody2, linkOrgResourceBody2, resourceIdParam2, listResourcesQuery2, createResourceBody2, updateResourceBody2, syncSkillsBody2, resourceFileIdParam2, listResourceFilesQuery2, createResourceFileBody2, updateResourceFileBody2, uploadResourceFileBody2, uploadSkillZipBody2, resourceFolderIdParam2, listResourceFoldersQuery2, createResourceFolderBody2, updateResourceFolderBody2, agentResourceQuery2, hubResourceQuery2, linkAgentResourceBody2, updateAgentResourceBody2, unlinkAgentResourceQuery2, navItemSchema2, hubCountResetBody2, navItemCountResetBody2, typingBody2, analyticsHubIdParam2, analyticsVariableIdParam2, updateVariablePinBody2, updateAnalyticsViewBody2, NUMERIC_FILTER_OPS2, TEXT_FILTER_OPS2, CATEGORICAL_FILTER_OPS2, VARIABLE_FILTER_OPS2, STRUCTURED_QUERY_OPS2, STRUCTURED_QUERY_AGGREGATIONS2, filterValueSchema2, conversationsBody2, analyticsConversationIdParam2, messagesQuery2, conversationDetailDataQuery2, analyticsDataBody2, structuredQueryBody2, analyticsSqlBody2, analyticsSqlSchemaQuery2, PACING_INTERVAL_MIN_MS2, PACING_INTERVAL_MAX_MS2, EVAL_RUN_DEADLINE_MIN_MS2, EVAL_RUN_DEADLINE_MAX_MS2, paginationSchema22, evalIdParam2, sessionIdParam2, scenarioSetIdParam2, hubIdQuery2, createEvalBody2, updateEvalBody2, getEvalsQuery2, toggleEvalBody2, bulkToggleEvalsBody2, pacingConfigSchema2, sessionConfigSchema2, createSessionBody2, getSessionsQuery2, getSessionResultsQuery2, getSessionRunsQuery2, evalAnalyticsQuery2, getSessionCostQuery2, compareSessionsQuery2, evalsSqlBody2, evalsSqlSchemaQuery2, exportResultsQuery2, validateEvalBody2, hubAgentsQuery2, createScenarioSetBody2, updateScenarioSetBody2, scenarioSetsHubQuery2, createScenarioFromConversationBody2, createJourneyFromConversationBody2, journeyIdParam2, journeyToolCallSchema2, journeyTurnSchema2, journeyStepOverrideSchema2, createJourneyBody2, updateJourneyBody2, getConversationsQuery2, getMessagesQuery2, updateUserBody2, updateProfileBody2, pathnameRegex2, updatePreferencesBody2, registerPushTokenBody2, deletePushTokenQuery2, activityQuery2, deletionModeSchema2, deletionRequestBody2, archiveHubIdParam2, archiveConversationParams2, archiveListQuery2, archiveMessageObservabilityParams2, conversationIdParam2, claimBody2, releaseBody2, transferBody2, closeBody2, additionalContextPayloadSchema2, kanbanUpdateBody2, annotateConversationBody2, observabilityParams2, observabilityListParams2, deleteUserConversationsBody2, sendMessageBody2, listConversationsQuery2, getConversationDetailParams2, getConversationDetailQuery2, listWhatsAppTemplatesQuery2, sendWhatsAppTemplateBody2, billingOrgIdParam2, subscriptionItemParams2, spendCapBody2, growthPacksBody2, portalSessionBody2, checkoutSessionBody2, updateBillingCurrencyBody2, invoicesQuery2, downloadBody2, uploadQuery2, signUrlBody2, completionsBody2, outboundSchemaQuery2, templateIdParam2, listTemplatesQuery2, deleteTemplateQuery2, templateStatusQuery2, createTemplateBody2, updateTemplateBody2, submitTemplateBody2, testTemplateBody2, contactIdParam2, listContactsQuery2, createContactBody2, updateContactBody2, listIdParam2, listListsQuery2, listListContactsQuery2, createListBody2, updateListBody2, addListContactsBody2, removeListContactsBody2, scheduleIdParam2, listSchedulesQuery2, listExecutionsQuery2, createScheduleBody2, updateScheduleBody2, uuidPattern2, ciUuidSchema2, hubAsCodeConfigSchema2, ciPullHubIdParam2, ciBranchParam2, ciPullQuery2, ciHubsQuery2, ciLookupQuery2, ciBranchesQuery2, ciSyncBody2, ciPushBody2, ciDiffBody2, ciPublishBody2, ciPublishPreviewBody2, ciSyncMcpBody2, ciOrgResourcesParam2, orgResourcesConfigSchema2, ciOrgResourcesPushBody2, ciOrgResourcesDiffBody2, adminOrgIdParam2, adminOrgAdminIdParam2, adminUserIdParam2, adminPlanIdParam2, adminOrganizationsQuery2, adminUserSearchQuery2, kanbanSlugMigrationQuery2, adjustQuotaBody2, updatePlanBody2, addAdminUserBody2, updatePlatformConfigBody2, updateFreeOrgLimitBody2, updatePricingPlanBody2, dataExplorerSearchQuery2, dataExplorerOrgIdParam2, dataExplorerHubIdParam2, dataExplorerConvIdParam2, dataExplorerDoInstancesQuery2, dataExplorerNsIdParam2, dataExplorerKvKeysQuery2, dataExplorerKvKeyParam2, uuidOrHexId2, dataExplorerDeleteOrgParam2, dataExplorerDeleteHubParam2, dataExplorerDeleteConvParam2, dataExplorerDeleteUserParam2, dataExplorerDeleteQuery2, dataExplorerKvDeleteQuery2, pitrDoNamespace2, pitrBookmarkParam2, pitrRestoreBody2, healthSamplingTriggerBody2, dataExplorerDebugDoType2, DEBUG_READ_MAX_LIMIT2, DEBUG_READ_DEFAULT_LIMIT2, DEBUG_DO_HEX_PREFIX2, debugDoEntityId2, debugTableName2, dataExplorerDebugTablesParam2, dataExplorerDebugRowsParam2, dataExplorerDebugRowsQuery2, dataExplorerDebugAnalyticsTable2, debugUuid2, dataExplorerDebugAnalyticsRowsParam2, dataExplorerDebugAnalyticsRowsQuery2, debugHubConvParam2, debugMessageIdQuery2, whatsappCallbackBody2, authMeResponse2, wsTicketResponse2, sessionCheckResponse2, logoutResponse2, magicCodeSendBody2, magicCodeSendResponse2, magicCodeVerifyBody2, magicCodeVerifyResponse2, browserParams2, browserFoldersQuery2, browserFilesQuery2, stateOperationBody2, conversationListResourcesQuery2, conversationReadResourceQuery2, listPendingSchedulesQuery2, listHubAggregateSchedulesQuery2, reportSourceSchema2, intakeReportSourceSchema2, reportClassificationSchema2, reportStatusSchema2, reportLocaleSchema2, reportMessageAuthorRoleSchema2, sentryRefStatusSchema2, createReportBody2, editReportBody2, contestReportBody2, reporterListQuery2, listReportsQuery2, GITHUB_ISSUE_URL_REGEX2, githubIssueUrlSchema2, transitionReportBody2, groupReportsBody2, holdReportBody2, clickhouseReadyResponse2, bootstrapQuery2, requestSnapshotChunkMessage2, MAX_NAME_LENGTH3, MAX_VALUE_LENGTH2, MAX_TAGS2, MAX_TAG_LENGTH2, MAX_SCOPE_HUBS2, MAX_SCOPE_TAGS2, vaultSecretScopeSchema2, vaultCreateBody2, vaultUpdateBody2, PERMISSIONS2, MAX_NAME_LENGTH22, MAX_HUBS_PER_GRANT2, MAX_HUB_TAGS_PER_GRANT2, MAX_GRANTS2, permissionEnum2, grantScopeSchema2, grantSchema2, createTokenBody2, tokenOrgIdParam2, tokenGrantScopeSchema2, tokenGrantSchema2, tokenMetadataSchema2, listTokensResponse2, createTokenResponse2, orgTokenSummarySchema2, listOrgTokensResponse2, invitePreviewQuery2, invitePreviewResponse2, discordTier2, discordBillingCycle2, discordMetadata2, discordOAuthStartResponse2, discordOAuthFinalizeBody2, discordOAuthFinalizeResponse2, discordDisconnectResponse2, jsonSchemaSchema2, hubUserIdentity2, stateValueEntry2, getHubUserContextResponse2, updateHubUserBody2, updateHubUserResponse2, unlockHubUserNameResponse2, stateResetParams2, stateResetResponse2, hubAlertsParam2, hubAlertSeverity2, hubAlert2, hubAlertsListResponse2, noticeSeveritySchema2, noticeStatusSchema2, NOTICE_SCOPE_REGEX2, noticeScopeSchema2, noticeLinkSchema2, createNoticeBody2, updateNoticeBody2, listNoticesQuery2, noticeIdParamSchema2, templateLocaleSchema2, TEMPLATE_SLUG_REGEX2, templateSlugSchema2, templateStatusSchema2, templateFileMapSchema2, TEMPLATE_INSTANCE_ID_KEYS, TEMPLATE_OPAQUE_BLOB_KEYS, TEMPLATE_AUTHOR_DATA_KEYS, templateTextSchema2, templateUsesEntrySchema2, templateUsesSchema2, templateYamlLocaleEntry2, templateYamlWayaiBlock2, templateTagsSchema2, templateYamlSchema2, templateHeroSchema2, templatePushLocaleSchema2, templatePushBody2, templateListQuery2, templateSlugParam2, templateDetailQuery2, ADMIN_SKILL_NAME_REGEX2, adminSkillNameParam2;
13414
13575
  var init_contracts = __esm({
13415
13576
  "../../packages/core/dist/contracts/index.js"() {
13416
13577
  "use strict";
@@ -13510,35 +13671,35 @@ var init_contracts = __esm({
13510
13671
  addOrgAdminBody2 = external_exports.object({
13511
13672
  user_email: external_exports.string().email("valid email is required")
13512
13673
  });
13513
- AUTH_TYPE2 = {
13674
+ AUTH_TYPE3 = {
13514
13675
  OAUTH: "oauth",
13515
13676
  API_KEY: "api_key",
13516
13677
  BASIC_AUTH: "basic_auth",
13517
13678
  BEARER: "bearer",
13518
13679
  NONE: "none"
13519
13680
  };
13520
- ORG_CREDENTIAL_AUTH_TYPES2 = [
13521
- AUTH_TYPE2.API_KEY,
13522
- AUTH_TYPE2.BEARER,
13523
- AUTH_TYPE2.BASIC_AUTH
13681
+ ORG_CREDENTIAL_AUTH_TYPES3 = [
13682
+ AUTH_TYPE3.API_KEY,
13683
+ AUTH_TYPE3.BEARER,
13684
+ AUTH_TYPE3.BASIC_AUTH
13524
13685
  ];
13525
- AUTH_TYPE_DISPLAY2 = {
13526
- [AUTH_TYPE2.OAUTH]: "OAuth",
13527
- [AUTH_TYPE2.API_KEY]: "API Key",
13528
- [AUTH_TYPE2.BASIC_AUTH]: "Basic Auth",
13529
- [AUTH_TYPE2.BEARER]: "Bearer Token",
13530
- [AUTH_TYPE2.NONE]: "No Authentication"
13686
+ AUTH_TYPE_DISPLAY3 = {
13687
+ [AUTH_TYPE3.OAUTH]: "OAuth",
13688
+ [AUTH_TYPE3.API_KEY]: "API Key",
13689
+ [AUTH_TYPE3.BASIC_AUTH]: "Basic Auth",
13690
+ [AUTH_TYPE3.BEARER]: "Bearer Token",
13691
+ [AUTH_TYPE3.NONE]: "No Authentication"
13531
13692
  };
13532
- LEGACY_AUTH_TYPE_MAP2 = {
13533
- "OAuth": AUTH_TYPE2.OAUTH,
13534
- "API Key": AUTH_TYPE2.API_KEY,
13535
- "Basic Auth": AUTH_TYPE2.BASIC_AUTH,
13536
- "Bearer Token": AUTH_TYPE2.BEARER,
13537
- "No authentication": AUTH_TYPE2.NONE,
13693
+ LEGACY_AUTH_TYPE_MAP3 = {
13694
+ "OAuth": AUTH_TYPE3.OAUTH,
13695
+ "API Key": AUTH_TYPE3.API_KEY,
13696
+ "Basic Auth": AUTH_TYPE3.BASIC_AUTH,
13697
+ "Bearer Token": AUTH_TYPE3.BEARER,
13698
+ "No authentication": AUTH_TYPE3.NONE,
13538
13699
  // Also handle the old DISPLAY_TO_CODE bug where 'basic' was used instead of 'basic_auth'
13539
- "basic": AUTH_TYPE2.BASIC_AUTH
13700
+ "basic": AUTH_TYPE3.BASIC_AUTH
13540
13701
  };
13541
- VALID_AUTH_TYPES2 = new Set(Object.values(AUTH_TYPE2));
13702
+ VALID_AUTH_TYPES3 = new Set(Object.values(AUTH_TYPE3));
13542
13703
  AGENT_ROLES2 = [
13543
13704
  "pilot",
13544
13705
  "copilot",
@@ -16411,8 +16572,8 @@ var init_analytics = __esm({
16411
16572
 
16412
16573
  // src/lib/credential-utils.ts
16413
16574
  function normalizeCliAuthType(type) {
16414
- const normalized = LEGACY_AUTH_TYPE_MAP3[type] ?? type;
16415
- return VALID_AUTH_TYPES3.includes(normalized) ? normalized : null;
16575
+ const normalized = LEGACY_AUTH_TYPE_MAP4[type] ?? type;
16576
+ return VALID_AUTH_TYPES4.includes(normalized) ? normalized : null;
16416
16577
  }
16417
16578
  function normalizeCliEnvironment(env) {
16418
16579
  return VALID_ENVIRONMENTS.includes(env) ? env : null;
@@ -16463,12 +16624,12 @@ function resolveTagIds(tagRefs, orgTags) {
16463
16624
  function splitTagRefs(rawValues) {
16464
16625
  return rawValues.flatMap((v) => v.split(",")).map((v) => v.trim()).filter((v) => v.length > 0);
16465
16626
  }
16466
- var VALID_AUTH_TYPES3, LEGACY_AUTH_TYPE_MAP3, VALID_ENVIRONMENTS;
16627
+ var VALID_AUTH_TYPES4, LEGACY_AUTH_TYPE_MAP4, VALID_ENVIRONMENTS;
16467
16628
  var init_credential_utils = __esm({
16468
16629
  "src/lib/credential-utils.ts"() {
16469
16630
  "use strict";
16470
- VALID_AUTH_TYPES3 = ["api_key", "bearer", "basic_auth"];
16471
- LEGACY_AUTH_TYPE_MAP3 = {
16631
+ VALID_AUTH_TYPES4 = ["api_key", "bearer", "basic_auth"];
16632
+ LEGACY_AUTH_TYPE_MAP4 = {
16472
16633
  "API Key": "api_key",
16473
16634
  "Bearer Token": "bearer",
16474
16635
  "Basic Auth": "basic_auth"
@@ -16481,9 +16642,9 @@ var init_credential_utils = __esm({
16481
16642
  var create_credential_exports = {};
16482
16643
  __export(create_credential_exports, {
16483
16644
  createCredentialCommand: () => createCredentialCommand,
16484
- parseArgs: () => parseArgs10
16645
+ parseArgs: () => parseArgs11
16485
16646
  });
16486
- function parseArgs10(args2) {
16647
+ function parseArgs11(args2) {
16487
16648
  let name;
16488
16649
  let type;
16489
16650
  let orgId;
@@ -16511,7 +16672,7 @@ function parseArgs10(args2) {
16511
16672
  return { name, type, orgId, description, tags: splitTagRefs(tags), environment, stdin };
16512
16673
  }
16513
16674
  async function createCredentialCommand(args2) {
16514
- const parsed = parseArgs10(args2);
16675
+ const parsed = parseArgs11(args2);
16515
16676
  if (!parsed.name) {
16516
16677
  console.error("Missing required flag: --name <credential-name>");
16517
16678
  console.error('Usage: wayai create-credential --name "openai-key" --type "Bearer Token"');
@@ -16519,13 +16680,13 @@ async function createCredentialCommand(args2) {
16519
16680
  }
16520
16681
  if (!parsed.type) {
16521
16682
  console.error("Missing required flag: --type <auth-type>");
16522
- console.error(`Supported types: ${VALID_AUTH_TYPES3.join(", ")}`);
16683
+ console.error(`Supported types: ${VALID_AUTH_TYPES4.join(", ")}`);
16523
16684
  process.exit(1);
16524
16685
  }
16525
16686
  const authType = normalizeCliAuthType(parsed.type);
16526
16687
  if (!authType) {
16527
16688
  console.error(`Invalid authentication type: "${parsed.type}"`);
16528
- console.error(`Supported types: ${VALID_AUTH_TYPES3.join(", ")}`);
16689
+ console.error(`Supported types: ${VALID_AUTH_TYPES4.join(", ")}`);
16529
16690
  process.exit(1);
16530
16691
  }
16531
16692
  if (parsed.environment && !normalizeCliEnvironment(parsed.environment)) {
@@ -16618,10 +16779,10 @@ var init_create_credential = __esm({
16618
16779
  // src/commands/update-credential.ts
16619
16780
  var update_credential_exports = {};
16620
16781
  __export(update_credential_exports, {
16621
- parseArgs: () => parseArgs11,
16782
+ parseArgs: () => parseArgs12,
16622
16783
  updateCredentialCommand: () => updateCredentialCommand
16623
16784
  });
16624
- function parseArgs11(args2) {
16785
+ function parseArgs12(args2) {
16625
16786
  let name;
16626
16787
  let rename;
16627
16788
  let orgId;
@@ -16654,7 +16815,7 @@ function parseArgs11(args2) {
16654
16815
  return { name, rename, orgId, description, tags: splitTagRefs(tags), hasTagFlag, environment, stdin, secretPrompt };
16655
16816
  }
16656
16817
  async function updateCredentialCommand(args2) {
16657
- const parsed = parseArgs11(args2);
16818
+ const parsed = parseArgs12(args2);
16658
16819
  if (!parsed.name) {
16659
16820
  console.error("Missing required flag: --name <credential-name>");
16660
16821
  console.error('Usage: wayai update-credential --name "my-key" --stdin');
@@ -17013,9 +17174,9 @@ var init_org = __esm({
17013
17174
  var list_exports = {};
17014
17175
  __export(list_exports, {
17015
17176
  listCommand: () => listCommand,
17016
- parseArgs: () => parseArgs12
17177
+ parseArgs: () => parseArgs13
17017
17178
  });
17018
- function parseArgs12(args2) {
17179
+ function parseArgs13(args2) {
17019
17180
  let orgId;
17020
17181
  let json = false;
17021
17182
  for (let i = 0; i < args2.length; i++) {
@@ -17028,7 +17189,7 @@ function parseArgs12(args2) {
17028
17189
  return { orgId, json };
17029
17190
  }
17030
17191
  async function listCommand(args2) {
17031
- const { orgId, json } = parseArgs12(args2);
17192
+ const { orgId, json } = parseArgs13(args2);
17032
17193
  const { config, accessToken } = await requireAuth();
17033
17194
  const client = new ApiClient({ apiUrl: config.api_url, accessToken });
17034
17195
  const { organizations } = await client.organizations();
@@ -18590,12 +18751,12 @@ var init_admin = __esm({
18590
18751
  });
18591
18752
 
18592
18753
  // src/commands/report-create.ts
18593
- import { readFileSync as readFileSync16 } from "fs";
18754
+ import { readFileSync as readFileSync17 } from "fs";
18594
18755
  import { dirname as dirname8, join as join24 } from "path";
18595
18756
  import { fileURLToPath as fileURLToPath2 } from "url";
18596
18757
  function getCliVersion() {
18597
18758
  try {
18598
- const pkg2 = JSON.parse(readFileSync16(join24(__dirname, "..", "..", "package.json"), "utf-8"));
18759
+ const pkg2 = JSON.parse(readFileSync17(join24(__dirname, "..", "..", "package.json"), "utf-8"));
18599
18760
  return `cli@${pkg2.version}`;
18600
18761
  } catch {
18601
18762
  return "cli@unknown";
@@ -18977,7 +19138,7 @@ var init_update = __esm({
18977
19138
 
18978
19139
  // src/index.ts
18979
19140
  init_sentry();
18980
- import { readFileSync as readFileSync17 } from "fs";
19141
+ import { readFileSync as readFileSync18 } from "fs";
18981
19142
  import { fileURLToPath as fileURLToPath3 } from "url";
18982
19143
  import { dirname as dirname9, join as join25 } from "path";
18983
19144
 
@@ -19156,7 +19317,7 @@ Run \`wayai admin skill install\` to update.`);
19156
19317
 
19157
19318
  // src/index.ts
19158
19319
  var __dirname2 = dirname9(fileURLToPath3(import.meta.url));
19159
- var pkg = JSON.parse(readFileSync17(join25(__dirname2, "..", "package.json"), "utf-8"));
19320
+ var pkg = JSON.parse(readFileSync18(join25(__dirname2, "..", "package.json"), "utf-8"));
19160
19321
  var [, , command, ...args] = process.argv;
19161
19322
  var isBackgroundRefresh = command === REFRESH_COMMAND;
19162
19323
  if (!isBackgroundRefresh) initSentry(command);
@@ -19210,6 +19371,11 @@ async function main() {
19210
19371
  await pushCommand2(args);
19211
19372
  break;
19212
19373
  }
19374
+ case "diff": {
19375
+ const { diffCommand: diffCommand2 } = await Promise.resolve().then(() => (init_diff(), diff_exports));
19376
+ await diffCommand2(args);
19377
+ break;
19378
+ }
19213
19379
  case "use": {
19214
19380
  const { useCommand: useCommand2 } = await Promise.resolve().then(() => (init_use(), use_exports));
19215
19381
  await useCommand2(args);
@@ -19349,8 +19515,9 @@ Commands:
19349
19515
  init Set up .wayai.yaml (pick organization)
19350
19516
  create-credential Create an organization credential (API key, token, etc.)
19351
19517
  update-credential Update / rotate an organization credential (by name)
19352
- pull Fetch hub config and write local files
19518
+ pull Fetch hub config and write local files (also mirrors the linked production hub read-only)
19353
19519
  push Parse local files, show diff, sync to preview (creates hub if new)
19520
+ diff Dry-run diff of local files vs the platform (--production diffs vs the linked production hub)
19354
19521
  org create Create a new organization (you become its owner)
19355
19522
  org <pull|push|diff> Sync org-scoped resources as code (wayai-ws/org/)
19356
19523
  use <hub> Bind this worktree to a specific hub (UUID or folder name)
@@ -19376,7 +19543,8 @@ Commands:
19376
19543
 
19377
19544
  Flags:
19378
19545
  --yes, -y Skip confirmation prompts (useful for CI and scripting)
19379
- --hub <uuid|name> Target hub when the workspace has more than one (push, pull)
19546
+ --hub <uuid|name> Target hub when the workspace has more than one (push, pull, diff)
19547
+ --production Diff local preview files against the linked production hub (diff)
19380
19548
  --name <name> Credential name (create-credential; target for update-credential)
19381
19549
  --type <auth-type> Auth type: "api_key", "bearer", "basic_auth" (create-credential)
19382
19550
  --rename <name> New name for the credential (update-credential)