# Changelog

## [0.12.34]

### Added
- **React-Ink Markdown Rendering**: New `react-ink/markdown/` components exported from `indusagi/react-ink` — `Markdown`, `StreamingMarkdown` (stable-prefix streaming boundary), `MarkdownTable`, a `marked`-based `formatToken` (headings, bold/italic, depth-aware lists, blockquotes, inline code, links; module-level LRU cache + `hasMarkdownSyntax` fast-path), and a highlight.js wrapper for fenced code and tool bodies. `AssistantMessage` now renders assistant text as styled ANSI instead of raw markdown.
- **React-Ink Colored Diffs**: New `react-ink/diff/` components — `Diff` (themed added/removed backgrounds, right-aligned line-number gutter, context lines via the `diff` package's `structuredPatch`) with word-level intra-line highlighting; wired into `ToolEventBlock` for edit/write tool results.
- **Theme Roles**: `InkThemeAdapter` gains 12 new roles (inline-code, heading, blockquote bar, diff added/removed backgrounds + text, and syntax-highlight scopes) plus `role()` / `roleBackground()` accessors — fully backward-compatible through `createThemeAdapter`.

### Changed
- **Dependencies**: Added `marked`, `highlight.js`, and `diff` (+ `@types/diff`).
- **Version Bump**: Updated package version to `0.12.34`.

## [0.12.31]

### Added
- **GPT-5.5 Model**: Added `gpt-5.5` to both the `openai` and `openai-codex` providers in `app/ml/models.generated.ts` (and the compiled `local-dist-new/ml/models.generated.js` mirror).
  - `openai` / `gpt-5.5` — `api: openai-responses`, `baseUrl: https://api.openai.com/v1`, `reasoning: true`, `input: ["text", "image"]`, `contextWindow: 1_000_000`, `maxTokens: 128_000`.
  - `openai-codex` / `gpt-5.5` — `api: openai-codex-responses`, `baseUrl: https://chatgpt.com/backend-api`, `reasoning: true`, `input: ["text", "image"]`, `contextWindow: 1_000_000`, `maxTokens: 128_000`.
  - Pricing for both: input `$5` / output `$30` per 1M tokens, `cacheRead: $0.5`, `cacheWrite: $0`.

### Changed
- **Version Bump**: Updated package version to `0.12.31`.

## [0.12.30]

### Added
- **Krutrim `gpt-oss-20b` Model**: Added a new model entry under the `krutrim` provider matching the canonical Krutrim cURL example:
  ```
  POST https://cloud.olakrutrim.com/v1/chat/completions
  Authorization: Bearer ${KRUTRIM_API_KEY}
  {"model":"gpt-oss-20b", ...}
  ```
- **Krutrim `gpt-oss-120b` Model**: Added the OpenAI gpt-oss-120b open-weight model (117B params, MoE) to the `krutrim` provider. Context window `131072`, capped to `8192` max output tokens for safety (the spec allows up to 131K but most hosts cap, e.g. AWS Bedrock at 16K).
- **Krutrim `gemma-4-31b-it` Model**: Added per user request with Gemma-3-class limits (`131072` context / `8192` max output). NOTE: Krutrim's published catalog currently advertises `google/gemma-3-27b-it`; the `gemma-4-31b-it` id is unverified — confirm with Krutrim's Model Card before relying on it in production.
- All Krutrim model changes applied to both `app/ml/models.generated.ts` and the compiled `local-dist-new/ml/models.generated.js` mirror.

### Removed
- **`Krutrim-2` Model**: Removed the legacy `Krutrim-2` entry from the `krutrim` provider. The provider now exposes only `gpt-oss-20b`, `gpt-oss-120b`, and `gemma-4-31b-it`.

### Fixed
- **React-Host Loader Two-React Bug**: `local-dist-new/react-host/loader.js` was resolving `react`, `react/jsx-runtime`, and `ink` from the indusvx package's own `node_modules` *before* the consumer CLI's, causing two parallel React copies in side-by-side installs and the `Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store})` error in `<MessageList>`. The candidate-roots search now prefers the consumer's `process.argv[1]` first and falls back to indusvx's own root only as a last resort. The TypeScript source `app/react-host/loader.ts` was updated to match.

### Changed
- **Version Bump**: Updated package version to `0.12.30`.

## [0.12.29]

### Fixed
- **Third-Party Notice Bundling**: Added the third-party license notice to the `files` whitelist in `package.json` so it ships in the published tarball.
- **Version Bump**: Updated package version to `0.12.29`.

## [0.12.28]

### Changed
- **License Switch**: Replaced the MIT `LICENSE` with a proprietary "all rights reserved" notice for IndusAGI Labs.
- **Third-Party Notice**: Added a third-party license notice covering bundled dependencies.
- **README Credits**: Added a Credits section attributing IndusAGI to Varun Israni / IndusAGI Labs.
- **Version Bump**: Updated package version to `0.12.28`.

## [0.12.24]

### Changed
- **TUI Metadata Consistency**: Updated runtime defaults and metadata for consistent `indusagi` naming in source (`originator`, user-agent label, process/log prefixes, worktree branch prefix).
- **Environment Flags**: Standardized source-side TUI flags to `INDUSAGI_*` names.
- **Crash Log Path**: Updated TUI overflow debug output path to `.indusagi/agent/indus-crash.log`.
- **Version Bump**: Updated package version to `0.12.24`.

### Fixed
- **Render Overflow Stability**: Prevented hard failure on oversized non-image TUI lines by logging overflow diagnostics and safely truncating rendered lines to terminal width.

## [0.12.22]

### Changed
- **Repository Metadata**: Updated package metadata to reflect the local `indusvx-screth_copy` package directory.
- **Module Exports**: Standardized package exports around the current `mcp` and `observability` public entry points.
- **Version Bump**: Updated package version to `0.12.22`.

### Fixed
- **Import Paths**: Updated relative imports, test imports, and script references for the current package layout.
- **Tooling Paths**: Updated TypeScript and Vitest configuration while keeping `dist/` unchanged.

## [0.12.21]

### Fixed
- **Slash command submit reliability**: Improved command execution flow so slash commands (for example `/model` and `/login`) execute reliably without requiring a second Enter in affected terminal input scenarios.

### Changed
- **README naming**: Updated README references to use `indusagi` naming consistently.

## [0.12.20]

### Fixed
- **Version Bump**: Updated `indusagi` package version to `0.12.20`.
- **Tool Registry Cleanup**: Removed deprecated memory, schedule prompt, and subagent tool registrations.
- **Build Stability**: Fixed stale dist artifacts by removing deleted tool outputs from the build.

## [0.12.19]

### Changed
- **Version Bump**: Updated `indusagi` package version to `0.12.19`.
- **Model Registry**: Removed `gpt-5.4-codex`, `gpt-5.4-pro`, and `gpt-5.3-pro` model entries.
- **MiniMax Models**: Added `MiniMax-M2.5` and `MiniMax-M2.7` model entries with `contextWindow: 204800`.

## [0.12.18]

### Changed
- **Version Bump**: Updated `indusagi` package version to `0.12.18`.

## [0.12.17]

### Added
- **GPT-5.4 Mini**: Added `gpt-5.4-mini` model support for:
  - `openai` provider
  - `openai-codex` provider

### Changed
- **Version Bump**: Updated `indusagi` package version to `0.12.17`.

## [0.12.16]

### Added
- **GPT-5.4 Mini**: Added `gpt-5.4-mini` model support for:
  - `openai` provider
  - `openai-codex` provider

### Changed
- **README**: Removed the legacy inspiration tagline from the npm README (`README.md`).

## [0.12.15]

### Added
- **GPT-5.4 Models**: Added full support for GPT-5.4 model family across all providers
  - `gpt-5.4` (base model with 272k context window)
  - Available on: openai, azure-openai-responses, openai-codex, github-copilot, opencode, openrouter providers
- **GPT-5.3 Models**: Added GPT-5.3 variants to match GPT-5.4 availability
  - `gpt-5.3` and `gpt-5.3-codex` across all providers
- **Memory Support**: Full integration with indusagi/memory module
  - In-memory storage backend
  - Vector store integration for semantic search
  - OpenAI embedder support
  - Memory context injection into agent sessions
- **MCP (Model Context Protocol)**: Enhanced MCP support
  - Fixed MCP debug logging for cleaner CLI output
  - Improved error handling and connection management
  - Support for multiple MCP server configurations
  - Suppressed debug messages by default (enable with INDUSAGI_DEBUG env var)

### Fixed
- **MCP Debug Output**: Suppressed verbose MCP debug messages in interactive CLI
  - Cleaner user experience in terminal mode
  - Debug messages available when INDUSAGI_DEBUG=1
- **Import Paths**: Fixed all relative imports with .js extensions for ESM compatibility
- **Build Issues**: Resolved TypeScript compilation errors
  - Excluded observability module due to unresolved type compatibility issues (will be addressed in future release)

### Notes
- Observability module functionality is deferred to maintain core functionality
- All main modules (ai, agent, tui, mcp) are fully functional and tested

## [0.12.13]

### Added
- **Kimi K2.5 Reasoning**: Enabled thinking/reasoning for all Kimi K2.5 models
  - `kimi-k2.5` (kimi provider): `reasoning: true`
  - `kimi-for-coding` (kimi-coding provider): `reasoning: true`
  - `k2p5` (kimi-coding provider, legacy alias): `reasoning: true`

### Fixed
- **GLM-5 Context Overflow**: Fixed compaction error when using GLM-5 model
  - `contextWindow`: 204,800 → 200,000
  - `maxTokens`: 131,072 → 32,768
  - Prevents "input tokens exceeds maximum context length" errors during session compaction

## [0.12.12]

### Added
- **Session Management Exports**: Added `SessionManager` and session entry types to `indusagi/agent` exports
- **Message Utilities**: Added `convertToLlm` and custom message helpers to `indusagi/agent`
- **Docs Link**: README now links to https://www.indusagi.com

## [0.12.11]

### Fixed
- **Task Tool Streaming**: Fixed `toolCalls` and `durationMs` showing 0 during execution
  - Now accumulates stats from TaskUpdate callbacks
  - Shows real-time tool count and duration while task is running
  - Falls back to accumulated values when not in current update

## [0.12.10]

### Added
- **Task Tool Callback Architecture**: Task tool now supports custom executors
  - New `TaskExecutor` interface for injecting custom execution logic
  - New `TaskResult`, `TaskUpdate`, `SubagentStore`, `SubagentDefinition` types
  - `createTaskTool({ executor })` allows coding-agent to inject TaskSessionManager
  - Streaming updates via `onUpdate` callback

- **Todo Tool Persistence Architecture**: TodoStore now supports persistence callbacks
  - New `TodoStoreOptions` interface with `persist`, `load`, `rebuildFromBranch` callbacks
  - `TodoStore` can now persist to external storage (e.g., session entries)
  - Exported `TODO_PRIORITIES` and `TODO_STATUSES` constants

### Changed
- **Task Tool**: Now accepts `TaskToolOptions.executor` for custom execution
- **Task Tool**: Now accepts `TaskToolOptions.subagentStore` for dynamic subagent types
- **TodoStore**: Constructor now accepts `TodoStoreOptions` for persistence
- **TodoStore**: Added `find()`, `filterByStatus()`, `rebuildFromBranch()` methods

### New Exports
```typescript
// Task tool extension types
export type { TaskExecutor, TaskResult, TaskUpdate, SubagentDefinition, SubagentStore } from "indusagi/agent";

// Todo tool extension types  
export type { TodoStoreOptions } from "indusagi/agent";
export { TODO_PRIORITIES, TODO_STATUSES } from "indusagi/agent";
```

## [0.12.9]

### Changed
- **Web Search Tool**: Now works out of the box without any API key
  - Replaced placeholder implementation with DuckDuckGo Instant Answer API
  - Removed "Exa AI API configuration required" message
  - Free, no authentication needed, works immediately

## [0.12.6]

### Added
- **Claude Sonnet 4.6**: New model for `anthropic` and `opencode` providers
  - Model ID: `claude-sonnet-4-6`
  - 200K context window, 128K max output tokens
  - Pricing: $3/M input, $15/M output

### Changed
- **GPT-5.3 Codex Spark**: Context window increased from 32K to 128K tokens
- **GLM-5 (Z.AI)**: Fixed endpoint to use coding subscription path (`api.z.ai/api/coding/paas/v4`)

### Removed
- **Google Cloud Code Assist (Gemini CLI)**: OAuth provider and all models removed
- **Google Antigravity**: OAuth provider and all models removed
- Providers affected: `google-gemini-cli`, `google-antigravity`

## [0.12.5]

### Fixed
- **kimi-coding correct API**: per official Kimi Code docs (https://www.kimi.com/code/docs/en/more/third-party-agents.html)
  - api type: `anthropic-messages` ✅ (Kimi Code is Anthropic-compatible)
  - baseUrl: `https://api.kimi.com/coding` ✅ (official endpoint)
  - model: `kimi-for-coding` ✅ (official model ID, 262K context, 32K max output)
- Added `k2p5` as legacy alias for backwards compat

## [0.12.4]

### Fixed
- **kimi-coding garbled responses**: reverted `anthropic-messages` → `openai-completions` (Kimi API is OpenAI-compatible on both endpoints)
- **kimi-coding baseUrl**: corrected to `https://api.moonshot.cn/v1` (verified reachable, returns proper auth errors)
- Both `kimi` and `kimi-coding` now use `openai-completions` + `api.moonshot.cn/v1`

## [0.12.3]

### Fixed
- **kimi-coding empty responses**: fixed API type from `openai-completions` → `anthropic-messages` (Kimi Code is Anthropic-compatible, per openclaw docs)
- **kimi-coding baseUrl**: corrected to `https://api.kimi.com/anthropic`

## [0.12.2]

### Fixed
- **Kimi fetch failed**: replaced broken custom `kimi-openai-compatible` provider with existing `openai-completions` (battle-tested, SSE streaming works)
- **Kimi base URL**: corrected to `https://api.moonshot.ai/v1` (was `api.kimi.moonshot.cn/v1`)
- **Kimi env var**: `kimi` provider now reads `MOONSHOT_API_KEY`; `kimi-coding` reads `KIMI_API_KEY`
- **Kimi models**: default model updated to `kimi-k2.5` (256K context), `kimi-coding` to `k2p5`

## [0.12.1]

### Fixed
- **Kimi OAuth**: Removed fake OAuth endpoints that caused `fetch failed` error when logging in via TUI `/login` dialog
- **Kimi login**: Kimi now correctly appears in the API key section (not OAuth section) of the login selector
- `kimiOAuthProvider` removed from `getOAuthProviders()` registry — Kimi is API key only
- `kimi.ts` OAuth file stripped of non-existent device-code endpoints

## [0.12.0]

### Added
- **Kimi (Moonshot AI) Provider**: Full support for Kimi K2.5 API
  - Added `"kimi"` and `"kimi-coding"` providers
  - OpenAI-compatible streaming with Server-Sent Events
  - API key authentication via `KIMI_API_KEY` or `KIMICODE_API_KEY` environment variables
  - OAuth support with device code flow (`kimiOAuthProvider`)
  - Tool and function calling support
  - 5 new models:
    - `moonshot-v1-128k`: Kimi K2.5 with 128K context window
    - `moonshot-v1-32k`: Kimi K2.5 with 32K context window
    - `moonshot-v1-auto`: Kimi K2.5 auto mode
    - `kimi-code-latest`: Kimi Code API (subscription)
    - `kimi-code-latest-vision`: Kimi Code with vision support
  - Full streaming support with usage tracking and cost calculation
  - Automatic token buffering and error handling

## [0.11.9]

### Fixed
- **Google Antigravity**: Changed assistant identity from "Pi" to "indusagi" in system prompt bridge

## [0.11.8]

### Fixed
- **Google Antigravity**: Fixed `User-Agent` header from `antigravity/1.11.5 darwin/arm64` to `antigravity`
- **Google Antigravity**: Fixed `ideType` in `Client-Metadata` from `IDE_UNSPECIFIED` to `ANTIGRAVITY`
- These two header fixes resolve "This version of Antigravity is no longer supported" error
- All 6 Antigravity models now work: `gemini-3-flash`, `gemini-3-pro-high`, `gemini-3-pro-low`, `gpt-oss-120b-medium`, `claude-sonnet-4-5`, `claude-opus-4-6-thinking`

## [0.11.7]

### Changed
- **Google Antigravity OAuth**: Updated implementation to match openclaw
  - Fixed PKCE flow using proper `base64url` encoding
  - Improved callback server handling with better error messages
  - Added cleaner HTML response page
  - Better manual fallback flow for remote environments
  - Fixed base64 decode to use Node.js `Buffer.from()`
  - Added default model: `google-antigravity/claude-opus-4-6-thinking`
- **Google Gemini 3 models**: Fixed deprecated model IDs
  - Added `normalizeGoogleModelId()` to map `gemini-3-pro-high` → `gemini-3-pro-preview`
  - Map `gemini-3-pro-low` → `gemini-3-pro-preview`
  - Map `gemini-3-flash` → `gemini-3-flash-preview`
  - Updated `getGeminiCliThinkingLevel()` to use normalized model IDs
  - Updated `buildRequest()` to use normalized model IDs in API calls

## [0.11.4] - 2026-02-14

### Added

- Added the `gpt-5.3-codex-spark` model to the OpenAI and OpenAI Codex model lists.

## [0.1.14]

### Changed
- Updated \`indusagi\` dependency to v0.11.7
