mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-04 22:49:41 +02:00
feat(docker): take run-mode availability from the container
The run-mode dropdown hides CLIs that are not installed on the HOST (#201). That is right for local sessions and wrong for a container case, whose agents run inside the container: a host with no claude installed hides the mode while the container ships one, which is exactly what happened on a real deployment. The adoption preflight already probes what the container has, so that result is persisted on the case and surfaced through CaseInfo. Docker cases gate on it; every other case keeps the host probe unchanged. An absent list reads as "do not gate" rather than "nothing available": an owned container runs our base image, which ships every CLI, and treating unknown as empty would leave the menu with Shell alone.
This commit is contained in:
@@ -167,6 +167,13 @@ export interface CaseInfo {
|
||||
image?: string;
|
||||
path: string;
|
||||
network?: string;
|
||||
/**
|
||||
* CLIs available INSIDE the container. A container case runs its agents in
|
||||
* the container, so HOST CLI availability says nothing about what it can
|
||||
* run. Absent = unknown (an owned container runs our base image, which ships
|
||||
* every CLI), which the UI reads as "do not gate".
|
||||
*/
|
||||
availableModes?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -261,6 +261,15 @@ export interface DockerCase {
|
||||
* all created by us).
|
||||
*/
|
||||
owned?: boolean;
|
||||
/**
|
||||
* CLIs found INSIDE the container by the adoption preflight. A container case
|
||||
* runs its agents in the container, so host CLI availability says nothing about
|
||||
* what this case can run — the base image ships every CLI, and an adopted
|
||||
* container ships whatever its owner installed. Absent = unknown (owned cases,
|
||||
* or a case linked before this field existed), which callers read as "do not
|
||||
* gate".
|
||||
*/
|
||||
availableModes?: SessionMode[];
|
||||
/** Last captured Claude conversation id, replayed via --resume on a fresh launch. */
|
||||
lastClaudeSessionId?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user