@opencode/ai 0.0.0-dev-19530 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,7 +102,7 @@ declare const BedrockConverseBody: Schema.Struct<{
102
102
  readonly tools: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
103
103
  readonly toolSpec: Schema.Struct<{
104
104
  readonly name: Schema.String;
105
- readonly description: Schema.optional<Schema.String>;
105
+ readonly description: Schema.String;
106
106
  readonly inputSchema: Schema.Struct<{
107
107
  readonly json: Schema.$Record<Schema.String, Schema.Unknown>;
108
108
  }>;
@@ -241,12 +241,12 @@ export declare const protocol: Protocol<{
241
241
  } | {
242
242
  readonly toolSpec: {
243
243
  readonly name: string;
244
+ readonly description: string;
244
245
  readonly inputSchema: {
245
246
  readonly json: {
246
247
  readonly [x: string]: unknown;
247
248
  };
248
249
  };
249
- readonly description?: string | undefined;
250
250
  };
251
251
  })[];
252
252
  readonly toolChoice?: {
@@ -470,12 +470,12 @@ export declare const route: Route<{
470
470
  } | {
471
471
  readonly toolSpec: {
472
472
  readonly name: string;
473
+ readonly description: string;
473
474
  readonly inputSchema: {
474
475
  readonly json: {
475
476
  readonly [x: string]: unknown;
476
477
  };
477
478
  };
478
- readonly description?: string | undefined;
479
479
  };
480
480
  })[];
481
481
  readonly toolChoice?: {
@@ -71,7 +71,7 @@ const BedrockSystemBlock = Schema.Union([BedrockTextBlock, BedrockCache.CachePoi
71
71
  const BedrockToolSpec = Schema.Struct({
72
72
  toolSpec: Schema.Struct({
73
73
  name: Schema.String,
74
- description: Schema.optional(Schema.String),
74
+ description: Schema.String,
75
75
  inputSchema: Schema.Struct({
76
76
  json: JsonObject,
77
77
  }),
@@ -157,7 +157,7 @@ const BedrockEvent = Schema.Struct({
157
157
  const lowerToolSpec = (tool, inputSchema) => ({
158
158
  toolSpec: {
159
159
  name: tool.name,
160
- ...(tool.description.trim().length > 0 ? { description: tool.description } : {}),
160
+ description: tool.description,
161
161
  inputSchema: { json: inputSchema },
162
162
  },
163
163
  });
@@ -128,12 +128,12 @@ export declare const routes: import("../route/client.js").Route<{
128
128
  } | {
129
129
  readonly toolSpec: {
130
130
  readonly name: string;
131
+ readonly description: string;
131
132
  readonly inputSchema: {
132
133
  readonly json: {
133
134
  readonly [x: string]: unknown;
134
135
  };
135
136
  };
136
- readonly description?: string | undefined;
137
137
  };
138
138
  })[];
139
139
  readonly toolChoice?: {
@@ -6,10 +6,7 @@ export const dispatch = (tools, call) => {
6
6
  const name = call.namespace === undefined ? call.name : `${call.namespace}.${call.name}`;
7
7
  const tool = tools[name];
8
8
  if (!tool)
9
- return Effect.succeed(result(call, {
10
- type: "error",
11
- value: `No tool named "${name}" is currently available. Please use a tool from the available tool list.`,
12
- }));
9
+ return Effect.succeed(result(call, { type: "error", value: `Unknown tool: ${name}` }));
13
10
  if (!tool.execute)
14
11
  return Effect.succeed(result(call, { type: "error", value: `Tool has no execute handler: ${name}` }));
15
12
  return decodeAndExecute(tool, call).pipe(Effect.map((value) => result(call, value)), Effect.catchTag("Tool.Error", (failure) => Effect.succeed(result(call, { type: "error", value: failure.message }, failure.error))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-19530",
3
+ "version": "2.0.0",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@clack/prompts": "1.0.0-alpha.1",
32
32
  "@effect/platform-node": "4.0.0-rc.112",
33
- "@opencode/http-recorder": "0.0.0-dev-19530",
33
+ "@opencode/http-recorder": "2.0.0",
34
34
  "@tsconfig/bun": "1.0.9",
35
35
  "@types/bun": "1.4.0",
36
36
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -40,7 +40,7 @@
40
40
  "@aws-sdk/credential-providers": "3.1057.0",
41
41
  "@smithy/eventstream-codec": "4.2.14",
42
42
  "@smithy/util-utf8": "4.2.2",
43
- "@opencode/schema": "0.0.0-dev-19530",
43
+ "@opencode/schema": "2.0.0",
44
44
  "aws4fetch": "1.0.20",
45
45
  "effect": "4.0.0-rc.112",
46
46
  "google-auth-library": "10.5.0"