Commit 48b2d6f
committed
CL-7919: decide workflowCoordinator/taskClassifier shape, remove both from ChatDirectorOptions
Decision:
- workflow coordination is host-owned. WorkflowHost owns the runtime
lifecycle (start/resume/reset/persist), which is load-bearing, so the
WorkflowCoordinator instance stays host-owned and reaches the director
only through the narrow setWorkflowCoordinator live-object seam (the
only path production ever used; the constructor option had zero
suppliers). All director consult sites (directive, idle rails, gate,
handleToolDone) unchanged.
- task-boundary classification is neither a host closure nor native
director behavior. The taskClassifier seam had zero production
suppliers (assembleChatAgent funnel never passes it; TUI and exec omit
it), so the decide()-time new-task path was inert in product and its
removal keeps TUI behavior byte-identical. The pure classifier
(classifyTaskBoundary Tier-1 heuristics + caller-supplied Tier-2) stays
in session/compactor.ts as host-free library.
Rejected:
- tools the director calls (loop-internal automation must not mount
model-visible surface),
- BaseEnv handles (live non-serializable objects are not config; no new
env keys),
- moving decide()-time directive/idle/gate rails out of the director
(they are the loop),
- keeping the constructor option (dead duplicate of the setter blocking
zero-closure),
- native heuristics-only classification in the director (would newly arm
new-task envelopes in the TUI),
- native full-LLM-tier classification (decide() has no side-channel
inference handle; adding one would be a new host closure).
Zero-closure: both closures removed from ChatDirectorOptions. Remaining
closures (onActivateTools, onTasksChange, requestContinuation,
getProviderId, getLiveFleetCount) belong to sibling lanes
CL-7916/7917/7918; this branch merges last (7916->7917->7918->7919).
Tests: migrated tests/unit/workflows-director.test.ts (8 sites) from the
constructor option to setWorkflowCoordinator; replaced the injected-
classifier test with a no-checkpoint normal-infer pin; added setter
attach/detach directive tests. bun run check green (7385 pass, 0 fail).1 parent 174d7e3 commit 48b2d6f
3 files changed
Lines changed: 110 additions & 76 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
423 | 419 | | |
424 | 420 | | |
425 | 421 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
429 | 436 | | |
430 | 437 | | |
431 | 438 | | |
432 | | - | |
433 | 439 | | |
434 | 440 | | |
435 | 441 | | |
| |||
465 | 471 | | |
466 | 472 | | |
467 | 473 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | 474 | | |
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
475 | 481 | | |
476 | 482 | | |
477 | 483 | | |
| |||
482 | 488 | | |
483 | 489 | | |
484 | 490 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
| |||
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
529 | | - | |
530 | 531 | | |
531 | | - | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | 774 | | |
819 | | - | |
820 | 775 | | |
821 | 776 | | |
822 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
1353 | 1352 | | |
1354 | 1353 | | |
1355 | 1354 | | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1359 | 1358 | | |
1360 | 1359 | | |
1361 | | - | |
1362 | 1360 | | |
1363 | 1361 | | |
1364 | 1362 | | |
| |||
1373 | 1371 | | |
1374 | 1372 | | |
1375 | 1373 | | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1376 | 1455 | | |
1377 | 1456 | | |
1378 | 1457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | 112 | | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | 150 | | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | 192 | | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | 283 | | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | 359 | | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | 389 | | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | 414 | | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | 439 | | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| |||
0 commit comments