@xanots/sdk 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +28 -21
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-4W37DGXS.js → agent-file-refresh-QNKN5RYD.js} +3 -3
  5. package/dist/bin.js +8 -7
  6. package/dist/{branch-commands-PBQ36L4A.js → branch-commands-2BLOC2GR.js} +13 -11
  7. package/dist/{capture-7PO6SGB4.js → capture-4WVJY4DQ.js} +2 -2
  8. package/dist/{chunk-ZOYMZZ3S.js → chunk-3INK4Y4E.js} +1 -1
  9. package/dist/{chunk-NDZFBZHC.js → chunk-3UABJA4X.js} +1 -1
  10. package/dist/{chunk-7OXFMCTX.js → chunk-5R73LFWK.js} +3 -3
  11. package/dist/{chunk-OW2QZEWL.js → chunk-5YCQ2QHH.js} +2 -2
  12. package/dist/{chunk-5YQOIFT4.js → chunk-75Z74TA7.js} +2 -2
  13. package/dist/{chunk-QTNO2WD6.js → chunk-7ZYW652H.js} +1 -1
  14. package/dist/{chunk-K3YSQDXJ.js → chunk-ACCBOMCB.js} +91 -74
  15. package/dist/{chunk-4PTSTDIG.js → chunk-AIZKXUNP.js} +2 -2
  16. package/dist/{chunk-P5C2YKAM.js → chunk-ANUDXFEX.js} +18 -27
  17. package/dist/chunk-CTD5ZCV6.js +28 -0
  18. package/dist/{chunk-5HCDZ2XN.js → chunk-DBFU47BJ.js} +2 -2
  19. package/dist/{chunk-OKNSR7MT.js → chunk-DIA7CT7J.js} +129 -150
  20. package/dist/{chunk-JQLR64UC.js → chunk-F6CYJ7TN.js} +21 -6
  21. package/dist/{chunk-BKDJN76G.js → chunk-FE5I6S6N.js} +1 -1
  22. package/dist/{chunk-L6TPHWAU.js → chunk-I7DQDJAM.js} +30 -48
  23. package/dist/{chunk-QIWBCS7N.js → chunk-JGCWTCA7.js} +2 -2
  24. package/dist/{chunk-MDXR5E5Q.js → chunk-K5IOND4K.js} +2 -2
  25. package/dist/{chunk-4PE4ZAB7.js → chunk-KA6G2L7U.js} +5 -5
  26. package/dist/{chunk-QONOJO45.js → chunk-LBYWGMOA.js} +1 -1
  27. package/dist/{chunk-ZZLPTHT5.js → chunk-P6TAVLOX.js} +2 -2
  28. package/dist/{chunk-3QW5NFZJ.js → chunk-QKM4U5UK.js} +3 -3
  29. package/dist/{chunk-T4XPCJRF.js → chunk-TCFIPDB3.js} +1 -1
  30. package/dist/{chunk-UDL46O35.js → chunk-VKSOTZK3.js} +2 -2
  31. package/dist/{chunk-6DHBYBTO.js → chunk-VNQM3V2C.js} +1 -2
  32. package/dist/{chunk-KSV7VOEX.js → chunk-W24FJHPD.js} +3 -3
  33. package/dist/chunk-WGPXT2G2.js +22 -0
  34. package/dist/{chunk-6AAT2AYQ.js → chunk-WP4OZZV4.js} +2 -2
  35. package/dist/{chunk-MU3O43L2.js → chunk-YBC3IKMF.js} +2 -2
  36. package/dist/{chunk-6Z5CNWFC.js → chunk-YYFXVYPX.js} +37 -6
  37. package/dist/chunk-ZQ2PKR6R.js +40 -0
  38. package/dist/cli.d.ts +57 -31
  39. package/dist/cli.js +6 -5
  40. package/dist/codegen-command-GB3H2KQ7.js +46 -0
  41. package/dist/{completion-A6BZ3XGU.js → completion-WF46272M.js} +2 -2
  42. package/dist/{config-NL33PN4D.js → config-476F3PT5.js} +1 -1
  43. package/dist/{deploy-command-5TTI4TUP.js → deploy-command-QTIVA22A.js} +67 -99
  44. package/dist/{ephemeral-command-7TK52YQM.js → ephemeral-command-U4AQ3TXX.js} +25 -28
  45. package/dist/index.d.ts +2 -2
  46. package/dist/index.js +5 -5
  47. package/dist/{init-command-OVFFW4QS.js → init-command-MAXULNAD.js} +13 -10
  48. package/dist/{onboard-command-EHOHKQQU.js → init-web-3JNFG6GI.js} +10 -10
  49. package/dist/internal.d.ts +2 -2
  50. package/dist/internal.js +27 -36
  51. package/dist/{live-diff-QK4KC2FJ.js → live-diff-IXKBVG4K.js} +3 -3
  52. package/dist/{lock-commands-ET7NIOLH.js → lock-commands-DQ7CUMIV.js} +20 -19
  53. package/dist/{login-command-DFCURZLC.js → login-command-Z6CHTA57.js} +7 -7
  54. package/dist/{logout-command-WXVZQCAV.js → logout-command-ER6IKAYJ.js} +2 -2
  55. package/dist/{loop-7SAIGRCZ.js → loop-D5NPL4VH.js} +3 -3
  56. package/dist/{marketplace-command-BCOAAN2I.js → marketplace-command-P4IPLJ6J.js} +6 -6
  57. package/dist/{meta-client-57ZWVHST.js → meta-client-K2J4XH64.js} +6 -6
  58. package/dist/node.d.ts +2 -2
  59. package/dist/node.js +9 -8
  60. package/dist/{validate-command-SK5FPCV7.js → preflight-command-GZ2GE5RN.js} +17 -16
  61. package/dist/{profile-command-QJAAUZIV.js → profile-command-LJSBDV2L.js} +5 -5
  62. package/dist/{release-command-4EXVLYV2.js → release-command-YUBTNHVX.js} +36 -33
  63. package/dist/{routes-manifest-SP3ZXLMR.js → routes-manifest-PWZHDOI5.js} +2 -2
  64. package/dist/scaffold.js +2 -2
  65. package/dist/{static-host-D6KS7X45.js → static-host-3WMV7IZO.js} +1 -1
  66. package/dist/status-command-AL47VG7H.js +162 -0
  67. package/dist/{store-CUCBSYLj.d.ts → store-BG1UPZ3Z.d.ts} +5 -5
  68. package/dist/{test-command-2F5LKMI6.js → test-command-YAZLKLGQ.js} +45 -28
  69. package/dist/{upgrade-command-QL523I62.js → upgrade-command-FB5QJ363.js} +13 -12
  70. package/dist/{workspace-K72NP7SX.js → workspace-2COHDBM3.js} +1 -1
  71. package/dist/{workspace-command-HYA6JEKK.js → workspace-command-43P42FBP.js} +31 -32
  72. package/dist/{workspace-export-AJMGN3CQ.js → workspace-export-DURY5WYL.js} +2 -2
  73. package/guides/README.md +2 -2
  74. package/guides/cli.md +17 -19
  75. package/guides/codegen.md +21 -5
  76. package/guides/coverage.md +1 -1
  77. package/guides/deploying.md +31 -34
  78. package/guides/environment.md +4 -4
  79. package/guides/object-kinds.md +3 -3
  80. package/guides/project-structure.md +1 -1
  81. package/guides/scaffold.md +25 -2
  82. package/guides/typed-frontend.md +1 -1
  83. package/llms/kinds-agent-mcp.md +1 -1
  84. package/llms/kinds-core.md +1 -1
  85. package/llms/kinds-realtime.md +1 -1
  86. package/llms/lock.md +5 -5
  87. package/llms/tests.md +1 -1
  88. package/llms-full.txt +25 -34
  89. package/llms.txt +16 -25
  90. package/manifest.json +95 -426
  91. package/package.json +1 -1
  92. package/dist/chunk-3EYUR3TX.js +0 -100
  93. package/dist/chunk-JQJPFUZI.js +0 -118
  94. package/dist/chunk-YNZFIY4J.js +0 -78
  95. package/dist/codegen-command-YSCSCVT5.js +0 -43
  96. package/dist/env-target-4T7AT347.js +0 -16
  97. package/dist/sandbox-details-command-EDO56IY3.js +0 -18
  98. package/dist/sandbox-export-command-MO6DEZ7Z.js +0 -24
