feat(den-api): grant-native capability index — chat-created skills usable without a marketplace (skill-sharing P1) - #3410
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Spec-lane proof (evals/specs)Added
Runs (verified against a pristine
|
|
Spec workflow hardening: |
…a marketplace (skill-sharing P1)
…skill-sharing P1)
753b502 to
2fa2118
Compare
|
Eval run (spec lane) on this branch — 2026-08-01T20:31:21Z Den stack: den-api from this branch on :8790 (multi_org), seeded Acme demo org. den-api acceptance suites (63/63) + typecheck previously reported above. |
There was a problem hiding this comment.
Warden security clearance: clear. No new security issues found in this diff (2fa2118c92dc7afe88b1f51b4ffec236a0ef9a09). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
What
Phase 1 of the Grant-Native Skill Sharing program (spec:
prds/skill-sharing/grant-native-skill-sharing.md, included in this PR).A skill created from the chat (
create-skillbuiltin →POST /v1/plugins) was invisible and unexecutable in chat — even for its creator, who already holds amanagergrant — because the capability index built its candidate set by inner-joiningmarketplace_plugin+marketplace. Grants only filtered; they never admitted.This PR makes the index grant-native:
notExistsactive-membership query). Execute falls back to the grant-only resolver only when the marketplace resolver returns zero rows.filterVisibleRowssemantics unchanged: a row still requires a live config-object / plugin / (when present) marketplace grant. The deliberate no-admin-bypass behavior is preserved.marketplaceis nowstring | null; summaries/hints degrade gracefully. Capability names never encoded the marketplace, so naming is untouched.GET /v1/resources/marketplace-capabilitieskeeps its non-null contract (grant-only rows filtered there; revisit in P3).create-skillbuiltin copy: reports the skill is ready to use now instead of "private until published or shared".No schema migrations. Marketplaces/catalogs unchanged.
Tests (commands + results)
New suite
test/grant-native-capabilities.test.ts(real MySQL, same harness asmarketplace-capabilities.test.ts): A1 creator grant → search/execute/descriptors work withmarketplace: null; A2 team grant admits team members,forbiddenfor others; A3 zero grants stays inaccessible; A4 marketplace-attached payloads byte-identical; A5 catalog + direct grant → one match, catalog name wins.Proof format
Per program-owner decision this program uses spec acceptance suites instead of fraimz; the spec records the P1 results section with the evidence. No video/fraimz attached — reproduce with the commands above (MySQL at 127.0.0.1:3306, per-suite DBs via
pnpm --filter @openwork-ee/den-db db:push).Next (specced, not built)
P2 share verbs in chat · P3 library UI + provenance · P4 sharing postures.