opencode-gitlab-duo-agentic-custom-tools 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -359,16 +359,12 @@ async function createPluginHooks(input) {
359
359
  always: ["*"],
360
360
  metadata: {}
361
361
  });
362
- const url = new URL(`/session/${encodeURIComponent(ctx.sessionID)}/todo`, input.serverUrl);
363
- const response = await fetch(url);
364
- if (!response.ok) {
365
- throw new Error(`Failed to read todos: ${response.status} ${response.statusText}`);
366
- }
367
- const payload = await response.json();
368
- if (Array.isArray(payload)) {
369
- return JSON.stringify(payload, null, 2);
370
- }
371
- return "[]";
362
+ const response = await input.client.session.todo({
363
+ path: { id: ctx.sessionID },
364
+ throwOnError: true
365
+ });
366
+ const payload = response.data ?? [];
367
+ return JSON.stringify(payload, null, 2);
372
368
  }
373
369
  })
374
370
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-duo-agentic-custom-tools",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "OpenCode plugin and provider for GitLab Duo Agentic workflows",
5
5
  "license": "MIT",
6
6
  "type": "module",