@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
@@ -5,7 +5,6 @@ function renderArgs(args) {
5
5
  var HELP_GROUP_ORDER = [
6
6
  "Author",
7
7
  "Deploy",
8
- "Pull",
9
8
  "Environments",
10
9
  "Account",
11
10
  "Maintenance"
@@ -22,10 +21,12 @@ var FLAGS = {
22
21
  yes: { spec: "--yes, -y", summary: "Confirm a destructive action non-interactively" },
23
22
  bundle: { spec: "--bundle <path>", summary: "Use an already-exported bundle instead of an entry file" },
24
23
  reset: { spec: "--reset", summary: "Accepted but redundant \u2014 every deploy is a full replace" },
25
- dest: {
26
- spec: "--dest <ephemeral|sandbox>",
27
- summary: "Which environment to import into (default: ephemeral)",
28
- values: ["ephemeral", "sandbox"]
24
+ env: {
25
+ spec: "--env <target>",
26
+ summary: "Which environment to read: workspace, ephemeral (the one this project last deployed to), or ephemeral:<name>",
27
+ // Completion offers the two that stand alone, default first; `ephemeral:`
28
+ // needs a name glued to it, which no menu can supply.
29
+ values: ["ephemeral", "workspace"]
29
30
  },
30
31
  kind: {
31
32
  spec: "--kind <unit|workflow>",
@@ -56,7 +57,23 @@ var FLAGS = {
56
57
  spec: "--test",
57
58
  summary: "After deploying, run the environment's tests; a failure exits 5 without retracting the deploy"
58
59
  },
59
- "no-verify": { spec: "--no-verify", summary: "Skip the post-deploy liveness checks (static host, microservices); on the codegen commands it skips the offline round-trip check instead" },
60
+ // Three flags where there was one. `--no-verify` meant a post-deploy liveness
61
+ // probe, an offline round-trip diff, and "do not load the entry file" — three
62
+ // unrelated checks whose only shared property was the word "verify", so the
63
+ // one summary had to say "instead" mid-sentence and a reader had to know
64
+ // which command they were on to know what they were turning off.
65
+ "skip-liveness": {
66
+ spec: "--skip-liveness",
67
+ summary: "Do not wait to confirm the deploy came up (static host, microservices)"
68
+ },
69
+ "skip-roundtrip": {
70
+ spec: "--skip-roundtrip",
71
+ summary: "Do not check that the written tree re-exports as it was pulled (offline; no network, no deploy)"
72
+ },
73
+ "identity-only": {
74
+ spec: "--identity-only",
75
+ summary: "Act on the named lock entries without loading the entry file"
76
+ },
60
77
  "require-microservices": {
61
78
  spec: "--require-microservices",
62
79
  summary: "Fail the deploy (exit 4) when a microservice is not ready by the end of the wait"
@@ -131,11 +148,32 @@ var FLAGS = {
131
148
  spec: "--marketplace <pkgs>",
132
149
  summary: "Add-on packages to install and register, comma-separated"
133
150
  },
151
+ from: {
152
+ spec: "--from <source>",
153
+ summary: "Fill xano/ by decoding an existing backend instead of writing the empty starter: workspace, ephemeral:<name>, or a path to a bundle .json",
154
+ // Completion offers the one that stands alone. `ephemeral:` needs an env
155
+ // name glued to it and a bundle is a path, so neither is a value a menu
156
+ // could complete without inventing the half that identifies it.
157
+ values: ["workspace"]
158
+ },
159
+ web: {
160
+ spec: "--web",
161
+ summary: "Collect the scaffold options in a browser instead of on the command line"
162
+ },
134
163
  check: {
135
164
  spec: "--check",
136
165
  summary: "Report whether an upgrade is available and exit 7, without installing it"
137
166
  },
138
- force: { spec: "--force", summary: "Scaffold into a non-empty directory (overwriting our own files)" },
167
+ /**
168
+ * One meaning, everywhere: OVERWRITE something that already exists.
169
+ *
170
+ * `--yes` is the other half of the pair and means "do not ask me". They were
171
+ * synonyms on three commands, where `--force` bought a second spelling for a
172
+ * confirmation prompt and nothing else — so a reader could not tell, from the
173
+ * flag alone, whether a command was going to overwrite anything. No command
174
+ * takes both.
175
+ */
176
+ force: { spec: "--force", summary: "Overwrite something that already exists" },
139
177
  "no-install": { spec: "--no-install", summary: "Skip the post-scaffold npm install" },
140
178
  "dry-run": { spec: "--dry-run", summary: "Print what would change and exit without sending it" },
141
179
  prune: { spec: "--prune", summary: "Also delete workspace objects your project no longer defines" },
@@ -166,15 +204,7 @@ var FLAGS = {
166
204
  };
167
205
  var GLOBAL_FLAGS = ["json", "help", "version"];
168
206
  var AUTH = ["origin", "config", "local"];
169
- var READ_DEST = {
170
- key: "dest",
171
- summary: "Which environment to read (default: ephemeral)",
172
- values: ["ephemeral", "sandbox", "workspace"]
173
- };
174
- var TEST_ENV = {
175
- key: "name",
176
- summary: "Ephemeral env to target (default: the one this project last deployed to)"
177
- };
207
+ var READ_ENV = "env";
178
208
  var COMPILE = ["lock", "frozen-lock", "strict"];
179
209
  var SCAFFOLD = [
180
210
  { key: "name", summary: "Project name (default: the target directory's basename)" },
@@ -187,13 +217,9 @@ var SCAFFOLD = [
187
217
  "font-heading",
188
218
  "icons",
189
219
  "ai",
190
- "force",
220
+ { key: "force", summary: "Overwrite our own files in a non-empty target directory" },
191
221
  "no-install"
192
222
  ];
193
- var CODEGEN_NO_VERIFY = {
194
- key: "no-verify",
195
- summary: "Skip the offline round-trip check that the written tree re-exports (no network, no deploy)"
196
- };
197
223
  var COMMANDS = {
198
224
  // ── Author ──────────────────────────────────────────────────────────────
199
225
  compile: {
@@ -217,48 +243,46 @@ var COMMANDS = {
217
243
  flags: ["out", ...COMPILE],
218
244
  example: "xanots export ./index.ts --out bundle.json"
219
245
  },
220
- paths: {
246
+ routes: {
221
247
  group: "Author",
222
- display: "paths <file>",
248
+ display: "routes <file>",
223
249
  summary: "List each query's verb + resolved api:<canonical>/<name>",
224
250
  args: [{ name: "file", required: true, path: true }],
225
251
  flags: ["lock", "emit", "strict"],
226
- example: "xanots paths ./index.ts --emit xano/routes.gen.ts"
252
+ example: "xanots routes ./index.ts --emit xano/routes.gen.ts"
227
253
  },
228
- routes: {
254
+ // `routes` is the canonical spelling: it is the word every web framework uses
255
+ // for this list, where `paths` is OpenAPI's term for the same thing and reads
256
+ // as filesystem paths to everyone else. `paths` still dispatches — it is what
257
+ // the command was called — but it is off the menu.
258
+ paths: {
229
259
  group: "Author",
230
- display: "routes <file>",
231
- summary: "Alias for `paths`",
232
- aliasOf: "paths",
260
+ display: "paths <file>",
261
+ summary: "Alias for `routes`",
262
+ aliasOf: "routes",
233
263
  args: [{ name: "file", required: true, path: true }],
234
264
  flags: ["lock", "emit", "strict"]
235
265
  },
236
266
  init: {
237
267
  group: "Author",
238
268
  display: "init [dir]",
239
- summary: "Scaffold a new XanoTS project",
269
+ summary: "Scaffold a XanoTS project \u2014 empty, or filled from an existing backend",
240
270
  args: [{ name: "dir", required: false, path: true }],
241
- // `--marketplace` is init's alone, not SCAFFOLD's: `codegen` writes a
242
- // project around a workspace that already exists, and adding add-ons to
243
- // one is `marketplace install`, not a scaffold decision.
244
- flags: [...SCAFFOLD, "marketplace"],
245
- // One flag from each axis the command now has look, theme, add-ons —
271
+ // Two axes on top of the shared scaffold flags: WHERE `xano/` comes from
272
+ // (`--from`) and HOW the options were collected (`--web`). They compose
273
+ // a browser-chosen shell around a decoded workspace is one invocation.
274
+ //
275
+ // `--marketplace` rides with them but is not in SCAFFOLD: a `--from` run
276
+ // writes a project around a workspace that already exists, and adding
277
+ // add-ons to one is `marketplace install`, not a scaffold decision.
278
+ //
279
+ // `--report`, `--skip-roundtrip` and the auth flags only bite under `--from`;
280
+ // passing them without it is a usage error rather than a silent no-op.
281
+ flags: [...SCAFFOLD, "marketplace", "from", "web", "skip-roundtrip", "report", ...AUTH],
282
+ // One flag from each axis the command now has — look, AI files, add-ons —
246
283
  // rather than every flag it accepts.
247
284
  example: "xanots init my-app --theme zinc-blue --ai claude --marketplace @xanots/auth"
248
285
  },
249
- onboard: {
250
- group: "Author",
251
- display: "onboard [dir]",
252
- summary: "Pick a framework, theme and add-ons in a browser, then scaffold",
253
- // Variadic, and deliberately flagless. This command does not PARSE its
254
- // arguments — it forwards them to a package it launches (see
255
- // onboard-command.ts), so the arity check must budget for a tail it cannot
256
- // describe. Declaring the configurator's flags here would freeze them: a
257
- // flag added there would be rejected here until the SDK released, which is
258
- // the coupling launching-instead-of-depending exists to avoid.
259
- args: [{ name: "dir", required: false, path: true, variadic: true }],
260
- example: "xanots onboard my-app"
261
- },
262
286
  marketplace: {
263
287
  group: "Author",
264
288
  display: "marketplace <list|search|details|install>",
@@ -295,10 +319,11 @@ var COMMANDS = {
295
319
  deploy: {
296
320
  group: "Deploy",
297
321
  display: "deploy <file>",
298
- summary: "Ship to a live ephemeral env (or --dest sandbox) \u2192 URL",
322
+ summary: "Ship to a live ephemeral env \u2192 URL",
299
323
  args: [{ name: "file", required: true, path: true, satisfiedBy: ["bundle"] }],
324
+ // No environment flag: an ephemeral is the only one a deploy can replace,
325
+ // so there is nothing to choose. `assertNoEnv` says so if one is passed.
300
326
  flags: [
301
- "dest",
302
327
  "expires-hours",
303
328
  { key: "name", summary: "Display name for the ephemeral env (default: the workspace name)" },
304
329
  "bundle",
@@ -307,7 +332,7 @@ var COMMANDS = {
307
332
  "static-routing",
308
333
  "static-env",
309
334
  "allow-seed-in-static",
310
- "no-verify",
335
+ "skip-liveness",
311
336
  "require-microservices",
312
337
  "test",
313
338
  "open",
@@ -334,13 +359,12 @@ var COMMANDS = {
334
359
  "allow-shared-schema-changes",
335
360
  "backup-branch",
336
361
  "yes",
337
- { key: "force", summary: "Skip the confirmation prompt (same as --yes)" },
338
362
  "static",
339
363
  "static-host",
340
364
  "static-routing",
341
365
  "static-env",
342
366
  "allow-seed-in-static",
343
- "no-verify",
367
+ "skip-liveness",
344
368
  ...COMPILE,
345
369
  ...AUTH
346
370
  ],
@@ -353,31 +377,23 @@ var COMMANDS = {
353
377
  unreleasedFlags: ["branch", "set-live", "allow-shared-schema-changes", "backup-branch"],
354
378
  example: "xanots release ./index.ts --dry-run"
355
379
  },
356
- validate: {
380
+ preflight: {
357
381
  group: "Deploy",
358
- display: "validate <file>",
359
- summary: "Deploy to a throwaway tenant and verify the round-trip",
382
+ display: "preflight <file>",
383
+ // Says "deploy" in the summary because the name has to keep signalling the
384
+ // cost: this authenticates, creates a throwaway environment, and imports
385
+ // into it. `validate` read as a local type-check, which is what people
386
+ // reached for first and what this is not.
387
+ summary: "Deploy to a throwaway tenant and verify the round-trip (needs auth)",
360
388
  args: [{ name: "file", required: true, path: true, satisfiedBy: ["bundle"] }],
361
389
  flags: ["bundle", "runtime", "capture", "verbose", "instance", "out", ...COMPILE],
362
- example: "xanots validate ./index.ts --runtime"
363
- },
364
- // ── Pull ────────────────────────────────────────────────────────────────
365
- codegen: {
366
- group: "Pull",
367
- display: "codegen <bundle> <path>",
368
- summary: "A bundle JSON file \u2192 a runnable XanoTS project (offline)",
369
- args: [
370
- { name: "bundle.json", required: true, path: true },
371
- { name: "path", required: true, path: true }
372
- ],
373
- flags: [...SCAFFOLD, CODEGEN_NO_VERIFY],
374
- example: "xanots codegen ./bundle.json ./app"
390
+ example: "xanots preflight ./index.ts --runtime"
375
391
  },
376
392
  // ── Environments ────────────────────────────────────────────────────────
377
393
  workspace: {
378
394
  group: "Environments",
379
395
  display: "workspace",
380
- summary: "Read your real workspace \u2014 details, export, codegen",
396
+ summary: "Read your real workspace \u2014 details and export",
381
397
  subcommands: {
382
398
  details: {
383
399
  summary: "Which instance and workspace am I bound to?",
@@ -402,25 +418,16 @@ var COMMANDS = {
402
418
  flags: ["yes", ...AUTH],
403
419
  example: "xanots workspace branch list"
404
420
  },
405
- codegen: {
406
- summary: "Decode it into a runnable XanoTS project",
407
- args: [{ name: "path", required: true, path: true }],
408
- flags: [...SCAFFOLD, CODEGEN_NO_VERIFY, "report", ...AUTH],
409
- example: "xanots workspace codegen ./app",
410
- group: "Pull",
411
- display: "workspace codegen <path>",
412
- groupSummary: "Your real workspace \u2192 a runnable XanoTS project"
413
- },
414
421
  deploy: {
415
422
  summary: "Removed \u2014 XanoTS never writes back to your real workspace",
416
- removed: "`xanots workspace deploy` does not exist \u2014 the only import path is a FULL REPLACE of the target workspace, so XanoTS never writes back to your real one. Use `xanots deploy` (`--dest ephemeral` by default, or `--dest sandbox`)."
423
+ removed: "`xanots workspace deploy` does not exist \u2014 the only import path is a FULL REPLACE of the target workspace, so XanoTS never writes back to your real one. Use `xanots deploy`, which ships to a disposable ephemeral environment."
417
424
  }
418
425
  }
419
426
  },
420
427
  ephemeral: {
421
428
  group: "Environments",
422
429
  display: "ephemeral",
423
- summary: "Manage ephemeral envs \u2014 list, get, delete, export, codegen, impersonate",
430
+ summary: "Manage ephemeral envs \u2014 list, get, delete, export, impersonate",
424
431
  subcommands: {
425
432
  list: {
426
433
  summary: "List the ephemeral envs under your workspace",
@@ -435,25 +442,13 @@ var COMMANDS = {
435
442
  delete: {
436
443
  summary: "Tear an env down now instead of waiting for its TTL",
437
444
  args: [{ name: "name", required: true }],
438
- flags: ["yes", { key: "force", summary: "Skip the destroy-this-env confirmation (same as --yes)" }, ...AUTH]
445
+ flags: ["yes", ...AUTH]
439
446
  },
440
447
  export: {
441
448
  summary: "Write an env's bundle JSON",
442
449
  args: [{ name: "name", required: true }],
443
450
  flags: ["format", "path", { key: "name", summary: "Output basename (default: the env name)" }, ...AUTH]
444
451
  },
445
- codegen: {
446
- summary: "Decode an env into a runnable XanoTS project",
447
- args: [
448
- { name: "name", required: true },
449
- { name: "path", required: true, path: true }
450
- ],
451
- flags: [...SCAFFOLD, CODEGEN_NO_VERIFY, "report", ...AUTH],
452
- example: "xanots ephemeral codegen my-env ./app",
453
- group: "Pull",
454
- display: "ephemeral codegen <env> <path>",
455
- groupSummary: "An ephemeral env \u2192 a runnable XanoTS project"
456
- },
457
452
  impersonate: {
458
453
  summary: "Open the env's dashboard as a scoped session",
459
454
  args: [{ name: "name", required: true }],
@@ -461,37 +456,6 @@ var COMMANDS = {
461
456
  }
462
457
  }
463
458
  },
464
- sandbox: {
465
- group: "Environments",
466
- display: "sandbox",
467
- summary: "Export, inspect, or codegen your throwaway sandbox",
468
- subcommands: {
469
- details: {
470
- summary: "Print the sandbox tenant, headlined by its URL",
471
- flags: [...AUTH],
472
- example: "xanots sandbox details"
473
- },
474
- export: {
475
- summary: "Write the sandbox workspace as JSON or multidoc XanoScript",
476
- extraArgHint: "`sandbox export` takes no input; it exports what is CURRENTLY DEPLOYED to your sandbox. To compile a local workspace, use `xanots export <file>`.",
477
- flags: ["format", "path", { key: "name", summary: "Output basename (default: `sandbox`)" }, "bundle", ...COMPILE, ...AUTH],
478
- example: "xanots sandbox export --format multidoc"
479
- },
480
- codegen: {
481
- summary: "Decode the sandbox into a runnable XanoTS project",
482
- args: [{ name: "path", required: true, path: true }],
483
- flags: [...SCAFFOLD, CODEGEN_NO_VERIFY, "report", ...AUTH],
484
- example: "xanots sandbox codegen ./app",
485
- group: "Pull",
486
- display: "sandbox codegen <path>",
487
- groupSummary: "Your sandbox \u2192 a runnable XanoTS project"
488
- },
489
- deploy: {
490
- summary: "Removed \u2014 unified under `xanots deploy --dest sandbox`",
491
- removed: "`xanots sandbox deploy` was removed \u2014 use `xanots deploy --dest sandbox` (same behavior against the singleton sandbox, unified under `deploy`)."
492
- }
493
- }
494
- },
495
459
  test: {
496
460
  group: "Environments",
497
461
  display: "test",
@@ -499,19 +463,19 @@ var COMMANDS = {
499
463
  subcommands: {
500
464
  list: {
501
465
  summary: "List the tests in an environment, without running any",
502
- flags: [READ_DEST, TEST_ENV, "kind", ...AUTH],
503
- example: "xanots test list --dest sandbox"
466
+ flags: [READ_ENV, "kind", ...AUTH],
467
+ example: "xanots test list --env workspace"
504
468
  },
505
469
  run: {
506
470
  summary: "Run one test by name",
507
471
  args: [{ name: "name", required: true }],
508
- flags: [READ_DEST, TEST_ENV, ...AUTH],
509
- example: 'xanots test run "happy path" --dest sandbox'
472
+ flags: [READ_ENV, ...AUTH],
473
+ example: 'xanots test run "happy path" --env workspace'
510
474
  },
511
475
  "run-all": {
512
476
  summary: "Run every test in an environment and report pass/fail",
513
- flags: [READ_DEST, TEST_ENV, "kind", "concurrency", ...AUTH],
514
- example: "xanots test run-all --dest sandbox"
477
+ flags: [READ_ENV, "kind", "concurrency", ...AUTH],
478
+ example: "xanots test run-all --env ephemeral:pr-3"
515
479
  }
516
480
  }
517
481
  },
@@ -527,7 +491,7 @@ var COMMANDS = {
527
491
  "scope",
528
492
  "origin",
529
493
  "config",
530
- { key: "force", summary: "Sign in again even when a credential is already cached" }
494
+ { key: "force", summary: "Overwrite the cached credential \u2014 sign in again even when one is already there" }
531
495
  ],
532
496
  example: "xanots login --local"
533
497
  },
@@ -537,10 +501,29 @@ var COMMANDS = {
537
501
  summary: "Revoke the refresh token and clear the cache",
538
502
  flags: ["local", "origin", "config"]
539
503
  },
504
+ status: {
505
+ group: "Account",
506
+ display: "status",
507
+ summary: "Who am I, which workspace, and the env this project last deployed to",
508
+ flags: [...AUTH],
509
+ example: "xanots status --json"
510
+ },
511
+ whoami: {
512
+ group: "Account",
513
+ display: "whoami",
514
+ summary: "Show the signed-in user and instance URL",
515
+ flags: [...AUTH],
516
+ example: "xanots whoami"
517
+ },
518
+ // `whoami` is the canonical spelling: it is the question, and it is the word
519
+ // every other CLI answers it under. `profile` was a noun family with exactly
520
+ // one verb in it, which is a family only in shape. It still dispatches, off
521
+ // the menu, because it is what the command was called.
540
522
  profile: {
541
523
  group: "Account",
542
524
  display: "profile me",
543
- summary: "Show the signed-in user and instance URL",
525
+ summary: "Alias for `whoami`",
526
+ aliasOf: "whoami",
544
527
  subcommands: {
545
528
  me: {
546
529
  summary: "Print the scoped user and the instance URL",
@@ -549,19 +532,11 @@ var COMMANDS = {
549
532
  }
550
533
  }
551
534
  },
552
- whoami: {
553
- group: "Account",
554
- display: "whoami",
555
- summary: "Alias for `profile me`",
556
- aliasOf: "profile me",
557
- flags: [...AUTH],
558
- example: "xanots whoami"
559
- },
560
535
  // ── Maintenance ─────────────────────────────────────────────────────────
561
536
  lock: {
562
537
  group: "Maintenance",
563
538
  display: "lock",
564
- summary: "Maintain xano.lock identities \u2014 rename, prune, adopt",
539
+ summary: "Maintain xano.lock identities \u2014 rename, prune, import",
565
540
  subcommands: {
566
541
  rename: {
567
542
  summary: "Move an entry keeping its identity, so the next export renames in place",
@@ -576,7 +551,7 @@ var COMMANDS = {
576
551
  prune: {
577
552
  summary: "Drop orphaned entries (all, or just the named keys)",
578
553
  args: [
579
- { name: "entry-file", required: true, path: true, satisfiedBy: ["no-verify"] },
554
+ { name: "entry-file", required: true, path: true, satisfiedBy: ["identity-only"] },
580
555
  { name: "keys\u2026", required: false, variadic: true }
581
556
  ],
582
557
  flags: [
@@ -584,17 +559,21 @@ var COMMANDS = {
584
559
  "lock",
585
560
  "entry",
586
561
  {
587
- key: "no-verify",
588
- summary: "Prune the named keys without evaluating the entry file (identity only)"
562
+ key: "identity-only",
563
+ summary: "Prune the named keys without loading the entry file"
589
564
  }
590
565
  ],
591
566
  example: "xanots lock prune ./index.ts --yes"
592
567
  },
593
- adopt: {
594
- summary: "Seed the lock from a live engine packageExport",
568
+ // `import`, not `adopt`: the verb names where the identities COME FROM,
569
+ // which is the only thing a reader needs in order to know whether this is
570
+ // the command they want. "Adopt" described the internal effect and left
571
+ // the input — a live export — entirely unstated.
572
+ import: {
573
+ summary: "Import identities from a live engine packageExport, so existing objects are not recreated",
595
574
  args: [{ name: "bundle.json", required: true, path: true }],
596
575
  flags: ["yes", "lock", "entry"],
597
- example: "xanots lock adopt ./packageExport.json --entry=xano/index.ts"
576
+ example: "xanots lock import ./packageExport.json --entry=xano/index.ts"
598
577
  }
599
578
  }
600
579
  },
@@ -621,7 +600,7 @@ var COMMANDS = {
621
600
  group: "Maintenance",
622
601
  display: "help",
623
602
  summary: "Show this help",
624
- // Variadic: a help target is a command PATH (`help workspace codegen`), and
603
+ // Variadic: a help target is a command PATH (`help workspace export`), and
625
604
  // `resolveHelpRequest` reads it from the raw argv before any arity check.
626
605
  args: [{ name: "command", required: false, variadic: true }],
627
606
  example: "xanots help deploy"
@@ -631,7 +610,7 @@ var COMMANDS = {
631
610
  group: "Deploy",
632
611
  display: "push",
633
612
  summary: "Removed \u2014 use `xanots deploy`",
634
- removed: "`xanots push` was removed \u2014 use `xanots deploy` (`--dest ephemeral` by default, or `--dest sandbox`)."
613
+ removed: "`xanots push` was removed \u2014 use `xanots deploy`, which ships to a disposable ephemeral environment."
635
614
  }
636
615
  };
637
616
  function isCommand(name) {
@@ -718,4 +697,4 @@ export {
718
697
  visibleFlags,
719
698
  suggest
720
699
  };
721
- //# sourceMappingURL=chunk-OKNSR7MT.js.map
700
+ //# sourceMappingURL=chunk-DIA7CT7J.js.map
@@ -20,7 +20,7 @@ import {
20
20
  renderArgs,
21
21
  suggest,
22
22
  visibleFlags
23
- } from "./chunk-OKNSR7MT.js";
23
+ } from "./chunk-DIA7CT7J.js";
24
24
 
25
25
  // src/emit/help.ts
26
26
  function table(rows, s, indent = " ", fixedWidth) {
@@ -170,10 +170,24 @@ function removedSubcommand(command, sub) {
170
170
  const removed = getSubcommand(command, sub)?.removed;
171
171
  return new UsageError(removed ?? `\`xanots ${command} ${sub}\` was removed.`, { helpFor: { command } });
172
172
  }
173
- function assertWritableDest(dest, command) {
174
- if (dest !== "workspace") return;
173
+ function assertNoForce(force, command, subcommand) {
174
+ if (!force) return;
175
+ const path = subcommand === void 0 ? command : `${command} ${subcommand}`;
175
176
  throw new UsageError(
176
- `\`xanots ${command} --dest workspace\` is not a thing \u2014 the only import path is a FULL REPLACE of the target workspace, so XanoTS never writes back to your real one. Deploy to a disposable environment instead (\`--dest ephemeral\` or \`--dest sandbox\`); to READ your real workspace, use \`xanots workspace codegen\`, or \`xanots test --dest workspace\` to run its tests.`,
177
+ `\`xanots ${path}\` takes no \`--force\` \u2014 it overwrites nothing that exists, it asks before acting. Use \`--yes\` to answer in advance.`,
178
+ { helpFor: subcommand === void 0 ? { command } : { command, subcommand } }
179
+ );
180
+ }
181
+ function assertNoEnv(env, command) {
182
+ if (env === void 0) return;
183
+ if (env === "workspace") {
184
+ throw new UsageError(
185
+ `\`xanots ${command} --env workspace\` is not a thing \u2014 the only import path is a FULL REPLACE of the target workspace, so XanoTS never writes back to your real one. To READ your real workspace, use \`xanots init --from workspace\`, or \`xanots test --env workspace\` to run its tests.`,
186
+ { helpFor: { command } }
187
+ );
188
+ }
189
+ throw new UsageError(
190
+ `\`xanots ${command}\` takes no \`--env\`: ${command === "deploy" ? "it writes to an ephemeral environment, which is the only one it can replace" : "it promotes to the workspace your credential is bound to, which is the only one it can reach"}. Drop the flag.`,
177
191
  { helpFor: { command } }
178
192
  );
179
193
  }
@@ -239,11 +253,12 @@ export {
239
253
  unknownHelpTopic,
240
254
  unknownSubcommand,
241
255
  removedSubcommand,
242
- assertWritableDest,
256
+ assertNoForce,
257
+ assertNoEnv,
243
258
  unknownFlag,
244
259
  extraArguments,
245
260
  missingArgument,
246
261
  reportFailure,
247
262
  exitCodeOf
248
263
  };
249
- //# sourceMappingURL=chunk-JQLR64UC.js.map
264
+ //# sourceMappingURL=chunk-F6CYJ7TN.js.map
@@ -513,4 +513,4 @@ export {
513
513
  resolveScope,
514
514
  assertHttpsOrigin
515
515
  };
516
- //# sourceMappingURL=chunk-BKDJN76G.js.map
516
+ //# sourceMappingURL=chunk-FE5I6S6N.js.map