feat(viewer-server): add /api/pi-hooks alias and memory tool routes - #1678
Open
ZeR020 wants to merge 8 commits into
Open
feat(viewer-server): add /api/pi-hooks alias and memory tool routes#1678ZeR020 wants to merge 8 commits into
ZeR020 wants to merge 8 commits into
Conversation
Pi events enter the 0.41 ingest seam through a dedicated compat route that forces source "pi". Memory-tool POSTs reuse the bounded JSON parser and the shared remember-kind catalog.
POST expand/explain/distill copied raw filter values into store queries.
Objects such as include_scope_ids:{x:1} were coerced to "[object Object]".
Validate scalar or scalar-array types and return 400 before SQLite.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tsc --build --force on core/embeddings/mcp-server/viewer-server re-emits packages/embeddings/dist/*.d.ts from every parallel pnpm lane. A sibling lane then reads the file mid-write (TS2306 "is not a module") — the TypeScript Test build step on kunickiaj#1678. Clean already deletes dist and tsbuildinfo, which is why --force was added in kunickiaj#650.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@kunickiaj Third stacked PR for pi support (#1430). Layers 1–2 are merged (#1473, #1546), so this now sits directly on
main.Why
Pi needs a dedicated ingest URL that lands on the 0.41 canonical seam, plus the missing HTTP memory-tool routes thin clients use.
What
POST /api/pi-hooks: bounded parse →buildRawEventEnvelopeFromPiEvent→ forcesource: "pi"→ awaitedingestNormalizedEnvelope. NorecordRawEvent/stripPrivateObj.remember,timeline,expand,schema,search_index,explain,distill_candidates).REMEMBER_MEMORY_KINDS; string"false"is false.pi_evt_hashed form, ingest awaited, and the remember-kinds set widened toSet<string>for filter checks.Deliberate: MCP helper bodies stay copied in this layer. Extracting them into core is a follow-up (tracked in ZeR020#8), not this PR. Docs arrive on the final layer of this track.
Test plan
vitest run packages/viewer-server/src/routes/memory-tools.test.ts— 23/23pnpm build,pnpm run lint,pnpm run tsc, fullvitest run— greenRelated: #1430, #1429