@canonmsg/codex-plugin 0.11.6 → 0.11.7

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/host.js +14 -0
  2. package/package.json +3 -3
package/dist/host.js CHANGED
@@ -54,6 +54,7 @@ const CONTROL_POLL_MS = 2_000;
54
54
  const CODEX_RUNTIME_CAPABILITIES = {
55
55
  ...DEFAULT_RUNTIME_CAPABILITIES,
56
56
  supportsInterrupt: true,
57
+ supportsInputInterrupt: true,
57
58
  supportsQueue: true,
58
59
  supportsNonFinalPermanentMessages: false,
59
60
  };
@@ -496,6 +497,16 @@ export async function main() {
496
497
  return client.updateMessageDisposition(conversationId, prompt.sourceMessageId, 'rejected').catch(() => { });
497
498
  }));
498
499
  }
500
+ function removeQueuedPrompt(conversationId, sourceMessageId) {
501
+ const session = sessions.get(conversationId);
502
+ if (!session || session.queue.length === 0)
503
+ return;
504
+ const before = session.queue.length;
505
+ session.queue = session.queue.filter((prompt) => prompt.sourceMessageId !== sourceMessageId);
506
+ if (session.queue.length !== before) {
507
+ writeTurn(session);
508
+ }
509
+ }
499
510
  function clearStreaming(conversationId) {
500
511
  runtimeState.clearStreaming(conversationId).catch(() => { });
501
512
  }
@@ -1132,6 +1143,9 @@ export async function main() {
1132
1143
  });
1133
1144
  }
1134
1145
  },
1146
+ onMessageDeleted: (payload) => {
1147
+ removeQueuedPrompt(payload.conversationId, payload.messageId);
1148
+ },
1135
1149
  onConversationUpdated: (payload) => {
1136
1150
  handleConversationUpdated(payload);
1137
1151
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/codex-plugin",
3
- "version": "0.11.6",
3
+ "version": "0.11.7",
4
4
  "description": "Canon host integration for Codex CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "prepack": "npm run build"
30
30
  },
31
31
  "dependencies": {
32
- "@canonmsg/agent-sdk": "^1.5.1",
33
- "@canonmsg/core": "^0.19.2"
32
+ "@canonmsg/agent-sdk": "^1.5.2",
33
+ "@canonmsg/core": "^0.19.3"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=18.0.0"