fix: remove one machine's addresses and paths from the shipped defaults
The plugin was developed against an Ollama on a private LAN address, and that address had reached places that ship: - the `config` parameter description the MODEL reads on every request; - the commented example in `cordis.patch.yml`, the layer every profile applies; - `scripts/smoke.mjs` and `scripts/measure.mjs` endpoint defaults; - both measure scripts' default workspace, which was an absolute local path and named a private repository; - README examples and test fixtures. All of them now use `http://127.0.0.1:11434`, which is Ollama's documented default and belongs to no particular machine — kept rather than emptied because `validateSettings` requires an http(s) URL, so an empty default would turn every call into INVALID_SETTINGS until someone configured it. Test fixtures use 192.0.2.10 instead: TEST-NET-1 is reserved for documentation and cannot point at a host anybody runs. The `focus` and `config` examples are generic, and the workspace defaults are the working directory. Two script bugs surfaced once the defaults stopped pointing at a live box, and are fixed here. `measure.mjs` built its own configuration literal, which was ten fields short of the schema — harmless while nothing validated it, and a refused call the moment `execute` began checking the section it was handed; it now resolves its configuration through the plugin's own `Config`, so it cannot drift again. It also crashed on a failed search (`first.index.scanned` of a result that has no index) instead of reporting the endpoint it could not reach, which is now the ordinary case. `scope-measure.mjs` divided by a scope that does not exist in any workspace without focus markers, and now says so. Also corrects `cordis.patch.yml`'s description of what the row registers: in 0.1.7 the exported `Config` is the settings registration, not a namespace on `ctx.settings`.
This commit is contained in:
1 parent
7261d46ee2
commit
a48e05585e
7 files changed
+93
-48
No files matched your search
@@ -62,7 +62,7 @@ a fact:
|
||||
- id: dsh-recall
|
||||
name: dsh-recall
|
||||
config:
|
||||
embeddingApiBase: http://10.50.1.2:11434
|
||||
embeddingApiBase: http://127.0.0.1:11434 # replace with your endpoint
|
||||
```
|
||||
|
||||
Or edit every setting from the UI: **Plugins → dsh-recall → Configure**. The
|
||||
@@ -92,7 +92,7 @@ document, so the value survives a restart and stays visible in
|
||||
Every value is also checkable from the tool, without touching a file:
|
||||
|
||||
```
|
||||
recall action=configure config={"embeddingApiBase":"http://10.50.1.2:11434"}
|
||||
recall action=configure config={"embeddingApiBase":"http://127.0.0.1:11434"}
|
||||
```
|
||||
|
||||
The API key is declared `role('secret')`, so it is stripped from every settings
|
||||
@@ -391,11 +391,17 @@ would publish.
|
||||
## Development
|
||||
|
||||
```sh
|
||||
npm test # 91 tests, no network required
|
||||
npm test # the whole suite; no network required
|
||||
node scripts/smoke.mjs [workspace] [query] # live retrieval check
|
||||
node scripts/measure.mjs [workspace] [query] [budgetMs]
|
||||
```
|
||||
|
||||
Both live scripts default to the endpoint the schema defaults to
|
||||
(`http://127.0.0.1:11434`) and to a model `ollama pull` can fetch, so they need
|
||||
no configuration on a local Ollama. Point them at another host with
|
||||
`RECALL_API_BASE` and `RECALL_MODEL`; `[workspace]` defaults to the working
|
||||
directory.
|
||||
|
||||
The `lib/` tests run anywhere. `test/config.test.js` and `test/plugin.test.js`
|
||||
import `index.js`, which imports `@deepseek-ai/dsh-tools` and
|
||||
`@deepseek-ai/schemastery` — resolvable once the plugin is installed into a
|
||||
|
||||
Reference in new issue
Block a user