refactor: declare tool approval and definitions with explicit literals - #5
Merged
TheGreatAxios merged 2 commits intoSep 27, 2026
Conversation
TheGreatAxios
force-pushed
the
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle
branch
from
September 25, 2026 13:50
d67efc3 to
bfe4335
Compare
TheGreatAxios
force-pushed
the
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle
branch
from
September 25, 2026 14:31
bfe4335 to
4391adb
Compare
TheGreatAxios
force-pushed
the
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle
branch
2 times, most recently
from
September 26, 2026 00:57
e2e9828 to
cbb9a0f
Compare
The conditional spread in sidecar-bundle only avoided writing an undefined approval key, which the loader treats the same as an absent one. TOOL_DEFINITIONS now picks its fields explicitly instead of rest-spreading approval away. sidecar-bundle now mirrors Interchange's tools-mail bundle: the same header and JSDoc, and a factory returning an explicit definitions/run/ dispose object. Declaring approval is the one difference: every Gmail tool asks, reads included, because Gmail is third-party data.
Instantiate the gmail bundle with a real BaseEnv, as the Interchange tools-mail bundle test does, and check that its static declaration matches the emitted tool names and gates every tool behind approval. The approval check moves here from create-tools.test.ts.
TheGreatAxios
force-pushed
the
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle
branch
from
September 26, 2026 01:27
cbb9a0f to
e269284
Compare
TheGreatAxios
added this pull request to stack #9
September 26, 2026 01:58
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
sidecar-bundlemirrors Interchange's tools-mail bundle: the same header and JSDoc, and a factory returning an explicit{ definitions, run, dispose }object. The one difference is that it declaresapproval: "ask"on every definition, reads included, because Gmail is third-party data; this replaces the old conditional spread.TOOL_DEFINITIONSpicks its fields explicitly instead of rest-spreading.src/sidecar-bundle.test.tsinstantiates the bundle with a realBaseEnv, modeled on Interchange's tools-mail bundle test: declared names match emitted names, and every tool carriesapproval: "ask". The weaker approval check increate-tools.test.tsis removed.@intx/storage-isogitat0.4.0as a devDependency for the test's context store.Stacked on #4. Merge order: #4, #5, #6, #8.
Verification
bun run typecheck,bun run test(37 pass),bun run buildpass; test files are excluded fromdist.Closes CL-9042
Closes CL-9045