prjct-cli 2.38.1 → 2.39.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.
- package/CHANGELOG.md +18 -0
- package/README.md +36 -7
- package/dist/bin/prjct-core.mjs +334 -334
- package/dist/bin/prjct.mjs +2 -2
- package/dist/daemon/entry.mjs +240 -240
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
The long-lived daemon no longer serves stale code, and embeddings reach any provider.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Daemon could serve output from an outdated build (the recurring "stale daemon" trap).** Two compounding defects: staleness was detected *after* the daemon decided to serve, so the request that first observed a new build/install was still answered by the old code; and on refusal the client printed `Daemon restarting — retry the command` and exited 1, so the command never ran (1st call stale → 2nd fails → 3rd fresh). Now staleness is detected *before* serving, the daemon refuses cleanly with a `retry` signal (the request never executes → zero side effects), and **both `bin/prjct.ts` and the daemon shim** (`scripts/build.js` → `dist/bin/prjct.mjs`, what users actually run) transparently fall through to direct in-process execution on the fresh code — no error, no manual re-run. Hooks degrade to the fail-soft `{}` no-op. The global-install version-drift check is now time-throttled (1s) instead of every-10-commands (which could leak up to 9 stale responses). Closes the "stale daemon caches old hook code" gotcha.
|
|
9
|
+
- **`prjct embeddings test` no longer truncates its failure** to 65 chars (`embeddings endpoi…`). It now prints the full endpoint response plus an actionable hint (401 → base-url/key mismatch, 404 → wrong route, network → unreachable) — the one command meant to diagnose connectivity stopped hiding the diagnosis.
|
|
10
|
+
- **Embeddings test isolation:** `global-config` resolves its directory lazily from `PRJCT_CLI_HOME`, so config/embeddings tests no longer read the developer's real `~/.prjct-cli`.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Zero-config embeddings setup — paste just the key.** `prjct embeddings set --key <k>` now infers the base URL from the key's prefix (`sk-or-…` → OpenRouter, `sk-…` → OpenAI, `pa-…` → Voyage; `sk-ant-`/Groq/unknown → keep default), so `--base-url` is optional for known providers. An explicit `--base-url` still wins, and detection re-fires when you switch keys. `set` is now partial-update friendly too: `set --key …` keeps your existing model/base URL instead of resetting them.
|
|
14
|
+
- **Embeddings support ANY OpenAI-compatible provider, including non-Bearer ones.** Already worked with OpenAI, OpenRouter, Ollama, Together, Mistral, Voyage, Jina, LM Studio, … via `--base-url` + `--model` + `--key`; now providers that deviate from `Authorization: Bearer` are covered too — e.g. **Azure OpenAI** (`api-key` header + `api-version` query) and custom gateways. New `prjct embeddings set` flags: `--auth-header <h>`, `--auth-scheme <s|none>` (`none` = raw key), `--headers "k=v,…"`, `--query <qs>`. Default stays `Bearer`/`authorization`, so existing providers are unchanged. Vector dimensionality is detected from the response (no hardcoded size).
|
|
15
|
+
|
|
16
|
+
## [2.39.0] - 2026-06-02
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- zero-config embeddings (any provider) + fix daemon never serves stale code (#412)
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
## [2.38.1] - 2026-06-02
|
|
6
24
|
|
|
7
25
|
### Performance
|
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ Cursor / Windsurf use the same commands with a `/` prefix: `/capture`, `/task`,
|
|
|
201
201
|
| `prjct status <value>` | Inline status change on the active task (`done`, `paused`, `active`, …). |
|
|
202
202
|
| `prjct tag <k:v>` | Tag the active task (`type:bug`, `domain:auth`, …). |
|
|
203
203
|
| `prjct remember <type> "<content>"` | Persist a memory entry (decision, learning, gotcha, …). |
|
|
204
|
-
| `prjct embeddings <set\|status\|test\|clear>` | Configure the global BYOT embeddings provider (one secure key, all projects
|
|
204
|
+
| `prjct embeddings <set\|status\|test\|clear>` | Configure the global BYOT embeddings provider — any OpenAI-compatible API (OpenAI, OpenRouter, Ollama, Azure, …), one secure key, all projects. |
|
|
205
205
|
| `prjct ship [name]` | Run the project's ship workflow (commit, push, PR, persist). |
|
|
206
206
|
| `prjct sync` | Re-index files, git co-change, imports; refresh project analysis. |
|
|
207
207
|
| `prjct regen` | Full rebuild of the Obsidian vault snapshot from SQLite. |
|
|
@@ -282,7 +282,7 @@ prjct hooks <install|uninstall|status> Git hooks for auto-sync
|
|
|
282
282
|
prjct context <memory|learnings|wiki> Recall memory / sync the vault
|
|
283
283
|
prjct review-risk Advisory change-size + delivery-geometry hint (read-only)
|
|
284
284
|
prjct workflow ["config"] Configure hooks via natural language
|
|
285
|
-
prjct stop / restart Background daemon control
|
|
285
|
+
prjct stop / restart Background daemon control (self-reloads on stale code; manual restart rarely needed)
|
|
286
286
|
prjct login / logout / auth Cloud sync authentication
|
|
287
287
|
prjct update Update CLI system-wide (alias: prjct upgrade)
|
|
288
288
|
prjct --version / --help
|
|
@@ -310,15 +310,44 @@ Memory is FTS5-backed (SQLite) and persona-filtered. Recall blends three signals
|
|
|
310
310
|
|
|
311
311
|
On by default for **every** project — no setup, no key, no native dependency. A built-in pure-JS embedder (feature-hashed character n-grams) vectorizes memory into SQLite so recall catches morphological / cross-vocabulary matches BM25 misses (`auth`≈`authentication`).
|
|
312
312
|
|
|
313
|
-
Want higher quality? Bring your own key once, globally
|
|
313
|
+
Want higher quality? Bring your own key once, globally — **just paste the key, the provider is auto-detected from its prefix:**
|
|
314
314
|
|
|
315
315
|
```bash
|
|
316
|
-
prjct embeddings set --key sk-...
|
|
317
|
-
prjct embeddings
|
|
318
|
-
prjct embeddings
|
|
316
|
+
prjct embeddings set --key sk-or-v1-... # → OpenRouter (auto-detected)
|
|
317
|
+
prjct embeddings set --key sk-... # → OpenAI (auto-detected)
|
|
318
|
+
prjct embeddings test # validate connectivity (full error + hint on failure)
|
|
319
|
+
prjct embeddings status # show provider, model, base URL + key location
|
|
320
|
+
prjct embeddings clear # forget the key AND settings (falls back to local)
|
|
319
321
|
```
|
|
320
322
|
|
|
321
|
-
One key applies to every project
|
|
323
|
+
One key applies to every project. **Any OpenAI-compatible `/embeddings` provider works.** For providers without a recognizable key prefix (or a custom/self-hosted endpoint), point `--base-url` at its root:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Ollama (local, no key) / LM Studio / Together / Mistral / Voyage / Jina / DeepInfra …
|
|
327
|
+
prjct embeddings set --model nomic-embed-text --base-url http://localhost:11434/v1
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
`set` is partial-update friendly — `set --key …` keeps your existing model and base URL; `set --model …` keeps your key. An explicit `--base-url` always overrides auto-detection.
|
|
331
|
+
|
|
332
|
+
Providers that don't use `Authorization: Bearer` are supported too via auth flags — e.g. **Azure OpenAI** (`api-key` header + `api-version` query):
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
prjct embeddings set --key "$AZURE_KEY" \
|
|
336
|
+
--base-url https://RESOURCE.openai.azure.com/openai/deployments/DEPLOYMENT \
|
|
337
|
+
--auth-header api-key --auth-scheme none --query "api-version=2023-05-15"
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
| Flag | Purpose |
|
|
341
|
+
| --- | --- |
|
|
342
|
+
| `--key <k>` | API key — stored in the Keychain (else a 0600 file), never in config |
|
|
343
|
+
| `--base-url <u>` | Provider's OpenAI-compatible root (default `https://api.openai.com/v1`) |
|
|
344
|
+
| `--model <m>` | Model id (default `text-embedding-3-small`) |
|
|
345
|
+
| `--auth-header <h>` | Header carrying the key (default `authorization`; `api-key` for Azure) |
|
|
346
|
+
| `--auth-scheme <s\|none>` | Prefix before the key (default `Bearer`; `none` = raw key) |
|
|
347
|
+
| `--headers "k=v,k2=v2"` | Extra static headers (gateways, attribution) |
|
|
348
|
+
| `--query <qs>` | Raw query string appended to the URL (e.g. `api-version=2023-05-15`) |
|
|
349
|
+
|
|
350
|
+
Without a key the built-in local embedder is used. Vector dimensionality is detected from the provider's response (no hardcoded size). Each project re-vectorizes on its next session.
|
|
322
351
|
|
|
323
352
|
### Drop files into the vault (bidirectional)
|
|
324
353
|
|