Skip to content

refactor: declare tool approval and definitions with explicit literals - #5

Merged
TheGreatAxios merged 2 commits into
cl-9043-google-tools-make-intxagent-and-intxtypes-required-peersfrom
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle
Sep 27, 2026
Merged

TheGreatAxios merged 2 commits into
cl-9043-google-tools-make-intxagent-and-intxtypes-required-peersfrom
cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • sidecar-bundle mirrors 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 declares approval: "ask" on every definition, reads included, because Gmail is third-party data; this replaces the old conditional spread.
  • TOOL_DEFINITIONS picks its fields explicitly instead of rest-spreading.
  • src/sidecar-bundle.test.ts instantiates the bundle with a real BaseEnv, modeled on Interchange's tools-mail bundle test: declared names match emitted names, and every tool carries approval: "ask". The weaker approval check in create-tools.test.ts is removed.
  • Pins @intx/storage-isogit at 0.4.0 as 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 build pass; test files are excluded from dist.

Closes CL-9042
Closes CL-9045

@TheGreatAxios
TheGreatAxios force-pushed the cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle branch from d67efc3 to bfe4335 Compare September 25, 2026 13:50
@TheGreatAxios
TheGreatAxios force-pushed the cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle branch from bfe4335 to 4391adb Compare September 25, 2026 14:31
@TheGreatAxios
TheGreatAxios force-pushed the cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle branch 2 times, most recently from e2e9828 to cbb9a0f Compare September 26, 2026 00:57
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
TheGreatAxios force-pushed the cl-9042-google-tools-replace-conditional-spread-in-sidecar-bundle branch from cbb9a0f to e269284 Compare September 26, 2026 01:27
@TheGreatAxios TheGreatAxios changed the title Declare sidecar-bundle approval explicitly and add a loader test refactor: declare tool approval and definitions with explicit literals Sep 26, 2026
@TheGreatAxios
TheGreatAxios added this pull request to stack #9 September 26, 2026 01:58
@TheGreatAxios
TheGreatAxios merged commit a097cf6 into main Sep 27, 2026
2 checks passed
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