fix: gate connector tools to personal/local-wiki runs (#444) - #603
Open
Krish (akyourowngames) wants to merge 1 commit into
Open
fix: gate connector tools to personal/local-wiki runs (#444)#603Krish (akyourowngames) wants to merge 1 commit into
Krish (akyourowngames) wants to merge 1 commit into
Conversation
createOpenWikiConnectorTools now takes an outputMode and returns no connector tools for repository (code) mode, so code-mode agents are no longer handed credentialed external ingestion tools (Gmail, Slack, X, ...) that throw on missing credentials. Personal/local-wiki runs are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 7f93f8c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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
Fixes #444 — connector ingest tools are exposed to
code-mode agents even though a codebase-documentation run has no business ingesting Gmail/Slack/X.createOpenWikiConnectorToolsnow accepts anoutputModeand returns[]forrepository(code) mode.src/agent/index.ts) passesoptions.outputMode, which is already"repository"for code mode and"local-wiki"for personal/chat (seegetRunModeOutputMode).Why
In code mode the agent documents a repo and writes
openwiki/*.md. With the full connector toolset present, a subagent can call e.g.openwiki_ingest_connector({connectorId:"google"}), which throwsGmail refresh token is required for OAuth refreshbecause no connector credentials are configured (a normal state for a pure codebase-doc run / CI). It also wastes tokens discovering external sources it should not touch.Test plan
test/raw-connector-tools.test.tscases asserting:local-wikimode exposesopenwiki_ingest_connector/openwiki_ingest_all_connectorsrepositorymode returns no connector toolslocal-wiki(preserves existing raw-tool tests)npx tsc -p tsconfig.json --noEmitandtsconfig.client.jsonpass.npx eslintclean on changed files.test/raw-connector-tools.test.tspass.Notes
This is distinct from #449 (operator allow/deny + graceful connector-tool failures) — that PR makes connector tools fail gracefully and adds operator tooling, whereas this PR gates them by run mode so code-mode agents are never offered them in the first place. The two are complementary.