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
@@ -32,10 +32,11 @@
|
||||
* warm-up is available as an explicit background action.
|
||||
*
|
||||
* **Why the endpoint is configuration and not a constant.** The Ollama default
|
||||
* of `127.0.0.1:11434` is a convention, not a fact — this deployment runs Ollama
|
||||
* on another host. Baking one machine's address into a bundle layer that other
|
||||
* machines apply is exactly the mistake the composition docs warn about, so the
|
||||
* endpoint is a schema default the profile can override, at rest or live.
|
||||
* of `127.0.0.1:11434` is a convention, not a fact — a deployment often runs
|
||||
* Ollama on another host. Baking one machine's address into a bundle layer that
|
||||
* other machines apply is exactly the mistake the composition docs warn about,
|
||||
* so the endpoint is a schema default the profile can override, at rest or
|
||||
* live.
|
||||
*/
|
||||
|
||||
import { readFile, stat } from 'node:fs/promises'
|
||||
@@ -965,7 +966,7 @@ export function apply(ctx, config) {
|
||||
type: 'string',
|
||||
description:
|
||||
'Scope this whole call — index and search — to one workspace-relative directory, for example ' +
|
||||
'"src/controllers/room/occupancy". Use it when the session is working on one module: the index ' +
|
||||
'"src/services/billing". Use it when the session is working on one module: the index ' +
|
||||
'then holds only that module, so its near-identical neighbours cannot outrank it and the first ' +
|
||||
'search does not wait on the rest of the repository. Empty uses the configured focus, then the ' +
|
||||
'nearest enclosing directory that carries a CONTROLLER.md, DEBUG_UI.md or AGENTS.md.',
|
||||
@@ -980,7 +981,7 @@ export function apply(ctx, config) {
|
||||
type: 'json',
|
||||
description:
|
||||
'Settings patch for action "configure", using this plugin\'s own camelCase field names, for ' +
|
||||
'example {"embeddingApiBase":"http://10.50.1.2:11434"}.',
|
||||
'example {"embeddingApiBase":"http://127.0.0.1:11434"}.',
|
||||
},
|
||||
},
|
||||
output: {
|
||||
|
||||
Reference in new issue
Block a user