fix(triage): review round: the host writes claude-code's bundle and sets its MOSAIC_ names, so a real harness answers; pi is refused as incompatible; proxy.json is read at each admit; a persistent marker makes the start after an unknown end fresh across a restart; the session key and key-shaped strings are removed from Triage lines (#1873, lane triage-wiring)

This commit is contained in:
jason.woltje committed 2026-11-18 16:01:12 -06:00
1 parent 255c1575bb
commit c28ca57af6
6 files changed
+361 -45

No files matched your search

+5 -1
View File
@@ -36,6 +36,7 @@ import { reviveBuses } from './bus-revive.mjs';
import { createProxyAdmin, orgCatalogue } from './proxy-admin.mjs';
import { createTriageHost } from './triage-host.mjs';
import { createTriageRoute, triageTokenPattern } from './triage-route.mjs';
import { loadProxy } from '../../model-proxy/src/settings.mjs';
import { composeSnapshot, readSystemConfig, readOrgConfig } from './triage-snapshot.mjs';
import { busesStopped } from '../../cli/src/proxy-admin-host.mjs';
import { agentLevelsWriteRoutes } from './agent-levels-write.mjs';
@@ -237,7 +238,10 @@ try {
// #1873 triage-wiring: the route is resolved at each admit from the route store, the key file, each
// active organization's model catalogue (its bus `routes` verb, as proxy setup reads it) and the
// harness module (triage-route.mjs). The host's fences hold the proxy port and the key's shape.
const triageProxyPort = Number.isInteger(system?.proxy?.port) ? system.proxy.port : null;
// The port is read from proxy.json at each admit, so a proxy set up after the Console started counts.
const triageProxyPort = () => {
try { const p = loadProxy(configDir(), system.dataRoot)?.port; return Number.isInteger(p) ? p : null; } catch { return null; }
};
const triageRoute = system && (devOwner || ssoOn) ? createTriageRoute({
dataRoot: system.dataRoot, configDir: configDir(), proxyPort: triageProxyPort,
catalogues: async () => {