opencode-athena 0.12.0 → 0.12.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/dist/index.d.ts +6 -6
- package/dist/index.js +62 -33
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.js +62 -33
- package/dist/plugin/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -391,12 +391,12 @@ declare const AthenaConfigSchema: z.ZodObject<{
|
|
|
391
391
|
plan: z.ZodEnum<["free", "pro", "pro-plus", "business", "enterprise", "none"]>;
|
|
392
392
|
enabledModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
393
393
|
}, "strip", z.ZodTypeAny, {
|
|
394
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
395
394
|
enabled: boolean;
|
|
395
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
396
396
|
enabledModels?: string[] | undefined;
|
|
397
397
|
}, {
|
|
398
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
399
398
|
enabled: boolean;
|
|
399
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
400
400
|
enabledModels?: string[] | undefined;
|
|
401
401
|
}>;
|
|
402
402
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -412,8 +412,8 @@ declare const AthenaConfigSchema: z.ZodObject<{
|
|
|
412
412
|
tier: "max5x" | "max20x" | "pro" | "none";
|
|
413
413
|
};
|
|
414
414
|
githubCopilot: {
|
|
415
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
416
415
|
enabled: boolean;
|
|
416
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
417
417
|
enabledModels?: string[] | undefined;
|
|
418
418
|
};
|
|
419
419
|
}, {
|
|
@@ -429,8 +429,8 @@ declare const AthenaConfigSchema: z.ZodObject<{
|
|
|
429
429
|
tier: "max5x" | "max20x" | "pro" | "none";
|
|
430
430
|
};
|
|
431
431
|
githubCopilot: {
|
|
432
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
433
432
|
enabled: boolean;
|
|
433
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
434
434
|
enabledModels?: string[] | undefined;
|
|
435
435
|
};
|
|
436
436
|
}>;
|
|
@@ -1047,8 +1047,8 @@ declare const AthenaConfigSchema: z.ZodObject<{
|
|
|
1047
1047
|
tier: "max5x" | "max20x" | "pro" | "none";
|
|
1048
1048
|
};
|
|
1049
1049
|
githubCopilot: {
|
|
1050
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
1051
1050
|
enabled: boolean;
|
|
1051
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
1052
1052
|
enabledModels?: string[] | undefined;
|
|
1053
1053
|
};
|
|
1054
1054
|
};
|
|
@@ -1185,8 +1185,8 @@ declare const AthenaConfigSchema: z.ZodObject<{
|
|
|
1185
1185
|
tier: "max5x" | "max20x" | "pro" | "none";
|
|
1186
1186
|
};
|
|
1187
1187
|
githubCopilot: {
|
|
1188
|
-
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
1189
1188
|
enabled: boolean;
|
|
1189
|
+
plan: "pro" | "none" | "free" | "pro-plus" | "business" | "enterprise";
|
|
1190
1190
|
enabledModels?: string[] | undefined;
|
|
1191
1191
|
};
|
|
1192
1192
|
};
|
package/dist/index.js
CHANGED
|
@@ -1204,7 +1204,7 @@ var GIT_WRITE_COMMANDS = [
|
|
|
1204
1204
|
"git commit",
|
|
1205
1205
|
"git push",
|
|
1206
1206
|
"git checkout -b",
|
|
1207
|
-
"git branch
|
|
1207
|
+
"git branch",
|
|
1208
1208
|
"git switch -c",
|
|
1209
1209
|
"git switch --create",
|
|
1210
1210
|
"git merge",
|
|
@@ -1261,7 +1261,7 @@ function createToolHooks(ctx, tracker, config) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
};
|
|
1263
1263
|
}
|
|
1264
|
-
async function handleStoryLoaded(
|
|
1264
|
+
async function handleStoryLoaded(_ctx, tracker, config, _sessionID, output) {
|
|
1265
1265
|
try {
|
|
1266
1266
|
const result = JSON.parse(output.output);
|
|
1267
1267
|
if (!result.storyId || !result.story) {
|
|
@@ -1286,7 +1286,6 @@ async function handleStoryLoaded(ctx, tracker, config, sessionID, output) {
|
|
|
1286
1286
|
newTodos: newBmadTodos.length,
|
|
1287
1287
|
totalTracked: mergedTodos.length
|
|
1288
1288
|
});
|
|
1289
|
-
await autoInjectTodos(ctx, sessionID, newBmadTodos);
|
|
1290
1289
|
} else {
|
|
1291
1290
|
log5.debug("No BMAD todos found in story", { storyId: result.storyId });
|
|
1292
1291
|
}
|
|
@@ -1294,35 +1293,6 @@ async function handleStoryLoaded(ctx, tracker, config, sessionID, output) {
|
|
|
1294
1293
|
log5.warn("Failed to process story for todo sync", { error: String(error) });
|
|
1295
1294
|
}
|
|
1296
1295
|
}
|
|
1297
|
-
async function autoInjectTodos(ctx, sessionID, todos) {
|
|
1298
|
-
const client = ctx.client;
|
|
1299
|
-
const session = client?.session;
|
|
1300
|
-
const updateFn = session?.update;
|
|
1301
|
-
if (!updateFn) {
|
|
1302
|
-
log5.debug("OpenCode client session.update API not available");
|
|
1303
|
-
return;
|
|
1304
|
-
}
|
|
1305
|
-
try {
|
|
1306
|
-
await updateFn({
|
|
1307
|
-
path: { id: sessionID },
|
|
1308
|
-
body: {
|
|
1309
|
-
update: {
|
|
1310
|
-
sessionUpdate: "plan",
|
|
1311
|
-
entries: todos.map((todo) => ({
|
|
1312
|
-
priority: todo.priority || "medium",
|
|
1313
|
-
status: todo.status === "cancelled" ? "completed" : todo.status,
|
|
1314
|
-
content: todo.content
|
|
1315
|
-
}))
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
});
|
|
1319
|
-
log5.debug("Auto-injected BMAD todos via OpenCode API", { count: todos.length });
|
|
1320
|
-
} catch (error) {
|
|
1321
|
-
log5.debug("Could not auto-inject todos (API call failed)", {
|
|
1322
|
-
error: String(error)
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
1296
|
async function handleTodoWritten(ctx, tracker, config, output) {
|
|
1327
1297
|
const todos = extractTodosFromOutput(output);
|
|
1328
1298
|
if (!todos || todos.length === 0) {
|
|
@@ -7003,7 +6973,43 @@ function mergeConfigs(...configs) {
|
|
|
7003
6973
|
}
|
|
7004
6974
|
}
|
|
7005
6975
|
if (config.models) {
|
|
7006
|
-
|
|
6976
|
+
if (config.models.sisyphus !== void 0) result.models.sisyphus = config.models.sisyphus;
|
|
6977
|
+
if (config.models.oracle !== void 0) result.models.oracle = config.models.oracle;
|
|
6978
|
+
if (config.models.librarian !== void 0) result.models.librarian = config.models.librarian;
|
|
6979
|
+
if (config.models.frontend !== void 0) result.models.frontend = config.models.frontend;
|
|
6980
|
+
if (config.models.documentWriter !== void 0)
|
|
6981
|
+
result.models.documentWriter = config.models.documentWriter;
|
|
6982
|
+
if (config.models.multimodalLooker !== void 0)
|
|
6983
|
+
result.models.multimodalLooker = config.models.multimodalLooker;
|
|
6984
|
+
if (config.models.settings !== void 0) {
|
|
6985
|
+
result.models.settings = result.models.settings || {};
|
|
6986
|
+
const resultSettings = result.models.settings;
|
|
6987
|
+
const configSettings = config.models.settings;
|
|
6988
|
+
for (const agentKey of [
|
|
6989
|
+
"sisyphus",
|
|
6990
|
+
"oracle",
|
|
6991
|
+
"librarian",
|
|
6992
|
+
"frontend",
|
|
6993
|
+
"documentWriter",
|
|
6994
|
+
"multimodalLooker"
|
|
6995
|
+
]) {
|
|
6996
|
+
if (configSettings[agentKey] !== void 0) {
|
|
6997
|
+
resultSettings[agentKey] = {
|
|
6998
|
+
...resultSettings[agentKey] || {},
|
|
6999
|
+
...configSettings[agentKey]
|
|
7000
|
+
};
|
|
7001
|
+
}
|
|
7002
|
+
}
|
|
7003
|
+
if (configSettings.overrides !== void 0) {
|
|
7004
|
+
resultSettings.overrides = {
|
|
7005
|
+
...resultSettings.overrides || {},
|
|
7006
|
+
...configSettings.overrides
|
|
7007
|
+
};
|
|
7008
|
+
}
|
|
7009
|
+
}
|
|
7010
|
+
if (config.models.custom !== void 0) {
|
|
7011
|
+
result.models.custom = config.models.custom;
|
|
7012
|
+
}
|
|
7007
7013
|
}
|
|
7008
7014
|
if (config.bmad) {
|
|
7009
7015
|
result.bmad = { ...result.bmad, ...config.bmad };
|
|
@@ -7014,6 +7020,29 @@ function mergeConfigs(...configs) {
|
|
|
7014
7020
|
if (config.mcps) {
|
|
7015
7021
|
result.mcps = { ...result.mcps, ...config.mcps };
|
|
7016
7022
|
}
|
|
7023
|
+
if (config.routing) {
|
|
7024
|
+
if (config.routing.providerPriority !== void 0) {
|
|
7025
|
+
result.routing.providerPriority = config.routing.providerPriority;
|
|
7026
|
+
}
|
|
7027
|
+
if (config.routing.modelFamilyPriority !== void 0) {
|
|
7028
|
+
result.routing.modelFamilyPriority = {
|
|
7029
|
+
...result.routing.modelFamilyPriority,
|
|
7030
|
+
...config.routing.modelFamilyPriority
|
|
7031
|
+
};
|
|
7032
|
+
}
|
|
7033
|
+
if (config.routing.agentOverrides !== void 0) {
|
|
7034
|
+
result.routing.agentOverrides = {
|
|
7035
|
+
...result.routing.agentOverrides,
|
|
7036
|
+
...config.routing.agentOverrides
|
|
7037
|
+
};
|
|
7038
|
+
}
|
|
7039
|
+
if (config.routing.fallbackBehavior !== void 0) {
|
|
7040
|
+
result.routing.fallbackBehavior = {
|
|
7041
|
+
...result.routing.fallbackBehavior,
|
|
7042
|
+
...config.routing.fallbackBehavior
|
|
7043
|
+
};
|
|
7044
|
+
}
|
|
7045
|
+
}
|
|
7017
7046
|
}
|
|
7018
7047
|
return result;
|
|
7019
7048
|
}
|