Repository navigation
feat(memory): let an app manage Crew's memory with the owner's consent - #37498
bolichen97 wants to merge 1 commit into
Conversation
Sensitive change review
|
Sensitive Change ReviewSensitive files changed:
|
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the app grant is narrow, the owner can see and revoke it, and every switch, move or run still needs the owner's own press. Notes
[DESIGN-REVIEWED] 502d084 Description read[DESCRIPTION-READ] 3a32b841a069e648cc87ecf055bf2f858494c8fe51f7f37ff71c8e644732f40a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the Settings › Feature previews "Memory providers" toggle and the App detail permissions card with the new memory grant. No screenshot shows either one, and every sheet depends on the toggle. Evidence gaps
Notes
[UX-REVIEWED] 502d084 Description read[DESCRIPTION-READ] fce821ac4eec39e202d49df2fe1455db026725d8dd743131c5f16138284d3d16 That sha256 names everything this verdict read: the PR description, plus the 19 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Every new path sits behind a preview switch that is off by default. Three items reach past the Goal, or have no consumer in this repo. Notes
What this change shipsInventory (10 items) — 6 justifiedIntent: let an installed memory app browse and edit Crew's memory, and ask for switches, moves and benchmarks, which only the owner approves. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 502d084 Description read[DESCRIPTION-READ] 901d1ed2044762763379d49db00e0439082241f89265d059d84d55adca6691a2 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ human override acceptedReviewed Human judgment by @bolichen97 overrides the Opus 5.5 finding for [OPUS-OVERRIDE] 502d084 Verdict recorded from an authorized human decision for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
8007f4b to
1051917
Compare
7fa3df6 to
41178d2
Compare
Sensitive change review
|
|
span=b89b7833a437
|
|
span=e3d56c0010f6
|
|
span=5064bb70960c
|
|
span=ad9c68ef8d87
|
|
span=3445fc3cf8eb
|
|
span=e4d2681dae11
|
|
span=e4d2681dae11
|
|
span=fa18895f3940
|
|
span=2bf646d1f905
|
|
span=e45aa13d3310
|
|
span=25b31a8c2fe7
|
1051917 to
6689ab4
Compare
41178d2 to
13821d0
Compare
Sensitive change review
|
|
/ai-review override fable 2023292 owner-decision: agent: rebutted in #37498 (comment). Only a trusted app reaches the facade, and its trust prompt says it runs with the same access Kiro Crew has, saved credentials included, which Crew cannot limit. A search oracle gives such an app nothing it lacks; redaction is a default, not a boundary against it. Override authorized by bolichen97. |
|
span=ae25990c24ef
|
|
/ai-review override ux 2023292 owner-decision: agent: rebutted in #37498 (comment). shot-08 predates actionPlacement="below-on-phone" on the picker notices, which wraps the ask-the-agent link under its error below sm. Override authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: UX Review. Re-run the lane's latest workflow run for |
|
AI-review override not recorded: your repository permission could not be READ (the collaborator-permission API did not answer after 3 attempts). This is not a permission denial -- re-issue the command once the API is healthy. |
|
/ai-review override fable 2023292 owner-decision: agent: rebutted in #37498 (comment). Only a trusted app reaches the facade, and its trust prompt says it runs with the same access Kiro Crew has, saved credentials included, which Crew cannot limit. A search oracle gives such an app nothing it lacks; redaction is a default, not a boundary against it. Override authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Sensitive change review
|
|
span=3445fc3cf8eb
|
|
/ai-review override fable 3c41320 owner-decision: agent: rebutted in #37498 (comment). Only a trusted app reaches the facade, and its trust prompt says it runs with the same access Kiro Crew has, saved credentials included, which Crew cannot limit. A search oracle gives such an app nothing it lacks; redaction is a default, not a boundary against it. Override authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override gpt 3c41320 infra-failure: the lane failed, not the PR. Both GPT passes hit 429 Too Many Requests past the retry limit on two runs of https://github.com/kirodotdev/KiroCrew/actions/runs/44244180199, so no [GPT-REVIEWED] marker was written. Authorized by bolichen97. |
|
/ai-review override scope 3c41320 infra-failure: the lane failed, not the PR. The first run of https://github.com/kirodotdev/KiroCrew/actions/runs/44244180213 found the trusted scope harness absent and failed closed; the rerun is held at that floor and classified nothing. Authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a infra-failure release (class
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@bolichen97 recorded a infra-failure release (class
This decision applies only to this commit. A new push requires a new judgment. |
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
|
/ai-review override first-principles e5a441b owner-decision: product shape decided by the owner in #37498 (comment) : the memory provider feature sits behind a default-off preview; #37218 is in no release tag yet. Override authorized by bolichen97. |
|
span=06901b7026f4
|
|
/ai-review override ux e5a441b owner-decision: agent: rebutted in #37498 (comment) : the copy-result shots come from a smoke store that already held the 7 items, and the plan and run counts are labelled apart. Override authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Builds on the owner-only memory provider API. An app whose manifest declares permissions.memoryAdmin reaches the /api/memory/provider routes once the owner approves that exact grant; the handlers re-check the flag, audit every call with the app's name, and keep switching, running or rolling back a move, and starting a benchmark run, the owner's. An app token names only Crew's own memory, the store's active provider or a provider its own manifest declares. Policy can forbid external providers with capabilities.memory_provider. A memory manager app reaches Crew's owner memory routes only through /api/memory/provider/host/<rest>: an allowlist of memory reads and edits, re-checked for the owner or an approved memoryAdmin grant and audited, with the grant in server-side request state. It adds the context stack, Dreaming's review queue (a stale proposal is refused and stays listed) and a member's SOUL.md (read through the essentials builder's contained, size-capped read, and redacted), record filters by tier, source and status, and bulk re-tier and unforget. The App SDK gains requestMemoryProviderChange, requestMemoryMove and requestMemoryBench, each opening a host-rendered sheet where only the owner's press acts. Each sheet is one card: what happens in one line, then plain rows (where memory lives, what the provider can read, write and delete, whether existing memory is copied first, switching back), one primary button, and a closing line saying an app can only ask. The trust prompt and permission cards show memoryAdmin as one plain line naming every instruction surface it opens. Settings gains the memory provider card: the memory in use with a health dot, then the other providers, each with a switch link.
Sensitive change review
|
|
span=3445fc3cf8eb
|
|
/ai-review override fable 502d084 owner-decision: agent: rebutted in #37498 (comment). Only a trusted app reaches the facade, and its trust prompt says it runs with the same access Kiro Crew has, saved credentials included, which Crew cannot limit. A search oracle gives such an app nothing it lacks; redaction is a default, not a boundary against it. Override authorized by bolichen97. |
Human judgment recorded@bolichen97 recorded a owner-decision release (class
This decision applies only to this commit. A new push requires a new judgment. |
Problem / Motivation
Goal: An installed memory app can manage Crew's memory for the owner (browse, edit, plan moves and benchmarks, and ask to switch providers), while every switch, move and benchmark run is still approved only by the owner, on one clear host-drawn card.
The owner-only provider API (#37218) gives Crew a memory provider seam, but only the owner's own dashboard can use it. A memory manager app cannot read or tidy memory, and it has no way to ask the owner to switch or move memory. The confirm sheets and the Settings card that went with that work were hard to read: long sentences, a stack of checkboxes, and grey disabled buttons with no reason.
Why it matters
Memory apps are how users bring their own memory to Crew. Without an app grant they cannot do their job, and without a clear sheet the owner cannot tell what a switch does before pressing it. The sheet is the one place a switch or move is approved, so it has to say plainly what changes, where memory is kept, and that the app cannot press it.
Not a goal
feat/memory-provider-apiand stays a draft until that lands and its base ismain.no-new-builtin-apps.What changed (motivation → approach → change)
An app needs a grant the owner can see and revoke, a narrow path to memory routes, and a way to ask for the owner's press. So:
permissions.memoryAdminapientry (point_grants.py,token_auth_app_scope.py); handlers check it again and audit each call with the app's name. The trust prompt, re-approval row and permissions card (trustGrants.ts,TrustAppModal.tsx) show it as one plain line that leads with the outcome: "Read and edit Crew's memory and the instructions your Bots follow", then each Bot's rules, long-term goals and personality, and the standing instructions for every chat./api/memory/provider/host/<rest>memory_app_host.py) with an allowlist of memory reads and edits. Anything else answers 404; no grant answers 403. The grant rides in server-side request state, never a header. Every JSON answer relayed to an app is redacted, and an app cannot save back a document it only saw redacted (409);chat_steering.pylets the grant reach the owner's chat steering.requestMemoryProviderChange,requestMemoryMove,requestMemoryBenchopen host sheets. The app only gets back what happened.GET /api/memory/context-stack, Dreaming's queueGET/POST /api/memory/review(memory_dream.pyrecords each cited row'supdated_at; a proposal whose rows changed answers 409 and stays listed, and one leaves the list only after its edits succeed) andGET/PUT /api/members/{slug}/soul(contained, size-capped, redacted read).src/kiro_crew/memory_edit.pyfilters records by tier, source and status and adds bulk re-tier and unforget;context_blocks.pygives the app's prompt preview its block spans.App.tsxmounts the three sheet hosts;hooks/websocket/serverState.tsre-reads the provider caches on thememory_providerframe;api/client/memory.tsadds the calls;app-sdk/memoryProviderChange.ts,memoryMove.ts,memoryBench.tsandpublic/vendor/kirocrew-app-sdk.mjscarry the verbs;AppDetailPage.tsxandappDetailPageStagedGrants.tsshow the grant for approval;MemoryTab.tsxmounts the card.adoption_pin.pycountsmemoryAdminat App Kit level 8; config help, CLI hints and user docs (memory_sections.py,config-baseline.json,cli_memory_provider.py,src/kiro_crew/docs) point at Settings instead of a raw route;capabilities.memory_provider(platform/governance_parts/catalog.py,baseline.py, read bymemory_provider/resolver.py) lets a policy keep every store on Crew memory;security_posture_sinks_gateway.pyregisters the facade; catalogs inwebsite/src/i18nfor all 12 languages; coverage tests inwebsite/src/test;eval/bench/provider_run.pykeeps benchmark plans and runs in separate budgets, so an app's plans never evict an owner's run.eval/bench/own_memory.pyhonoursinclude_documents: true reads the store's documents through Crew's own provider read and screens them like other items; false leaves them out.memory_provider/preview.py,routes_preview.py), which binds the Shared Crew switch's own mechanism (PreviewSwitch,gateand the GET/PUT handlers, moved intoshared_crew/preview.pyandshared_crew/routes_preview.pywith no Shared Crew behavior change):KIROCREW_MEMORY_PROVIDER_PREVIEW=1, or the owner'smemory_provider_preview.jsonkeystone written by the owner-onlyPUT /api/memory/provider-previewand read once at start (a READONLY sandbox leaf insandbox_leaves.py,sandbox_precreate.pyandsecurity/paths_lists.py). Off: the resolver answers Crew memory whatever config says (and the native-memory pin, which reads the same answer, sends nothing), every/api/memory/provider/*route answers 404,memoryAdminis never granted, and the card, sheets and SDK verbs (not_enabled) stay out. A row in Settings > Feature previews turns it on.Each sheet is now one card (
memorySheetParts.tsx). The switch sheet asks "Switch to ?", says in one line what happens, then answers four rows from the provider's handshake: where memory lives (warning colour when it leaves the device), read, write and delete, whether existing memory is copied first, and switching back. With the copy ticked, the copy into a provider runs to its end before the switch is sent; a failed copy or a sheet closed mid-copy switches nothing, and a remote target's consent rides on that copy (egress_consenton the owner's move start). Any consent it needs sits in one warning box. One full-width Switch button, a quiet Cancel under it, and a closing line saying only the owner can approve. The copy and bench sheets use the same card; the copy sheet asks for a remote target's consent before its run, and its plan needs none. Settings shows the memory in use (mark, name, health dot, mode, "Switch back"), then "Other providers", one row each with one line and a "Switch" link. Theme tokens only; readable at 320px in light and dark (an ask-the-agent link on the card wraps under its error on a phone). Specs:app-kit-platform.mdand the feature map.Backwards compatibility
Compatible: the feature is off until the owner turns its preview on, so an existing install behaves as before #37218 whatever its config says; with it on, every new path needs a manifest flag no shipped app declares.
Removes nothing: the catalog keys this diff drops were added by this branch for the old sheets and never shipped.
Tests
test_memory_app_host.py: a granted app reaches a listed route and is audited; no grant gives 403; an unlisted route gives 404; a direct owner-route call stays refused.test_memory_provider_routes_auth.py: the grant admits only provider routes and needs its own approval; an app plans a benchmark but never runs one; no app or agent can switch.MemoryProviderSheet.test.tsx: only the owner's press switches; a remote provider needs consent; the copy runs before the switch and closing mid-copy switches nothing (fails on the old order); a copy that skipped a kind the provider does not hold (documents aside) switches nothing; Close waits while the switch after a finished copy is on its way; a failed copy back into Crew memory still reports the switch; each row answers from the handshake and the copy tick; the sheet keeps naming the provider it switched away from after the switch lands (fails with the freeze removed). 10 of 10 shuffled runs of the three sheet files pass.MemoryMoveSheet.test.tsx,MemoryBenchSheet.test.tsx: plan, run, undo and acknowledgement paths.test_memory_app_host_review.py: a merge whose keeper is gone or whose folded row was corrected is refused and stays listed; an edit that fails leaves the proposal listed; aSOUL.mdlink out of the workspace (a credential file,/dev/zero) is refused; an oversized one answers 413; the read is redacted.serverState.memoryProvider.test.ts: thememory_providerrefresh frame re-reads the provider overview and the move list (fails without the refresh target).MemoryMoveSheet.test.tsx: a move list that cannot be read shows an error. A copy that left a conflicting item (edited on both sides) is reported, not closed silently.test_memory_provider_routes_auth.py: a catalog row carriesmemoryAdminso the install prompt can name it.test_memory_app_host.py: a steering file read through the facade comes back redacted. Both host test files cover the facade, review-queue, SOUL and context-stack branch (97% ofmemory_app_host.py). A goals read through the facade is the owner's record its goal writes edit; the dashboard re-reads the preview switch on reconnect. With the preview off the app page holds nomemoryAdmingrant for approval (appDetailPageStagedGrants.test.ts).test_chat_steering_plan.py: the facade grant reads the owner's chat steering; another app still gets 404.test_memory_edit.py: a source filter finds a V1 experience by its listed source (fails with the fix reverted); a malformed tier filter is a 400, not a 500.test_memory_provider_routes_auth.py: an app reads a bench run the owner started, not another app's plan.MemoryMoveSheet.test.tsx: a rolled-back move answerscancelled.test_memory_app_host.py: an app's PUT over a document holding a secret is refused; a clean one is written.AppHostCoverage.test.tsx: an app withmemoryAdmingets the/api/memory/providerscope in its own UI (AppHost.tsx).MemoryBenchSheet.test.tsx: the egress acknowledgement names the app version, not the handshake version.test_memory_edit.py: a malformed status filter is a 400. A live record listed understatus=anyselects for a bulk edit without a stale-preview refusal.test_memory_app_host_review.py: aSOUL.mdholding a secret is not replaced by its masked copy; a Bot on the default workspace with noworkspacesentry finds itsSOUL.mdfolder like its chat does, and an unknown workspace name still finds none (fails on the old lookup). ASOUL.mdthat makes the Bot's context too big is refused and the old file is put back.TrustAppModalHostApi.test.tsx: memoryAdmin shows as the plain line, never the raw prefix, and that line names every instruction-writing row ofHOST_ROUTES.test_memory_provider_migration.py: a plan never sends memory to the target, whether an app or the owner's copy sheet started it.MemoryBenchSheet.test.tsx: the bench sheet says what Run scores, names the test set without its licence, and hides a zero call estimate.MemoryMoveSheet.test.tsx: a finished copy says so with its counts and offers no undo when nothing was copied.MemoryProviderSheet.test.tsx: the add-source sheet's note names adding a source.test_memory_provider_resolver.py: a provider check made with no session is judged by the host governance profile.test_memory_app_host_review.py: accepting a merge or tier proposal over a lesson stored as plain text is refused (409) before any edit, and the proposal stays listed.MemoryMoveSheet.test.tsx: closing the copy sheet while the copy runs answersstarted; closing right after Undo answerscancelled; closing right after Resume answersstarted.test_memory_app_host.py: an app's text-replace preview over a stored credential is refused; a clean replace still previews.test_memory_provider_bench.py: many benchmark plans never evict a real run's record or ledger.test_memory_provider_preview.py: with the switch off the resolver answers Crew memory, a savedreplacesends no native-memory pin, a provider route answers 404 andmemoryAdminis refused; with it on (env or stored) they work.MemoryProviderSheetHosts.test.tsx: off mounts no sheet and the verbs answernot_enabled.test_memory_provider_bench.py:include_documentsdecides whether Global V1 documents join the own-memory set (fails on the old code).test_memory_app_host.py: a member document's check reads the member the PUT body names; a goal rewrite is checked against the stored goal; the member roster is not reachable.test_memory_provider_routes_auth.py: an app cannot replace a provider item it only saw redacted.test_memory_edit.py: a tier change keeps an inferred lesson's source and confidence.MemoryMoveSheet.test.tsx: an unknown provider shows its own id, Copy waits for the overview, and a failed connect is said once on Settings.MemoryProviderSheet.test.tsx: the stop-reading sheet describes the leaving source on every row (read only, and where it keeps memory).Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Smoke run on an isolated gateway (own data home, never the live one), all passing: install and trust the Memory App and read its memory line; the facade answers listed reads, and 404s
config,membersand a..path; the Memory App's SDK calls open the switch, add-source, stop-reading, copy and benchmark sheets, and each answersswitched,movedorcancelledonly after the owner's press; Settings switches back through the same sheet. Light, dark and 320px; no page errors and no failed memory-provider calls. Not run: a benchmark run (it needs model calls) and an app-token call (covered by the backend tests).Screenshots / video
All from a smoke run of this revision's build on an isolated gateway (its own data home), with the Memory App calling the SDK verbs and the fixture provider app from
test/fixtures/memory_provider_app.Install trust prompt with the plain memory line (light, 320px):
Switch sheet opened by the app (light, dark, 320px):
Settings card with a provider in use (light), Crew memory in use (dark), and 320px:
Add a read-only source, then stop reading it:
Copy sheet: the plan (light, 320px) and the finished copy:
Benchmark sheet plan (light, dark, 320px):
Related Issues
Part of #36572
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)