feat(tools): opt-in dispatcher surface — gitea + gitea_help (#51) #54
No reviewers
Labels
No labels
area/dsh
area/forgejo
experiment
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-gitea!54
Loading…
Reference in a new issue
No description provided.
Delete branch "experiment/dispatcher"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a third, opt-in tool surface:
preset: dispatcherregisters two meta-tools instead of the typed set.gitea { operation, args }— validatesargsagainst that operation's schema, then runs the same execution path as the typed tool.gitea_help { operation }— returns the operation's description and compact JSON Schema as a tool result.fullremains the default and is unchanged. Closes #51 (spike complete, decision: ship opt-in).Why ship it
Measured on 2026-10-25 with five real triage tasks across three projects, five cold agents per arm (full method in #51):
It works functionally (5/5 tasks correct via 2 tools) and every step is cheaper; short tasks pay more steps, long sessions amortise them. So it ships as a selectable preset, not as the default and not as a "token saving" claim.
How
lib/dispatcher.js(pure): one-line catalog generated fromTOOL_DEFS, per-operation help capped at 1.5 KB, minimal validation (required / type / enum / unknown-argument). No second schema corpus.lib/index.js: the canonical execute path is extracted intoexecuteCanonicalTool(), shared by typed tools and dispatch so they cannot drift. Registration is still driven byapplyToolSelection()with the same signature guard.lib/selection.js:dispatcheradded to the accepted preset names; it resolves to no canonical tools because the two meta-tools are registered instead.Verification
test/dispatcher.test.mjs(8 tests): catalog covers all 96 operations one line each; help ≤ 1.5 KB for every operation; validation catches missing/typed/enum/unknown args;preset: dispatcherboots exactlygitea+gitea_help; defaultfullstill serialises to the same 65,159 B.npm run check: 188 tests, leak scan clean, syntax clean.gitea, gitea_help; reverting restored the 96 typed tools.Notes
full. This is additive.