oh-my-opencode-slim 2.0.3 → 2.0.4
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.md +3 -1
- package/dist/cli/index.js +23 -9
- package/dist/companion/manager.d.ts +1 -0
- package/dist/index.js +19 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -657,7 +657,7 @@ Use this section as a map: start with installation, then jump to features, confi
|
|
|
657
657
|
<p><sub>Every merged contribution leaves a mark on the realm.</sub></p>
|
|
658
658
|
|
|
659
659
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
660
|
-
[](#contributors-)
|
|
661
661
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
662
662
|
</div>
|
|
663
663
|
|
|
@@ -750,6 +750,8 @@ Use this section as a map: start with installation, then jump to features, confi
|
|
|
750
750
|
</tr>
|
|
751
751
|
<tr>
|
|
752
752
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/bobbyunknown"><img src="https://avatars.githubusercontent.com/u/62272380?v=4?s=100" width="100px;" alt="Insomnia"/><br /><sub><b>Insomnia</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=bobbyunknown" title="Code">💻</a></td>
|
|
753
|
+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/andrescastane"><img src="https://avatars.githubusercontent.com/u/13487870?v=4?s=100" width="100px;" alt="Andres Castañeda"/><br /><sub><b>Andres Castañeda</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=andrescastane" title="Code">💻</a></td>
|
|
754
|
+
<td align="center" valign="top" width="16.66%"><a href="https://zaradacht.com/"><img src="https://avatars.githubusercontent.com/u/24251016?v=4?s=100" width="100px;" alt="Zaradacht Taifour (Zack)"/><br /><sub><b>Zaradacht Taifour (Zack)</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=Zaradacht" title="Code">💻</a></td>
|
|
753
755
|
</tr>
|
|
754
756
|
</tbody>
|
|
755
757
|
</table>
|
package/dist/cli/index.js
CHANGED
|
@@ -753,6 +753,20 @@ var DEFAULT_OPENCODE_AGENTS_TO_DISABLE = ["explore", "general"];
|
|
|
753
753
|
function isString(value) {
|
|
754
754
|
return typeof value === "string";
|
|
755
755
|
}
|
|
756
|
+
function getModelIds(model) {
|
|
757
|
+
if (isString(model))
|
|
758
|
+
return [model];
|
|
759
|
+
if (!Array.isArray(model))
|
|
760
|
+
return [];
|
|
761
|
+
return model.flatMap((entry) => {
|
|
762
|
+
if (isString(entry))
|
|
763
|
+
return [entry];
|
|
764
|
+
if (entry && typeof entry === "object" && isString(entry.id)) {
|
|
765
|
+
return [entry.id];
|
|
766
|
+
}
|
|
767
|
+
return [];
|
|
768
|
+
});
|
|
769
|
+
}
|
|
756
770
|
function getPlugins(config) {
|
|
757
771
|
return Array.isArray(config.plugin) ? config.plugin : [];
|
|
758
772
|
}
|
|
@@ -1217,17 +1231,17 @@ function detectCurrentConfig() {
|
|
|
1217
1231
|
const presetName = configObj.preset;
|
|
1218
1232
|
const presets = configObj.presets;
|
|
1219
1233
|
const agents = presets?.[presetName];
|
|
1220
|
-
if (agents) {
|
|
1221
|
-
const models = Object.values(agents).
|
|
1222
|
-
result.hasOpenAI
|
|
1223
|
-
result.hasAnthropic
|
|
1224
|
-
result.hasCopilot
|
|
1225
|
-
result.hasZaiPlan
|
|
1226
|
-
result.hasOpencodeZen
|
|
1227
|
-
if (models.some((m) => m
|
|
1234
|
+
if (agents && typeof agents === "object") {
|
|
1235
|
+
const models = Object.values(agents).filter((a) => a && typeof a === "object").flatMap((a) => getModelIds(a.model));
|
|
1236
|
+
result.hasOpenAI ||= models.some((m) => m.startsWith("openai/"));
|
|
1237
|
+
result.hasAnthropic ||= models.some((m) => m.startsWith("anthropic/"));
|
|
1238
|
+
result.hasCopilot ||= models.some((m) => m.startsWith("github-copilot/"));
|
|
1239
|
+
result.hasZaiPlan ||= models.some((m) => m.startsWith("zai-coding-plan/"));
|
|
1240
|
+
result.hasOpencodeZen ||= models.some((m) => m.startsWith("opencode/"));
|
|
1241
|
+
if (models.some((m) => m.startsWith("google/"))) {
|
|
1228
1242
|
result.hasAntigravity = true;
|
|
1229
1243
|
}
|
|
1230
|
-
if (models.some((m) => m
|
|
1244
|
+
if (models.some((m) => m.startsWith("chutes/"))) {
|
|
1231
1245
|
result.hasChutes = true;
|
|
1232
1246
|
}
|
|
1233
1247
|
}
|
|
@@ -16,6 +16,7 @@ export declare class CompanionManager {
|
|
|
16
16
|
/** sessionId → agent name, for sessions currently busy. */
|
|
17
17
|
private readonly busyAgentSessions;
|
|
18
18
|
private readonly config?;
|
|
19
|
+
private companionProcess;
|
|
19
20
|
constructor(sessionId: string, cwd: string, config?: CompanionConfig);
|
|
20
21
|
onLoad(): void;
|
|
21
22
|
/**
|
package/dist/index.js
CHANGED
|
@@ -19251,6 +19251,11 @@ Build a short work graph before dispatching:
|
|
|
19251
19251
|
- Advisory ownership for write-capable lanes
|
|
19252
19252
|
- Verification/review lanes that run after implementation
|
|
19253
19253
|
|
|
19254
|
+
### Todo Continuity
|
|
19255
|
+
- When the user adds a new task while a todo list exists, append the new task to the end of the existing todo list instead of replacing the list.
|
|
19256
|
+
- Preserve existing todo order, statuses, and priorities unless the user explicitly asks to reprioritize, cancel, or replace them.
|
|
19257
|
+
- Finish the current in-progress task before starting the newly appended task unless the current task is blocked or the user explicitly overrides the order.
|
|
19258
|
+
|
|
19254
19259
|
Can tasks be split into background specialist work?
|
|
19255
19260
|
${enabledParallelExamples}
|
|
19256
19261
|
|
|
@@ -19258,6 +19263,7 @@ Balance: respect dependencies, avoid parallelizing what must be sequential, and
|
|
|
19258
19263
|
|
|
19259
19264
|
### Background Task Discipline
|
|
19260
19265
|
- Prefer \`task(..., background: true)\` for delegated work that can run independently.
|
|
19266
|
+
- Launch specialist agents in the background by default so the orchestrator stays unblocked and can reconcile results when they return.
|
|
19261
19267
|
- Track each task's specialist, objective, task/session ID, and file/topic ownership.
|
|
19262
19268
|
- Continue orchestration only on non-overlapping work; otherwise briefly report what was launched and stop.
|
|
19263
19269
|
- Before local edits or another writer task, compare against running task scopes.
|
|
@@ -20374,6 +20380,7 @@ class CompanionManager {
|
|
|
20374
20380
|
status = "idle";
|
|
20375
20381
|
busyAgentSessions = new Map;
|
|
20376
20382
|
config;
|
|
20383
|
+
companionProcess = null;
|
|
20377
20384
|
constructor(sessionId, cwd, config) {
|
|
20378
20385
|
this.id = sessionId;
|
|
20379
20386
|
this.cwd = cwd;
|
|
@@ -20438,6 +20445,12 @@ class CompanionManager {
|
|
|
20438
20445
|
onExit() {
|
|
20439
20446
|
if (this.config?.enabled !== true)
|
|
20440
20447
|
return;
|
|
20448
|
+
if (this.companionProcess) {
|
|
20449
|
+
try {
|
|
20450
|
+
this.companionProcess.kill();
|
|
20451
|
+
} catch {}
|
|
20452
|
+
this.companionProcess = null;
|
|
20453
|
+
}
|
|
20441
20454
|
writeState((state) => {
|
|
20442
20455
|
state.sessions = state.sessions.filter((s) => s.session_id !== this.id);
|
|
20443
20456
|
});
|
|
@@ -20514,6 +20527,7 @@ class CompanionManager {
|
|
|
20514
20527
|
},
|
|
20515
20528
|
stdio: "ignore"
|
|
20516
20529
|
});
|
|
20530
|
+
this.companionProcess = child;
|
|
20517
20531
|
child.unref();
|
|
20518
20532
|
log("[companion] spawned", JSON.stringify({
|
|
20519
20533
|
bin,
|
|
@@ -24747,17 +24761,6 @@ function createReflectCommandHook() {
|
|
|
24747
24761
|
}
|
|
24748
24762
|
// src/hooks/task-session-manager/index.ts
|
|
24749
24763
|
import path12 from "node:path";
|
|
24750
|
-
var AGENT_NAME_SET = new Set([
|
|
24751
|
-
"orchestrator",
|
|
24752
|
-
"oracle",
|
|
24753
|
-
"designer",
|
|
24754
|
-
"explorer",
|
|
24755
|
-
"librarian",
|
|
24756
|
-
"fixer",
|
|
24757
|
-
"observer",
|
|
24758
|
-
"council",
|
|
24759
|
-
"councillor"
|
|
24760
|
-
]);
|
|
24761
24764
|
var MAX_PENDING_TASK_CALLS = 100;
|
|
24762
24765
|
var BACKGROUND_JOB_BOARD_SENTINEL = "SENTINEL: background-job-board-v2";
|
|
24763
24766
|
var BACKGROUND_COMPLETION_COMPLETED = /^Background task completed: /;
|
|
@@ -24789,9 +24792,6 @@ function createOccurrenceId(part, message, partIndex) {
|
|
|
24789
24792
|
const hash = djb2Hash(`${sessionID}:${content}`);
|
|
24790
24793
|
return `anon:${hash}`;
|
|
24791
24794
|
}
|
|
24792
|
-
function isAgentName(value) {
|
|
24793
|
-
return typeof value === "string" && AGENT_NAME_SET.has(value);
|
|
24794
|
-
}
|
|
24795
24795
|
function extractPath(output) {
|
|
24796
24796
|
return /<path>([^<]+)<\/path>/.exec(output)?.[1];
|
|
24797
24797
|
}
|
|
@@ -25072,16 +25072,17 @@ function createTaskSessionManagerHook(_ctx, options) {
|
|
|
25072
25072
|
if (!isRecord(output.args))
|
|
25073
25073
|
return;
|
|
25074
25074
|
const args = output.args;
|
|
25075
|
-
if (
|
|
25075
|
+
if (typeof args.subagent_type !== "string" || args.subagent_type.trim() === "") {
|
|
25076
25076
|
if (typeof args.task_id === "string" && args.task_id.trim() !== "") {
|
|
25077
25077
|
delete args.task_id;
|
|
25078
25078
|
}
|
|
25079
25079
|
return;
|
|
25080
25080
|
}
|
|
25081
|
+
const agentType = args.subagent_type.trim();
|
|
25081
25082
|
const label = deriveTaskSessionLabel({
|
|
25082
25083
|
description: typeof args.description === "string" ? args.description : undefined,
|
|
25083
25084
|
prompt: typeof args.prompt === "string" ? args.prompt : undefined,
|
|
25084
|
-
agentType
|
|
25085
|
+
agentType
|
|
25085
25086
|
});
|
|
25086
25087
|
const pendingCall = {
|
|
25087
25088
|
callId: pendingCallId({
|
|
@@ -25089,7 +25090,7 @@ function createTaskSessionManagerHook(_ctx, options) {
|
|
|
25089
25090
|
sessionID: input.sessionID
|
|
25090
25091
|
}),
|
|
25091
25092
|
parentSessionId: input.sessionID,
|
|
25092
|
-
agentType
|
|
25093
|
+
agentType,
|
|
25093
25094
|
label
|
|
25094
25095
|
};
|
|
25095
25096
|
rememberPendingCall(pendingCall);
|
|
@@ -25097,7 +25098,7 @@ function createTaskSessionManagerHook(_ctx, options) {
|
|
|
25097
25098
|
return;
|
|
25098
25099
|
}
|
|
25099
25100
|
const requested = args.task_id.trim();
|
|
25100
|
-
const remembered = backgroundJobBoard.resolveReusable(input.sessionID, requested,
|
|
25101
|
+
const remembered = backgroundJobBoard.resolveReusable(input.sessionID, requested, agentType);
|
|
25101
25102
|
if (!remembered) {
|
|
25102
25103
|
if (RAW_SESSION_ID_PATTERN.test(requested)) {
|
|
25103
25104
|
pendingCall.resumedTaskId = requested;
|
package/package.json
CHANGED