You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Personal-kit API gaps for AgentKit kit publish/sync #88
AgentKit G2 adds ak skills kit publish and ak skills kit sync --locked for personal kits. The work is tracked in bestagentkits/agentkit#2278 under the epic bestagentkits/agentkit#2274.
Building them against the current personal-kit API surfaced gaps that limit what a synced kit can do. AgentKit works around each one by failing safe and does not depend on any undocumented endpoint.
Gaps
A revision document has no composition metadata. There is no field for the manifest's extends and include, or for the resolution records (keep-old, fork and overlay decisions). As a result, a kit synced from SkillX cannot be rebased or edited from that copy.
Ask: optional, schema-validated composition fields on a revision document, and include them in the document digest.
No If-Match or ETag precondition on kit writes. AgentKit sends the expected generation in the request body.
Ask: honor If-Match: <generation> and return 412 on a mismatch, keeping the body field for compatibility.
Only forks of ak- skills can be published. An in-place overlay on a foundation skill is refused, so AgentKit exits 6 for it today.
Already supported, now tested and documented in #94
7
extends: skillx:<kit>
Declined as a new server feature: parent already covers a kit, and a release base depends on item 4
1. Composition (done). A revision document may carry an optional composition: {extends, include?, resolutions?}. It mirrors the AgentKit manifest extends/include and the agentkit.skill-overlay-resolution/v1 records.
Validation is strict and nothing is reordered.
It is part of the revision digest. A document without it keeps its old digest, and the existing golden vector is unchanged. The new vector is packages/contracts/src/fixtures/personal-kit-composition-golden.json.
SkillX stores it verbatim and never interprets it.
Rebase and conflict-resolution revisions drop it, because they move the pins it describes.
2. If-Match (done). Every generation-guarded write accepts If-Match: "g<n>" (the kit ETag) or a bare <n>.
A stale value gives 412 kit.generation_conflict.
The body expectedGeneration still works and keeps its 409.
If both are sent, they must agree; otherwise the request gets a 400.
3. Overlay on a foundation skill (deferred). The refusal does not come from lineage. It is the shared-alias guard, overlay.shared_alias.
The guard always treats ak-/ak: skills as shared, plus the identities in SKILLX_SHARED_SKILL_ALIASES. Every other @agentkit/* skill can already be overlaid in place (see kit-revisions.test.ts).
The guard mirrors AgentKit's own rule (its contract section 7.4: "fork it instead"). Relaxing it needs AgentKit to define precedence for a shared alias first.
Revisit once AgentKit specifies that. Until then, the fork path is the supported answer.
4. @agentkit/* bases (owner/ops decision). Bases resolve only through SkillX releases. Options:
(a) Mirror the releases on SkillX (recommended).
An operator provisions the @agentkit publisher with POST /api/v1/publishers (admin secret).
AgentKit CI publishes each foundation with a scoped releases:publish:@agentkit key.
This needs SKILLX_RELEASES_API on in production, migration 0012 applied, and a D1 backup before any apply.
No code change is needed.
(b) Accept a signed AgentKit release manifest as a base.
This adds a second trust root, with key distribution and rotation, and either byte storage or fetch-on-verify for composition digests.
Large, and duplicates (a).
(c) Status quo. AgentKit keeps failing safe.
No action was taken here.
5. Session proposals.#83 serves them on the same personal-kit API AgentKit already uses: POST /api/v1/kits/@h/k/proposals/validate, POST .../proposals, GET .../revisions/:id/proposal and POST .../revisions/:id/review (web session only), behind SKILLX_PERSONAL_KITS_API. The envelope is skillx.kit-proposal/v1, and the policy is shared via #87. Consuming it is AgentKit G4 slice 4.
6. Pins on older releases.loadPinnedBase already resolves any release the owner can read, by package, version and digest. It never compared against the newest release.
A yanked pin still stores, with a warning, so existing kits keep working. New pins should still avoid yanked versions.
If AgentKit saw "must be current", the constraint was on its side.
7. extends: skillx:<kit> (declined as a new server feature).
For a SkillX personal kit, the document's parent: {kit, revisionDigest} already expresses it: one parent, depth 4, and a foreign parent must be public and activated.
For a SkillX release foundation (the AgentKit skillx: + releaseDigest form), the entries already pin releases. What is missing is a published foundation, which is item 4.
composition.extends now accepts the skillx form as metadata, so AgentKit can record it.
Activity
mrgoonie commentedon Oct 16, 2026
Status of every item, from the code on
mainplus #94. #94 references this issue but does not close it.If-Match/ 412@agentkit/*basesextends: skillx:<kit>parentalready covers a kit, and a release base depends on item 41. Composition (done). A revision document may carry an optional
composition: {extends, include?, resolutions?}. It mirrors the AgentKit manifestextends/includeand theagentkit.skill-overlay-resolution/v1records.packages/contracts/src/fixtures/personal-kit-composition-golden.json.2. If-Match (done). Every generation-guarded write accepts
If-Match: "g<n>"(the kitETag) or a bare<n>.kit.generation_conflict.expectedGenerationstill works and keeps its 409.3. Overlay on a foundation skill (deferred). The refusal does not come from lineage. It is the shared-alias guard,
overlay.shared_alias.ak-/ak:skills as shared, plus the identities inSKILLX_SHARED_SKILL_ALIASES. Every other@agentkit/*skill can already be overlaid in place (seekit-revisions.test.ts).4.
@agentkit/*bases (owner/ops decision). Bases resolve only through SkillX releases. Options:(a) Mirror the releases on SkillX (recommended).
@agentkitpublisher withPOST /api/v1/publishers(admin secret).releases:publish:@agentkitkey.SKILLX_RELEASES_APIon in production, migration 0012 applied, and a D1 backup before any apply.(b) Accept a signed AgentKit release manifest as a base.
(c) Status quo. AgentKit keeps failing safe.
No action was taken here.
5. Session proposals. #83 serves them on the same personal-kit API AgentKit already uses:
POST /api/v1/kits/@h/k/proposals/validate,POST .../proposals,GET .../revisions/:id/proposalandPOST .../revisions/:id/review(web session only), behindSKILLX_PERSONAL_KITS_API. The envelope isskillx.kit-proposal/v1, and the policy is shared via #87. Consuming it is AgentKit G4 slice 4.6. Pins on older releases.
loadPinnedBasealready resolves any release the owner can read, by package, version and digest. It never compared against the newest release.7.
extends: skillx:<kit>(declined as a new server feature).parent: {kit, revisionDigest}already expresses it: one parent, depth 4, and a foreign parent must be public and activated.skillx:+releaseDigestform), the entries already pin releases. What is missing is a published foundation, which is item 4.composition.extendsnow accepts theskillxform as metadata, so AgentKit can record it.AgentKit follow-ups (bestagentkits/agentkit#2278):
If-Match: "g<n>"and map 412 like 409 (exit 6).composition, and compare against the new golden vector.extends: skillx:<kit>toparent.