Skip to content

Feat/capability abstraction - #43536

Draft
neriousy wants to merge 2 commits into
v2from
feat/capability-abstraction
Draft

Feat/capability abstraction#43536
neriousy wants to merge 2 commits into
v2from
feat/capability-abstraction

Conversation

@neriousy

@neriousy neriousy commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a global capability-preference abstraction, initially used only for skills. This keeps mutable user preferences out of Skill.Info and leaves permissions, runtime health, and visibility as separate concerns.

A capability is identified by a typed reference. The only supported kind in this PR is:

{ kind: "skill", key: ["effect"] }

Explicit enabled and disabled preferences are stored through the shared KV service under capability:preferences. inherit removes the explicit preference and restores the skill default, which is derived from autoinvoke.

The capability API returns the default state, explicit preference, and effective state separately. The Skills dialog uses that API, while SkillInstructions applies the effective state when building automatic skill guidance. Explicit @skill references remain available even when automatic discovery is disabled.

To add another capability kind later:

  1. Extend Capability.Kind and add a canonical reference constructor such as Capability.tool(name).
  2. Add that domain's inventory to the capability API projection.
  3. Call capability.resolve(ref, defaultState) at the domain's real availability boundary.
  4. Build a domain-specific dialog over the shared preference API.

The preference service only resolves desired activation. Each domain still owns what disabling means.

How did you verify your code works?

  • Ran Core, Server, Client, and TUI typechecks.
  • Ran capability persistence and skill-instruction tests.
  • Ran the existing skill prompt and session tests.
  • Regenerated the Effect and Promise clients.

Screenshots / recordings

Not included.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@neriousy
neriousy changed the base branch from dev to v2 August 19, 2026 22:47
@neriousy
neriousy force-pushed the feat/capability-abstraction branch from b5c42b3 to 0003689 Compare August 19, 2026 23:08
@neriousy
neriousy changed the base branch from v2 to feat/proper-skill-ux August 19, 2026 23:09
Base automatically changed from feat/proper-skill-ux to v2 August 19, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant