@femtomc/mu-server 26.2.71 → 26.2.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -144,6 +144,23 @@ Bun.serve(server);
144
144
  }
145
145
  ```
146
146
 
147
+ ### Context Retrieval (Cross-store historical memory)
148
+
149
+ - `GET /api/context/search` - Search across `.mu` history stores
150
+ - Query params: `query`/`q`, `limit`, `source`/`sources`, `issue_id`, `run_id`, `session_id`,
151
+ `conversation_key`, `channel`, `channel_tenant_id`, `channel_conversation_id`, `actor_binding_id`,
152
+ `topic`, `author`, `role`, `since`, `until`.
153
+ - `GET /api/context/timeline` - Ordered timeline view anchored to a scope
154
+ - Requires at least one anchor filter: `conversation_key`, `issue_id`, `run_id`, `session_id`, `topic`, or `channel`.
155
+ - Supports `order=asc|desc` and same filters as search.
156
+ - `GET /api/context/stats` - Source-level cardinality/text-size stats for indexed context items.
157
+
158
+ Context source kinds:
159
+
160
+ - `issues`, `forum`, `events`
161
+ - `cp_commands`, `cp_outbox`, `cp_adapter_audit`, `cp_operator_turns`, `cp_telegram_ingress`
162
+ - `operator_sessions`, `cp_operator_sessions`
163
+
147
164
  ## Running the Server
148
165
 
149
166
  ### With Web UI (Recommended)
@@ -0,0 +1,5 @@
1
+ import type { ServerContext } from "../server.js";
2
+ export declare function contextRoutes(request: Request, url: URL, deps: {
3
+ context: ServerContext;
4
+ describeError: (error: unknown) => string;
5
+ }, headers: Headers): Promise<Response>;