Repository navigation
feat(runtime): model linked subagent session relations - #1368
Conversation
|
One storage/read-model question before this direction gets locked in: Maka already has a SQLite runtime store with schema migrations and indexed queries, but I understand the current boundary: It may be worth explicitly documenting the storage direction here. Two possible paths would be:
Otherwise the API looks like a keyed lookup while its cost is O(all sessions), and future lineage/status/descendant/usage queries may continue accumulating as filesystem scans. I do not think PR 1 necessarily needs to perform the whole SessionStore migration, but the intended ownership and scalability boundary seems important to settle before the Host projection work lands. |
bb5888c to
7b60432
Compare
Summary
This is PR 1 of the implementation sequence proposed in #1366, rebased onto the SQLite session metadata control plane completed by #1370.
subagentParentrelation to child session headers and summariessubagent_parent_session_idprojection for reverse lookupSessionManager.listChildSessions(parentSessionId)without changingagent_spawnoragent_swarmexecutionRelation contract
The child session remains the sole source of truth. Reverse lookup is derived from the canonical child metadata instead of persisting a reciprocal child ID array on the parent.
SQLite storage model
session_metadata.subagent_parent_session_idpayload_jsonSessionListFilter.subagentParentSessionIdbecomes a keyed SQLite queryNon-goals
Validation
npm run typecheck --workspace @maka/core --workspace @maka/storage --workspace @maka/runtimenpm --workspace @maka/core test(all passed)npm --workspace @maka/storage test(446 passed, 1 platform skip)npm --workspace @maka/runtime run buildnode --test packages/runtime/dist/__tests__/session-manager.test.js(202 passed)Part of #1366. Builds on #1370.