fix(coding-agent): type ExtensionKernelTools as the shipped invoke scope surface - #1767
Merged
Merged
Conversation
…ope surface PR #1765 shipped kernelTools.invoke(request, { signal?, scope? }) and capabilities.invokeScope, but ExtensionContext.kernelTools still declared invoke(request, signal?: AbortSignal) with no capabilities. Alias ExtensionKernelTools to senpi-codemode KernelToolsCapability so the public typed surface cannot drift. Refs #1731
Coding-agent declares ExtensionKernelTools, KernelToolInvokeOptions, and KernelToolInvokeScope. senpi-codemode aliases those types and satisfies ExtensionKernelTools so the implementation cannot drift. Drop the reverse import that created a workspace build cycle. Refs #1731
Owner
Author
|
Reversed the type ownership after the first CI run: coding-agent importing Coding-agent now declares |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#1765 shipped
kernelTools.invoke(request, { signal?, scope? })andcapabilities.invokeScope, but the coding-agent publicExtensionKernelToolsdeclaration still hadinvoke(request, signal?: AbortSignal)and nocapabilities. Typed consumers had to cast.Coding-agent now owns the shipped surface (
ExtensionKernelTools,KernelToolInvokeOptions,KernelToolInvokeScope). senpi-codemode imports those types from@code-yeongyu/senpiand binds withsatisfies ExtensionKernelTools/KERNEL_TOOLS_CAPABILITIES satisfies ExtensionKernelTools["capabilities"], so the implementation cannot drift from the declaration. A bareAbortSignalremains typed. Runtime behavior is unchanged.The reverse import (coding-agent → senpi-codemode) is not used: senpi-codemode already depends on coding-agent, and the other direction is a workspace build cycle.
Test plan
ctx.kernelTools.invoke(req, { scope: { tools: { deny: ["write"] } } })andctx.kernelTools.capabilities.invokeScopefailedtsc --noEmit(scopeis not onAbortSignal;capabilitiesis missing).tsc --noEmitexit 0).bun run buildcompletes workspace package entries without the previous@code-yeongyu/senpicycle.Refs #1731