@xanots/sdk 0.0.11 → 0.0.13
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 +37 -0
- package/README.md +16 -9
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-QNKN5RYD.js → agent-file-refresh-GQWAAOBV.js} +4 -4
- package/dist/bin.js +11 -11
- package/dist/{branch-commands-2BLOC2GR.js → branch-commands-5KMPAAZV.js} +7 -7
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +2 -2
- package/dist/{capture-4WVJY4DQ.js → capture-YLUVAITI.js} +2 -2
- package/dist/{chunk-22TKBSDV.js → chunk-2AY3PKF4.js} +2 -2
- package/dist/chunk-2VTJSI6X.js +192 -0
- package/dist/{chunk-5XZ744TS.js → chunk-2ZCUO2UG.js} +1 -1
- package/dist/{chunk-XEOX6AM7.js → chunk-3LQGF2WS.js} +2 -2
- package/dist/{chunk-WP4OZZV4.js → chunk-3VFCKHOB.js} +2 -2
- package/dist/{chunk-XHEXOES3.js → chunk-5YDINUAP.js} +1 -1
- package/dist/{chunk-LU7TRWMC.js → chunk-6VNRMKFJ.js} +2 -2
- package/dist/{chunk-CTD5ZCV6.js → chunk-7WRJPKGK.js} +2 -2
- package/dist/{chunk-3INK4Y4E.js → chunk-AE3PDSDS.js} +1 -1
- package/dist/{chunk-DBFU47BJ.js → chunk-AOFFKSJC.js} +2 -2
- package/dist/{chunk-TCFIPDB3.js → chunk-AVGDL6RB.js} +1 -1
- package/dist/{chunk-UOZMSF4C.js → chunk-BYQHCCYU.js} +5 -5
- package/dist/{chunk-BC2C5GVI.js → chunk-DCMANKMX.js} +1 -1
- package/dist/{chunk-WHOJWOSV.js → chunk-EETVJZAZ.js} +1 -1
- package/dist/{chunk-VNQM3V2C.js → chunk-EXENFOWE.js} +2 -2
- package/dist/{chunk-AIZKXUNP.js → chunk-IMLYGQK6.js} +2 -2
- package/dist/{chunk-OWGCOGKK.js → chunk-MEFMTICH.js} +83 -8
- package/dist/{chunk-QK7ZQJLP.js → chunk-N74KDCBD.js} +39 -25
- package/dist/{chunk-3IGNIP6R.js → chunk-NDP7OUPS.js} +1 -1
- package/dist/{chunk-4Q7ZOHH7.js → chunk-OONT4ZL4.js} +3 -3
- package/dist/{chunk-EQW3YT5U.js → chunk-P6PVBQL6.js} +2 -2
- package/dist/{chunk-QYMAZRAU.js → chunk-PJNWOZMT.js} +5 -5
- package/dist/{chunk-BSK7ELHU.js → chunk-PR7OXHGZ.js} +1 -1
- package/dist/{chunk-RCT7UX7B.js → chunk-RLI6XD4O.js} +32 -27
- package/dist/{chunk-ZQ2PKR6R.js → chunk-RQ3FXV4K.js} +2 -2
- package/dist/{chunk-Q77KNEUL.js → chunk-RQNMTDXD.js} +1703 -2
- package/dist/{chunk-4IF54NU5.js → chunk-S3DOJOW4.js} +41 -21
- package/dist/{chunk-HYBN4H3F.js → chunk-SS2V2QOG.js} +27 -20
- package/dist/{chunk-QKM4U5UK.js → chunk-TJS2AF5Y.js} +2 -2
- package/dist/{chunk-DIA7CT7J.js → chunk-V5Y7D4LH.js} +11 -2
- package/dist/{chunk-KA6G2L7U.js → chunk-VK26K7AY.js} +3 -3
- package/dist/{chunk-VAF6A3YD.js → chunk-XWFRNJMQ.js} +1 -1
- package/dist/{chunk-7ZYW652H.js → chunk-YHS6VVLJ.js} +2 -2
- package/dist/{chunk-G4EJMQLD.js → chunk-YX22LKQE.js} +2 -2
- package/dist/{chunk-F6CYJ7TN.js → chunk-Z2ZIE5CO.js} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +10 -10
- package/dist/codegen-command-ZDHMGFWZ.js +47 -0
- package/dist/codegen.d.ts +5 -5
- package/dist/codegen.js +2 -2
- package/dist/{completion-WF46272M.js → completion-HJU5QEFB.js} +2 -2
- package/dist/{deploy-command-IP7V7GT4.js → deploy-command-CGVKRWUE.js} +19 -19
- package/dist/{ephemeral-command-U4AQ3TXX.js → ephemeral-command-2NKPEXUU.js} +8 -8
- package/dist/index.d.ts +88 -104
- package/dist/index.js +9 -9
- package/dist/init-command-DNDONP3O.js +32 -0
- package/dist/internal.d.ts +10 -16
- package/dist/internal.js +34 -34
- package/dist/{io-P2H75UV2.js → io-UBDMMDH6.js} +3 -3
- package/dist/{live-diff-IXKBVG4K.js → live-diff-HCOTN5WC.js} +3 -3
- package/dist/{lock-46FWYE4D.js → lock-HQ4KARU2.js} +2 -2
- package/dist/{lock-commands-ZZKZ4LZJ.js → lock-commands-6U7UIJGR.js} +11 -11
- package/dist/{login-command-Z6CHTA57.js → login-command-P7LXD5TE.js} +6 -6
- package/dist/{loop-D5NPL4VH.js → loop-IC5ISSYB.js} +3 -3
- package/dist/{marketplace-command-P4IPLJ6J.js → marketplace-command-T6JCHW7J.js} +4 -4
- package/dist/{meta-client-K2J4XH64.js → meta-client-LKRKR3L2.js} +4 -4
- package/dist/node.d.ts +6 -6
- package/dist/node.js +14 -14
- package/dist/{preflight-command-K346GPTY.js → preflight-command-UYE7SUQV.js} +16 -16
- package/dist/{profile-command-LJSBDV2L.js → profile-command-WBNSMQSI.js} +3 -3
- package/dist/{release-command-IMNTIVWK.js → release-command-CMMYT6XK.js} +26 -26
- package/dist/{response-BQVQ24l1.d.ts → response-D6xGLEIn.d.ts} +18 -23
- package/dist/{routes-manifest-PWZHDOI5.js → routes-manifest-MN6XBYRE.js} +25 -14
- package/dist/{runtime-V4C3AC3A.js → runtime-LSLIDALK.js} +1 -1
- package/dist/scaffold.d.ts +16 -8
- package/dist/scaffold.js +7 -11
- package/dist/{static-host-3WMV7IZO.js → static-host-4JDQCHUW.js} +1 -1
- package/dist/{status-command-AL47VG7H.js → status-command-VARULAR5.js} +4 -4
- package/dist/{store-BLyNeQ8S.d.ts → store-9Psd0jiF.d.ts} +115 -102
- package/dist/{test-command-YAZLKLGQ.js → test-command-YCAR4O35.js} +7 -7
- package/dist/{upgrade-command-BN3EHAOI.js → upgrade-command-A75DOIUH.js} +15 -16
- package/dist/{workspace-2COHDBM3.js → workspace-33KHFLX3.js} +2 -2
- package/dist/{workspace-command-MNK7Y7MQ.js → workspace-command-YELP47SJ.js} +26 -28
- package/dist/{workspace-export-DURY5WYL.js → workspace-export-MLYTYZS5.js} +3 -3
- package/dist/{xdo-BjJj5W_E.d.ts → xdo-ODuJklk6.d.ts} +27 -23
- package/guides/authoring.md +11 -2
- package/guides/typed-frontend.md +23 -6
- package/llms/kinds-realtime.md +2 -2
- package/llms/statements-data.md +3 -2
- package/llms/tests.md +1 -1
- package/llms/triggers.md +2 -2
- package/llms/values.md +1 -1
- package/llms-full.txt +26 -26
- package/llms.txt +17 -18
- package/manifest.json +6 -2
- package/package.json +1 -1
- package/dist/chunk-ANUDXFEX.js +0 -881
- package/dist/chunk-JGCWTCA7.js +0 -95
- package/dist/chunk-YBC3IKMF.js +0 -845
- package/dist/codegen-command-FUT2KJB6.js +0 -49
- package/dist/init-command-NPVL32L6.js +0 -34
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineFunction,
|
|
3
3
|
fileUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5YDINUAP.js";
|
|
5
5
|
import {
|
|
6
6
|
TEST_EXPECT_TYPES,
|
|
7
7
|
expect
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YX22LKQE.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-PJNWOZMT.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-BYQHCCYU.js";
|
|
104
104
|
import {
|
|
105
105
|
Xano,
|
|
106
106
|
workspace
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-MEFMTICH.js";
|
|
108
108
|
import {
|
|
109
109
|
LAMBDA_BINDINGS,
|
|
110
110
|
LAMBDA_CODE_FILTERS,
|
|
@@ -148,16 +148,16 @@ import {
|
|
|
148
148
|
toSearchParams,
|
|
149
149
|
toolset,
|
|
150
150
|
withFilters
|
|
151
|
-
} from "./chunk-
|
|
152
|
-
import "./chunk-
|
|
151
|
+
} from "./chunk-N74KDCBD.js";
|
|
152
|
+
import "./chunk-EETVJZAZ.js";
|
|
153
153
|
import {
|
|
154
154
|
resetLockOverrides,
|
|
155
155
|
seedLockOverrides
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
157
157
|
import {
|
|
158
158
|
annotate,
|
|
159
159
|
statements
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-2ZCUO2UG.js";
|
|
161
161
|
import "./chunk-OHX6MIUZ.js";
|
|
162
162
|
export {
|
|
163
163
|
LAMBDA_BINDINGS,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
projectShellFiles,
|
|
3
|
+
resolveFromSource,
|
|
4
|
+
runInitCommand,
|
|
5
|
+
sanitizeAppName
|
|
6
|
+
} from "./chunk-S3DOJOW4.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveAiFlags
|
|
9
|
+
} from "./chunk-VK26K7AY.js";
|
|
10
|
+
import "./chunk-ZSYZTGJH.js";
|
|
11
|
+
import "./chunk-RQNMTDXD.js";
|
|
12
|
+
import "./chunk-RLI6XD4O.js";
|
|
13
|
+
import "./chunk-7WRJPKGK.js";
|
|
14
|
+
import "./chunk-3LQGF2WS.js";
|
|
15
|
+
import "./chunk-Z2ZIE5CO.js";
|
|
16
|
+
import "./chunk-GNPVYOPB.js";
|
|
17
|
+
import "./chunk-EZG76F7R.js";
|
|
18
|
+
import "./chunk-MEFMTICH.js";
|
|
19
|
+
import "./chunk-V5Y7D4LH.js";
|
|
20
|
+
import "./chunk-N74KDCBD.js";
|
|
21
|
+
import "./chunk-EETVJZAZ.js";
|
|
22
|
+
import "./chunk-XWFRNJMQ.js";
|
|
23
|
+
import "./chunk-2ZCUO2UG.js";
|
|
24
|
+
import "./chunk-OHX6MIUZ.js";
|
|
25
|
+
export {
|
|
26
|
+
projectShellFiles,
|
|
27
|
+
resolveAiFlags,
|
|
28
|
+
resolveFromSource,
|
|
29
|
+
runInitCommand,
|
|
30
|
+
sanitizeAppName
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=init-command-DNDONP3O.js.map
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
export { F as FIELD_METHODS, R as REFERENCEABLE_KINDS, d as deriveGuid, e as encodeResponse, a as encodeStatement, g as getStatementFactory, i as isRegisteredStatement, r as resolveRef, t as toNestedFields } from './response-
|
|
2
|
-
import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-
|
|
3
|
-
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-
|
|
4
|
-
import { F as FunctionXdo } from './xdo-
|
|
1
|
+
export { F as FIELD_METHODS, R as REFERENCEABLE_KINDS, d as deriveGuid, e as encodeResponse, a as encodeStatement, g as getStatementFactory, i as isRegisteredStatement, r as resolveRef, t as toNestedFields } from './response-D6xGLEIn.js';
|
|
2
|
+
import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-9Psd0jiF.js';
|
|
3
|
+
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-9Psd0jiF.js';
|
|
4
|
+
import { F as FunctionXdo } from './xdo-ODuJklk6.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* The declarative statement catalog (U9): one StatementSpec per cleanly
|
|
7
|
+
* The declarative statement catalog: one StatementSpec per cleanly
|
|
10
8
|
* interpretable statement schema, generated from the Xano engine's statement
|
|
11
9
|
* schema definitions. The engine-only `output` flag is pinned from the
|
|
12
|
-
* persisted golden fixtures
|
|
13
|
-
*
|
|
14
|
-
* Coverage: 153 declarative statements generated.
|
|
15
|
-
* Deferred (see PENDING.md): 63.
|
|
10
|
+
* persisted golden fixtures.
|
|
16
11
|
*/
|
|
17
12
|
|
|
18
13
|
declare const GENERATED_SPECS: StatementSpec[];
|
|
19
14
|
|
|
20
15
|
/**
|
|
21
|
-
* The `function` object kind
|
|
16
|
+
* The `function` object kind. This is the MVP's `compile()` envelope
|
|
22
17
|
* logic, re-homed as the first registered kind. Behavior is unchanged — the
|
|
23
18
|
* MVP golden test is the regression guard.
|
|
24
19
|
*/
|
|
@@ -39,15 +34,14 @@ declare const functionKind: ObjectKind<FunctionDef, FunctionXdo>;
|
|
|
39
34
|
* `mvp:microservice_request` and the engine files its schema under the `api`
|
|
40
35
|
* namespace, but a microservice is a first-class workspace object here — with
|
|
41
36
|
* its own def factory and deploy path — so its call statement is filed beside
|
|
42
|
-
* it. The same decision is
|
|
43
|
-
*
|
|
44
|
-
* agreement with this key.
|
|
37
|
+
* it. The same decision is mirrored in codegen, which is what keeps the
|
|
38
|
+
* generated factory tree in agreement with this key.
|
|
45
39
|
*
|
|
46
40
|
* A second entry does the same: `lambda` is stored as `mvp:lambda` and the
|
|
47
41
|
* engine files its schema under the `api` namespace, but a lambda runs wherever
|
|
48
42
|
* a stack runs — in functions, tasks, middleware, and triggers, not only APIs —
|
|
49
43
|
* so filing it under `s.api.*` said something false about where it is available
|
|
50
|
-
|
|
44
|
+
*. It is `s.lambda`, with the matching `NAMESPACE_OVERRIDES` entry.
|
|
51
45
|
*
|
|
52
46
|
* One surface-pair shares a stored name (so the catalog has one fewer unique
|
|
53
47
|
* stored name than surfaces): `util.get_raw_input`/`util.get_input` →
|
package/dist/internal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FIELD_METHODS,
|
|
3
3
|
SUPERSEDED_STATEMENTS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PR7OXHGZ.js";
|
|
5
5
|
import {
|
|
6
6
|
addonKind,
|
|
7
7
|
agentKind,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
taskKind,
|
|
30
30
|
toolKind,
|
|
31
31
|
workflowTestKind
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PJNWOZMT.js";
|
|
33
33
|
import {
|
|
34
34
|
GENERATED_SPECS,
|
|
35
35
|
GENERATED_STATEMENT_NAMES,
|
|
@@ -51,13 +51,13 @@ import {
|
|
|
51
51
|
registerSpec,
|
|
52
52
|
triggerKind,
|
|
53
53
|
workspaceKind
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-BYQHCCYU.js";
|
|
55
55
|
import {
|
|
56
56
|
IMPLEMENTED_STATEMENTS,
|
|
57
57
|
STATEMENT_SURFACES,
|
|
58
58
|
TOTAL_STATEMENTS,
|
|
59
59
|
sPathOf
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-DCMANKMX.js";
|
|
61
61
|
import {
|
|
62
62
|
COMMANDS,
|
|
63
63
|
FLAGS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
flagKey,
|
|
66
66
|
flagSummary,
|
|
67
67
|
visibleFlags
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-V5Y7D4LH.js";
|
|
69
69
|
import {
|
|
70
70
|
DECODE_ONLY_STATEMENTS,
|
|
71
71
|
FILTER_NAMES,
|
|
@@ -111,8 +111,8 @@ import {
|
|
|
111
111
|
serializeBundle,
|
|
112
112
|
tableKind,
|
|
113
113
|
toNestedFields
|
|
114
|
-
} from "./chunk-
|
|
115
|
-
import "./chunk-
|
|
114
|
+
} from "./chunk-N74KDCBD.js";
|
|
115
|
+
import "./chunk-EETVJZAZ.js";
|
|
116
116
|
import {
|
|
117
117
|
LOCK_VERSION,
|
|
118
118
|
REFERENCEABLE_KINDS,
|
|
@@ -134,12 +134,12 @@ import {
|
|
|
134
134
|
resolveRef,
|
|
135
135
|
serializeLock,
|
|
136
136
|
validateLockModel
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
138
138
|
import {
|
|
139
139
|
encodeStatement,
|
|
140
140
|
getStatementFactory,
|
|
141
141
|
isRegisteredStatement
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-2ZCUO2UG.js";
|
|
143
143
|
import "./chunk-OHX6MIUZ.js";
|
|
144
144
|
|
|
145
145
|
// src/statements/byte-evidence.ts
|
|
@@ -316,7 +316,7 @@ var VALUE_CONSTRUCTORS = [
|
|
|
316
316
|
{ name: "c.expression", signature: "(source: string) => Value", description: `Xano Expression Engine source, passed through VERBATIM \u2192 tag "const:expr2". The string IS the expression: c.expression('"Hi, " ~ $input.name'), c.expression("$var.price * $var.qty"). \u26A0\uFE0F NOT VALIDATED \u2014 never parsed or type-checked, invisible to InferResponse, and untouched by a rename that updates every typed ref(); a typo surfaces at runtime or as a wrong answer. Use it ONLY for syntax the typed surfaces cannot express (~ concatenation, inline arithmetic, conditionals) \u2014 prefer ref/inp/col, withFilters+fl.*, and obj() (which BUILDS a checked expression). Not the expr() condition builder.` },
|
|
317
317
|
{ name: "c.expressionLegacy", signature: "(source: string) => Value", legacy: true, description: "the older `const:expr` expression form, emitted by codegen for workspaces that still hold one \u2014 author `c.expression` instead." },
|
|
318
318
|
{ name: "c.now", signature: "() => Value", description: "Current time as epoch-ms \u2014 the engine-native const:epochms constant (no filter). Valid inline as a where/cmp operand. For cutoff math (cutoff = now - max_age) either compare inline or, for reuse/readability, hoist it into an s.set_var and compare against the var." },
|
|
319
|
-
{ name: "obj", signature: "(fields: Record<string, Value | nested>) => ObjValue<typeof fields>", description: 'Dynamic object value \u2192 tag "const:expr2" (an object-literal expression string). The dynamic sibling of c.obj: members may be inp/ref/auth/col values, env()/setting()/sys.*, c.now(), c.* constants, nested records, or arrays \u2014 and each member may carry a FILTER CHAIN (withFilters + fl.*), which renders as the expression pipe `$var.row|get:"a.b"`. That matters most for the null-safe drill: db.get binds null on a miss, so ref(path, { safe: true }) inside an obj() is the normal shape, not a workaround \u2014 you do NOT need a preceding s.set_var to hoist it. The member record rides the return type, so InferResponse resolves each member the way it resolves a top-level response key \u2014 `response: { user: obj({ id: ref("row.id") }) }` derives `{ user: { id: Col | null } }`, and a raw nested object literal (`response: { user: { id: ref("row.id") } }`, auto-wrapped through this) derives the same. A constant record or list has two spellings that both work and render identically: bare (`{ a: 1 }`, `[]`) or `c.obj(...)`/`c.array([...])` \u2014
|
|
319
|
+
{ name: "obj", signature: "(fields: Record<string, Value | nested>) => ObjValue<typeof fields>", description: 'Dynamic object value \u2192 tag "const:expr2" (an object-literal expression string). The dynamic sibling of c.obj: members may be inp/ref/auth/col values, env()/setting()/sys.*, c.now(), c.* constants, nested records, or arrays \u2014 and each member may carry a FILTER CHAIN (withFilters + fl.*), which renders as the expression pipe `$var.row|get:"a.b"`. That matters most for the null-safe drill: db.get binds null on a miss, so ref(path, { safe: true }) inside an obj() is the normal shape, not a workaround \u2014 you do NOT need a preceding s.set_var to hoist it. The member record rides the return type, so InferResponse resolves each member the way it resolves a top-level response key \u2014 `response: { user: obj({ id: ref("row.id") }) }` derives `{ user: { id: Col | null } }`, and a raw nested object literal (`response: { user: { id: ref("row.id") } }`, auto-wrapped through this) derives the same. A constant record or list has two spellings that both work and render identically: bare (`{ a: 1 }`, `[]`) or `c.obj(...)`/`c.array([...])` \u2014 prefer the bare form. NEST WITH A RAW RECORD, not an inner obj() call: an inner call yields a const:expr2 value, which the expression serializer has no spelling for and THROWS. The legacy blank `c.obj(null)` is refused here (it evaluates to null, not {}) \u2014 write c.null() or c.obj(). Still rejected: a filter ARGUMENT that carries its own chain or is a c.now() (a trailing | binds to the whole value, not one argument, and c.now() needs one), a DISABLED filter (an expression string cannot record that), and the output/response/toolset/reg tags \u2014 build those in a prior step and ref() them. Use for e.g. s.ai.agent.run args.' },
|
|
320
320
|
{ name: "ref", signature: "(name: string, opts?: { safe?: boolean }) => Value", description: 'Reference a stack variable \u2192 tag "var". Pass { safe: true } for null-safe nested access \u2014 a dotted ref("owner.user_id", { safe: true }) compiles through the get filter so it resolves to null instead of raising "Unable to locate var" when the base is null.' },
|
|
321
321
|
{
|
|
322
322
|
name: "inp",
|
|
@@ -776,7 +776,7 @@ function renderTestsSection() {
|
|
|
776
776
|
"",
|
|
777
777
|
"- 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.",
|
|
778
778
|
'- `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.',
|
|
779
|
-
'- `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.',
|
|
779
|
+
'- `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. An outer one raises `Missing var entry: <name>` there, which the test reports as `to_throw` not matching (`export()` warns). `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.',
|
|
780
780
|
"- `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.",
|
|
781
781
|
"- 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.",
|
|
782
782
|
"- 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.",
|
|
@@ -815,19 +815,19 @@ function renderSections(m) {
|
|
|
815
815
|
`Coverage: object kinds ${m.coverage.objectKinds.implemented}/${m.coverage.objectKinds.total}, statement surfaces ${m.coverage.statements.implemented}/${m.coverage.statements.total}, filters ${m.coverage.filters.total} (${m.coverage.filters.typed} typed).`,
|
|
816
816
|
// The shortfall by name: an agent that cannot see WHICH kinds are missing
|
|
817
817
|
// will invent a factory for one. Reasons live in `manifest.json`.
|
|
818
|
-
`Not authorable here: ${m.coverage.objectKinds.unmodeled.map((k) => k.kind).join(", ")} \u2014 these cannot be authored and do not survive a pull;
|
|
818
|
+
`Not authorable here: ${m.coverage.objectKinds.unmodeled.map((k) => k.kind).join(", ")} \u2014 these cannot be authored and do not survive a pull; reasons in \`coverage.objectKinds.unmodeled\`.`,
|
|
819
819
|
"",
|
|
820
820
|
"This file is the whole always-read surface: the mental model, the deploy contract,",
|
|
821
821
|
"every gotcha, and control flow. Per-surface detail lives in the topic files listed",
|
|
822
|
-
"below \u2014 open the one whose condition matches the task,
|
|
823
|
-
"exhaustive per-entry detail in NEITHER \u2014 a statement's
|
|
824
|
-
"defaults, a filter's
|
|
825
|
-
"
|
|
826
|
-
'`@xanots/sdk/manifest.json`,
|
|
827
|
-
"
|
|
828
|
-
"it is ~65k tokens, so never read it whole). Its top-level keys are `" + Object.keys(m).join("`, `") + "`. `statements` and `filters` are ARRAYS, not maps \u2014 SELECT, do not index:",
|
|
822
|
+
"below \u2014 open the one whose condition matches the task, skip the rest. For",
|
|
823
|
+
"exhaustive per-entry detail in NEITHER \u2014 a statement's field schema with engine",
|
|
824
|
+
"defaults, a filter's full argument list, the `storedName` mapping \u2014 do a TARGETED",
|
|
825
|
+
"lookup in the shipped `manifest.json` (a program imports it as",
|
|
826
|
+
'`@xanots/sdk/manifest.json`, needing `with { type: "json" }` in Node ESM;',
|
|
827
|
+
"it is ~60k tokens, so never read it whole). Its top-level keys are `" + Object.keys(m).join("`, `") + "`. `statements` and `filters` are ARRAYS, not maps \u2014 SELECT, do not index:",
|
|
829
828
|
` jq '.statements[] | select(.sPath=="db.get")' manifest.json`,
|
|
830
829
|
` jq '.filters[] | select(.name=="json_decode")' manifest.json`,
|
|
830
|
+
`\u26A0 \`fields\` is null on the ${m.statements.filter((st) => st.declarative !== true).length} \`declarative: false\` statements (\`db.get\`, \u2026): typed wrappers whose arguments are the factory's \`.d.ts\` signature. Null \u2260 missing.`,
|
|
831
831
|
`Select a statement on \`sPath\` (the \`s.*\` path you write), NOT \`surface\` (the XanoScript term): ${m.statements.filter((s) => s.surface !== s.sPath).length} of ${m.statements.length} differ \u2014 \`var\`\u2192\`set_var\`, \`break\`\u2192\`foreach_break\`, \`foreach.remove\`\u2192\`foreach_remove\`, and every \`expect.*\`.`,
|
|
832
832
|
"",
|
|
833
833
|
NAVIGATION_SLOT
|
|
@@ -1115,11 +1115,11 @@ function renderSections(m) {
|
|
|
1115
1115
|
" no Node built-ins, so a bundler drops unused SDK exports. But importing a **def** for its",
|
|
1116
1116
|
" `getPath()`/`verb`/`getUrl()`/`getChannel()` also pulls whatever its `stack` references:",
|
|
1117
1117
|
" the `s.*`/`c.*` factory CALLS run at module load to BUILD it. Types are free.",
|
|
1118
|
-
" \u26A0 A FLOOR \u2014 **~
|
|
1119
|
-
" never removes it. The floor is the RUNTIME, not the def: a second
|
|
1120
|
-
"
|
|
1118
|
+
" \u26A0 A FLOOR \u2014 **~267 kB minified (~65 kB gzipped)** for the FIRST def; splitting modules",
|
|
1119
|
+
" never removes it. The floor is the RUNTIME, not the def: a second or much richer def",
|
|
1120
|
+
" adds ~2 kB, so trimming a def does not shrink it.",
|
|
1121
1121
|
" Fix: `xanots routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) \u2014 verbs, paths, and sockets as",
|
|
1122
|
-
' plain data importing NOTHING, still compile-checked: `routePath("blog/{slug}", { slug })
|
|
1122
|
+
' plain data importing NOTHING, still compile-checked: `routePath("GET blog/{slug}", { slug })`',
|
|
1123
1123
|
' `channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base',
|
|
1124
1124
|
" URLs lifted to `wss://h/ws/<tenant>:<canonical>`). A rename is a type error, not a 404.",
|
|
1125
1125
|
"- **Intra-workspace imports use `.js` specifiers** (`../tables/links.js`), not",
|
|
@@ -1196,7 +1196,7 @@ function renderSections(m) {
|
|
|
1196
1196
|
" submission on bind, so `s.security.check_password` compares two different hashes",
|
|
1197
1197
|
" and a correct password always fails (`ok:false` on a found row). Take the submitted",
|
|
1198
1198
|
" password as `input.text()` on both signup and login and pass the plaintext straight",
|
|
1199
|
-
" to `check_password` (which does the comparison hash itself).",
|
|
1199
|
+
" to `check_password` (which does the comparison hash itself). `export()` warns.",
|
|
1200
1200
|
"- **Agents authenticate with env vars \u2014 never `xanots login`.** `login` blocks on a",
|
|
1201
1201
|
" browser consent no agent can complete. Set `$XANO_INSTANCE_URL` + `$XANO_WORKSPACE_ID`",
|
|
1202
1202
|
" + `$XANO_META_TOKEN` and run `deploy`/`release` directly: no disk, no rotation, so it",
|
|
@@ -1365,11 +1365,11 @@ function renderSections(m) {
|
|
|
1365
1365
|
' - `deliverTo?`: `"channel"` (default) | `"sender"` | `"others"` | `"explicit"`. \u26A0 `"explicit"` still delivers to NOBODY \u2014 nothing selects recipients from inside a handler, and `s.realtime.publish` (which originates an event INTO a channel) is not a substitute.',
|
|
1366
1366
|
' - Only `"channel"`/`"others"` fan out AND are written to the `conversation` transcript \u2014 a `"sender"` response is invisible to every future joiner.',
|
|
1367
1367
|
' - **Both input surfaces read as ordinary inputs:** `inp("body")` for a payload field, `inp("room_id")` for the channel\'s `{room_id}`. No session lookup, no frame parsing.',
|
|
1368
|
-
" - A path param is bound ONCE at join and read from the connection thereafter, never from the frame \u2014 a sender cannot claim a room it did not join.
|
|
1368
|
+
" - A path param is bound ONCE at join and read from the connection thereafter, never from the frame \u2014 a sender cannot claim a room it did not join.",
|
|
1369
1369
|
" - `s.realtime.get_session({ as })` \u2014 the CALLER's realtime session for the current frame. FLAT shape:",
|
|
1370
1370
|
' - `authenticated` bool \xB7 `client_id` text (the AUTHED ROW ID as text, `""` anonymous) \xB7 `dbo_id` int (the auth TABLE\'s id \u2014 NOT the user\'s row id; `0` anonymous \u2014 to look the caller up use `client_id`. `dbo_id` is an int in the same position and typechecks, so a gate that keys on it finds no user and refuses EVERYONE) \xB7 `socket_id` int (transport id) \xB7 `channel` text (resolved path, `""` in a server trigger) \xB7 `params` object (bound path params, `{}` when none \u2014 `ref("session.params.room_id")`) \xB7 `extras` object \xB7 `opened_at` decimal.',
|
|
1371
1371
|
" - Works in a realtime MESSAGE stack and in CHANNEL and SERVER trigger stacks; off that path it degrades to an anonymous session.",
|
|
1372
|
-
' - For a path param prefer `inp("room_id")
|
|
1372
|
+
' - For a path param prefer `inp("room_id")` in a MESSAGE; a lifecycle TRIGGER has only the session. Reach for the session when you need the CONNECTION (identity/extras) \u2014 "who is this sender" on an anonymous-client channel.',
|
|
1373
1373
|
" - \u26A0 THREE UNRELATED THINGS ARE CALLED A CLIENT ID: `session.client_id` (app-facing identity), `session.socket_id` (transport), and a frame's `options.client_id` (the at_least_once CURSOR handle). Conflating the first and last breaks at_least_once for anonymous clients.",
|
|
1374
1374
|
" - `s.realtime.publish({ server, channel, data, message?, authTable?, authId? })` \u2014 the PUSH direction: originate a server-authored event onto a channel from ANY stack, no client frame first.",
|
|
1375
1375
|
" - `server` is the handle or its NAME (resolved by name, not guid); `channel` is the FILLED-IN path (`channel.getChannel({ room_id: 42 })`), never the template \u2014 a constant still carrying `{param}` THROWS at author time, and a constant `server`/`channel` naming nothing this workspace registers WARNS at export.",
|
|
@@ -1437,8 +1437,8 @@ function renderSections(m) {
|
|
|
1437
1437
|
"errorTrigger}({ name, guid?, description?, active?, tags?, ... })`.",
|
|
1438
1438
|
"",
|
|
1439
1439
|
'- `tableTrigger({ name, table?, datasources?, actions?: {insert?,update?,delete?,truncate?}, stack })` \u2014 database/table trigger. `t.new` / `t.old` are the row **after** / **before** the change; `t.action` (`insert|update|delete|truncate`), `t.datasource`. Bind `table` to a `table()` handle and `t.new("col")` / `t.old("col")` are typed to that row (misspelled column = compile error). Nullability follows the enabled actions: insert \u2192 `old` is null, delete \u2192 `new` is null, update \u2192 both, truncate \u2192 neither. Config-only (no response).',
|
|
1440
|
-
"- `realtimeServerTrigger({ name, realtimeServer, actions?: {connect?,disconnect?}, stack?, response?, responseShape? })` \u2014 realtime SERVER lifecycle (a client connecting to / disconnecting from the server, not a message). Inputs: `t.action` (`connect|disconnect`), `t.realtime_server`, `t.client`. Bind `realtimeServer` to a `realtimeServer()` handle (or its name). `connect` GATES the connection \u2014 a denial sends an `error` and CLOSES the socket with code 4401 before it is ever ready, so it is a real front door, not an observer; same return shape as a channel `join`
|
|
1441
|
-
'- `realtimeChannelTrigger({ name, channel, actions?: {join?,leave?,deliver?}, stack?, response?, responseShape? })` \u2014 realtime CHANNEL lifecycle. Inputs: `t.action` (`join|leave|deliver`), `t.channel`, `t.client`. Bind `channel` to a `realtimeChannel()` handle \u2014 a bare path is NOT accepted (it is unique only within its server). The three actions have DIFFERENT postures, and the posture decides what the stack should return: `join` GATES the join (it runs BEFORE the client becomes a member, so a denial means it never sees a fan-out) \u2014 return `{ allowed: c.bool(true) }` (optional `reason` reaches the client) or any truthy value to admit, and an EMPTY OR FALSY RETURN DENIES, so a stack that just falls through \u2014 or a gating trigger with NO `response` \u2014 refuses everyone, and a CRASH DENIES too. That is the inverse of a
|
|
1440
|
+
"- `realtimeServerTrigger({ name, realtimeServer, actions?: {connect?,disconnect?}, stack?, response?, responseShape? })` \u2014 realtime SERVER lifecycle (a client connecting to / disconnecting from the server, not a message). Inputs: `t.action` (`connect|disconnect`), `t.realtime_server`, `t.client`. Bind `realtimeServer` to a `realtimeServer()` handle (or its name). `connect` GATES the connection \u2014 a denial sends an `error` and CLOSES the socket with code 4401 before it is ever ready, so it is a real front door, not an observer; same return shape as a channel `join` below (EMPTY/FALSY DENIES \u2014 INCLUDING a gating trigger with NO `response`, which returns nothing and so refuses every client). A CRASH DENIES too \u2014 a gate that cannot answer must not admit. Both failure modes lock the door, so plan for a self-inflicted LOCKOUT (an unguarded drill into a null `db.get` raises \u2192 everyone refused), not a breach. Gating is OPT-IN: a server with no `connect` trigger accepts every connection. `disconnect` is OBSERVATIONAL (return ignored, throws swallowed \u2014 cleanup must always complete). Both are SERVER-scoped, so `s.realtime.get_session` works but carries no channel path and no bound params.",
|
|
1441
|
+
'- `realtimeChannelTrigger({ name, channel, actions?: {join?,leave?,deliver?}, stack?, response?, responseShape? })` \u2014 realtime CHANNEL lifecycle. Inputs: `t.action` (`join|leave|deliver`), `t.channel`, `t.payload`, `t.client`. Bind `channel` to a `realtimeChannel()` handle \u2014 a bare path is NOT accepted (it is unique only within its server). The three actions have DIFFERENT postures, and the posture decides what the stack should return: `join` GATES the join (it runs BEFORE the client becomes a member, so a denial means it never sees a fan-out) \u2014 return `{ allowed: c.bool(true) }` (optional `reason` reaches the client) or any truthy value to admit, and an EMPTY OR FALSY RETURN DENIES, so a stack that just falls through \u2014 or a gating trigger with NO `response` \u2014 refuses everyone, and a CRASH DENIES too. ONCE the object carries an `allowed` key admission needs STRICTLY `true` \u2014 a computed `1`/`"yes"` there DENIES. That is the inverse of a crashing message, which still delivers, and of `deliver` below. A lifecycle trigger\'s inputs are PINNED to those four, so a channel PATH PARAM is NOT among them \u2014 `inp("room_id")` RAISES, which crashes the gate and so REFUSES every client; take the param from `s.realtime.get_session` (`ref("session.params.room_id")`). A gate establishes NO auth, so `ref("auth.id")` reads 0 even when authenticated \u2014 identity is `t.client("permissions.dbo_id")` or the session. A SERVER connect/disconnect has no channel, so no params at all; `leave` is OBSERVATIONAL (return ignored, throws swallowed); `deliver` GATES delivery PER RECIPIENT \u2014 the per-viewer redaction tool and the most expensive action here (a stack per recipient per message), and it needs `delivery.perRecipient` on the channel to run at all \u2014 BOTH HALVES are required, so a `deliver` trigger on a channel without the flag NEVER RUNS and every subscriber receives the UNREDACTED payload (no error, no log line); `export()` warns on each half alone. **`deliver`\'s RETURN VALUES DO NOT READ LIKE A FILTER:** ONLY an explicit NULL drops the message for that recipient; an OBJECT replaces that recipient\'s payload; ANYTHING ELSE \u2014 INCLUDING `false`, `0`, `""` \u2014 DELIVERS IT UNCHANGED, as does a crash. So `return false` from a yes/no redaction check SENDS the message it was written to suppress \u2014 return null instead. The delivered payload arrives NESTED, so read `t.payload("<field>")`, and `t.client` is the SENDER while `s.realtime.get_session` describes the RECIPIENT this run is for.',
|
|
1442
1442
|
'- `mcpServerTrigger({ name, mcpServer, stack?, response?, responseShape? })` / `agentTrigger({ name, agent, stack?, response?, responseShape? })` \u2014 toolset connection. Bind with the `mcpServer()`/`agent()` def handle (or its name) \u2014 it resolves to the toolset guid at export. Raw numeric `objId` is the escape hatch, rarely right: ids are assigned at import, so a handle passed to `objId` is a type error, and binding nothing deploys a trigger that never fires. Inputs: `t.toolset` (`t.toolset("name")`), `t.tools`. Response-bearing; the default stack copies `toolset`/`tools` into vars and returns them.',
|
|
1443
1443
|
"- `workspaceTrigger({ name, actions?: {branch_live?,branch_merge?,branch_new?}, stack? })` \u2014 branch lifecycle. Inputs: `t.to_branch`, `t.from_branch`, `t.action`. Config-only.",
|
|
1444
1444
|
'- `errorTrigger({ name, stack? })` \u2014 error-signature trigger. Inputs: `t.event` (`new|regression|fixed`), `t.id`, `t.signature`, `t.error` (`t.error("code")`/`t.error("message")`), `t.caller`, `t.statement`, `t.actor`, `t.count`, `t.first_seen`, `t.last_seen`, `t.fixed_at`. Config-only.',
|
|
@@ -1686,13 +1686,14 @@ function renderSections(m) {
|
|
|
1686
1686
|
' - \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`.',
|
|
1687
1687
|
" - Compose nested boolean logic with `and(...)` / `or(...)` groups (also available on `addon()` `where`).",
|
|
1688
1688
|
" - 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.",
|
|
1689
|
-
" - \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.",
|
|
1689
|
+
" - \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) \u2014 by raw name, since `fl.*` has no builder for them \u2014 or compute it in an earlier `s.set_var` and `ref()` that. `export --strict` reports it; a bare `c.now()` operand is always fine.",
|
|
1690
1690
|
' - `bind: [{ table, as?, join?, where? }]` \u2014 joins (`context.bind[]`). `join` defaults to `"inner"`. `as` defaults to the table name; two joins to the same table need distinct aliases.',
|
|
1691
1691
|
' - \u26A0 In `where`/`sort`/`eval` a JOINED column takes a dotted path (`col("team_row.id")`); THIS query\'s own columns stay **bare** (`col("team")`). Qualifying your own by table name needs `tableAlias` (same rule as `aggregate`) \u2014 without it the engine reads the operand as text and 400s `ParseError: Invalid value for param` naming the OTHER operand, so it throws at export instead.',
|
|
1692
1692
|
' - `bind: [{ table: team, as: "team_row", join: "left", where: expr(col("team"), "=", col("team_row.id")) }]`',
|
|
1693
|
+
' - \u26A0 A join does NOT put the joined table\'s columns on the returned row \u2014 with or without a `bind`, a row is the QUERIED table\'s columns, which is what `InferResponse` types. There is no `row.team_row`. To read a joined column, PROJECT it with an `eval` whose `name` is the dotted path: `eval: [{ name: "team_row.name", as: "team_name" }]` puts `team_name` on the row and on the inferred type. A bare `name` there is `Unsupported parameter reference` at runtime (it qualifies to the base table), and a dotted joined column in `output` is dropped with no error.',
|
|
1693
1694
|
' - `returnType` \u2014 `"list"` (default) | `"single"` | `"count"` | `"exists"` | `"stream"` | `"aggregate"`. Drives `context.return.type` AND the `InferResponse` shape: `count`\u2192`number`, `exists`\u2192`boolean`, `single`\u2192`Row|null`, `stream`\u2192`Row[]` (pageable, no envelope), `list`\u2192`Row[]`/envelope, `aggregate`\u2192rows keyed by the `aggregate.group`/`eval` aliases. \u26A0 A bare `count` of ZERO serializes as an EMPTY body, not `0` \u2014 a client parsing JSON gets a parse error on the one result it most needs to handle. Wrap it: `response: { count: ref("n") }`.',
|
|
1694
1695
|
' - `eval: [{ name, as, filters? }]` \u2014 computed columns (`context.eval[]`). Each `as` grafts onto the row as an `unknown` key in `InferResponse`; shadowing a real column throws. Write `name` **bare** (`"embedding"`) \u2014 it is alias-qualified on emit exactly like `aggregate` (a bare eval name is `Unsupported param format` at runtime), and the statement declares the alias it used. An `as` alias is `sort`able in the SAME query.',
|
|
1695
|
-
|
|
1696
|
+
' - An `eval`/`sort`/`where` filter pipeline compiles to **SQL**, so it resolves a DIFFERENT registry than `fl.*` (which runs in the request): the vector family, geo `distance`/`within`/`covers`, `search_rank`, the aggregators. \u26A0 `fl.*` carries NO builder for these \u2014 reach them by raw name, `filter("epochms_add_day", \u2026)` or the `{ name, arg }` form. The name lists are `QUERY_EXPRESSION_FILTERS`/`VECTOR_FILTERS` on `@xanots/sdk/internal`.',
|
|
1696
1697
|
' - **Vector similarity search** \u2014 the ONLY way to query an `f.vector` column (no `SearchOp` does distance). `eval: [{ name: "embedding", as: "distance", filters: [{ name: "vector_cos_distance", arg: [inp("q")] }] }]` + `sort: [{ sortBy: "distance", dir: "asc" }]` ranks in the DATABASE over the column\'s index. Match the filter to the index `op` (`vector_cos_distance`\u2194`vector_cosine_ops`, `vector_l2_distance`\u2194`vector_l2_ops`, `vector_l1_distance`\u2194`vector_l1_ops`, `vector_inner_product`\u2194`vector_ip_ops`); `vector_cos_similarity` is the inverse, so sort it `desc`. The same filter on a `where` operand cuts off BY distance instead of by row count.',
|
|
1697
1698
|
' - `aggregate: { group?, eval?, sort?, paging? }` (with `returnType:"aggregate"`) builds `context.return.aggregate`. `group`/`eval` are `{ name, as, filters? }`, an aggregator like `sum`/`count` riding `filters`. Some aggregators resolve ONLY here, not in a runtime value pipeline: `count_distinct`, `median`, `to_list`/`to_distinct_list` (each with `_asc`/`_desc`), and `vector_distance`.',
|
|
1698
1699
|
' - \u26A0 Write each `name` as a **bare** column (`"status"`). It is alias-qualified to `"<alias>.status"` on emit \u2014 the engine rejects an unqualified column in an aggregate with `Unsupported param format`. An already-dotted `name` (a `bind`ed/joined column) passes through.',
|
|
@@ -2065,10 +2066,9 @@ function renderDocs(m) {
|
|
|
2065
2066
|
const nav = [
|
|
2066
2067
|
"## Topic files",
|
|
2067
2068
|
"",
|
|
2068
|
-
"
|
|
2069
|
-
"
|
|
2070
|
-
|
|
2071
|
-
`\`${LLMS_FULL_TXT}\` is everything concatenated \u2014 one fetch, for a reader that cannot open files.`,
|
|
2069
|
+
"Paths are relative to this file (`node_modules/@xanots/sdk/` once installed), so a",
|
|
2070
|
+
"plain file read resolves them at the version you have.",
|
|
2071
|
+
`\`${LLMS_FULL_TXT}\` is everything concatenated \u2014 one fetch for a reader that cannot open files.`,
|
|
2072
2072
|
"",
|
|
2073
2073
|
...topics.map((t) => `- [${t.title}](${t.path}): ${t.readWhen}`),
|
|
2074
2074
|
""
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readLockFile,
|
|
3
3
|
writeLockFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3LQGF2WS.js";
|
|
5
5
|
import "./chunk-GNPVYOPB.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-XWFRNJMQ.js";
|
|
7
7
|
import "./chunk-OHX6MIUZ.js";
|
|
8
8
|
export {
|
|
9
9
|
readLockFile,
|
|
10
10
|
writeLockFile
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=io-
|
|
12
|
+
//# sourceMappingURL=io-UBDMMDH6.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
compareToLive,
|
|
3
3
|
diffAgainstLive,
|
|
4
4
|
sharedSchemaChanges
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-AOFFKSJC.js";
|
|
6
|
+
import "./chunk-AE3PDSDS.js";
|
|
7
7
|
export {
|
|
8
8
|
compareToLive,
|
|
9
9
|
diffAgainstLive,
|
|
10
10
|
sharedSchemaChanges
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=live-diff-
|
|
12
|
+
//# sourceMappingURL=live-diff-HCOTN5WC.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
resolvePayloadKey,
|
|
18
18
|
serializeLock,
|
|
19
19
|
validateLockModel
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
21
21
|
import "./chunk-OHX6MIUZ.js";
|
|
22
22
|
export {
|
|
23
23
|
CANONICAL_PAYLOAD_KEYS,
|
|
@@ -39,4 +39,4 @@ export {
|
|
|
39
39
|
serializeLock,
|
|
40
40
|
validateLockModel
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=lock-
|
|
42
|
+
//# sourceMappingURL=lock-HQ4KARU2.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadDefault
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RLI6XD4O.js";
|
|
4
|
+
import "./chunk-7WRJPKGK.js";
|
|
5
5
|
import {
|
|
6
6
|
readLockFile,
|
|
7
7
|
writeLockFile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3LQGF2WS.js";
|
|
9
9
|
import {
|
|
10
10
|
UsageError,
|
|
11
11
|
missingArgument,
|
|
12
12
|
unknownSubcommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
14
14
|
import "./chunk-GNPVYOPB.js";
|
|
15
15
|
import "./chunk-EZG76F7R.js";
|
|
16
16
|
import {
|
|
17
17
|
Xano
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-MEFMTICH.js";
|
|
19
|
+
import "./chunk-V5Y7D4LH.js";
|
|
20
|
+
import "./chunk-N74KDCBD.js";
|
|
21
|
+
import "./chunk-EETVJZAZ.js";
|
|
22
22
|
import {
|
|
23
23
|
adoptFromBundle,
|
|
24
24
|
createLockContext,
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
resetLockOverrides,
|
|
28
28
|
resolvePayloadKey,
|
|
29
29
|
seedLockOverrides
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-XWFRNJMQ.js";
|
|
31
|
+
import "./chunk-2ZCUO2UG.js";
|
|
32
32
|
import "./chunk-OHX6MIUZ.js";
|
|
33
33
|
|
|
34
34
|
// src/emit/lock-commands.ts
|
|
@@ -231,4 +231,4 @@ ${lines}
|
|
|
231
231
|
export {
|
|
232
232
|
runLockCommand
|
|
233
233
|
};
|
|
234
|
-
//# sourceMappingURL=lock-commands-
|
|
234
|
+
//# sourceMappingURL=lock-commands-6U7UIJGR.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-W5NOKYEG.js";
|
|
6
6
|
import {
|
|
7
7
|
promptLine
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IMLYGQK6.js";
|
|
9
9
|
import {
|
|
10
10
|
envMetaCredentialVarsSet
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TJS2AF5Y.js";
|
|
12
12
|
import {
|
|
13
13
|
CALLBACK_PATH,
|
|
14
14
|
DEFAULT_PORT,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-FE5I6S6N.js";
|
|
27
27
|
import {
|
|
28
28
|
UsageError
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
30
30
|
import "./chunk-GNPVYOPB.js";
|
|
31
31
|
import {
|
|
32
32
|
blank,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
success,
|
|
38
38
|
warn
|
|
39
39
|
} from "./chunk-EZG76F7R.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-V5Y7D4LH.js";
|
|
41
41
|
|
|
42
42
|
// src/emit/login-command.ts
|
|
43
43
|
import * as client from "openid-client";
|
|
@@ -177,7 +177,7 @@ async function attemptLogin(p) {
|
|
|
177
177
|
`Could not determine the instance from the issued token (no readable \`aud\` claim). This is unexpected \u2014 please report it.`
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
|
-
const { resolveScopedWorkspaceId } = await import("./workspace-
|
|
180
|
+
const { resolveScopedWorkspaceId } = await import("./workspace-33KHFLX3.js");
|
|
181
181
|
detail("Resolving the workspace this token is scoped to\u2026");
|
|
182
182
|
const workspaceId = await resolveScopedWorkspaceId({
|
|
183
183
|
access_token: tokens.access_token,
|
|
@@ -267,4 +267,4 @@ async function acquireByPaste(p) {
|
|
|
267
267
|
export {
|
|
268
268
|
runLoginCommand
|
|
269
269
|
};
|
|
270
|
-
//# sourceMappingURL=login-command-
|
|
270
|
+
//# sourceMappingURL=login-command-P7LXD5TE.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
indexByIdentity,
|
|
4
4
|
kindIsRunnable,
|
|
5
5
|
resolveMatch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AVGDL6RB.js";
|
|
7
7
|
import {
|
|
8
8
|
normalize
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AE3PDSDS.js";
|
|
10
10
|
|
|
11
11
|
// src/validate/loop.ts
|
|
12
12
|
async function runValidateLoop(client, bundleText) {
|
|
@@ -90,4 +90,4 @@ export {
|
|
|
90
90
|
runValidateLoop,
|
|
91
91
|
runnableFunctionNames
|
|
92
92
|
};
|
|
93
|
-
//# sourceMappingURL=loop-
|
|
93
|
+
//# sourceMappingURL=loop-IC5ISSYB.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-NUQCEOKA.js";
|
|
8
8
|
import {
|
|
9
9
|
serverMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NDP7OUPS.js";
|
|
11
11
|
import {
|
|
12
12
|
runNpm
|
|
13
13
|
} from "./chunk-ZSYZTGJH.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
UsageError,
|
|
16
16
|
indentBlock,
|
|
17
17
|
missingArgument
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Z2ZIE5CO.js";
|
|
19
19
|
import {
|
|
20
20
|
blank,
|
|
21
21
|
detail,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
success,
|
|
27
27
|
warn
|
|
28
28
|
} from "./chunk-EZG76F7R.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-V5Y7D4LH.js";
|
|
30
30
|
|
|
31
31
|
// src/emit/marketplace-catalogue.ts
|
|
32
32
|
var DEFAULT_BASE_URL = "https://xare-rvr8-mnnt.dev.xano.io";
|
|
@@ -362,4 +362,4 @@ export {
|
|
|
362
362
|
runMarketplaceListCommand,
|
|
363
363
|
runMarketplaceSearchCommand
|
|
364
364
|
};
|
|
365
|
-
//# sourceMappingURL=marketplace-command-
|
|
365
|
+
//# sourceMappingURL=marketplace-command-T6JCHW7J.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importWorkspaceArchive
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3VFCKHOB.js";
|
|
4
4
|
import {
|
|
5
5
|
createEphemeral,
|
|
6
6
|
deleteEphemeral,
|
|
7
7
|
isEphemeralDisabled,
|
|
8
8
|
waitUntilReady
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EXENFOWE.js";
|
|
10
10
|
import {
|
|
11
11
|
decodeWorkspaceArchive,
|
|
12
12
|
encodeWorkspaceArchive
|
|
13
13
|
} from "./chunk-ZUTSMMAG.js";
|
|
14
14
|
import "./chunk-X4DVXBFY.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-NDP7OUPS.js";
|
|
16
16
|
|
|
17
17
|
// src/validate/meta-client.ts
|
|
18
18
|
var REQUEST_TIMEOUT_MS = 6e4;
|
|
@@ -167,4 +167,4 @@ ${text}`);
|
|
|
167
167
|
export {
|
|
168
168
|
MetaClient
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=meta-client-
|
|
170
|
+
//# sourceMappingURL=meta-client-LKRKR3L2.js.map
|