@openaide/codex-acp 1.1.2 → 1.1.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/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23712,6 +23712,7 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23712
23712
|
replayQueue = [];
|
|
23713
23713
|
activeLegacyActivities = /* @__PURE__ */ new Set();
|
|
23714
23714
|
projectedPromptIds = /* @__PURE__ */ new Set();
|
|
23715
|
+
causalRootPrompts = /* @__PURE__ */ new Map();
|
|
23715
23716
|
async handle(notification) {
|
|
23716
23717
|
if (notification.method === "turn/started") {
|
|
23717
23718
|
return this.isKnownChild(notification.params.threadId);
|
|
@@ -23751,14 +23752,24 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23751
23752
|
if (!this.supported) {
|
|
23752
23753
|
return false;
|
|
23753
23754
|
}
|
|
23755
|
+
if (item.type === "userMessage" && notification.params.threadId === this.rootSessionId) {
|
|
23756
|
+
const text = item.content.filter((content) => content.type === "text").map((content) => content.text).join("").trim();
|
|
23757
|
+
if (text) this.causalRootPrompts.set(notification.params.turnId, { sourceId: item.id, text });
|
|
23758
|
+
return false;
|
|
23759
|
+
}
|
|
23754
23760
|
if (item.type === "subAgentActivity") {
|
|
23755
23761
|
if (isRootAgentPath(item.agentPath)) return true;
|
|
23756
23762
|
if (this.terminalPendingSpawns.has(item.agentThreadId)) return true;
|
|
23763
|
+
if (item.kind === "interacted") await this.reopen(item.agentThreadId);
|
|
23757
23764
|
let hasNativeRepresentation = this.children.has(item.agentThreadId);
|
|
23758
23765
|
if (!hasNativeRepresentation) {
|
|
23759
23766
|
await this.materialize(item.agentThreadId, item.agentPath);
|
|
23760
23767
|
hasNativeRepresentation = this.children.has(item.agentThreadId);
|
|
23761
23768
|
}
|
|
23769
|
+
if (hasNativeRepresentation && item.kind !== "interrupted") {
|
|
23770
|
+
const prompt = this.causalRootPrompts.get(notification.params.turnId);
|
|
23771
|
+
if (prompt) await this.projectPrompt(item.agentThreadId, prompt.sourceId, prompt.text);
|
|
23772
|
+
}
|
|
23762
23773
|
if (hasNativeRepresentation && item.kind === "interrupted") {
|
|
23763
23774
|
await this.finish(item.agentThreadId, "cancelled");
|
|
23764
23775
|
}
|
|
@@ -23771,7 +23782,7 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23771
23782
|
await this.reopen(childThreadId);
|
|
23772
23783
|
}
|
|
23773
23784
|
}
|
|
23774
|
-
if (item.tool === "sendInput" &&
|
|
23785
|
+
if (item.tool === "sendInput" && item.prompt?.trim()) {
|
|
23775
23786
|
for (const childThreadId of item.receiverThreadIds) {
|
|
23776
23787
|
await this.projectPrompt(childThreadId, item.id, item.prompt.trim());
|
|
23777
23788
|
}
|
|
@@ -23793,7 +23804,7 @@ var CodexSubagentEventRouter = class _CodexSubagentEventRouter {
|
|
|
23793
23804
|
}
|
|
23794
23805
|
if (this.children.has(childSessionId)) {
|
|
23795
23806
|
representedSpawn = true;
|
|
23796
|
-
if (
|
|
23807
|
+
if (item.prompt?.trim()) {
|
|
23797
23808
|
await this.projectPrompt(childSessionId, item.id, item.prompt.trim());
|
|
23798
23809
|
}
|
|
23799
23810
|
continue;
|
|
@@ -27261,7 +27272,7 @@ var package_default = {
|
|
|
27261
27272
|
publishConfig: {
|
|
27262
27273
|
access: "public"
|
|
27263
27274
|
},
|
|
27264
|
-
version: "1.1.
|
|
27275
|
+
version: "1.1.4",
|
|
27265
27276
|
description: "",
|
|
27266
27277
|
main: "dist/index.js",
|
|
27267
27278
|
bin: {
|