@openaide/codex-acp 1.1.3 → 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.
Files changed (2) hide show
  1. package/dist/index.js +12 -1
  2. 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
  }
@@ -27261,7 +27272,7 @@ var package_default = {
27261
27272
  publishConfig: {
27262
27273
  access: "public"
27263
27274
  },
27264
- version: "1.1.3",
27275
+ version: "1.1.4",
27265
27276
  description: "",
27266
27277
  main: "dist/index.js",
27267
27278
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.1.3",
6
+ "version": "1.1.4",
7
7
  "description": "",
8
8
  "main": "dist/index.js",
9
9
  "bin": {