@xanots/sdk 0.0.8 → 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.
- package/CHANGELOG.md +29 -0
- package/README.md +28 -21
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-4W37DGXS.js → agent-file-refresh-QNKN5RYD.js} +3 -3
- package/dist/bin.js +8 -7
- package/dist/{branch-commands-PBQ36L4A.js → branch-commands-2BLOC2GR.js} +13 -11
- package/dist/{capture-7PO6SGB4.js → capture-4WVJY4DQ.js} +2 -2
- package/dist/{chunk-ZOYMZZ3S.js → chunk-3INK4Y4E.js} +1 -1
- package/dist/{chunk-NDZFBZHC.js → chunk-3UABJA4X.js} +1 -1
- package/dist/{chunk-7AXQKABT.js → chunk-5R73LFWK.js} +3 -3
- package/dist/{chunk-CDAQUY5W.js → chunk-5YCQ2QHH.js} +2 -2
- package/dist/{chunk-2ROR3AZC.js → chunk-75Z74TA7.js} +2 -2
- package/dist/{chunk-QTNO2WD6.js → chunk-7ZYW652H.js} +1 -1
- package/dist/{chunk-SNO3KHCY.js → chunk-ACCBOMCB.js} +109 -78
- package/dist/{chunk-4PTSTDIG.js → chunk-AIZKXUNP.js} +2 -2
- package/dist/{chunk-P5C2YKAM.js → chunk-ANUDXFEX.js} +18 -27
- package/dist/chunk-CTD5ZCV6.js +28 -0
- package/dist/{chunk-5HCDZ2XN.js → chunk-DBFU47BJ.js} +2 -2
- package/dist/{chunk-OKNSR7MT.js → chunk-DIA7CT7J.js} +129 -150
- package/dist/{chunk-JQLR64UC.js → chunk-F6CYJ7TN.js} +21 -6
- package/dist/{chunk-BKDJN76G.js → chunk-FE5I6S6N.js} +1 -1
- package/dist/{chunk-EM5QPTXP.js → chunk-I7DQDJAM.js} +30 -48
- package/dist/{chunk-QIWBCS7N.js → chunk-JGCWTCA7.js} +2 -2
- package/dist/{chunk-MDXR5E5Q.js → chunk-K5IOND4K.js} +2 -2
- package/dist/{chunk-4PE4ZAB7.js → chunk-KA6G2L7U.js} +5 -5
- package/dist/{chunk-64QK6JEK.js → chunk-LBYWGMOA.js} +36 -2
- package/dist/{chunk-3MDKV2VA.js → chunk-P6TAVLOX.js} +2 -2
- package/dist/{chunk-3QW5NFZJ.js → chunk-QKM4U5UK.js} +3 -3
- package/dist/{chunk-T4XPCJRF.js → chunk-TCFIPDB3.js} +1 -1
- package/dist/{chunk-FEQTQ6PM.js → chunk-VKSOTZK3.js} +2 -2
- package/dist/{chunk-6DHBYBTO.js → chunk-VNQM3V2C.js} +1 -2
- package/dist/{chunk-PYS7UNNW.js → chunk-W24FJHPD.js} +3 -3
- package/dist/chunk-WGPXT2G2.js +22 -0
- package/dist/{chunk-6AAT2AYQ.js → chunk-WP4OZZV4.js} +2 -2
- package/dist/{chunk-MU3O43L2.js → chunk-YBC3IKMF.js} +2 -2
- package/dist/{chunk-C3M5K4ZH.js → chunk-YYFXVYPX.js} +37 -6
- package/dist/chunk-ZQ2PKR6R.js +40 -0
- package/dist/cli.d.ts +57 -31
- package/dist/cli.js +6 -5
- package/dist/codegen-command-GB3H2KQ7.js +46 -0
- package/dist/{completion-A6BZ3XGU.js → completion-WF46272M.js} +2 -2
- package/dist/{config-NL33PN4D.js → config-476F3PT5.js} +1 -1
- package/dist/{deploy-command-QZ3GNLAD.js → deploy-command-QTIVA22A.js} +68 -100
- package/dist/{ephemeral-command-DL7EY4LL.js → ephemeral-command-U4AQ3TXX.js} +25 -28
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/{init-command-4MG3UKUO.js → init-command-MAXULNAD.js} +13 -10
- package/dist/{onboard-command-EHOHKQQU.js → init-web-3JNFG6GI.js} +10 -10
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +42 -45
- package/dist/{live-diff-QK4KC2FJ.js → live-diff-IXKBVG4K.js} +3 -3
- package/dist/{lock-commands-Y4S4NUCE.js → lock-commands-DQ7CUMIV.js} +20 -19
- package/dist/{login-command-DFCURZLC.js → login-command-Z6CHTA57.js} +7 -7
- package/dist/{logout-command-WXVZQCAV.js → logout-command-ER6IKAYJ.js} +2 -2
- package/dist/{loop-7SAIGRCZ.js → loop-D5NPL4VH.js} +3 -3
- package/dist/{marketplace-command-BCOAAN2I.js → marketplace-command-P4IPLJ6J.js} +6 -6
- package/dist/{meta-client-57ZWVHST.js → meta-client-K2J4XH64.js} +6 -6
- package/dist/node.d.ts +2 -2
- package/dist/node.js +9 -8
- package/dist/{validate-command-GLF5ZOOW.js → preflight-command-GZ2GE5RN.js} +17 -16
- package/dist/{profile-command-QJAAUZIV.js → profile-command-LJSBDV2L.js} +5 -5
- package/dist/{release-command-DN75G5GJ.js → release-command-YUBTNHVX.js} +36 -33
- package/dist/{routes-manifest-SP3ZXLMR.js → routes-manifest-PWZHDOI5.js} +2 -2
- package/dist/scaffold.js +2 -2
- package/dist/{static-host-D6KS7X45.js → static-host-3WMV7IZO.js} +1 -1
- package/dist/status-command-AL47VG7H.js +162 -0
- package/dist/{store-CUCBSYLj.d.ts → store-BG1UPZ3Z.d.ts} +5 -5
- package/dist/{test-command-RRNNJ45I.js → test-command-YAZLKLGQ.js} +46 -29
- package/dist/{upgrade-command-XFOAWDI3.js → upgrade-command-FB5QJ363.js} +13 -12
- package/dist/{workspace-K72NP7SX.js → workspace-2COHDBM3.js} +1 -1
- package/dist/{workspace-command-QCFELEGR.js → workspace-command-43P42FBP.js} +31 -32
- package/dist/{workspace-export-AJMGN3CQ.js → workspace-export-DURY5WYL.js} +2 -2
- package/guides/README.md +2 -2
- package/guides/authoring.md +9 -1
- package/guides/cli.md +17 -19
- package/guides/codegen.md +21 -5
- package/guides/coverage.md +1 -1
- package/guides/deploying.md +31 -34
- package/guides/environment.md +4 -4
- package/guides/object-kinds.md +3 -3
- package/guides/project-structure.md +1 -1
- package/guides/scaffold.md +25 -2
- package/guides/typed-frontend.md +1 -1
- package/llms/fields.md +3 -2
- package/llms/kinds-agent-mcp.md +1 -1
- package/llms/kinds-core.md +1 -1
- package/llms/kinds-realtime.md +1 -1
- package/llms/lock.md +5 -5
- package/llms/statements-calls.md +2 -1
- package/llms/statements-data.md +5 -2
- package/llms/tests.md +3 -2
- package/llms-full.txt +41 -44
- package/llms.txt +20 -29
- package/manifest.json +95 -426
- package/package.json +1 -1
- package/dist/chunk-3EYUR3TX.js +0 -100
- package/dist/chunk-JQJPFUZI.js +0 -118
- package/dist/chunk-XP7S3VWY.js +0 -78
- package/dist/codegen-command-U2W72DLG.js +0 -43
- package/dist/env-target-NAYVEXBH.js +0 -16
- package/dist/sandbox-details-command-EDO56IY3.js +0 -18
- 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-
|
|
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-
|
|
21
|
+
} from "./chunk-AIZKXUNP.js";
|
|
20
22
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
isMachineOutput,
|
|
24
|
+
writeJson
|
|
25
|
+
} from "./chunk-NUQCEOKA.js";
|
|
24
26
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
clearEnvironment,
|
|
28
|
+
getEnvironment,
|
|
29
|
+
readEphemeralState
|
|
30
|
+
} from "./chunk-K5IOND4K.js";
|
|
28
31
|
import {
|
|
29
32
|
getAccessToken
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-QKM4U5UK.js";
|
|
34
|
+
import "./chunk-FE5I6S6N.js";
|
|
32
35
|
import {
|
|
33
36
|
exportWorkspaceBundle
|
|
34
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-U2W72DLG.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
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
103
|
+
} from "./chunk-P6TAVLOX.js";
|
|
104
104
|
import {
|
|
105
105
|
Xano,
|
|
106
106
|
workspace
|
|
107
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
6
|
+
} from "./chunk-YYFXVYPX.js";
|
|
6
7
|
import {
|
|
7
8
|
resolveAiFlags
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KA6G2L7U.js";
|
|
9
10
|
import "./chunk-ZSYZTGJH.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-YBC3IKMF.js";
|
|
12
|
+
import "./chunk-ANUDXFEX.js";
|
|
12
13
|
import "./chunk-Q77KNEUL.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
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-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
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-
|
|
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/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
const resolved = npmViewVersion(
|
|
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 ${
|
|
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 ${
|
|
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", `${
|
|
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
|
-
|
|
34
|
-
|
|
33
|
+
CONFIGURATOR_PACKAGE,
|
|
34
|
+
runInitWebCommand
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=init-web-3JNFG6GI.js.map
|
package/dist/internal.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
112
|
+
} from "./chunk-LBYWGMOA.js";
|
|
113
113
|
import "./chunk-WHOJWOSV.js";
|
|
114
114
|
import {
|
|
115
115
|
encodeStatement,
|
|
@@ -765,7 +765,7 @@ function renderTestsSection() {
|
|
|
765
765
|
"",
|
|
766
766
|
"- The run uses an EMPTY datasource, so **no `table({ seed })` rows exist while it runs** and every `db` read misses. A test that buys seeded row 1 fails with its own precondition message, which reads as a wrong id rather than an empty database. Create what the test needs INSIDE the test \u2014 typically a `defineFunction` fixture the stack calls first.",
|
|
767
767
|
'- `s.api.call` does NOT raise when the endpoint answers with an error. It BINDS the error envelope (`{code, message}`) to its `as` and carries on, so a later `s.expect.to_be_defined({ expr: ref("r.field") })` reports the ASSERTION while the real failure was the call, four statements up. Assert on the envelope \u2014 `s.expect.to_contain({ expr: ref("r.code"), value: c.text("ERROR_CODE_INPUT_ERROR") })` \u2014 when a call may fail. `s.function.run` raises instead; the two disagree.',
|
|
768
|
-
|
|
768
|
+
'- `s.expect.to_throw({ body, exception? })` runs `body` in an ISOLATED var stack, so a variable bound EARLIER in the test is not visible inside it \u2014 bind what the body needs inside the body. `exception` is a `Value` whose text the raised message must CONTAIN (`c.text("already exists")`, not a bare string); omit it to accept any error.',
|
|
769
769
|
"- `s.expect.to_throw` catches such a call only when the error carries a MESSAGE. `ERROR_CODE_ACCESS_DENIED` arrives with an empty one, so `to_throw` around an auth-refused call reports `to_throw failed - response is ok` \u2014 which reads as a broken auth gate on a gate that works.",
|
|
770
770
|
"- An endpoint's `auth` gate is NOT enforced on `s.api.call`. A `query({ auth: users })` runs anyway and fails only where its stack dereferences `auth(...)`. A stack that never touches `auth(...)` runs unauthenticated and passes.",
|
|
771
771
|
"- Neither `auth.token` nor an `Authorization` entry in `headers` authenticates the call \u2014 a token that answers 200 over real HTTP is refused here. To cover auth-gated logic, move the body into a `defineFunction` taking the user id and `s.function.call` that; the gate itself is not reachable from a workflow test.",
|
|
@@ -774,10 +774,11 @@ 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
|
-
"- `--
|
|
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.",
|
|
781
|
+
'- For CI, the exit code says THAT something failed and the JSON says WHICH. Every progress line goes to stderr and stdout carries one JSON document \u2014 emitted whenever stdout is not a terminal, or on demand with `--json`. `run-all` and `run`: `{ dest, env, total, passed, failed, tests: [{ kind, name, object?, status: "pass"|"fail", message?, timing? }] }`, with the same keys on an empty suite. `list` is `{ dest, env, total, tests: [...] }` and `deploy --test` nests the run under `testRun`. The per-test array is always `tests`.',
|
|
781
782
|
"- `xanots deploy ./index.ts --test` deploys and then runs the suite against what it just shipped. A failure exits 5 WITHOUT retracting the deploy \u2014 the environment is live either way.",
|
|
782
783
|
""
|
|
783
784
|
];
|
|
@@ -880,7 +881,7 @@ function renderSections(m) {
|
|
|
880
881
|
"",
|
|
881
882
|
"Set `canonical` on every `apiGroup`. The engine mints the URL token server-side, so",
|
|
882
883
|
"without one a group's client paths are unresolvable until a lock exists: the bundle",
|
|
883
|
-
"exports fine and `xanots
|
|
884
|
+
"exports fine and `xanots routes` / `getPath()` then fail on the very queries it just",
|
|
884
885
|
"built. An explicit `canonical` resolves them from the source alone.",
|
|
885
886
|
"",
|
|
886
887
|
"Build warnings: `export()` prints the shapes that deploy clean and then do the wrong",
|
|
@@ -899,7 +900,7 @@ function renderSections(m) {
|
|
|
899
900
|
"To rename an object: rename in code, export (stderr prints the exact fix-up), run",
|
|
900
901
|
"`xanots lock rename <kind> <old> <new>`, export again \u2014 the original guid is emitted",
|
|
901
902
|
"under the new name, so the engine renames in place instead of delete+create. Taking",
|
|
902
|
-
"over an existing workspace: `xanots lock
|
|
903
|
+
"over an existing workspace: `xanots lock import <its-packageExport.json>` first, then",
|
|
903
904
|
"export. Pruning, programmatic seeding, and which commands write the lock:",
|
|
904
905
|
"`llms/lock.md`.",
|
|
905
906
|
"",
|
|
@@ -912,19 +913,19 @@ function renderSections(m) {
|
|
|
912
913
|
"AND records \u2014 before importing. The blast radius is a disposable environment, not a",
|
|
913
914
|
"production workspace, but confirm with the user before the first run.",
|
|
914
915
|
"",
|
|
915
|
-
"**
|
|
916
|
+
"**One destination, and no flag for it.**",
|
|
916
917
|
"",
|
|
917
|
-
"-
|
|
918
|
-
" (~1h; `--expires-hours` 1\u201372 at create time)
|
|
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",
|
|
919
921
|
" `./.xano/ephemeral.json`, so deploying again REFRESHES it and the URL is unchanged;",
|
|
920
922
|
" if it expired or was swept, a fresh one is created and the new URL is called out.",
|
|
921
923
|
" `--static` puts the frontend ON THE EPHEMERAL, so backend and frontend share one",
|
|
922
924
|
" disposable environment.",
|
|
923
925
|
" \u26A0 Only the BACKEND URL survives a refresh: the replace clears static hosting too,",
|
|
924
926
|
" so `--static` publishes a NEW host every run and the previous URL stops serving.",
|
|
925
|
-
"-
|
|
926
|
-
"
|
|
927
|
-
" 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.",
|
|
928
929
|
"- `xanots release` promotes to your INSTANCE workspace and MERGES, not replaces:",
|
|
929
930
|
" adds/updates what you define, deletes nothing, writes no rows. Destruction is",
|
|
930
931
|
" opt-in per flag, previewed + confirmed, and can drop a table WITH its rows.",
|
|
@@ -947,7 +948,7 @@ function renderSections(m) {
|
|
|
947
948
|
'\u26A0 It is INJECTED in bracket form \u2014 `window["XANO_HOST"]="\u2026"` \u2014 so verifying a deploy',
|
|
948
949
|
"by grepping `window.XANO_HOST` matches nothing and reads as a failed inject. Grep the",
|
|
949
950
|
"bare `XANO_HOST` token.",
|
|
950
|
-
"\u26A0 `xanots
|
|
951
|
+
"\u26A0 `xanots preflight` ignores the deploy login and reads `XANO_VALIDATE_INSTANCE` /",
|
|
951
952
|
"`XANO_VALIDATE_TOKEN` (+ optional `XANO_VALIDATE_WORKSPACE_ID`) from the environment.",
|
|
952
953
|
"**Displaying a stored file.** A file column comes back as `{ path, name, type, size,",
|
|
953
954
|
"meta, access, url }`. \u26A0 Do NOT use its `url`: on a tenant-scoped environment that field",
|
|
@@ -1099,7 +1100,7 @@ function renderSections(m) {
|
|
|
1099
1100
|
" never removes it. The floor is the RUNTIME, not the def: a second def, or a much richer",
|
|
1100
1101
|
" one, adds ~1 kB. So the cost is paid by importing ANY def at all, and reducing what a",
|
|
1101
1102
|
" def does will not reduce it.",
|
|
1102
|
-
" Fix: `xanots
|
|
1103
|
+
" Fix: `xanots routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) \u2014 verbs, paths, and sockets as",
|
|
1103
1104
|
' plain data importing NOTHING, still compile-checked: `routePath("blog/{slug}", { slug })`,',
|
|
1104
1105
|
' `channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base',
|
|
1105
1106
|
" URLs lifted to `wss://h/ws/<tenant>:<canonical>`). A rename is a type error, not a 404.",
|
|
@@ -1125,7 +1126,7 @@ function renderSections(m) {
|
|
|
1125
1126
|
" `s.while`/`s.switch`/`s.try_catch`/`s.db.transaction`/`s.expect.to_throw`",
|
|
1126
1127
|
" take their sub-stack as `body` (`try`/`catch`/`finally` for `try_catch`);",
|
|
1127
1128
|
" `s.group(body)` and `s.util.post_process(body)` take it **positionally**.",
|
|
1128
|
-
" `s.for` is **count-bounded** (`{ as, count
|
|
1129
|
+
" `s.for` is **count-bounded** (`{ as, count: <Value>, body }`), not from/to. See the",
|
|
1129
1130
|
" authored signatures in `llms/statements-data.md`.",
|
|
1130
1131
|
"- **MCP servers & agents are distinct root kinds** that both persist under the",
|
|
1131
1132
|
" `toolset` payload key (so a same-name pair collides). `mcpServer({...})` exposes",
|
|
@@ -1186,19 +1187,10 @@ function renderSections(m) {
|
|
|
1186
1187
|
' credential the runner has. As a file that triple is `{ "type": "token",',
|
|
1187
1188
|
' "instance_base_url": \u2026, "workspace_id": <n>, "meta_api_token": \u2026 }`. The older',
|
|
1188
1189
|
" `$XANO_REFRESH_TOKEN` + `$XANO_CLIENT_ID` pair still works but ROTATES: single-use.",
|
|
1189
|
-
"- **Event-driven objects fire on an EPHEMERAL
|
|
1190
|
-
"
|
|
1191
|
-
"
|
|
1192
|
-
"
|
|
1193
|
-
" run.",
|
|
1194
|
-
" \u26A0 Under `--dest sandbox` they import cleanly but their stacks NEVER execute, and there",
|
|
1195
|
-
" is no way to fire one manually \u2014 an insert on a bound table does not run its",
|
|
1196
|
-
" `tableTrigger`, and the design silently does nothing. Only synchronously-invoked objects",
|
|
1197
|
-
" (queries, functions, and the agents an endpoint calls with `s.ai.agent.run`) run there.",
|
|
1198
|
-
" If you must stay on the sandbox, verify the logic out of band: factor the body into a",
|
|
1199
|
-
" `defineFunction` (or a callable `query`) and invoke it directly \u2014 a `tableTrigger` that",
|
|
1200
|
-
" screens a row on insert should delegate to a function a `query` can also call via",
|
|
1201
|
-
" `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.",
|
|
1202
1194
|
'- **Zero-based numeric keys make `c.obj` a LIST.** `c.obj({ "0": "a" })` evaluates to',
|
|
1203
1195
|
' `["a"]`: a numeric key IS an index in the engine\'s data model, so keys that are exactly',
|
|
1204
1196
|
" `0..n-1` come back as a list with HTTP 200 and no error. Write `c.array([...])` when you",
|
|
@@ -1259,7 +1251,7 @@ function renderSections(m) {
|
|
|
1259
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.',
|
|
1260
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.',
|
|
1261
1253
|
"- `task({ name, guid?, description?, docs?, datasource?, active?, tags?, history?, schedule?, stack?, middleware? })` \u2014 a scheduled background job (function-like `stack`, no `input`/`response`).",
|
|
1262
|
-
' - `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
|
|
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).',
|
|
1263
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> })`.',
|
|
1264
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.',
|
|
1265
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.",
|
|
@@ -1326,7 +1318,7 @@ function renderSections(m) {
|
|
|
1326
1318
|
"- `name` takes letters, digits, and `/ _ - { } . ` or a space; anything else is an export error."
|
|
1327
1319
|
];
|
|
1328
1320
|
const kindsAgentMcp = [
|
|
1329
|
-
"- `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
|
|
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.",
|
|
1330
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.",
|
|
1331
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 })`.",
|
|
1332
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.',
|
|
@@ -1380,7 +1372,7 @@ function renderSections(m) {
|
|
|
1380
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.",
|
|
1381
1373
|
" - Socket: `server.getUrl(base, { tenant })` \u2192 `/ws/<tenant>:<canonical>`. \u26A0 A bare canonical on a tenant host resolves against the INSTANCE workspace instead.",
|
|
1382
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.",
|
|
1383
|
-
" - Because the shapes differ, `getUrl` TRANSLATES a tenant base URL instead of concatenating: pass the `https://<host>/tenant/<name>` that `
|
|
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.",
|
|
1384
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.",
|
|
1385
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.",
|
|
1386
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.",
|
|
@@ -1477,8 +1469,9 @@ function renderSections(m) {
|
|
|
1477
1469
|
"`s.db.get`/`edit`/`del` on that column answer HTTP 400 `Missing param: field_value` rather",
|
|
1478
1470
|
"than matching nothing. Declare `f.tableRef(users, { required: true, default: 0 })` for",
|
|
1479
1471
|
'"not set yet" \u2014 `s.db.get({ fieldName: "driver", fieldValue: c.int(0) })` matches no row and',
|
|
1480
|
-
"binds `null`, which is the answer the null was reaching for
|
|
1481
|
-
"`
|
|
1472
|
+
"binds `null`, which is the answer the null was reaching for \u2014 and never `s.db.get_by_id`,",
|
|
1473
|
+
"which validates `id >= 1` and fails the whole request on the sentinel. `export()` warns on a",
|
|
1474
|
+
"literal `c.null()` in that slot.",
|
|
1482
1475
|
"An `f.vector(size)` column is SEARCHED through `s.db.query`'s `eval` pipeline, not through",
|
|
1483
1476
|
'any `SearchOp`: give the table `index: [{ type: "vector", fields: [{ name: "embedding", op:',
|
|
1484
1477
|
'"vector_cosine_ops" }] }]`, then rank with a distance filter + a sort on its alias (see',
|
|
@@ -1630,14 +1623,14 @@ function renderSections(m) {
|
|
|
1630
1623
|
'- **Every** statement takes `disabled?`/`description?` \u2014 annotations on the stack item, not args: `disabled: true` is Xano\'s "disable step" (kept in the stack, skipped at runtime), `description` the note beside it. Inline on object-arg factories; a trailing object on the positional ones (`s.set_var("x", v, { disabled: true })`).',
|
|
1631
1624
|
'- **Statements with an `as`** also take `asFilters?` \u2014 `fl.*` filters on the RESULT as it binds, in order, same slot as `disabled`: `s.set_var("x", v, { asFilters: [fl.trim(), fl.lower()] })`. Saves a follow-up `set_var`. Throws without an `as`. The bound variable is RETYPED by the chain (`db.query` + `[fl.count()]` \u2192 `number`); filters whose result the engine declares as `any` (`get`, `set`, `json_decode`, \u2026) fold to `unknown`.',
|
|
1632
1625
|
"- `s.conditional({ when, then, elif?, else? })` \u2014 if/elif/else. `when` is a condition (`expr`/`cmp`/`and`/`or`); `elif` is an ordered `[{ when, then }]` (each an else-if branch); `then`/`else` are `Statement[]`.",
|
|
1633
|
-
"- `s.for({ as, count, body })` \u2014 **count-bounded** loop (`as` is the index), NOT from/to.",
|
|
1626
|
+
"- `s.for({ as, count, body })` \u2014 **count-bounded** loop (`as` is the index), NOT from/to; `count` is a `Value`, not a bare number.",
|
|
1634
1627
|
"- `s.foreach({ as, list, body })` \u2014 iterate `list`; `as` is the current item.",
|
|
1635
1628
|
"- `s.while({ when, body })` \u2014 `when` is a condition (`expr`/`cmp`/`and`/`or`).",
|
|
1636
1629
|
"- `s.switch({ on, cases: [{ when, body, break? }], default? })` \u2014 multi-way branch on a subject `Value` `on`; each `case`'s `when` is a literal `Value` matched against `on` (NOT a comparison \u2014 use `s.conditional` for `<`/`>`/ranges). \u26A0 **Omitting `break: true` FALLS THROUGH** \u2014 the matched case also runs every LATER case body. Type-checks clean; only `export --strict` catches it.",
|
|
1637
1630
|
"- `s.try_catch({ try, catch?, finally? })` \u2014 three `Statement[]` blocks.",
|
|
1638
1631
|
"- `s.group(body)` / `s.util.post_process(body)` \u2014 take a `Statement[]` **positionally**.",
|
|
1639
1632
|
"- `s.foreach_break()` / `s.foreach_continue()` / `s.foreach_remove()` \u2014 nullary loop control.",
|
|
1640
|
-
"- `s.expect.to_throw({ body, exception? })` \u2014 `body` is the statements expected to raise.",
|
|
1633
|
+
"- `s.expect.to_throw({ body, exception? })` \u2014 `body` is the statements expected to raise; `exception` is a `Value`, not a bare string.",
|
|
1641
1634
|
""
|
|
1642
1635
|
);
|
|
1643
1636
|
const stmtData = [
|
|
@@ -1650,7 +1643,8 @@ function renderSections(m) {
|
|
|
1650
1643
|
"primary key `id`):",
|
|
1651
1644
|
"",
|
|
1652
1645
|
"- `s.db.get({ table, fieldName?, fieldValue, lock?, output?, as? })` \u2014 one row by field match; `output` restricts returned columns (and overrides column visibility \u2014 it can pull `internal` columns like a password hash).",
|
|
1653
|
-
"- `s.db.get_by_id({ table, id, output?, addon?, tableAlias?, as? })` \u2014 get by primary key. Takes `id`, NOT `fieldName`/`fieldValue`; binds the row or `null`
|
|
1646
|
+
"- `s.db.get_by_id({ table, id, output?, addon?, tableAlias?, as? })` \u2014 get by primary key. Takes `id`, NOT `fieldName`/`fieldValue`; binds the row or `null` for an id that names no row. Both spellings are live in pulled workspaces.",
|
|
1647
|
+
' - \u26A0 `id` is validated `>= 1`, so the `0` sentinel an optional `f.tableRef` stores fails the request with HTTP 400 `Value is less than the minimum value of 1` \u2014 it does NOT bind `null`. The throw is not scoped to the lookup: inside a `foreach` it kills the whole request, so one unset FK loses every other row\'s work. Read a nullable FK with the field-match form, which binds `null` on `0` and lets the loop finish: `s.db.get({ table, fieldName: "id", fieldValue: ref("row.fk"), as })`.',
|
|
1654
1648
|
"- `s.db.has({ table, fieldName?, fieldValue, as? })` \u2014 existence test.",
|
|
1655
1649
|
"- `s.db.del({ table, fieldName?, fieldValue, as? })` \u2014 delete by field match.",
|
|
1656
1650
|
"- `s.db.add({ table, row?, data?, output?, as? })` \u2014 insert; `row` is a partial keyed by column.",
|
|
@@ -1658,8 +1652,9 @@ function renderSections(m) {
|
|
|
1658
1652
|
" - `null` is accepted on EVERY column, including ones that refuse every other literal, and encodes `const:null` \u2014 a write OF null, not the same as omitting the key. A column's `nullable` is not consulted at encode; the engine refuses a null it forbids.",
|
|
1659
1653
|
" - Omitting a key on `add` writes the column's type default \u2014 declared `default` if set, `[]` for a list, `{}` for obj/json, else `null`. That `null` is EMITTED, not what the row holds: the engine applies the column's nullability, so a `nullable` column keeps `null` and a non-nullable one lands on its type's zero value (`\"\"`, `0`, `false`). Set the cell when the stored value matters. On `edit` an omitted key keeps its stored value.",
|
|
1660
1654
|
" - An `f.password()` cell takes the PLAINTEXT \u2014 the column hashes on write, so a pre-hashed value, or a hashing filter on the cell, stores a hash of a hash that `security.check_password` can never match.",
|
|
1655
|
+
" - A `table({ seed })` cell hashes the same way: the import writes the plaintext through the column's own rules, so a seeded credential matches under `security.check_password` exactly as an added one does. Demo accounts work as fixtures \u2014 the usual caution about seed data applies, since the plaintext sits in the repo.",
|
|
1661
1656
|
"- `s.db.edit({ table, fieldName?, fieldValue, row?, data?, output?, as? })` \u2014 update by field match.",
|
|
1662
|
-
"- `s.db.patch({ table, fieldName?, fieldValue, data, output?, as? })` \u2014 merge a partial
|
|
1657
|
+
"- `s.db.patch({ table, fieldName?, fieldValue, data, output?, as? })` \u2014 merge a partial. \u26A0 Unlike `db.edit`'s `row`, `data` is a single object `Value` \u2014 write `obj({ unread: c.int(0) })`, not the column-keyed record `row` takes.",
|
|
1663
1658
|
" On these three, `output` restricts the columns of the RETURNED row only \u2014 it does not change",
|
|
1664
1659
|
" what is written. Not offered on `db.del`/`db.has` (their result is a scalar) or on",
|
|
1665
1660
|
" `db.add_or_edit` (no output envelope).",
|
|
@@ -1668,6 +1663,7 @@ function renderSections(m) {
|
|
|
1668
1663
|
" - `where` / `additionalWhere` \u2014 `expr(...)`, an `expr[]` (ANDed), or a raw `Value`. Rides `context.search`.",
|
|
1669
1664
|
" - \u26A0 `ignoreEmpty` DROPS the predicate when the operand is empty \u2014 it does not match zero rows. On an `in` comparison an empty list therefore returns the UNFILTERED set, so never use it to scope rows to a permitted-id list: an empty list of permissions returns everything.",
|
|
1670
1665
|
" - For the full operator set use `cmp(left, op, right, { ignoreEmpty? })` \u2014 `op`: `in`/`not in`/`like`/`ilike`/`between`/`contains`/`includes`/`overlaps`/`@>`/`~`/`search`/\u2026 plus the `expr` comparisons. Database-only \u2014 a runtime condition takes the `expr` set only.",
|
|
1666
|
+
' - \u26A0 `like`/`ilike` take the operand as the PATTERN, verbatim: a bare term matches only an exact whole-string equal, and the endpoint answers HTTP 200 with zero rows \u2014 nothing reports a problem, so a search box that matches nothing ships. For substring matching use `includes`/`not includes`, which wrap the operand in `%\u2026%` themselves and match case-INSENSITIVELY. Prefer them over a hand-built `"%" + term + "%"`, which is non-empty even for an empty term and so defeats `ignoreEmpty`; `includes` composes with it. `contains`/`@>`/`overlaps` are JSON/array containment, not text \u2014 on a text column they 400 `ParseError: Invalid value for param`.',
|
|
1671
1667
|
" - Compose nested boolean logic with `and(...)` / `or(...)` groups (also available on `addon()` `where`).",
|
|
1672
1668
|
" - An operand may be a bare value (`col`/`inp`/`ref`/`auth`/`c.*`) OR a **filtered** value (`withFilters(...)`) inline \u2014 the engine compiles the string and arithmetic filters (`trim`, `concat`, `upper`, `lower`, \u2026) into the SQL.",
|
|
1673
1669
|
" - \u26A0 The REQUEST-TIME timestamp filters have no SQL form and kill the request with a bare fatal naming nothing: `epochms_transform`, `epochms_add_ms`, `epochms_add_secs`, `epochms_date`, `epochms_from_format`. For a relative cutoff use the SQL-side family instead (`epochms_add_day`, `epochms_sub_month`, `epochms_year`, \u2026) or compute it in an earlier `s.set_var` and `ref()` that. `export --strict` reports it; a bare `c.now()` operand is always fine.",
|
|
@@ -1759,11 +1755,11 @@ function renderSections(m) {
|
|
|
1759
1755
|
"- `xanots lock rename <kind> <old> <new>` \u2014 `kind` is the payload key (or `table`/`api_group`).",
|
|
1760
1756
|
" Run it after renaming in code; the next export emits the original guid under the new name.",
|
|
1761
1757
|
"- `xanots lock prune <entry-file> [keys\u2026] --yes` \u2014 drops orphaned entries. Finding orphans",
|
|
1762
|
-
" RUNS the entry's module scope (env assertions included); `--
|
|
1758
|
+
" RUNS the entry's module scope (env assertions included); `--identity-only --yes <kind:name>\u2026`",
|
|
1763
1759
|
" prunes named keys with no evaluation and no orphan check.",
|
|
1764
|
-
"- `xanots lock
|
|
1760
|
+
"- `xanots lock import <live-bundle.json> [--yes]` \u2014 seed the lock from an engine",
|
|
1765
1761
|
" packageExport when taking over an existing workspace.",
|
|
1766
|
-
"- Every lock subcommand accepts `--lock=<path>`. `rename`/`
|
|
1762
|
+
"- Every lock subcommand accepts `--lock=<path>`. `rename`/`import` take no entry file, so",
|
|
1767
1763
|
" from outside the lock's directory pass `--lock` (or `--entry=<entry-file>` to derive it).",
|
|
1768
1764
|
"- Programmatic use: call `seedLockOverrides(readLockFile(path))` BEFORE importing any def",
|
|
1769
1765
|
" module \u2014 references bake guids at import time, so late seeding is a silent no-op",
|
|
@@ -1771,7 +1767,7 @@ function renderSections(m) {
|
|
|
1771
1767
|
"",
|
|
1772
1768
|
"What writes the lock: `export`/`deploy` of an ENTRY FILE update it via the shared compile",
|
|
1773
1769
|
"step \u2014 only when a lock exists or `--lock` is passed. Nothing from a DEPLOY is written",
|
|
1774
|
-
"back beyond that (an ephemeral
|
|
1770
|
+
"back beyond that (an ephemeral is a separate workspace, so its identities must",
|
|
1775
1771
|
"not pollute yours). The one write-back is `release --replace`, which mints fresh",
|
|
1776
1772
|
"identities in the workspace the lock describes: it re-pins the lock from the rebuilt",
|
|
1777
1773
|
"workspace, because otherwise the next release matches nothing and duplicates every",
|
|
@@ -1793,6 +1789,7 @@ function renderSections(m) {
|
|
|
1793
1789
|
'- `s.api.call({ api, input?, headers?, auth?, as? })` \u2014 invoke an endpoint. `api` takes the `query()` def HANDLE (or a `{ name, guid }` pair) \u2014 a bare name is refused, because a query\'s identity is composed from its api group, verb, and name. `headers` REPLACES the request headers the callee sees and takes the same shapes as `s.api.request`\'s \u2014 a `{ "Name": value }` record (values may be tagged), a `string[]` of `"Name: value"` lines, or one `Value`. `auth` is `{ token, ignoreExpiration? }`: `token` must be a BARE STRING \u2014 a tagged `Value` deploys clean and then fails the run with `Param: token - Text filter requires an integer, float, string or boolean value`, since the engine stores that slot as plain text and never evaluates it. Neither slot authenticates the call today; see `llms/tests.md` for what a workflow-test run actually sees. WORKFLOW-TEST ONLY (see Gotchas in `llms.txt`) \u2014 elsewhere it deploys clean and 500s the first real request.',
|
|
1794
1790
|
'- `s.api.request({ url, method?, params?, headers?, timeout?, follow_location?, verify_host?, verify_peer?, ca_certificate?, certificate?, certificate_pass?, private_key?, private_key_pass?, description?, output?, as? })` \u2014 external HTTP request (`mvp:api_request`). Ergonomic types, each also accepting a dynamic `Value`: `method` suggests the 7 verbs (GET/POST/PUT/DELETE/HEAD/OPTIONS/PATCH), `params` a plain JSON object **or** a FLAT record whose values are tagged `Value`s (`{ count: ref("count") }`, each lifted via a `set` filter \u2014 the same record-of-values shape `response: { key: value }` takes); a tagged value NESTED inside an object or array THROWS at encode, so wrap a structured body in `obj({...})`, which encodes any depth as one `const:expr2` (\u2192 query string for GET/HEAD/OPTIONS, body otherwise), `headers` a `{ "Name": value }` record whose values may be tagged (`{ "x-api-key": env("KEY") }`, each pair joined to a `"Name: value"` line) **or** a `string[]` of full header lines \u2014 prefer a header over a `?key=` query param for a credential \u2014 a URL travels into access logs, proxies and `Referer`. \u26A0 Neither spelling is envelope-safe: the `as` envelope\'s `request` half mirrors `url`, `params` AND `headers`, so never return it raw from a credentialed request \u2014 read `response.result`. A NAME outside the header-token charset is refused, and a LITERAL value carrying a newline is refused; a value may hold `:` and spaces (`Bearer a: b` is a valid value). A TAGGED value cannot be checked at build time, so strip CRLF from caller-controlled input before this slot. Literal pairs lead the emitted array and computed ones follow, so the wire order is not the record\'s key order, `timeout` a `number` in seconds (1\u201386400), and `follow_location`/`verify_host`/`verify_peer` booleans. `description` (Settings tab) and `output` filters (Output tab) ride the envelope. SSL cert interdependencies (certificate\u2194private_key, ca_certificate\u2192verify_peer) are checked at build time when statically provable, else by the engine at runtime. The `as` result is typed as the `{request, response}` envelope (`response.status: number`, `response.result: unknown`), so `InferResponse` resolves a `ref` to it. Same typed result on `webflow.request` and `microservice.request`.',
|
|
1795
1791
|
"- `s.stream.from_request({ url, method?, \u2026tls, as? })` \u2014 streaming external HTTP request (`mvp:streaming_api_request`); same typed field surface as `s.api.request` (no description/output envelope). `url` is REQUIRED \u2014 it shares `api.request`'s engine declaration, which has no default.",
|
|
1792
|
+
'- `s.util.send_email({ to, subject, message, from?, cc?, bcc?, reply_to?, service_provider?, api_key?, scheduled_at?, as? })` \u2014 send email from the stack. `service_provider` is `"xano"` (the built-in mailer \u2014 needs NO `api_key` and no configuration, and does not require a verified sender) or `"resend"` (pass the key as `api_key: env("RESEND_API_KEY")`). Prefer this over hand-rolling `s.api.request` against a mail provider.',
|
|
1796
1793
|
"- `s.webflow.request({ path, method?, \u2026tls, as? })` \u2014 Webflow API request (`mvp:connect_webflow_api_request`); like `s.api.request` but addressed by `path` (host is engine-supplied), and `path` is REQUIRED \u2014 the engine rejects an empty one. No `headers`: the engine builds its own from the workspace's Webflow connection and ignores an authored value.",
|
|
1797
1794
|
"- `s.task.call` / `s.tool.call` / `s.trigger.call` / `s.middleware.call` / `s.addon.call` \u2014 same `{ <target>, input?, as? }` shape against the named kind. `s.task.call` and `s.trigger.call` are WORKFLOW-TEST ONLY (see Gotchas in `llms.txt`); `s.tool.call`, `s.middleware.call` and `s.addon.call` run from any stack.",
|
|
1798
1795
|
"- `s.action.call({ actionId, input?, registry?, as? })` / `s.action.package.call({ traceId, versionId, slug, input?, registry?, as? })` \u2014 invoke an installed action. Ids are SUPPLIED, never derived from a name: an action is installed onto the instance, so its identity is assigned at install and differs per instance \u2014 read them off a call in a pulled workspace. The package form needs all three parts; they are one composite and two of them address nothing. `registry` is the action's own settings, `input` the per-call arguments.",
|
|
@@ -1991,7 +1988,7 @@ function renderDocs(m) {
|
|
|
1991
1988
|
{
|
|
1992
1989
|
path: "llms/statements-calls.md",
|
|
1993
1990
|
title: "Auth, cross-object calls, and microservices",
|
|
1994
|
-
readWhen: "Read when the stack authenticates (the signup/login/token recipe is here), calls another object (`s.function.run`, `s.api.request`, `s.tool.call`), or reaches a microservice.",
|
|
1991
|
+
readWhen: "Read when the stack authenticates (the signup/login/token recipe is here), calls another object (`s.function.run`, `s.api.request`, `s.tool.call`), sends email (`s.util.send_email`), or reaches a microservice.",
|
|
1995
1992
|
body: s.stmtCalls
|
|
1996
1993
|
},
|
|
1997
1994
|
{
|
|
@@ -2025,7 +2022,7 @@ function renderDocs(m) {
|
|
|
2025
2022
|
{
|
|
2026
2023
|
path: "llms/lock.md",
|
|
2027
2024
|
title: "Lock file",
|
|
2028
|
-
readWhen: "Read when a `xano.lock` exists or should \u2014 renaming/pruning/
|
|
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.",
|
|
2029
2026
|
body: s.lock,
|
|
2030
2027
|
dropLeadingHeading: true
|
|
2031
2028
|
},
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
compareToLive,
|
|
3
3
|
diffAgainstLive,
|
|
4
4
|
sharedSchemaChanges
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
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-
|
|
12
|
+
//# sourceMappingURL=live-diff-IXKBVG4K.js.map
|