Skip to content

Feat/capability receipt - #2185

Open
yuyang27 wants to merge 2 commits into
XiaomiMiMo:mainfrom
yuyang27:feat/capability-receipt
Open

Feat/capability receipt#2185
yuyang27 wants to merge 2 commits into
XiaomiMiMo:mainfrom
yuyang27:feat/capability-receipt

Conversation

@yuyang27

Copy link
Copy Markdown
Contributor

Issue / context (if applicable)

Type of change

Bug fix / New feature / Refactor / Documentation — keep the ones that apply and delete the rest.

What does this PR do?

Briefly describe the problem, what changed, and why this approach works.

How did you verify your code works?

What did you test, and how can a reviewer reproduce the result?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

@yuyang27
yuyang27 force-pushed the feat/capability-receipt branch 2 times, most recently from 83c9d8b to 41d005c Compare August 22, 2026 04:00
…E-1)

Emit what THIS step actually loaded — active tools + model-reachable skills +
a stable hash — on the step-start message part, so the desktop host can trust
the engine's receipt instead of deriving 'available' from install state.

Two halves because skills are not tools: the tool table only ever holds a
generic skill/skill_search, while the real skill list is injected into the
system prompt. tools = resolveTools' activeTools (callable this turn); skills =
Skill.modelInvocable (permission- + disable_model_invocation-filtered), reused
via new SystemPrompt.skillNames.

Carried prompt.ts -> StreamInput -> processor ctx -> step-start part; max-mode
replay forwards it too.
Unit-tests SystemPrompt.skillNames (the receipt's skills[] source): excludes
disable-model-invocation skills and returns empty when the skill tool is
permission-denied — the invariant that skills[] matches model reachability,
not the broader available/all sets.

(A full-turn integration test that spawned a real engine to assert the receipt
reaches the step-start part was dropped: its provideTmpdirServer spawn added
~100s of concurrent load to its CI shard, tipping timing-sensitive workflow
worktree/fan-out tests past their deadlines. The receipt→step-start wiring is
plain and covered end-to-end by the desktop-side e2e.)
@yuyang27
yuyang27 force-pushed the feat/capability-receipt branch from 41d005c to 69261f5 Compare August 22, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant