feat: alpha → beta — major feature release#77
Merged
Rohitjoshi9023 merged 81 commits intomainfrom Mar 30, 2026
Merged
Conversation
- Add Resolvable<T> type for static or getter function values - Support dynamic headers, runtimeUrl, and body props - Values resolved fresh at request time - Backward compatible - static values still work Co-Authored-By: Claude <noreply@anthropic.com>
- Added '@anthropic-ai/sdk' dependency to the project. - Introduced a new test page for the Express demo showcasing custom tool renderers. - Enhanced server-side tool execution tracking with hidden flags to manage UI visibility. - Updated environment variables and package versions for better integration. - Improved knowledge base search functionality and tool execution management in the Copilot SDK.
…rsion - Bump version from 2.1.3 to 2.1.4 in package.json. - Improve zodToJsonSchema function to support ToolInputSchema compatibility. - Refactor internal schema conversion logic for better clarity and maintainability. - Enhance useTool hook to support both Zod schemas and JSON schemas for input parameters.
- Introduced a BODY_SIZE_LIMIT environment variable for request size management. - Added minimal runtime for a simple AI assistant prompt. - Implemented two new endpoints: a streaming endpoint and a non-streaming endpoint for copilot responses.
…fied tool search Breaking: removed agentLoop config block (use flat maxIterations + toolSearch), removed toolCatalog from ChatRequest (use tools only), removed AgentLoopConfig / ToolSelectionConfig / ToolDynamicSelectionConfig from public API, removed strictDeferredLoading and providerHints (use flat toolChoice/parallelCalls in ToolSearchConfig). New: auto-detection of deferred tools (zero config, deferLoading flag on tool is enough), flat ToolSearchConfig with description/name/maxEagerTools/maxResults/ exposeWhenExceeds/toolChoice/parallelCalls/defaultProfile/profiles/includeUnprofiled, native provider tool search auto-detected for Anthropic Sonnet/Opus 4+ and GPT-5.4+, ToolSearchConfig now exported from server index, full BM25 rewrite in tool-selection.ts (selectTools, searchTools, filterToolsByProfile, shouldExposeToolSearch, resolveNativeToolSearch, buildProviderToolOptions), AgentLoopOptions flattened to maxIterations/debug/toolSelectionConfig. copilot-sdk: useTool hook gains deferLoading/profiles/searchKeywords/group/category/ resultConfig/title/executingTitle/completedTitle/aiResponseMode/aiContext props; CopilotProvider maxIterations promoted to top-level; AbstractChat.buildRequest sends full tools array with deferLoading flags intact for server-side deferred management; HttpTransport drops toolCatalog from request body. Examples: express-demo migrated to flat API with profiles and debug payload capture; tool-scale example updated for 100-tool deferred loading; other routes updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add skill-system/ (types, registry, load-skills, frontmatter) for defining and resolving skills - Add react/skill/ (SkillProvider, SkillContext, define-skill) for React integration - Add useSkill hook for per-component skill registration/unregistration - Add useSkillStatus hook for querying registered skill state - Add setInlineSkills to ChatWithTools (delegates to AbstractChat) - Add setInlineSkills + skills prop to CopilotProvider - Export all skills APIs from react/index.ts - Rename from skills/ to skill-system/ and react/skill/ to avoid .gitignore conflict with Claude Code skill folders - Fix source type mapping in SkillProvider (inline→client-inline, url→remote-url, file→server-dir) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add server/index.ts entry (loadSkills, SkillRegistry, parseSkillFile + all types) - Add ./server subpath export to package.json - Add server/index build entry to tsup.config.ts - Add __skills field to ChatRequest interface (ChatTransport.ts) - Pass __skills in HttpTransport request body so server receives inline client skills Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add react/message-history/types.ts: DisplayMessage (extends UIMessage), CompactionMarker, LLMMessage, CompactedToolResult, SessionCompactionState, TokenUsage, CompactionEvent, CompactionStrategy, MessageHistoryConfig, UseMessageHistoryOptions, UseMessageHistoryReturn - Add react/message-history/message-utils.ts: toDisplayMessage(), toLLMMessage(), toLLMMessages(), keepToolPairsAtomic(), findSafeWindowStart(), type guards - Add react/message-history/context.ts: MessageHistoryContext + defaults - Add react/message-history/useMessageHistory.ts: Phase 1 skeleton — promotes UIMessages to DisplayMessages, builds llmMessages (no compaction yet) - Export all from react/index.ts Strategy 'none' (default) preserves 100% backward-compat. Phases 2-5 add compaction strategies on top of this foundation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced a new `message-history` system to manage long conversations within token limits. - Added four compaction strategies: `none`, `sliding-window`, `selective-prune`, and `summary-buffer`. - Implemented `useMessageHistory` hook for dual-layer message access with optional compaction. - Added session persistence for display messages and compaction state using localStorage and IndexedDB. - Enhanced token estimation with a two-tier system for improved accuracy. - Integrated compaction triggers and UI indicators for user feedback during compaction processes. This update lays the groundwork for efficient message management and enhances user experience by maintaining context while optimizing token usage.
- Introduced a new logging utility to improve debug output with scoped logging capabilities. - Updated the `ChatWithTools` and `AbstractChat` classes to utilize the new logger for better debugging. - Refactored the `AbstractAgentLoop` to execute tool calls in parallel, improving performance and responsiveness. - Enhanced message handling in `CopilotProvider` to support new logging features. - Cleaned up code by removing unnecessary line breaks and comments for better readability. These changes aim to improve the overall debugging experience and performance of the SDK.
- Introduced a `fallbackToolRenderer` prop to the `Chat` and `DefaultMessage` components, allowing for a catch-all rendering option for unmatched tools. - Implemented `groupConsecutiveMessages` functionality to hide avatars for consecutive messages from the same role, enhancing message display in chat. - Updated type definitions to include new props and ensure proper usage across components. These enhancements improve the flexibility of tool rendering and the visual organization of chat messages.
…acking - Added the `useContextStats` hook to provide live statistics on the AI copilot's context window usage, including token counts and percentages. - Updated `CopilotProvider` to manage context characters and usage, ensuring reactive updates during message interactions. - Re-exported relevant types and hooks for better accessibility in the SDK. These enhancements improve the monitoring of context usage, aiding in efficient resource management during interactions.
- MessageTree: bidirectional flat-map tree (parentId + childrenIds[] + activeChildMap)
- ReactChatState: backed by MessageTree; messages getter = visible path; getAllMessages() = all branches
- AbstractChat: branch-aware regenerate() (setCurrentLeaf instead of slice); sendMessage({editMessageId}) fork support
- ChatWithTools + ReactChat + ReactChatWithTools: switchBranch/getBranchInfo/editMessage/hasBranches pass-throughs
- useChat/CopilotProvider/CopilotContext: branching methods wired into context
- BranchNavigator: ← N/M → presentational component
- default-message: inline edit (pencil on hover, textarea, submit), BranchNavigator below user bubbles
- connected-chat: switchBranch/getBranchInfo/editMessage wired from useCopilot to Chat
- BranchInfo/MessageTree exported from chat/index + react/index (framework-agnostic)
- All new fields optional — zero breaking changes for linear conversations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Messages - CopilotProvider: add getAllMessages() to CopilotContextValue; onMessagesChange effect now uses chatRef.current.getAllMessages() so all branches (not just visible path) are passed to external callbacks; adds parent_id/children_ids to Message mapping - useInternalThreadManager: destructure getAllMessages from useCopilot(); save effect now persists getAllMessages() instead of visible-path messages; convertToCore includes parent_id/children_ids; both load paths (switchThread + auto-restore) now map parent_id→parentId and children_ids→childrenIds so branches survive page reload Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- AbstractChat: _allMessages() helper — onMessagesChange callbacks now pass all branches (not just visible path) for framework-agnostic persistence - AbstractChat: regenerate(messageId) falls back to getAllMessages() when target is on an inactive branch (was silently failing before) - BRANCHING.md: full feature doc — APIs, DB changes, adoption guide, how-it-works, live demo reference - examples/experimental: /branching demo route — BranchTreePanel live tree visualization + CopilotChat side-by-side inside one CopilotProvider Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced comprehensive documentation for the new context management features, detailing dual-layer message storage, message history compaction strategies, and token counting. - Added a skills system section explaining the use of skills as instruction playbooks, including client-side and server-side implementations, skill file formats, and the `defineSkill` helper. - Enhanced the overall structure and clarity of the documentation to facilitate better understanding and usage of the SDK's capabilities.
Merges feat/branching and feature/skills-system into a single release/alpha integration branch. Resolves all conflicts by keeping both feature sets (messageHistory + skills props, compactSession + loadSkills server exports, context stats + skill hooks). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…odes Streaming fixes (AbstractChat.ts): - All three updateMessageById calls now preserve parentId/childrenIds from the pre-pushed placeholder so the branch tree is not corrupted when setCurrentLeaf() walks up the chain. Root cause was the final finalization block running after the per-chunk fix and re-discarding parentId. Non-streaming fixes (AbstractChat.ts): - handleJsonResponse now chains parentId correctly so AI messages are placed as children of the current leaf, not at root level. - Placeholder removal now uses getAllMessages() instead of visible-only messages so inactive branches are preserved across tree.reset(). - Active path is captured before tree.reset() and restored after so edits on any branch land on the correct parent node. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New header: layered logo icon + Syne display font, clean back button, edit hint with icon — feat/branching badge removed - Background: deep navy with radial indigo/violet gradient mesh - Branch tree panel: BRANCH TREE uppercase label, stat chips (total/visible), indigo branched badge, tree connector lines (vertical + horizontal elbows), green active dots with glow, blue U / orange A role badges, monospace font - Chat header renamed to AI Copilot, loaderVariant set to wave - Top gradient accent bar increased to 3px - runtimeUrl switched back to /api/chat/branching (streaming) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brings in branch tree corruption fixes (streaming + non-streaming) and the redesigned branching demo with premium dark UI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alpha.0 and 2.1.4-alpha.0 respectively
- Updated AbstractChat to correctly chain tool messages under the appropriate parent message, ensuring proper conversation flow. - Adjusted error handling for unresolved tool calls to maintain message hierarchy. - Improved rendering logic in DefaultMessage to prioritize tool's own render function over fallback options, enhancing customization for tool results.
…tion - Refactored the minimal runtime setup to support both Claude and GPT models, allowing dynamic selection based on the x-copilot-model header. - Updated API endpoints to utilize the selected runtime for processing requests. - Enhanced health check response to list available models and provide selection hints. - Bumped copilot-sdk version to 2.1.5-alpha.1.
- Added a new `messageView` prop to `<CopilotChat>` and `<Chat>` components, allowing developers to customize the message list rendering. - Enhanced the API to provide pre-rendered message elements and raw messages for conditional rendering. - Updated documentation to include usage examples and details on the new prop. - Bumped version to 2.1.5-alpha.2 to reflect these changes.
- Shipped the headless primitive API for chat components, allowing developers to build custom chat layouts using `ChatPrimitives`. - Updated documentation to reflect the new API and provide usage examples. - Added message actions support with floating action buttons for user and assistant messages. - Enhanced the `DefaultMessage` component to integrate floating actions and improve message rendering flexibility.
…ence controls - Updated the thread data structure to include an optional activeLeafId for preserving branch selection across reloads. - Enhanced the ThreadManager to handle activeLeafId during thread creation and updates. - Modified CopilotProvider and internal thread manager to support parentId and childrenIds for improved message hierarchy. - Added an enabled flag to control thread management effects based on persistence settings, preventing unwanted interactions in non-persistent instances. - Bumped version to 2.1.5-alpha.3 to reflect these changes.
Docs (apps/docs): - Convert chat.mdx → chat/ folder with branching + message-actions sub-pages - Convert smart-ai-context.mdx → context/ folder with compaction, token-tracking, session sub-pages - Convert customizations.mdx → customizations/ folder with chat-primitives + custom-message-view sub-pages - Add skills/ section (index, client, server) - Add tools/deferred-tools.mdx and tools/hidden-tools.mdx - All new alpha pages marked Beta in sidebar badge and page callout Playground (examples/playground): - Add AlphaConfig type with message actions, branching, skills, context management, tools, custom message view - Add AlphaFeaturesSection control panel accordion with all toggles - Add ContextStatsBar (useContextStats token usage display) - Add HiddenAnalyticsTool (hidden: true demo) and DeferredSearchTool (deferLoading: true demo) - Wire SkillProvider with brand-voice (eager) and code-review (auto) skills - Add CopilotChat.MessageActions (Copy, Edit, Feedback) to all three layouts - Add messageView custom footer demo - All alpha config persisted to localStorage SDK (packages/copilot-sdk): - Forward MessageActions, CopyAction, EditAction, FeedbackAction onto CopilotChat export in connected-chat.tsx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unsupported page object syntax from all meta.json files - Narrow skills/ gitignore rule to examples/*/skills/ so docs/skills/ is tracked Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds @yourgpt/llm-sdk/fallback subpath export: - createFallbackChain() with priority and round-robin routing - Per-model retries with exponential/fixed backoff before fallback - FallbackExhaustedError with per-model failure breakdown - MemoryRoutingStore (default) + pluggable RoutingStore interface - onRetry / onFallback observability callbacks - Two-tier error detection (class-based for complete(), message-regex for stream()) Includes fallback-demo example and docs page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds @yourgpt/llm-sdk/fallback subpath export: - createFallbackChain() with priority and round-robin routing - Per-model retries with exponential/fixed backoff before fallback - FallbackExhaustedError with per-model failure breakdown - MemoryRoutingStore (default) + pluggable RoutingStore interface - onRetry / onFallback observability callbacks - Two-tier error detection (class-based for complete(), message-regex for stream()) Includes fallback-demo example and docs page. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts: # pnpm-lock.yaml
…ercel deploy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o and generative-ui-demo Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ensions with composite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ion and UI improvements - Added support for dynamic skills registration via API, allowing skills to be registered at runtime. - Updated server to handle dynamic skills, including new endpoints for skill management. - Introduced a new skill for frontend design with detailed guidelines. - Improved UI with new font styles (DM Sans and DM Mono) and animations for skill activation. - Enhanced the skills panel to display both static and dynamic skills, improving user experience. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added 'vaul' version 1.1.2 and 'tw-animate-css' version 1.4.0 to dependencies. - Updated 'yourgpt-server-demo' with new dependencies including 'cors', 'dotenv', 'express', and 'ws'. - Updated devDependencies for 'yourgpt-server-demo' with '@types/cors', '@types/express', '@types/ws', 'tsx', and 'typescript'. - Updated integrity checks for '@types/ws' and 'vaul' in the lockfile.
- Deleted the comprehensive documentation for the tool management branch, which included details on features, configurations, and known issues related to the tool management stack across copilot-sdk and llm-sdk.
Rohitjoshi9023
approved these changes
Mar 30, 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.
What's in this release
This PR brings all alpha work into main — a significant feature expansion across the SDK, UI layer, and developer tooling.
🔀 Fallback Chain & Routing (
@yourgpt/llm-sdk/fallback)New subpath export for multi-provider resilience:
createFallbackChain()— priority and round-robin routing across anyLLMAdapterFallbackExhaustedErrorwith per-model failure breakdownRoutingStoreinterface (Redis, Upstash, Cloudflare KV, etc.)onRetry/onFallbackcallbacks for observability💬 Conversation Branching
MessageTree— create, switch, and persist branchesuseBranchinghook +<BranchNavigator />component🧠 Context Management
useContextStats— live token usage tracking against the context window🎯 Skills System
SkillProvider+useSkill/useSkillStatushooks__skillstransport wire-up📎 File Attachments
useAttachmentshook +<AttachmentStrip />component💾 Storage Adapter
🧩 Headless Primitives
useCopilotEvent— subscribe to SDK lifecycle eventsuseMessageMeta— per-message metadata without re-renders🎨 Chat Primitives & Customization
ChatPrimitives— composable building blocks for custom layoutsmessageViewprop for fully custom message renderingallowEdit, checkpoint exports, and message action slotscsdk-*) for styling all overlays⚙️ Generative UI (Experimental)
useGenerativeUI+generativeUITool— stream structured UI from the LLMCardRenderer,TableRenderer,ChartRenderer,StatRenderer🛠 DX & Examples
fallback-demo— Express server with 8 routes covering all fallback scenariosheadless-slack-demo— full Slack-style UI built on headless primitivesgenerative-ui-demo+skills-demo— standalone Vite examplesBreaking changes
None — all additions are new exports or opt-in props.
🤖 Generated with Claude Code