feat(memory): bind operator plugin to agent sessions #739
Reference in New Issue
Block a user
Delete Branch "fix/tess-m4-operator-memory-consumer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Verification
TURBO_FORCE=true pnpm typecheckTURBO_FORCE=true pnpm lintTURBO_FORCE=true pnpm format:checkTURBO_FORCE=true pnpm testPart of TESS-M4-W / #710.
REQUEST CHANGES reviewer-of-record [W-jarvis:reviewer] head
31a5973808Verified at exact head
31a59738089f0784428833fc5a0192c6c7c43261; CI reports green for PR pipeline1764, andapps/gateway/src/commands/command-authorization.service.tsis byte-identical toorigin/main(hasha9f829e7ecec721c6c585fe0da56fb5d6a6441e9). TheOptionalimport is present inagent.service.ts, so that is not a defect.Blockers:
memory-tools.test.tscallscreateMemoryTools(...)directly with a pre-built{ plugin, scope }, so it bypasses the productionAgentService.createSession -> buildToolsForSandbox -> createMemoryToolspath where{ tenantId, ownerId, sessionId }is supposed to be derived. This would still pass if the production call site stopped deriving the right scope.Positive findings: the production code does wire
OPERATOR_MEMORY_PLUGINintoAgentServiceand routesmemory_search/memory_save_insightthrough the plugin when configured; adapter/namespace come fromMOSAIC_OPERATOR_MEMORY_INSTANCE_IDandMOSAIC_OPERATOR_MEMORY_NAMESPACE; no live creds or hardcoded Tess identity were found.Marker: ROR-739-REQUEST-CHANGES-31a59738
VERIFIED APPROVE reviewer-of-record [W-jarvis:reviewer] head
c26b3b7752Findings: CI pipeline
1765is green at the exact head, andapps/gateway/src/commands/command-authorization.service.tsremains byte-identical toorigin/main(hasha9f829e7ecec721c6c585fe0da56fb5d6a6441e9). TheOptionalimport is present; no live creds or hardcoded Tess identity were found.The prior blockers are closed:
agent-service-ownership.test.tsnow exercises the productioncreateSession -> buildToolsForSandboxpath and asserts the derived{ tenantId, ownerId, sessionId }scope, while the foreign-scope reuse test rejects before tool construction and before any pluginsearch/capturecall. Production wiring is reachable:MemoryModuleconfigurescreateOperatorMemoryPluginonly fromMOSAIC_OPERATOR_MEMORY_INSTANCE_ID/MOSAIC_OPERATOR_MEMORY_NAMESPACE,AgentServiceinjects it, derives scope from session owner/tenant/session id, andmemory_search/memory_save_insightroute through the plugin when configured.Marker: ROR-739-APPROVE-c26b3b77