mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-23 22:29:33 +01:00
feat(local-model): the coding agent is chosen per session, with Pi and DeepSeek Harness
An installed model knew one coding agent: the one it was installed with.
The launch check never asked about the agent, only about the endpoint
and the model, so nothing stopped a second one. What was missing is the
list, and a way to get an agent that is not on the Mac yet.
The install view gains `harnesses`: every catalogue harness the model in
use can be run with, each with how it stands (`ready`, `installable`,
`installing`, `setup-needed`), the literal install command, a readiness
mark for scripts, and the actions the server accepts for it. `cli` stays
the default agent, and names one that can be started whenever one can,
so a client that reads only `cli` never starts an agent that is gone.
`POST /api/local-model/agent { cli }` installs one more agent beside an
installed model. It is not a job and not an event of the reducer: the
state stays `installed` whatever the installer does, so a failed npm
install never blocks a session on a model that works. Same install slot
and same compiled stock command as the `agent` step, one at a time, the
outcome in memory only.
The catalogue:
- `pi` is no longer gated. Its two open questions were answered by a run
against a real model (the `name:tag` id reaches the runtime unchanged;
its first request is 2,096 tokens), and Codeman now passes it the
window. Its minimum is 65536 like the others: nothing below was run,
and no model row offers less, so no Mac's pick changes.
- `deepseek` is new. It is a launcher: its install command leaves it
with nothing to launch, so it is never reported installable (read off
`discovery.launcherProfile`, not the id) and a Mac is offered it only
where it was already set up. Its tool round trip was seen on a
scripted endpoint only; the header says how to gate it again.
- a row may carry `readyMark`; `opencode` has the measured one.
A switch no longer refuses for the agent a model was checked with when
another agent that can run it is on the Mac.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
a5a1b6f9a2
commit
d22bfaaaaf
14 files changed
+1089
-71
No files matched your search
@@ -207,6 +207,15 @@ export interface LocalHarnessEntry {
|
||||
gated?: boolean;
|
||||
/** True: the first answer takes minutes, because the harness sends a very large fixed prompt. */
|
||||
slowFirstTurn?: boolean;
|
||||
/**
|
||||
* A literal with no white space that this harness's composer draws once it takes input, and
|
||||
* nothing before it does: what a script waits for before it sends the first prompt
|
||||
* (`GET /api/sessions/:id/wait-output`). Only a mark that was MEASURED on a session started
|
||||
* on a custom model goes here. Absent: the CLI registry's own
|
||||
* `capabilities.composerReadyMark` is used when it declares one, and a harness with neither
|
||||
* has no mark.
|
||||
*/
|
||||
readyMark?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,9 +257,18 @@ export interface HarnessFact {
|
||||
cli: string;
|
||||
/** The registry's display label ('OpenCode'). */
|
||||
label: string;
|
||||
/** The CLI's binary was found on this machine. */
|
||||
/**
|
||||
* The CLI can be started on this machine: the same answer the Run menu gets. For a launcher
|
||||
* that starts nothing by itself (`discovery.launcherProfile` in the CLI registry) that is its
|
||||
* binary AND something for it to launch.
|
||||
*/
|
||||
installed: boolean;
|
||||
/** Not installed, but the registry has an install command for this platform that needs no administrator rights. */
|
||||
/**
|
||||
* Not installed, but ONE command makes it startable: the registry has an install command for
|
||||
* this platform that needs no administrator rights, and the CLI is not a launcher. A launcher
|
||||
* needs a second install the command does not make (a profile, which is third-party code
|
||||
* with a consent of its own), so it is never installable from here.
|
||||
*/
|
||||
installable: boolean;
|
||||
/**
|
||||
* The literal install command the install job would run for this CLI: the STOCK
|
||||
@@ -259,6 +277,8 @@ export interface HarnessFact {
|
||||
* (`CandidateHarness.installCommand`).
|
||||
*/
|
||||
installCommand?: string;
|
||||
/** The registry's `capabilities.composerReadyMark`, when the CLI declares one and it holds no white space. */
|
||||
readyMark?: string;
|
||||
/** Whether this CLI can be launched with that model id (its command-line pattern accepts it). */
|
||||
acceptsModelId: (modelId: string) => boolean;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user