@jmanuelcorral/openteam 0.13.1 → 0.15.0
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 +5 -3
- package/README.md +5 -3
- package/dist/cli.js +322 -38
- package/dist/commands/dispatch.d.ts +8 -0
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/setup.d.ts +27 -7
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/runtime.d.ts +1 -1
- package/dist/config/runtime.d.ts.map +1 -1
- package/dist/config/schema.d.ts +23 -6
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +199 -19
- package/dist/local/concurrency.d.ts +24 -4
- package/dist/local/concurrency.d.ts.map +1 -1
- package/dist/local/registry.d.ts +3 -3
- package/dist/local/registry.d.ts.map +1 -1
- package/dist/local/types.d.ts +16 -2
- package/dist/local/types.d.ts.map +1 -1
- package/dist/orchestrator/coordinator.d.ts +24 -1
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/roles.d.ts +2 -12
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/orchestrator/runtimeSelection.d.ts.map +1 -1
- package/dist/telemetry/eventLog.d.ts +7 -1
- package/dist/telemetry/eventLog.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +37 -0
- package/dist/telemetry/events.d.ts.map +1 -1
- package/dist/telemetry/queueWait.d.ts +51 -0
- package/dist/telemetry/queueWait.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -101,8 +101,8 @@ var AgentRoleProfileSchema = z.object({
|
|
|
101
101
|
preferredFrontierModels: z.array(z.union([modelSelectionSchema, z.literal("auto")])),
|
|
102
102
|
localFirst: z.boolean(),
|
|
103
103
|
requiresLocalRuntime: z.boolean().optional(),
|
|
104
|
-
localRuntimes: z.array(z.
|
|
105
|
-
localModels: z.
|
|
104
|
+
localRuntimes: z.array(z.string().min(1)).optional(),
|
|
105
|
+
localModels: z.record(z.string().min(1), z.string().min(1)).optional()
|
|
106
106
|
}).strict();
|
|
107
107
|
var TEAM_ROLES = {
|
|
108
108
|
architect: {
|
|
@@ -409,14 +409,33 @@ var defaultFrontierModel = {
|
|
|
409
409
|
modelID: "claude-sonnet-4-5"
|
|
410
410
|
};
|
|
411
411
|
var DEFAULT_LOCAL_MAX_CONCURRENCY = 4;
|
|
412
|
+
var LocalRuntimeKindSchema = z2.enum([
|
|
413
|
+
"ollama",
|
|
414
|
+
"lmstudio",
|
|
415
|
+
"foundry-local",
|
|
416
|
+
"lemonade"
|
|
417
|
+
]);
|
|
412
418
|
var LocalRuntimeSchema = z2.object({
|
|
413
|
-
id: z2.
|
|
419
|
+
id: z2.string().min(1),
|
|
420
|
+
kind: LocalRuntimeKindSchema.optional(),
|
|
414
421
|
enabled: z2.boolean().default(true),
|
|
415
422
|
baseURL: z2.string().url().optional(),
|
|
416
423
|
discovery: z2.enum(["cli", "sdk", "manual"]).optional(),
|
|
417
424
|
defaultModel: ModelRefSchema,
|
|
418
425
|
maxConcurrency: z2.number().int().positive().optional()
|
|
419
|
-
}).strict()
|
|
426
|
+
}).strict().superRefine((runtime, ctx) => {
|
|
427
|
+
const resolvedKind = runtime.kind ?? runtime.id;
|
|
428
|
+
if (!LocalRuntimeKindSchema.safeParse(resolvedKind).success) {
|
|
429
|
+
ctx.addIssue({
|
|
430
|
+
code: z2.ZodIssueCode.custom,
|
|
431
|
+
path: ["kind"],
|
|
432
|
+
message: `local runtime "${runtime.id}" has no resolvable kind: add "kind" ` + "(one of ollama, lmstudio, foundry-local, lemonade), since the id is " + "not itself a runtime kind."
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
function localRuntimeKind(runtime) {
|
|
437
|
+
return runtime.kind ?? runtime.id;
|
|
438
|
+
}
|
|
420
439
|
var MemoryScopeSchema = z2.enum(["project", "user"]);
|
|
421
440
|
var MemoryExtractionModeSchema = z2.enum([
|
|
422
441
|
"local",
|
|
@@ -498,7 +517,23 @@ var OpenTeamConfigObjectSchema = z2.object({
|
|
|
498
517
|
localOnly: false
|
|
499
518
|
}),
|
|
500
519
|
local: z2.object({
|
|
501
|
-
runtimes: z2.array(LocalRuntimeSchema).default([])
|
|
520
|
+
runtimes: z2.array(LocalRuntimeSchema).default([]).superRefine((runtimes, ctx) => {
|
|
521
|
+
const seen = new Set;
|
|
522
|
+
for (let index = 0;index < runtimes.length; index += 1) {
|
|
523
|
+
const runtime = runtimes[index];
|
|
524
|
+
if (runtime === undefined) {
|
|
525
|
+
continue;
|
|
526
|
+
}
|
|
527
|
+
if (seen.has(runtime.id)) {
|
|
528
|
+
ctx.addIssue({
|
|
529
|
+
code: z2.ZodIssueCode.custom,
|
|
530
|
+
path: [index, "id"],
|
|
531
|
+
message: `duplicate local runtime id "${runtime.id}": each local.runtimes[].id must be unique within the array.`
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
seen.add(runtime.id);
|
|
535
|
+
}
|
|
536
|
+
})
|
|
502
537
|
}).strict().default({
|
|
503
538
|
runtimes: []
|
|
504
539
|
}),
|
|
@@ -1130,6 +1165,16 @@ var MeetingEventSchema = EventBaseSchema.extend({
|
|
|
1130
1165
|
roles: z4.array(z4.string().min(1)),
|
|
1131
1166
|
decisionIDs: z4.array(z4.string().min(1)).optional()
|
|
1132
1167
|
});
|
|
1168
|
+
var QueueEventSchema = EventBaseSchema.extend({
|
|
1169
|
+
type: z4.literal("queue"),
|
|
1170
|
+
runtimeId: z4.string().min(1),
|
|
1171
|
+
waitedMs: z4.number().finite().min(0),
|
|
1172
|
+
activeCount: z4.number().int().min(0),
|
|
1173
|
+
queuedCount: z4.number().int().min(0),
|
|
1174
|
+
decisionID: z4.string().min(1).optional(),
|
|
1175
|
+
agent: z4.string().min(1).optional(),
|
|
1176
|
+
batchID: z4.string().min(1).optional()
|
|
1177
|
+
});
|
|
1133
1178
|
var DecisionEventSchema = EventBaseSchema.extend({
|
|
1134
1179
|
type: z4.literal("decision"),
|
|
1135
1180
|
agent: z4.string().min(1).optional(),
|
|
@@ -1175,6 +1220,7 @@ var OpenTeamEventSchema = z4.discriminatedUnion("type", [
|
|
|
1175
1220
|
MessageEventSchema,
|
|
1176
1221
|
ToolcallEventSchema,
|
|
1177
1222
|
MeetingEventSchema,
|
|
1223
|
+
QueueEventSchema,
|
|
1178
1224
|
DecisionEventSchema,
|
|
1179
1225
|
ActivityEventSchema,
|
|
1180
1226
|
SessionEndpointEventSchema,
|
|
@@ -1442,6 +1488,9 @@ async function readRouteCostRecords(dir, deps) {
|
|
|
1442
1488
|
async function readDiagnosticEvents(dir, deps) {
|
|
1443
1489
|
return (await readSessionEvents(dir, deps)).filter((event) => event.type === "diagnostic");
|
|
1444
1490
|
}
|
|
1491
|
+
async function readQueueEvents(dir, deps) {
|
|
1492
|
+
return (await readSessionEvents(dir, deps)).filter((event) => event.type === "queue");
|
|
1493
|
+
}
|
|
1445
1494
|
async function readSessionEvents(dir, deps) {
|
|
1446
1495
|
const files = (await deps.storage.list(dir)).filter((file) => file.endsWith(".jsonl"));
|
|
1447
1496
|
const perFile = await Promise.all(files.map(async (file) => {
|
|
@@ -1519,7 +1568,7 @@ function runtimeIdOfModel(model, config) {
|
|
|
1519
1568
|
}
|
|
1520
1569
|
function roleLocalModel(role, runtimeId, fallback) {
|
|
1521
1570
|
const pinned = role.localModels?.[runtimeId];
|
|
1522
|
-
return pinned === undefined ? fallback : {
|
|
1571
|
+
return pinned === undefined ? fallback : { ...fallback, modelID: pinned };
|
|
1523
1572
|
}
|
|
1524
1573
|
function selectDispatchRuntime(role, decision2, reachable, config) {
|
|
1525
1574
|
if (decision2.routeKind !== "local") {
|
|
@@ -2118,6 +2167,28 @@ async function safeEmit(sink, event) {
|
|
|
2118
2167
|
await sink.emit(event);
|
|
2119
2168
|
} catch {}
|
|
2120
2169
|
}
|
|
2170
|
+
function buildQueueEvent(observation, sessionID, ts, correlation) {
|
|
2171
|
+
const event = {
|
|
2172
|
+
v: EVENT_SCHEMA_VERSION,
|
|
2173
|
+
type: "queue",
|
|
2174
|
+
ts,
|
|
2175
|
+
sessionID,
|
|
2176
|
+
runtimeId: observation.runtimeId,
|
|
2177
|
+
waitedMs: observation.waitedMs,
|
|
2178
|
+
activeCount: observation.activeCount,
|
|
2179
|
+
queuedCount: observation.queuedCount
|
|
2180
|
+
};
|
|
2181
|
+
if (correlation.decisionID !== undefined) {
|
|
2182
|
+
event.decisionID = correlation.decisionID;
|
|
2183
|
+
}
|
|
2184
|
+
if (correlation.agent !== undefined) {
|
|
2185
|
+
event.agent = correlation.agent;
|
|
2186
|
+
}
|
|
2187
|
+
if (correlation.batchID !== undefined) {
|
|
2188
|
+
event.batchID = correlation.batchID;
|
|
2189
|
+
}
|
|
2190
|
+
return event;
|
|
2191
|
+
}
|
|
2121
2192
|
async function runRoleTaskWithCorrelation(input, deps, correlation, batch) {
|
|
2122
2193
|
if (getRoleProfile(input.roleID, input.config.orchestrator?.roles) === undefined) {
|
|
2123
2194
|
warnUnknownRole(input.roleID, deps.warn, deps.warnedRoles);
|
|
@@ -2155,16 +2226,40 @@ async function runRoleTaskWithCorrelation(input, deps, correlation, batch) {
|
|
|
2155
2226
|
const subsessionDeps = deps.timeoutMs === undefined ? {} : { timeoutMs: deps.timeoutMs };
|
|
2156
2227
|
const runtimeId = selection.runtimeId;
|
|
2157
2228
|
let release;
|
|
2229
|
+
let queueObservation;
|
|
2158
2230
|
if (runtimeId !== undefined && deps.runtimeLimiter !== undefined) {
|
|
2159
|
-
|
|
2231
|
+
const limiter = deps.runtimeLimiter;
|
|
2232
|
+
release = limiter.tryAcquire(runtimeId);
|
|
2233
|
+
let waitedMs = 0;
|
|
2160
2234
|
if (release === undefined) {
|
|
2161
|
-
|
|
2162
|
-
|
|
2235
|
+
const acquisition = await limiter.acquire(runtimeId);
|
|
2236
|
+
release = acquisition.release;
|
|
2237
|
+
waitedMs = acquisition.waitedMs;
|
|
2238
|
+
}
|
|
2239
|
+
queueObservation = {
|
|
2240
|
+
runtimeId,
|
|
2241
|
+
waitedMs,
|
|
2242
|
+
activeCount: limiter.activeCount(runtimeId),
|
|
2243
|
+
queuedCount: limiter.queuedCount(runtimeId)
|
|
2244
|
+
};
|
|
2163
2245
|
}
|
|
2164
2246
|
try {
|
|
2165
2247
|
const subsession = await runSubsession(deps.client, request, subsessionDeps);
|
|
2166
2248
|
const record = buildRecord(input, decision2, subsession, deps, correlation.decisionID, correlation.batchID);
|
|
2167
2249
|
await safeEmit(deps.sink, correlatedCostRecordToRouteEvent(record));
|
|
2250
|
+
if (queueObservation !== undefined) {
|
|
2251
|
+
const sessionID = recordSessionID(input, subsession);
|
|
2252
|
+
if (sessionID !== undefined) {
|
|
2253
|
+
const queueCorrelation = {
|
|
2254
|
+
decisionID: correlation.decisionID,
|
|
2255
|
+
agent: input.roleID
|
|
2256
|
+
};
|
|
2257
|
+
if (correlation.batchID !== undefined) {
|
|
2258
|
+
queueCorrelation.batchID = correlation.batchID;
|
|
2259
|
+
}
|
|
2260
|
+
await safeEmit(deps.sink, buildQueueEvent(queueObservation, sessionID, deps.now(), queueCorrelation));
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2168
2263
|
return { decision: decision2, subsession, record };
|
|
2169
2264
|
} finally {
|
|
2170
2265
|
release?.();
|
|
@@ -2940,6 +3035,7 @@ var KNOWN_CONFIG_KEYS_BY_PATH = new Map([
|
|
|
2940
3035
|
"local.runtimes[]",
|
|
2941
3036
|
[
|
|
2942
3037
|
"id",
|
|
3038
|
+
"kind",
|
|
2943
3039
|
"enabled",
|
|
2944
3040
|
"baseURL",
|
|
2945
3041
|
"discovery",
|
|
@@ -3262,9 +3358,9 @@ async function loadRuntimeOpenTeamConfig(storage, options, path = DEFAULT_CONFIG
|
|
|
3262
3358
|
}
|
|
3263
3359
|
const configOptions = configOptionsFromPluginOptions(options);
|
|
3264
3360
|
const optionsFound = configOptions !== undefined;
|
|
3265
|
-
const overlayContent = await storage.read(overlayPath);
|
|
3361
|
+
const overlayContent = overlayPath === null ? undefined : await storage.read(overlayPath);
|
|
3266
3362
|
const overlayFound = overlayContent !== undefined;
|
|
3267
|
-
const overlayRaw = overlayFound ? parseConfigFileJson(overlayPath, overlayContent) : undefined;
|
|
3363
|
+
const overlayRaw = overlayFound && overlayPath !== null ? parseConfigFileJson(overlayPath, overlayContent) : undefined;
|
|
3268
3364
|
const mergedRaw = mergeConfigInputs(mergeConfigInputs(fileRaw, configOptions), overlayRaw);
|
|
3269
3365
|
const mergedSources = [
|
|
3270
3366
|
fileFound ? path : undefined,
|
|
@@ -3280,7 +3376,7 @@ async function loadRuntimeOpenTeamConfig(storage, options, path = DEFAULT_CONFIG
|
|
|
3280
3376
|
fileFound,
|
|
3281
3377
|
optionsFound,
|
|
3282
3378
|
overlayFound,
|
|
3283
|
-
searchedPaths: [path, overlayPath]
|
|
3379
|
+
searchedPaths: overlayPath === null ? [path] : [path, overlayPath]
|
|
3284
3380
|
};
|
|
3285
3381
|
}
|
|
3286
3382
|
|
|
@@ -9880,10 +9976,11 @@ class RuntimeRegistry {
|
|
|
9880
9976
|
continue;
|
|
9881
9977
|
}
|
|
9882
9978
|
const probedAt = this.clock();
|
|
9883
|
-
const adapter = this.adapters[runtime
|
|
9979
|
+
const adapter = this.adapters[localRuntimeKind(runtime)];
|
|
9884
9980
|
const options = this.createProbeOptions(runtime, probedAt);
|
|
9885
9981
|
try {
|
|
9886
|
-
|
|
9982
|
+
const snapshot = await adapter.probe(options);
|
|
9983
|
+
snapshots.push({ ...snapshot, id: runtime.id });
|
|
9887
9984
|
} catch (error) {
|
|
9888
9985
|
snapshots.push(unavailableSnapshot({
|
|
9889
9986
|
id: runtime.id,
|
|
@@ -9903,7 +10000,7 @@ class RuntimeRegistry {
|
|
|
9903
10000
|
if (runtime.baseURL !== undefined) {
|
|
9904
10001
|
options.baseURL = runtime.baseURL;
|
|
9905
10002
|
}
|
|
9906
|
-
if (runtime
|
|
10003
|
+
if (localRuntimeKind(runtime) === "foundry-local" && runtime.discovery !== "manual" && this.foundryDiscovery !== undefined) {
|
|
9907
10004
|
options.discovery = this.foundryDiscovery;
|
|
9908
10005
|
}
|
|
9909
10006
|
return options;
|
|
@@ -10551,6 +10648,60 @@ function describeOtelBackendForDoctor(config, env) {
|
|
|
10551
10648
|
};
|
|
10552
10649
|
}
|
|
10553
10650
|
|
|
10651
|
+
// src/telemetry/queueWait.ts
|
|
10652
|
+
function percentile(sortedAsc, p) {
|
|
10653
|
+
const rank = Math.ceil(p / 100 * sortedAsc.length);
|
|
10654
|
+
const index = Math.min(Math.max(rank, 1), sortedAsc.length) - 1;
|
|
10655
|
+
return sortedAsc[index] ?? 0;
|
|
10656
|
+
}
|
|
10657
|
+
function summarizeGroup(runtimeId, waits, maxQueued, maxActive) {
|
|
10658
|
+
const sorted = [...waits].sort((a, b) => a - b);
|
|
10659
|
+
return {
|
|
10660
|
+
runtimeId,
|
|
10661
|
+
samples: sorted.length,
|
|
10662
|
+
contended: sorted.filter((wait) => wait > 0).length,
|
|
10663
|
+
p50Ms: percentile(sorted, 50),
|
|
10664
|
+
p95Ms: percentile(sorted, 95),
|
|
10665
|
+
maxMs: sorted[sorted.length - 1] ?? 0,
|
|
10666
|
+
maxQueued,
|
|
10667
|
+
maxActive
|
|
10668
|
+
};
|
|
10669
|
+
}
|
|
10670
|
+
function summarizeQueueWaits(events) {
|
|
10671
|
+
if (events.length === 0) {
|
|
10672
|
+
return;
|
|
10673
|
+
}
|
|
10674
|
+
const allWaits = [];
|
|
10675
|
+
let overallMaxQueued = 0;
|
|
10676
|
+
let overallMaxActive = 0;
|
|
10677
|
+
const byRuntime = new Map;
|
|
10678
|
+
for (const event of events) {
|
|
10679
|
+
allWaits.push(event.waitedMs);
|
|
10680
|
+
overallMaxQueued = Math.max(overallMaxQueued, event.queuedCount);
|
|
10681
|
+
overallMaxActive = Math.max(overallMaxActive, event.activeCount);
|
|
10682
|
+
let group = byRuntime.get(event.runtimeId);
|
|
10683
|
+
if (group === undefined) {
|
|
10684
|
+
group = { waits: [], maxQueued: 0, maxActive: 0 };
|
|
10685
|
+
byRuntime.set(event.runtimeId, group);
|
|
10686
|
+
}
|
|
10687
|
+
group.waits.push(event.waitedMs);
|
|
10688
|
+
group.maxQueued = Math.max(group.maxQueued, event.queuedCount);
|
|
10689
|
+
group.maxActive = Math.max(group.maxActive, event.activeCount);
|
|
10690
|
+
}
|
|
10691
|
+
const overall = summarizeGroup("*", allWaits, overallMaxQueued, overallMaxActive);
|
|
10692
|
+
const perRuntime = [...byRuntime.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([runtimeId, group]) => summarizeGroup(runtimeId, group.waits, group.maxQueued, group.maxActive));
|
|
10693
|
+
return {
|
|
10694
|
+
samples: overall.samples,
|
|
10695
|
+
contended: overall.contended,
|
|
10696
|
+
p50Ms: overall.p50Ms,
|
|
10697
|
+
p95Ms: overall.p95Ms,
|
|
10698
|
+
maxMs: overall.maxMs,
|
|
10699
|
+
maxQueued: overall.maxQueued,
|
|
10700
|
+
maxActive: overall.maxActive,
|
|
10701
|
+
perRuntime
|
|
10702
|
+
};
|
|
10703
|
+
}
|
|
10704
|
+
|
|
10554
10705
|
// src/commands/baseline.ts
|
|
10555
10706
|
function formatRef(ref) {
|
|
10556
10707
|
return ref === null ? "—" : `${ref.providerID}/${ref.modelID}`;
|
|
@@ -10711,6 +10862,24 @@ function isNetworkRuntime(baseURL) {
|
|
|
10711
10862
|
return false;
|
|
10712
10863
|
}
|
|
10713
10864
|
}
|
|
10865
|
+
function queueWaitSection(view) {
|
|
10866
|
+
const lines = [" local queue wait (#144, per openteam process):"];
|
|
10867
|
+
const summary = view.summary;
|
|
10868
|
+
if (summary === undefined || summary.samples === 0) {
|
|
10869
|
+
lines.push(" (no queue samples recorded yet — run an orchestrated load, then re-run doctor)");
|
|
10870
|
+
return lines;
|
|
10871
|
+
}
|
|
10872
|
+
const mark = summary.contended > 0 ? "⚠" : "✓";
|
|
10873
|
+
lines.push(` ${mark} ${summary.samples} dispatch(es), ${summary.contended} queued — ` + `p50 ${summary.p50Ms}ms · p95 ${summary.p95Ms}ms · max ${summary.maxMs}ms`);
|
|
10874
|
+
lines.push(` peak depth: ${summary.maxActive} active · ${summary.maxQueued} queued`);
|
|
10875
|
+
for (const runtime of summary.perRuntime) {
|
|
10876
|
+
lines.push(` ${runtime.runtimeId.padEnd(14)} ${runtime.samples} sample(s), ` + `${runtime.contended} queued — p50 ${runtime.p50Ms}ms · p95 ${runtime.p95Ms}ms · ` + `max ${runtime.maxMs}ms · peak ${runtime.maxActive} active/${runtime.maxQueued} queued`);
|
|
10877
|
+
}
|
|
10878
|
+
if (summary.contended > 0) {
|
|
10879
|
+
lines.push(" Lower a runtime's maxConcurrency in .opencode/openteam.json to leave slots for interactive traffic.");
|
|
10880
|
+
}
|
|
10881
|
+
return lines;
|
|
10882
|
+
}
|
|
10714
10883
|
function failureReasonText(reason, searchedPaths) {
|
|
10715
10884
|
switch (reason) {
|
|
10716
10885
|
case "provider-not-configured": {
|
|
@@ -10927,6 +11096,9 @@ function renderDoctor(input) {
|
|
|
10927
11096
|
lines.push(` ⚠ ${snapshot.id} is reached over the network: its ${cap}-slot cap is enforced per openteam process, so`, " two processes at once (an opencode session plus 'openteam console') can together exceed it.");
|
|
10928
11097
|
}
|
|
10929
11098
|
lines.push(` telemetry: ${input.telemetryPath} — ${input.telemetryRecords} record(s)`);
|
|
11099
|
+
if (input.queueWait !== undefined) {
|
|
11100
|
+
lines.push(...queueWaitSection(input.queueWait));
|
|
11101
|
+
}
|
|
10930
11102
|
if (input.diagnostics !== undefined) {
|
|
10931
11103
|
lines.push(...diagnosticsSection(input.diagnostics));
|
|
10932
11104
|
}
|
|
@@ -11463,23 +11635,38 @@ function knownRuntime(id) {
|
|
|
11463
11635
|
function firstEnabled(runtimes) {
|
|
11464
11636
|
return runtimes.find((runtime) => runtime.enabled);
|
|
11465
11637
|
}
|
|
11638
|
+
function choiceKind(choice) {
|
|
11639
|
+
return choice.kind ?? choice.id;
|
|
11640
|
+
}
|
|
11641
|
+
function choiceProviderID(choice) {
|
|
11642
|
+
return choice.providerID ?? choice.id;
|
|
11643
|
+
}
|
|
11466
11644
|
function buildOpenTeamConfig(answers) {
|
|
11467
11645
|
const runtimes = answers.runtimes.filter((choice) => choice.enabled).map((choice) => {
|
|
11468
11646
|
const runtime = {
|
|
11469
11647
|
id: choice.id,
|
|
11470
11648
|
enabled: choice.enabled,
|
|
11471
|
-
defaultModel: {
|
|
11649
|
+
defaultModel: {
|
|
11650
|
+
providerID: choiceProviderID(choice),
|
|
11651
|
+
modelID: choice.defaultModelID
|
|
11652
|
+
},
|
|
11472
11653
|
maxConcurrency: choice.maxConcurrency ?? DEFAULT_LOCAL_MAX_CONCURRENCY
|
|
11473
11654
|
};
|
|
11655
|
+
if (choice.kind !== undefined && choice.kind !== choice.id) {
|
|
11656
|
+
runtime.kind = choice.kind;
|
|
11657
|
+
}
|
|
11474
11658
|
if (choice.baseURL !== undefined) {
|
|
11475
11659
|
runtime.baseURL = choice.baseURL;
|
|
11476
|
-
} else if (knownRuntime(choice
|
|
11660
|
+
} else if (knownRuntime(choiceKind(choice)).dynamicPort === true) {
|
|
11477
11661
|
runtime.discovery = "cli";
|
|
11478
11662
|
}
|
|
11479
11663
|
return runtime;
|
|
11480
11664
|
});
|
|
11481
11665
|
const primaryLocal = firstEnabled(answers.runtimes);
|
|
11482
|
-
const localDefault2 = primaryLocal !== undefined ? {
|
|
11666
|
+
const localDefault2 = primaryLocal !== undefined ? {
|
|
11667
|
+
providerID: choiceProviderID(primaryLocal),
|
|
11668
|
+
modelID: primaryLocal.defaultModelID
|
|
11669
|
+
} : null;
|
|
11483
11670
|
const localOnly = answers.localOnly === true && primaryLocal !== undefined;
|
|
11484
11671
|
return OpenTeamConfigSchema.parse({
|
|
11485
11672
|
baseline: {
|
|
@@ -11500,11 +11687,12 @@ function buildOpenTeamConfig(answers) {
|
|
|
11500
11687
|
}
|
|
11501
11688
|
function buildOpencodeConfig(answers) {
|
|
11502
11689
|
const provider = {};
|
|
11690
|
+
const providerOwner = new Map;
|
|
11503
11691
|
for (const choice of answers.runtimes) {
|
|
11504
11692
|
if (!choice.enabled) {
|
|
11505
11693
|
continue;
|
|
11506
11694
|
}
|
|
11507
|
-
const meta = knownRuntime(choice
|
|
11695
|
+
const meta = knownRuntime(choiceKind(choice));
|
|
11508
11696
|
const baseURL = choice.baseURL ?? meta.defaultBaseURL;
|
|
11509
11697
|
if (baseURL === undefined) {
|
|
11510
11698
|
continue;
|
|
@@ -11514,16 +11702,33 @@ function buildOpencodeConfig(answers) {
|
|
|
11514
11702
|
for (const modelID of modelIDs) {
|
|
11515
11703
|
models[modelID] = { name: modelID };
|
|
11516
11704
|
}
|
|
11517
|
-
|
|
11705
|
+
const providerID = choiceProviderID(choice);
|
|
11706
|
+
const owner = providerOwner.get(providerID);
|
|
11707
|
+
if (owner !== undefined) {
|
|
11708
|
+
if (owner.baseURL !== baseURL) {
|
|
11709
|
+
throw new Error(`local runtimes "${owner.instanceId}" and "${choice.id}" both use ` + `opencode provider "${providerID}" but declare different baseURLs ` + `(${owner.baseURL} vs ${baseURL}); give each instance a distinct ` + "providerID so opencode can reach both machines.");
|
|
11710
|
+
}
|
|
11711
|
+
const existing = provider[providerID];
|
|
11712
|
+
if (existing !== undefined) {
|
|
11713
|
+
provider[providerID] = {
|
|
11714
|
+
...existing,
|
|
11715
|
+
models: { ...existing.models, ...models }
|
|
11716
|
+
};
|
|
11717
|
+
}
|
|
11718
|
+
continue;
|
|
11719
|
+
}
|
|
11720
|
+
const name = choice.id === choiceKind(choice) ? `${meta.label} (local)` : `${meta.label} (local · ${choice.id})`;
|
|
11721
|
+
provider[providerID] = {
|
|
11518
11722
|
npm: "@ai-sdk/openai-compatible",
|
|
11519
|
-
name
|
|
11723
|
+
name,
|
|
11520
11724
|
options: { baseURL },
|
|
11521
11725
|
models
|
|
11522
11726
|
};
|
|
11727
|
+
providerOwner.set(providerID, { instanceId: choice.id, baseURL });
|
|
11523
11728
|
}
|
|
11524
11729
|
const primaryLocal = firstEnabled(answers.runtimes);
|
|
11525
11730
|
const localOnly = answers.localOnly === true && primaryLocal !== undefined;
|
|
11526
|
-
const mainModel = localOnly && primaryLocal !== undefined ? `${primaryLocal
|
|
11731
|
+
const mainModel = localOnly && primaryLocal !== undefined ? `${choiceProviderID(primaryLocal)}/${primaryLocal.defaultModelID}` : `${answers.frontier.providerID}/${answers.frontier.modelID}`;
|
|
11527
11732
|
const config = {
|
|
11528
11733
|
$schema: "https://opencode.ai/config.json",
|
|
11529
11734
|
plugin: [OPENTEAM_PLUGIN_SPEC],
|
|
@@ -11533,7 +11738,7 @@ function buildOpencodeConfig(answers) {
|
|
|
11533
11738
|
config.provider = provider;
|
|
11534
11739
|
}
|
|
11535
11740
|
if (primaryLocal !== undefined) {
|
|
11536
|
-
config.small_model = `${primaryLocal
|
|
11741
|
+
config.small_model = `${choiceProviderID(primaryLocal)}/${primaryLocal.defaultModelID}`;
|
|
11537
11742
|
}
|
|
11538
11743
|
if (answers.yolo) {
|
|
11539
11744
|
config.permission = { "*": "allow" };
|
|
@@ -11738,6 +11943,62 @@ async function resolveEnabledRuntime(deps, meta, info) {
|
|
|
11738
11943
|
}
|
|
11739
11944
|
return choice;
|
|
11740
11945
|
}
|
|
11946
|
+
function instanceSuffix(index) {
|
|
11947
|
+
return index < 26 ? String.fromCharCode(97 + index) : String(index + 1);
|
|
11948
|
+
}
|
|
11949
|
+
async function promptSlotCount(prompt, meta) {
|
|
11950
|
+
const raw = await prompt.text({
|
|
11951
|
+
message: `How many concurrent generation slots does ${meta.label} have? (match its real capacity; leaving one free keeps interactive work responsive)`,
|
|
11952
|
+
placeholder: String(DEFAULT_LOCAL_MAX_CONCURRENCY),
|
|
11953
|
+
initial: String(DEFAULT_LOCAL_MAX_CONCURRENCY)
|
|
11954
|
+
});
|
|
11955
|
+
const parsed = Number.parseInt(raw.trim(), 10);
|
|
11956
|
+
return Number.isInteger(parsed) && parsed > 0 ? parsed : DEFAULT_LOCAL_MAX_CONCURRENCY;
|
|
11957
|
+
}
|
|
11958
|
+
async function promptInstanceId(prompt, meta, defaultId, usedIds) {
|
|
11959
|
+
for (;; ) {
|
|
11960
|
+
const raw = await prompt.text({
|
|
11961
|
+
message: `Instance id for this ${meta.label} machine (unique across your fleet)`,
|
|
11962
|
+
placeholder: defaultId,
|
|
11963
|
+
initial: defaultId
|
|
11964
|
+
});
|
|
11965
|
+
const id = raw.trim().length > 0 ? raw.trim() : defaultId;
|
|
11966
|
+
if (!usedIds.has(id)) {
|
|
11967
|
+
return id;
|
|
11968
|
+
}
|
|
11969
|
+
prompt.note(`Instance id "${id}" is already used; enter a different one.`, "Duplicate instance id");
|
|
11970
|
+
}
|
|
11971
|
+
}
|
|
11972
|
+
async function resolveRuntimeInstances(deps, meta, info, usedIds) {
|
|
11973
|
+
const fleet = await deps.prompt.confirm({
|
|
11974
|
+
message: `Do you run more than one ${meta.label} machine? (declare each host with its own URL and slot count)`,
|
|
11975
|
+
initial: false
|
|
11976
|
+
});
|
|
11977
|
+
if (!fleet) {
|
|
11978
|
+
const choice = await resolveEnabledRuntime(deps, meta, info);
|
|
11979
|
+
choice.maxConcurrency = await promptSlotCount(deps.prompt, meta);
|
|
11980
|
+
usedIds.add(choice.id);
|
|
11981
|
+
return [choice];
|
|
11982
|
+
}
|
|
11983
|
+
const instances = [];
|
|
11984
|
+
for (;; ) {
|
|
11985
|
+
const defaultId = `${meta.id}-${instanceSuffix(instances.length)}`;
|
|
11986
|
+
const id = await promptInstanceId(deps.prompt, meta, defaultId, usedIds);
|
|
11987
|
+
const choice = await resolveEnabledRuntime(deps, meta, info);
|
|
11988
|
+
choice.id = id;
|
|
11989
|
+
choice.kind = meta.id;
|
|
11990
|
+
choice.maxConcurrency = await promptSlotCount(deps.prompt, meta);
|
|
11991
|
+
usedIds.add(id);
|
|
11992
|
+
instances.push(choice);
|
|
11993
|
+
const another = await deps.prompt.confirm({
|
|
11994
|
+
message: `Add another ${meta.label} machine?`,
|
|
11995
|
+
initial: false
|
|
11996
|
+
});
|
|
11997
|
+
if (!another) {
|
|
11998
|
+
return instances;
|
|
11999
|
+
}
|
|
12000
|
+
}
|
|
12001
|
+
}
|
|
11741
12002
|
async function runSetup(deps) {
|
|
11742
12003
|
const { prompt } = deps;
|
|
11743
12004
|
try {
|
|
@@ -11765,6 +12026,7 @@ async function runSetup(deps) {
|
|
|
11765
12026
|
});
|
|
11766
12027
|
const enabled = new Set(enabledIds.filter((id) => id !== RUNTIME_NONE));
|
|
11767
12028
|
const runtimes = [];
|
|
12029
|
+
const usedIds = new Set;
|
|
11768
12030
|
for (const meta of KNOWN_RUNTIMES) {
|
|
11769
12031
|
const info = detectedById.get(meta.id);
|
|
11770
12032
|
const isEnabled = enabled.has(meta.id);
|
|
@@ -11782,7 +12044,7 @@ async function runSetup(deps) {
|
|
|
11782
12044
|
runtimes.push(choice);
|
|
11783
12045
|
continue;
|
|
11784
12046
|
}
|
|
11785
|
-
runtimes.push(await
|
|
12047
|
+
runtimes.push(...await resolveRuntimeInstances(deps, meta, info, usedIds));
|
|
11786
12048
|
}
|
|
11787
12049
|
const hasLocalEnabled = enabled.size > 0;
|
|
11788
12050
|
const localOnly = hasLocalEnabled ? await prompt.confirm({
|
|
@@ -13454,6 +13716,12 @@ async function runCli(argv, deps) {
|
|
|
13454
13716
|
rosterLoadError = err instanceof Error ? err.message : String(err);
|
|
13455
13717
|
}
|
|
13456
13718
|
}
|
|
13719
|
+
let queueWait;
|
|
13720
|
+
if (deps.readQueueEvents !== undefined) {
|
|
13721
|
+
const queueEvents = await deps.readQueueEvents();
|
|
13722
|
+
const summary = summarizeQueueWaits(queueEvents);
|
|
13723
|
+
queueWait = summary !== undefined ? { summary } : {};
|
|
13724
|
+
}
|
|
13457
13725
|
return {
|
|
13458
13726
|
exitCode: 0,
|
|
13459
13727
|
stdout: renderDoctor({
|
|
@@ -13463,6 +13731,7 @@ async function runCli(argv, deps) {
|
|
|
13463
13731
|
telemetryRecords: records.length,
|
|
13464
13732
|
agentModels,
|
|
13465
13733
|
opencodeConfigPaths,
|
|
13734
|
+
...queueWait !== undefined ? { queueWait } : {},
|
|
13466
13735
|
...rosterAudit !== undefined ? { rosterAudit } : {},
|
|
13467
13736
|
...rosterRoleCount !== undefined ? { rosterRoleCount } : {},
|
|
13468
13737
|
...rosterLoadError !== undefined ? { rosterLoadError } : {},
|
|
@@ -15506,7 +15775,7 @@ async function buildMemoryRuntimeFromConfig(config, deps, options = {}) {
|
|
|
15506
15775
|
// package.json
|
|
15507
15776
|
var package_default = {
|
|
15508
15777
|
name: "@jmanuelcorral/openteam",
|
|
15509
|
-
version: "0.
|
|
15778
|
+
version: "0.15.0",
|
|
15510
15779
|
packageManager: "bun@1.3.14",
|
|
15511
15780
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
15512
15781
|
license: "MIT",
|
|
@@ -15678,12 +15947,12 @@ async function readConfigFile(path4, resolution) {
|
|
|
15678
15947
|
}
|
|
15679
15948
|
}
|
|
15680
15949
|
async function loadConfig(path4, resolution = { explicit: false }) {
|
|
15681
|
-
const
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
}
|
|
15685
|
-
const
|
|
15686
|
-
return
|
|
15950
|
+
const configStorage = resolution.explicit ? {
|
|
15951
|
+
...storage,
|
|
15952
|
+
read: (requestedPath) => requestedPath === path4 ? readConfigFile(path4, resolution) : storage.read(requestedPath)
|
|
15953
|
+
} : storage;
|
|
15954
|
+
const overlayPath = resolution.explicit ? null : DEFAULT_LOCAL_OVERLAY_PATH;
|
|
15955
|
+
return (await loadRuntimeOpenTeamConfig(configStorage, undefined, path4, overlayPath)).config;
|
|
15687
15956
|
}
|
|
15688
15957
|
async function saveConfig(config, path4, resolution = { explicit: false }) {
|
|
15689
15958
|
if (!resolution.explicit) {
|
|
@@ -15798,6 +16067,9 @@ var deps = {
|
|
|
15798
16067
|
storage,
|
|
15799
16068
|
legacyTelemetryPath: path4
|
|
15800
16069
|
}),
|
|
16070
|
+
readQueueEvents: () => readQueueEvents(DEFAULT_SESSIONS_DIR, {
|
|
16071
|
+
storage
|
|
16072
|
+
}),
|
|
15801
16073
|
readDiagnostics: () => readDiagnosticEvents(DEFAULT_SESSIONS_DIR, {
|
|
15802
16074
|
storage
|
|
15803
16075
|
}),
|
|
@@ -15924,18 +16196,30 @@ function createSetupDeps() {
|
|
|
15924
16196
|
}
|
|
15925
16197
|
};
|
|
15926
16198
|
}
|
|
15927
|
-
function createRolesInitDeps() {
|
|
15928
|
-
const detect = createDetect(nodeExec2);
|
|
16199
|
+
function createRolesInitDeps(configSelection) {
|
|
15929
16200
|
return {
|
|
15930
16201
|
prompt: clackPrompter,
|
|
15931
16202
|
readFile: (path4) => storage.read(path4),
|
|
15932
16203
|
writeFile: async (path4, contents) => {
|
|
15933
16204
|
await storage.write(path4, contents);
|
|
15934
16205
|
},
|
|
15935
|
-
detectRuntimes: async () =>
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
16206
|
+
detectRuntimes: async () => {
|
|
16207
|
+
const config = await loadConfig(configSelection.path, configSelection.resolution);
|
|
16208
|
+
const enabled = config.local.runtimes.filter((runtime) => runtime.enabled);
|
|
16209
|
+
if (enabled.length === 0) {
|
|
16210
|
+
return [];
|
|
16211
|
+
}
|
|
16212
|
+
const registry = new RuntimeRegistry({
|
|
16213
|
+
fetch: globalThis.fetch,
|
|
16214
|
+
clock: () => new Date().toISOString(),
|
|
16215
|
+
foundryDiscovery: foundryDiscoveryFromExec(nodeExec2)
|
|
16216
|
+
});
|
|
16217
|
+
const snapshots = await registry.probe(enabled);
|
|
16218
|
+
return snapshots.map((snapshot) => ({
|
|
16219
|
+
id: snapshot.id,
|
|
16220
|
+
available: snapshot.reachable
|
|
16221
|
+
}));
|
|
16222
|
+
}
|
|
15939
16223
|
};
|
|
15940
16224
|
}
|
|
15941
16225
|
async function main() {
|
|
@@ -15951,7 +16235,7 @@ async function main() {
|
|
|
15951
16235
|
return;
|
|
15952
16236
|
}
|
|
15953
16237
|
if (argv[0] === "roles" && argv[1] === "init") {
|
|
15954
|
-
const result2 = await runRolesInit(createRolesInitDeps());
|
|
16238
|
+
const result2 = await runRolesInit(createRolesInitDeps(configSelection));
|
|
15955
16239
|
if (result2.stdout.length > 0) {
|
|
15956
16240
|
process.stdout.write(`${result2.stdout}
|
|
15957
16241
|
`);
|
|
@@ -8,6 +8,7 @@ import { type AgentRoleProfile } from "../orchestrator/roles";
|
|
|
8
8
|
import { type Roster } from "../orchestrator/roster";
|
|
9
9
|
import type { RosterFileLoadResult } from "../orchestrator/rosterPersistence";
|
|
10
10
|
import { type WorktreeObservation, type WorktreeReconcileAction } from "../orchestrator/worktreeReconciler";
|
|
11
|
+
import type { QueueEvent } from "../telemetry/events";
|
|
11
12
|
import type { CostRecord } from "../telemetry/types";
|
|
12
13
|
import { type AgentFile } from "./agents";
|
|
13
14
|
import type { CachePort } from "./clearCache";
|
|
@@ -19,6 +20,13 @@ export type CliDeps = {
|
|
|
19
20
|
saveConfig: (config: OpenTeamConfig, path: string, options?: ConfigPathResolution) => Promise<void>;
|
|
20
21
|
probe: (config: OpenTeamConfig) => Promise<LocalRuntimeSnapshot[]>;
|
|
21
22
|
readTelemetry: (path: string) => Promise<CostRecord[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Reads the per-dispatch local-runtime queue metric events (#144) for the
|
|
25
|
+
* `openteam doctor` queue-wait summary. Optional so older composition roots
|
|
26
|
+
* still run; when absent, doctor omits the `local queue wait` section rather
|
|
27
|
+
* than inventing zeros.
|
|
28
|
+
*/
|
|
29
|
+
readQueueEvents?: () => Promise<QueueEvent[]>;
|
|
22
30
|
/**
|
|
23
31
|
* Reads plugin-safe diagnostics persisted by the opencode plugin. Optional so
|
|
24
32
|
* older composition roots still run; when absent, doctor omits the section.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/commands/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEZ,aAAa,EACd,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,KAAK,gBAAgB,EAAc,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAA2B,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/commands/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEZ,aAAa,EACd,MAAM,8BAA8B,CAAC;AAGtC,OAA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