@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,3 +1,10 @@
1
+ import {
2
+ resolveOutputTarget
3
+ } from "./chunk-WGPXT2G2.js";
4
+ import {
5
+ printMicroserviceSection,
6
+ readMicroservices
7
+ } from "./chunk-3UABJA4X.js";
1
8
  import {
2
9
  deleteEphemeral,
3
10
  getEphemeral,
@@ -5,43 +12,36 @@ import {
5
12
  isExpired,
6
13
  listAllEphemeral,
7
14
  listEphemeral
8
- } from "./chunk-6DHBYBTO.js";
9
- import {
10
- clearEnvironment,
11
- getEnvironment,
12
- readEphemeralState
13
- } from "./chunk-MDXR5E5Q.js";
15
+ } from "./chunk-VNQM3V2C.js";
14
16
  import {
15
17
  openBrowser
16
18
  } from "./chunk-W5NOKYEG.js";
17
19
  import {
18
20
  confirm
19
- } from "./chunk-4PTSTDIG.js";
21
+ } from "./chunk-AIZKXUNP.js";
20
22
  import {
21
- resolveOutputTarget
22
- } from "./chunk-JQJPFUZI.js";
23
- import "./chunk-3EYUR3TX.js";
23
+ isMachineOutput,
24
+ writeJson
25
+ } from "./chunk-NUQCEOKA.js";
24
26
  import {
25
- printMicroserviceSection,
26
- readMicroservices
27
- } from "./chunk-NDZFBZHC.js";
27
+ clearEnvironment,
28
+ getEnvironment,
29
+ readEphemeralState
30
+ } from "./chunk-K5IOND4K.js";
28
31
  import {
29
32
  getAccessToken
30
- } from "./chunk-3QW5NFZJ.js";
31
- import "./chunk-BKDJN76G.js";
33
+ } from "./chunk-QKM4U5UK.js";
34
+ import "./chunk-FE5I6S6N.js";
32
35
  import {
33
36
  exportWorkspaceBundle
34
- } from "./chunk-QTNO2WD6.js";
37
+ } from "./chunk-7ZYW652H.js";
35
38
  import "./chunk-ZUTSMMAG.js";
36
39
  import "./chunk-X4DVXBFY.js";
37
- import {
38
- isMachineOutput,
39
- writeJson
40
- } from "./chunk-NUQCEOKA.js";
41
40
  import "./chunk-3IGNIP6R.js";
42
41
  import {
42
+ assertNoForce,
43
43
  unknownSubcommand
44
- } from "./chunk-JQLR64UC.js";
44
+ } from "./chunk-F6CYJ7TN.js";
45
45
  import "./chunk-GNPVYOPB.js";
