opencode-orchestrator 0.6.18 → 0.6.19
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.js +36 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14160,6 +14160,36 @@ var presets = {
|
|
|
14160
14160
|
})
|
|
14161
14161
|
};
|
|
14162
14162
|
|
|
14163
|
+
// src/core/session/store.ts
|
|
14164
|
+
var contexts = /* @__PURE__ */ new Map();
|
|
14165
|
+
var parentChildMap = /* @__PURE__ */ new Map();
|
|
14166
|
+
function create(sessionId, parentId) {
|
|
14167
|
+
const context = {
|
|
14168
|
+
sessionId,
|
|
14169
|
+
parentId,
|
|
14170
|
+
documents: /* @__PURE__ */ new Map(),
|
|
14171
|
+
findings: [],
|
|
14172
|
+
decisions: /* @__PURE__ */ new Map(),
|
|
14173
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
14174
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
14175
|
+
};
|
|
14176
|
+
contexts.set(sessionId, context);
|
|
14177
|
+
if (parentId) {
|
|
14178
|
+
if (!parentChildMap.has(parentId)) {
|
|
14179
|
+
parentChildMap.set(parentId, /* @__PURE__ */ new Set());
|
|
14180
|
+
}
|
|
14181
|
+
parentChildMap.get(parentId).add(sessionId);
|
|
14182
|
+
}
|
|
14183
|
+
return context;
|
|
14184
|
+
}
|
|
14185
|
+
function clear(sessionId) {
|
|
14186
|
+
const context = contexts.get(sessionId);
|
|
14187
|
+
if (context?.parentId) {
|
|
14188
|
+
parentChildMap.get(context.parentId)?.delete(sessionId);
|
|
14189
|
+
}
|
|
14190
|
+
contexts.delete(sessionId);
|
|
14191
|
+
}
|
|
14192
|
+
|
|
14163
14193
|
// src/core/agents/manager/task-launcher.ts
|
|
14164
14194
|
var TaskLauncher = class {
|
|
14165
14195
|
constructor(client, directory, store, concurrency, onTaskError, startPolling) {
|
|
@@ -14202,6 +14232,8 @@ var TaskLauncher = class {
|
|
|
14202
14232
|
};
|
|
14203
14233
|
this.store.set(taskId, task);
|
|
14204
14234
|
this.store.trackPending(input.parentSessionID, taskId);
|
|
14235
|
+
create(sessionID, input.parentSessionID);
|
|
14236
|
+
log2(`[task-launcher.ts] Created shared context for session ${sessionID}`);
|
|
14205
14237
|
this.startPolling();
|
|
14206
14238
|
this.client.session.prompt({
|
|
14207
14239
|
path: { id: sessionID },
|
|
@@ -14430,6 +14462,7 @@ var TaskCleaner = class {
|
|
|
14430
14462
|
}
|
|
14431
14463
|
this.client.session.delete({ path: { id: task.sessionID } }).catch(() => {
|
|
14432
14464
|
});
|
|
14465
|
+
clear(task.sessionID);
|
|
14433
14466
|
this.store.delete(taskId);
|
|
14434
14467
|
}
|
|
14435
14468
|
this.store.cleanEmptyNotifications();
|
|
@@ -14443,6 +14476,7 @@ var TaskCleaner = class {
|
|
|
14443
14476
|
await this.client.session.delete({ path: { id: sessionID } });
|
|
14444
14477
|
} catch {
|
|
14445
14478
|
}
|
|
14479
|
+
clear(sessionID);
|
|
14446
14480
|
}
|
|
14447
14481
|
this.store.delete(taskId);
|
|
14448
14482
|
log2(`Cleaned up ${taskId}`);
|
|
@@ -15354,7 +15388,7 @@ async function list() {
|
|
|
15354
15388
|
expired: new Date(entry.expiresAt) < now
|
|
15355
15389
|
}));
|
|
15356
15390
|
}
|
|
15357
|
-
async function
|
|
15391
|
+
async function clear2() {
|
|
15358
15392
|
const metadata = await readMetadata();
|
|
15359
15393
|
const count = Object.keys(metadata.documents).length;
|
|
15360
15394
|
for (const filename of Object.keys(metadata.documents)) {
|
|
@@ -15831,7 +15865,7 @@ Cached: ${doc.fetchedAt}
|
|
|
15831
15865
|
${doc.content}`;
|
|
15832
15866
|
}
|
|
15833
15867
|
case "clear": {
|
|
15834
|
-
const count = await
|
|
15868
|
+
const count = await clear2();
|
|
15835
15869
|
return `\u{1F5D1}\uFE0F Cleared ${count} cached documents`;
|
|
15836
15870
|
}
|
|
15837
15871
|
case "stats": {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.19",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|