@canonmsg/codex-plugin 0.18.0 → 0.18.1

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.
@@ -1,4 +1,4 @@
1
- import { truncateUnifiedDiff } from '@canonmsg/core';
1
+ import { sanitizeUnifiedDiffForSharing, truncateUnifiedDiff } from '@canonmsg/core';
2
2
  function isRecord(value) {
3
3
  return Boolean(value && typeof value === 'object' && !Array.isArray(value));
4
4
  }
@@ -365,7 +365,9 @@ export function extractCodexApprovalDiff(params) {
365
365
  const files = extractDiffFiles(params);
366
366
  if (!files)
367
367
  return undefined;
368
- return truncateUnifiedDiff({ files });
368
+ // Sanitize before truncating — secret-bearing paths and private-key
369
+ // blocks lose their hunk text before byte budgets are applied.
370
+ return truncateUnifiedDiff(sanitizeUnifiedDiffForSharing({ files }));
369
371
  }
370
372
  catch (error) {
371
373
  console.error('[canon-codex] Failed to parse approval diff; omitting preview:', error instanceof Error ? error.message : error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/codex-plugin",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Canon host integration for Codex CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "scripts"
22
22
  ],
23
23
  "scripts": {
24
- "prepare:workspace-deps": "npm --prefix ../core run build && npm --prefix ../agent-sdk run build",
24
+ "prepare:workspace-deps": "node ../../scripts/run-workspace-prep.mjs ../core ../agent-sdk",
25
25
  "build": "npm run prepare:workspace-deps && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc",
26
26
  "dev": "npm run prepare:workspace-deps && tsc --watch",
27
27
  "smoke": "node scripts/smoke-test.mjs",
@@ -29,8 +29,8 @@
29
29
  "prepack": "npm run build"
30
30
  },
31
31
  "dependencies": {
32
- "@canonmsg/agent-sdk": "^3.2.1",
33
- "@canonmsg/core": "^2.5.0"
32
+ "@canonmsg/agent-sdk": "^3.2.3",
33
+ "@canonmsg/core": "^2.6.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=18.0.0"