@stackbone/cli 0.6.3 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,203 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.1] - 2026-11-04
11
+
12
+ ### Added
13
+
14
+ - `stackbone rag ingest --metadata '<json object>'` sets document values, and
15
+ `stackbone rag query --filter '<json object>' --ranges '<json array>'` filters
16
+ retrieval by containment and number/date bounds. Invalid flags fail locally
17
+ with a suggestion before file reads or requests (STA3-61).
18
+
19
+ - **`stackbone rag collections create <name> --hybrid`: hybrid search for codes
20
+ and names.** A hybrid collection answers a text query with a search by
21
+ meaning and a search for the exact terms of the query, merged by reciprocal
22
+ rank fusion, so a product code such as `1239asd/OK` finds its product.
23
+ `--number-format eu|us` sets how the collection reads prices and dates
24
+ (`eu` by default). An unknown format fails before the request.
25
+ `stackbone rag query --no-hybrid` searches by meaning only, and with `--json`
26
+ each hit of a hybrid query carries `mixed_score` next to `score`, which stays
27
+ the similarity by meaning. A create without the flags sends the same request
28
+ as before, so an older box still accepts it (STA3-57).
29
+ - **Hybrid search in the box.** `POST /api/rag/collections` accepts
30
+ `hybrid_enabled` and `number_format`, `GET /api/rag/collections` returns them,
31
+ and `POST /api/rag/collections/{name}/query` takes `hybrid: false` and returns
32
+ `mixed_score` on a hybrid search. Migration 0116 adds the columns and the
33
+ index; hybrid stays off on every existing collection. Studio's new-collection
34
+ dialog gets a **Hybrid search** toggle and a **Number and date format**
35
+ select, and says when a box ignored them (STA3-57).
36
+ - **`stackbone rag collections update <name>`: change hybrid search on an
37
+ existing collection.** `--hybrid` or `--no-hybrid` turns it on or off and
38
+ `--number-format eu|us` changes the format; a flag left out keeps its value,
39
+ and a command with none fails before the request. The command prints
40
+ `Rebuilding collection <name>…` on stderr, waits for the box, and fails when
41
+ the answer does not confirm the settings sent. A box older than the command
42
+ answers exit `4` with "update the box" (STA3-57).
43
+ - **Changing hybrid search in the box.** `PATCH /api/rag/collections/{name}`
44
+ takes `hybrid_enabled`, `number_format` or both. The collection pauses as
45
+ `rebuilding`, so searches and ingests into it answer 409
46
+ `rag_collection_unavailable`, while the box recomputes every chunk's exact
47
+ terms from its stored text, with no embedding call; turning hybrid off clears
48
+ them. It answers 200 with the settings once the collection is ready, 409 while
49
+ an embedding rebuild or another change holds it, and 500 when the recompute
50
+ fails, which leaves the collection failed until the same change is sent
51
+ again. An embedding rebuild of a hybrid collection now keeps the exact terms.
52
+ Studio's collection screen gets **Edit search settings**, which shows the
53
+ collection rebuilding until the box answers (STA3-57).
54
+ - **Hybrid search reads prices and dates by the collection's number format.**
55
+ On an `eu` collection, `1250 euros` finds `1.250,00 €`,
56
+ `3 de noviembre de 2026` finds `03/11/2026`, and `3 de noviembre` finds it in
57
+ any year. On `us`, `03/11/2026` is March 11 and `1,250.00 €` is the amount.
58
+ Dates with a Spanish or English month name read the same in both formats,
59
+ and the euro is the only currency read. A number format change with
60
+ `rag collections update --number-format` now changes which chunks a date or
61
+ a price finds. A hybrid collection indexed before this release keeps its old
62
+ exact terms until its search settings are saved again
63
+ (`rag collections update` with its current settings, or Save in Studio) or
64
+ its embeddings are rebuilt (STA3-57).
65
+
66
+ ### Changed
67
+
68
+ - **Connector credentials from before CLI 0.6.1 must be reconnected.**
69
+ `stackbone dev` no longer moves grants written under the old shared dev key
70
+ onto the box's own key; it removes them at boot and Studio asks to reconnect
71
+ them. A box with neither its own Connect keys nor an install identity now
72
+ refuses to boot (STA3-43).
73
+
74
+ ## [0.7.0] - 2026-10-30
75
+
76
+ ### Added
77
+
78
+ - **`stackbone runs list --tag <key:value>` — the runs a caller labelled.** A
79
+ chat caller can label the run its turn opens with the `x-stackbone-run-tags`
80
+ header (every turn of a voice call carries `channel:voice` and its `room`), and
81
+ `--tag` lists only the runs carrying that tag: split on the first colon, exact
82
+ and case-sensitive. A malformed tag is refused before any request (FDE-62).
83
+ - **`stackbone package` documents the voice recording key pair.** The `.env`
84
+ carries `STACKBONE_VOICE_RECORDING_S3_ACCESS_KEY` and
85
+ `STACKBONE_VOICE_RECORDING_S3_SECRET_KEY`, commented out: the key LiveKit Cloud
86
+ uploads call recordings with, in place of the box's own. The README says that a
87
+ folder left on the bundled MinIO records no call, since LiveKit Cloud cannot
88
+ reach it (FDE-62).
89
+ - **`stackbone dev` starts the voice worker.** When the workspace has a deep
90
+ agent with `voice: true` and the box has LiveKit credentials saved in Studio
91
+ (Settings › Voice settings), `dev` runs the LiveKit voice worker on your
92
+ machine and prints `Voice worker ready (stackbone-voice-dev-<8 hex>)` once
93
+ LiveKit registers it. It stops the worker when either goes away and restarts
94
+ it when the credentials change, with no restart of `dev`. Each session
95
+ registers under its own name and its box dispatches calls to that name only,
96
+ so a worker deployed to LiveKit Cloud on the same project takes none of them.
97
+ The worker ships inside the CLI. The first session installs its dependencies
98
+ once, about 350 MB, into `~/.cache/stackbone/voice-worker/<version>/`, and
99
+ later sessions reuse them. A worker that fails is started once more, then
100
+ `dev` warns and keeps running. `STACKBONE_VOICE_WORKER_BIN` points it at
101
+ another worker `main.js` (FDE-62).
102
+ - **`stackbone limits` — operate a workspace's concurrency limits.** `list`
103
+ shows each limit with its capacity and its busy and waiting counts.
104
+ `slots <name>` lists the held and granted slots, then the queue in order.
105
+ `release <slotId> --yes` gives back a slot whose release was lost and grants
106
+ the next run in the queue. `capacity <name> <n|reset>` and
107
+ `max-hold <name> <duration|reset>` override the declared values; a new
108
+ max hold applies only to slots granted after the change. Each verb targets
109
+ the local-dev installation unless `--agent <id>` names another.
110
+ - **Concurrency limits in the box.** The box enforces the `limits` declared in
111
+ `stackbone.config.ts` for the SDK's `acquireSlot`, `releaseSlot` and
112
+ `withLimit`, takes back a slot held past `maxHold`, and frees a run's slots
113
+ when the run ends. It serves `GET /api/limits`,
114
+ `GET /api/limits/{name}/slots`, `POST /api/limits/slots/{id}/release` and
115
+ `PATCH /api/limits/{name}`, records a manual release or override in the
116
+ activity log, and Studio gets a limits screen to change capacity and max
117
+ hold and release a slot. A build fails on a limit the box would refuse.
118
+ - **Trigger links can start an agent.** A trigger link can target a deep agent
119
+ instead of a workflow. The event maps onto the agent's `message` field, and
120
+ Test, Auto-map and arming validate it. Each delivery is acknowledged once
121
+ queued and then runs as one agent turn with its own session; guardrails and
122
+ approvals use the existing inbox. Workflow links behave as before (PLA-968,
123
+ PLA-969).
124
+ - **A conversation key groups an agent link's events into one session.** The
125
+ key is a JSONata expression on the raw event, such as a Gmail thread id or a
126
+ WhatsApp sender. Events that yield the same value continue one session of
127
+ the agent, scoped to that link; anything unusable opens a fresh one. Turns
128
+ of one conversation never overlap: a new event waits for the running turn,
129
+ gives up after 10 minutes, and waits for the decision when an approval is
130
+ pending. Studio authors the key on the link's Correlation card, and Test
131
+ shows the key it would extract (PLA-971, PLA-972).
132
+ - **An agent answers a burst of chat messages once.** An agent link with a
133
+ conversation key can carry a wait, `debounceMs` (1 to 10000 ms). The box
134
+ holds one customer's messages until they have been quiet for the wait, or
135
+ 10 s have passed since the first, and answers them in one turn. Two
136
+ customers are never merged, and a link without a wait behaves as before.
137
+ Studio sets the wait on the link (STA3-25, STA3-27).
138
+ - **Agent memory is isolated per agent and configurable.** Each agent keeps
139
+ its own facts and call records per customer. Read and save are separate
140
+ settings, off by default, and Studio edits them per agent. A text agent gets
141
+ only the memory tools that are on; a voice agent recalls before it answers
142
+ and saves the heard transcript once after the call. Studio's System screen
143
+ edits the memory extractor's model and its published guidance (FDE-87).
144
+ - **"Delete all" on a person's memory also erases their run history on that
145
+ agent.** The runs, their steps and the deep agent's checkpoints for those
146
+ sessions go with the memory, after a confirmation that lists every run. Runs
147
+ are matched on the identity stored on each run, never on transcript text.
148
+ While one of the person's runs is open, the box refuses with a 409 and
149
+ deletes nothing (STA3-21).
150
+ - **Per-collection embeddings and rebuilds.** Studio creates a RAG collection
151
+ with its own provider and model and probes its dimension. Changing the model
152
+ later rebuilds every stored version through a durable workflow the CLI
153
+ seeds; queries and conflicting writes on the collection wait until the
154
+ rebuild commits, and a failed rebuild keeps its progress for a retry. Managed
155
+ uploads and Studio searches use the collection's saved model, and
156
+ `stackbone rag` reads a collection's saved provider, model, dimension and
157
+ `exact` search mode (STA3-18).
158
+ - **Voice agents search their knowledge.** When the caller finishes a
159
+ sentence, the box searches the agent's RAG collection and hands the passages
160
+ above the score threshold (default 0.2) to the model for that turn, with no
161
+ tool call. The collection is set in code (`voiceSettings.rag`) or on a new
162
+ Knowledge tab in Studio. Short utterances skip the search, and a failed or
163
+ slow search logs one warning and the agent answers without passages
164
+ (FDE-67).
165
+ - **Voice agents in the box.** A `voice: true` agent shows a Voice tab on its
166
+ Catalog entry. The box stores LiveKit credentials saved in Studio (Settings ›
167
+ Voice settings) and checks it can reach LiveKit with them. Studio places a
168
+ test call to the agent, edits its voice settings field by field over the
169
+ ones in code, and plays back a call's recording from its session when the
170
+ agent turns `recording` on (STA3-2, FDE-62).
171
+
172
+ ### Changed
173
+
174
+ - **`stackbone init` and `stackbone add deep-agent` pin `langchain`.** A deep
175
+ agent declared with `harness: 'minimal'` builds with it, so the workspace root
176
+ now pins it exactly at `1.5.2`, a version inside the `^1.5.0` range
177
+ `deepagents` declares whose `@langchain/core` peer range the pinned core meets,
178
+ and the box image bakes the same version (FDE-62).
179
+
180
+ ### Fixed
181
+
182
+ - **`stackbone package` includes workflow npm dependencies.** A creator
183
+ dependency such as `pdf-lib` could stay a bare import, so the packaged box
184
+ passed `/health` and every workflow failed on load. Creator dependencies are
185
+ now bundled with the workflow steps, and a loader that needs package-local
186
+ code or assets the bundle lacks is refused before the manifest is written,
187
+ with `build.external` guidance. Optional `require` calls whose fallback is
188
+ `undefined` are accepted (PLA-2353).
189
+ - **Approval decisions keep the reviewer.** Studio records the verified
190
+ reviewer's email, and the decision, approver and decision time reach
191
+ `requestApproval()`, `approval.get()` and `approval.list()` (PLA-2360).
192
+ - **A long workflow step no longer runs twice.** A step callback longer than
193
+ 300 s hit the HTTP client's own transport deadline and was retried next to
194
+ the original, duplicating side effects. The configured
195
+ `WORKFLOW_HTTP_TIMEOUT_MS` now governs it (PLA-2363).
196
+ - **A failed workflow run and its error event are written together**, so the
197
+ run is never marked failed without the event that carries its error.
198
+ - **`stackbone.memory.add` from a workflow step no longer fails** when the
199
+ run's row lands after the call; the run link stays and opens a not-found
200
+ state if the run never lands (STA3-20).
201
+ - **Insights queries on the box are bounded.** One query never holds a
202
+ connection more than 8 s, and a breakdown by an id reads only its
203
+ top groups instead of every group (STA3-6).
204
+ - **`stackbone db migrate create` works on Windows.** The schema and output
205
+ paths passed to drizzle-kit use `/`, which its glob reads on every OS.
206
+
10
207
  ## [0.6.3] - 2026-10-26
11
208
 
12
209
  ### Added