Files
stack/docs/tess/M4-003-OPERATOR-PLUGIN-SKETCH.md
jason.woltje 2363f155b4
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful
feat(memory): add operator retrieval plugin (#736)
2026-07-13 12:44:31 +00:00

2.1 KiB

TESS-M4-003 Operator Plugin Sketch

Memory/retrieval slice — TESS-MEM-001

Introduce a transport-neutral OperatorMemoryPlugin in packages/memory. The plugin receives a server-derived {tenantId, ownerId, sessionId} scope and delegates to a registered MemoryAdapter; adapter and namespace are injected configuration, never caller input. Its operations are capture, search, recent, stats, and startupContext. Results carry configured instance, provenance, and namespace metadata. Capture/redaction occurs before adapter persistence; startup context uses a bounded candidate window ordered so project/flat-file truth takes precedence within returned material.

Registration remains replaceable-adapter based: the existing registerMemoryAdapter(kind, factory) / createMemoryAdapter(config) seam supplies the injected adapter to createOperatorMemoryPlugin(config). Identity and namespace are configuration data; no interaction-agent name is embedded in keys or defaults.

Remaining plugin foundations — TESS-PLG-001

  • packages/agent: capability descriptors for runtime bootstrap, durable inbox/state hooks, and read-only fleet diagnostics. Each capability advertises supported operations and fails closed when absent.
  • packages/mosaic: a catalog/registration surface for GitOps, fleet diagnostics, runtime bootstrap, Discord, and MCP/skill discovery. Catalog entries describe authority, input schema, and safe/read-only status; they do not invoke provider transports directly.
  • Gateway/channel adapters consume these contracts through server-derived actor/tenant context and durable session state, preserving the replaceable-adapter boundary.

First implementation boundary

The first PR slice should add the operator-memory plugin contract, configuration-injected adapter seam, scope isolation, provenance-bearing retrieval, and tests for namespace isolation plus a differently named configured instance. Durable inbox/outbox remains owned by the existing DurableSessionCoordinator; this plugin only supplies bounded context/capture at lifecycle boundaries.