@withone/cli 1.56.1 → 1.57.1

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.
@@ -3,10 +3,10 @@ import {
3
3
  dotPathToJsonbExpr,
4
4
  memMigrateCommand,
5
5
  reviveStringifiedJson
6
- } from "./chunk-XWTV7FA3.js";
6
+ } from "./chunk-YTM6HJKA.js";
7
7
  import "./chunk-44CV5IMX.js";
8
8
  import "./chunk-OLQ55K6B.js";
9
- import "./chunk-VH46MAE4.js";
9
+ import "./chunk-IMU2X3ZV.js";
10
10
  import "./chunk-YMUY55U2.js";
11
11
  import "./chunk-6UB623BG.js";
12
12
  export {
@@ -5,7 +5,7 @@ import {
5
5
  resetBackendSingleton,
6
6
  updateRecord,
7
7
  upsertRecord
8
- } from "./chunk-VH46MAE4.js";
8
+ } from "./chunk-IMU2X3ZV.js";
9
9
  import "./chunk-YMUY55U2.js";
10
10
  import "./chunk-6UB623BG.js";
11
11
  export {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-OLQ55K6B.js";
7
7
  import {
8
8
  getBackend
9
- } from "./chunk-VH46MAE4.js";
9
+ } from "./chunk-IMU2X3ZV.js";
10
10
  import "./chunk-YMUY55U2.js";
11
11
  import "./chunk-6UB623BG.js";
12
12
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  memSqlCommand,
3
3
  syncSqlCommand
4
- } from "./chunk-KAF5SVJS.js";
4
+ } from "./chunk-GKAIRI4Y.js";
5
5
  import "./chunk-OLQ55K6B.js";
6
- import "./chunk-VH46MAE4.js";
6
+ import "./chunk-IMU2X3ZV.js";
7
7
  import "./chunk-YMUY55U2.js";
8
8
  import "./chunk-6UB623BG.js";
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withone/cli",
3
- "version": "1.56.1",
3
+ "version": "1.57.1",
4
4
  "description": "CLI for managing One",
5
5
  "type": "module",
6
6
  "files": [
@@ -89,6 +89,26 @@ one --agent actions knowledge <platform> <actionId>
89
89
 
90
90
  This tells you exactly what parameters are required, how to structure the request, and which flags to use. Never skip this step — without it you'll guess wrong on parameters.
91
91
 
92
+ **You get a digest, not always the whole document.** Large docs are trimmed to the request-building sections (method/URL, headers, description, rules, required + optional parameters, sample request, gotchas, error handling). The response tells you what was left out:
93
+
94
+ - `truncated: true` — some sections are omitted. `truncated: false` — you have everything (and no `sections` list is sent).
95
+ - `sections[]` — the omitted sections only, each with `id`, `heading`, `chars`, and `included` (`false` / `"partial"`). Included sections are the headings you can see in the markdown.
96
+ - The markdown itself ends with a notice naming the omitted sections and the exact commands to load them.
97
+
98
+ Load more only when you need it (response shapes, response fields, worked examples). Served from the local cache, no network:
99
+
100
+ ```bash
101
+ one --agent actions knowledge <platform> <actionId> --section "Response Fields" # by heading
102
+ one --agent actions knowledge <platform> <actionId> --section response,optional # by alias, several at once
103
+ one --agent actions knowledge <platform> <actionId> --full # whole document
104
+ ```
105
+
106
+ Aliases: `response`, `fields`, `optional`, `required`, `examples`, `errors`, `success`, `body`, `query`, `path`, `notes`, `behavior`, `gotchas`. An unknown name returns an error listing every available section — retry with one of those ids.
107
+
108
+ - A `--section` response has `truncated: false` (you got the whole section) and `resolved` (which ids your names matched). It does not repeat the table of contents.
109
+ - If the digest says `sectionsCollapsed: true`, the doc has hundreds of headings and `sections` shows only the top omitted levels (`children` = hidden count). `--toc` lists every heading without the document.
110
+ - Sections named `(appendix)` in the notice are appended reference chunks or companion endpoints, not the action doc itself.
111
+
92
112
  ### 4. Execute
93
113
 
94
114
  ```bash
@@ -164,6 +184,7 @@ Knowledge and search responses are cached locally (`~/.one/cache/`). Subsequent
164
184
  - In `--agent` mode, responses include a `_cache` field: `{"hit": true, "age": 1423, "fresh": true}`; execute responses include `"_preflight": {"cache": "hit"|"miss"}`
165
185
  - Use `--no-cache` to force a fresh fetch: works on `knowledge`, `search`, and `execute` (refreshes execute's action-details lookup)
166
186
  - Use `--cache-status` to check cache state without fetching
187
+ - `knowledge --section <name>` and `--full` read from the cached document — no extra API call once the doc is cached
167
188
  - Manage cache: `one cache list`, `one cache clear`, `one cache update-all`
168
189
  - Execution responses are NEVER cached — the action always runs live; only action metadata (docs, method, path, schema) is cached
169
190
 
@@ -171,7 +192,7 @@ Knowledge and search responses are cached locally (`~/.one/cache/`). Subsequent
171
192
 
172
193
  One ships a local memory store (a real Postgres process bootstrapped on demand via the bundled `embedded-postgres` plugin, with a `postgres` plugin available for remote/self-hosted Postgres) that backs both user-authored notes and synced platform data. `one mem <cmd>` is the primary surface; `one sync` is a namespaced alias (`one mem sync ...`) that writes synced rows into the same store.
173
194
 
174
- **Zero-config.** The first `one mem` call on a new machine auto-initializes — no separate `mem init` step required. The `embedded-postgres` plugin downloads its Postgres binaries on first run (~52MB) and writes a daemon PID/port file at `~/.one/pg/.pgserve.json` so subsequent CLI invocations reuse the running cluster. If an OpenAI key is already resolvable (env, `.onerc`, or `config.openaiApiKey`), embeddings enable automatically and search becomes hybrid FTS + semantic. Otherwise you get FTS-only with a structured `_upgrade` hint on every response telling the user how to upgrade.
195
+ **Zero-config.** The first `one mem` call on a new machine auto-initializes — no separate `mem init` step required. The `embedded-postgres` plugin downloads its Postgres binaries on first run (~52MB) and writes a daemon PID/port file at `~/.one/pg/.pgserve.json` so subsequent CLI invocations reuse the running cluster. The daemon listens on 5434, or the next free port if another program holds it; pin one with `one --agent mem config set embedded-postgres.port <n>` (a conflict on a pinned port is an error, not a silent move). If an OpenAI key is already resolvable (env, `.onerc`, or `config.openaiApiKey`), embeddings enable automatically and search becomes hybrid FTS + semantic. Otherwise you get FTS-only with a structured `_upgrade` hint on every response telling the user how to upgrade.
175
196
 
176
197
  **Listing synced rows.** `mem list <type>` takes a positional namespaced type — there is no `--platform` flag. Synced rows live under `<platform>/<model>` types:
177
198