Skip to content

feat(web): align memory plant/list/read to #177 (signed memory:<ns> service + query-aware engine) + web wire runbook#180

Closed
hanwencheng wants to merge 1 commit into
mainfrom
claude/web-memory-namespace-177
Closed

feat(web): align memory plant/list/read to #177 (signed memory:<ns> service + query-aware engine) + web wire runbook#180
hanwencheng wants to merge 1 commit into
mainfrom
claude/web-memory-namespace-177

Conversation

@hanwencheng
Copy link
Copy Markdown
Member

What

#177 made AgentKeys memory namespace-partitioned behind the gate (OpenViking ranking engine). This updates the parent-control web app's memory plant / list / read surface + the web-flow docs to match the canonical model (arch.md §896), and adds a test runbook mirroring harness/phase1-wire-demo.sh.

The CoreBackend / web-core cap path this documents merged with #172, so these changes sit cleanly on main.

Two #177 truths the front-end now reflects

  1. Memory service/scope is the signed memory:<ns> (e.g. memory:travel): the worker keys storage per-namespace (bots/<actor>/memory/memory:<ns>.enc), the broker hashes it for isServiceInScope, and a bare memory fails cap-mint (service_not_in_scope).
  2. Reading is query-aware: the agent's pre_llm_call read is engine-ranked (OpenViking, else a deterministic fallback) over the gate-bounded lines — ranking reorders, never widens past granted namespaces. Engine chosen at wire-time.

Front-end functions

  • lib/constants.ts — new memoryService(ns) → "memory:${ns}" (single source for the convention).
  • lib/client/types.tsMasterMemoryEntry.ns + memory-section docs point at memory:<ns> / memoryService / query-ranked read.
  • lib/client/core.tscapMemoryPut/Get doc: req.service must be memory:<ns>.
  • crates/agentkeys-web-core/src/broker.rsCapRequest.service doc: namespace-qualified; bare memoryservice_not_in_scope.
  • app/_components/memory.tsx — page desc + "planted" banner: agents read per memory:<ns> scope, engine-ranked per query.

Docs (incl. a divergence fix)

Not changed (deliberately)

Daemon-mode /v1/master/memory[/plant] — the master's own IAM-scoped store; #177 touched broker/cli/core/worker-creds, not the daemon. empty.ts / pairing.tsx remain stubs.

Verification

cargo fmt --check · cargo clippy -p agentkeys-web-core -- -D warnings · wasm-pack build · tsc --noEmit · next build — all green on the main baseline (which now includes #177/#178).

🤖 Generated with Claude Code

…ery-aware engine) + web wire test runbook

#177 made memory namespace-partitioned behind the gate (OpenViking ranking engine). The web front-end + web-flow docs now match the canonical model (arch.md §896):

- memory cap/scope service is the SIGNED memory:<ns> (e.g. memory:travel); the worker keys storage per-namespace (memory:<ns>.enc); a bare memory fails cap-mint (service_not_in_scope). New memoryService(ns) helper in lib/constants.
- reading is query-aware: the agent's pre_llm_call read is engine-ranked (OpenViking, else deterministic fallback) over the gate-bounded lines, never widening past granted namespaces; engine chosen at wire-time.

Front-end functions: constants.ts (memoryService), client/core.ts (capMemoryPut/Get doc), web-core/broker.rs (CapRequest.service doc), client/types.ts (MasterMemoryEntry.ns doc + section), _components/memory.tsx (desc + planted banner).
Docs: new web-wire-test-runbook.md (mirror of phase1-wire-demo) + README index row; aligned stage3-agent-usage.md + data-model.md from bare travel -> memory:travel (no-divergence fix).

Daemon-mode /v1/master/memory[/plant] is structurally unchanged (master's own IAM-scoped store; #177 touched broker/cli/core/worker-creds, not the daemon).

Verified: cargo fmt --check + clippy -D warnings + wasm-pack build + tsc --noEmit + next build all green.
@hanwencheng hanwencheng force-pushed the claude/web-memory-namespace-177 branch from 4a8d01b to f02f8f7 Compare June 3, 2026 18:17
@hanwencheng
Copy link
Copy Markdown
Member Author

inclueded by #187

@hanwencheng hanwencheng closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant