@functional-systems/lambdadb-cli 0.1.0 → 0.1.1-dev.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 CHANGED
@@ -2,7 +2,32 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [0.1.0] - 2026-09-18
5
+ ### Added
6
+
7
+ - SDK 0.6.0: all 16 text analyzers, match-all queries with omitted `query`, and
8
+ keyword facets with `size: 0` for counts only or documents and facets together.
9
+ Facet results survive JSON output and automatic `docsUrl` downloads.
10
+ - Facet examples, query help and transport/installed-package regression coverage.
11
+ Facets require a supporting server and newly built keyword indexes; existing
12
+ collections are not migrated automatically.
13
+ - A Homebrew formula for the published stable CLI, with a managed Node 24 runtime,
14
+ checksummed npm/lockfile inputs and isolated production dependencies.
15
+ - Local Homebrew installation checks, installed CLI contracts and macOS/Linux PR
16
+ validation.
17
+ - Public installation with `brew install lambdadb/tap/lambdadb-cli`, backed by the
18
+ LambdaDB Homebrew tap and remote installation checks.
19
+
20
+ ### Maintenance
21
+
22
+ - Synchronize the 0.1.0 release history into develop and start the 0.1.1 development
23
+ line. Stable installs use npm's default channel; dev builds remain opt-in.
24
+
25
+ ### Documentation
26
+
27
+ - Document the published stable npm channel, public Homebrew installation and
28
+ completed release verification on the default branch.
29
+
30
+ ## [0.1.0] - 2026-09-19
6
31
 
7
32
  ### Added
8
33
 
package/CONTRIBUTING.md CHANGED
@@ -66,7 +66,7 @@ development base in that synchronization PR so develop retains a dev version.
66
66
 
67
67
  A separate `release/*` branch can be created from reviewed develop and target
68
68
  main when preparing rc/stable metadata while develop retains its automatic dev
69
- base. The first stable release uses `release/0.1.0` for this reason. Do not merge
69
+ base. The first stable release used `release/0.1.0` for this reason. Do not merge
70
70
  stable package metadata into develop without setting its next dev base, because
71
71
  automatic development publication requires an `X.Y.Z-dev.N` version.
72
72
 
package/DESIGN.md CHANGED
@@ -33,6 +33,32 @@ workflow SDK additions are proposals. Its September 14 registry baseline
33
33
  This CLI reuses currently available SDK capabilities; it does not assume proposed
34
34
  `ingestDocuments`, `waitForDocuments` or mutation receipts exist.
35
35
 
