Repository navigation
chore: extract Anthropic SDK types to local protocol file - #26
Merged
Merged
Conversation
- Create src/types/anthropic-protocol.ts re-exporting SDK types - Redirect 119 type-only imports from @anthropic-ai/sdk to local file - Keep 18 runtime imports (error classes, Anthropic constructor) on SDK - Fix MultiEditTool type in fileOperationAnalytics union type - Add AnthropicDefault/Anthropic named exports for both import patterns - Includes README_CN.md bilingual support and prior PRD features tsc --noEmit: 0 errors bun run build/build:dev/build:dev:full/compile: all pass Co-Authored-By: Claude <[email protected]>
- Protect audit log directory from AI tampering (add .fusion-code/audit to sensitive dir patterns) - Expand sensitive file patterns: .netrc, .kube/config, .docker/config.json, .git-credentials, .github-token, .env~ - Make FUSION.rules denied_tools check case-insensitive - Fix isOfflineMode() to also check FUSION_CODE_OFFLINE env var - Remove unused normalize import from session-pack Co-Authored-By: Claude <[email protected]>
dahai80
added a commit
that referenced
this pull request
Aug 29, 2026
…1 slice #26) (#196) PURE-ROUTING SUB-BLOCK extraction (same class as slice #25 apiMetricsCapture). Body at REPL.tsx:3101-3138 (37 LOC, 5 closure deps) → maybeExtractHaikuTitle() in src/utils/haikuTitleExtraction.ts. Behavior byte-identical: guard moved into helper; ctx carries titleDisabled/sessionTitle/agentTitle/haikuTitleAttemptedRef/setHaikuTitle. One-shot ref gates Haiku call (first real user message only, skips synthetic breadcrumbs via tag-prefix checks). fire-and-forget void generateSessionTitle. REPL import cleanup: 3 sole-user tags (BASH_INPUT_TAG/COMMAND_MESSAGE_TAG/ COMMAND_NAME_TAG) + 2 sole-user fns (extractFallbackTitle/generateSessionTitle) removed; LOCAL_COMMAND_STDOUT_TAG + getContentText kept (other users). REPL 6172→6128 (-44). Cumulative -924→-968. Gates: typecheck 0 / 914 tests pass / biome new-file clean / build:dev ok. Co-authored-by: Claude Fable 5 <[email protected]>
This was referenced Aug 29, 2026
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
Extract
@anthropic-ai/sdktype imports to a localsrc/types/anthropic-protocol.tsfile, decoupling type dependencies from the SDK runtime package.Changes
src/types/anthropic-protocol.ts— re-exports 40+ SDK types from 4 SDK sub-paths@anthropic-ai/sdk/...→src/types/anthropic-protocol.jsMultiEditToolmissing fromfileOperationAnalyticsunion typeAnthropicDefaultalias)Verification
tsc --noEmitbun run buildbun run build:devbun run build:dev:fullbun run compile./fusion-code --versionNext steps (future PRs)
anthropic-protocol.tsinstead of re-exporting from SDK@anthropic-ai/sdkfrom devDependencies once types are self-hosted🤖 Generated with Claude Code