@jmanuelcorral/openteam 0.17.3 → 0.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +2 -2
- package/README.md +2 -2
- package/dist/certificates/graph-release-certificate.json +2 -2
- package/dist/certificates/graph-shadow-certificate.json +2 -2
- package/dist/cli.js +101 -18
- package/dist/commands/doctor.d.ts +20 -8
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/graph/schema.d.ts +58 -0
- package/dist/graph/schema.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +183 -21
- package/dist/local/lemonade.d.ts.map +1 -1
- package/dist/local/registry.d.ts +14 -0
- package/dist/local/registry.d.ts.map +1 -1
- package/dist/local/slotPool.d.ts +21 -0
- package/dist/local/slotPool.d.ts.map +1 -1
- package/dist/orchestrator/coordinator.d.ts +13 -0
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/plugin/orchestrateTool.d.ts +55 -0
- package/dist/plugin/orchestrateTool.d.ts.map +1 -1
- package/dist/telemetry/graphProjection.d.ts +2 -1
- package/dist/telemetry/graphProjection.d.ts.map +1 -1
- package/dist/telemetry/graphView.d.ts +3 -1
- package/dist/telemetry/graphView.d.ts.map +1 -1
- package/package.json +1 -1
package/README.es.md
CHANGED
|
@@ -373,7 +373,7 @@ ejecutas desde un subdirectorio verás "provider not configured" y debes hacer
|
|
|
373
373
|
| `local.runtimes[].discovery` | `"cli" \| "sdk" \| "manual"` opcional | sin default por item | Discovery de Foundry Local; el registry usa CLI si está configurado y no es `manual`. |
|
|
374
374
|
| `local.runtimes[].defaultModel` | `ModelRef` | requerido | Modelo por defecto de ese runtime. |
|
|
375
375
|
| `local.runtimes[].maxConcurrency` | entero positivo opcional | `4` | Límite de generaciones concurrentes de esta instancia (su número real de slots). Se aplica por instancia. |
|
|
376
|
-
| `local.runtimes[].modelConcurrency` | `Record<modelID, entero positivo>` opcional | ninguno | Slots por modelo, porque los slots pertenecen al modelo cargado y no al servidor: un mismo host Lemonade puede servir un modelo con `--parallel 3` y otro con `--parallel 1` a la vez. Cada modelo declarado obtiene su propia cola; el resto comparte el pool de `maxConcurrency` de la instancia. `openteam setup`
|
|
376
|
+
| `local.runtimes[].modelConcurrency` | `Record<modelID, entero positivo>` opcional | ninguno | Slots por modelo, porque los slots pertenecen al modelo cargado y no al servidor: un mismo host Lemonade puede servir un modelo con `--parallel 3` y otro con `--parallel 1` a la vez. Cada modelo declarado obtiene su propia cola; el resto comparte el pool de `maxConcurrency` de la instancia. Cuando se deja sin definir, openteam autodetecta los slots de cada modelo desde el sondeo de salud en vivo del runtime en el momento del despacho y los aplica hasta que declares los tuyos (la config explícita siempre gana); `openteam setup` escribe el mapa para que el reparto sobreviva a los reinicios. |
|
|
377
377
|
| `budgets.sessionUSD` | `number` positivo opcional | sin límite | Presupuesto frontier por sesión. |
|
|
378
378
|
| `budgets.monthlyUSD` | `number` positivo opcional | sin límite | Presupuesto frontier mensual. |
|
|
379
379
|
| `budgets.frontierTokensPerSession` | `number` entero positivo opcional | sin límite | Límite de tokens frontier por sesión. |
|
|
@@ -825,7 +825,7 @@ Consulta [docs/compatibility.md](docs/compatibility.md). Resumen verificado el `
|
|
|
825
825
|
|
|
826
826
|
| Superficie | Versión / contrato |
|
|
827
827
|
| --- | --- |
|
|
828
|
-
| openteam | `0.17.
|
|
828
|
+
| openteam | `0.17.5`; versión actual del paquete |
|
|
829
829
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
830
830
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
831
831
|
| Hook de routing | `chat.message`; no `chat.params` para cambiar modelo |
|
package/README.md
CHANGED
|
@@ -325,7 +325,7 @@ configured" and should `cd` to the project root first.
|
|
|
325
325
|
| `local.runtimes[].discovery` | `"cli" \| "sdk" \| "manual"` optional | none per item | Foundry Local discovery; the registry uses CLI when configured and not `manual`. |
|
|
326
326
|
| `local.runtimes[].defaultModel` | `ModelRef` | required | Default model for that runtime. |
|
|
327
327
|
| `local.runtimes[].maxConcurrency` | positive integer, optional | `4` | Concurrent-generation cap for this instance (its real slot count). Applied per instance. |
|
|
328
|
-
| `local.runtimes[].modelConcurrency` | `Record<modelID, positive integer>`, optional | none | Per-model slot counts, because slots belong to the loaded model rather than to the server: a single Lemonade host can serve one model at `--parallel 3` and another at `--parallel 1` simultaneously. Each declared model gets its own queue; every other model shares the instance-wide `maxConcurrency` pool.
|
|
328
|
+
| `local.runtimes[].modelConcurrency` | `Record<modelID, positive integer>`, optional | none | Per-model slot counts, because slots belong to the loaded model rather than to the server: a single Lemonade host can serve one model at `--parallel 3` and another at `--parallel 1` simultaneously. Each declared model gets its own queue; every other model shares the instance-wide `maxConcurrency` pool. When left unset, openteam auto-detects each model's slots from the runtime's live health probe at dispatch time and applies them until you declare your own (explicit config always wins); `openteam setup` writes the map so the split survives restarts. |
|
|
329
329
|
| `budgets.sessionUSD` | positive number, optional | unlimited | Frontier budget per session. |
|
|
330
330
|
| `budgets.monthlyUSD` | positive number, optional | unlimited | Monthly frontier budget. |
|
|
331
331
|
| `budgets.frontierTokensPerSession` | positive integer, optional | unlimited | Frontier token limit per session. |
|
|
@@ -714,7 +714,7 @@ See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026
|
|
|
714
714
|
|
|
715
715
|
| Surface | Version / contract |
|
|
716
716
|
| --- | --- |
|
|
717
|
-
| openteam | `0.17.
|
|
717
|
+
| openteam | `0.17.5`; current package version |
|
|
718
718
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
719
719
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
720
720
|
| Routing hook | `chat.message`; not `chat.params` for model changes |
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"idempotent": true
|
|
35
35
|
},
|
|
36
36
|
"performance": {
|
|
37
|
-
"p95Millis": 0.
|
|
37
|
+
"p95Millis": 0.4464980000000196,
|
|
38
38
|
"budgetMillis": 50,
|
|
39
39
|
"samples": 100
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"verdict": "pass",
|
|
43
43
|
"failedGates": [],
|
|
44
|
-
"digest": "
|
|
44
|
+
"digest": "8c41d9fefa8b2edf934855dba6394316899e5763692228c7674aa8ec4ed52a65"
|
|
45
45
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"rawFindings": 0
|
|
21
21
|
},
|
|
22
22
|
"overhead": {
|
|
23
|
-
"p95Millis": 0.
|
|
23
|
+
"p95Millis": 0.3133890000000008,
|
|
24
24
|
"budgetMillis": 25,
|
|
25
25
|
"samples": 1000
|
|
26
26
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
},
|
|
36
36
|
"verdict": "pass",
|
|
37
37
|
"failedGates": [],
|
|
38
|
-
"digest": "
|
|
38
|
+
"digest": "0d876024acfb42c9984626e6d726a964cb24929e0a32045d39d16a7a60bd7a21"
|
|
39
39
|
}
|
package/dist/cli.js
CHANGED
|
@@ -692,6 +692,15 @@ function slotPoolKey(runtime, modelID) {
|
|
|
692
692
|
const declared = runtime.modelConcurrency?.[modelID];
|
|
693
693
|
return declared === undefined ? runtime.id : `${runtime.id}${POOL_SEPARATOR}${modelID}`;
|
|
694
694
|
}
|
|
695
|
+
function withReportedModelSlots(runtime, reported) {
|
|
696
|
+
if (reported === undefined || Object.keys(reported).length === 0) {
|
|
697
|
+
return runtime;
|
|
698
|
+
}
|
|
699
|
+
return {
|
|
700
|
+
...runtime,
|
|
701
|
+
modelConcurrency: { ...reported, ...runtime.modelConcurrency }
|
|
702
|
+
};
|
|
703
|
+
}
|
|
695
704
|
|
|
696
705
|
// src/capabilities/budget.ts
|
|
697
706
|
var WARNING_UTILIZATION = 0.8;
|
|
@@ -2309,7 +2318,8 @@ async function runRoleTaskWithCorrelation(input, deps, correlation, batch) {
|
|
|
2309
2318
|
if (runtimeId !== undefined && deps.runtimeLimiter !== undefined) {
|
|
2310
2319
|
const limiter = deps.runtimeLimiter;
|
|
2311
2320
|
const priority = priorityForRole(role);
|
|
2312
|
-
const
|
|
2321
|
+
const dispatchRuntime = configuredRuntime(runtimeId, input.config) ?? { id: runtimeId };
|
|
2322
|
+
const poolKey = slotPoolKey(withReportedModelSlots(dispatchRuntime, deps.reportedModelSlots?.(runtimeId)), decision2.selected.modelID);
|
|
2313
2323
|
release = limiter.tryAcquire(poolKey, priority);
|
|
2314
2324
|
let waitedMs = 0;
|
|
2315
2325
|
if (release === undefined) {
|
|
@@ -6729,13 +6739,28 @@ var NodeSucceededEventSchema = z11.object({
|
|
|
6729
6739
|
attemptID: AttemptIDSchema,
|
|
6730
6740
|
artifact: ContextRefSchema
|
|
6731
6741
|
}).strict();
|
|
6742
|
+
var NodeFailureClassSchema = z11.enum([
|
|
6743
|
+
"create-rejected",
|
|
6744
|
+
"create-no-id",
|
|
6745
|
+
"prompt-rejected",
|
|
6746
|
+
"prompt-timeout",
|
|
6747
|
+
"prompt-rate-limited",
|
|
6748
|
+
"prompt-auth",
|
|
6749
|
+
"prompt-content-filter",
|
|
6750
|
+
"prompt-context-length",
|
|
6751
|
+
"prompt-validation",
|
|
6752
|
+
"prompt-connection",
|
|
6753
|
+
"prompt-server",
|
|
6754
|
+
"unknown"
|
|
6755
|
+
]);
|
|
6732
6756
|
var NodeFailedEventSchema = z11.object({
|
|
6733
6757
|
...eventEnvelope,
|
|
6734
6758
|
type: z11.literal("node.failed"),
|
|
6735
6759
|
nodeID: NodeIDSchema,
|
|
6736
6760
|
operationID: OperationIDSchema,
|
|
6737
6761
|
attemptID: AttemptIDSchema,
|
|
6738
|
-
errorClass: ErrorClassSchema
|
|
6762
|
+
errorClass: ErrorClassSchema,
|
|
6763
|
+
failureClass: NodeFailureClassSchema.optional()
|
|
6739
6764
|
}).strict();
|
|
6740
6765
|
var NodeCancelledEventSchema = z11.object({
|
|
6741
6766
|
...eventEnvelope,
|
|
@@ -7062,6 +7087,7 @@ function projectGraphEvent(event) {
|
|
|
7062
7087
|
..."operationID" in event ? { operationID: event.operationID } : {},
|
|
7063
7088
|
..."attemptID" in event ? { attemptID: event.attemptID } : {},
|
|
7064
7089
|
..."errorClass" in event ? { errorClass: event.errorClass } : {},
|
|
7090
|
+
..."failureClass" in event && event.failureClass !== undefined ? { failureClass: event.failureClass } : {},
|
|
7065
7091
|
..."specDigest" in event ? { specDigest: event.specDigest } : {},
|
|
7066
7092
|
..."artifact" in event ? { artifact: redactedRef(event.artifact) } : {}
|
|
7067
7093
|
};
|
|
@@ -7155,6 +7181,7 @@ function deriveVerdict(status) {
|
|
|
7155
7181
|
}
|
|
7156
7182
|
function indexTelemetry(telemetry) {
|
|
7157
7183
|
const lastError = new Map;
|
|
7184
|
+
const lastFailure = new Map;
|
|
7158
7185
|
const lastArtifact = new Map;
|
|
7159
7186
|
for (const record of telemetry) {
|
|
7160
7187
|
if (record.nodeID === undefined) {
|
|
@@ -7163,17 +7190,21 @@ function indexTelemetry(telemetry) {
|
|
|
7163
7190
|
if (record.type === "node.failed" && record.errorClass !== undefined) {
|
|
7164
7191
|
lastError.set(record.nodeID, record.errorClass);
|
|
7165
7192
|
}
|
|
7193
|
+
if (record.type === "node.failed" && record.failureClass !== undefined) {
|
|
7194
|
+
lastFailure.set(record.nodeID, record.failureClass);
|
|
7195
|
+
}
|
|
7166
7196
|
if (record.type === "node.succeeded" && record.artifact !== undefined) {
|
|
7167
7197
|
lastArtifact.set(record.nodeID, record.artifact);
|
|
7168
7198
|
}
|
|
7169
7199
|
}
|
|
7170
|
-
return { lastError, lastArtifact };
|
|
7200
|
+
return { lastError, lastFailure, lastArtifact };
|
|
7171
7201
|
}
|
|
7172
|
-
function buildNodeView(node, input, lastError, lastArtifact) {
|
|
7202
|
+
function buildNodeView(node, input, lastError, lastFailure, lastArtifact) {
|
|
7173
7203
|
const runtime = input.state.nodes[node.id];
|
|
7174
7204
|
const status = runtime?.status ?? "pending";
|
|
7175
7205
|
const attempts = runtime?.attempts ?? 0;
|
|
7176
7206
|
const errorClass = lastError.get(node.id);
|
|
7207
|
+
const failureClass = lastFailure.get(node.id);
|
|
7177
7208
|
const artifact = lastArtifact.get(node.id);
|
|
7178
7209
|
const sessionRef = input.sessions?.[node.id];
|
|
7179
7210
|
const review = node.role === "reviewer" && node.reviews !== undefined ? { verdict: deriveVerdict(status), reassigned: attempts > 1 } : undefined;
|
|
@@ -7183,6 +7214,7 @@ function buildNodeView(node, input, lastError, lastArtifact) {
|
|
|
7183
7214
|
state: toViewState(node, status, input.state),
|
|
7184
7215
|
attempts,
|
|
7185
7216
|
...errorClass !== undefined ? { lastErrorClass: errorClass } : {},
|
|
7217
|
+
...failureClass !== undefined ? { lastFailureClass: failureClass } : {},
|
|
7186
7218
|
...review !== undefined ? { review } : {},
|
|
7187
7219
|
...node.reviews !== undefined ? { revisionOf: node.reviews } : {},
|
|
7188
7220
|
...artifact !== undefined ? { artifact } : {},
|
|
@@ -7193,8 +7225,8 @@ function buildEdges(spec) {
|
|
|
7193
7225
|
return spec.nodes.flatMap((node) => node.dependsOn.map((from) => ({ from, to: node.id })));
|
|
7194
7226
|
}
|
|
7195
7227
|
function buildGraphView(input) {
|
|
7196
|
-
const { lastError, lastArtifact } = indexTelemetry(input.telemetry);
|
|
7197
|
-
const nodes = input.spec.nodes.map((node) => buildNodeView(node, input, lastError, lastArtifact));
|
|
7228
|
+
const { lastError, lastFailure, lastArtifact } = indexTelemetry(input.telemetry);
|
|
7229
|
+
const nodes = input.spec.nodes.map((node) => buildNodeView(node, input, lastError, lastFailure, lastArtifact));
|
|
7198
7230
|
const projection = {
|
|
7199
7231
|
version: 1,
|
|
7200
7232
|
runID: input.spec.runID,
|
|
@@ -10054,6 +10086,8 @@ var NON_TEXT_LABELS = new Set([
|
|
|
10054
10086
|
"reranking"
|
|
10055
10087
|
]);
|
|
10056
10088
|
var PARALLEL_ARG = /(?:^|\s)(?:--parallel|-np)[\s=]+(\d+)(?!\d)/;
|
|
10089
|
+
var PARALLEL_FLAGS = new Set(["--parallel", "-np"]);
|
|
10090
|
+
var PARALLEL_FUSED = /^(?:--parallel|-np)=(\d+)$/;
|
|
10057
10091
|
function createLemonadeAdapter() {
|
|
10058
10092
|
const listModels = async (options) => {
|
|
10059
10093
|
const baseURL = normalizeBaseURL(options.baseURL ?? LEMONADE_DEFAULT_BASE_URL);
|
|
@@ -10154,15 +10188,49 @@ async function readLoadedModels(baseURL, fetch2) {
|
|
|
10154
10188
|
return loaded;
|
|
10155
10189
|
}
|
|
10156
10190
|
function readSlotCount(entry) {
|
|
10191
|
+
return slotsFromLlamacppArgs(entry) ?? slotsFromLaunchCommand(entry);
|
|
10192
|
+
}
|
|
10193
|
+
function slotsFromLlamacppArgs(entry) {
|
|
10157
10194
|
const options = entry.recipe_options;
|
|
10158
10195
|
if (!isObject3(options) || typeof options.llamacpp_args !== "string") {
|
|
10159
10196
|
return;
|
|
10160
10197
|
}
|
|
10161
10198
|
const match = PARALLEL_ARG.exec(options.llamacpp_args);
|
|
10162
|
-
|
|
10199
|
+
return match === null ? undefined : positiveSlotCount(match[1]);
|
|
10200
|
+
}
|
|
10201
|
+
function slotsFromLaunchCommand(entry) {
|
|
10202
|
+
const argv = entry.launch_command;
|
|
10203
|
+
if (!Array.isArray(argv)) {
|
|
10163
10204
|
return;
|
|
10164
10205
|
}
|
|
10165
|
-
|
|
10206
|
+
for (let index = 0;index < argv.length; index += 1) {
|
|
10207
|
+
const token = argv[index];
|
|
10208
|
+
if (typeof token !== "string") {
|
|
10209
|
+
continue;
|
|
10210
|
+
}
|
|
10211
|
+
const fused = PARALLEL_FUSED.exec(token);
|
|
10212
|
+
if (fused !== null) {
|
|
10213
|
+
const slots = positiveSlotCount(fused[1]);
|
|
10214
|
+
if (slots !== undefined) {
|
|
10215
|
+
return slots;
|
|
10216
|
+
}
|
|
10217
|
+
continue;
|
|
10218
|
+
}
|
|
10219
|
+
if (PARALLEL_FLAGS.has(token)) {
|
|
10220
|
+
const next = argv[index + 1];
|
|
10221
|
+
const slots = typeof next === "string" ? positiveSlotCount(next) : undefined;
|
|
10222
|
+
if (slots !== undefined) {
|
|
10223
|
+
return slots;
|
|
10224
|
+
}
|
|
10225
|
+
}
|
|
10226
|
+
}
|
|
10227
|
+
return;
|
|
10228
|
+
}
|
|
10229
|
+
function positiveSlotCount(raw) {
|
|
10230
|
+
if (raw === undefined || !/^\d+$/.test(raw)) {
|
|
10231
|
+
return;
|
|
10232
|
+
}
|
|
10233
|
+
const parsed = Number.parseInt(raw, 10);
|
|
10166
10234
|
return Number.isInteger(parsed) && parsed > 0 ? parsed : undefined;
|
|
10167
10235
|
}
|
|
10168
10236
|
function enrichWithLoadState(models, loaded) {
|
|
@@ -11193,13 +11261,27 @@ function runtimeLine(snapshot, runtime) {
|
|
|
11193
11261
|
const slots = declared === undefined ? ` · ${DEFAULT_LOCAL_MAX_CONCURRENCY} slot(s) (default)` : ` · ${declared} slot(s) (declared)`;
|
|
11194
11262
|
return ` ${mark} ${snapshot.id.padEnd(14)} ${snapshot.baseURL || "(no baseURL)"} — ${detail}${slots}`;
|
|
11195
11263
|
}
|
|
11196
|
-
function runtimeModelSlotsLine(runtime) {
|
|
11197
|
-
const
|
|
11198
|
-
if (
|
|
11199
|
-
|
|
11264
|
+
function runtimeModelSlotsLine(runtime, snapshot) {
|
|
11265
|
+
const declared = Object.entries(runtime?.modelConcurrency ?? {});
|
|
11266
|
+
if (declared.length > 0) {
|
|
11267
|
+
const detail = declared.map(([modelID, slots]) => `${modelID} ${slots} slot(s)`).join(" · ");
|
|
11268
|
+
return [` ↳ per-model slots: ${detail}`];
|
|
11269
|
+
}
|
|
11270
|
+
if (runtime === undefined || snapshot === undefined || !snapshot.reachable || snapshot.models.length === 0) {
|
|
11271
|
+
return [];
|
|
11200
11272
|
}
|
|
11201
|
-
const
|
|
11202
|
-
|
|
11273
|
+
const reported = snapshot.models.flatMap((model) => model.slots === undefined ? [] : [`${model.modelID} ${model.slots} slot(s)`]);
|
|
11274
|
+
if (reported.length > 0) {
|
|
11275
|
+
return [
|
|
11276
|
+
` ↳ per-model slots (detected from ${snapshot.id}, applied this run): ${reported.join(" · ")}`,
|
|
11277
|
+
" remedy: pin these under this runtime as `modelConcurrency` in .opencode/openteam.json so the split survives restarts and outranks detection."
|
|
11278
|
+
];
|
|
11279
|
+
}
|
|
11280
|
+
return [
|
|
11281
|
+
` ⚠ ${snapshot.id} is reachable and serving models but has no per-model slots declared`,
|
|
11282
|
+
" consequence: every model shares one runtime-wide pool sized to maxConcurrency, so a model the runtime serves at fewer parallel slots is over-dispatched and its extra requests queue invisibly inside the runtime where openteam cannot prioritise them.",
|
|
11283
|
+
' remedy: add "modelConcurrency": { "<modelID>": <slots> } to this runtime in .opencode/openteam.json (or re-run `openteam setup`, which detects the counts from the runtime), then re-run `openteam doctor`.'
|
|
11284
|
+
];
|
|
11203
11285
|
}
|
|
11204
11286
|
function isNetworkRuntime(baseURL) {
|
|
11205
11287
|
if (baseURL.length === 0) {
|
|
@@ -11456,9 +11538,9 @@ function renderDoctor(input) {
|
|
|
11456
11538
|
if (classLine !== undefined) {
|
|
11457
11539
|
lines.push(classLine);
|
|
11458
11540
|
}
|
|
11459
|
-
const modelSlots = runtimeModelSlotsLine(runtime);
|
|
11460
|
-
|
|
11461
|
-
lines.push(
|
|
11541
|
+
const modelSlots = runtimeModelSlotsLine(runtime, snapshot);
|
|
11542
|
+
for (const line of modelSlots) {
|
|
11543
|
+
lines.push(line);
|
|
11462
11544
|
}
|
|
11463
11545
|
}
|
|
11464
11546
|
}
|
|
@@ -16264,6 +16346,7 @@ async function recallMemory(deps, queryText, query) {
|
|
|
16264
16346
|
import { tool } from "@opencode-ai/plugin";
|
|
16265
16347
|
import { z as z22 } from "zod";
|
|
16266
16348
|
var _pluginWarnedRoles = new Set;
|
|
16349
|
+
var EMPTY_ROLE_ID_SET = new Set;
|
|
16267
16350
|
var RoleAssignmentSchema = z22.object({
|
|
16268
16351
|
roleID: z22.string().min(1).describe("Role identifier from the roster"),
|
|
16269
16352
|
prompt: z22.string().min(1).describe("Work prompt for this role"),
|
|
@@ -16467,7 +16550,7 @@ async function buildMemoryRuntimeFromConfig(config, deps, options = {}) {
|
|
|
16467
16550
|
// package.json
|
|
16468
16551
|
var package_default = {
|
|
16469
16552
|
name: "@jmanuelcorral/openteam",
|
|
16470
|
-
version: "0.17.
|
|
16553
|
+
version: "0.17.5",
|
|
16471
16554
|
packageManager: "bun@1.3.14",
|
|
16472
16555
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
16473
16556
|
license: "MIT",
|
|
@@ -137,16 +137,28 @@ export type DoctorRosterAudit = {
|
|
|
137
137
|
readonly unprofiledRoleEntries?: readonly DoctorRosterAuditEntry[];
|
|
138
138
|
};
|
|
139
139
|
/**
|
|
140
|
-
* Reports
|
|
140
|
+
* Reports a runtime's per-model slot split, and — the #217 fix — makes the
|
|
141
|
+
* previously SILENT case loud.
|
|
141
142
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
143
|
+
* Slots belong to the loaded model, not the server: a Lemonade host declaring 4
|
|
144
|
+
* server slots may serve its coder model at `--parallel 3` and its thinking
|
|
145
|
+
* model at `--parallel 1`, so roles routed to the thinking model serialise on a
|
|
146
|
+
* single slot. There are three outcomes:
|
|
147
|
+
*
|
|
148
|
+
* 1. The config DECLARES `modelConcurrency` → print the declared split, exactly
|
|
149
|
+
* as before.
|
|
150
|
+
* 2. The config declares none but the reachable runtime REPORTED slot counts
|
|
151
|
+
* over its API → print what was detected (openteam now applies it at
|
|
152
|
+
* runtime, #217) plus a remedy to pin it in config so it survives restarts
|
|
153
|
+
* and outranks detection.
|
|
154
|
+
* 3. The config declares none and a reachable runtime serving models reported
|
|
155
|
+
* none → warn, because this is exactly the over-dispatch config that used to
|
|
156
|
+
* print nothing at all, leaving the operator no signal.
|
|
157
|
+
*
|
|
158
|
+
* Returns an empty array (prints nothing) for an unreachable runtime or one
|
|
159
|
+
* serving no models, where there is nothing to substantiate. Pure.
|
|
148
160
|
*/
|
|
149
|
-
export declare function runtimeModelSlotsLine(runtime: LocalRuntime | undefined): string
|
|
161
|
+
export declare function runtimeModelSlotsLine(runtime: LocalRuntime | undefined, snapshot?: LocalRuntimeSnapshot): string[];
|
|
150
162
|
/**
|
|
151
163
|
* Doctor's view of local-runtime queue-wait telemetry (#144). Presence of this
|
|
152
164
|
* object means queue telemetry was consulted; `summary === undefined` means it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAK3D,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,WAAW,CAAC,EAAE,eAAe,CAA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AE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACxD,QAAQ,CAAC,wBAAwB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtD,QAAQ,CAAC,gCAAgC,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC9E,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACpE,CAAC;AAwDF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,YAAY,GAAG,SAAS,EACjC,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,MAAM,EAAE,CAoCV;AAyBD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AA+XF,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAiKvD"}
|
package/dist/graph/schema.d.ts
CHANGED
|
@@ -98,6 +98,36 @@ export declare const NodeSucceededEventSchema: z.ZodObject<{
|
|
|
98
98
|
mediaType: z.ZodOptional<z.ZodString>;
|
|
99
99
|
}, z.core.$strict>;
|
|
100
100
|
}, z.core.$strict>;
|
|
101
|
+
/**
|
|
102
|
+
* Bounded failure class carried by `node.failed` (#225).
|
|
103
|
+
*
|
|
104
|
+
* `errorClass` has only three values, and `permanent` alone covers seven
|
|
105
|
+
* distinct causes — measured on a live host, that made a real production
|
|
106
|
+
* failure undiagnosable from the journal alone. The precise class is already
|
|
107
|
+
* computed during shadow synthesis, so recording it is pure gain.
|
|
108
|
+
*
|
|
109
|
+
* Deliberately duplicated from `TelemetryFailureClassSchema` in
|
|
110
|
+
* `src/orchestrator/coordinator.ts`: `src/graph/**` must not import
|
|
111
|
+
* `src/orchestrator/**`. A contract test pins the two lists in sync.
|
|
112
|
+
*
|
|
113
|
+
* Privacy: a closed enum by construction, so no prompt text, URL or provider
|
|
114
|
+
* error string can ever be smuggled through this field.
|
|
115
|
+
*/
|
|
116
|
+
export declare const NodeFailureClassSchema: z.ZodEnum<{
|
|
117
|
+
"create-no-id": "create-no-id";
|
|
118
|
+
"create-rejected": "create-rejected";
|
|
119
|
+
"prompt-auth": "prompt-auth";
|
|
120
|
+
"prompt-connection": "prompt-connection";
|
|
121
|
+
"prompt-content-filter": "prompt-content-filter";
|
|
122
|
+
"prompt-context-length": "prompt-context-length";
|
|
123
|
+
"prompt-rate-limited": "prompt-rate-limited";
|
|
124
|
+
"prompt-rejected": "prompt-rejected";
|
|
125
|
+
"prompt-server": "prompt-server";
|
|
126
|
+
"prompt-timeout": "prompt-timeout";
|
|
127
|
+
"prompt-validation": "prompt-validation";
|
|
128
|
+
unknown: "unknown";
|
|
129
|
+
}>;
|
|
130
|
+
export type NodeFailureClass = z.infer<typeof NodeFailureClassSchema>;
|
|
101
131
|
export declare const NodeFailedEventSchema: z.ZodObject<{
|
|
102
132
|
v: z.ZodLiteral<1>;
|
|
103
133
|
seq: z.ZodNumber;
|
|
@@ -113,6 +143,20 @@ export declare const NodeFailedEventSchema: z.ZodObject<{
|
|
|
113
143
|
transient: "transient";
|
|
114
144
|
unknown: "unknown";
|
|
115
145
|
}>;
|
|
146
|
+
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
147
|
+
"create-no-id": "create-no-id";
|
|
148
|
+
"create-rejected": "create-rejected";
|
|
149
|
+
"prompt-auth": "prompt-auth";
|
|
150
|
+
"prompt-connection": "prompt-connection";
|
|
151
|
+
"prompt-content-filter": "prompt-content-filter";
|
|
152
|
+
"prompt-context-length": "prompt-context-length";
|
|
153
|
+
"prompt-rate-limited": "prompt-rate-limited";
|
|
154
|
+
"prompt-rejected": "prompt-rejected";
|
|
155
|
+
"prompt-server": "prompt-server";
|
|
156
|
+
"prompt-timeout": "prompt-timeout";
|
|
157
|
+
"prompt-validation": "prompt-validation";
|
|
158
|
+
unknown: "unknown";
|
|
159
|
+
}>>;
|
|
116
160
|
}, z.core.$strict>;
|
|
117
161
|
export declare const NodeCancelledEventSchema: z.ZodObject<{
|
|
118
162
|
v: z.ZodLiteral<1>;
|
|
@@ -183,6 +227,20 @@ export declare const GraphEventV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
183
227
|
transient: "transient";
|
|
184
228
|
unknown: "unknown";
|
|
185
229
|
}>;
|
|
230
|
+
failureClass: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
"create-no-id": "create-no-id";
|
|
232
|
+
"create-rejected": "create-rejected";
|
|
233
|
+
"prompt-auth": "prompt-auth";
|
|
234
|
+
"prompt-connection": "prompt-connection";
|
|
235
|
+
"prompt-content-filter": "prompt-content-filter";
|
|
236
|
+
"prompt-context-length": "prompt-context-length";
|
|
237
|
+
"prompt-rate-limited": "prompt-rate-limited";
|
|
238
|
+
"prompt-rejected": "prompt-rejected";
|
|
239
|
+
"prompt-server": "prompt-server";
|
|
240
|
+
"prompt-timeout": "prompt-timeout";
|
|
241
|
+
"prompt-validation": "prompt-validation";
|
|
242
|
+
unknown: "unknown";
|
|
243
|
+
}>>;
|
|
186
244
|
}, z.core.$strict>, z.ZodObject<{
|
|
187
245
|
v: z.ZodLiteral<1>;
|
|
188
246
|
seq: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/graph/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,EAAG,CAAU,CAAC;AAC7C,eAAO,MAAM,mBAAmB,EAAG,CAAU,CAAC;AAE9C,4EAA4E;AAC5E,eAAO,MAAM,YAAY,aAIkC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,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5C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,GACL,SAAS,CAiCX;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOrD;AA+DD,wBAAgB,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,eAAe,EACzB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAA6B,EAC1C,OAAO,GAAE,eAAwD,EACjE,cAAc,GAAE,YAAwB,EACxC,UAAU,CAAC,EAAE,OAAO,EACpB,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GACzD,OAAO,CA2GT;AA2JD,eAAO,MAAM,MAAM,EAAE,MAibpB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;eAE7B,MAAM"}
|
package/dist/index.js
CHANGED
|
@@ -869,13 +869,28 @@ var NodeSucceededEventSchema = z5.object({
|
|
|
869
869
|
attemptID: AttemptIDSchema,
|
|
870
870
|
artifact: ContextRefSchema
|
|
871
871
|
}).strict();
|
|
872
|
+
var NodeFailureClassSchema = z5.enum([
|
|
873
|
+
"create-rejected",
|
|
874
|
+
"create-no-id",
|
|
875
|
+
"prompt-rejected",
|
|
876
|
+
"prompt-timeout",
|
|
877
|
+
"prompt-rate-limited",
|
|
878
|
+
"prompt-auth",
|
|
879
|
+
"prompt-content-filter",
|
|
880
|
+
"prompt-context-length",
|
|
881
|
+
"prompt-validation",
|
|
882
|
+
"prompt-connection",
|
|
883
|
+
"prompt-server",
|
|
884
|
+
"unknown"
|
|
885
|
+
]);
|
|
872
886
|
var NodeFailedEventSchema = z5.object({
|
|
873
887
|
...eventEnvelope,
|
|
874
888
|
type: z5.literal("node.failed"),
|
|
875
889
|
nodeID: NodeIDSchema,
|
|
876
890
|
operationID: OperationIDSchema,
|
|
877
891
|
attemptID: AttemptIDSchema,
|
|
878
|
-
errorClass: ErrorClassSchema
|
|
892
|
+
errorClass: ErrorClassSchema,
|
|
893
|
+
failureClass: NodeFailureClassSchema.optional()
|
|
879
894
|
}).strict();
|
|
880
895
|
var NodeCancelledEventSchema = z5.object({
|
|
881
896
|
...eventEnvelope,
|
|
@@ -5519,6 +5534,8 @@ var NON_TEXT_LABELS = new Set([
|
|
|
5519
5534
|
"reranking"
|
|
5520
5535
|
]);
|
|
5521
5536
|
var PARALLEL_ARG = /(?:^|\s)(?:--parallel|-np)[\s=]+(\d+)(?!\d)/;
|
|
5537
|
+
var PARALLEL_FLAGS = new Set(["--parallel", "-np"]);
|
|
5538
|
+
var PARALLEL_FUSED = /^(?:--parallel|-np)=(\d+)$/;
|
|
5522
5539
|
function createLemonadeAdapter() {
|
|
5523
5540
|
const listModels = async (options) => {
|
|
5524
5541
|
const baseURL = normalizeBaseURL(options.baseURL ?? LEMONADE_DEFAULT_BASE_URL);
|
|
@@ -5619,15 +5636,49 @@ async function readLoadedModels(baseURL, fetch) {
|
|
|
5619
5636
|
return loaded;
|
|
5620
5637
|
}
|
|
5621
5638
|
function readSlotCount(entry) {
|
|
5639
|
+
return slotsFromLlamacppArgs(entry) ?? slotsFromLaunchCommand(entry);
|
|
5640
|
+
}
|
|
5641
|
+
function slotsFromLlamacppArgs(entry) {
|
|
5622
5642
|
const options = entry.recipe_options;
|
|
5623
5643
|
if (!isObject2(options) || typeof options.llamacpp_args !== "string") {
|
|
5624
5644
|
return;
|
|
5625
5645
|
}
|
|
5626
5646
|
const match = PARALLEL_ARG.exec(options.llamacpp_args);
|
|
5627
|
-
|
|
5647
|
+
return match === null ? undefined : positiveSlotCount(match[1]);
|
|
5648
|
+
}
|
|
5649
|
+
function slotsFromLaunchCommand(entry) {
|
|
5650
|
+
const argv = entry.launch_command;
|
|
5651
|
+
if (!Array.isArray(argv)) {
|
|
5652
|
+
return;
|
|
5653
|
+
}
|
|
5654
|
+
for (let index = 0;index < argv.length; index += 1) {
|
|
5655
|
+
const token = argv[index];
|
|
5656
|
+
if (typeof token !== "string") {
|
|
5657
|
+
continue;
|
|
5658
|
+
}
|
|
5659
|
+
const fused = PARALLEL_FUSED.exec(token);
|
|
5660
|
+
if (fused !== null) {
|
|
5661
|
+
const slots = positiveSlotCount(fused[1]);
|
|
5662
|
+
if (slots !== undefined) {
|
|
5663
|
+
return slots;
|
|
5664
|
+
}
|
|
5665
|
+
continue;
|
|
5666
|
+
}
|
|
5667
|
+
if (PARALLEL_FLAGS.has(token)) {
|
|
5668
|
+
const next = argv[index + 1];
|
|
5669
|
+
const slots = typeof next === "string" ? positiveSlotCount(next) : undefined;
|
|
5670
|
+
if (slots !== undefined) {
|
|
5671
|
+
return slots;
|
|
5672
|
+
}
|
|
5673
|
+
}
|
|
5674
|
+
}
|
|
5675
|
+
return;
|
|
5676
|
+
}
|
|
5677
|
+
function positiveSlotCount(raw) {
|
|
5678
|
+
if (raw === undefined || !/^\d+$/.test(raw)) {
|
|
5628
5679
|
return;
|
|
5629
5680
|
}
|
|
5630
|
-
const parsed = Number.parseInt(
|
|
5681
|
+
const parsed = Number.parseInt(raw, 10);
|
|
5631
5682
|
return Number.isInteger(parsed) && parsed > 0 ? parsed : undefined;
|
|
5632
5683
|
}
|
|
5633
5684
|
function enrichWithLoadState(models, loaded) {
|
|
@@ -5753,6 +5804,24 @@ function reachableRuntimeIds(snapshots) {
|
|
|
5753
5804
|
}
|
|
5754
5805
|
return ids;
|
|
5755
5806
|
}
|
|
5807
|
+
function reportedModelSlotsByRuntime(snapshots) {
|
|
5808
|
+
const byRuntime = new Map;
|
|
5809
|
+
for (const snapshot of snapshots) {
|
|
5810
|
+
if (!snapshot.reachable) {
|
|
5811
|
+
continue;
|
|
5812
|
+
}
|
|
5813
|
+
const slots = {};
|
|
5814
|
+
for (const model of snapshot.models) {
|
|
5815
|
+
if (model.slots !== undefined) {
|
|
5816
|
+
slots[model.modelID] = model.slots;
|
|
5817
|
+
}
|
|
5818
|
+
}
|
|
5819
|
+
if (Object.keys(slots).length > 0) {
|
|
5820
|
+
byRuntime.set(snapshot.id, slots);
|
|
5821
|
+
}
|
|
5822
|
+
}
|
|
5823
|
+
return byRuntime;
|
|
5824
|
+
}
|
|
5756
5825
|
|
|
5757
5826
|
// src/local/slotPool.ts
|
|
5758
5827
|
var POOL_SEPARATOR = "::";
|
|
@@ -5784,6 +5853,15 @@ function slotPoolReservedInteractive(runtime, modelID) {
|
|
|
5784
5853
|
function unknownPoolCapacity() {
|
|
5785
5854
|
return DEFAULT_LOCAL_MAX_CONCURRENCY;
|
|
5786
5855
|
}
|
|
5856
|
+
function withReportedModelSlots(runtime, reported) {
|
|
5857
|
+
if (reported === undefined || Object.keys(reported).length === 0) {
|
|
5858
|
+
return runtime;
|
|
5859
|
+
}
|
|
5860
|
+
return {
|
|
5861
|
+
...runtime,
|
|
5862
|
+
modelConcurrency: { ...reported, ...runtime.modelConcurrency }
|
|
5863
|
+
};
|
|
5864
|
+
}
|
|
5787
5865
|
|
|
5788
5866
|
// src/orchestrator/coordinator.ts
|
|
5789
5867
|
import { z as z17 } from "zod";
|
|
@@ -6954,7 +7032,8 @@ async function runRoleTaskWithCorrelation(input, deps, correlation, batch) {
|
|
|
6954
7032
|
if (runtimeId !== undefined && deps.runtimeLimiter !== undefined) {
|
|
6955
7033
|
const limiter = deps.runtimeLimiter;
|
|
6956
7034
|
const priority = priorityForRole(role);
|
|
6957
|
-
const
|
|
7035
|
+
const dispatchRuntime = configuredRuntime(runtimeId, input.config) ?? { id: runtimeId };
|
|
7036
|
+
const poolKey = slotPoolKey(withReportedModelSlots(dispatchRuntime, deps.reportedModelSlots?.(runtimeId)), decision2.selected.modelID);
|
|
6958
7037
|
release = limiter.tryAcquire(poolKey, priority);
|
|
6959
7038
|
let waitedMs = 0;
|
|
6960
7039
|
if (release === undefined) {
|
|
@@ -8442,13 +8521,27 @@ function runtimeLine(snapshot, runtime) {
|
|
|
8442
8521
|
const slots = declared === undefined ? ` · ${DEFAULT_LOCAL_MAX_CONCURRENCY} slot(s) (default)` : ` · ${declared} slot(s) (declared)`;
|
|
8443
8522
|
return ` ${mark} ${snapshot.id.padEnd(14)} ${snapshot.baseURL || "(no baseURL)"} — ${detail}${slots}`;
|
|
8444
8523
|
}
|
|
8445
|
-
function runtimeModelSlotsLine(runtime) {
|
|
8446
|
-
const
|
|
8447
|
-
if (
|
|
8448
|
-
|
|
8524
|
+
function runtimeModelSlotsLine(runtime, snapshot) {
|
|
8525
|
+
const declared = Object.entries(runtime?.modelConcurrency ?? {});
|
|
8526
|
+
if (declared.length > 0) {
|
|
8527
|
+
const detail = declared.map(([modelID, slots]) => `${modelID} ${slots} slot(s)`).join(" · ");
|
|
8528
|
+
return [` ↳ per-model slots: ${detail}`];
|
|
8529
|
+
}
|
|
8530
|
+
if (runtime === undefined || snapshot === undefined || !snapshot.reachable || snapshot.models.length === 0) {
|
|
8531
|
+
return [];
|
|
8449
8532
|
}
|
|
8450
|
-
const
|
|
8451
|
-
|
|
8533
|
+
const reported = snapshot.models.flatMap((model) => model.slots === undefined ? [] : [`${model.modelID} ${model.slots} slot(s)`]);
|
|
8534
|
+
if (reported.length > 0) {
|
|
8535
|
+
return [
|
|
8536
|
+
` ↳ per-model slots (detected from ${snapshot.id}, applied this run): ${reported.join(" · ")}`,
|
|
8537
|
+
" remedy: pin these under this runtime as `modelConcurrency` in .opencode/openteam.json so the split survives restarts and outranks detection."
|
|
8538
|
+
];
|
|
8539
|
+
}
|
|
8540
|
+
return [
|
|
8541
|
+
` ⚠ ${snapshot.id} is reachable and serving models but has no per-model slots declared`,
|
|
8542
|
+
" consequence: every model shares one runtime-wide pool sized to maxConcurrency, so a model the runtime serves at fewer parallel slots is over-dispatched and its extra requests queue invisibly inside the runtime where openteam cannot prioritise them.",
|
|
8543
|
+
' remedy: add "modelConcurrency": { "<modelID>": <slots> } to this runtime in .opencode/openteam.json (or re-run `openteam setup`, which detects the counts from the runtime), then re-run `openteam doctor`.'
|
|
8544
|
+
];
|
|
8452
8545
|
}
|
|
8453
8546
|
function isNetworkRuntime(baseURL) {
|
|
8454
8547
|
if (baseURL.length === 0) {
|
|
@@ -8705,9 +8798,9 @@ function renderDoctor(input) {
|
|
|
8705
8798
|
if (classLine !== undefined) {
|
|
8706
8799
|
lines.push(classLine);
|
|
8707
8800
|
}
|
|
8708
|
-
const modelSlots = runtimeModelSlotsLine(runtime);
|
|
8709
|
-
|
|
8710
|
-
lines.push(
|
|
8801
|
+
const modelSlots = runtimeModelSlotsLine(runtime, snapshot);
|
|
8802
|
+
for (const line of modelSlots) {
|
|
8803
|
+
lines.push(line);
|
|
8711
8804
|
}
|
|
8712
8805
|
}
|
|
8713
8806
|
}
|
|
@@ -12941,6 +13034,7 @@ function createMemoryTool(deps) {
|
|
|
12941
13034
|
import { tool as tool4 } from "@opencode-ai/plugin";
|
|
12942
13035
|
import { z as z25 } from "zod";
|
|
12943
13036
|
var _pluginWarnedRoles = new Set;
|
|
13037
|
+
var EMPTY_ROLE_ID_SET = new Set;
|
|
12944
13038
|
var RoleAssignmentSchema = z25.object({
|
|
12945
13039
|
roleID: z25.string().min(1).describe("Role identifier from the roster"),
|
|
12946
13040
|
prompt: z25.string().min(1).describe("Work prompt for this role"),
|
|
@@ -13133,14 +13227,18 @@ function mapTelemetryFailureClassToErrorClass(cls) {
|
|
|
13133
13227
|
}
|
|
13134
13228
|
function classifyShadowNodeError(result) {
|
|
13135
13229
|
if (result === undefined || result.subsession.success) {
|
|
13136
|
-
return "unknown";
|
|
13230
|
+
return { errorClass: "unknown", failureClass: "unknown" };
|
|
13137
13231
|
}
|
|
13138
13232
|
const failureReason = result.subsession.failureReason ?? result.record.failureReason;
|
|
13139
13233
|
const failureStage = result.subsession.failureStage ?? result.record.failureStage;
|
|
13140
13234
|
if (failureReason !== undefined || failureStage !== undefined) {
|
|
13141
|
-
|
|
13235
|
+
const failureClass = classifyFailureForTelemetry(failureReason ?? "", failureStage);
|
|
13236
|
+
return {
|
|
13237
|
+
errorClass: mapTelemetryFailureClassToErrorClass(failureClass),
|
|
13238
|
+
failureClass
|
|
13239
|
+
};
|
|
13142
13240
|
}
|
|
13143
|
-
return "unknown";
|
|
13241
|
+
return { errorClass: "unknown", failureClass: "unknown" };
|
|
13144
13242
|
}
|
|
13145
13243
|
function synthesizeJournalEvents(spec, results, cancelled = []) {
|
|
13146
13244
|
const runID = spec.runID;
|
|
@@ -13183,6 +13281,7 @@ function synthesizeJournalEvents(spec, results, cancelled = []) {
|
|
|
13183
13281
|
attemptID: attempt
|
|
13184
13282
|
});
|
|
13185
13283
|
if (result === undefined || !result.subsession.success) {
|
|
13284
|
+
const classified = classifyShadowNodeError(result);
|
|
13186
13285
|
events.push({
|
|
13187
13286
|
v: 1,
|
|
13188
13287
|
seq: events.length,
|
|
@@ -13191,7 +13290,8 @@ function synthesizeJournalEvents(spec, results, cancelled = []) {
|
|
|
13191
13290
|
nodeID: node.id,
|
|
13192
13291
|
operationID: operation,
|
|
13193
13292
|
attemptID: attempt,
|
|
13194
|
-
errorClass:
|
|
13293
|
+
errorClass: classified.errorClass,
|
|
13294
|
+
failureClass: classified.failureClass
|
|
13195
13295
|
});
|
|
13196
13296
|
} else {
|
|
13197
13297
|
events.push({
|
|
@@ -13342,6 +13442,28 @@ function orchestrateToolDescription(config) {
|
|
|
13342
13442
|
|
|
13343
13443
|
` + "Emit one assignment per role that has genuinely distinct work, in a " + "single call — that is what parallelises the team. A call carrying only " + "one assignment has delegated nothing and is almost always a mistake " + "unless the task truly belongs to a single role. Use `dependsOn` to " + "sequence roles that must wait for another role's output; independent " + "roles are dispatched concurrently.";
|
|
13344
13444
|
}
|
|
13445
|
+
function unknownAssignmentRoleIDs(assignments, config, rosterRoleIDs) {
|
|
13446
|
+
const seen = new Set;
|
|
13447
|
+
const unknown = [];
|
|
13448
|
+
for (const { roleID } of assignments) {
|
|
13449
|
+
if (getRoleProfile(roleID, config.orchestrator?.roles) !== undefined) {
|
|
13450
|
+
continue;
|
|
13451
|
+
}
|
|
13452
|
+
if (rosterRoleIDs.has(roleID)) {
|
|
13453
|
+
continue;
|
|
13454
|
+
}
|
|
13455
|
+
if (seen.has(roleID)) {
|
|
13456
|
+
continue;
|
|
13457
|
+
}
|
|
13458
|
+
seen.add(roleID);
|
|
13459
|
+
unknown.push(roleID);
|
|
13460
|
+
}
|
|
13461
|
+
return unknown;
|
|
13462
|
+
}
|
|
13463
|
+
function formatUnknownRoleError(unknownRoles, assignable) {
|
|
13464
|
+
const offending = unknownRoles.map((roleID) => `"${roleID}"`).join(", ");
|
|
13465
|
+
return `role validation error: unknown role(s) ${offending} — not a roster role ` + "and not declared under orchestrator.roles. " + `Assignable roles: ${assignable.join(", ")}. ` + "Use one of these, or declare the custom role under orchestrator.roles in " + ".opencode/openteam.json before assigning it.";
|
|
13466
|
+
}
|
|
13345
13467
|
function createOrchestrateTool(deps) {
|
|
13346
13468
|
return tool4({
|
|
13347
13469
|
description: orchestrateToolDescription(deps.config),
|
|
@@ -13365,6 +13487,12 @@ function createOrchestrateTool(deps) {
|
|
|
13365
13487
|
return `dependency validation error: ${depError.code} — ${depError.detail}`;
|
|
13366
13488
|
}
|
|
13367
13489
|
try {
|
|
13490
|
+
const needsRoster = parsed.data.assignments.some((assignment) => getRoleProfile(assignment.roleID, deps.config.orchestrator?.roles) === undefined);
|
|
13491
|
+
const rosterRoleIDs = needsRoster ? await deps.rosterRoleIDs() : EMPTY_ROLE_ID_SET;
|
|
13492
|
+
const unknownRoles = unknownAssignmentRoleIDs(parsed.data.assignments, deps.config, rosterRoleIDs);
|
|
13493
|
+
if (unknownRoles.length > 0) {
|
|
13494
|
+
return formatUnknownRoleError(unknownRoles, assignableRoleIDs(deps.config));
|
|
13495
|
+
}
|
|
13368
13496
|
const inputs = buildRoleTaskInputs(parsed.data, deps.config);
|
|
13369
13497
|
const coordinatorDeps = {
|
|
13370
13498
|
client: deps.client,
|
|
@@ -13375,7 +13503,8 @@ function createOrchestrateTool(deps) {
|
|
|
13375
13503
|
warnedRoles: _pluginWarnedRoles,
|
|
13376
13504
|
localRuntimeReachable: deps.localRuntimeReachable,
|
|
13377
13505
|
reachableRuntimeIds: deps.reachableRuntimeIds,
|
|
13378
|
-
runtimeLimiter: deps.runtimeLimiter
|
|
13506
|
+
runtimeLimiter: deps.runtimeLimiter,
|
|
13507
|
+
reportedModelSlots: deps.reportedModelSlots
|
|
13379
13508
|
};
|
|
13380
13509
|
const batch = await runRoleTasks(inputs, coordinatorDeps);
|
|
13381
13510
|
const projected = projectResults(batch.results, batch.cancelled);
|
|
@@ -13739,7 +13868,7 @@ var createOtlpSpanExporter = (connection, config) => {
|
|
|
13739
13868
|
// package.json
|
|
13740
13869
|
var package_default = {
|
|
13741
13870
|
name: "@jmanuelcorral/openteam",
|
|
13742
|
-
version: "0.17.
|
|
13871
|
+
version: "0.17.5",
|
|
13743
13872
|
packageManager: "bun@1.3.14",
|
|
13744
13873
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
13745
13874
|
license: "MIT",
|
|
@@ -14203,6 +14332,17 @@ async function readStoredRosterForDoctor(storage) {
|
|
|
14203
14332
|
return content;
|
|
14204
14333
|
}
|
|
14205
14334
|
}
|
|
14335
|
+
async function readStoredRosterRoleIDs(storage) {
|
|
14336
|
+
try {
|
|
14337
|
+
const content = await storage.read(OPENTEAM_ROSTER_PATH);
|
|
14338
|
+
if (content === undefined) {
|
|
14339
|
+
return new Set;
|
|
14340
|
+
}
|
|
14341
|
+
return new Set(parseRoster(content).entries.map((entry) => entry.roleID));
|
|
14342
|
+
} catch {
|
|
14343
|
+
return new Set;
|
|
14344
|
+
}
|
|
14345
|
+
}
|
|
14206
14346
|
var auditStoredRosterForDoctor = (roster, configuredRoles) => typeof roster === "string" ? auditRoster(roster, configuredRoles) : auditRoster(roster, configuredRoles);
|
|
14207
14347
|
function createCliDeps(config, registry, telemetryPath, sessionsDir = DEFAULT_SESSIONS_DIR, storage = createFsStorageProvider(process.cwd()), fallbackSource = "options", rawOptions, resolveOpencodeVersion) {
|
|
14208
14348
|
return {
|
|
@@ -14487,17 +14627,36 @@ var server = async (ctx, rawOptions) => {
|
|
|
14487
14627
|
const effectiveGraphMode = graphConfig.effectiveMode;
|
|
14488
14628
|
const journalRoot2 = config.graph?.journalRoot ?? DEFAULT_GRAPH_JOURNAL_ROOT;
|
|
14489
14629
|
const journal = effectiveGraphMode !== "off" ? createFsGraphJournal(journalRoot2) : undefined;
|
|
14630
|
+
const reportedSlotsByRuntime = new Map;
|
|
14631
|
+
const rememberReportedSlots = (snapshots) => {
|
|
14632
|
+
const reported = reportedModelSlotsByRuntime(snapshots);
|
|
14633
|
+
for (const snapshot of snapshots) {
|
|
14634
|
+
const slots = reported.get(snapshot.id);
|
|
14635
|
+
if (slots === undefined) {
|
|
14636
|
+
reportedSlotsByRuntime.delete(snapshot.id);
|
|
14637
|
+
} else {
|
|
14638
|
+
reportedSlotsByRuntime.set(snapshot.id, slots);
|
|
14639
|
+
}
|
|
14640
|
+
}
|
|
14641
|
+
};
|
|
14642
|
+
const reportedModelSlots = (runtimeId) => reportedSlotsByRuntime.get(runtimeId);
|
|
14490
14643
|
const localRuntimeReachable = async () => {
|
|
14491
14644
|
const snapshots = await registry.probe(config.local.runtimes.filter((runtime) => runtime.enabled));
|
|
14645
|
+
rememberReportedSlots(snapshots);
|
|
14492
14646
|
return anyRuntimeReachable(snapshots);
|
|
14493
14647
|
};
|
|
14494
14648
|
const probeReachableRuntimeIds = async () => {
|
|
14495
14649
|
const snapshots = await registry.probe(config.local.runtimes.filter((runtime) => runtime.enabled));
|
|
14650
|
+
rememberReportedSlots(snapshots);
|
|
14496
14651
|
return reachableRuntimeIds(snapshots);
|
|
14497
14652
|
};
|
|
14498
14653
|
const runtimeById = (key2) => {
|
|
14499
14654
|
const runtimeId = slotPoolRuntimeID(key2);
|
|
14500
|
-
|
|
14655
|
+
const runtime = config.local.runtimes.find((candidate) => candidate.id === runtimeId);
|
|
14656
|
+
if (runtime === undefined) {
|
|
14657
|
+
return;
|
|
14658
|
+
}
|
|
14659
|
+
return withReportedModelSlots(runtime, reportedSlotsByRuntime.get(runtimeId));
|
|
14501
14660
|
};
|
|
14502
14661
|
const runtimeLimiter = createRuntimeConcurrencyLimiter({
|
|
14503
14662
|
capacityFor: (key2) => {
|
|
@@ -14522,6 +14681,8 @@ var server = async (ctx, rawOptions) => {
|
|
|
14522
14681
|
localRuntimeReachable,
|
|
14523
14682
|
reachableRuntimeIds: probeReachableRuntimeIds,
|
|
14524
14683
|
runtimeLimiter,
|
|
14684
|
+
reportedModelSlots,
|
|
14685
|
+
rosterRoleIDs: () => readStoredRosterRoleIDs(storage),
|
|
14525
14686
|
warn: diagnostics.warn("unknown-role")
|
|
14526
14687
|
});
|
|
14527
14688
|
const memoryTool = createMemoryTool({
|
|
@@ -14543,7 +14704,8 @@ var server = async (ctx, rawOptions) => {
|
|
|
14543
14704
|
warn: diagnostics.warn("unknown-role"),
|
|
14544
14705
|
localRuntimeReachable,
|
|
14545
14706
|
reachableRuntimeIds: probeReachableRuntimeIds,
|
|
14546
|
-
runtimeLimiter
|
|
14707
|
+
runtimeLimiter,
|
|
14708
|
+
reportedModelSlots
|
|
14547
14709
|
}
|
|
14548
14710
|
});
|
|
14549
14711
|
const registerCastTool = createRegisterCastTool({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lemonade.d.ts","sourceRoot":"","sources":["../../src/local/lemonade.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAIV,cAAc,EAGf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,yBAAyB,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"lemonade.d.ts","sourceRoot":"","sources":["../../src/local/lemonade.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAIV,cAAc,EAGf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,yBAAyB,kCAAkC,CAAC;AAmCzE,wBAAgB,qBAAqB,IAAI,cAAc,CA0CtD"}
|
package/dist/local/registry.d.ts
CHANGED
|
@@ -33,4 +33,18 @@ export declare function anyRuntimeReachable(snapshots: readonly LocalRuntimeSnap
|
|
|
33
33
|
* one. Pure over probe results; reachability I/O lives in `RuntimeRegistry.probe`.
|
|
34
34
|
*/
|
|
35
35
|
export declare function reachableRuntimeIds(snapshots: readonly LocalRuntimeSnapshot[]): Set<LocalRuntimeId>;
|
|
36
|
+
/**
|
|
37
|
+
* Per-model slot counts each reachable runtime REPORTED over its API, keyed by
|
|
38
|
+
* runtime instance id then by model id (#217).
|
|
39
|
+
*
|
|
40
|
+
* The health-probe path already carries the slot count a model was loaded with
|
|
41
|
+
* (`LocalModelInfo.slots`), measured from the runtime itself — on a live
|
|
42
|
+
* Lemonade host the coder model served `--parallel 3` while the thinking model
|
|
43
|
+
* served `--parallel 1`. Surfacing that here lets the plugin apply those counts
|
|
44
|
+
* to a config that declares none, so a low-slot model stops being over-dispatched
|
|
45
|
+
* to. A runtime that reports no slots (an adapter that cannot, or a server too
|
|
46
|
+
* old to expose them) contributes no entry, preserving the single-pool default.
|
|
47
|
+
* Pure over probe results; probing I/O lives in `RuntimeRegistry.probe`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function reportedModelSlotsByRuntime(snapshots: readonly LocalRuntimeSnapshot[]): Map<LocalRuntimeId, Record<string, number>>;
|
|
36
50
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/local/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAoB,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAE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M,SAAS,CAAC;AAEjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IACpE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;IAClC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA+B;IAEhE,YAAY,OAAO,EAAE,sBAAsB,EAW1C;IAEK,KAAK,CACT,QAAQ,EAAE,SAAS,YAAY,EAAE,GAChC,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA+BjC;IAED,OAAO,CAAC,kBAAkB;CAuB3B;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,oBAAoB,EAAE,GACzC,cAAc,EAAE,CAWlB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,oBAAoB,EAAE,GACzC,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,oBAAoB,EAAE,GACzC,GAAG,CAAC,cAAc,CAAC,CAQrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,oBAAoB,EAAE,GACzC,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiB7C"}
|
package/dist/local/slotPool.d.ts
CHANGED
|
@@ -53,6 +53,27 @@ export declare function slotPoolReservedInteractive(runtime: Pick<LocalRuntime,
|
|
|
53
53
|
* unbounded capacity. Pure.
|
|
54
54
|
*/
|
|
55
55
|
export declare function unknownPoolCapacity(): number;
|
|
56
|
+
/**
|
|
57
|
+
* A runtime whose per-model slot pools also reflect what the runtime REPORTED
|
|
58
|
+
* over its API, for the models the config declares no slot count for (#217).
|
|
59
|
+
*
|
|
60
|
+
* `openteam setup` writes `modelConcurrency` from the slot counts a runtime
|
|
61
|
+
* reports, but an existing config predating that — or one written by hand —
|
|
62
|
+
* declares none, so every model shares the single `maxConcurrency` pool and a
|
|
63
|
+
* 1-slot model is over-dispatched to (three of four generations then queue
|
|
64
|
+
* inside the server, invisible to the limiter). The runtime already reports its
|
|
65
|
+
* real per-model slot counts on the health-probe path, so folding them in here
|
|
66
|
+
* closes that gap without a re-run of setup.
|
|
67
|
+
*
|
|
68
|
+
* Explicit config ALWAYS wins: a `modelConcurrency` entry the operator wrote
|
|
69
|
+
* overrides the reported count for the same model, because explicit operator
|
|
70
|
+
* intent outranks detection. Reported counts only fill the models the config is
|
|
71
|
+
* silent on.
|
|
72
|
+
*
|
|
73
|
+
* Returns the runtime UNCHANGED when nothing was reported, so a runtime whose
|
|
74
|
+
* adapter cannot report slots keeps its exact prior single-pool behaviour. Pure.
|
|
75
|
+
*/
|
|
76
|
+
export declare function withReportedModelSlots<T extends Pick<LocalRuntime, "modelConcurrency">>(runtime: T, reported: Readonly<Record<string, number>> | undefined): T;
|
|
56
77
|
/** Re-exported so callers resolving pools do not also import the schema module. */
|
|
57
78
|
export { effectiveReservedInteractiveSlots };
|
|
58
79
|
//# sourceMappingURL=slotPool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotPool.d.ts","sourceRoot":"","sources":["../../src/local/slotPool.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iCAAiC,EACjC,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAW9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE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AG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,EAClE,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,MAAM,CAIR;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,IAAI,CACX,YAAY,EACZ,gBAAgB,GAAG,kBAAkB,GAAG,0BAA0B,CACnE,EACD,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,MAAM,CAKR;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAChD,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAQvE;AAED,mFAAmF;AACnF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -93,6 +93,19 @@ export type CoordinatorDeps = {
|
|
|
93
93
|
* released in a `finally`, so it stays pinned to its runtime for its duration.
|
|
94
94
|
*/
|
|
95
95
|
runtimeLimiter?: RuntimeConcurrencyLimiter;
|
|
96
|
+
/**
|
|
97
|
+
* Per-model slot counts a runtime REPORTED over its API, looked up by instance
|
|
98
|
+
* id (#217). When a runtime declares no `modelConcurrency` for a model but the
|
|
99
|
+
* probe observed a slot count for it, the dispatch competes in a per-model pool
|
|
100
|
+
* sized to that reported count instead of the bare runtime pool — so a 1-slot
|
|
101
|
+
* model is not over-dispatched to. Explicit config always wins over the report.
|
|
102
|
+
*
|
|
103
|
+
* Injected reader, not I/O: the composition root probes in `src/local/**` and
|
|
104
|
+
* caches the result, and this port hands the coordinator the cached counts so
|
|
105
|
+
* the dispatch stays free of network access. Optional so existing callers keep
|
|
106
|
+
* the exact pre-#217 single-pool behaviour when it is absent.
|
|
107
|
+
*/
|
|
108
|
+
reportedModelSlots?: (runtimeId: LocalRuntimeId) => Readonly<Record<string, number>> | undefined;
|
|
96
109
|
};
|
|
97
110
|
export type CorrelatedCostRecord = CostRecord & {
|
|
98
111
|
decisionID: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/orchestrator/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EACV,yBAAyB,EAE1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,UAAU,EAAE,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,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,oBAAoB,EACjC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,WAAW,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACrE,UAAU,CAyBZ;AA0KD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,cAAc,CAAC,CAUzB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC;IACnC,oFAAoF;IACpF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,aAAa,EAAE,EAAE,CA2BnB;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,eAAe,CAAC,CAiE1B"}
|
|
@@ -170,6 +170,32 @@ export type OrchestrateDeps = {
|
|
|
170
170
|
* queues excess work. Required so dropping the wiring is a compile error.
|
|
171
171
|
*/
|
|
172
172
|
readonly runtimeLimiter: RuntimeConcurrencyLimiter;
|
|
173
|
+
/**
|
|
174
|
+
* Per-model reported-slot reader (#217). A REQUIRED injected reader hand-fed
|
|
175
|
+
* from the composition root's cached probe results, passed through to the
|
|
176
|
+
* coordinator so a config that declares no `modelConcurrency` still caps each
|
|
177
|
+
* model at the slot count the runtime reported (a 1-slot model then stops being
|
|
178
|
+
* over-dispatched to). Required (not optional) so dropping the composition-root
|
|
179
|
+
* wiring is a compile error, the same posture as the limiter and reachability
|
|
180
|
+
* ports. Not I/O: the probe runs in `src/local/**`; this only reads its cache.
|
|
181
|
+
*/
|
|
182
|
+
readonly reportedModelSlots: (runtimeId: LocalRuntimeId) => Readonly<Record<string, number>> | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Registered project-roster role IDs (#roleid-roster). A REQUIRED injected I/O
|
|
185
|
+
* port — the roster lives on disk behind the `StorageProvider` boundary,
|
|
186
|
+
* outside router purity, so it cannot be read from the pure config. The tool
|
|
187
|
+
* consults it so a role the operator deliberately cast into the roster but has
|
|
188
|
+
* not given an `orchestrator.roles` profile — a product-supported state:
|
|
189
|
+
* `openteam-register-cast` returns success for it and `openteam doctor` prints
|
|
190
|
+
* it as informational, not an error — is accepted, while a name the model
|
|
191
|
+
* invented (present in neither config nor roster) is rejected. Required (not
|
|
192
|
+
* optional) so that dropping the injection at the composition root is a compile
|
|
193
|
+
* error rather than a silent fail-open that would reject legitimately-cast
|
|
194
|
+
* custom roles and reintroduce this exact regression. The adapter MUST be
|
|
195
|
+
* fail-safe: on a missing or unparseable roster it returns an empty set, and it
|
|
196
|
+
* must never throw.
|
|
197
|
+
*/
|
|
198
|
+
readonly rosterRoleIDs: () => Promise<ReadonlySet<string>>;
|
|
173
199
|
};
|
|
174
200
|
/**
|
|
175
201
|
* Builds a `GraphSpecV1` from orchestrate payload assignments. Each assignment
|
|
@@ -230,6 +256,35 @@ export declare function assignableRoleIDs(config: OpenTeamConfig): string[];
|
|
|
230
256
|
* Builds the tool description. Dynamic because the roster is config-driven.
|
|
231
257
|
*/
|
|
232
258
|
export declare function orchestrateToolDescription(config: OpenTeamConfig): string;
|
|
259
|
+
/**
|
|
260
|
+
* Returns the assignment roleIDs that are genuinely invented: they resolve NO
|
|
261
|
+
* curated or configured routing profile AND are not registered in the project
|
|
262
|
+
* roster. This is the exact set that would otherwise fall through to
|
|
263
|
+
* `synthesiseFallbackProfile`, a neutral FRONTIER-ELIGIBLE profile, without the
|
|
264
|
+
* operator ever having asked for that role.
|
|
265
|
+
*
|
|
266
|
+
* A roleID is accepted when either:
|
|
267
|
+
* - `getRoleProfile` resolves it against the built-in `TEAM_ROLES`, a legacy
|
|
268
|
+
* themed alias, or a role the user declared under `orchestrator.roles`; or
|
|
269
|
+
* - it appears in `rosterRoleIDs` — a role the operator deliberately cast into
|
|
270
|
+
* the project roster. A roster entry without a profile is a product-supported
|
|
271
|
+
* state (`openteam-register-cast` returns success for it and `openteam doctor`
|
|
272
|
+
* reports it as informational, not an error), so it must NOT be rejected here.
|
|
273
|
+
*
|
|
274
|
+
* Anything else is a name the coordinator model invented on the fly; routing it
|
|
275
|
+
* on the fallback profile silently bypasses curated routing, so the tool rejects
|
|
276
|
+
* it instead of dispatching it.
|
|
277
|
+
*
|
|
278
|
+
* This preserves the open-roleID doctrine: a genuinely custom project roleID
|
|
279
|
+
* stays valid the moment it is either declared under `orchestrator.roles` or
|
|
280
|
+
* cast into the roster. What is no longer accepted is an undeclared, unregistered
|
|
281
|
+
* name the model guessed.
|
|
282
|
+
*
|
|
283
|
+
* Pure: no I/O, clock, random, or env — the roster is read by the caller through
|
|
284
|
+
* an injected port and passed in as a set. Order-preserving and de-duplicated so
|
|
285
|
+
* the error message lists each offending id exactly once.
|
|
286
|
+
*/
|
|
287
|
+
export declare function unknownAssignmentRoleIDs(assignments: readonly OrchestratePayload["assignments"][number][], config: OpenTeamConfig, rosterRoleIDs: ReadonlySet<string>): string[];
|
|
233
288
|
/**
|
|
234
289
|
* Creates the `openteam-orchestrate` tool.
|
|
235
290
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTool.d.ts","sourceRoot":"","sources":["../../src/plugin/orchestrateTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,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C1C,MAAM,EAAE,oBAAoB,GAC3B,0BAA0B,GAAG,SAAS,CAaxC;AAED,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAA;CAAE,CAAC;AA+H9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CASlE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAezE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,SAAS,kBAAkB,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,EACjE,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,GACjC,MAAM,EAAE,CAiBV;AAqBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAoH3E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ErrorClass, GraphEventType, GraphEventV1 } from "../graph/schema";
|
|
1
|
+
import type { ErrorClass, GraphEventType, GraphEventV1, NodeFailureClass } from "../graph/schema";
|
|
2
2
|
/**
|
|
3
3
|
* **Reference-only** telemetry projection for Graph events (GE-037).
|
|
4
4
|
*
|
|
@@ -19,6 +19,7 @@ export type GraphTelemetryRecord = {
|
|
|
19
19
|
readonly operationID?: string;
|
|
20
20
|
readonly attemptID?: string;
|
|
21
21
|
readonly errorClass?: ErrorClass;
|
|
22
|
+
readonly failureClass?: NodeFailureClass;
|
|
22
23
|
readonly specDigest?: string;
|
|
23
24
|
readonly artifact?: {
|
|
24
25
|
readonly uri: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphProjection.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphProjection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"graphProjection.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphProjection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;GASG;AAEH,oEAAoE;AACpE,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAkB3E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ErrorClass, GraphSpecV1 } from "../graph/schema";
|
|
1
|
+
import type { ErrorClass, GraphSpecV1, NodeFailureClass } from "../graph/schema";
|
|
2
2
|
import type { GraphState } from "../graph/types";
|
|
3
3
|
import type { GraphTelemetryRecord } from "./graphProjection";
|
|
4
4
|
/**
|
|
@@ -30,6 +30,8 @@ export type GraphNodeView = {
|
|
|
30
30
|
readonly state: GraphViewNodeState;
|
|
31
31
|
readonly attempts: number;
|
|
32
32
|
readonly lastErrorClass?: ErrorClass;
|
|
33
|
+
/** Precise cause behind lastErrorClass (#225). Absent on pre-#225 journals. */
|
|
34
|
+
readonly lastFailureClass?: NodeFailureClass;
|
|
33
35
|
readonly review?: {
|
|
34
36
|
readonly verdict: ReviewVerdict;
|
|
35
37
|
readonly reassigned: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphView.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"graphView.d.ts","sourceRoot":"","sources":["../../src/telemetry/graphView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAEV,WAAW,EACX,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;;;;;;;;;;GAWG;AAEH,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,OAAO,GACP,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEhB,qCAAqC;AACrC,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC;AAErE,2DAA2D;AAC3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC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AAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,kFAAkF;AAClF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD,CAAC;AAsGF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,qBAAqB,CAkB3E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmanuelcorral/openteam",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.5",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
6
6
|
"license": "MIT",
|