@jmanuelcorral/openteam 0.17.0 → 0.17.2
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/.opencode/openteam.example.json +7 -2
- package/README.es.md +4 -3
- package/README.md +4 -3
- package/dist/certificates/graph-release-certificate.json +2 -2
- package/dist/certificates/graph-shadow-certificate.json +2 -2
- package/dist/cli/setupAdapters.d.ts.map +1 -1
- package/dist/cli.js +273 -45
- package/dist/commands/doctor.d.ts +12 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/setup.d.ts +62 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/schema.d.ts +3 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +207 -39
- package/dist/local/lemonade.d.ts +5 -1
- package/dist/local/lemonade.d.ts.map +1 -1
- package/dist/local/slotPool.d.ts +58 -0
- package/dist/local/slotPool.d.ts.map +1 -0
- package/dist/local/types.d.ts +19 -0
- package/dist/local/types.d.ts.map +1 -1
- package/dist/orchestrator/coordinator.d.ts +9 -0
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/runtimeSelection.d.ts +7 -1
- package/dist/orchestrator/runtimeSelection.d.ts.map +1 -1
- package/dist/router/chooseModel.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LegacyLayoutFinding } from "../config/legacyPaths";
|
|
2
|
-
import { type OpenTeamConfig } from "../config/schema";
|
|
2
|
+
import { type LocalRuntime, type OpenTeamConfig } from "../config/schema";
|
|
3
3
|
import type { LocalRuntimeSnapshot } from "../local/types";
|
|
4
4
|
import { type DiagnosticCode } from "../telemetry/diagnostics";
|
|
5
5
|
import type { GraphViewHealth } from "../telemetry/graphView";
|
|
@@ -136,6 +136,17 @@ export type DoctorRosterAudit = {
|
|
|
136
136
|
readonly misassignedGuaranteedRoleEntries?: readonly DoctorRosterAuditEntry[];
|
|
137
137
|
readonly unprofiledRoleEntries?: readonly DoctorRosterAuditEntry[];
|
|
138
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* Reports the per-model slot split when a runtime declares one.
|
|
141
|
+
*
|
|
142
|
+
* Without this the `N slot(s)` figure above reads as the whole truth, hiding the
|
|
143
|
+
* case that motivated per-model pools: a host declaring 4 server slots may serve
|
|
144
|
+
* its coder model at 3 and its thinking model at 1, so the roles routed to the
|
|
145
|
+
* thinking model serialise on a single slot. Returns `undefined` when the
|
|
146
|
+
* runtime declares no per-model slots, so nothing is printed for the runtimes
|
|
147
|
+
* that cannot report them. Pure.
|
|
148
|
+
*/
|
|
149
|
+
export declare function runtimeModelSlotsLine(runtime: LocalRuntime | undefined): string | undefined;
|
|
139
150
|
/**
|
|
140
151
|
* Doctor's view of local-runtime queue-wait telemetry (#144). Presence of this
|
|
141
152
|
* 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,
|
|
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,CA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AwB,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;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,MAAM,GAAG,SAAS,CASpB;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/commands/setup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ModelCapabilityProfile } from "../capabilities/types";
|
|
2
2
|
import { type OpenTeamConfig, type PrivacyMode, type RouterMode } from "../config/schema";
|
|
3
|
-
import type { LocalRuntimeId, LocalRuntimeKind } from "../local/types";
|
|
3
|
+
import type { LocalModelInfo, LocalRuntimeId, LocalRuntimeKind } from "../local/types";
|
|
4
4
|
import type { CliResult } from "./dispatch";
|
|
5
5
|
import { type FrontierChoice as FrontierChoiceType } from "./frontierCatalog";
|
|
6
6
|
/** Nombre del paquete npm del plugin, declarado en el opencode.json generado. */
|
|
@@ -89,6 +89,17 @@ export type DetectedRuntime = {
|
|
|
89
89
|
baseURL: string;
|
|
90
90
|
reachable: boolean;
|
|
91
91
|
models: string[];
|
|
92
|
+
/**
|
|
93
|
+
* Richer per-model facts when the adapter reports them: which models are
|
|
94
|
+
* RESIDENT (as opposed to merely downloaded) and how many concurrent slots
|
|
95
|
+
* each serves.
|
|
96
|
+
*
|
|
97
|
+
* A parallel field rather than a change to `models`, so every existing
|
|
98
|
+
* construction site stays valid and a runtime that cannot report load state
|
|
99
|
+
* keeps behaving exactly as before. Absent means "not reported", which is a
|
|
100
|
+
* different claim from "nothing is loaded".
|
|
101
|
+
*/
|
|
102
|
+
modelInfo?: LocalModelInfo[];
|
|
92
103
|
error?: string;
|
|
93
104
|
};
|
|
94
105
|
export type RuntimeChoice = {
|
|
@@ -125,6 +136,16 @@ export type RuntimeChoice = {
|
|
|
125
136
|
* to override.
|
|
126
137
|
*/
|
|
127
138
|
maxConcurrency?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Per-model slot counts REPORTED by the runtime, keyed by model id.
|
|
141
|
+
*
|
|
142
|
+
* Measured, never elicited: a single Lemonade host was observed serving a
|
|
143
|
+
* coder model at `--parallel 3` and a thinking model at `--parallel 1`
|
|
144
|
+
* simultaneously, so no single number the user could type is correct for both.
|
|
145
|
+
* Absent when the runtime reports nothing, which keeps the generated config
|
|
146
|
+
* byte-identical for the runtimes that cannot report slots.
|
|
147
|
+
*/
|
|
148
|
+
modelConcurrency?: Record<string, number>;
|
|
128
149
|
/**
|
|
129
150
|
* Model this instance serves for reasoning-heavy roles (#210 follow-up).
|
|
130
151
|
* Optional on the answer: `buildOpenTeamConfig` omits it when it equals
|
|
@@ -257,6 +278,27 @@ export declare const RUNTIME_NONE = "__none__";
|
|
|
257
278
|
export declare const RUNTIME_LOCATION_LOCAL = "__local__";
|
|
258
279
|
/** Runtime local en otra máquina de la red (se introduce la URL). */
|
|
259
280
|
export declare const RUNTIME_LOCATION_REMOTE = "__remote__";
|
|
281
|
+
/**
|
|
282
|
+
* Orders the models offered by the wizard and labels each with what the runtime
|
|
283
|
+
* actually reported about it.
|
|
284
|
+
*
|
|
285
|
+
* Reported-loaded models come FIRST, because a runtime like Lemonade enumerates
|
|
286
|
+
* every DOWNLOADED model — nine on the measured host, only two of them resident
|
|
287
|
+
* — and burying the two usable ones in that list is the defect this fixes.
|
|
288
|
+
* Unloaded models stay SELECTABLE rather than hidden: Lemonade loads a model on
|
|
289
|
+
* demand, so hiding them would remove a working choice. Ordering is stable
|
|
290
|
+
* within each group so the list never reshuffles between runs.
|
|
291
|
+
*
|
|
292
|
+
* When the runtime reported no load state at all, the original order and bare
|
|
293
|
+
* labels are preserved — an unknown state is never rendered as "not loaded".
|
|
294
|
+
* Pure.
|
|
295
|
+
*/
|
|
296
|
+
export declare function orderModelChoices(models: readonly string[], modelInfo: readonly LocalModelInfo[] | undefined): {
|
|
297
|
+
value: string;
|
|
298
|
+
label: string;
|
|
299
|
+
}[];
|
|
300
|
+
/** First reported-loaded model, or the first model at all. Pure. */
|
|
301
|
+
export declare function preferredModelID(models: readonly string[], modelInfo: readonly LocalModelInfo[] | undefined): string | undefined;
|
|
260
302
|
/**
|
|
261
303
|
* Normaliza una URL de runtime remoto: añade esquema http:// si falta y asume
|
|
262
304
|
* el path del endpoint OpenAI-compatible cuando no se indica ruta. El sufijo se
|
|
@@ -265,5 +307,24 @@ export declare const RUNTIME_LOCATION_REMOTE = "__remote__";
|
|
|
265
307
|
* runtime. Pure.
|
|
266
308
|
*/
|
|
267
309
|
export declare function normalizeRemoteBaseURL(raw: string, defaultBaseURL?: string): string;
|
|
310
|
+
/**
|
|
311
|
+
* Per-model slot counts the runtime itself reported, restricted to the models
|
|
312
|
+
* this instance will actually dispatch to.
|
|
313
|
+
*
|
|
314
|
+
* Measured rather than elicited: on a live Lemonade host the coder model served
|
|
315
|
+
* `--parallel 3` and the thinking model `--parallel 1` at the same time, so no
|
|
316
|
+
* single number a user could type would be correct for both. Returns `undefined`
|
|
317
|
+
* when the runtime reported nothing, which keeps the generated config identical
|
|
318
|
+
* to before for every runtime that cannot report slots. Pure.
|
|
319
|
+
*/
|
|
320
|
+
export declare function reportedModelSlots(modelInfo: readonly LocalModelInfo[] | undefined, usedModelIDs: readonly string[]): Record<string, number> | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* Human summary and runtime-wide fallback derived from reported per-model slots,
|
|
323
|
+
* or `undefined` when nothing was reported. Pure.
|
|
324
|
+
*/
|
|
325
|
+
export declare function reportedSlotSummary(reported: Record<string, number> | undefined): {
|
|
326
|
+
summary: string;
|
|
327
|
+
max: number;
|
|
328
|
+
} | undefined;
|
|
268
329
|
export declare function runSetup(deps: SetupDeps): Promise<CliResult>;
|
|
269
330
|
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAMpE,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAMpE,OAAO,EAOL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAexB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,cAAc,IAAI,kBAAkB,EAK1C,MAAM,mBAAmB,CAAC;AAE3B,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,wQAOjC,CAAC;AAwEX,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AA6BF;;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{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,WAAW,CAAC;AAIlC,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,WAAW,CAAC;AAIlC,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAgHzE,CAAC;AAgIL,KAAK,6BAA6B,GAAG;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;IAClE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACxC,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,6BAAkC,GAC1C,MAAM,CA0BR;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKxD"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ export declare const LocalRuntimeSchema: z.ZodObject<{
|
|
|
145
145
|
modelID: z.ZodString;
|
|
146
146
|
}, z.core.$strict>;
|
|
147
147
|
maxConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
modelConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
148
149
|
reservedInteractiveSlots: z.ZodOptional<z.ZodNumber>;
|
|
149
150
|
thinkingModel: z.ZodOptional<z.ZodString>;
|
|
150
151
|
coderModel: z.ZodOptional<z.ZodString>;
|
|
@@ -339,6 +340,7 @@ export declare const OpenTeamConfigObjectSchema: z.ZodObject<{
|
|
|
339
340
|
modelID: z.ZodString;
|
|
340
341
|
}, z.core.$strict>;
|
|
341
342
|
maxConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
modelConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
342
344
|
reservedInteractiveSlots: z.ZodOptional<z.ZodNumber>;
|
|
343
345
|
thinkingModel: z.ZodOptional<z.ZodString>;
|
|
344
346
|
coderModel: z.ZodOptional<z.ZodString>;
|
|
@@ -496,6 +498,7 @@ export declare const OpenTeamConfigSchema: z.ZodObject<{
|
|
|
496
498
|
modelID: z.ZodString;
|
|
497
499
|
}, z.core.$strict>;
|
|
498
500
|
maxConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
modelConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
499
502
|
reservedInteractiveSlots: z.ZodOptional<z.ZodNumber>;
|
|
500
503
|
thinkingModel: z.ZodOptional<z.ZodString>;
|
|
501
504
|
coderModel: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,cAAc;;;kBAKhB,CAAC;AAEZ,eAAO,MAAM,gBAAgB;;;;EAA6C,CAAC;AAC3E,eAAO,MAAM,iBAAiB;;;;EAI5B,CAAC;AACH,eAAO,MAAM,kBAAkB;;;EAA6B,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;EAAsC,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;EAAmC,CAAC;AAElE;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAChF,eAAO,MAA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7E,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,GACrB,oBAAoB,CAEtB"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EACV,OAAO,EAEP,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EACV,OAAO,EAEP,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iBAAi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C,UAAU,CAAC,EAAE,OAAO,EACpB,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GACzD,OAAO,CA2GT;AA2JD,eAAO,MAAM,MAAM,EAAE,MAiYpB,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;eAE7B,MAAM"}
|
package/dist/index.js
CHANGED
|
@@ -429,6 +429,7 @@ var LocalRuntimeSchema = z2.object({
|
|
|
429
429
|
discovery: z2.enum(["cli", "sdk", "manual"]).optional(),
|
|
430
430
|
defaultModel: ModelRefSchema,
|
|
431
431
|
maxConcurrency: z2.number().int().positive().optional(),
|
|
432
|
+
modelConcurrency: z2.record(z2.string().min(1), z2.number().int().positive()).optional(),
|
|
432
433
|
reservedInteractiveSlots: z2.number().int().nonnegative().optional(),
|
|
433
434
|
thinkingModel: z2.string().min(1).optional(),
|
|
434
435
|
coderModel: z2.string().min(1).optional()
|
|
@@ -448,12 +449,6 @@ function localRuntimeKind(runtime) {
|
|
|
448
449
|
function effectiveMaxConcurrency(runtime) {
|
|
449
450
|
return runtime.maxConcurrency ?? DEFAULT_LOCAL_MAX_CONCURRENCY;
|
|
450
451
|
}
|
|
451
|
-
function effectiveReservedInteractiveSlots(runtime) {
|
|
452
|
-
if (runtime.reservedInteractiveSlots !== undefined) {
|
|
453
|
-
return runtime.reservedInteractiveSlots;
|
|
454
|
-
}
|
|
455
|
-
return effectiveMaxConcurrency(runtime) >= 2 ? 1 : 0;
|
|
456
|
-
}
|
|
457
452
|
var MemoryScopeSchema = z2.enum(["project", "user"]);
|
|
458
453
|
var MemoryExtractionModeSchema = z2.enum([
|
|
459
454
|
"local",
|
|
@@ -2754,6 +2749,7 @@ var KNOWN_CONFIG_KEYS_BY_PATH = new Map([
|
|
|
2754
2749
|
"discovery",
|
|
2755
2750
|
"defaultModel",
|
|
2756
2751
|
"maxConcurrency",
|
|
2752
|
+
"modelConcurrency",
|
|
2757
2753
|
"reservedInteractiveSlots",
|
|
2758
2754
|
"thinkingModel",
|
|
2759
2755
|
"coderModel"
|
|
@@ -5514,24 +5510,141 @@ function ensureFoundryV1BaseURL(endpoint) {
|
|
|
5514
5510
|
}
|
|
5515
5511
|
|
|
5516
5512
|
// src/local/lemonade.ts
|
|
5517
|
-
var LEMONADE_DEFAULT_BASE_URL = "http://localhost:
|
|
5513
|
+
var LEMONADE_DEFAULT_BASE_URL = "http://localhost:13305/api/v1";
|
|
5514
|
+
var NON_TEXT_LABELS = new Set([
|
|
5515
|
+
"image",
|
|
5516
|
+
"tts",
|
|
5517
|
+
"transcription",
|
|
5518
|
+
"embedding",
|
|
5519
|
+
"reranking"
|
|
5520
|
+
]);
|
|
5521
|
+
var PARALLEL_ARG = /(?:^|\s)(?:--parallel|-np)[\s=]+(\d+)(?!\d)/;
|
|
5518
5522
|
function createLemonadeAdapter() {
|
|
5523
|
+
const listModels = async (options) => {
|
|
5524
|
+
const baseURL = normalizeBaseURL(options.baseURL ?? LEMONADE_DEFAULT_BASE_URL);
|
|
5525
|
+
const downloaded = await listLemonadeModels(baseURL, options.fetch);
|
|
5526
|
+
const loaded = await readLoadedModels(baseURL, options.fetch);
|
|
5527
|
+
return enrichWithLoadState(downloaded, loaded);
|
|
5528
|
+
};
|
|
5519
5529
|
return {
|
|
5520
5530
|
id: "lemonade",
|
|
5521
5531
|
defaultBaseURL: LEMONADE_DEFAULT_BASE_URL,
|
|
5522
|
-
listModels
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
+
listModels,
|
|
5533
|
+
async probe(options) {
|
|
5534
|
+
const baseURL = normalizeBaseURL(options.baseURL ?? LEMONADE_DEFAULT_BASE_URL);
|
|
5535
|
+
try {
|
|
5536
|
+
return {
|
|
5537
|
+
id: "lemonade",
|
|
5538
|
+
baseURL,
|
|
5539
|
+
reachable: true,
|
|
5540
|
+
models: await listModels({ ...options, baseURL }),
|
|
5541
|
+
probedAt: options.probedAt
|
|
5542
|
+
};
|
|
5543
|
+
} catch (error) {
|
|
5544
|
+
return unavailableSnapshot({
|
|
5545
|
+
id: "lemonade",
|
|
5546
|
+
baseURL,
|
|
5547
|
+
probedAt: options.probedAt,
|
|
5548
|
+
error
|
|
5549
|
+
});
|
|
5550
|
+
}
|
|
5532
5551
|
}
|
|
5533
5552
|
};
|
|
5534
5553
|
}
|
|
5554
|
+
async function listLemonadeModels(baseURL, fetch) {
|
|
5555
|
+
const response = await fetch(`${baseURL}/models`, {
|
|
5556
|
+
method: "GET",
|
|
5557
|
+
headers: { accept: "application/json" }
|
|
5558
|
+
});
|
|
5559
|
+
if (!response.ok) {
|
|
5560
|
+
throw new Error(`GET /models failed with HTTP ${response.status}`);
|
|
5561
|
+
}
|
|
5562
|
+
let payload;
|
|
5563
|
+
try {
|
|
5564
|
+
payload = await response.json();
|
|
5565
|
+
} catch (error) {
|
|
5566
|
+
throw new Error(`Malformed JSON from /models: ${errorMessage(error)}`);
|
|
5567
|
+
}
|
|
5568
|
+
const nonText = readNonTextModelIDs(payload);
|
|
5569
|
+
return parseOpenAIModels(payload).filter((model) => !nonText.has(model.modelID));
|
|
5570
|
+
}
|
|
5571
|
+
function readNonTextModelIDs(payload) {
|
|
5572
|
+
const ids = new Set;
|
|
5573
|
+
if (!isObject2(payload) || !Array.isArray(payload.data)) {
|
|
5574
|
+
return ids;
|
|
5575
|
+
}
|
|
5576
|
+
for (const entry of payload.data) {
|
|
5577
|
+
if (!isObject2(entry) || typeof entry.id !== "string") {
|
|
5578
|
+
continue;
|
|
5579
|
+
}
|
|
5580
|
+
if (isNonTextModel(entry)) {
|
|
5581
|
+
ids.add(entry.id);
|
|
5582
|
+
}
|
|
5583
|
+
}
|
|
5584
|
+
return ids;
|
|
5585
|
+
}
|
|
5586
|
+
function isNonTextModel(entry) {
|
|
5587
|
+
if (!Array.isArray(entry.labels)) {
|
|
5588
|
+
return false;
|
|
5589
|
+
}
|
|
5590
|
+
return entry.labels.some((label) => typeof label === "string" && NON_TEXT_LABELS.has(label));
|
|
5591
|
+
}
|
|
5592
|
+
async function readLoadedModels(baseURL, fetch) {
|
|
5593
|
+
let payload;
|
|
5594
|
+
try {
|
|
5595
|
+
const response = await fetch(`${baseURL}/health`, {
|
|
5596
|
+
method: "GET",
|
|
5597
|
+
headers: { accept: "application/json" }
|
|
5598
|
+
});
|
|
5599
|
+
if (!response.ok) {
|
|
5600
|
+
return;
|
|
5601
|
+
}
|
|
5602
|
+
payload = await response.json();
|
|
5603
|
+
} catch {
|
|
5604
|
+
return;
|
|
5605
|
+
}
|
|
5606
|
+
if (!isObject2(payload) || !Array.isArray(payload.all_models_loaded)) {
|
|
5607
|
+
return;
|
|
5608
|
+
}
|
|
5609
|
+
const loaded = new Map;
|
|
5610
|
+
for (const entry of payload.all_models_loaded) {
|
|
5611
|
+
if (!isObject2(entry) || typeof entry.model_name !== "string") {
|
|
5612
|
+
continue;
|
|
5613
|
+
}
|
|
5614
|
+
if (entry.loaded === false) {
|
|
5615
|
+
continue;
|
|
5616
|
+
}
|
|
5617
|
+
loaded.set(entry.model_name, { slots: readSlotCount(entry) });
|
|
5618
|
+
}
|
|
5619
|
+
return loaded;
|
|
5620
|
+
}
|
|
5621
|
+
function readSlotCount(entry) {
|
|
5622
|
+
const options = entry.recipe_options;
|
|
5623
|
+
if (!isObject2(options) || typeof options.llamacpp_args !== "string") {
|
|
5624
|
+
return;
|
|
5625
|
+
}
|
|
5626
|
+
const match = PARALLEL_ARG.exec(options.llamacpp_args);
|
|
5627
|
+
if (match === null) {
|
|
5628
|
+
return;
|
|
5629
|
+
}
|
|
5630
|
+
const parsed = Number.parseInt(match[1], 10);
|
|
5631
|
+
return Number.isInteger(parsed) && parsed > 0 ? parsed : undefined;
|
|
5632
|
+
}
|
|
5633
|
+
function enrichWithLoadState(models, loaded) {
|
|
5634
|
+
if (loaded === undefined) {
|
|
5635
|
+
return [...models];
|
|
5636
|
+
}
|
|
5637
|
+
return models.map((model) => {
|
|
5638
|
+
const hit = loaded.get(model.modelID);
|
|
5639
|
+
if (hit === undefined) {
|
|
5640
|
+
return { ...model, loaded: false };
|
|
5641
|
+
}
|
|
5642
|
+
return hit.slots === undefined ? { ...model, loaded: true } : { ...model, loaded: true, slots: hit.slots };
|
|
5643
|
+
});
|
|
5644
|
+
}
|
|
5645
|
+
function isObject2(value) {
|
|
5646
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5647
|
+
}
|
|
5535
5648
|
|
|
5536
5649
|
// src/local/lmstudio.ts
|
|
5537
5650
|
var LMSTUDIO_DEFAULT_BASE_URL = "http://localhost:1234/v1";
|
|
@@ -5641,6 +5754,37 @@ function reachableRuntimeIds(snapshots) {
|
|
|
5641
5754
|
return ids;
|
|
5642
5755
|
}
|
|
5643
5756
|
|
|
5757
|
+
// src/local/slotPool.ts
|
|
5758
|
+
var POOL_SEPARATOR = "::";
|
|
5759
|
+
function slotPoolKey(runtime, modelID) {
|
|
5760
|
+
if (modelID === undefined) {
|
|
5761
|
+
return runtime.id;
|
|
5762
|
+
}
|
|
5763
|
+
const declared = runtime.modelConcurrency?.[modelID];
|
|
5764
|
+
return declared === undefined ? runtime.id : `${runtime.id}${POOL_SEPARATOR}${modelID}`;
|
|
5765
|
+
}
|
|
5766
|
+
function slotPoolRuntimeID(key) {
|
|
5767
|
+
const index = key.indexOf(POOL_SEPARATOR);
|
|
5768
|
+
return index === -1 ? key : key.slice(0, index);
|
|
5769
|
+
}
|
|
5770
|
+
function slotPoolModelID(key) {
|
|
5771
|
+
const index = key.indexOf(POOL_SEPARATOR);
|
|
5772
|
+
return index === -1 ? undefined : key.slice(index + POOL_SEPARATOR.length);
|
|
5773
|
+
}
|
|
5774
|
+
function slotPoolCapacity(runtime, modelID) {
|
|
5775
|
+
const declared = modelID === undefined ? undefined : runtime.modelConcurrency?.[modelID];
|
|
5776
|
+
return declared ?? effectiveMaxConcurrency(runtime);
|
|
5777
|
+
}
|
|
5778
|
+
function slotPoolReservedInteractive(runtime, modelID) {
|
|
5779
|
+
if (runtime.reservedInteractiveSlots !== undefined) {
|
|
5780
|
+
return runtime.reservedInteractiveSlots;
|
|
5781
|
+
}
|
|
5782
|
+
return slotPoolCapacity(runtime, modelID) >= 2 ? 1 : 0;
|
|
5783
|
+
}
|
|
5784
|
+
function unknownPoolCapacity() {
|
|
5785
|
+
return DEFAULT_LOCAL_MAX_CONCURRENCY;
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5644
5788
|
// src/orchestrator/coordinator.ts
|
|
5645
5789
|
import { z as z17 } from "zod";
|
|
5646
5790
|
|
|
@@ -6001,9 +6145,6 @@ function chooseModel(input) {
|
|
|
6001
6145
|
noLocalRationale: "forced-local-unavailable"
|
|
6002
6146
|
}));
|
|
6003
6147
|
}
|
|
6004
|
-
if (override === "alwaysFrontier") {
|
|
6005
|
-
return finalizeDecision(input, tier, frontier, budgetAction, decision(frontier.model, "frontier", ["explicit-always-frontier"], []));
|
|
6006
|
-
}
|
|
6007
6148
|
if (input.config.router.localOnly) {
|
|
6008
6149
|
if (local === null) {
|
|
6009
6150
|
return finalizeDecision(input, tier, frontier, budgetAction, blockedDecision(frontier.model, ["router-local-only", "forced-local-none-configured"], "forced-local-none-configured"));
|
|
@@ -6014,6 +6155,9 @@ function chooseModel(input) {
|
|
|
6014
6155
|
noLocalRationale: "forced-local-unavailable"
|
|
6015
6156
|
}));
|
|
6016
6157
|
}
|
|
6158
|
+
if (override === "alwaysFrontier") {
|
|
6159
|
+
return finalizeDecision(input, tier, frontier, budgetAction, decision(frontier.model, "frontier", ["explicit-always-frontier"], []));
|
|
6160
|
+
}
|
|
6017
6161
|
if (input.config.router.frontierOnly) {
|
|
6018
6162
|
return finalizeDecision(input, tier, frontier, budgetAction, decision(frontier.model, "frontier", ["router-frontier-only"], []));
|
|
6019
6163
|
}
|
|
@@ -6181,7 +6325,7 @@ var TRUNCATED_REASON_SUFFIX = "…[truncated]";
|
|
|
6181
6325
|
var MAX_SERIALIZED_ARRAY_ITEMS = 20;
|
|
6182
6326
|
var MAX_SERIALIZED_OBJECT_PROPERTIES = 25;
|
|
6183
6327
|
var MAX_SERIALIZED_DEPTH = 4;
|
|
6184
|
-
function
|
|
6328
|
+
function isObject3(value) {
|
|
6185
6329
|
return typeof value === "object" && value !== null;
|
|
6186
6330
|
}
|
|
6187
6331
|
function isError(value) {
|
|
@@ -6211,7 +6355,7 @@ function stringProperty(value, key) {
|
|
|
6211
6355
|
}
|
|
6212
6356
|
function nestedMessage(value, key) {
|
|
6213
6357
|
const container = safeGet(value, key);
|
|
6214
|
-
if (!
|
|
6358
|
+
if (!isObject3(container)) {
|
|
6215
6359
|
return;
|
|
6216
6360
|
}
|
|
6217
6361
|
const message = stringProperty(container, "message");
|
|
@@ -6295,7 +6439,7 @@ function errorReason(error) {
|
|
|
6295
6439
|
return message;
|
|
6296
6440
|
}
|
|
6297
6441
|
}
|
|
6298
|
-
if (
|
|
6442
|
+
if (isObject3(error)) {
|
|
6299
6443
|
const message = stringProperty(error, "message");
|
|
6300
6444
|
if (message !== undefined) {
|
|
6301
6445
|
return message;
|
|
@@ -6476,8 +6620,8 @@ function roleLocalReachable(role, batch) {
|
|
|
6476
6620
|
function permissionsFor(roleID) {
|
|
6477
6621
|
return ROLE_PERMISSIONS[roleID] ?? [];
|
|
6478
6622
|
}
|
|
6479
|
-
function roleRequiresFrontier(role, task) {
|
|
6480
|
-
return task.explicitOverride === undefined && role.localFirst === false && role.defaultTier === "hard" && role.preferredFrontierModels.length > 0;
|
|
6623
|
+
function roleRequiresFrontier(role, task, config) {
|
|
6624
|
+
return task.explicitOverride === undefined && config.router.localOnly !== true && role.localFirst === false && role.defaultTier === "hard" && role.preferredFrontierModels.length > 0;
|
|
6481
6625
|
}
|
|
6482
6626
|
function roleAdjustedTask(role, input, requirement) {
|
|
6483
6627
|
const task = {
|
|
@@ -6487,11 +6631,19 @@ function roleAdjustedTask(role, input, requirement) {
|
|
|
6487
6631
|
if (requirement.needsTools) {
|
|
6488
6632
|
task.requiresTools = true;
|
|
6489
6633
|
}
|
|
6490
|
-
if (roleRequiresFrontier(role, task)) {
|
|
6634
|
+
if (roleRequiresFrontier(role, task, input.config)) {
|
|
6491
6635
|
task.explicitOverride = "alwaysFrontier";
|
|
6492
6636
|
}
|
|
6493
6637
|
return task;
|
|
6494
6638
|
}
|
|
6639
|
+
function roleAdjustedTaskForRole(input) {
|
|
6640
|
+
const role = roleFor(input);
|
|
6641
|
+
const tier = elevateTierForPermissions(classifyHeuristic({
|
|
6642
|
+
...input.task,
|
|
6643
|
+
prompt: input.task.prompt ?? input.prompt
|
|
6644
|
+
}).tier, permissionsFor(role.roleID));
|
|
6645
|
+
return roleAdjustedTask(role, input, roleToRequirement(role, input.task, tier));
|
|
6646
|
+
}
|
|
6495
6647
|
function satisfiesRoleRequirement(requirement, profile) {
|
|
6496
6648
|
return profile.kind === "frontier" && profile.availability !== "unavailable" && profile.contextWindow >= requirement.minContextWindow && profile.reasoningTier >= requirement.minReasoningTier && profile.codeQualityTier >= requirement.minCodeQualityTier && (!requirement.needsTools || profile.supportsToolCalling) && (!requirement.needsVision || profile.supportsVision);
|
|
6497
6649
|
}
|
|
@@ -6509,7 +6661,7 @@ function routingInput(input, role) {
|
|
|
6509
6661
|
const permissionTier = elevateTierForPermissions(classifiedTier, permissionsFor(role.roleID));
|
|
6510
6662
|
const tier = permissionTier;
|
|
6511
6663
|
const requirement = roleToRequirement(role, input.task, tier);
|
|
6512
|
-
const task =
|
|
6664
|
+
const task = roleAdjustedTaskForRole(input);
|
|
6513
6665
|
const baseInput = {
|
|
6514
6666
|
config: input.config,
|
|
6515
6667
|
task,
|
|
@@ -6802,18 +6954,19 @@ async function runRoleTaskWithCorrelation(input, deps, correlation, batch) {
|
|
|
6802
6954
|
if (runtimeId !== undefined && deps.runtimeLimiter !== undefined) {
|
|
6803
6955
|
const limiter = deps.runtimeLimiter;
|
|
6804
6956
|
const priority = priorityForRole(role);
|
|
6805
|
-
|
|
6957
|
+
const poolKey = slotPoolKey(configuredRuntime(runtimeId, input.config) ?? { id: runtimeId }, decision2.selected.modelID);
|
|
6958
|
+
release = limiter.tryAcquire(poolKey, priority);
|
|
6806
6959
|
let waitedMs = 0;
|
|
6807
6960
|
if (release === undefined) {
|
|
6808
|
-
const acquisition = await limiter.acquire(
|
|
6961
|
+
const acquisition = await limiter.acquire(poolKey, priority);
|
|
6809
6962
|
release = acquisition.release;
|
|
6810
6963
|
waitedMs = acquisition.waitedMs;
|
|
6811
6964
|
}
|
|
6812
6965
|
queueObservation = {
|
|
6813
6966
|
runtimeId,
|
|
6814
6967
|
waitedMs,
|
|
6815
|
-
activeCount: limiter.activeCount(
|
|
6816
|
-
queuedCount: limiter.queuedCount(
|
|
6968
|
+
activeCount: limiter.activeCount(poolKey),
|
|
6969
|
+
queuedCount: limiter.queuedCount(poolKey)
|
|
6817
6970
|
};
|
|
6818
6971
|
}
|
|
6819
6972
|
try {
|
|
@@ -8289,6 +8442,14 @@ function runtimeLine(snapshot, runtime) {
|
|
|
8289
8442
|
const slots = declared === undefined ? ` · ${DEFAULT_LOCAL_MAX_CONCURRENCY} slot(s) (default)` : ` · ${declared} slot(s) (declared)`;
|
|
8290
8443
|
return ` ${mark} ${snapshot.id.padEnd(14)} ${snapshot.baseURL || "(no baseURL)"} — ${detail}${slots}`;
|
|
8291
8444
|
}
|
|
8445
|
+
function runtimeModelSlotsLine(runtime) {
|
|
8446
|
+
const entries = Object.entries(runtime?.modelConcurrency ?? {});
|
|
8447
|
+
if (entries.length === 0) {
|
|
8448
|
+
return;
|
|
8449
|
+
}
|
|
8450
|
+
const detail = entries.map(([modelID, slots]) => `${modelID} ${slots} slot(s)`).join(" · ");
|
|
8451
|
+
return ` ↳ per-model slots: ${detail}`;
|
|
8452
|
+
}
|
|
8292
8453
|
function isNetworkRuntime(baseURL) {
|
|
8293
8454
|
if (baseURL.length === 0) {
|
|
8294
8455
|
return false;
|
|
@@ -8544,6 +8705,10 @@ function renderDoctor(input) {
|
|
|
8544
8705
|
if (classLine !== undefined) {
|
|
8545
8706
|
lines.push(classLine);
|
|
8546
8707
|
}
|
|
8708
|
+
const modelSlots = runtimeModelSlotsLine(runtime);
|
|
8709
|
+
if (modelSlots !== undefined) {
|
|
8710
|
+
lines.push(modelSlots);
|
|
8711
|
+
}
|
|
8547
8712
|
}
|
|
8548
8713
|
}
|
|
8549
8714
|
for (const snapshot of input.snapshots) {
|
|
@@ -13556,7 +13721,7 @@ var createOtlpSpanExporter = (connection, config) => {
|
|
|
13556
13721
|
// package.json
|
|
13557
13722
|
var package_default = {
|
|
13558
13723
|
name: "@jmanuelcorral/openteam",
|
|
13559
|
-
version: "0.17.
|
|
13724
|
+
version: "0.17.2",
|
|
13560
13725
|
packageManager: "bun@1.3.14",
|
|
13561
13726
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
13562
13727
|
license: "MIT",
|
|
@@ -14312,15 +14477,18 @@ var server = async (ctx, rawOptions) => {
|
|
|
14312
14477
|
const snapshots = await registry.probe(config.local.runtimes.filter((runtime) => runtime.enabled));
|
|
14313
14478
|
return reachableRuntimeIds(snapshots);
|
|
14314
14479
|
};
|
|
14315
|
-
const runtimeById = (
|
|
14480
|
+
const runtimeById = (key2) => {
|
|
14481
|
+
const runtimeId = slotPoolRuntimeID(key2);
|
|
14482
|
+
return config.local.runtimes.find((runtime) => runtime.id === runtimeId);
|
|
14483
|
+
};
|
|
14316
14484
|
const runtimeLimiter = createRuntimeConcurrencyLimiter({
|
|
14317
|
-
capacityFor: (
|
|
14318
|
-
const runtime = runtimeById(
|
|
14319
|
-
return runtime === undefined ?
|
|
14485
|
+
capacityFor: (key2) => {
|
|
14486
|
+
const runtime = runtimeById(key2);
|
|
14487
|
+
return runtime === undefined ? unknownPoolCapacity() : slotPoolCapacity(runtime, slotPoolModelID(key2));
|
|
14320
14488
|
},
|
|
14321
|
-
reservedInteractiveFor: (
|
|
14322
|
-
const runtime = runtimeById(
|
|
14323
|
-
return runtime === undefined ? 0 :
|
|
14489
|
+
reservedInteractiveFor: (key2) => {
|
|
14490
|
+
const runtime = runtimeById(key2);
|
|
14491
|
+
return runtime === undefined ? 0 : slotPoolReservedInteractive(runtime, slotPoolModelID(key2));
|
|
14324
14492
|
},
|
|
14325
14493
|
now
|
|
14326
14494
|
});
|
package/dist/local/lemonade.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { RuntimeAdapter } from "./types";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Lemonade Server's documented default port is 13305, not 8000 — verified
|
|
4
|
+
* against both the project's configuration reference and a live 11.7.0 host.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LEMONADE_DEFAULT_BASE_URL = "http://localhost:13305/api/v1";
|
|
3
7
|
export declare function createLemonadeAdapter(): RuntimeAdapter;
|
|
4
8
|
//# sourceMappingURL=lemonade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lemonade.d.ts","sourceRoot":"","sources":["../../src/local/lemonade.ts"],"names":[],"mappings":"
|
|
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;AA6BzE,wBAAgB,qBAAqB,IAAI,cAAc,CA0CtD"}
|