@opencode/ai 2.0.1 → 2.0.2

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.
@@ -6,7 +6,10 @@ 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, { type: "error", value: `Unknown tool: ${name}` }));
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
+ }));
10
13
  if (!tool.execute)
11
14
  return Effect.succeed(result(call, { type: "error", value: `Tool has no execute handler: ${name}` }));
12
15
  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": "2.0.1",
3
+ "version": "2.0.2",
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": "2.0.1",
33
+ "@opencode/http-recorder": "2.0.2",
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": "2.0.1",
43
+ "@opencode/schema": "2.0.2",
44
44
  "aws4fetch": "1.0.20",
45
45
  "effect": "4.0.0-rc.112",
46
46
  "google-auth-library": "10.5.0"