@@ -1,19 +1,21 @@
1
+ import {
2
+ ENV_SPELLINGS
3
+ } from "./chunk-CTD5ZCV6.js";
4
+ import {
5
+ readLockFile,
6
+ writeLockFile
7
+ } from "./chunk-OYMR5AMJ.js";
1
8
  import {
2
9
  UsageError,
3
10
  extraArguments,
4
11
  missingArgument,
5
- removedSubcommand,
6
12
  renderGlobalHelp,
7
13
  renderHelpFor,
8
14
  unknownCommand,
9
15
  unknownFlag,
10
16
  unknownHelpTopic,
11
17
  unknownSubcommand
12
- } from "./chunk-JQLR64UC.js";
13
- import {
14
- readLockFile,
15
- writeLockFile
16
- } from "./chunk-OYMR5AMJ.js";
18
+ } from "./chunk-F6CYJ7TN.js";
17
19
  import {
18
20
  detail,
19
21
  info,
@@ -24,13 +26,13 @@ import {
24
26
  Xano,
25
27
  assertSeedIds,
26
28
  coerceSeedRowValues
27
- } from "./chunk-UDL46O35.js";
29
+ } from "./chunk-VKSOTZK3.js";
28
30
  import {
29
31
  getCommand,
30
32
  getSubcommand,
31
33
  isCommand,
32
34
  suggest
33
- } from "./chunk-OKNSR7MT.js";
35
+ } from "./chunk-DIA7CT7J.js";
34
36
  import {
35
37
  FILTER_NAMES,
36
38
  KNOWLEDGE_DIR,
@@ -44,7 +46,7 @@ import {
44
46
  pathSegment,
45
47
  serializeBundle,
46
48
  tableColumns
47
- } from "./chunk-QONOJO45.js";
49
+ } from "./chunk-LBYWGMOA.js";
48
50
  import {
49
51
  WORKSPACE_KEY,
50
52
  createLockContext,
@@ -338,7 +340,7 @@ function parsePort(raw) {
338
340
  }
339
341
  return n;
340
342
  }
