Repository navigation
feat(apps): crewmate.import owner card and ctx.crewmate for .crewmate bundles - #21721
Conversation
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS An imported crewmate gets the default template's auto-approved servers, so content from a stranger's bundle drives tools that run without asking. The RFC promises "asks before every tool". Watch
[DESIGN-REVIEWED] 76fc9f6 Description read[DESCRIPTION-READ] 371bb585ae7783d2459ccf7ce4e0bd05d471822f1ba1fc65a40ba15c9addad6e 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) — ✅ human override accepted@iamwhatever overrode this lane for |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The whole capability ships switched off ( Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: let an app hand over a
[FIRST-PRINCIPLES-REVIEWED] 76fc9f6 Description read[DESCRIPTION-READ] e3f8541d91df3da51b6754f4b7a25534e0536c915ac85857ef32cbfb0e8b3c97 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers 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: |
e1f6cf0 to
1b8a399
Compare
1b8a399 to
74fe495
Compare
|
|
|
|
|
|
|
|
|
|
|
|
|
/ai-review override ux d9719f5: Maintainer decision, same as the override on 31f5a5a: this head is only the rebase onto main after #21656 merged. The remaining UX note is wording only (the widen warning vs 'Asks before each tool'). The card ships off (PREVIEW_ENABLED=False), and its wording is reviewed again in the entry PR with real screenshots. |
Human judgment recorded@iamwhatever marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
d9719f5 to
192ed0c
Compare
|
/ai-review override ux 192ed0c: Maintainer decision, same as the overrides on 31f5a5a and d9719f5. This head only rebases onto main to pick up #21792, with no content change. The remaining UX note is wording only. The card ships off (PREVIEW_ENABLED=False), and its wording is reviewed again in the entry PR with real screenshots. |
Human judgment recorded@iamwhatever marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
|
192ed0c to
76fc9f6
Compare
|
/ai-review override ux 76fc9f6: Maintainer decision, same as the earlier overrides on this PR. This head is only a conflict rebase onto main, with no content change. The remaining UX note is wording only (risk_widen_import vs 'Asks you before each tool'). The card ships off (PREVIEW_ENABLED=False), and its wording is reviewed again in the entry PR with real screenshots. |
Human judgment recorded@iamwhatever marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
chenmingwei23
left a comment
There was a problem hiding this comment.
Approving per maintainer bulk readiness pass (readiness: passed, no failing lanes).
Problem / Motivation
Goal: An app can propose one crewmate from a
.crewmatebundle, the owner sees exactly what it would create and what it leaves out, and only the owner's press creates it.The accepted RFC
rfc-crewmate-share.md(#21508, accepted on main by #21655) needs one generic App SDK capability and an owner card. Today an app has no sanctioned way to create a crewmate:POST /api/agentsis owner-only, and widening it to app tokens would let any app install grants.Why it matters
This is the core half of Phase 1. Without it the Crewmate Share app and any template-gallery app have nothing to call.
Not a goal
app:cards, cancelling them when the app is disabled, and re-consent when an update adds the permission (next PR).propose_export), the Crewmate Share app itself.What changed (motivation → approach → change)
Apps must propose, never create → reuse the change-card store and the
crewmate.createplan so the owner routes and their app-token refusal stay the only gate → a newcrewmate.importcard kind andctx.crewmate(apps/crewmate_sdk.py, built inapps/context.pyfrom bothapps/hooks_integration.pyandapps/lifecycle.py) for apps that declarepermissions.proposeCrewmate: true(apps/manifest.py).crewmate_bundle.py(new, so the over-capchange_card_catalog.pyonly gains the kind):crewmate_import_paramschecks a parsed bundle and fails closed on unknown keys, another format, a newerformatVersion, grants, page HTML, rules, and any MCP server or skill.dashboard/handlers/change_cards.py(propose_app_card): the card is stored underapp:<name>with no conversation. Agents cannot see or propose the kind, and a chat slot key with that prefix is refused.POST /api/agentswithapproval_mode: "normal"in the same write, then the long-term goal. Undo, evidence and state reads arecrewmate.create's, including the member-id check on Undo (dashboard/change_cards.py). The first commit (feat(agents): accept approval_mode on POST /api/agents #21656) touchesdashboard/agent_admin/crew_records.py.website/src/i18n/locales/*.jsoncatalog; the kind is registered inwebsite/src/api/cards.ts.<name> 2; the owner can edit it.Builds on #21656 (merged), which added
approval_modetoPOST /api/agents; the card pinsnormalin that one create.Backwards compatibility
Compatible: every part is new. No existing kind, route or manifest field changes, and an app without the permission sees nothing new.
Removes nothing: the shared
crewmate.createbranches only gain the new kind.Tests
test/test_change_card_crewmate_import.py: each refusal class; the plan pinsnormaland carries no grant; agents cannot propose the kind;ctx.crewmateexists only for a literaltrueon both context builders; end to end, propose writes only a card underapp:share, the app token's press is 403, the owner's press creates innormal, another app cannot read the status, and Undo deletes with the member-id guard armed.website/src/cards/CardChanges.test.tsx: the new rows render localized.ctx.crewmatestaysNonefor every app (crewmate_sdk.PREVIEW_ENABLED = False) until the owner view that listsapp:cards lands (Mate sharing Phase 1: import one crewmate from a .crewmate bundle through an owner card #21718); the docs say so. The tests switch it on to cover the contract.prove.py --per-hunkwas run; the hunks it flagged in the shared create paths are now covered by the tests above.Manual verification
Rendered the card (round 6: plain-word server rows, template link) through Storybook and Playwright in dark, light and Chinese.
Screenshots / video
Light and Chinese
Related Issues
Part of #21718
Refs #21508, #21656
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)