46
46
  import {
47
47
  detail,
@@ -53,7 +53,7 @@ import {
53
53
  success,
54
54
  warn
55
55
  } from "./chunk-EZG76F7R.js";
56
- import "./chunk-OKNSR7MT.js";
56
+ import "./chunk-DIA7CT7J.js";
57
57
 
58
58
  // src/emit/ephemeral-command.ts
59
59
  import { writeFileSync } from "fs";
@@ -89,10 +89,6 @@ async function runEphemeralCommand(args) {
89
89
  return runExport(args);
90
90
  case "impersonate":
91
91
  return runImpersonate(args);
92
- case "codegen": {
93
- const { runCodegenCommand } = await import("./codegen-command-YSCSCVT5.js");
94
- return runCodegenCommand(args, { kind: "ephemeral" });
95
- }
96
92
  default:
97
93
  throw unknownSubcommand("ephemeral", args.subcommand);
98
94
  }
@@ -140,10 +136,11 @@ async function runGet(args) {
140
136
  printMicroserviceSection(microservices);
141
137
  }
142
138
  async function runDelete(args) {
139
+ assertNoForce(args.force, "ephemeral", "delete");
143
140
  const name = requireName(args, "delete");
144
141
  const auth = await getAccessToken(args);
145
142
  const parentWorkspaceId = auth.workspaceId;
146
- if (!args.yes && !args.force) {
143
+ if (!args.yes) {
147
144
  const ok = await confirm(`Delete ephemeral "${name}"? This destroys it permanently.`, {
148
145
  flag: "--yes",
149
146
  helpFor: { command: "ephemeral", subcommand: "delete" }
@@ -239,4 +236,4 @@ export {
239
236
  resolveLive,
240
237
  runEphemeralCommand
241
238
  };
242
- //# sourceMappingURL=ephemeral-command-7TK52YQM.js.map
239
+ //# sourceMappingURL=ephemeral-command-U4AQ3TXX.js.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ef as Condition, eg as FilterResults, eh as ElementResult, ei as SameArrayResult, ej as GroupedArrayResult, ek as AgentResultOf, b3 as AddonDef, el as OutputPath, cZ as TableDef, em as QualifiedCol, bx as DbEval, cY as SortDirective, bz as DbWhere, en as OutputRoot, bM as InferRow, eo as AggregateRow, ep as EvalFields, eq as OutputAuthored, cb as MicroserviceDef, ah as generated, F as FunctionDef, co as QueryHandle } from './store-CUCBSYLj.js';
2
- export { b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, b0 as CaptureRecord, a_ as CaptureValue, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, by as DbEvalFilter, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b1 as LambdaBindings, b_ as LambdaBody, aZ as LambdaOptions, a$ as LambdaSurface, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, S as StatementSpec, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, b2 as Xano, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, er as lam, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-CUCBSYLj.js';
1
+ import { ef as Condition, eg as FilterResults, eh as ElementResult, ei as SameArrayResult, ej as GroupedArrayResult, ek as AgentResultOf, b3 as AddonDef, el as OutputPath, cZ as TableDef, em as QualifiedCol, bx as DbEval, cY as SortDirective, bz as DbWhere, en as OutputRoot, bM as InferRow, eo as AggregateRow, ep as EvalFields, eq as OutputAuthored, cb as MicroserviceDef, ah as generated, F as FunctionDef, co as QueryHandle } from './store-BG1UPZ3Z.js';
2
+ export { b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, b0 as CaptureRecord, a_ as CaptureValue, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, by as DbEvalFilter, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b1 as LambdaBindings, b_ as LambdaBody, aZ as LambdaOptions, a$ as LambdaSurface, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, S as StatementSpec, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, b2 as Xano, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, er as lam, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-BG1UPZ3Z.js';
3
3
  import { a2 as StatementAnnotations, a1 as Statement, y as FromFieldMap, w as FilterXdo, V as Value, S as ObjValue, aH as Prettify, x as FilteredValue, X as RefValue, aM as AsShapeBrand, aj as XanoFileRef, a4 as StatementOptions, T as ObjectRef, P as ObjInput, F as FunctionXdo } from './response-CVAE2kMj.js';
4
4
  export { B as BrandOpts, c as BrandValue, C as CacheXdo, f as CaughtField, h as ConditionalContext, j as ConditionalElifContext, D as DecimalMethod, E as EmailMethod, k as ExprGroup, l as ExprNode, m as ExprOperand, n as ExprStatement, o as FieldAccess, p as FieldDescriptor, q as FieldMap, s as FieldOpts, u as FieldStyleType, v as FieldXdo, H as HistoryXdo, I as InputXdo, z as IntMethod, L as ListBoundsXdo, M as MethodArg, A as MethodOpts, G as MethodSpec, J as MethodXdo, K as MockEntry, N as MockMap, O as MockXdo, Q as ObjMember, U as PasswordMethod, W as PersistedFunctionRow, Y as RegexValue, Z as ResponseDef, _ as ResultItemXdo, $ as RowFromFieldMap, a0 as StackItemXdo, a3 as StatementInputXdo, a5 as TAGS, a6 as TEST_EXPECT_TYPES, a7 as TableRefMethod, a8 as Tag, a9 as TaggedValue, aa as TestDef, ab as TestExpect, ac as TestExpectType, ad as TestXdo, ae as TextFormat, af as TextMethod, ag as TypeBrand, ah as ValueOf, ai as VectorMethod, ak as XanoGeoPosition, al as XanoGeoValue, am as annotate, an as auth, ao as c, ap as caught, aq as col, ar as env, as as expect, at as f, au as filter, av as inp, aw as obj, ax as out, ay as ref, az as resp, aA as setting, aB as statements, aC as sys, aD as test, aE as toolset, aF as withFilters } from './response-CVAE2kMj.js';
5
5
 
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  TEST_EXPECT_TYPES,
7
7
  expect
8
- } from "./chunk-5YQOIFT4.js";
8
+ } from "./chunk-75Z74TA7.js";
9
9
  import {
10
10
  addon,
11
11
  agent,
@@ -17,7 +17,7 @@ import {
17
17
  task,
18
18
  tool,
19
19
  workflowTest
20
- } from "./chunk-7OXFMCTX.js";
20
+ } from "./chunk-5R73LFWK.js";
21
21
  import {
22
22
  actionCall,
23
23
  actionPackageCall,
@@ -100,11 +100,11 @@ import {
100
100
  workflowTestCall,
101
101
  workspaceConfig,
102
102
  workspaceTrigger
103
- } from "./chunk-ZZLPTHT5.js";
103
+ } from "./chunk-P6TAVLOX.js";
104
104
  import {
105
105
  Xano,
106
106
  workspace
107
- } from "./chunk-UDL46O35.js";
107
+ } from "./chunk-VKSOTZK3.js";
108
108
  import {
109
109
  LAMBDA_BINDINGS,
110
110
  LAMBDA_CODE_FILTERS,
@@ -148,7 +148,7 @@ import {
148
148
  toSearchParams,
149
149
  toolset,
150
150
  withFilters
151
- } from "./chunk-QONOJO45.js";
151
+ } from "./chunk-LBYWGMOA.js";
152
152
  import "./chunk-WHOJWOSV.js";
153
153
  import {
154
154
  annotate,
@@ -1,30 +1,33 @@
1
1
  import {
2
2
  projectShellFiles,
3
+ resolveFromSource,
3
4
  runInitCommand,
4
5
  sanitizeAppName
5
- } from "./chunk-6Z5CNWFC.js";
6
+ } from "./chunk-YYFXVYPX.js";
6
7
  import {
7
8
  resolveAiFlags
8
- } from "./chunk-4PE4ZAB7.js";
9
+ } from "./chunk-KA6G2L7U.js";
9
10
  import "./chunk-ZSYZTGJH.js";
10
- import "./chunk-MU3O43L2.js";
11
- import "./chunk-P5C2YKAM.js";
11
+ import "./chunk-YBC3IKMF.js";
12
+ import "./chunk-ANUDXFEX.js";
12
13
  import "./chunk-Q77KNEUL.js";
13
- import "./chunk-K3YSQDXJ.js";
14
- import "./chunk-JQLR64UC.js";
14
+ import "./chunk-ACCBOMCB.js";
15
+ import "./chunk-CTD5ZCV6.js";
15
16
  import "./chunk-OYMR5AMJ.js";
17
+ import "./chunk-F6CYJ7TN.js";
16
18
  import "./chunk-GNPVYOPB.js";
17
19
  import "./chunk-EZG76F7R.js";
18
- import "./chunk-UDL46O35.js";
19
- import "./chunk-OKNSR7MT.js";
20
- import "./chunk-QONOJO45.js";
20
+ import "./chunk-VKSOTZK3.js";
21
+ import "./chunk-DIA7CT7J.js";
22
+ import "./chunk-LBYWGMOA.js";
21
23
  import "./chunk-WHOJWOSV.js";
22
24
  import "./chunk-5XZ744TS.js";
23
25
  import "./chunk-7JDT4PBU.js";
24
26
  export {
25
27
  projectShellFiles,
26
28
  resolveAiFlags,
29
+ resolveFromSource,
27
30
  runInitCommand,
28
31
  sanitizeAppName
29
32
  };
30
- //# sourceMappingURL=init-command-OVFFW4QS.js.map
33
+ //# sourceMappingURL=init-command-MAXULNAD.js.map
@@ -8,29 +8,29 @@ import {
8
8
  step
9
9
  } from "./chunk-EZG76F7R.js";
10
10
 
11
- // src/emit/onboard-command.ts
12
- var ONBOARD_PACKAGE = "@xanots/onboard";
13
- function runOnboardCommand(tail) {
14
- const resolved = npmViewVersion(ONBOARD_PACKAGE);
11
+ // src/emit/init-web.ts
12
+ var CONFIGURATOR_PACKAGE = "@xanots/onboard";
13
+ function runInitWebCommand(tail) {
14
+ const resolved = npmViewVersion(CONFIGURATOR_PACKAGE);
15
15
  if (!resolved.ok) {
16
16
  throw new Error(
17
- `Could not resolve ${ONBOARD_PACKAGE} from the npm registry.
17
+ `Could not resolve ${CONFIGURATOR_PACKAGE} from the npm registry.
18
18
 
19
19
  ${condenseNpmError(resolved.stderr)}
20
20
 
21
21
  The configurator is downloaded on demand, so this step needs the registry. \`xanots init\` takes the same choices as flags instead \u2014 and \`--no-install\` skips the dependency install, which is the only other thing that reaches out.`
22
22
  );
23
23
  }
24
- step(`Launching ${ONBOARD_PACKAGE} ${resolved.version}`);
24
+ step(`Launching ${CONFIGURATOR_PACKAGE} ${resolved.version}`);
25
25
  detail(`It brings its own @xanots/sdk, which may differ from this one.`);
26
26
  const status = runNpm(
27
- ["exec", "-y", `${ONBOARD_PACKAGE}@latest`, "--", ...tail],
27
+ ["exec", "-y", `${CONFIGURATOR_PACKAGE}@latest`, "--", ...tail],
28
28
  process.cwd()
29
29
  );
30
30
  if (status !== 0) process.exitCode = status;
31
31
  }
32
32
  export {
33
- ONBOARD_PACKAGE,
34
- runOnboardCommand
33
+ CONFIGURATOR_PACKAGE,
34
+ runInitWebCommand
35
35
  };
36
- //# sourceMappingURL=onboard-command-EHOHKQQU.js.map
36
+ //# sourceMappingURL=init-web-3JNFG6GI.js.map
@@ -1,7 +1,7 @@
1
1
  import { F as FunctionXdo } from './response-CVAE2kMj.js';
2
2
  export { a as FIELD_METHODS, R as REFERENCEABLE_KINDS, d as deriveGuid, e as encodeResponse, b as encodeStatement, g as getStatementFactory, i as isRegisteredStatement, r as resolveRef, t as toNestedFields } from './response-CVAE2kMj.js';
3
- import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-CUCBSYLj.js';
4
- export { A as AdoptChange, a as AdoptResult, B as Bundle, b as BundlePayload, c as BundleType, d as FILTER_NAMES, G as GENERATED_STATEMENT_NAMES, K as KNOWLEDGE_DIR, e as KNOWLEDGE_FILE, L as LLMS_TXT, f as LOCK_VERSION, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, m as MergeResult, P as PAYLOAD_ARRAY_KEYS, n as PayloadArrayKey, Q as QUERY_EXPRESSION_FILTERS, R as RenameResult, T as TOTAL_OBJECT_KINDS, V as VECTOR_FILTERS, W as WORKSPACE_KEY, o as addonKind, p as adoptFromBundle, q as agentKind, r as apiGroupKind, s as buildBundle, t as buildManifest, u as buildMiddlewareBlock, v as buildWorkspaceHistory, w as calcSignatureJson, x as channelPathParams, y as createLockContext, z as declaredServicePorts, C as emptyLock, D as encodeAddon, E as encodeAgent, H as encodeApiGroup, I as encodeColumn, J as encodeContainerHistory, N as encodeFromSpec, U as encodeHistory, X as encodeIndex, Y as encodeKnowledge, Z as encodeMcpServer, _ as encodeMicroservice, $ as encodeMiddleware, a0 as encodeMiddlewareEntry, a1 as encodeMiddlewareList, a2 as encodeObject, a3 as encodeQuery, a4 as encodeRealtimeChannel, a5 as encodeRealtimeMessage, a6 as encodeRealtimeServer, a7 as encodeSchedule, a8 as encodeTable, a9 as encodeTask, aa as encodeTool, ab as encodeToolRefs, ac as encodeToolsetBase, ad as encodeTrigger, ae as encodeView, af as encodeWorkflowTest, ag as encodeWorkspaceConfig, ah as generatedStatements, ai as getKind, aj as getLockedCanonical, ak as getLockedGuid, al as isKnowledgeDirSource, am as isKnowledgeFileSource, an as isLockSeeded, ao as isQueryExpressionFilter, ap as isRegisteredKind, aq as knowledgeKind, ar as lockKey, as as mcpServerKind, at as mergeObserved, au as microserviceKind, av as middlewareKind, aw as mintCanonical, ax as parseLock, ay as phpJsonEncode, az as queryKind, aA as realtimeChannelGuid, aB as realtimeChannelKind, aC as realtimeMessageGuid, aD as realtimeMessageKind, aE as realtimeServerKind, aF as recordObserved, aG as registerKind, aH as registerSpec, aI as registeredKinds, aJ as renameLockEntry, aK as renderDocs, aL as renderLlmsTxt, aM as resolveAuthRef, aN as resolvePayloadKey, aO as resolveRealtimeServerCanonical, aP as resolveToolsetCanonical, aQ as serializeBundle, aR as serializeLock, aS as tableKind, aT as taskKind, aU as toolKind, aV as triggerKind, aW as validateLockModel, aX as workflowTestKind, aY as workspaceKind } from './store-CUCBSYLj.js';
3
+ import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-BG1UPZ3Z.js';
4
+ export { A as AdoptChange, a as AdoptResult, B as Bundle, b as BundlePayload, c as BundleType, d as FILTER_NAMES, G as GENERATED_STATEMENT_NAMES, K as KNOWLEDGE_DIR, e as KNOWLEDGE_FILE, L as LLMS_TXT, f as LOCK_VERSION, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, m as MergeResult, P as PAYLOAD_ARRAY_KEYS, n as PayloadArrayKey, Q as QUERY_EXPRESSION_FILTERS, R as RenameResult, T as TOTAL_OBJECT_KINDS, V as VECTOR_FILTERS, W as WORKSPACE_KEY, o as addonKind, p as adoptFromBundle, q as agentKind, r as apiGroupKind, s as buildBundle, t as buildManifest, u as buildMiddlewareBlock, v as buildWorkspaceHistory, w as calcSignatureJson, x as channelPathParams, y as createLockContext, z as declaredServicePorts, C as emptyLock, D as encodeAddon, E as encodeAgent, H as encodeApiGroup, I as encodeColumn, J as encodeContainerHistory, N as encodeFromSpec, U as encodeHistory, X as encodeIndex, Y as encodeKnowledge, Z as encodeMcpServer, _ as encodeMicroservice, $ as encodeMiddleware, a0 as encodeMiddlewareEntry, a1 as encodeMiddlewareList, a2 as encodeObject, a3 as encodeQuery, a4 as encodeRealtimeChannel, a5 as encodeRealtimeMessage, a6 as encodeRealtimeServer, a7 as encodeSchedule, a8 as encodeTable, a9 as encodeTask, aa as encodeTool, ab as encodeToolRefs, ac as encodeToolsetBase, ad as encodeTrigger, ae as encodeView, af as encodeWorkflowTest, ag as encodeWorkspaceConfig, ah as generatedStatements, ai as getKind, aj as getLockedCanonical, ak as getLockedGuid, al as isKnowledgeDirSource, am as isKnowledgeFileSource, an as isLockSeeded, ao as isQueryExpressionFilter, ap as isRegisteredKind, aq as knowledgeKind, ar as lockKey, as as mcpServerKind, at as mergeObserved, au as microserviceKind, av as middlewareKind, aw as mintCanonical, ax as parseLock, ay as phpJsonEncode, az as queryKind, aA as realtimeChannelGuid, aB as realtimeChannelKind, aC as realtimeMessageGuid, aD as realtimeMessageKind, aE as realtimeServerKind, aF as recordObserved, aG as registerKind, aH as registerSpec, aI as registeredKinds, aJ as renameLockEntry, aK as renderDocs, aL as renderLlmsTxt, aM as resolveAuthRef, aN as resolvePayloadKey, aO as resolveRealtimeServerCanonical, aP as resolveToolsetCanonical, aQ as serializeBundle, aR as serializeLock, aS as tableKind, aT as taskKind, aU as toolKind, aV as triggerKind, aW as validateLockModel, aX as workflowTestKind, aY as workspaceKind } from './store-BG1UPZ3Z.js';
5
5
 
6
6
  /**
7
7
  * AUTO-GENERATED by scripts/codegen.ts — DO NOT EDIT BY HAND.
package/dist/internal.js CHANGED
@@ -33,7 +33,7 @@ import {
33
33
  taskKind,
34
34
  toolKind,
35
35
  workflowTestKind
36
- } from "./chunk-7OXFMCTX.js";
36
+ } from "./chunk-5R73LFWK.js";
37
37
  import {
38
38
  GENERATED_SPECS,
39
39
  GENERATED_STATEMENT_NAMES,
@@ -55,7 +55,7 @@ import {
55
55
  registerSpec,
56
56
  triggerKind,
57
57
  workspaceKind
58
- } from "./chunk-ZZLPTHT5.js";
58
+ } from "./chunk-P6TAVLOX.js";
59
59
  import {
60
60
  COMMANDS,
61
61
  FLAGS,
@@ -63,7 +63,7 @@ import {
63
63
  flagKey,
64
64
  flagSummary,
65
65
  visibleFlags
66
- } from "./chunk-OKNSR7MT.js";
66
+ } from "./chunk-DIA7CT7J.js";
67
67
  import {
68
68
  DECODE_ONLY_STATEMENTS,
69
69
  FILTER_NAMES,
@@ -109,7 +109,7 @@ import {
109
109
  serializeBundle,
110
110
  tableKind,
111
111
  toNestedFields
112
- } from "./chunk-QONOJO45.js";
112
+ } from "./chunk-LBYWGMOA.js";
113
113
  import "./chunk-WHOJWOSV.js";
114
114
  import {
115
115
  encodeStatement,
@@ -774,7 +774,7 @@ function renderTestsSection() {
774
774
  "",
775
775
  "`xanots test run-all` runs the unit tests AND the `workflowTest()` objects an environment carries. It takes no entry file and compiles nothing: it runs what is DEPLOYED, so deploy before testing.",
776
776
  "",
777
- "- `--dest ephemeral` (DEFAULT, `--name <env>` to pick one), `--dest sandbox`, or `--dest workspace`. Unlike `deploy`, `workspace` is allowed here \u2014 running a test reads.",
777
+ "- `--env ephemeral` (DEFAULT \u2014 the one this project last deployed to), `--env ephemeral:<name>`, or `--env workspace`. Same grammar as `init --from`. `deploy` takes no `--env` at all; `test` does, and `workspace` is allowed here because running a test only reads.",
778
778
  '- `xanots test list` shows what is there without running it; `xanots test run "<name>"` runs one. When a name is ambiguous the error prints the qualified `function:math/happy path` form, which `run` also accepts.',
779
779
  "- `--kind unit|workflow` narrows to one family. `--concurrency <n>` defaults to 1: tests share the environment database.",
780
780
  "- A failing suite exits 5, distinct from a crash. Tests that could not be REACHED exit 6 \u2014 retry that one, investigate the other. An environment with no tests is success, not failure.",
@@ -881,7 +881,7 @@ function renderSections(m) {
881
881
  "",
882
882
  "Set `canonical` on every `apiGroup`. The engine mints the URL token server-side, so",
883
883
  "without one a group's client paths are unresolvable until a lock exists: the bundle",
884
- "exports fine and `xanots paths` / `getPath()` then fail on the very queries it just",
884
+ "exports fine and `xanots routes` / `getPath()` then fail on the very queries it just",
885
885
  "built. An explicit `canonical` resolves them from the source alone.",
886
886
  "",
887
887
  "Build warnings: `export()` prints the shapes that deploy clean and then do the wrong",
@@ -900,7 +900,7 @@ function renderSections(m) {
900
900
  "To rename an object: rename in code, export (stderr prints the exact fix-up), run",
901
901
  "`xanots lock rename <kind> <old> <new>`, export again \u2014 the original guid is emitted",
902
902
  "under the new name, so the engine renames in place instead of delete+create. Taking",
903
- "over an existing workspace: `xanots lock adopt <its-packageExport.json>` first, then",
903
+ "over an existing workspace: `xanots lock import <its-packageExport.json>` first, then",
904
904
  "export. Pruning, programmatic seeding, and which commands write the lock:",
905
905
  "`llms/lock.md`.",
906
906
  "",
@@ -913,19 +913,19 @@ function renderSections(m) {
913
913
  "AND records \u2014 before importing. The blast radius is a disposable environment, not a",
914
914
  "production workspace, but confirm with the user before the first run.",
915
915
  "",
916
- "**Two destinations, and the choice changes more than the target.**",
916
+ "**One destination, and no flag for it.**",
917
917
  "",
918
- "- `--dest ephemeral` (DEFAULT) \u2014 a NAMED, workspace-scoped, auto-expiring tenant",
919
- " (~1h; `--expires-hours` 1\u201372 at create time). The active one is tracked in",
918
+ "- `xanots deploy` writes to a NAMED, workspace-scoped, auto-expiring ephemeral tenant",
919
+ " (~1h; `--expires-hours` 1\u201372 at create time), and to nothing else \u2014 an `--env` here",
920
+ " is a usage error, not a choice. The active env is tracked in",
920
921
  " `./.xano/ephemeral.json`, so deploying again REFRESHES it and the URL is unchanged;",
921
922
  " if it expired or was swept, a fresh one is created and the new URL is called out.",
922
923
  " `--static` puts the frontend ON THE EPHEMERAL, so backend and frontend share one",
923
924
  " disposable environment.",
924
925
  " \u26A0 Only the BACKEND URL survives a refresh: the replace clears static hosting too,",
925
926
  " so `--static` publishes a NEW host every run and the previous URL stops serving.",
926
- "- `--dest sandbox` \u2014 your single throwaway tenant, no expiry. `--static` puts the",
927
- " frontend on your OWN (parent) workspace instead, because the sandbox tenant does",
928
- " not serve static hosting.",
927
+ "- `xanots status` names the env this project last deployed to, its URL and its expiry,",
928
+ " without your having to remember which one it was.",
929
929
  "- `xanots release` promotes to your INSTANCE workspace and MERGES, not replaces:",
930
930
  " adds/updates what you define, deletes nothing, writes no rows. Destruction is",
931
931
  " opt-in per flag, previewed + confirmed, and can drop a table WITH its rows.",
@@ -948,7 +948,7 @@ function renderSections(m) {
948
948
  '\u26A0 It is INJECTED in bracket form \u2014 `window["XANO_HOST"]="\u2026"` \u2014 so verifying a deploy',
949
949
  "by grepping `window.XANO_HOST` matches nothing and reads as a failed inject. Grep the",
950
950
  "bare `XANO_HOST` token.",
951
- "\u26A0 `xanots validate` ignores the deploy login and reads `XANO_VALIDATE_INSTANCE` /",
951
+ "\u26A0 `xanots preflight` ignores the deploy login and reads `XANO_VALIDATE_INSTANCE` /",
952
952
  "`XANO_VALIDATE_TOKEN` (+ optional `XANO_VALIDATE_WORKSPACE_ID`) from the environment.",
953
953
  "**Displaying a stored file.** A file column comes back as `{ path, name, type, size,",
954
954
  "meta, access, url }`. \u26A0 Do NOT use its `url`: on a tenant-scoped environment that field",
@@ -1100,7 +1100,7 @@ function renderSections(m) {
1100
1100
  " never removes it. The floor is the RUNTIME, not the def: a second def, or a much richer",
1101
1101
  " one, adds ~1 kB. So the cost is paid by importing ANY def at all, and reducing what a",
1102
1102
  " def does will not reduce it.",
1103
- " Fix: `xanots paths <entry> --emit xano/routes.gen.ts` (`routes` is an accepted alias) \u2014 verbs, paths, and sockets as",
1103
+ " Fix: `xanots routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) \u2014 verbs, paths, and sockets as",
1104
1104
  ' plain data importing NOTHING, still compile-checked: `routePath("blog/{slug}", { slug })`,',
1105
1105
  ' `channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base',
1106
1106
  " URLs lifted to `wss://h/ws/<tenant>:<canonical>`). A rename is a type error, not a 404.",
@@ -1187,19 +1187,10 @@ function renderSections(m) {
1187
1187
  ' credential the runner has. As a file that triple is `{ "type": "token",',
1188
1188
  ' "instance_base_url": \u2026, "workspace_id": <n>, "meta_api_token": \u2026 }`. The older',
1189
1189
  " `$XANO_REFRESH_TOKEN` + `$XANO_CLIENT_ID` pair still works but ROTATES: single-use.",
1190
- "- **Event-driven objects fire on an EPHEMERAL, not in the sandbox.** A `task`",
1191
- " (scheduled), an `mcpServer`, and every trigger \u2014 `tableTrigger` included \u2014 run normally",
1192
- " on an ephemeral env, which is `deploy`'s DEFAULT destination. So test an event-driven",
1193
- " design (screen-on-insert, cron cleanup, MCP tool call) by deploying it and letting it",
1194
- " run.",
1195
- " \u26A0 Under `--dest sandbox` they import cleanly but their stacks NEVER execute, and there",
1196
- " is no way to fire one manually \u2014 an insert on a bound table does not run its",
1197
- " `tableTrigger`, and the design silently does nothing. Only synchronously-invoked objects",
1198
- " (queries, functions, and the agents an endpoint calls with `s.ai.agent.run`) run there.",
1199
- " If you must stay on the sandbox, verify the logic out of band: factor the body into a",
1200
- " `defineFunction` (or a callable `query`) and invoke it directly \u2014 a `tableTrigger` that",
1201
- " screens a row on insert should delegate to a function a `query` can also call via",
1202
- " `s.function.run`, and you assert against that.",
1190
+ "- **Event-driven objects fire on an EPHEMERAL.** A `task` (scheduled), an `mcpServer`,",
1191
+ " and every trigger \u2014 `tableTrigger` included \u2014 run normally on an ephemeral env, which",
1192
+ " is where `deploy` sends them. So test an event-driven design (screen-on-insert, cron",
1193
+ " cleanup, MCP tool call) by deploying it and letting it run.",
1203
1194
  '- **Zero-based numeric keys make `c.obj` a LIST.** `c.obj({ "0": "a" })` evaluates to',
1204
1195
  ' `["a"]`: a numeric key IS an index in the engine\'s data model, so keys that are exactly',
1205
1196
  " `0..n-1` come back as a list with HTTP 200 and no error. Write `c.array([...])` when you",
@@ -1260,7 +1251,7 @@ function renderSections(m) {
1260
1251
  ' - \u26A0 Under `"custom"`, `allowOrigins` is matched as EXACT strings (scheme+host+port, no wildcard or subdomain expansion) and `"*"` is compared as a literal origin \u2014 it matches NOTHING. An unmatched origin gets no `access-control-*` headers at all, so the call fails in the browser on a missing `access-control-allow-origin` while export, deploy and the preflight all look fine. Name each origin, or use `mode: "default"` for any-origin. `allowMethods` gates the REAL response too: a verb left off gets no CORS headers back even though its preflight passes. Export warns on an empty origin list, a `"*"` entry, and a policy with no method enabled.',
1261
1252
  '- `defineFunction`/`query`/`apiGroup` above cover the queries+tables core; the four below are the "reach past that" primitives (tasks, workflow tests, middleware, tools). Agents and MCP servers are the same family and live in `llms/kinds-agent-mcp.md`. Same envelope conventions (`guid?`, `description?`, `docs?`, `tags?`, `history?`) unless noted.',
1262
1253
  "- `task({ name, guid?, description?, docs?, datasource?, active?, tags?, history?, schedule?, stack?, middleware? })` \u2014 a scheduled background job (function-like `stack`, no `input`/`response`).",
1263
- ' - `schedule?`: a `ScheduleDef[]` (NOT a single object) \u2014 `{ startsOn, freq?, repeatEnabled?, endsOn?, endsEnabled? }`. `startsOn`/`endsOn` are **timestamp strings** validated at encode time \u2014 `"2026-01-01T00:00:00Z"`, or the space-separated `"2026-01-01 00:00:00+0000"` a pulled workspace carries \u2014 never epoch numbers, and never zoneless; `freq` is the repeat interval **in seconds** (default `86400` = daily); `endsOn` present \u21D2 the schedule has an end. `endsEnabled?` defaults to that and is recovery-only \u2014 state it to reproduce a stored schedule that remembers an end date with the gate OFF. Fires on an ephemeral; does NOT fire in the sandbox (see Gotchas).',
1254
+ ' - `schedule?`: a `ScheduleDef[]` (NOT a single object) \u2014 `{ startsOn, freq?, repeatEnabled?, endsOn?, endsEnabled? }`. `startsOn`/`endsOn` are **timestamp strings** validated at encode time \u2014 `"2026-01-01T00:00:00Z"`, or the space-separated `"2026-01-01 00:00:00+0000"` a pulled workspace carries \u2014 never epoch numbers, and never zoneless; `freq` is the repeat interval **in seconds** (default `86400` = daily); `endsOn` present \u21D2 the schedule has an end. `endsEnabled?` defaults to that and is recovery-only \u2014 state it to reproduce a stored schedule that remembers an end date with the gate OFF. Fires on an ephemeral (see Gotchas).',
1264
1255
  '- `workflowTest({ name, guid?, description?, docs?, datasource?, active?, tags?, stack? })` \u2014 an end-to-end test. NO `input`/`response`: `.call` something with an `as`, then assert on that var \u2014 `s.function.call({ fn, input, as: "r" })`, `s.expect.to_equal({ expr: ref("r"), value: c.int(42) })`. `s.expect.*` belongs here \u2014 it is not inert elsewhere (a failure 500s the request), so treat one in a query/function/task as a mistake to remove. `active?` defaults `true`; chain tests with `s.workflow_test.call({ workflowTest: <def handle> })`.',
1265
1256
  ' - `datasource?`: **the trap.** Default `""` is an EMPTY datasource (recommended), not "no datasource". Any non-empty name makes the engine CLONE it before EVERY run \u2014 against production-sized data, slow enough to fail the run. `"live"` warns at compile time; other names don\'t.',
1266
1257
  "- `middleware({ name, guid?, description?, docs?, resultStrategy?, exceptionPolicy?, tags?, history?, input?, stack?, response?, responseShape?, tests? })` \u2014 a pre/post interceptor (function-like `stack`); attach it via a host's `middleware: { pre, post }`. \u26A0 `input` ENCODES but an ATTACHED middleware never has it bound \u2014 the host request binds its own inputs, so `inp()` inside pre/post fails at runtime with `Unable to locate input` and a declared default does not stand in (`export()` warns). Read the request body with `s.util.get_all_input` instead; it yields a `{ type, vars }` envelope. `s.middleware.call` is the one path that DOES bind the declared map.",
@@ -1327,7 +1318,7 @@ function renderSections(m) {
1327
1318
  "- `name` takes letters, digits, and `/ _ - { } . ` or a space; anything else is an export error."
1328
1319
  ];
1329
1320
  const kindsAgentMcp = [
1330
- "- `mcpServer({ name, guid?, description?, instructions?, docs?, enabled?, canonical?, spec?, tags?, history?, tools?, llm?, output? })` \u2014 an MCP toolset. `llm?`/`output?` are the same blocks `agent()` takes and are usually absent: an MCP server and an agent are ONE stored object distinguished by `type`. Returns a handle with `getPath()`/`getUrl(baseUrl)` for the Streamable-HTTP endpoint \u2014 `getUrl` is NOT idempotent, a `baseUrl` already carrying an `/x2/mcp/<\u2026>/stream` path THROWS, so resolve ONCE from the instance base URL. Fires on an ephemeral; not in sandbox.",
1321
+ "- `mcpServer({ name, guid?, description?, instructions?, docs?, enabled?, canonical?, spec?, tags?, history?, tools?, llm?, output? })` \u2014 an MCP toolset. `llm?`/`output?` are the same blocks `agent()` takes and are usually absent: an MCP server and an agent are ONE stored object distinguished by `type`. Returns a handle with `getPath()`/`getUrl(baseUrl)` for the Streamable-HTTP endpoint \u2014 `getUrl` is NOT idempotent, a `baseUrl` already carrying an `/x2/mcp/<\u2026>/stream` path THROWS, so resolve ONCE from the instance base URL. Fires on an ephemeral.",
1331
1322
  " - `tools?`: a `ToolsetToolEntry[]`. Pass the `tool()` HANDLES directly (`tools: [saveNote]`), like every other collection in the SDK; use the `{ tool, enabled?, auth? }` wrapper only when a tool needs `enabled: false` or per-tool `auth`. `auth` names an auth **table** (a `table({ auth: true })` handle or its name) \u2014 Xano's ONLY MCP auth surface (per-tool; there is no server-level gate). An entry that names no tool (no handle, no `id`) THROWS at export rather than emitting the `id: 0` null reference it used to; a deliberate raw `id: 0` warns and is carried through, so a pulled workspace still round-trips.",
1332
1323
  "- `agent({ name, guid?, description?, docs?, enabled?, canonical?, tags?, history?, llm, tools?, output? })` \u2014 an LLM orchestrator. No top-level `instructions`/`prompt`/`spec` \u2014 the prompt lives under `llm`. Invoke from a stack with `s.ai.agent.run({ agent, args })`.",
1333
1324
  ' - `llm` (REQUIRED): typed provider settings, a discriminated union on `type` (`"xano-free" | "anthropic" | "openai" | "google-genai"`). Shared fields: `systemPrompt?`, `maxSteps?` (default `5`), and `prompt?` XOR `messages?` (genuinely exclusive: both is a type error and throws \u2014 the engine stores ONE `prompt_type`, so one would be dropped); plus provider fields (`apiKey?`, `model?`, `temperature?`, `reasoningEffort?`, \u2026). String fields accept Twig placeholders \u2014 `{{ $args.x }}` for run inputs (the `args` of `s.ai.agent.run`), `{{ $env.NAME }}` for env vars.',
@@ -1381,7 +1372,7 @@ function renderSections(m) {
1381
1372
  " - **Tenant instances (isolated DB):** a tenant's realtime objects live in the TENANT's database, so BOTH halves of a client must name the tenant.",
1382
1373
  " - Socket: `server.getUrl(base, { tenant })` \u2192 `/ws/<tenant>:<canonical>`. \u26A0 A bare canonical on a tenant host resolves against the INSTANCE workspace instead.",
1383
1374
  " - That colon form is PECULIAR TO THE SOCKET. Every other tenant URL gives the tenant its OWN segment \u2014 the HTTP half of the same client is `https://<host>/tenant/<tenant>/api:<canonical>/\u2026`. NO request header is required for either.",
1384
- " - Because the shapes differ, `getUrl` TRANSLATES a tenant base URL instead of concatenating: pass the `https://<host>/tenant/<name>` that `sandbox details` prints (and that deploy injects as `window.XANO_HOST`) and the tenant is LIFTED into the socket form. So `getUrl(window.XANO_HOST)` needs no `{ tenant }`, and a CONFLICTING `{ tenant }` alongside it throws.",
1375
+ " - Because the shapes differ, `getUrl` TRANSLATES a tenant base URL instead of concatenating: pass the `https://<host>/tenant/<name>` that `xanots status` prints (and that deploy injects as `window.XANO_HOST`) and the tenant is LIFTED into the socket form. So `getUrl(window.XANO_HOST)` needs no `{ tenant }`, and a CONFLICTING `{ tenant }` alongside it throws.",
1385
1376
  " - \u26A0 `getUrl`/`socketUrl` are NOT idempotent \u2014 a `baseUrl` that already carries a `/ws/<\u2026>` path (an earlier result of either) THROWS. Resolve ONCE from the http(s) base; pass that result to `new WebSocket`, never back in as a base.",
1386
1377
  " - Still pass `{ tenant }` explicitly for a tenant on its OWN DOMAIN \u2014 the hostname carries it for HTTP, but there is nothing in the URL for the socket to lift.",
1387
1378
  " - \u26A0 Tokens are tenant-scoped (audience `<tenant>:<license>`, not the bare license), so one minted through the instance workspace is REJECTED by a tenant's realtime server \u2014 authenticate and dial through the same tenant.",
@@ -1764,11 +1755,11 @@ function renderSections(m) {
1764
1755
  "- `xanots lock rename <kind> <old> <new>` \u2014 `kind` is the payload key (or `table`/`api_group`).",
1765
1756
  " Run it after renaming in code; the next export emits the original guid under the new name.",
1766
1757
  "- `xanots lock prune <entry-file> [keys\u2026] --yes` \u2014 drops orphaned entries. Finding orphans",
1767
- " RUNS the entry's module scope (env assertions included); `--no-verify --yes <kind:name>\u2026`",
1758
+ " RUNS the entry's module scope (env assertions included); `--identity-only --yes <kind:name>\u2026`",
1768
1759
  " prunes named keys with no evaluation and no orphan check.",
1769
- "- `xanots lock adopt <live-bundle.json> [--yes]` \u2014 seed the lock from an engine",
1760
+ "- `xanots lock import <live-bundle.json> [--yes]` \u2014 seed the lock from an engine",
1770
1761
  " packageExport when taking over an existing workspace.",
1771
- "- Every lock subcommand accepts `--lock=<path>`. `rename`/`adopt` take no entry file, so",
1762
+ "- Every lock subcommand accepts `--lock=<path>`. `rename`/`import` take no entry file, so",
1772
1763
  " from outside the lock's directory pass `--lock` (or `--entry=<entry-file>` to derive it).",
1773
1764
  "- Programmatic use: call `seedLockOverrides(readLockFile(path))` BEFORE importing any def",
1774
1765
  " module \u2014 references bake guids at import time, so late seeding is a silent no-op",
@@ -1776,7 +1767,7 @@ function renderSections(m) {
1776
1767
  "",
1777
1768
  "What writes the lock: `export`/`deploy` of an ENTRY FILE update it via the shared compile",
1778
1769
  "step \u2014 only when a lock exists or `--lock` is passed. Nothing from a DEPLOY is written",
1779
- "back beyond that (an ephemeral/sandbox is a separate workspace, so its identities must",
1770
+ "back beyond that (an ephemeral is a separate workspace, so its identities must",
1780
1771
  "not pollute yours). The one write-back is `release --replace`, which mints fresh",
1781
1772
  "identities in the workspace the lock describes: it re-pins the lock from the rebuilt",
1782
1773
  "workspace, because otherwise the next release matches nothing and duplicates every",
@@ -2031,7 +2022,7 @@ function renderDocs(m) {
2031
2022
  {
2032
2023
  path: "llms/lock.md",
2033
2024
  title: "Lock file",
2034
- readWhen: "Read when a `xano.lock` exists or should \u2014 renaming/pruning/adopting identities, seeding the lock programmatically, or asking which commands write it.",
2025
+ readWhen: "Read when a `xano.lock` exists or should \u2014 renaming/pruning/importing identities, seeding the lock programmatically, or asking which commands write it.",
2035
2026
  body: s.lock,
2036
2027
  dropLeadingHeading: true
2037
2028
  },
@@ -2,11 +2,11 @@ import {
2
2
  compareToLive,
3
3
  diffAgainstLive,
4
4
  sharedSchemaChanges
5
- } from "./chunk-5HCDZ2XN.js";
6
- import "./chunk-ZOYMZZ3S.js";
5
+ } from "./chunk-DBFU47BJ.js";
6
+ import "./chunk-3INK4Y4E.js";
7
7
  export {
8
8
  compareToLive,
9
9
  diffAgainstLive,
10
10
  sharedSchemaChanges
11
11
  };
12
- //# sourceMappingURL=live-diff-QK4KC2FJ.js.map
12
+ //# sourceMappingURL=live-diff-IXKBVG4K.js.map
@@ -1,22 +1,23 @@
1
1
  import {
2
2
  loadDefault
3
- } from "./chunk-K3YSQDXJ.js";
4
- import {
5
- UsageError,
6
- missingArgument,
7
- unknownSubcommand
8
- } from "./chunk-JQLR64UC.js";
3
+ } from "./chunk-ACCBOMCB.js";
4
+ import "./chunk-CTD5ZCV6.js";
9
5
  import {
10
6
  readLockFile,
11
7
  writeLockFile
12
8
  } from "./chunk-OYMR5AMJ.js";
9
+ import {
10
+ UsageError,
11
+ missingArgument,
12
+ unknownSubcommand
13
+ } from "./chunk-F6CYJ7TN.js";
13
14
  import "./chunk-GNPVYOPB.js";
14
15
  import "./chunk-EZG76F7R.js";
15
16
  import {
16
17
  Xano
17
- } from "./chunk-UDL46O35.js";
18
- import "./chunk-OKNSR7MT.js";
19
- import "./chunk-QONOJO45.js";
18
+ } from "./chunk-VKSOTZK3.js";
19
+ import "./chunk-DIA7CT7J.js";
20
+ import "./chunk-LBYWGMOA.js";
20
21
  import "./chunk-WHOJWOSV.js";
21
22
  import "./chunk-5XZ744TS.js";
22
23
  import {
@@ -39,7 +40,7 @@ async function runLockCommand(args) {
39
40
  return lockRename(args);
40
41
  case "prune":
41
42
  return lockPrune(args);
42
- case "adopt":
43
+ case "import":
43
44
  return lockAdopt(args);
44
45
  default:
45
46
  throw unknownSubcommand("lock", sub);
@@ -101,7 +102,7 @@ async function observedLockKeys(entryFile, lock) {
101
102
  throw new Error(
102
103
  `lock prune evaluated "${entryFile}" to find out which lock entries are still live, and loading it failed:
103
104
  ${reason}
104
- Finding orphans requires running your workspace source \u2014 anything the entry file does at module scope (asserting env vars, reading config) runs too. To drop entries you can name yourself, no evaluation is needed: \`xanots lock prune --no-verify --yes <kind:name>\u2026\` with \`--lock=<path>\` or \`--entry=<path>\` to locate the lock.`,
105
+ Finding orphans requires running your workspace source \u2014 anything the entry file does at module scope (asserting env vars, reading config) runs too. To drop entries you can name yourself, no evaluation is needed: \`xanots lock prune --identity-only --yes <kind:name>\u2026\` with \`--lock=<path>\` or \`--entry=<path>\` to locate the lock.`,
105
106
  { cause: err }
106
107
  );
107
108
  }
@@ -114,7 +115,7 @@ Finding orphans requires running your workspace source \u2014 anything the entry
114
115
  }
115
116
  async function lockPrune(args) {
116
117
  const [, ...rest] = args.positionals;
117
- if (args.noVerify) return lockPruneNamed(args, rest);
118
+ if (args.identityOnly) return lockPruneNamed(args, rest);
118
119
  const [entryFile, ...keys] = rest;
119
120
  if (!entryFile) {
120
121
  throw missingArgument("entry-file", { command: "lock", subcommand: "prune" });
@@ -146,7 +147,7 @@ async function lockPrune(args) {
146
147
  function lockPruneNamed(args, keys) {
147
148
  if (keys.length === 0) {
148
149
  throw new UsageError(
149
- "`lock prune --no-verify` prunes the entries you name, so it needs at least one key (`table:users`). Without keys there is nothing to prune, because finding orphans is exactly the step --no-verify skips \u2014 drop the flag and pass the entry file to do that.",
150
+ "`lock prune --identity-only` prunes the entries you name, so it needs at least one key (`table:users`). Without keys there is nothing to prune, because finding orphans is exactly the step --identity-only skips \u2014 drop the flag and pass the entry file to do that.",
150
151
  { helpFor: { command: "lock", subcommand: "prune" } }
151
152
  );
152
153
  }
@@ -158,7 +159,7 @@ function lockPruneNamed(args, keys) {
158
159
  }
159
160
  }
160
161
  process.stderr.write(
161
- `xanots: --no-verify \u2014 nothing was evaluated, so nothing confirms ${keys.length === 1 ? "this key is" : "these keys are"} orphaned. A key the workspace still exports gets a NEW identity at the next export.
162
+ `xanots: --identity-only \u2014 nothing was evaluated, so nothing confirms ${keys.length === 1 ? "this key is" : "these keys are"} orphaned. A key the workspace still exports gets a NEW identity at the next export.
162
163
  `
163
164
  );
164
165
  applyPrune(args, lockPath, lock, keys);
@@ -184,9 +185,9 @@ ${canonicalNote}`);
184
185
  function lockAdopt(args) {
185
186
  const [, bundlePath] = args.positionals;
186
187
  if (!bundlePath) {
187
- throw missingArgument("bundle.json", { command: "lock", subcommand: "adopt" });
188
+ throw missingArgument("bundle.json", { command: "lock", subcommand: "import" });
188
189
  }
189
- const lockPath = commandLockPath(args, "adopt");
190
+ const lockPath = commandLockPath(args, "import");
190
191
  const lock = existsSync(lockPath) ? readLockFile(lockPath) : emptyLock();
191
192
  let bundle;
192
193
  try {
@@ -206,11 +207,11 @@ function lockAdopt(args) {
206
207
  process.stdout.write(`Adoption would overwrite ${changed.length} existing lock entr(y/ies):
207
208
  ${lines}
208
209
  `);
209
- throw new Error("lock adopt overwrites pinned identities \u2014 re-run with --yes to apply.");
210
+ throw new Error("lock import overwrites pinned identities \u2014 re-run with --yes to apply.");
210
211
  }
211
212
  if (vaultCount > 0) {
212
213
  process.stderr.write(
213
- `xanots: WARNING \u2014 ${bundlePath} contains ${vaultCount} vault entr(y/ies) (secrets). Do NOT commit the bundle file; delete it once adoption is done.
214
+ `xanots: WARNING \u2014 ${bundlePath} contains ${vaultCount} vault entr(y/ies) (secrets). Do NOT commit the bundle file; delete it once the import is done.
214
215
  `
215
216
  );
216
217
  }
@@ -229,4 +230,4 @@ ${lines}
229
230
  export {
230
231
  runLockCommand
231
232
  };
232
- //# sourceMappingURL=lock-commands-ET7NIOLH.js.map
233
+ //# sourceMappingURL=lock-commands-DQ7CUMIV.js.map