341
- var NOUN_COMMANDS = /* @__PURE__ */ new Set(["sandbox", "profile", "ephemeral", "workspace", "marketplace", "test"]);
343
+ var NOUN_COMMANDS = /* @__PURE__ */ new Set(["profile", "ephemeral", "workspace", "marketplace", "test"]);
342
344
  function helpTargetFor(command, subcommand) {
343
345
  if (command === void 0 || !isCommand(command)) return void 0;
344
346
  return subcommand !== void 0 && getSubcommand(command, subcommand) !== void 0 ? { command, subcommand } : { command };
@@ -383,7 +385,7 @@ function parseArgs(argv) {
383
385
  let check = false;
384
386
  let bundle;
385
387
  let reset = false;
386
- let dest;
388
+ let env;
387
389
  let kind;
388
390
  let concurrency;
389
391
  let test = false;
@@ -411,6 +413,7 @@ function parseArgs(argv) {
411
413
  let name;
412
414
  const ai = [];
413
415
  const marketplace = [];
416
+ let from;
414
417
  let framework;
415
418
  let theme;
416
419
  let radius;
@@ -421,7 +424,9 @@ function parseArgs(argv) {
421
424
  let icons;
422
425
  let force = false;
423
426
  let noInstall = false;
424
- let noVerify = false;
427
+ let skipLiveness = false;
428
+ let skipRoundtrip = false;
429
+ let identityOnly = false;
425
430
  let requireMicroservices = false;
426
431
  let report;
427
432
  let allowSeedInStatic = false;
@@ -471,10 +476,14 @@ function parseArgs(argv) {
471
476
  bundle = arg.slice("--bundle=".length);
472
477
  } else if (arg === "--reset") {
473
478
  reset = true;
474
- } else if (arg === "--dest") {
475
- dest = parseDest(rest[++i]);
476
- } else if (arg.startsWith("--dest=")) {
477
- dest = parseDest(arg.slice("--dest=".length));
479
+ } else if (arg === "--env" || arg.startsWith("--env=")) {
480
+ const value = arg === "--env" ? rest[++i] : arg.slice("--env=".length);
481
+ if (value === void 0 || value === "") {
482
+ throw new UsageError(`--env expects an environment: ${ENV_SPELLINGS}.`, {
483
+ helpFor: helpTargetFor(command, subcommand)
484
+ });
485
+ }
486
+ env = value;
478
487
  } else if (arg === "--kind") {
479
488
  kind = parseKind(rest[++i]);
480
489
  } else if (arg.startsWith("--kind=")) {
@@ -596,6 +605,15 @@ function parseArgs(argv) {
596
605
  icons = rest[++i];
597
606
  } else if (arg.startsWith("--icons=")) {
598
607
  icons = arg.slice("--icons=".length);
608
+ } else if (arg === "--from" || arg.startsWith("--from=")) {
609
+ const value = arg === "--from" ? rest[++i] : arg.slice("--from=".length);
610
+ if (value === void 0 || value === "") {
611
+ throw new UsageError(
612
+ "--from expects a source: workspace, ephemeral:<name>, or a path to a bundle .json.",
613
+ { helpFor: helpTargetFor(command, subcommand) }
614
+ );
615
+ }
616
+ from = value;
599
617
  } else if (arg === "--marketplace" || arg.startsWith("--marketplace=")) {
600
618
  const raw = arg === "--marketplace" ? rest[++i] : arg.slice("--marketplace=".length);
601
619
  for (const p of (raw ?? "").split(",")) {
@@ -614,8 +632,17 @@ function parseArgs(argv) {
614
632
  noInstall = true;
615
633
  } else if (arg === "--allow-seed-in-static") {
616
634
  allowSeedInStatic = true;
635
+ } else if (arg === "--skip-liveness") {
636
+ skipLiveness = true;
637
+ } else if (arg === "--skip-roundtrip") {
638
+ skipRoundtrip = true;
639
+ } else if (arg === "--identity-only") {
640
+ identityOnly = true;
617
641
  } else if (arg === "--no-verify") {
618
- noVerify = true;
642
+ throw new UsageError(
643
+ `\`--no-verify\` was split into three flags that each name what they skip: \`--skip-liveness\` (deploy: waiting for the deploy to come up), \`--skip-roundtrip\` (init --from: the offline re-export check), and \`--identity-only\` (lock prune: loading the entry file).`,
644
+ { helpFor: helpTargetFor(command, subcommand) }
645
+ );
619
646
  } else if (arg === "--require-microservices") {
620
647
  requireMicroservices = true;
621
648
  } else if (arg === "--dry-run") {
@@ -652,6 +679,12 @@ function parseArgs(argv) {
652
679
  `\`--profile\` was removed \u2014 deploy now authenticates via OAuth. Run \`xanots login\` once (or set XANO_REFRESH_TOKEN for CI).`,
653
680
  { helpFor: helpTargetFor(command, subcommand) }
654
681
  );
682
+ } else if (arg === "--dest" || arg.startsWith("--dest=")) {
683
+ const value = arg.startsWith("--dest=") ? arg.slice("--dest=".length) : rest[i + 1];
684
+ throw new UsageError(
685
+ `\`--dest\` is now \`--env\`${value === void 0 || value.startsWith("-") ? "" : ` (\`--env ${value}\`)`}, because it only ever selected an environment to READ \u2014 \`deploy\` and \`release\` each reach exactly one environment and take no flag for it. Environments are ${ENV_SPELLINGS}.`,
686
+ { helpFor: helpTargetFor(command, subcommand) }
687
+ );
655
688
  } else if (arg === "--workspace" || arg.startsWith("--workspace=")) {
656
689
  throw new UsageError(
657
690
  `\`--workspace\` was removed. Every command acts on the workspace its credential is bound to \u2014 pinned at \`xanots login\`, or set as \`workspace_id\` in a meta API token credential. Run \`xanots workspace details\` to see which one that is.`,
@@ -660,7 +693,7 @@ function parseArgs(argv) {
660
693
  } else if (arg === "--prune" || arg === "--confirm-workspace" || arg.startsWith("--confirm-workspace=") || arg === "--adopt-workspace") {
661
694
  const flag = arg.split("=")[0];
662
695
  throw new UsageError(
663
- `\`${flag}\` was removed along with \`xanots workspace deploy\` \u2014 deploy targets are selected with \`xanots deploy --dest <ephemeral|sandbox>\`.`,
696
+ `\`${flag}\` was removed along with \`xanots workspace deploy\` \u2014 \`xanots deploy\` writes to an ephemeral environment, and takes no destination flag.`,
664
697
  { helpFor: helpTargetFor(command, subcommand) }
665
698
  );
666
699
  } else if (arg === "--help" || arg === "-h") {
@@ -696,7 +729,7 @@ function parseArgs(argv) {
696
729
  check,
697
730
  bundle,
698
731
  reset,
699
- dest,
732
+ env,
700
733
  kind,
701
734
  concurrency,
702
735
  test,
@@ -724,6 +757,7 @@ function parseArgs(argv) {
724
757
  name,
725
758
  ai,
726
759
  marketplace,
760
+ from,
727
761
  force,
728
762
  noInstall,
729
763
  framework,
@@ -734,7 +768,9 @@ function parseArgs(argv) {
734
768
  fontMono,
735
769
  fontHeading,
736
770
  icons,
737
- noVerify,
771
+ skipLiveness,
772
+ skipRoundtrip,
773
+ identityOnly,
738
774
  requireMicroservices,
739
775
  report,
740
776
  allowSeedInStatic,
@@ -768,10 +804,6 @@ function parseFormat(raw) {
768
804
  if (raw === "json" || raw === "multidoc") return raw;
769
805
  throw new Error(`--format must be "json" or "multidoc" (got "${raw ?? ""}").`);
770
806
  }
771
- function parseDest(raw) {
772
- if (raw === "sandbox" || raw === "ephemeral" || raw === "workspace") return raw;
773
- throw new Error(`--dest must be "ephemeral", "sandbox" or "workspace" (got "${raw ?? ""}").`);
774
- }
775
807
  function parseKind(raw) {
776
808
  if (raw === "unit" || raw === "workflow") return raw;
777
809
  throw new Error(`--kind must be "unit" or "workflow" (got "${raw ?? ""}").`);
@@ -947,9 +979,12 @@ function warnOrphans(orphans, dropped, cededCanonicals, previous, observed) {
947
979
  }
948
980
  }
949
981
  async function run(argv) {
950
- if (argv[0] === "onboard") {
951
- const { runOnboardCommand } = await import("./onboard-command-EHOHKQQU.js");
952
- return runOnboardCommand(argv.slice(1));
982
+ if (argv[0] === "init") {
983
+ const web = argv.indexOf("--web", 1);
984
+ if (web !== -1) {
985
+ const { runInitWebCommand } = await import("./init-web-3JNFG6GI.js");
986
+ return runInitWebCommand([...argv.slice(1, web), ...argv.slice(web + 1)]);
987
+ }
953
988
  }
954
989
  const helpRequest = resolveHelpRequest(argv);
955
990
  if (helpRequest) {
@@ -969,11 +1004,11 @@ async function run(argv) {
969
1004
  return;
970
1005
  }
971
1006
  if (command === "init") {
972
- const { runInitCommand } = await import("./init-command-OVFFW4QS.js");
1007
+ const { runInitCommand } = await import("./init-command-MAXULNAD.js");
973
1008
  return runInitCommand(args);
974
1009
  }
975
1010
  if (command === "completion") {
976
- const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-A6BZ3XGU.js");
1011
+ const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-WF46272M.js");
977
1012
  const shell = args.positionals[0];
978
1013
  if (shell === void 0 || !isCompletionShell(shell)) {
979
1014
  throw new UsageError(
@@ -984,79 +1019,61 @@ async function run(argv) {
984
1019
  return runCompletionCommand(shell);
985
1020
  }
986
1021
  if (command === "upgrade") {
987
- const { runUpgradeCommand } = await import("./upgrade-command-QL523I62.js");
1022
+ const { runUpgradeCommand } = await import("./upgrade-command-FB5QJ363.js");
988
1023
  return runUpgradeCommand(args);
989
1024
  }
990
1025
  if (command === "lock") {
991
- const { runLockCommand } = await import("./lock-commands-ET7NIOLH.js");
1026
+ const { runLockCommand } = await import("./lock-commands-DQ7CUMIV.js");
992
1027
  return runLockCommand(args);
993
1028
  }
994
1029
  if (command === "login") {
995
- const { runLoginCommand } = await import("./login-command-DFCURZLC.js");
1030
+ const { runLoginCommand } = await import("./login-command-Z6CHTA57.js");
996
1031
  return runLoginCommand(args);
997
1032
  }
998
1033
  if (command === "logout") {
999
- const { runLogoutCommand } = await import("./logout-command-WXVZQCAV.js");
1034
+ const { runLogoutCommand } = await import("./logout-command-ER6IKAYJ.js");
1000
1035
  return runLogoutCommand(args);
1001
1036
  }
1002
1037
  if (command === "deploy") {
1003
- const { runDeployCommand } = await import("./deploy-command-5TTI4TUP.js");
1038
+ const { runDeployCommand } = await import("./deploy-command-QTIVA22A.js");
1004
1039
  return runDeployCommand(args);
1005
1040
  }
1006
1041
  if (command === "ephemeral") {
1007
- const { runEphemeralCommand } = await import("./ephemeral-command-7TK52YQM.js");
1042
+ const { runEphemeralCommand } = await import("./ephemeral-command-U4AQ3TXX.js");
1008
1043
  return runEphemeralCommand(args);
1009
1044
  }
1010
1045
  if (command === "release") {
1011
- const { runReleaseCommand } = await import("./release-command-4EXVLYV2.js");
1046
+ const { runReleaseCommand } = await import("./release-command-YUBTNHVX.js");
1012
1047
  return runReleaseCommand(args);
1013
1048
  }
1014
- if (command === "sandbox") {
1015
- if (args.subcommand === "deploy") {
1016
- throw removedSubcommand("sandbox", "deploy");
1017
- }
1018
- if (args.subcommand === "details") {
1019
- const { runSandboxDetailsCommand } = await import("./sandbox-details-command-EDO56IY3.js");
1020
- return runSandboxDetailsCommand(args);
1021
- }
1022
- if (args.subcommand === "export") {
1023
- const { runSandboxExportCommand } = await import("./sandbox-export-command-MO6DEZ7Z.js");
1024
- return runSandboxExportCommand(args);
1025
- }
1026
- if (args.subcommand === "codegen") {
1027
- const { runCodegenCommand } = await import("./codegen-command-YSCSCVT5.js");
1028
- return runCodegenCommand(args, { kind: "sandbox" });
1029
- }
1030
- throw unknownSubcommand("sandbox", args.subcommand);
1031
- }
1032
1049
  if (command === "test") {
1033
- const { runTestCommand } = await import("./test-command-2F5LKMI6.js");
1050
+ const { runTestCommand } = await import("./test-command-YAZLKLGQ.js");
1034
1051
  return runTestCommand(args);
1035
1052
  }
1036
1053
  if (command === "workspace") {
1037
- const { runWorkspaceCommand } = await import("./workspace-command-HYA6JEKK.js");
1054
+ const { runWorkspaceCommand } = await import("./workspace-command-43P42FBP.js");
1038
1055
  return runWorkspaceCommand(args);
1039
1056
  }
1040
- if (command === "codegen") {
1041
- const { runCodegenCommand } = await import("./codegen-command-YSCSCVT5.js");
1042
- return runCodegenCommand(args, { kind: "file" });
1057
+ if (command === "status") {
1058
+ const { runStatusCommand } = await import("./status-command-AL47VG7H.js");
1059
+ return runStatusCommand(args);
1060
+ }
1061
+ if (command === "whoami") {
1062
+ const { runProfileCommand } = await import("./profile-command-LJSBDV2L.js");
1063
+ return runProfileCommand(args);
1043
1064
  }
1044
1065
  if (command === "profile") {
1045
1066
  if (args.subcommand !== "me") {
1046
1067
  throw unknownSubcommand("profile", args.subcommand);
1047
1068
  }
1048
- const { runProfileCommand } = await import("./profile-command-QJAAUZIV.js");
1049
- return runProfileCommand(args);
1050
- }
1051
- if (command === "whoami") {
1052
- const { runProfileCommand } = await import("./profile-command-QJAAUZIV.js");
1069
+ const { runProfileCommand } = await import("./profile-command-LJSBDV2L.js");
1053
1070
  return runProfileCommand(args);
1054
1071
  }
1055
1072
  if (command === "marketplace") {
1056
1073
  if (!["list", "search", "details", "install"].includes(args.subcommand ?? "")) {
1057
1074
  throw unknownSubcommand("marketplace", args.subcommand);
1058
1075
  }
1059
- const marketplace = await import("./marketplace-command-BCOAAN2I.js");
1076
+ const marketplace = await import("./marketplace-command-P4IPLJ6J.js");
1060
1077
  if (args.subcommand === "list") return marketplace.runMarketplaceListCommand(args);
1061
1078
  if (args.subcommand === "search") return marketplace.runMarketplaceSearchCommand(args);
1062
1079
  if (args.subcommand === "details") return marketplace.runMarketplaceDetailsCommand(args);
@@ -1065,9 +1082,9 @@ async function run(argv) {
1065
1082
  if (command === "push") {
1066
1083
  throw unknownCommand("push");
1067
1084
  }
1068
- if (command === "validate") {
1069
- const { runValidateCommand } = await import("./validate-command-SK5FPCV7.js");
1070
- return runValidateCommand(args);
1085
+ if (command === "preflight") {
1086
+ const { runPreflightCommand } = await import("./preflight-command-GZ2GE5RN.js");
1087
+ return runPreflightCommand(args);
1071
1088
  }
1072
1089
  if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
1073
1090
  throw unknownCommand(command);
@@ -1098,7 +1115,7 @@ async function run(argv) {
1098
1115
  }
1099
1116
  async function refreshAgentGuidance() {
1100
1117
  try {
1101
- const { refreshAgentFiles } = await import("./agent-file-refresh-4W37DGXS.js");
1118
+ const { refreshAgentFiles } = await import("./agent-file-refresh-QNKN5RYD.js");
1102
1119
  const refreshed = refreshAgentFiles({
1103
1120
  projectDir: process.cwd(),
1104
1121
  sdkVersion: readVersion()
@@ -1130,7 +1147,7 @@ async function runCompile(args) {
1130
1147
  const def = await loadDefault(file);
1131
1148
  if (Xano.isXano(def)) {
1132
1149
  throw new Error(
1133
- `Module "${file}" default-exports a workspace \u2014 use \`xanots export\` (or \`xanots paths\`) for a workspace entry. \`compile\` takes a single object def (a query, function, table, \u2026) and prints its JSON artifact.`
1150
+ `Module "${file}" default-exports a workspace \u2014 use \`xanots export\` (or \`xanots routes\`) for a workspace entry. \`compile\` takes a single object def (a query, function, table, \u2026) and prints its JSON artifact.`
1134
1151
  );
1135
1152
  }
1136
1153
  if (!def || typeof def !== "object" || typeof def.name !== "string") {
@@ -1214,7 +1231,7 @@ async function runPaths(args) {
1214
1231
  return;
1215
1232
  }
1216
1233
  if (unresolved.length === 0) {
1217
- const { renderRouteManifest } = await import("./routes-manifest-SP3ZXLMR.js");
1234
+ const { renderRouteManifest } = await import("./routes-manifest-PWZHDOI5.js");
1218
1235
  const source = renderRouteManifest(
1219
1236
  resolved.map((r) => ({ name: r.name, verb: r.verb, canonical: r.canonical })),
1220
1237
  describableServers.length > 0 ? { servers: describableServers, channels: channelRows } : void 0
@@ -1226,7 +1243,7 @@ async function runPaths(args) {
1226
1243
  const current = existsSync(args.emit) ? readFileSync3(args.emit, "utf8") : void 0;
1227
1244
  if (current !== source) {
1228
1245
  throw new Error(
1229
- `--strict: ${args.emit} is ${current === void 0 ? "missing" : "out of date"}. Run \`xanots paths <entry> --emit ${args.emit}\` and commit the result \u2014 a stale route manifest keeps compiling while the endpoints have moved.`
1246
+ `--strict: ${args.emit} is ${current === void 0 ? "missing" : "out of date"}. Run \`xanots routes <entry> --emit ${args.emit}\` and commit the result \u2014 a stale route manifest keeps compiling while the endpoints have moved.`
1230
1247
  );
1231
1248
  }
1232
1249
  info(`${args.emit} is up to date (${count}).`);
@@ -1246,7 +1263,7 @@ async function runPaths(args) {
1246
1263
  if (unresolved.length > 0) {
1247
1264
  const names = unresolved.map((r) => `"${r.name}"`).join(", ");
1248
1265
  throw new Error(
1249
- `paths: cannot resolve the api group's canonical URL token for ${unresolved.length} query(ies): ${names}. Set an explicit \`apiGroup({ canonical })\`, or run \`xanots export ${file} --lock\` once (it mints a unique canonical and freezes it in xano.lock) beside the entry, then re-run \`xanots paths\`.`
1266
+ `paths: cannot resolve the api group's canonical URL token for ${unresolved.length} query(ies): ${names}. Set an explicit \`apiGroup({ canonical })\`, or run \`xanots export ${file} --lock\` once (it mints a unique canonical and freezes it in xano.lock) beside the entry, then re-run \`xanots routes\`.`
1250
1267
  );
1251
1268
  }
1252
1269
  }
@@ -1331,4 +1348,4 @@ export {
1331
1348
  exportBundleJson,
1332
1349
  compileBundle
1333
1350
  };
1334
- //# sourceMappingURL=chunk-K3YSQDXJ.js.map
1351
+ //# sourceMappingURL=chunk-ACCBOMCB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  UsageError
3
- } from "./chunk-JQLR64UC.js";
3
+ } from "./chunk-F6CYJ7TN.js";
4
4
  import {
5
5
  style
6
6
  } from "./chunk-EZG76F7R.js";
@@ -56,4 +56,4 @@ export {
56
56
  confirm,
57
57
  promptLine
58
58
  };
59
- //# sourceMappingURL=chunk-4PTSTDIG.js.map
59
+ //# sourceMappingURL=chunk-AIZKXUNP.js.map
@@ -36,7 +36,7 @@ function renderPackageJson({ appName, sdkVersion }, preset, choice = defaultThem
36
36
  // delete-and-recreate instead of rename-in-place. The lock has to be
37
37
  // adopted BEFORE the identities matter — by the time a rename lands
38
38
  // against data anyone cares about, the guids have already drifted and
39
- // recovery is `xanots lock adopt`. The scaffold is the earliest possible
39
+ // recovery is `xanots lock import`. The scaffold is the earliest possible
40
40
  // moment, so it opts in from the first export (issue #26). Once the file
41
41
  // exists every export uses it, flag or not.
42
42
  "xano:export": `${check} && xanots export ./xano/index.ts --out workspace.json --lock`,
@@ -226,7 +226,9 @@ npm run xano:deploy # build the frontend, then ship it with the backend
226
226
  - \`npm run xano:deploy\` deploys the backend and the built frontend to a live
227
227
  **ephemeral** environment and prints its URL. Run it again to refresh the same
228
228
  environment; if it expired, a fresh one is created and the new URL is called out.
229
- - Deploying to your throwaway singleton sandbox instead: \`xanots deploy ./xano/index.ts --dest sandbox\`.
229
+ - \`xanots status\` says who you are signed in as, which workspace you are bound to, and
230
+ which environment this project last deployed to \u2014 its URL, and when it expires. You
231
+ never have to remember the environment's name.
230
232
  - \`npm run xano:test\` runs the tests the DEPLOYED environment carries \u2014 the \`tests\`
231
233
  on a query/function/middleware and any \`workflowTest()\`. It compiles nothing, so
232
234
  deploy first. A failing suite exits 5, distinct from a crash. \`xanots deploy
@@ -243,7 +245,7 @@ public URLs).
243
245
 
244
246
  It is created by \`npm run xano:export\` or \`npm run xano:deploy\`, and **must be
245
247
  committed**. Adopt it from the first export: once identities have drifted, the
246
- recovery path is \`xanots lock adopt <live-bundle.json> --lock=xano/xano.lock\`
248
+ recovery path is \`xanots lock import <live-bundle.json> --lock=xano/xano.lock\`
247
249
  against the deployed workspace.
248
250
 
249
251
  \`\`\`bash
@@ -252,7 +254,7 @@ npm run xano:check # CI: fail if the export would change xano.lock
252
254
 
253
255
  To rename an object: rename it in code, run \`npm run xano:export\` (stderr prints
254
256
  the exact fix-up), run \`xanots lock rename <kind> <old> <new> --lock=xano/xano.lock\`,
255
- then export again. \`lock rename\` and \`lock adopt\` need that flag here \u2014 they take no
257
+ then export again. \`lock rename\` and \`lock import\` need that flag here \u2014 they take no
256
258
  entry file, so they look for the lock in the current directory, while
257
259
  \`lock prune ./xano/index.ts\` derives it from the entry like \`export\` does.
258
260
 
@@ -267,7 +269,7 @@ body \u2014 change a def and the frontend types follow.
267
269
  > file with \`tsx <file.ts>\` **from inside the project root** \u2014 not \`tsx -e\`, not
268
270
  > bare \`node file.ts\`, and not from another directory (they mis-resolve the
269
271
  > intra-workspace \`.js\` imports and the \`@xanots/sdk\` specifier). Or use
270
- > \`xanots paths xano/index.ts\` to list every endpoint's verb + path.
272
+ > \`xanots routes xano/index.ts\` to list every endpoint's verb + path.
271
273
 
272
274
  ## The frontend
273
275
 
@@ -450,17 +452,8 @@ kind.
450
452
  ### Event-driven objects
451
453
 
452
454
  A scheduled \`task\`, an \`mcpServer\`, and every trigger **fire normally on an
453
- ephemeral** \u2014 \`deploy\`'s default destination \u2014 so test them by deploying and
454
- letting them run.
455
-
456
- Under \`--dest sandbox\` they **deploy but do not fire**: they import cleanly, never
457
- execute, and there's no way to fire one manually (a table insert/update/delete does
458
- NOT run its trigger). Only synchronously-invoked objects \u2014 queries, functions, and
459
- the agents an endpoint calls with \`s.ai.agent.run\` \u2014 run there. If you must stay on
460
- the sandbox, factor the body into a \`defineFunction\` you can also call directly
461
- (e.g. from a query via \`s.function.run\`) and put the assertions on THAT \u2014 a
462
- \`tests\` entry on the function, or a \`workflowTest\` that calls it. See
463
- \`llms.txt\` for the full guidance.
455
+ ephemeral** \u2014 where \`deploy\` sends them \u2014 so test them by deploying and letting
456
+ them run.
464
457
 
465
458
  ## Wire the frontend
466
459
 
@@ -478,15 +471,13 @@ Keep the client bundle lean (**split route metadata from stack-heavy authoring**
478
471
  \u2014 drags that whole graph in. For those, don't import the def in the browser:
479
472
  declare its \`{ path, verb }\` as plain metadata (see the \`ROUTES\` example in
480
473
  \`api.ts\`) and verify it against the compiled bundle with
481
- \`npx xanots paths xano/index.ts\`.
474
+ \`npx xanots routes xano/index.ts\`.
482
475
  `;
483
476
  }
484
477
  function describeOrigin(o) {
485
478
  switch (o.source) {
486
479
  case "workspace":
487
480
  return `workspace ${o.origin}`;
488
- case "sandbox":
489
- return "the sandbox workspace";
490
481
  case "ephemeral":
491
482
  return `ephemeral "${o.origin}"`;
492
483
  case "file":
@@ -500,7 +491,7 @@ function renderCodegenMarker({ sdkVersion }, origin, generatedAt, report) {
500
491
  origin: origin.origin,
501
492
  sdkVersion,
502
493
  generatedAt,
503
- note: "Written by `xanots \u2026 codegen`. Its presence lets a re-run refresh xano/ in place.",
494
+ note: "Written by `xanots init --from`. Its presence lets a re-run refresh xano/ in place.",
504
495
  // The findings, so parity is trackable release over release and gateable
505
496
  // in CI without scraping stderr. Omitted rather than written empty when
506
497
  // the caller has none to record.
@@ -536,11 +527,11 @@ npm run xano:deploy # typecheck, build the frontend, ship both
536
527
 
537
528
  ## Read this before deploying
538
529
 
539
- - **\`xano/\` is disposable.** Re-running \`xanots \u2026 codegen\` on this directory
530
+ - **\`xano/\` is disposable.** Re-running \`xanots init --from\` on this directory
540
531
  rewrites it wholesale \u2014 no merge, no diff, no preservation of hand edits. The rest of
541
532
  the project (this README, \`package.json\`, \`frontend/\`) is yours and is left alone.
542
533
  - **Deploying is a full replace.** The import path clears the target workspace and
543
- re-imports. Send this only to an **ephemeral or sandbox** environment \u2014 never to a
534
+ re-imports. Send this only to an **ephemeral** environment \u2014 never to a
544
535
  workspace holding data you care about. That is why \`npm run xano:deploy\` targets an
545
536
  ephemeral env and there is no deploy-to-your-real-workspace command.
546
537
  - **This is schema only.** Table rows are not carried, and neither are payload sections
@@ -555,7 +546,7 @@ ${secrets}
555
546
  npm run dev # run the starter frontend
556
547
  npm run typecheck # the whole project, both halves
557
548
  npm run xano:export # compile the backend to workspace.json (don't commit it)
558
- npx xanots paths xano/index.ts # list every endpoint's verb + path
549
+ npx xanots routes xano/index.ts # list every endpoint's verb + path
559
550
  \`\`\`
560
551
 
561
552
  [\`frontend/src/lib/api.ts\`](frontend/src/lib/api.ts) shows the one contract: derive
@@ -644,7 +635,7 @@ function codegenLanding({ appName }, origin) {
644
635
  ],
645
636
  [
646
637
  { text: "List the endpoints: " },
647
- { code: "npx xanots paths xano/index.ts" },
638
+ { code: "npx xanots routes xano/index.ts" },
648
639
  { text: ", then wire them up in " },
649
640
  { code: "frontend/src/lib/api.ts" },
650
641
  { text: "." }
@@ -821,7 +812,7 @@ function renderApiTs() {
821
812
  // those s.*/c.* factory calls run at module load and can't be tree-shaken out.
822
813
  // \u2022 For such a stack-heavy endpoint, don't import its def in the browser at all \u2014
823
814
  // declare its { path, verb } in the ROUTES table below and verify it against
824
- // the compiled bundle with \`npx xanots paths xano/index.ts\`.
815
+ // the compiled bundle with \`npx xanots routes xano/index.ts\`.
825
816
  //
826
817
  // This starter has no endpoints yet. Once you add one in xano/, wire it like:
827
818
  //
@@ -847,7 +838,7 @@ function renderApiTs() {
847
838
  // }
848
839
  //
849
840
  // The stack-heavy escape hatch \u2014 plain metadata, no def import, no bundle cost.
850
- // Keep it in sync with \`npx xanots paths xano/index.ts\` (it prints verb + path):
841
+ // Keep it in sync with \`npx xanots routes xano/index.ts\` (it prints verb + path):
851
842
  //
852
843
  // export const ROUTES = {
853
844
  // triageRequest: { path: "/api:notes/triage_request", verb: "POST" },
@@ -887,4 +878,4 @@ export {
887
878
  renderCnUtil,
888
879
  renderApiTs
889
880
  };
890
- //# sourceMappingURL=chunk-P5C2YKAM.js.map
881
+ //# sourceMappingURL=chunk-ANUDXFEX.js.map
@@ -0,0 +1,28 @@
1
+ import {
2
+ UsageError
3
+ } from "./chunk-F6CYJ7TN.js";
4
+
5
+ // src/emit/env-selector.ts
6
+ var ENV_SPELLINGS = "workspace, ephemeral, or ephemeral:<name>";
7
+ function parseEnvSelector(raw) {
8
+ if (raw === "workspace") return { kind: "workspace" };
9
+ if (raw === "ephemeral") return { kind: "ephemeral" };
10
+ if (raw.startsWith("ephemeral:")) {
11
+ const name = raw.slice("ephemeral:".length);
12
+ return name === "" ? void 0 : { kind: "ephemeral", name };
13
+ }
14
+ return void 0;
15
+ }
16
+ function unknownEnv(flag, raw, helpFor) {
17
+ return new UsageError(
18
+ `${flag} does not take "${raw}". Environments are ${ENV_SPELLINGS} (\`xanots ephemeral list\` shows the names; bare \`ephemeral\` is the one this project last deployed to).`,
19
+ { helpFor }
20
+ );
21
+ }
22
+
23
+ export {
24
+ ENV_SPELLINGS,
25
+ parseEnvSelector,
26
+ unknownEnv
27
+ };
28
+ //# sourceMappingURL=chunk-CTD5ZCV6.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  deepEqual,
3
3
  normalize
4
- } from "./chunk-ZOYMZZ3S.js";
4
+ } from "./chunk-3INK4Y4E.js";
5
5
 
6
6
  // src/deploy/live-diff.ts
7
7
  function rows(bundle, key) {
@@ -254,4 +254,4 @@ export {
254
254
  sharedSchemaChanges,
255
255
  compareToLive
256
256
  };
257
- //# sourceMappingURL=chunk-5HCDZ2XN.js.map
257
+ //# sourceMappingURL=chunk-DBFU47BJ.js.map