@lifeaitools/rdc-skills 0.24.34 → 0.24.35

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,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.24.34",
3
+ "version": "0.24.35",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
package/git-sha.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha": "f324aee6a9f9fc3d190c4bbb0b6e5d2efa000c8f"
2
+ "sha": "de3d04053330059e922cff2a7ea4b3c008893902"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.24.34",
3
+ "version": "0.24.35",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -234,13 +234,23 @@ function codexToolCalls(stdout) {
234
234
  const calls = [];
235
235
  for (const event of parseJsonLines(stdout)) {
236
236
  const type = event.type || event.event || event.kind || '';
237
- const name = findToolName(event) || findToolName(event.call) || findToolName(event.item);
237
+ const item = event.item || {};
238
+ let name = findToolName(event) || findToolName(event.call) || findToolName(item);
239
+ let input = event.input || event.arguments || event.params || event.call?.arguments || null;
240
+ if (item.type === 'command_execution') {
241
+ const command = String(item.command || '');
242
+ if (/\brg(\.exe)?\b|ripgrep/i.test(command)) name = 'Grep';
243
+ else if (/Get-ChildItem|\bdir\b|\bls\b/i.test(command)) name = 'Glob';
244
+ else if (/Get-Content|\bcat\b|\btype\b/i.test(command)) name = 'Read';
245
+ else name = 'Shell';
246
+ input = { command };
247
+ }
238
248
  if (/tool|function/i.test(type) || name) {
239
249
  calls.push({
240
250
  engine: 'codex',
241
251
  id: event.id || event.call_id || event.item_id || null,
242
252
  name,
243
- input: event.input || event.arguments || event.params || event.call?.arguments || null,
253
+ input,
244
254
  raw_type: type || null,
245
255
  });
246
256
  }
@@ -472,7 +482,19 @@ async function main() {
472
482
  }
473
483
  }
474
484
 
475
- main().catch((error) => {
476
- console.error(error);
477
- process.exit(1);
478
- });
485
+ export { assistantText, codexToolCalls };
486
+
487
+ const isMain = (() => {
488
+ try {
489
+ return import.meta.url === new URL(`file://${process.argv[1].replace(/\\/g, '/')}`).href;
490
+ } catch {
491
+ return false;
492
+ }
493
+ })();
494
+
495
+ if (isMain) {
496
+ main().catch((error) => {
497
+ console.error(error);
498
+ process.exit(1);
499
+ });
500
+ }
@@ -10,10 +10,24 @@ import { dirname } from 'node:path';
10
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
11
11
  const REPO_ROOT = resolve(__dirname, '..');
12
12
  const script = join(REPO_ROOT, 'scripts', 'acceptance.mjs');
13
+ const { codexToolCalls } = await import(`file://${script.replace(/\\/g, '/')}`);
13
14
 
14
15
  const syntax = spawnSync(process.execPath, ['--check', script], { encoding: 'utf8' });
15
16
  assert.equal(syntax.status, 0, syntax.stderr);
16
17
 
18
+ const codexEvents = [
19
+ {
20
+ type: 'item.started',
21
+ item: {
22
+ type: 'command_execution',
23
+ command: 'pwsh -Command "rg -n regenerative C:/Dev/local-corpus"',
24
+ },
25
+ },
26
+ ].map((event) => JSON.stringify(event)).join('\n');
27
+ const parsedCalls = codexToolCalls(codexEvents);
28
+ assert.equal(parsedCalls[0]?.name, 'Grep');
29
+ assert.match(parsedCalls[0]?.input?.command || '', /local-corpus/);
30
+
17
31
  const missing = spawnSync(process.execPath, [script, '--skill', 'rdc:not-a-real-skill'], {
18
32
  cwd: REPO_ROOT,
19
33
  encoding: 'utf8',