Commit 7d74d56
fix: persist and restore registered context engines in plugin cache
Fixes issue #77063: lossless-claw selected and enabled but not registered
as context engine after plugin cache restore.
Root cause: When a cached plugin registry is reused, the cached state
restoration restores agent harnesses, commands, compaction providers, and
memory embedding providers, but NOT registered context engines. This causes
context engines registered by plugins (like lossless-claw) to be lost when
the plugin loader uses cached state.
Changes:
- src/context-engine/registry.ts: Add RegisteredContextEngineEntry type,
listRegisteredContextEngines(), and restoreRegisteredContextEngines()
functions for cache snapshot/restore support
- src/plugins/loader.ts: Add contextEngines field to CachedPluginState,
call restoreRegisteredContextEngines() when using cached state, and
save contextEngines to cache when storing registry1 parent 412ce1b commit 7d74d56
2 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
427 | 470 | | |
428 | 471 | | |
429 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
244 | 249 | | |
245 | 250 | | |
246 | 251 | | |
| 252 | + | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
| |||
1482 | 1488 | | |
1483 | 1489 | | |
1484 | 1490 | | |
| 1491 | + | |
1485 | 1492 | | |
1486 | 1493 | | |
1487 | 1494 | | |
| |||
2400 | 2407 | | |
2401 | 2408 | | |
2402 | 2409 | | |
| 2410 | + | |
2403 | 2411 | | |
2404 | 2412 | | |
2405 | 2413 | | |
| |||
0 commit comments