@canonmsg/codex-plugin 0.9.2 → 0.9.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.
Files changed (2) hide show
  1. package/dist/host.js +5 -23
  2. package/package.json +3 -3
package/dist/host.js CHANGED
@@ -63,15 +63,6 @@ function normalizeRuntimeTurnState(value) {
63
63
  if (normalizedTurn) {
64
64
  return { state: normalizedTurn.state };
65
65
  }
66
- if (!value || typeof value !== 'object')
67
- return null;
68
- const state = value.state;
69
- if (state === 'running') {
70
- return { state: 'streaming' };
71
- }
72
- if (state === 'requires_action') {
73
- return { state: 'waiting_input' };
74
- }
75
66
  return null;
76
67
  }
77
68
  async function publishAgentRuntime(agentId, runtime) {
@@ -247,11 +238,7 @@ export async function main() {
247
238
  }
248
239
  async function loadSenderRuntimeState(conversationId, senderId) {
249
240
  try {
250
- const [turnState, sessionState] = await Promise.all([
251
- rtdbRead(`/turn-state/${conversationId}/${senderId}`),
252
- rtdbRead(`/session-state/${conversationId}/${senderId}`),
253
- ]);
254
- return normalizeRuntimeTurnState(turnState) ?? normalizeRuntimeTurnState(sessionState);
241
+ return normalizeRuntimeTurnState(await rtdbRead(`/turn-state/${conversationId}/${senderId}`));
255
242
  }
256
243
  catch {
257
244
  return null;
@@ -286,7 +273,6 @@ export async function main() {
286
273
  : {}),
287
274
  hostMode: true,
288
275
  clientType: 'codex',
289
- state: session.state.state,
290
276
  isActive: true,
291
277
  }).catch(() => { });
292
278
  }
@@ -744,15 +730,11 @@ export async function main() {
744
730
  ? resolveWorkspaceIdForBaseCwd(session.environment.baseCwd)
745
731
  : runtimeDescriptor.defaultWorkspaceId;
746
732
  const workspace = workspaceOptions.find((option) => option.id === workspaceId) ?? null;
733
+ const descriptor = runtimeDescriptor.runtimeDescriptor;
734
+ if (!descriptor)
735
+ return;
747
736
  const payload = {
748
- descriptor: runtimeDescriptor.runtimeDescriptor ?? buildCodexRuntimeDescriptor({
749
- models: runtimeDescriptor.availableModels ?? [],
750
- workspaces: buildPublicWorkspaceOptions(workspaceOptions),
751
- workspaceRoots: workspaceRootMetadata,
752
- executionModes: hostAvailableExecutionModes,
753
- permissionModes: [...codexPermissionEnvelope.availablePermissionModes],
754
- defaultPermissionMode: codexPermissionEnvelope.defaultPermissionMode,
755
- }),
737
+ descriptor,
756
738
  surfaceMode: 'host',
757
739
  statusItems: [
758
740
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/codex-plugin",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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": "^0.10.2",
33
- "@canonmsg/core": "^0.14.0"
32
+ "@canonmsg/agent-sdk": "^1.0.0",
33
+ "@canonmsg/core": "^0.15.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=18.0.0"