@particle-academy/prism-acp 0.5.2 → 0.5.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/README.md CHANGED
@@ -172,12 +172,13 @@ the CLI did not echo the client's prompt as `user_message_chunk`, and loading
172
172
  its session replayed zero updates. A Claude client cannot reconstruct the whole
173
173
  conversation from ACP alone; record the human turn yourself. Codex's mapping
174
174
  does emit text from `userMessage` items as `user_message_chunk` during history
175
- replay, so a Codex `session/load` will carry that human text. The mapping also
176
- does this for live items, so a live Codex turn may echo the client's own prompt
177
- as `user_message_chunk`; this is what our mapping allows, not a claim about
178
- every Codex frame. Record the human turn yourself for both providers, and treat
179
- a live `user_message_chunk` as the agent's record of what it received, not as
180
- new input to append again.
175
+ replay, so a Codex `session/load` will carry that human text. Measured against a
176
+ real Codex child, a live turn reports the user's text as one
177
+ `user_message_chunk`. Releases 0.5.2 and earlier emitted it twice because our
178
+ mapper handled both `item/started` and `item/completed`; client-side
179
+ deduplication added for that behavior is no longer needed. Record the human
180
+ turn yourself for both providers, and treat a live `user_message_chunk` as the
181
+ agent's record of what it received, not as new input to append again.
181
182
 
182
183
  ### Refusing an unknown id at load, not a turn later
183
184
 
@@ -474,11 +474,13 @@ export class CodexDriver {
474
474
  this.#recordUnmapped('completed Codex item had an unknown status', item);
475
475
  }
476
476
  if (type === 'userMessage') {
477
- const text = textFromContent(item.content);
478
- if (text.length > 0)
479
- this.#emit({ sessionUpdate: 'user_message_chunk', content: { type: 'text', text } });
480
- else
481
- this.#recordUnmapped('Codex userMessage had no text content', item);
477
+ if (replay || completed) {
478
+ const text = textFromContent(item.content);
479
+ if (text.length > 0)
480
+ this.#emit({ sessionUpdate: 'user_message_chunk', content: { type: 'text', text } });
481
+ else
482
+ this.#recordUnmapped('Codex userMessage had no text content', item);
483
+ }
482
484
  return;
483
485
  }
484
486
  if (type === 'agentMessage') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/prism-acp",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Speak the Agent Client Protocol to a coding-agent CLI the user has already authenticated. No API key, no third-party adapter.",
5
5
  "license": "MIT",
6
6
  "repository": {