tlc-claude-code 2.4.0 → 2.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tlc-claude-code",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "TLC - Test Led Coding for Claude Code",
5
5
  "bin": {
6
6
  "tlc-claude-code": "./bin/install.js",
@@ -96,6 +96,8 @@ function resolveRouting({ command, flagModel, projectDir = process.cwd(), homeDi
96
96
  if (personalRouting) {
97
97
  if (personalRouting.models) {
98
98
  models = [...personalRouting.models];
99
+ } else if (personalRouting.model) {
100
+ models = [personalRouting.model];
99
101
  }
100
102
  if (personalRouting.strategy) {
101
103
  strategy = personalRouting.strategy;
@@ -111,6 +113,8 @@ function resolveRouting({ command, flagModel, projectDir = process.cwd(), homeDi
111
113
  if (overrideEntry) {
112
114
  if (overrideEntry.models) {
113
115
  models = [...overrideEntry.models];
116
+ } else if (overrideEntry.model) {
117
+ models = [overrideEntry.model];
114
118
  }
115
119
  if (overrideEntry.strategy) {
116
120
  strategy = overrideEntry.strategy;
@@ -412,6 +412,71 @@ describe('task-router-config', () => {
412
412
  expect(result.providers).toEqual(personalConfig.model_providers);
413
413
  });
414
414
 
415
+ it('personal config with singular model (string) is normalized to models array', () => {
416
+ const personalConfig = {
417
+ task_routing: {
418
+ build: { model: 'codex', strategy: 'single' },
419
+ },
420
+ };
421
+ const fs = mockFs({
422
+ '/home/user/.tlc/config.json': JSON.stringify(personalConfig),
423
+ });
424
+
425
+ const result = resolveRouting({
426
+ command: 'build',
427
+ projectDir: '/project',
428
+ homeDir: '/home/user',
429
+ fs,
430
+ });
431
+
432
+ expect(result.models).toEqual(['codex']);
433
+ expect(result.strategy).toBe('single');
434
+ expect(result.source).toBe('personal-config');
435
+ });
436
+
437
+ it('project override with singular model (string) is normalized to models array', () => {
438
+ const tlcJson = {
439
+ task_routing_override: {
440
+ review: { model: 'gemini', strategy: 'single' },
441
+ },
442
+ };
443
+ const fs = mockFs({
444
+ '/project/.tlc.json': JSON.stringify(tlcJson),
445
+ });
446
+
447
+ const result = resolveRouting({
448
+ command: 'review',
449
+ projectDir: '/project',
450
+ homeDir: '/home/user',
451
+ fs,
452
+ });
453
+
454
+ expect(result.models).toEqual(['gemini']);
455
+ expect(result.strategy).toBe('single');
456
+ expect(result.source).toBe('project-override');
457
+ });
458
+
459
+ it('models array takes precedence over model string in same config entry', () => {
460
+ const personalConfig = {
461
+ task_routing: {
462
+ build: { model: 'gemini', models: ['codex', 'claude'], strategy: 'parallel' },
463
+ },
464
+ };
465
+ const fs = mockFs({
466
+ '/home/user/.tlc/config.json': JSON.stringify(personalConfig),
467
+ });
468
+
469
+ const result = resolveRouting({
470
+ command: 'build',
471
+ projectDir: '/project',
472
+ homeDir: '/home/user',
473
+ fs,
474
+ });
475
+
476
+ expect(result.models).toEqual(['codex', 'claude']);
477
+ expect(result.strategy).toBe('parallel');
478
+ });
479
+
415
480
  it('returns no providers when personal config has none', () => {
416
481
  const fs = mockFs({});
417
482