@openaide/codex-acp 1.1.1 → 1.1.3
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 +31 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23711,6 +23711,7 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23711
23711
|
materializationWaiters = /* @__PURE__ */ new Map();
|
|
23712
23712
|
replayQueue = [];
|
|
23713
23713
|
activeLegacyActivities = /* @__PURE__ */ new Set();
|
|
23714
|
+
projectedPromptIds = /* @__PURE__ */ new Set();
|
|
23714
23715
|
async handle(notification) {
|
|
23715
23716
|
if (notification.method === "turn/started") {
|
|
23716
23717
|
return this.isKnownChild(notification.params.threadId);
|
|
@@ -23770,6 +23771,11 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23770
23771
|
await this.reopen(childThreadId);
|
|
23771
23772
|
}
|
|
23772
23773
|
}
|
|
23774
|
+
if (item.tool === "sendInput" && item.prompt?.trim()) {
|
|
23775
|
+
for (const childThreadId of item.receiverThreadIds) {
|
|
23776
|
+
await this.projectPrompt(childThreadId, item.id, item.prompt.trim());
|
|
23777
|
+
}
|
|
23778
|
+
}
|
|
23773
23779
|
}
|
|
23774
23780
|
let representedSpawn = false;
|
|
23775
23781
|
if (item.tool === "spawnAgent") {
|
|
@@ -23785,7 +23791,14 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23785
23791
|
logger.log(`Ignoring self-referential spawned subagent ${childSessionId}`);
|
|
23786
23792
|
continue;
|
|
23787
23793
|
}
|
|
23788
|
-
if (this.children.has(childSessionId)
|
|
23794
|
+
if (this.children.has(childSessionId)) {
|
|
23795
|
+
representedSpawn = true;
|
|
23796
|
+
if (item.prompt?.trim()) {
|
|
23797
|
+
await this.projectPrompt(childSessionId, item.id, item.prompt.trim());
|
|
23798
|
+
}
|
|
23799
|
+
continue;
|
|
23800
|
+
}
|
|
23801
|
+
if (this.pendingSpawns.has(childSessionId) || this.terminalPendingSpawns.has(childSessionId)) {
|
|
23789
23802
|
representedSpawn = true;
|
|
23790
23803
|
continue;
|
|
23791
23804
|
}
|
|
@@ -23793,6 +23806,7 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23793
23806
|
parentThreadId,
|
|
23794
23807
|
parentSessionId,
|
|
23795
23808
|
task: item.prompt?.trim() || "Delegated task",
|
|
23809
|
+
...item.prompt?.trim() ? { promptSourceId: item.id } : {},
|
|
23796
23810
|
buffered: [],
|
|
23797
23811
|
droppedBufferedNotifications: 0
|
|
23798
23812
|
});
|
|
@@ -23921,10 +23935,25 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23921
23935
|
path: normalizeAgentPath(path8),
|
|
23922
23936
|
generation: 1
|
|
23923
23937
|
});
|
|
23938
|
+
if (pending?.promptSourceId) {
|
|
23939
|
+
await this.projectPrompt(childSessionId, pending.promptSourceId, pending.task);
|
|
23940
|
+
}
|
|
23924
23941
|
this.pendingSpawns.delete(childSessionId);
|
|
23925
23942
|
this.replayQueue.push(...pending?.buffered ?? []);
|
|
23926
23943
|
this.resolveMaterialization(childSessionId, childSessionId);
|
|
23927
23944
|
}
|
|
23945
|
+
async projectPrompt(childThreadId, sourceId, prompt) {
|
|
23946
|
+
const child = this.children.get(childThreadId);
|
|
23947
|
+
if (!child) return;
|
|
23948
|
+
const messageId = `collab:${sourceId}:prompt`;
|
|
23949
|
+
if (this.projectedPromptIds.has(messageId)) return;
|
|
23950
|
+
await this.session.update({
|
|
23951
|
+
sessionUpdate: "user_message_chunk",
|
|
23952
|
+
content: { type: "text", text: prompt },
|
|
23953
|
+
messageId
|
|
23954
|
+
}, child.sessionId);
|
|
23955
|
+
this.projectedPromptIds.add(messageId);
|
|
23956
|
+
}
|
|
23928
23957
|
finishPending(childSessionId) {
|
|
23929
23958
|
const pending = this.pendingSpawns.get(childSessionId);
|
|
23930
23959
|
if (!pending) return;
|
|
@@ -27232,7 +27261,7 @@ var package_default = {
|
|
|
27232
27261
|
publishConfig: {
|
|
27233
27262
|
access: "public"
|
|
27234
27263
|
},
|
|
27235
|
-
version: "1.1.
|
|
27264
|
+
version: "1.1.3",
|
|
27236
27265
|
description: "",
|
|
27237
27266
|
main: "dist/index.js",
|
|
27238
27267
|
bin: {
|