opencode-kiro 0.3.3 → 0.3.4

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/server.js +5 -10
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -43,18 +43,14 @@ var server = async (input) => {
43
43
  throw new Error(
44
44
  "kiro-cli is not installed. Install it from https://kiro.dev/docs/cli/"
45
45
  );
46
- const onSuccess = async () => {
47
- if (inputs?.sidebar === "yes") await enableSidebarConfig(tuiConfigPath(), input);
48
- };
46
+ if (inputs?.sidebar === "yes") await enableSidebarConfig(tuiConfigPath(), input);
49
47
  if (status.authenticated) {
50
48
  return {
51
49
  url: "",
52
50
  instructions: "",
53
51
  method: "auto",
54
52
  async callback() {
55
- const result = await readToken(status.tokenPath);
56
- if (result.type === "success") await onSuccess();
57
- return result;
53
+ return readToken(status.tokenPath);
58
54
  }
59
55
  };
60
56
  }
@@ -74,9 +70,7 @@ var server = async (input) => {
74
70
  const check = verifyAuth();
75
71
  if (check.authenticated) {
76
72
  child.kill();
77
- const result = await readToken(check.tokenPath);
78
- if (result.type === "success") await onSuccess();
79
- return result;
73
+ return readToken(check.tokenPath);
80
74
  }
81
75
  }
82
76
  child.kill();
@@ -209,7 +203,8 @@ async function enableSidebarConfig(path, input) {
209
203
  });
210
204
  } catch {
211
205
  }
212
- } catch {
206
+ } catch (err) {
207
+ console.error("opencode-kiro: failed to enable the Kiro credits sidebar in tui.json:", err);
213
208
  }
214
209
  }
215
210
  var KiroAuthPlugin = server;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-kiro",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "The ACP-compliant Kiro plugin for opencode: auth via the official kiro-cli login, the live Kiro model lineup through the Agent Client Protocol, and TUI credits display",
5
5
  "license": "MIT",
6
6
  "author": "Nacho F. Lizaur (https://github.com/NachoFLizaur)",