kimi-code/packages
Haozhe e6a655e101
feat(agent-core-v2): add lifecycle ledger, dynamic registry, and cascade engine (#2551)
* feat(agent-core-v2): add lifecycle ledger, dynamic registry, and cascade engine

- add `_base/lifecycle` Ledger: ordered registrations with strict reverse
  serial teardown, sync/async dual-track disposers, uninterruptible rollback,
  effect return forms, child ledgers, introspection tree, and teardown-reason
  propagation
- delegate Disposable/DisposableStore/MutableDisposable, Scope.dispose, and
  InstantiationService.dispose to the ledger; retire _constructionOrder
- ServiceCollection: entries carry uid/pinned/recipe, delete(), and a
  per-token availability event; add provide/unprovide to IInstantiationService
- add a persistent dependency graph recording constructor-injection edges
  with affectedSet/topo queries, plus a per-container cascade engine
  (contagion teardown/rebuild transactions, five unit states, pending index,
  abort hook, history ring); TestInstantiationService.set routes via provide

* fix(agent-core-v2): cascade instance replacements, tolerate abort rejections

- provide/unprovide of pre-materialized instances now runs as a cascade
  transaction too, so live dependents are torn down and rebuilt instead of
  holding a stale dependency; re-affirming the live instance stays a no-op
- a rejecting onWillCascade promise is logged and the cascade proceeds
  (best-effort), matching the synchronous-throw handling

* feat(agent-core-v2): propagate cascades across scopes along instance edges

Implements the revised D9 (the firewall design was dropped): instance edges
are scope-tagged on both ends and point child -> parent only, the dependency
graph is shared by the whole scope tree, and each change runs as one
tree-wide transaction orchestrated by the submitting scope's engine —
contagion computed over the global graph, teardown in global reverse
topological order (deepest first), rebuild in global topological order, with
each scope's engine executing its own units. Descendant scopes dying
mid-transaction are skipped idempotently; the request queue, in-flight set,
and settle waiters are tree-shared so cross-tree transactions are serialized
by the orchestrator; shadowed tokens stay outside the contagion set.
2026-08-03 15:40:40 +08:00
..
acp-adapter feat(agent-core-v2): introduce the Workspace domain and the agent-profile registry extension point (#2366) 2026-07-31 00:38:11 +08:00
agent-core fix(agent-core): strip the no-op subagent model parameter while the secondary-model experiment is off (#2449) 2026-07-31 13:09:56 +08:00
agent-core-v2 feat(agent-core-v2): add lifecycle ledger, dynamic registry, and cascade engine (#2551) 2026-08-03 15:40:40 +08:00
kaos chore: drop #/ import array fallbacks and custom resolution plugins (#1594) 2026-07-13 16:37:35 +08:00
kap-server refactor(agent-core-v2): code all domain failure modes as Error2 (#2552) 2026-08-03 15:31:57 +08:00
klient feat(agent-core-v2): interruption reminder for user-cancelled turns (#2400) 2026-07-31 18:17:14 +08:00
kosong Revert "fix(kosong): match Kimi's standalone "Unsupported image." rejection (…" (#2368) 2026-07-29 20:56:41 +08:00
migration-legacy ci: release packages (#1767) 2026-07-16 18:54:29 +08:00
minidb feat(kap-server): add session-less POST /workspace/fs:search route (#2437) 2026-07-31 12:11:26 +08:00
node-sdk fix(cli): fall back to built-in models.dev catalog when fetch fails (#2416) 2026-07-31 19:54:09 +08:00
oauth feat(kap-server): expose the managed-account profile at GET /oauth/userinfo (#2363) 2026-07-30 15:05:55 +08:00
pi-tui ci: release packages (#1989) 2026-07-22 17:24:39 +08:00
protocol refactor(agent-core-v2): code all domain failure modes as Error2 (#2552) 2026-08-03 15:31:57 +08:00
telemetry fix: close two silent-exit vectors around unhandled rejections (#1758) 2026-07-16 02:14:14 +08:00
transcript feat(agent-core-v2): interruption reminder for user-cancelled turns (#2400) 2026-07-31 18:17:14 +08:00
tree-sitter-bash feat(tree-sitter-bash): add a pure-TypeScript bash parser and an agent-core-v2 bashParser service (#2016) 2026-07-28 14:29:08 +08:00