Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

Migrate all types from CLI and agent manager to a common shared package @kilocode/code-schemas that now instead owns all of the type shared in between the CLI and the agent maanger

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

⚠️ No Changeset found

Latest commit: 4d7d4e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 9, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR introduces a new @kilocode/core-schemas package that centralizes Zod schemas and TypeScript types for the CLI and extension. The refactoring is well-structured and follows good practices:

  • Provider configurations: All 38+ provider schemas are properly defined with discriminated unions
  • Auto-approval configurations: Clean schema definitions for all approval types
  • Authentication types: Kilocode organization, profile data, and device auth types
  • Agent manager types: Session management and parallel mode types
  • MCP server types: Tool, resource, and server status schemas
  • Theme types: Complete theme schema with all color categories
  • Message types: CLI and extension message schemas
  • Keyboard types: Key event and readline key schemas
  • History types: History entry and data schemas

The CLI and extension code properly re-export from the shared package while maintaining backward compatibility through type aliases and index signatures.

Files Reviewed (17 files)
  • cli/package.json - Added @kilocode/core-schemas dependency
  • cli/src/auth/types.ts - Re-exports auth types from core-schemas
  • cli/src/config/types.ts - Re-exports config types from core-schemas
  • packages/core-schemas/package.json - New package configuration
  • packages/core-schemas/tsconfig.json - TypeScript configuration
  • packages/core-schemas/tsup.config.ts - Build configuration
  • packages/core-schemas/src/index.ts - Main exports
  • packages/core-schemas/src/config/index.ts - Config exports
  • packages/core-schemas/src/config/provider.ts - Provider schemas (38+ providers)
  • packages/core-schemas/src/config/auto-approval.ts - Auto-approval schemas
  • packages/core-schemas/src/config/cli-config.ts - CLI config schema
  • packages/core-schemas/src/config/history.ts - History schemas
  • packages/core-schemas/src/auth/index.ts - Auth exports
  • packages/core-schemas/src/auth/kilocode.ts - Kilocode auth schemas
  • packages/core-schemas/src/agent-manager/types.ts - Agent manager schemas
  • packages/core-schemas/src/messages/cli.ts - CLI message schemas
  • packages/core-schemas/src/messages/extension.ts - Extension message schemas
  • packages/core-schemas/src/mcp/server.ts - MCP server schemas
  • packages/core-schemas/src/keyboard/key.ts - Keyboard input schemas
  • packages/core-schemas/src/theme/theme.ts - Theme schemas
  • src/core/kilocode/agent-manager/types.ts - Re-exports from core-schemas
  • src/package.json - Added @kilocode/core-schemas dependency
  • pnpm-lock.yaml - Lock file updates

Note: This PR requires a changeset for the new @kilocode/core-schemas package and CLI changes.

@marius-kilocode marius-kilocode requested a review from a team January 9, 2026 12:55
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.

3 participants