@staff0rd/assist 0.128.0 → 0.130.0

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.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Query and manage RavenDB connections and collections
3
+ ---
4
+
5
+ The user wants to interact with RavenDB. Use the `assist ravendb` CLI commands below.
6
+
7
+ ## Connection management
8
+
9
+ - `assist ravendb auth add` — interactively add a named connection
10
+ - `assist ravendb auth list` — list configured connections
11
+ - `assist ravendb auth remove <name>` — remove a connection
12
+ - `assist ravendb set-connection <name>` — set the default connection
13
+
14
+ ## Querying
15
+
16
+ - `assist ravendb collections [connection]` — list collections in a database
17
+ - `assist ravendb query [connection] [collection]` — query a collection
18
+ - `--page-size <n>` — documents per page (default 25)
19
+ - `--sort <field>` — sort field, prefix `-` for descending (default `-@metadata.Last-Modified`)
20
+ - `--query <lucene>` — Lucene filter query
21
+ - `--limit <n>` — max total documents to fetch
22
+
23
+ ## Workflow
24
+
25
+ 1. If no connections are configured, tell the user to run `assist ravendb auth add`. Do NOT attempt to add connections yourself.
26
+ 2. If the user doesn't specify a connection, omit it to use the default.
27
+ 3. Display query results to the user. If the output is large, summarise the key documents and highlight anything notable.
28
+ 4. If the user asks follow-up questions, refine the query options and re-query.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.128.0",
9
+ version: "0.130.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -7520,7 +7520,7 @@ function resolveConnection2(name) {
7520
7520
  // src/commands/seq/seqQuery.ts
7521
7521
  async function seqQuery(filter, options2) {
7522
7522
  const conn = resolveConnection2(options2.connection);
7523
- const count = Number.parseInt(options2.count ?? "50", 10);
7523
+ const count = Number.parseInt(options2.count ?? "1000", 10);
7524
7524
  const params = new URLSearchParams({ filter, count: String(count) });
7525
7525
  const url = `${conn.url}/api/events?${params}`;
7526
7526
  const response = await fetch(url, {
@@ -7549,6 +7549,13 @@ async function seqQuery(filter, options2) {
7549
7549
  }
7550
7550
  console.log(chalk88.dim(`
7551
7551
  ${events.length} events`));
7552
+ if (events.length >= count) {
7553
+ console.log(
7554
+ chalk88.yellow(
7555
+ `Results limited to ${count}. Use --count to retrieve more.`
7556
+ )
7557
+ );
7558
+ }
7552
7559
  }
7553
7560
 
7554
7561
  // src/commands/seq/seqSetConnection.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.128.0",
3
+ "version": "0.130.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {