Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/mcp-conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: MCP conformance

on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/mcp-conformance.yml'
- 'package-lock.json'
- 'packages/coding-agent/src/core/**'
- 'packages/coding-agent/src/extensions/**'
- 'packages/coding-agent/test/mcp-conformance/**'

permissions:
contents: read

jobs:
conformance:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: npm
- name: Install dependencies without lifecycle scripts
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Run local protocol conformance without production credentials
env:
OPENABCODE_CODING_AGENT_DIR: ${{ runner.temp }}/openabcode-mcp-agent
run: npm run test:mcp-conformance
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Portions of this software are derived from Pi (pi-mono)
(https://github.com/earendil-works/pi).

Copyright (c) 2025 Mario Zechner and Pi contributors
Copyright (c) 2024 Anthropic, PBC (portions of @earendil-works/pi-mcp derived from @modelcontextprotocol/sdk)
Licensed under the MIT License.

The full text of the MIT License:
Expand Down
43 changes: 28 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"profile:tui": "node scripts/profile-coding-agent-node.mjs --mode tui",
"profile:rpc": "node scripts/profile-coding-agent-node.mjs --mode rpc",
"test": "npm run test --workspaces --if-present",
"test:mcp-conformance": "node packages/coding-agent/test/mcp-conformance/run.ts",
"version:patch": "npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
"version:minor": "npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
"version:major": "npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && npm install --package-lock-only --ignore-scripts",
Expand Down
6 changes: 6 additions & 0 deletions packages/agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [1.3.0] - 2026-11-04

### Added

- Added `isError` and `structuredContent` support on `AgentToolResult` and `AfterToolCallResult`, and `outputSchema` on `AgentTool`.

## [1.2.0] - 2026-10-29

## [1.1.2] - 2026-10-27
Expand Down
4 changes: 2 additions & 2 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openabcode/agent-core",
"version": "1.2.0",
"version": "1.3.0",
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
"type": "module",
"main": "./dist/index.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@openabcode/ai": "^1.2.0",
"@openabcode/ai": "^1.3.0",
"ignore": "7.0.5",
"typebox": "1.1.38",
"yaml": "2.9.0"
Expand Down
7 changes: 6 additions & 1 deletion packages/agent/src/agent-loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ async function executePreparedToolCall(
);
acceptingUpdates = false;
await Promise.all(updateEvents);
return { result, isError: false };
return { result, isError: result.isError === true };
} catch (error) {
acceptingUpdates = false;
await Promise.all(updateEvents);
Expand Down Expand Up @@ -733,11 +733,16 @@ async function finalizeExecutedToolCall(
signal,
);
if (afterResult) {
const structuredContent =
afterResult.structuredContent ?? (afterResult.content ? undefined : result.structuredContent);
result = {
...result,
content: afterResult.content ?? result.content,
details: afterResult.details ?? result.details,
terminate: afterResult.terminate ?? result.terminate,
};
if (structuredContent === undefined) delete result.structuredContent;
else result.structuredContent = structuredContent;
isError = afterResult.isError ?? isError;
}
} catch (error) {
Expand Down
18 changes: 17 additions & 1 deletion packages/agent/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface BeforeToolCallResult {
export interface AfterToolCallResult {
content?: (TextContent | ImageContent)[];
details?: unknown;
structuredContent?: unknown;
isError?: boolean;
/**
* Hint that the agent should stop after the current tool batch.
Expand Down Expand Up @@ -352,6 +353,16 @@ export interface AgentToolResult<T> {
content: (TextContent | ImageContent)[];
/** Arbitrary structured details for logs or UI rendering. */
details: T;
/**
* Machine-readable result matching the tool's `outputSchema`, for programmatic callers. Not sent
* to the model; `content` remains the model-facing result.
*/
structuredContent?: unknown;
/**
* Report a failure without throwing. The model sees `content` as an error result, like a thrown
* error, but `details` and `structuredContent` are kept for the UI and programmatic callers.
*/
isError?: boolean;
/**
* Hint that the agent should stop after the current tool batch.
* Early termination only happens when every finalized tool result in the batch sets this to true.
Expand All @@ -376,7 +387,12 @@ export interface AgentTool<TParameters extends TSchema = TSchema, TDetails = any
* Must return an object that matches `TParameters`.
*/
prepareArguments?: (args: unknown) => Static<TParameters>;
/** Execute the tool call. Throw on failure instead of encoding errors in `content`. */
/**
* JSON Schema of `structuredContent` in successful results. Tools that declare it should always
* set `structuredContent`.
*/
outputSchema?: TSchema;
/** Execute the tool call. Throw on failure, or return a result with `isError: true`. */
execute: (
toolCallId: string,
params: Static<TParameters>,
Expand Down
6 changes: 6 additions & 0 deletions packages/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [1.3.0] - 2026-11-04

### Changed

- Refreshed generated provider and image model catalogs from upstream during MCP release preparation.

## [1.2.0] - 2026-10-29

## [1.1.2] - 2026-10-27
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openabcode/ai",
"version": "1.2.0",
"version": "1.3.0",
"description": "Unified LLM API with automatic model discovery and provider configuration",
"type": "module",
"main": "./dist/index.js",
Expand Down
18 changes: 9 additions & 9 deletions packages/ai/src/image-models.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,9 +905,9 @@ export const IMAGE_MODELS = {
cacheWrite: 0,
},
} satisfies ImagesModel<"openrouter-images">,
"tencent/hy-image-v3.5-preview": {
id: "tencent/hy-image-v3.5-preview",
name: "Tencent: Hy Image 3.5 Preview",
"sourceful/riverflow-v2.6-pro": {
id: "sourceful/riverflow-v2.6-pro",
name: "Sourceful: Riverflow V2.6 Pro",
api: "openrouter-images",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
Expand All @@ -920,9 +920,9 @@ export const IMAGE_MODELS = {
cacheWrite: 0,
},
} satisfies ImagesModel<"openrouter-images">,
"x-ai/grok-imagine-image-2.0": {
id: "x-ai/grok-imagine-image-2.0",
name: "xAI: Grok Imagine Image 2.0",
"tencent/hy-image-v3.5-preview": {
id: "tencent/hy-image-v3.5-preview",
name: "Tencent: Hy Image 3.5 Preview",
api: "openrouter-images",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
Expand All @@ -935,9 +935,9 @@ export const IMAGE_MODELS = {
cacheWrite: 0,
},
} satisfies ImagesModel<"openrouter-images">,
"x-ai/grok-imagine-image-quality": {
id: "x-ai/grok-imagine-image-quality",
name: "SpaceXAI: Grok Imagine Image Quality",
"x-ai/grok-imagine-image-2.0": {
id: "x-ai/grok-imagine-image-2.0",
name: "xAI: Grok Imagine Image 2.0",
api: "openrouter-images",
provider: "openrouter",
baseUrl: "https://openrouter.ai/api/v1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/src/providers/cloudflare-ai-gateway.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export const CLOUDFLARE_AI_GATEWAY_MODELS = {
cost: {
input: 2,
output: 10,
cacheRead: 0.2,
cacheRead: 0.1,
cacheWrite: 2.5,
},
contextWindow: 1000000,
Expand Down
23 changes: 20 additions & 3 deletions packages/ai/src/providers/mistral.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,26 @@ export const MISTRAL_MODELS = {
reasoning: true,
input: ["text", "image"],
cost: {
input: 1.36,
output: 4.18,
cacheRead: 0.14,
input: 0.7,
output: 2.1,
cacheRead: 0.07,
cacheWrite: 0,
},
contextWindow: 1048576,
maxTokens: 262144,
} satisfies Model<"mistral-conversations">,
"mistral-large-4-0-8": {
id: "mistral-large-4-0-8",
name: "Mistral Large 4.0.8",
api: "mistral-conversations",
provider: "mistral",
baseUrl: "https://api.mistral.ai",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0.7,
output: 2.1,
cacheRead: 0.07,
cacheWrite: 0,
},
contextWindow: 1048576,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/src/providers/opencode-go.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const OPENCODE_GO_MODELS = {
} satisfies Model<"anthropic-messages">,
"deepseek-v4-pro": {
id: "deepseek-v4-pro",
name: "DeepSeek V4 Pro (New)",
name: "DeepSeek V4 Pro",
api: "openai-completions",
provider: "opencode-go",
baseUrl: "https://opencode.ai/zen/go/v1",
Expand Down
Loading
Loading