@jmanuelcorral/openteam 0.9.0 → 0.9.1
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 +1 -1
- package/README.md +1 -1
- package/dist/cli.js +163 -26
- package/dist/commands/dispatch.d.ts +6 -0
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +13 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +307 -63
- package/dist/orchestrator/coordinator.d.ts +8 -5
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/permissions.d.ts.map +1 -1
- package/dist/orchestrator/roles.d.ts +23 -4
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/plugin/diagnostics.d.ts +30 -0
- package/dist/plugin/diagnostics.d.ts.map +1 -0
- package/dist/plugin/orchestrateTool.d.ts +3 -1
- package/dist/plugin/orchestrateTool.d.ts.map +1 -1
- package/dist/storage/index/memoryIndex.d.ts +2 -2
- package/dist/storage/index/memoryIndex.d.ts.map +1 -1
- package/dist/telemetry/diagnostics.d.ts +10 -0
- package/dist/telemetry/diagnostics.d.ts.map +1 -0
- package/dist/telemetry/eventLog.d.ts +3 -1
- package/dist/telemetry/eventLog.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +77 -0
- package/dist/telemetry/events.d.ts.map +1 -1
- package/package.json +1 -1
package/README.es.md
CHANGED
|
@@ -819,7 +819,7 @@ Consulta [docs/compatibility.md](docs/compatibility.md). Resumen verificado el `
|
|
|
819
819
|
|
|
820
820
|
| Superficie | Versión / contrato |
|
|
821
821
|
| --- | --- |
|
|
822
|
-
| openteam | `0.9.
|
|
822
|
+
| openteam | `0.9.1`; versión actual del paquete |
|
|
823
823
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
824
824
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
825
825
|
| Hook de routing | `chat.message`; no `chat.params` para cambiar modelo |
|
package/README.md
CHANGED
|
@@ -700,7 +700,7 @@ See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026
|
|
|
700
700
|
|
|
701
701
|
| Surface | Version / contract |
|
|
702
702
|
| --- | --- |
|
|
703
|
-
| openteam | `0.9.
|
|
703
|
+
| openteam | `0.9.1`; current package version |
|
|
704
704
|
| `@opencode-ai/plugin` | `1.18.19` |
|
|
705
705
|
| `@opencode-ai/sdk` | `1.18.19` |
|
|
706
706
|
| Routing hook | `chat.message`; not `chat.params` for model changes |
|
package/dist/cli.js
CHANGED
|
@@ -104,8 +104,8 @@ var AgentRoleProfileSchema = z.object({
|
|
|
104
104
|
localRuntimes: z.array(z.enum(["ollama", "lmstudio", "foundry-local", "lemonade"])).optional()
|
|
105
105
|
}).strict();
|
|
106
106
|
var TEAM_ROLES = {
|
|
107
|
-
|
|
108
|
-
roleID: "
|
|
107
|
+
architect: {
|
|
108
|
+
roleID: "architect",
|
|
109
109
|
opencodeAgent: "architect",
|
|
110
110
|
defaultTier: "hard",
|
|
111
111
|
minReasoningTier: 5,
|
|
@@ -114,8 +114,8 @@ var TEAM_ROLES = {
|
|
|
114
114
|
preferredFrontierModels: ["auto"],
|
|
115
115
|
localFirst: false
|
|
116
116
|
},
|
|
117
|
-
|
|
118
|
-
roleID: "
|
|
117
|
+
integration: {
|
|
118
|
+
roleID: "integration",
|
|
119
119
|
opencodeAgent: "integration",
|
|
120
120
|
defaultTier: "moderate",
|
|
121
121
|
minReasoningTier: 4,
|
|
@@ -124,8 +124,8 @@ var TEAM_ROLES = {
|
|
|
124
124
|
preferredFrontierModels: ["auto"],
|
|
125
125
|
localFirst: false
|
|
126
126
|
},
|
|
127
|
-
|
|
128
|
-
roleID: "
|
|
127
|
+
"local-runtime": {
|
|
128
|
+
roleID: "local-runtime",
|
|
129
129
|
opencodeAgent: "local-runtime",
|
|
130
130
|
defaultTier: "moderate",
|
|
131
131
|
minReasoningTier: 3,
|
|
@@ -134,8 +134,8 @@ var TEAM_ROLES = {
|
|
|
134
134
|
preferredFrontierModels: ["auto"],
|
|
135
135
|
localFirst: true
|
|
136
136
|
},
|
|
137
|
-
|
|
138
|
-
roleID: "
|
|
137
|
+
"routing-cost": {
|
|
138
|
+
roleID: "routing-cost",
|
|
139
139
|
opencodeAgent: "routing-cost",
|
|
140
140
|
defaultTier: "moderate",
|
|
141
141
|
minReasoningTier: 3,
|
|
@@ -177,8 +177,8 @@ var TEAM_ROLES = {
|
|
|
177
177
|
localFirst: true,
|
|
178
178
|
requiresLocalRuntime: true
|
|
179
179
|
},
|
|
180
|
-
|
|
181
|
-
roleID: "
|
|
180
|
+
tester: {
|
|
181
|
+
roleID: "tester",
|
|
182
182
|
opencodeAgent: "tester",
|
|
183
183
|
defaultTier: "simple",
|
|
184
184
|
minReasoningTier: 2,
|
|
@@ -198,8 +198,35 @@ var TEAM_ROLES = {
|
|
|
198
198
|
localFirst: true
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
+
var LEGACY_TEAM_ROLE_ALIASES = {
|
|
202
|
+
rusty: "architect",
|
|
203
|
+
livingston: "integration",
|
|
204
|
+
yen: "local-runtime",
|
|
205
|
+
basher: "routing-cost",
|
|
206
|
+
linus: "tester"
|
|
207
|
+
};
|
|
208
|
+
var KNOWN_NON_WORKER_ROLE_IDS = ["openteam"];
|
|
209
|
+
function isKnownNonWorkerRole(roleID) {
|
|
210
|
+
return KNOWN_NON_WORKER_ROLE_IDS.includes(roleID);
|
|
211
|
+
}
|
|
212
|
+
function getConfiguredRoleProfileByAlias(roleID, roles) {
|
|
213
|
+
if (roles === undefined) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
for (const key of Object.keys(roles).sort()) {
|
|
217
|
+
const profile = roles[key];
|
|
218
|
+
if (profile?.opencodeAgent === roleID) {
|
|
219
|
+
return profile;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
function getLegacyTeamRoleProfile(roleID) {
|
|
225
|
+
const canonicalRoleID = LEGACY_TEAM_ROLE_ALIASES[roleID];
|
|
226
|
+
return canonicalRoleID === undefined ? undefined : TEAM_ROLES[canonicalRoleID];
|
|
227
|
+
}
|
|
201
228
|
function getRoleProfile(roleID, configuredRoles) {
|
|
202
|
-
return configuredRoles?.[roleID] ?? TEAM_ROLES[roleID];
|
|
229
|
+
return configuredRoles?.[roleID] ?? TEAM_ROLES[roleID] ?? getConfiguredRoleProfileByAlias(roleID, configuredRoles) ?? getLegacyTeamRoleProfile(roleID);
|
|
203
230
|
}
|
|
204
231
|
function synthesiseFallbackProfile(roleID) {
|
|
205
232
|
return {
|
|
@@ -967,6 +994,50 @@ var ModelCapabilityProfileSchema = z3.object({
|
|
|
967
994
|
availability: z3.enum(["available", "degraded", "unavailable"])
|
|
968
995
|
}).strict();
|
|
969
996
|
|
|
997
|
+
// src/telemetry/diagnostics.ts
|
|
998
|
+
var DIAGNOSTIC_CODES = [
|
|
999
|
+
"availability-refresh-failed",
|
|
1000
|
+
"config-missing",
|
|
1001
|
+
"graph-gate-denied",
|
|
1002
|
+
"memory-extraction-warning",
|
|
1003
|
+
"memory-runtime-warning",
|
|
1004
|
+
"opencode-server-url",
|
|
1005
|
+
"opencode-version-read-failed",
|
|
1006
|
+
"privacy-inert",
|
|
1007
|
+
"soak-evidence-rejected",
|
|
1008
|
+
"telemetry-warning",
|
|
1009
|
+
"telemetry-write-failed",
|
|
1010
|
+
"unknown-role"
|
|
1011
|
+
];
|
|
1012
|
+
function diagnosticDescription(code) {
|
|
1013
|
+
switch (code) {
|
|
1014
|
+
case "availability-refresh-failed":
|
|
1015
|
+
return "Local runtime availability refresh failed; routing will continue with the previous or empty availability snapshot.";
|
|
1016
|
+
case "config-missing":
|
|
1017
|
+
return "openteam did not find its runtime config file; defaults or plugin options were used.";
|
|
1018
|
+
case "graph-gate-denied":
|
|
1019
|
+
return "The graph cutover gate denied active mode and openteam degraded graph mode to off.";
|
|
1020
|
+
case "memory-extraction-warning":
|
|
1021
|
+
return "Semantic memory extraction reported a non-fatal local-runtime warning; no raw conversation content was recorded.";
|
|
1022
|
+
case "memory-runtime-warning":
|
|
1023
|
+
return "Semantic memory runtime setup reported a non-fatal warning; memory recall may be incomplete.";
|
|
1024
|
+
case "opencode-server-url":
|
|
1025
|
+
return "openteam observed the opencode server URL during plugin initialization.";
|
|
1026
|
+
case "opencode-version-read-failed":
|
|
1027
|
+
return "openteam could not read the live opencode version; graph gates fail closed when this happens.";
|
|
1028
|
+
case "privacy-inert":
|
|
1029
|
+
return "forceLocalOnSensitive is configured but no local runtime is configured, so the setting cannot keep sensitive prompts local.";
|
|
1030
|
+
case "soak-evidence-rejected":
|
|
1031
|
+
return "Graph soak evidence contained rejected observation lines; cutover gate evidence may be incomplete.";
|
|
1032
|
+
case "telemetry-warning":
|
|
1033
|
+
return "An optional telemetry backend warning occurred; local JSONL telemetry remains the fallback when enabled.";
|
|
1034
|
+
case "telemetry-write-failed":
|
|
1035
|
+
return "Writing an openteam telemetry event failed; plugin execution continued.";
|
|
1036
|
+
case "unknown-role":
|
|
1037
|
+
return "An unknown role ID was encountered; openteam used a neutral frontier-eligible fallback. If intentional, define the role in orchestrator.roles.";
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
970
1041
|
// src/telemetry/events.ts
|
|
971
1042
|
var EVENT_SCHEMA_VERSION = 1;
|
|
972
1043
|
var EventBaseSchema = z4.object({
|
|
@@ -1060,6 +1131,13 @@ var ShadowDiagnosticEventSchema = EventBaseSchema.extend({
|
|
|
1060
1131
|
"unknown"
|
|
1061
1132
|
])
|
|
1062
1133
|
});
|
|
1134
|
+
var DiagnosticLevelSchema = z4.enum(["debug", "info", "warn", "error"]);
|
|
1135
|
+
var DiagnosticCodeSchema = z4.enum(DIAGNOSTIC_CODES);
|
|
1136
|
+
var DiagnosticEventSchema = EventBaseSchema.extend({
|
|
1137
|
+
type: z4.literal("diagnostic"),
|
|
1138
|
+
level: DiagnosticLevelSchema,
|
|
1139
|
+
code: DiagnosticCodeSchema
|
|
1140
|
+
});
|
|
1063
1141
|
var OpenTeamEventSchema = z4.discriminatedUnion("type", [
|
|
1064
1142
|
RouteEventSchema,
|
|
1065
1143
|
MessageEventSchema,
|
|
@@ -1068,7 +1146,8 @@ var OpenTeamEventSchema = z4.discriminatedUnion("type", [
|
|
|
1068
1146
|
DecisionEventSchema,
|
|
1069
1147
|
ActivityEventSchema,
|
|
1070
1148
|
SessionEndpointEventSchema,
|
|
1071
|
-
ShadowDiagnosticEventSchema
|
|
1149
|
+
ShadowDiagnosticEventSchema,
|
|
1150
|
+
DiagnosticEventSchema
|
|
1072
1151
|
]);
|
|
1073
1152
|
|
|
1074
1153
|
// src/storage/fsStorageProvider.ts
|
|
@@ -1328,6 +1407,9 @@ async function readRouteCostRecords(dir, deps) {
|
|
|
1328
1407
|
}
|
|
1329
1408
|
return records;
|
|
1330
1409
|
}
|
|
1410
|
+
async function readDiagnosticEvents(dir, deps) {
|
|
1411
|
+
return (await readSessionEvents(dir, deps)).filter((event) => event.type === "diagnostic");
|
|
1412
|
+
}
|
|
1331
1413
|
async function readSessionEvents(dir, deps) {
|
|
1332
1414
|
const files = (await deps.storage.list(dir)).filter((file) => file.endsWith(".jsonl"));
|
|
1333
1415
|
const perFile = await Promise.all(files.map(async (file) => {
|
|
@@ -1368,14 +1450,21 @@ function hashPrompt(prompt) {
|
|
|
1368
1450
|
|
|
1369
1451
|
// src/orchestrator/permissions.ts
|
|
1370
1452
|
var ROLE_PERMISSIONS = {
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1453
|
+
architect: [
|
|
1454
|
+
"read",
|
|
1455
|
+
"edit",
|
|
1456
|
+
"multiFileEdit",
|
|
1457
|
+
"destructive",
|
|
1458
|
+
"network",
|
|
1459
|
+
"shell"
|
|
1460
|
+
],
|
|
1461
|
+
integration: ["read", "edit", "multiFileEdit", "network", "shell"],
|
|
1462
|
+
"local-runtime": ["read", "edit", "network", "shell"],
|
|
1463
|
+
"routing-cost": ["read", "edit"],
|
|
1375
1464
|
scribe: ["read", "edit"],
|
|
1376
1465
|
ralph: ["read", "edit", "shell"],
|
|
1377
1466
|
guardian: ["read"],
|
|
1378
|
-
|
|
1467
|
+
tester: ["read", "edit", "shell"],
|
|
1379
1468
|
reviewer: ["read"]
|
|
1380
1469
|
};
|
|
1381
1470
|
var elevatedTier = {
|
|
@@ -1671,6 +1760,8 @@ async function runSubsession(client, req, deps = {}) {
|
|
|
1671
1760
|
|
|
1672
1761
|
// src/orchestrator/coordinator.ts
|
|
1673
1762
|
function warnUnknownRole(roleID, warn, warnedRoles) {
|
|
1763
|
+
if (isKnownNonWorkerRole(roleID))
|
|
1764
|
+
return;
|
|
1674
1765
|
if (warnedRoles !== undefined) {
|
|
1675
1766
|
if (warnedRoles.has(roleID))
|
|
1676
1767
|
return;
|
|
@@ -1749,7 +1840,7 @@ function routingInput(input, role) {
|
|
|
1749
1840
|
...input.task,
|
|
1750
1841
|
prompt: input.task.prompt ?? input.prompt
|
|
1751
1842
|
}).tier;
|
|
1752
|
-
const permissionTier = elevateTierForPermissions(classifiedTier, permissionsFor(
|
|
1843
|
+
const permissionTier = elevateTierForPermissions(classifiedTier, permissionsFor(role.roleID));
|
|
1753
1844
|
const tier = permissionTier;
|
|
1754
1845
|
const requirement = roleToRequirement(role, input.task, tier);
|
|
1755
1846
|
const task = roleAdjustedTask(role, input, requirement);
|
|
@@ -10227,6 +10318,34 @@ function agentModelLine(diagnostic, nameWidth, searchedPaths) {
|
|
|
10227
10318
|
}
|
|
10228
10319
|
return ` ${mark} ${name} [${diagnostic.mode}] ${modelText2} ${provenance} ${parts.join(" · ")}`;
|
|
10229
10320
|
}
|
|
10321
|
+
function diagnosticMark(level) {
|
|
10322
|
+
switch (level) {
|
|
10323
|
+
case "error":
|
|
10324
|
+
return "✗";
|
|
10325
|
+
case "warn":
|
|
10326
|
+
return "⚠";
|
|
10327
|
+
default:
|
|
10328
|
+
return "·";
|
|
10329
|
+
}
|
|
10330
|
+
}
|
|
10331
|
+
function diagnosticsSection(diagnostics) {
|
|
10332
|
+
const notable = diagnostics.filter((diagnostic) => diagnostic.level === "warn" || diagnostic.level === "error");
|
|
10333
|
+
if (notable.length === 0) {
|
|
10334
|
+
return [];
|
|
10335
|
+
}
|
|
10336
|
+
const recent = notable.slice(-5);
|
|
10337
|
+
const lines = [
|
|
10338
|
+
` plugin diagnostics: ${notable.length} warning/error event(s)`
|
|
10339
|
+
];
|
|
10340
|
+
for (const diagnostic of recent) {
|
|
10341
|
+
lines.push(` ${diagnosticMark(diagnostic.level)} [${diagnostic.code}] ${diagnosticDescription(diagnostic.code)}`);
|
|
10342
|
+
}
|
|
10343
|
+
if (notable.length > recent.length) {
|
|
10344
|
+
lines.push(` … ${notable.length - recent.length} older diagnostic event(s) omitted`);
|
|
10345
|
+
}
|
|
10346
|
+
lines.push(" note: plugin diagnostics are bounded classes recorded instead of writing to the opencode TUI console.");
|
|
10347
|
+
return lines;
|
|
10348
|
+
}
|
|
10230
10349
|
function agentModelsSection(diagnostics, searchedPaths) {
|
|
10231
10350
|
const lines = [" agent models:"];
|
|
10232
10351
|
if (diagnostics.length === 0) {
|
|
@@ -10262,6 +10381,9 @@ function renderDoctor(input) {
|
|
|
10262
10381
|
}
|
|
10263
10382
|
}
|
|
10264
10383
|
lines.push(` telemetry: ${input.telemetryPath} — ${input.telemetryRecords} record(s)`);
|
|
10384
|
+
if (input.diagnostics !== undefined) {
|
|
10385
|
+
lines.push(...diagnosticsSection(input.diagnostics));
|
|
10386
|
+
}
|
|
10265
10387
|
if (input.otelBackend !== undefined) {
|
|
10266
10388
|
const otel = input.otelBackend;
|
|
10267
10389
|
lines.push(" opentelemetry:");
|
|
@@ -12622,9 +12744,17 @@ async function runCli(argv, deps) {
|
|
|
12622
12744
|
if (command === "doctor") {
|
|
12623
12745
|
const config = await deps.loadConfig(configPath, configResolution);
|
|
12624
12746
|
let opencodeConfigError;
|
|
12625
|
-
const [
|
|
12747
|
+
const [
|
|
12748
|
+
snapshots,
|
|
12749
|
+
records,
|
|
12750
|
+
diagnostics,
|
|
12751
|
+
cacheEntries,
|
|
12752
|
+
agentFiles,
|
|
12753
|
+
opencodeConfig
|
|
12754
|
+
] = await Promise.all([
|
|
12626
12755
|
deps.probe(config),
|
|
12627
12756
|
deps.readTelemetry(telemetryPath),
|
|
12757
|
+
deps.readDiagnostics !== undefined ? deps.readDiagnostics() : Promise.resolve(undefined),
|
|
12628
12758
|
deps.cachePort !== undefined ? deps.cachePort.listEntries(deps.cachePort.resolveCacheRoot(parsed.cacheRoot)).catch(() => {
|
|
12629
12759
|
return;
|
|
12630
12760
|
}) : Promise.resolve(undefined),
|
|
@@ -12656,6 +12786,7 @@ async function runCli(argv, deps) {
|
|
|
12656
12786
|
telemetryRecords: records.length,
|
|
12657
12787
|
agentModels,
|
|
12658
12788
|
opencodeConfigPaths,
|
|
12789
|
+
...diagnostics !== undefined && diagnostics.length > 0 ? { diagnostics } : {},
|
|
12659
12790
|
...opencodeConfigError !== undefined ? { opencodeConfigError } : {},
|
|
12660
12791
|
...cacheEntries !== undefined ? { cacheEntries, cliVersion: deps.version } : {},
|
|
12661
12792
|
...legacyLayout !== undefined && legacyLayout.length > 0 ? { legacyLayout } : {},
|
|
@@ -13618,16 +13749,16 @@ function insertRecords(db, records) {
|
|
|
13618
13749
|
throw error;
|
|
13619
13750
|
}
|
|
13620
13751
|
}
|
|
13621
|
-
function warnMemoryIndexRecordRejections(result) {
|
|
13752
|
+
function warnMemoryIndexRecordRejections(result, warn) {
|
|
13622
13753
|
if (result.rejectedRows === 0) {
|
|
13623
13754
|
return;
|
|
13624
13755
|
}
|
|
13625
|
-
console.warn(`[openteam] memory index reader rejected ${result.rejectedRows} row(s); semantic memory may be incomplete.`);
|
|
13756
|
+
(warn ?? console.warn)(`[openteam] memory index reader rejected ${result.rejectedRows} row(s); semantic memory may be incomplete.`);
|
|
13626
13757
|
for (const rejection of result.rejections) {
|
|
13627
|
-
console.warn(`[openteam] • memory_records:${rejection.recordId}: ${rejection.detail}`);
|
|
13758
|
+
(warn ?? console.warn)(`[openteam] • memory_records:${rejection.recordId}: ${rejection.detail}`);
|
|
13628
13759
|
}
|
|
13629
13760
|
}
|
|
13630
|
-
function createMemoryIndex(db) {
|
|
13761
|
+
function createMemoryIndex(db, warn) {
|
|
13631
13762
|
db.exec(SCHEMA2);
|
|
13632
13763
|
const allRecordsFn = () => {
|
|
13633
13764
|
const rows = db.query("SELECT id, payload FROM memory_records ORDER BY created_at ASC, id ASC").all();
|
|
@@ -13655,7 +13786,7 @@ function createMemoryIndex(db) {
|
|
|
13655
13786
|
};
|
|
13656
13787
|
const allRecordsWithWarning = () => {
|
|
13657
13788
|
const result = allRecordsFn();
|
|
13658
|
-
warnMemoryIndexRecordRejections(result);
|
|
13789
|
+
warnMemoryIndexRecordRejections(result, warn);
|
|
13659
13790
|
return result.records;
|
|
13660
13791
|
};
|
|
13661
13792
|
const state = () => {
|
|
@@ -14497,7 +14628,7 @@ async function buildMemoryRuntimeFromConfig(config, deps, options = {}) {
|
|
|
14497
14628
|
const warn = deps.warn ?? console.warn;
|
|
14498
14629
|
try {
|
|
14499
14630
|
const db = await openDatabase(semantic.indexPath);
|
|
14500
|
-
const index = createMemoryIndex(db);
|
|
14631
|
+
const index = createMemoryIndex(db, warn);
|
|
14501
14632
|
const rebuildResult = await rebuildMemoryIndexFromStorage(index, semantic.logPath, { storage: deps.storage });
|
|
14502
14633
|
if (rebuildResult.rejectedLines > 0) {
|
|
14503
14634
|
warn(`[openteam] memory log rejected ${rebuildResult.rejectedLines} line(s); semantic memory may be incomplete.`);
|
|
@@ -14518,7 +14649,7 @@ async function buildMemoryRuntimeFromConfig(config, deps, options = {}) {
|
|
|
14518
14649
|
// package.json
|
|
14519
14650
|
var package_default = {
|
|
14520
14651
|
name: "@jmanuelcorral/openteam",
|
|
14521
|
-
version: "0.9.
|
|
14652
|
+
version: "0.9.1",
|
|
14522
14653
|
packageManager: "bun@1.3.14",
|
|
14523
14654
|
description: "Cost-aware, local-first routing plugin for opencode with cheapest-capable frontier fallback and multi-agent orchestration.",
|
|
14524
14655
|
license: "MIT",
|
|
@@ -14798,6 +14929,9 @@ var deps = {
|
|
|
14798
14929
|
storage,
|
|
14799
14930
|
legacyTelemetryPath: path4
|
|
14800
14931
|
}),
|
|
14932
|
+
readDiagnostics: () => readDiagnosticEvents(DEFAULT_SESSIONS_DIR, {
|
|
14933
|
+
storage
|
|
14934
|
+
}),
|
|
14801
14935
|
readGraphSnapshot: createGraphStatusSnapshotReader({
|
|
14802
14936
|
storage,
|
|
14803
14937
|
fallbackConfig: loadOpenTeamConfig({}),
|
|
@@ -14995,6 +15129,9 @@ async function main() {
|
|
|
14995
15129
|
storage,
|
|
14996
15130
|
legacyTelemetryPath: path4
|
|
14997
15131
|
}),
|
|
15132
|
+
readDiagnostics: () => readDiagnosticEvents(effectiveSessionsDir, {
|
|
15133
|
+
storage
|
|
15134
|
+
}),
|
|
14998
15135
|
detectLegacyLayout: async () => detectLegacyLayout(legacyExists),
|
|
14999
15136
|
migrateLegacyLayout: () => migrateLegacyLayout(planLegacyMigration(legacyExists), migratePort)
|
|
15000
15137
|
};
|
|
@@ -9,6 +9,7 @@ import { type WorktreeObservation, type WorktreeReconcileAction } from "../orche
|
|
|
9
9
|
import type { CostRecord } from "../telemetry/types";
|
|
10
10
|
import { type AgentFile } from "./agents";
|
|
11
11
|
import type { CachePort } from "./clearCache";
|
|
12
|
+
import { type DoctorDiagnostic } from "./doctor";
|
|
12
13
|
import { type GraphHealthSnapshot } from "./graph";
|
|
13
14
|
import { type PurgeRuntime } from "./purge";
|
|
14
15
|
export type CliDeps = {
|
|
@@ -16,6 +17,11 @@ export type CliDeps = {
|
|
|
16
17
|
saveConfig: (config: OpenTeamConfig, path: string, options?: ConfigPathResolution) => Promise<void>;
|
|
17
18
|
probe: (config: OpenTeamConfig) => Promise<LocalRuntimeSnapshot[]>;
|
|
18
19
|
readTelemetry: (path: string) => Promise<CostRecord[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Reads plugin-safe diagnostics persisted by the opencode plugin. Optional so
|
|
22
|
+
* older composition roots still run; when absent, doctor omits the section.
|
|
23
|
+
*/
|
|
24
|
+
readDiagnostics?: () => Promise<DoctorDiagnostic[]>;
|
|
19
25
|
/**
|
|
20
26
|
* Reads and deep-merges all candidate opencode config files (later entries in
|
|
21
27
|
* `paths` have lower precedence). Returns `undefined` when none of the paths
|
|
@@ -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;AAE3D,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEZ,aAAa,EACd,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAA2B,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,KAAK,SAAS,EASf,MAAM,UAAU,CAAC;AAOlB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/commands/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAEr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,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACvD,CAAC;AAEF,mDAAmD;AACnD,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CA0BrD;AA2HD,wBAAsB,MAAM,CAC1B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,SAAS,CAAC,CAqQpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LegacyLayoutFinding } from "../config/legacyPaths";
|
|
2
2
|
import type { OpenTeamConfig } from "../config/schema";
|
|
3
3
|
import type { LocalRuntimeSnapshot } from "../local/types";
|
|
4
|
+
import { type DiagnosticCode } from "../telemetry/diagnostics";
|
|
4
5
|
import type { GraphViewHealth } from "../telemetry/graphView";
|
|
5
6
|
import type { OtelDoctorView } from "../telemetry/otelConfig";
|
|
6
7
|
import type { AgentModelDiagnostic } from "./agents";
|
|
@@ -47,6 +48,18 @@ export type DoctorInput = {
|
|
|
47
48
|
* guidance, not a failure.
|
|
48
49
|
*/
|
|
49
50
|
legacyLayout?: readonly LegacyLayoutFinding[];
|
|
51
|
+
/**
|
|
52
|
+
* TUI-safe plugin diagnostics persisted by the plugin instead of writing to
|
|
53
|
+
* stdout/stderr. `doctor` renders warning/error entries so users can discover
|
|
54
|
+
* suppressed plugin-context problems without corrupting opencode's TUI.
|
|
55
|
+
*/
|
|
56
|
+
diagnostics?: readonly DoctorDiagnostic[];
|
|
57
|
+
};
|
|
58
|
+
export type DoctorDiagnostic = {
|
|
59
|
+
readonly ts: number;
|
|
60
|
+
readonly sessionID: string;
|
|
61
|
+
readonly level: "debug" | "info" | "warn" | "error";
|
|
62
|
+
readonly code: DiagnosticCode;
|
|
50
63
|
};
|
|
51
64
|
export declare function renderDoctor(input: DoctorInput): string;
|
|
52
65
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -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,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,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;;;;;OAKG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,iEAAiE;IACjE,YAAY,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC9C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,mBAAm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gBAAgB,EAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;CAC/B,CAAC;AA4KF,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAqHvD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,17 +7,16 @@ import { RuntimeRegistry } from "./local/registry";
|
|
|
7
7
|
import { type ReadAllChainsResult, type RecorderPorts } from "./storage/graph/soakRecorder";
|
|
8
8
|
import type { StorageProvider } from "./storage/provider";
|
|
9
9
|
import { type EventSink } from "./telemetry/eventLog";
|
|
10
|
-
export declare function logAvailabilityRefreshError(error: unknown): void;
|
|
11
|
-
export declare function logTelemetryError(error: unknown): void;
|
|
12
|
-
export declare function logTelemetryWarning(message: string): void;
|
|
13
|
-
export declare function logOpencodeServerUrl(serverUrl: URL): void;
|
|
10
|
+
export declare function logAvailabilityRefreshError(error: unknown, warn?: (message?: unknown) => void): void;
|
|
11
|
+
export declare function logTelemetryError(error: unknown, warn?: (message?: unknown) => void): void;
|
|
12
|
+
export declare function logTelemetryWarning(message: string, warn?: (message?: unknown) => void): void;
|
|
13
|
+
export declare function logOpencodeServerUrl(serverUrl: URL, warn?: (message?: unknown) => void): void;
|
|
14
14
|
export declare const MAX_LOGGED_OPENCODE_VERSION_FAILURE_CAUSES = 64;
|
|
15
15
|
export declare function createOpencodeVersionReadFailureLogger(maxCauses?: number, warn?: (message?: unknown) => void): (error: unknown) => void;
|
|
16
|
-
export declare const logOpencodeVersionReadFailure: (error: unknown) => void;
|
|
17
16
|
export declare function warnNoRuntimeConfigFound(paths: readonly string[], optionsOnly: boolean, localModel: {
|
|
18
17
|
providerID: string;
|
|
19
18
|
modelID: string;
|
|
20
|
-
} | null): void;
|
|
19
|
+
} | null, warn?: (message?: unknown) => void): void;
|
|
21
20
|
/**
|
|
22
21
|
* Fired once at startup when `privacyMode` is `"forceLocalOnSensitive"` but no
|
|
23
22
|
* local runtime is configured. In this state the privacy setting is inert:
|
|
@@ -27,7 +26,7 @@ export declare function warnNoRuntimeConfigFound(paths: readonly string[], optio
|
|
|
27
26
|
* the budget `blockFrontier` action.
|
|
28
27
|
*/
|
|
29
28
|
export declare function warnInertPrivacySetting(paths: readonly string[], warn?: (message?: unknown) => void): void;
|
|
30
|
-
export declare function warnSoakEvidenceRejections(result: ReadAllChainsResult): void;
|
|
29
|
+
export declare function warnSoakEvidenceRejections(result: ReadAllChainsResult, warn?: (message?: unknown) => void): void;
|
|
31
30
|
/**
|
|
32
31
|
* Reads the opencode server version from the `/global/health` endpoint.
|
|
33
32
|
*
|
|
@@ -86,10 +85,13 @@ export declare function createLazyOpencodeVersionReader(serverUrl: URL, options?
|
|
|
86
85
|
* (could not be determined), no certificate can match, so the gate fails
|
|
87
86
|
* closed.
|
|
88
87
|
*/
|
|
89
|
-
export declare function buildGateInput(config: OpenTeamConfig, storage: StorageProvider, opencodeVersion: LiveOpencodeVersion): Promise<GraphGateInput>;
|
|
88
|
+
export declare function buildGateInput(config: OpenTeamConfig, storage: StorageProvider, opencodeVersion: LiveOpencodeVersion, warn?: (message?: unknown) => void): Promise<GraphGateInput>;
|
|
90
89
|
/** Adapts a StorageProvider to RecorderPorts for the soak recorder. */
|
|
91
90
|
export declare function recorderPortsFromStorage(storage: StorageProvider): RecorderPorts;
|
|
92
|
-
export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider
|
|
91
|
+
export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider, loggers?: {
|
|
92
|
+
readonly onError?: (error: unknown) => void;
|
|
93
|
+
readonly onWarn?: (message: string) => void;
|
|
94
|
+
}): EventSink;
|
|
93
95
|
export declare function isMissingFile(error: unknown): boolean;
|
|
94
96
|
export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider, fallbackSource?: ConfigSource, rawOptions?: unknown): CliDeps;
|
|
95
97
|
export declare const server: Plugin;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,OAAO,EAAwB,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAezB,OAAO,EAEL,eAAe,EAEhB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,OAAO,EAAwB,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAezB,OAAO,EAEL,eAAe,EAEhB,MAAM,kBAAkB,CAAC;AAyC1B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAEnB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OA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