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
Not built:'auto' resolving a tool-call against scope.resources — i.e. a model tool-call named for a registered Resource is dispatched to that Resource automatically, with no caller-wired handler.
Stale breadcrumb (why this was invisible)
resources/models/agentLoop.ts documents the future work against #615:
But #615 is closed/completed and is about the MCP tool registry + RBAC tools/list filtering — unrelated to scope.models auto-resolution. So the criterion has no live tracking issue. This one is it; the agentLoop.ts comments should be repointed here.
Scope (to be refined in a design note first)
Design-review-first per engineering guidelines — this adds a new dispatch surface:
Resolution: how a tool-call name maps to a scope.resources entry and which method it invokes.
Precedence: how scope.resources resolution composes with an explicit opts.toolHandlers (caller handler wins? falls through?).
RBAC: permission enforcement on the auto-dispatched Resource call (must not become an auth bypass — dispatch under the request's user/permissions).
An 'auto'generate/generateStream with tools[] declared and notoolHandlers supplied resolves a model tool-call to a registered Resource, invokes it under the caller's permissions, and feeds the result back into the loop.
Precedence with toolHandlers is defined and tested.
Part of #510. Splitting out the one remaining unchecked and untracked acceptance criterion so it isn't lost behind a stale code breadcrumb.
The gap
#510's criterion — "Tool calls work in both
'return'and'auto'modes;'auto'resolves againstscope.resources" — is only half met:toolMode: 'auto'toscope.models#612 / feat(models): toolMode 'auto' agent loop on scope.models.generate (#612) #848):toolMode: 'auto'runs the agent loop, dispatching model tool-calls against a caller-suppliedopts.toolHandlerstable.'auto'resolving a tool-call againstscope.resources— i.e. a model tool-call named for a registered Resource is dispatched to that Resource automatically, with no caller-wired handler.Stale breadcrumb (why this was invisible)
resources/models/agentLoop.tsdocuments the future work against #615:agentLoop.ts:51-52— "Registry seam: v1 dispatches via caller-suppliedopts.toolHandlers. [MCP] Tool registry + class-level introspection + RBAC-aware tools/list filtering #615 replaces that lookup with ascope.resourcesresolution using the same call signature…"agentLoop.ts:393— "([MCP] Tool registry + class-level introspection + RBAC-aware tools/list filtering #615 swaps this lookup for ascope.resourcesregistry…)"But #615 is closed/completed and is about the MCP tool registry + RBAC
tools/listfiltering — unrelated toscope.modelsauto-resolution. So the criterion has no live tracking issue. This one is it; theagentLoop.tscomments should be repointed here.Scope (to be refined in a design note first)
Design-review-first per engineering guidelines — this adds a new dispatch surface:
scope.resourcesentry and which method it invokes.scope.resourcesresolution composes with an explicitopts.toolHandlers(caller handler wins? falls through?).Acceptance
'auto'generate/generateStreamwithtools[]declared and notoolHandlerssupplied resolves a model tool-call to a registered Resource, invokes it under the caller's permissions, and feeds the result back into the loop.toolHandlersis defined and tested.agentLoop.tscomments repointed from [MCP] Tool registry + class-level introspection + RBAC-aware tools/list filtering #615 to this issue.Refs
🤖 Generated with Claude Code