36
+ ## SDK 0.6.0 contract update (2026-09-29)
37
+
38
+ The published dependency is pinned to `@functional-systems/lambdadb@0.6.0`.
39
+ The [release tag](https://github.com/lambdadb/lambdadb-typescript-client/releases/tag/v0.6.0)
40
+ resolves to `491d01e0eb54bd135823fab79cbe32396ec03691`; npm `latest` was 0.6.0
41
+ when checked. The historical MVP baseline above remains a dated record.
42
+
43
+ Inspected the installed package's `src/models/operations/querycollection.ts`,
44
+ `src/models/indexconfigsunion.ts` and `src/client.ts`; all three matched the release
45
+ tag byte-for-byte. The query serializer accepts
46
+ omitted `query`, validates up to five strict facet requests with nullable 1–100
47
+ bucket sizes, and requires nonempty facets for `size: 0`. It enforces integer
48
+ query size but lacks document-size bounds, so the CLI retains only the 0–100
49
+ range check and null-to-omission adapter. Ref conflicts remain CLI-owned;
50
+ Branch-only `consistentRead` validation stays with the SDK. The create serializer
51
+ accepts all 16 analyzer names without a CLI allowlist. Omission, empty lists,
52
+ duplicates and ordering pass through unchanged; duplicate rejection is server-owned.
53
+
54
+ The query facade spreads response metadata when downloading `docsUrl`; CLI JSON
55
+ preserves `facets` while removing the consumed signed URL. Facet field names join
56
+ other user-defined maps in credential redaction, including collision preservation;
57
+ fixed facet result/bucket keys retain their SDK schema even for short credentials.
58
+ Loopback subprocess tests cover serialization and output through the published SDK,
59
+ and the installed-tarball suite repeats these contracts. Live evidence is separate
60
+ in [VALIDATION.md](VALIDATION.md).
61
+
36
62
  ## Architecture
37
63
 
38
64
  ```text
@@ -83,8 +109,9 @@ imports. Collection statistics describe committed main, not selected ref readine
83
109
 
84
110
  No upstream edit was required. Local regressions cover these adaptation points:
85
111
 
86
- 1. Public query `size: null` means default size, but SDK 0.5.1's serializer accepts
87
- only number/undefined. Normalize null to omission and enforce public 1–100 bounds.
112
+ 1. Public query `size: null` means default size, but SDK 0.6.0's serializer accepts
113
+ only number/undefined. Normalize null to omission and enforce 0–100 bounds;
114
+ SDK validation requires facets when size is zero.
88
115
  An upstream schema-alignment change would remove this adapter.
89
116
  2. `SDKValidationError[Symbol.hasInstance]` intentionally also matches
90
117
  `ResponseValidationError`. Check response validation first and exclude it from
package/README.md CHANGED
@@ -6,33 +6,49 @@ pagination, bulk transfers and large response downloads.
6
6
 
7
7
  ## Install and run
8
8
 
9
- Requires Node.js 22.14 or newer and npm.
10
-
11
9
  ### Install from npm
12
10
 
13
- The verified development build is available on the `dev` channel:
11
+ Requires Node.js 22.14 or newer and npm.
12
+
13
+ Install the stable channel:
14
14
 
15
15
  ```sh
16
- npm install --global @functional-systems/lambdadb-cli@dev
16
+ npm install --global @functional-systems/lambdadb-cli
17
17
  lambdadb --version
18
18
  lambdadb --help
19
19
  ```
20
20
 
21
- This checkout prepares `0.1.0`. Once its GitHub Release and npm publication are
22
- complete, install the stable version with:
21
+ For reproducible CI runs, pin an exact published version such as
22
+ `@functional-systems/lambdadb-cli@0.1.0`. To try development builds, explicitly use
23
+ `@functional-systems/lambdadb-cli@dev`; this moving channel contains prereleases.
24
+ Installed CLIs do not update themselves. See
25
+ [RELEASING.md](RELEASING.md#current-status) for release status and
26
+ [VALIDATION.md](VALIDATION.md) for verification results and remaining limitations.
27
+
28
+ ### Homebrew
29
+
30
+ On macOS or Linux with [Homebrew](https://brew.sh/) installed:
23
31
 
24
32
  ```sh
25
- npm install --global @functional-systems/lambdadb-cli@0.1.0
33
+ brew install lambdadb/tap/lambdadb-cli
34
+ lambdadb --version
35
+ lambdadb --help
26
36
  ```
27
37
 
28
- The `dev` channel contains prerelease versions. For reproducible CI runs, pin an
29
- exact published version instead of the moving `dev` tag. See
30
- [RELEASING.md](RELEASING.md#current-status) for release preparation status and
31
- [VALIDATION.md](VALIDATION.md) for verification results and remaining limitations.
38
+ The [LambdaDB tap](https://github.com/lambdadb/homebrew-tap) installs the stable CLI
39
+ and its Node 24 runtime. No separate Node/npm setup is needed. Update with
40
+ `brew update` followed by `brew upgrade lambdadb/tap/lambdadb-cli`; remove with
41
+ `brew uninstall lambdadb/tap/lambdadb-cli`.
42
+
43
+ If another installation provides `lambdadb`, check `command -v lambdadb` before
44
+ switching package managers. Follow Homebrew's formula trust prompts without
45
+ disabling trust checks. See the
46
+ [maintainer guide](https://github.com/lambdadb/lambdadb-cli/tree/develop/packaging/homebrew#readme)
47
+ for packaging and validation details.
32
48
 
33
49
  ### Build from source
34
50
 
35
- From a checkout of this repository:
51
+ Requires Node.js 22.14 or newer and npm. From a checkout of this repository:
36
52
 
37
53
  ```sh
38
54
  npm ci
@@ -156,6 +172,12 @@ One page is the default; `nextPageToken` is an opaque continuation token.
156
172
  budget. No partial list is printed on failure. Collection statistics describe
157
173
  the committed head of `main`, not the selected read ref or whole-index readiness.
158
174
  The create input file is the index map itself, not a full create request body.
175
+ SDK 0.6.0 accepts 16 lowercase text analyzer names: `standard`, `english`,
176
+ `korean`, `japanese`, `chinese`, `cjk`, `arabic`, `french`, `german`, `hindi`,
177
+ `indonesian`, `italian`, `portuguese`, `russian`, `spanish` and `turkish`.
178
+ For example, `{"text":{"type":"text","analyzers":["chinese"]}}` is a valid
179
+ index-config file. Omission preserves the server default; lists are sent unchanged.
180
+ The server rejects duplicate analyzer names. Language detection is not automatic.
159
181
 
160
182
  ### Import JSONL
161
183
 
@@ -223,10 +245,11 @@ lambdadb docs fetch --collection cli-demo-docs --ref branch:main --ids doc-1 --c
223
245
  ```
224
246
 
225
247
  These examples require the named ref to exist. Query files use the SDK/API
226
- request body, including a `query` object and optional `size`, `sort`, `fields`,
248
+ request body, with optional `query`, `facets`, `size`, `sort`, `fields`,
227
249
  `partitionFilter`, `consistentRead` and `includeVectors`. The query DSL is forwarded
228
250
  to the API, not reimplemented in the CLI. Unknown top-level fields are rejected.
229
- `size` accepts 1–100, `null`, or omission; null is normalized to SDK omission.
251
+ Omit `query` for match-all. `size` accepts 1–100, `null`, or omission; null is
252
+ normalized to SDK omission. `size: 0` is accepted only with at least one facet.
230
253
  An optional file `ref` must match the mandatory `--ref`; conflicting selectors
231
254
  are rejected. Fetch accepts up to 100 IDs and reports `missingIds` without
232
255
  turning a successful missing-document response into an error.
@@ -236,6 +259,38 @@ its separate unauthenticated transfer client. Results are buffered, not streamed
236
259
  or truncated. The CLI omits the consumed signed URL. No ref is resolved to or
237
260
  claimed to pin a snapshot by the CLI. Branches and aliases can move between calls.
238
261
 
262
+ ### Keyword facets
263
+
264
+ After creating a new collection with `examples/index-config.json` and importing
265
+ `examples/documents.jsonl`, run:
266
+
267
+ ```sh
268
+ # Match all documents and return only category counts (query is omitted).
269
+ lambdadb query --collection cli-demo-docs --ref branch:main --file examples/query-facets-only.json --json
270
+ # Return matching documents and category counts together.
271
+ lambdadb query --collection cli-demo-docs --ref branch:main --file examples/query-with-facets.json --json
272
+ ```
273
+
274
+ Facet-only input: `{"size":0,"facets":{"category":{"size":10}}}`.
275
+ Up to five keyword fields can be requested, including keyword arrays and dotted
276
+ field paths. Each facet accepts only optional `size` (1–100); omission or `null`
277
+ uses the server default of 10. Counts are returned in
278
+ `data.facets.category.buckets`, for example
279
+ `[{"value":"database","count":2},{"value":"developer-tools","count":1}]`
280
+ for the facet-only sample after all three documents are indexed. `data.docs` is
281
+ empty for facet-only queries. Facets are retained when the SDK downloads documents
282
+ from `docsUrl` as well. Counts use JavaScript numbers and may lose precision above
283
+ `Number.MAX_SAFE_INTEGER`.
284
+
285
+ Facets require a supporting server and newly built keyword indexes. Existing
286
+ indexes, partial updates, segment merges and old Tags do not gain support from
287
+ this SDK update. If migration is needed, deliberately create a new Collection and
288
+ reinsert the source data; the CLI performs no automatic migration. Accepted imports
289
+ and `consistentRead` are not proof of committed facet/index readiness.
290
+
291
+ This source pins SDK 0.6.0. Existing CLI installations keep their packaged SDK
292
+ until a new CLI version is published and installed.
293
+
239
294
  ## Output, deadlines and exit codes
240
295
 
241
296
  `--json` emits exactly one JSON object plus a newline on stdout for an executed
package/RELEASING.md CHANGED
@@ -2,49 +2,38 @@
2
2
 
3
3
  ## Current status
4
4
 
5
- The `release/0.1.0` candidate prepares the first stable version from reviewed
6
- `develop` commit `c8947e9`. It changes package/lock versions and release documents;
7
- CLI runtime, dependencies, tests and workflows match the verified development build.
8
- The promotion PR targets `main` directly so `develop` keeps its automatic dev base.
9
- Merge with a merge commit, then obtain authorization for `v0.1.0` and a non-prerelease
10
- GitHub Release. Main promotion alone does not publish npm. After publication,
11
- verify `latest=0.1.0`, provenance and a clean consumer installation. Synchronize
12
- main back to develop through a PR that also sets the next development base.
13
- Stable publication has not yet been performed.
14
-
15
- The ordinary develop merge published `0.1.0-dev.5` through OIDC in
16
- [one successful workflow attempt](https://github.com/lambdadb/lambdadb-cli/actions/runs/35344153978).
17
- The new verification logic handled approximately three minutes of registry
18
- propagation without repeating the write or rerunning the workflow. A fresh npm
19
- installation passed 35 CLI contracts, integrity and provenance/signature checks.
20
-
21
- Bootstrap and initial OIDC publication were completed on 2026-09-18:
22
-
23
- - `0.1.0-dev.1` was published publicly from reviewed develop as the manual bootstrap.
24
- - `0.1.0-dev.4` was published by GitHub Actions with verified provenance for
25
- commit `f2397ba`. Its registry installation passed all 35 CLI contract tests.
26
- - The repository variable `NPM_DEV_PUBLISH_ENABLED=true` enables eligible develop
27
- pushes after Node 22/24 CI. Main promotion is required only for rc/stable.
28
-
29
- These are recorded validation milestones, not a continuously updated list of
30
- versions. Check npm for current dist-tags. At verification, `dev` pointed to
31
- `0.1.0-dev.4` and `latest` remained at the bootstrap `0.1.0-dev.1`: the first
32
- publication created both tags despite `--tag dev`, and removing `latest` returned
33
- HTTP 400. The next dev publication preserved `latest`. No stable version has been
34
- published; explicitly select `@dev` or an exact development version until a
35
- reviewed rc/stable release is available. Do not repeatedly delete the bootstrap
36
- tag or publish a placeholder to work around it.
37
-
38
- The CLI is licensed under [Apache-2.0](LICENSE), with matching package metadata.
39
- Publication, provenance and development-project smoke evidence are recorded in
40
- [VALIDATION.md](VALIDATION.md). Local bootstrap has no GitHub Actions provenance;
41
- the automated development artifact does.
42
-
43
- The workflow rejects private packages and missing license metadata. Explicit
44
- rc/stable releases also require matching tags, prerelease flags and dated
45
- changelog entries. Passing metadata validation does not establish live-service
46
- verification. Enabling automatic dev publication authorizes eligible develop
47
- pushes to publish after CI; rc/stable publication remains an explicit action.
5
+ The first stable version, `0.1.0`, was published on 2026-09-19 through
6
+ [GitHub Release v0.1.0](https://github.com/lambdadb/lambdadb-cli/releases/tag/v0.1.0)
7
+ and the [OIDC release workflow](https://github.com/lambdadb/lambdadb-cli/actions/runs/35421226854).
8
+ Tag and main release commit `c8d389f` have the same tree as the reviewed and
9
+ live-tested candidate `658ea7c`. The workflow passed on attempt 1, including Node
10
+ 22/24 validation and tests of the exact publication tarball.
11
+
12
+ Registry verification confirmed `latest=0.1.0` and `dev=0.1.0-dev.5`. A clean,
13
+ unqualified npm install passed all 35 CLI contracts, version/help, integrity,
14
+ provenance and signature checks. Version/tag and attestation metadata propagated
15
+ separately; verification used read retries without republishing.
16
+
17
+ The post-release synchronization merged main history back into develop with
18
+ `0.1.1-dev.1` as its development base. After the Homebrew documentation merge,
19
+ [develop CI](https://github.com/lambdadb/lambdadb-cli/actions/runs/35434313586)
20
+ published and verified `0.1.1-dev.8` from `225dec3` on 2026-09-19. Registry and
21
+ provenance metadata identify that commit; `latest` remains `0.1.0`. Development
22
+ builds do not require a separate stable release or tag.
23
+
24
+ Bootstrap `0.1.0-dev.1` and the first OIDC development builds were verified on
25
+ 2026-09-18. The ordinary develop merge published `0.1.0-dev.5` in
26
+ [one successful attempt](https://github.com/lambdadb/lambdadb-cli/actions/runs/35344153978),
27
+ handling approximately three minutes of registry propagation without another write.
28
+ The bootstrap initially assigned `latest` to `0.1.0-dev.1`, and a removal attempt
29
+ returned HTTP 400. The stable publication replaces that temporary tag state.
30
+ Do not repeat bootstrap or change tags to work around propagation delays.
31
+
32
+ These are dated validation milestones, not a continuously updated version list.
33
+ Check npm for current dist-tags. Apache-2.0 licensing, publication, provenance,
34
+ consumer checks and development-project smoke evidence are recorded in
35
+ [VALIDATION.md](VALIDATION.md). Automatic dev publication is enabled;
36
+ future stable/rc tags and GitHub Releases remain explicit release actions.
48
37
 
49
38
  ## Branch and version policy
50
39
 
@@ -249,6 +238,7 @@ npm run test:live
249
238
 
250
239
  The test fails before API calls when required settings are absent. It creates a
251
240
  random temporary collection, imports two 3 MiB documents plus a bulk document,
241
+ uses the new `chinese` analyzer, checks exact facet-only and document+facet buckets,
252
242
  and checks committed query/fetch contents with a maximum 300-second observation
253
243
  window per stage. Request timeouts and polling sleeps are capped to the remaining
254
244
  budget, and responses at or after the deadline cannot pass. Process termination
@@ -256,6 +246,7 @@ and event-loop scheduling may delay reporting. It reports elapsed time and
256
246
  matched-document counts; a timeout is a failed smoke, not proof that accepted
257
247
  writes were rejected or lost.
258
248
  Collection cleanup uses the SDK because deletion is outside the public CLI MVP.
249
+ The harness verifies deletion with a subsequent HTTP 404.
259
250
  Only the test's own collection is eligible for cleanup. An interrupted process
260
251
  or failed cleanup may leave that named collection; inspect it manually.
261
252
 
@@ -264,6 +255,19 @@ live behavior, or exactly-once writes. A large result alone does not prove the
264
255
  service selected docsUrl; mock tests explicitly exercise that transport path.
265
256
  Use existing known development tag/alias refs for additional live ref evidence.
266
257
 
258
+ ## Homebrew handoff
259
+
260
+ The stable formula is maintained on develop in
261
+ [`packaging/homebrew/Formula/lambdadb-cli.rb`](https://github.com/lambdadb/lambdadb-cli/blob/develop/packaging/homebrew/Formula/lambdadb-cli.rb).
262
+ It consumes the verified npm artifact and the lockfile from its immutable release
263
+ commit. Development publication does not update Homebrew. After each stable npm
264
+ release, follow the [Homebrew maintainer guide](https://github.com/lambdadb/lambdadb-cli/tree/develop/packaging/homebrew#readme) to
265
+ update checksums, pass installation checks and prepare a tap PR. Tap publication
266
+ is separate from this repository's npm workflow; no cross-repository write or
267
+ automatic tap update is configured. The public
268
+ [LambdaDB tap](https://github.com/lambdadb/homebrew-tap) provides stable `0.1.0`;
269
+ installation evidence is recorded in [VALIDATION.md](VALIDATION.md#homebrew-publication).
270
+
267
271
  ## Design references
268
272
 
269
273
  - LambdaDB TypeScript client `RELEASING.md` and `publish.yaml`: canonical channels,
package/VALIDATION.md CHANGED
@@ -1,14 +1,173 @@
1
1
  # Validation record
2
2
 
3
- Date: 2026-09-18. Local contract tests use loopback servers and synthetic
4
- credentials. A separate authenticated development-project smoke is recorded below.
3
+ Updated: 2026-09-29. Local contract tests use loopback servers and synthetic
4
+ credentials. Authenticated development-project evidence is recorded separately.
5
+
6
+ ## SDK 0.6.0 integration
7
+
8
+ Validated on 2026-09-29 from an isolated worktree based on develop
9
+ `513af6e4d262edd380013c86d51a20aad16274d7`, with Node.js 24.15.0 and the
10
+ published `@functional-systems/lambdadb@0.6.0` dependency. npm `latest` was 0.6.0.
11
+ The release tag resolves to `491d01e0eb54bd135823fab79cbe32396ec03691`;
12
+ installed query schema, analyzer schema and client facade source files matched
13
+ that tag byte-for-byte. The lockfile records the published package integrity.
14
+
15
+ - `npm ci`, `npm run lint`, `npm run check:version`, `npm run typecheck`: passed.
16
+ - `npm test`: 64 tests passed, including subprocess requests through the actual
17
+ SDK for facet-only success, zero without facets rejection, omitted query,
18
+ malformed facets, bounds, null/default preservation and ref consistency.
19
+ - `npm run test:package`: 40 installed-tarball CLI tests passed. Facet metadata,
20
+ inline documents and `docsUrl` downloads survive JSON output; signed URLs and
21
+ credentials remain excluded. Arbitrary facet-name redaction preserves collisions;
22
+ short credentials do not change fixed bucket/result schema keys.
23
+ - All 16 analyzer names passed create serialization and reached the loopback API;
24
+ unknown/case-mismatched names failed before HTTP. Omitted, empty and duplicate
25
+ analyzer lists were forwarded unchanged. This does not mean the live server
26
+ accepts duplicate names.
27
+ - `git diff --check`: passed. GitHub Node 22/24 CI results are reported on the PR;
28
+ the local run above used Node 24 only.
29
+
30
+ The credentialed live harness (`node --test test/live/cli.test.mjs`, after build)
31
+ used the previously designated development endpoint
32
+ `https://internal-dev-aws-apne2-v3-c05a2b5d492a.lambdadb.ai`, project `bench-recall`.
33
+ An in-memory launcher used the existing ignored `.env.local` mapping documented
34
+ below; no credential file was changed or copied into the worktree.
35
+
36
+ - Doctor and temporary Collection creation with `english` and new `chinese`
37
+ analyzers succeeded. Two ordinary 3 MiB writes and one bulk write were accepted
38
+ at about 2 seconds in the final run.
39
+ - Committed query/fetch contents for all three documents were verified at about
40
+ 87 seconds in the final run, without a pending-write overlay.
41
+ - Both checked-in facet examples passed: omitted-query `size: 0` returned no
42
+ documents; document+facet returned three. Both returned exact category buckets
43
+ `database: 2` and `developer-tools: 1` through CLI JSON output.
44
+ - The final test passed in 87.8 seconds after the short-credential output fix.
45
+ Temporary Collection `cli-smoke-dcd3b60a-b65d-4126-b6e4-ad78904f4eb3` was deleted
46
+ and a subsequent SDK get returned HTTP 404. The earlier integration smoke also
47
+ passed in 53.6 seconds; its temporary Collection
48
+ `cli-smoke-e9f9a7c8-babf-4a62-a8d8-48bfa4683f66` was likewise deleted with 404
49
+ verification.
50
+
51
+ This proves the bounded sample against one supporting development deployment,
52
+ not production availability, all analyzer language behavior or old-index support.
53
+ No existing Collection/index was migrated. No CLI merge, tag, GitHub Release or
54
+ npm publication was performed as part of this integration.
55
+
56
+ ## Development publication after Homebrew documentation
57
+
58
+ On 2026-09-19, the [develop push workflow](https://github.com/lambdadb/lambdadb-cli/actions/runs/35434313586)
59
+ completed successfully for `225dec37f48dd5603af7fe777c1eb24d9041188c`, the merge of
60
+ PR #8. Node 22/24 validation and tests of the exact publication tarball passed.
61
+ The publish job accepted `0.1.1-dev.8`, retried registry reads during propagation,
62
+ and finished with `result=published` without repeating the write.
63
+
64
+ Subsequent read-only registry checks confirmed `dev=0.1.1-dev.8`,
65
+ `latest=0.1.0`, and the package's `gitHead` matching the merge commit. Decoded
66
+ provenance metadata identifies that same commit, `refs/heads/develop`,
67
+ `.github/workflows/publish.yaml` and workflow attempt 1; its subject digest matches
68
+ registry integrity. This metadata inspection did not repeat signature verification,
69
+ a consumer installation or the LambdaDB live smoke.
70
+
71
+ ## Homebrew publication
72
+
73
+ On 2026-09-19, the public
74
+ [lambdadb/homebrew-tap](https://github.com/lambdadb/homebrew-tap) was initialized at
75
+ `ca84485149d7915131df686b4c68868d47c00cd5`. Its CLI formula is byte-for-byte equal
76
+ to the formula merged in CLI PR #7 (`3eefaaa`), selecting stable `0.1.0` and the
77
+ release lockfile at `c8d389f`.
78
+
79
+ - Local macOS 26.4 arm64 / Homebrew 6.0.17 verification used the tap's new harness
80
+ in both local and remote modes. Remote mode invoked
81
+ `brew install --formula lambdadb/tap/lambdadb-cli` with no existing tap or CLI,
82
+ exercising automatic public tap discovery and formula-specific trust.
83
+ - Installation, downloaded formula equality, Homebrew style, `brew test`, version
84
+ `0.1.0`, JSON configuration with mode 0600, and the wrapper with an unusable
85
+ ambient Node all passed. No trust checks were disabled.
86
+ - Test installations and taps were removed; existing taps, fnm Node and CLI
87
+ `.env.local` were preserved. Dependencies and caches remain installed.
88
+ - [Tap CI](https://github.com/lambdadb/homebrew-tap/actions/runs/35433096180)
89
+ passed remote installation, style, smoke, runtime selection and cleanup on both
90
+ macOS 15 and Ubuntu 24.04 at the published tap commit.
91
+ - Simulated existing CLI, broken prefix executable symlink and existing remote
92
+ tap cases stopped the new harness before mutations; invalid mode returned 2
93
+ without invoking Homebrew.
94
+ - Tap main protection requires both installation checks, one approving review,
95
+ resolved conversations and an up-to-date base; force pushes and deletion are
96
+ disabled. Organization-level default-branch rules also apply.
97
+
98
+ This publishes an installation path for the existing stable artifact, without a
99
+ new npm release or another LambdaDB live-service smoke. Upgrade behavior between
100
+ two distinct stable versions remains unverified until the next formula update.
101
+ The earlier 35-contract Homebrew verification below used the same stable artifact;
102
+ this tap publication ran the installation smoke checks rather than repeating it.
103
+
104
+ ## Homebrew preparation
105
+
106
+ On 2026-09-19, macOS 26.4 arm64 / Homebrew 6.0.17 installed stable `0.1.0`
107
+ from `packaging/homebrew/Formula/lambdadb-cli.rb` through a disposable local tap.
108
+ The npm tarball SHA-256 was checked against the downloaded bytes, whose SHA-512
109
+ matched registry integrity. The release lockfile resource is fixed to `c8d389f`.
110
+
111
+ - Homebrew formula style, installation and `brew test` passed. The formula checks
112
+ CLI version, JSON configuration and mode 0600 without contacting a service.
113
+ - A deliberately unusable `node` placed first on ambient PATH did not prevent
114
+ the installed wrapper from running; it selected Homebrew's Node 24.21.0.
115
+ - All 35 CLI contracts from the stable release commit passed against the installed
116
+ Homebrew package. The harness uses the release commit's tests/examples so future
117
+ development-only features do not create false failures for an older stable CLI.
118
+ - Simulated existing-formula and broken-executable-symlink cases both stopped the
119
+ harness before any installation or tap mutation.
120
+ - The temporary CLI installation and tap were removed. The final harness disables
121
+ automatic dependency removal and cleanup, and does not persist developer mode.
122
+ Homebrew dependencies/caches remain: installing Node also upgraded the required
123
+ ca-certificates, openssl@3, readline, sqlite and xz packages during initial setup.
124
+ The existing fnm-managed Node and global npm CLI were not replaced.
125
+ - Normal clean-install, lint, version/type checks, 59 source tests and 35 npm
126
+ installed-package contracts also passed. CLI runtime and SDK dependencies did
127
+ not change.
128
+
129
+ macOS/Linux Homebrew CI is configured separately from runtime CI; current PR job
130
+ results are the authority for hosted-runner coverage. This initial preparation
131
+ did not create the public tap; publication evidence is recorded above. No new npm
132
+ version was published by the preparation. LambdaDB service smoke was not repeated for
133
+ this packaging-only change; the stable candidate evidence below remains separate.
134
+
135
+ ## Stable 0.1.0 publication
136
+
137
+ On 2026-09-19, [GitHub Release v0.1.0](https://github.com/lambdadb/lambdadb-cli/releases/tag/v0.1.0)
138
+ and its annotated tag identified main commit
139
+ `c8d389f3264d641ae6eafc7737fedd5ea046ddf1`. Its tree exactly matches the reviewed
140
+ candidate `658ea7ccdce535bbd4f2e29ae06813e2f2e716e2` from PR #5, including the
141
+ runtime verified by the installed-candidate development smoke below. That smoke
142
+ was not repeated because release contents were unchanged.
143
+
144
+ The [release-event workflow](https://github.com/lambdadb/lambdadb-cli/actions/runs/35421226854)
145
+ passed on attempt 1. Node 22/24 validation and exact-tarball contracts passed;
146
+ Trusted Publishing published `0.1.0` on `latest` at 04:27:06 UTC. Version/tag
147
+ metadata and attestation metadata propagated separately. Verification retried
148
+ reads only; no second publication or workflow rerun was needed.
149
+
150
+ A clean, unqualified npm install with an isolated cache resolved to `0.1.0` and
151
+ passed version/help plus all 35 CLI contract tests. The downloaded tarball digest,
152
+ installed lockfile integrity and provenance subject matched. The decoded SLSA
153
+ provenance identified this repository, `.github/workflows/publish.yaml`,
154
+ `refs/tags/v0.1.0`, release commit `c8d389f` and workflow attempt 1.
155
+ `npm audit signatures` reported no invalid or missing signatures.
156
+ At verification, `latest=0.1.0` and `dev=0.1.0-dev.5`; the stable release replaced
157
+ the initial bootstrap latest tag without changing the dev channel.
158
+
159
+ The subsequent main-to-develop synchronization sets `0.1.1-dev.1` as the next
160
+ base. Its local clean install, lint, types, version checks, 59 source tests and
161
+ 35 installed-package contracts passed. This maintenance change updates versions
162
+ and documentation only; CLI runtime, dependencies, tests and workflows match
163
+ `v0.1.0`. Its PR validation does not itself publish a new dev version.
5
164
 
6
165
  ## Stable 0.1.0 candidate
7
166
 
8
167
  Prepared `release/0.1.0` from reviewed develop commit
9
168
  `c8947e96308283ac593e712716f0732121bb1958`. Relative to that commit, only package
10
169
  versions and release documents change. Runtime source, dependencies, tests,
11
- examples and workflows are unchanged. Stable publication remains pending.
170
+ examples and workflows are unchanged. This records the pre-publication candidate.
12
171
 
13
172
  On Node.js 24.15.0 / npm 11.12.1, a new worktree passed `npm ci`, lint, type
14
173
  checking, all 59 source tests, and 35 installed-package contract tests.
@@ -38,8 +197,8 @@ Target: `bench-recall` at
38
197
  Only documentation was updated after this live run; the final package is checked
39
198
  again with the installed-package contracts. This is development-service evidence
40
199
  for a bounded sample, not a latency/readiness guarantee or live tag/alias coverage.
41
- The stable npm artifact and release-event workflow remain unverified until the
42
- explicit publication and subsequent consumer/provenance checks.
200
+ The stable npm artifact and release-event workflow were not verified at candidate
201
+ preparation time; the subsequent publication evidence is recorded above.
43
202
 
44
203
  ## Public bootstrap and OIDC publication
45
204
 
@@ -74,7 +233,8 @@ At this verification, `dev=0.1.0-dev.4` and `latest=0.1.0-dev.1`. Bootstrap had
74
233
  created both tags despite `--tag dev`; a removal attempt for `latest` returned
75
234
  HTTP 400. The automated dev publication left `latest` unchanged. This observation
76
235
  does not establish a general version-count rule for npm. Bootstrap and OIDC setup
77
- are complete; main promotion and rc/stable publication remain unperformed.
236
+ were complete at that stage; main promotion and stable publication followed as
237
+ recorded above.
78
238
 
79
239
  ## Publication verification hardening
80
240
 
@@ -298,9 +458,6 @@ deployment state of an individual LambdaDB endpoint.
298
458
  receipt. Those capabilities are not implemented.
299
459
  - No Windows-specific permission or signal validation. POSIX modes and injected
300
460
  SIGINT/SIGTERM were checked on macOS; CI targets Linux.
301
- - No main promotion, explicit rc/stable publication or GitHub Release workflow
302
- execution. Public bootstrap and automatic dev/OIDC publication are verified
303
- above, including the five-minute verification behavior on an ordinary develop merge.
304
461
  - Mock large-response tests cover SDK routing/credential separation at 1 MiB;
305
462
  the live sample verifies combined content above 6 MiB. Neither is an exhaustive
306
463
  memory/size stress test. Imports buffer a maximum 64 MiB source file
package/dist/cli.js CHANGED
@@ -172,7 +172,8 @@ program.command('query')
172
172
  .description('Submit a supported query request JSON file; empty matches are a successful result')
173
173
  .requiredOption('--collection <name>', 'Collection name')
174
174
  .requiredOption('--ref <kind:name>', 'branch:NAME, tag:NAME or alias:NAME; must match any ref in the file')
175
- .requiredOption('--file <path>', 'JSON request body including query (see examples/query.json)')
175
+ .requiredOption('--file <path>', 'JSON request body; omit query for match-all, use size:0 with facets for counts only')
176
+ .addHelpText('after', '\nExamples:\n lambdadb query --collection demo-docs --ref branch:main --file examples/query.json --json\n lambdadb query --collection demo-docs --ref branch:main --file examples/query-facets-only.json --json\n lambdadb query --collection demo-docs --ref branch:main --file examples/query-with-facets.json --json')
176
177
  .action(async (opts, cmd) => {
177
178
  const ref = parseRef(opts.ref);
178
179
  const input = queryInput(await readJson(opts.file), ref);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAgB,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAC5B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB;IAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;AACpG,IAAI,WAAW,GAAG,UAAU,CAAC;AAC7B,IAAI,MAA2C,CAAC;AAChD,IAAI,eAAe,GAAG,KAAK,CAAC;AAE5B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;KAC1B,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,gEAAgE,CAAC;KAC7E,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,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YAC7C,CAAC,CAAC,IAAI,UAAU,CAAC,oFAAoF,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACjH,MAAM,YAAY,GAAG,eAAe,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClE,MAAM,CAAC,IAAI,CAAC;YACV,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM;YACzD,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;SAC9B,EAAE,YAAY,CAAC,CAAC,CAAC,4DAA4D,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;QACpG,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9B,CAAC;AACH,CAAC"}
package/dist/input.js CHANGED
@@ -67,17 +67,18 @@ export function queryInput(body, ref) {
67
67
  }
68
68
  }
69
69
  const input = { ...body, ref };
70
- // Public API accepts null size, while SDK 0.5.1 only accepts undefined/number.
70
+ // Public API accepts null size, while SDK 0.6.0 only accepts undefined/number.
71
71
  if (input.size === null)
72
72
  delete input.size;
73
- if (input.size !== undefined && (!Number.isInteger(input.size) || Number(input.size) < 1 || Number(input.size) > 100)) {
74
- throw new InputError('Query size must be an integer from 1 to 100, null or omitted.');
73
+ // The SDK validates integer types and requires facets for zero, but omits bounds.
74
+ if (typeof input.size === 'number' && (input.size < 0 || input.size > 100)) {
75
+ throw new InputError('Query size must be from 0 to 100; zero requires facets.');
75
76
  }
76
77
  try {
77
78
  queryCollectionRequestBodyToJSON(input);
78
79
  }
79
80
  catch {
80
- throw new InputError('Invalid query request. Check request fields and types; consistentRead:true requires a branch ref.');
81
+ throw new InputError('Invalid query request. Check fields and types; size:0 requires facets, and consistentRead:true requires a branch ref.');
81
82
  }
82
83
  return input;
83
84
  }
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,MAAM,gDAAgD,CAAC;AACjI,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAK,GAAG,eAAe;IAClE,IAAI,IAAI,CAAC;IACT,IAAI,CAAC;QAAC,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAAC,CAAC;IACrC,MAAM,CAAC;QAAC,MAAM,IAAI,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAAC,CAAC;IAC1D,IAAI,CAAC;QACH,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAAE,MAAM,IAAI,UAAU,CAAC,+BAA+B,CAAC,CAAC;QACzF,wFAAwF;QACxF,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,gBAAgB,C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AAC;YAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;QAAC,CAAC;QACnD,MAAM,CAAC;YAAC,MAAM,IAAI,UAAU,CAAC,cAAc,UAAU,yBAAyB,CAAC,CAAC;QAAC,CAAC;QAClF,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,KAAK,QAAQ,IAAI,GAAG,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YACvE,MAAM,IAAI,UAAU,CAAC,cAAc,UAAU,uDAAuD,CAAC,CAAC;QACxG,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,oCAAoC,CAAC,CAAC;IAClF,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/output.js CHANGED
@@ -4,7 +4,7 @@ const protocolValues = new Set([
4
4
  'data.state', 'data.searchable', 'data.batches.*.state', 'data.batches.*.error.code',
5
5
  'data.checks.*.name', 'data.checks.*.status',
6
6
  ]);
7
- // These document/metadata maps carry user-defined field names in MVP responses.
7
+ // These response maps carry user-defined field names.
8
8
  const freeFormMaps = new Set(['doc', 'indexConfigs', 'tags']);
9
9
  export class Output {
10
10
  json = false;
@@ -29,7 +29,9 @@ export class Output {
29
29
  if (Array.isArray(value))
30
30
  return value.map(item => sanitize(item, `${path}.*`, freeForm));
31
31
  if (value && typeof value === 'object') {
32
- const entries = Object.entries(value).map(([key, item]) => ({ key, item, name: freeForm ? this.redact(key) : key }));
32
+ // Facet names are arbitrary, but their bucket/result keys are SDK schema.
33
+ const facetFields = path === 'data.facets';
34
+ const entries = Object.entries(value).map(([key, item]) => ({ key, item, name: freeForm || facetFields ? this.redact(key) : key }));
33
35
  // Reserve every base name, including unchanged keys that appear later.
34
36
  // Only renamed keys receive suffixes; unrelated field names stay intact.
35
37
  const reserved = new Set(entries.map(entry => entry.name));
@@ -45,7 +47,7 @@ export class Output {
45
47
  suffixes.set(name, suffix);
46
48
  }
47
49
  used.add(unique);
48
- return [unique, sanitize(item, path ? `${path}.${key}` : key, freeForm || freeFormMaps.has(key))];
50
+ return [unique, sanitize(item, path ? `${path}.${key}` : key, freeForm || (!facetFields && freeFormMaps.has(key)))];
49
51
  }));
50
52
  }
51
53
  return value;
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAOA,8EAA8E;AAC9E,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,SAAS,EAAE,YAAY,EAAE,iBAAiB;IAC1C,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,2BAA2B;IACpF,oBAAoB,EAAE,sBAAsB;CAC7C,CAAC,CAAC;AACH,gFAAgF;AAChF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9D,MAAM,OAAO,MAAM;IACjB,IAAI,GAAG,KAAK,CAAC;IACL,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAEpC,OAAO,CAAC,MAA0B,IAAI,IAAI,MAAM;QAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAErE,MAAM,CAAC,IAAY;QACzB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,UAAU,CAAC,OAAe;QACx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AAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1E,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,QAAQ,CAAC,KAAK;YAAE,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "size": 0,
3
+ "facets": { "category": { "size": 10 } }
4
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "query": { "queryString": { "query": "serverless", "defaultField": "text" } },
3
+ "size": 10,
4
+ "facets": { "category": {} }
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functional-systems/lambdadb-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-dev.10",
4
4
  "private": false,
5
5
  "description": "Project-scoped LambdaDB command-line tools",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "test:live": "npm run build && node --test test/live/*.test.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@functional-systems/lambdadb": "0.5.1",
36
+ "@functional-systems/lambdadb": "0.6.0",
37
37
  "commander": "14.0.3"
38
38
  },
39
39
  "devDependencies": {
@@ -52,5 +52,6 @@
52
52
  "bugs": {
53
53
  "url": "https://github.com/lambdadb/lambdadb-cli/issues"
54
54
  },
55
- "license": "Apache-2.0"
55
+ "license": "Apache-2.0",
56
+ "gitHead": "a65a2b198b484d2e4da4ca2ff438779806a87cce"
56
57
  }
package/src/cli.ts CHANGED
@@ -175,7 +175,8 @@ program.command('query')
175
175
  .description('Submit a supported query request JSON file; empty matches are a successful result')
176
176
  .requiredOption('--collection <name>', 'Collection name')
177
177
  .requiredOption('--ref <kind:name>', 'branch:NAME, tag:NAME or alias:NAME; must match any ref in the file')
178
- .requiredOption('--file <path>', 'JSON request body including query (see examples/query.json)')
178
+ .requiredOption('--file <path>', 'JSON request body; omit query for match-all, use size:0 with facets for counts only')
179
+ .addHelpText('after', '\nExamples:\n lambdadb query --collection demo-docs --ref branch:main --file examples/query.json --json\n lambdadb query --collection demo-docs --ref branch:main --file examples/query-facets-only.json --json\n lambdadb query --collection demo-docs --ref branch:main --file examples/query-with-facets.json --json')
179
180
  .action(async (opts, cmd: Command) => {
180
181
  const ref = parseRef(opts.ref);
181
182
  const input = queryInput(await readJson(opts.file), ref);
package/src/input.ts CHANGED
@@ -57,13 +57,14 @@ export function queryInput(body: Record<string, unknown>, ref: ReadRef): QueryCo
57
57
  }
58
58
  }
59
59
  const input: Record<string, unknown> = { ...body, ref };
60
- // Public API accepts null size, while SDK 0.5.1 only accepts undefined/number.
60
+ // Public API accepts null size, while SDK 0.6.0 only accepts undefined/number.
61
61
  if (input.size === null) delete input.size;
62
- if (input.size !== undefined && (!Number.isInteger(input.size) || Number(input.size) < 1 || Number(input.size) > 100)) {
63
- throw new InputError('Query size must be an integer from 1 to 100, null or omitted.');
62
+ // The SDK validates integer types and requires facets for zero, but omits bounds.
63
+ if (typeof input.size === 'number' && (input.size < 0 || input.size > 100)) {
64
+ throw new InputError('Query size must be from 0 to 100; zero requires facets.');
64
65
  }
65
66
  try { queryCollectionRequestBodyToJSON(input as QueryCollectionInput); }
66
- catch { throw new InputError('Invalid query request. Check request fields and types; consistentRead:true requires a branch ref.'); }
67
+ catch { throw new InputError('Invalid query request. Check fields and types; size:0 requires facets, and consistentRead:true requires a branch ref.'); }
67
68
  return input as QueryCollectionInput;
68
69
  }
69
70
 
package/src/output.ts CHANGED
@@ -11,7 +11,7 @@ const protocolValues = new Set([
11
11
  'data.state', 'data.searchable', 'data.batches.*.state', 'data.batches.*.error.code',
12
12
  'data.checks.*.name', 'data.checks.*.status',
13
13
  ]);
14
- // These document/metadata maps carry user-defined field names in MVP responses.
14
+ // These response maps carry user-defined field names.
15
15
  const freeFormMaps = new Set(['doc', 'indexConfigs', 'tags']);
16
16
 
17
17
  export class Output {
@@ -37,7 +37,9 @@ export class Output {
37
37
  if (typeof value === 'string') return !freeForm && protocolValues.has(path) ? value : this.redact(value);
38
38
  if (Array.isArray(value)) return value.map(item => sanitize(item, `${path}.*`, freeForm));
39
39
  if (value && typeof value === 'object') {
40
- const entries = Object.entries(value).map(([key, item]) => ({ key, item, name: freeForm ? this.redact(key) : key }));
40
+ // Facet names are arbitrary, but their bucket/result keys are SDK schema.
41
+ const facetFields = path === 'data.facets';
42
+ const entries = Object.entries(value).map(([key, item]) => ({ key, item, name: freeForm || facetFields ? this.redact(key) : key }));
41
43
  // Reserve every base name, including unchanged keys that appear later.
42
44
  // Only renamed keys receive suffixes; unrelated field names stay intact.
43
45
  const reserved = new Set(entries.map(entry => entry.name));
@@ -51,7 +53,7 @@ export class Output {
51
53
  suffixes.set(name, suffix);
52
54
  }
53
55
  used.add(unique);
54
- return [unique, sanitize(item, path ? `${path}.${key}` : key, freeForm || freeFormMaps.has(key))];
56
+ return [unique, sanitize(item, path ? `${path}.${key}` : key, freeForm || (!facetFields && freeFormMaps.has(key)))];
55
57
  }));
56
58
  }
57
59
  return value;