@cgasgarth/opencode-for-rust 1.1.4 → 1.1.5
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.
- package/dist/index.js +13 -3
- package/package.json +3 -5
package/dist/index.js
CHANGED
|
@@ -262,6 +262,14 @@ var RustPlugin = async (context) => {
|
|
|
262
262
|
const formatter = new RustContentFormatter(config);
|
|
263
263
|
const extractor = new RegexRustTypeExtractor(config);
|
|
264
264
|
debugLog("Created lookup, formatter, extractor");
|
|
265
|
+
if (!tool) {
|
|
266
|
+
debugLog('FATAL: @opencode-ai/plugin "tool" export is undefined');
|
|
267
|
+
}
|
|
268
|
+
if (!tool.schema) {
|
|
269
|
+
debugLog("FATAL: tool.schema is undefined - cannot define Zod schemas");
|
|
270
|
+
} else {
|
|
271
|
+
debugLog("tool.schema is available");
|
|
272
|
+
}
|
|
265
273
|
try {
|
|
266
274
|
await lookup.refresh();
|
|
267
275
|
debugLog("Initial refresh completed");
|
|
@@ -275,7 +283,7 @@ var RustPlugin = async (context) => {
|
|
|
275
283
|
args: {
|
|
276
284
|
name: z.string().describe("The name of the type to look up")
|
|
277
285
|
},
|
|
278
|
-
async execute(args) {
|
|
286
|
+
async execute(args, _context) {
|
|
279
287
|
debugLog(`lookup_type called with: ${JSON.stringify(args)}`);
|
|
280
288
|
try {
|
|
281
289
|
await lookup.refresh();
|
|
@@ -296,8 +304,10 @@ var RustPlugin = async (context) => {
|
|
|
296
304
|
}),
|
|
297
305
|
list_types: tool({
|
|
298
306
|
description: "List all available Rust type names in the project",
|
|
299
|
-
args: {
|
|
300
|
-
|
|
307
|
+
args: {
|
|
308
|
+
ignore: z.boolean().optional().describe("Ignore this argument (legacy support)")
|
|
309
|
+
},
|
|
310
|
+
async execute(_args, _context) {
|
|
301
311
|
debugLog("list_types called");
|
|
302
312
|
try {
|
|
303
313
|
await lookup.refresh();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgasgarth/opencode-for-rust",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "OpenCode plugin for Rust",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sisyphus",
|
|
@@ -28,10 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@opencode-ai/plugin": "1.0.85"
|
|
30
30
|
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"zod": "^4.0.0"
|
|
33
|
-
},
|
|
34
31
|
"devDependencies": {
|
|
32
|
+
"zod": "^4.0.0",
|
|
35
33
|
"@eslint/js": "^9.39.1",
|
|
36
34
|
"@types/bun": "latest",
|
|
37
35
|
"@types/node": "^20.12.7",
|
|
@@ -52,7 +50,7 @@
|
|
|
52
50
|
"scripts": {
|
|
53
51
|
"test": "bun test tests/",
|
|
54
52
|
"typecheck": "tsc --noEmit",
|
|
55
|
-
"build": "esbuild ./src/index.ts --bundle --format=esm --platform=node --outdir=dist --external:zod && tsc --project tsconfig.build.json",
|
|
53
|
+
"build": "esbuild ./src/index.ts --bundle --format=esm --platform=node --outdir=dist --external:@opencode-ai/plugin --external:zod && tsc --project tsconfig.build.json",
|
|
56
54
|
"lint": "eslint src --max-warnings 0",
|
|
57
55
|
"format": "prettier --check .",
|
|
58
56
|
"prepare": "husky"
|