opencode-kiro 0.5.0-beta.2 → 0.5.0-beta.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 (3) hide show
  1. package/README.md +17 -12
  2. package/dist/server.js +14 -3
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # opencode-kiro
2
2
 
3
- > ⚠️ **Experimental prerelease** — `0.5.0-beta.2` targets the **unreleased OpenCode v2**
3
+ > ⚠️ **Experimental prerelease** — `0.5.0-beta.3` targets the **unreleased OpenCode v2**
4
4
  > plugin contract at a pinned snapshot. It does **not** work with OpenCode v1.
5
5
  > v1 users: stay on **`opencode-kiro@0.4.0`** (the `main` branch / npm `latest` line,
6
6
  > which remains the supported stable release). See
7
- > [RELEASE_NOTES_0.5.0-beta.2.md](./RELEASE_NOTES_0.5.0-beta.2.md) and
7
+ > [RELEASE_NOTES_0.5.0-beta.3.md](./RELEASE_NOTES_0.5.0-beta.3.md) and
8
8
  > [PINNED_VERSIONS.md](./PINNED_VERSIONS.md) for exact pins and the tested OpenCode SHA.
9
9
  > No OpenCode v2 release date is known or claimed here.
10
10
 
@@ -36,9 +36,9 @@ This prerelease is built and tested against **one pinned OpenCode v2 snapshot**:
36
36
 
37
37
  | Item | Value |
38
38
  |---|---|
39
- | Tested OpenCode commit (`upstream/v2`) | `1cf61593b5ec204619b3f679fe418fec10ca5934` |
40
- | `@opencode-ai/plugin` | `0.0.0-dev-17968` (exact) |
41
- | Package version | `0.5.0-beta.2` |
39
+ | Tested OpenCode commit (`upstream/v2`) | `8ba434b5973856b2f32b8cd3543e154b25c413e6` |
40
+ | `@opencode-ai/plugin` | `0.0.0-dev-18686` (exact) |
41
+ | Package version | `0.5.0-beta.3` |
42
42
 
43
43
  Full pin table and verification evidence: [PINNED_VERSIONS.md](./PINNED_VERSIONS.md).
44
44
  There is no `engines.opencode` constraint — the v2 host has no stable semver yet; the
@@ -59,17 +59,22 @@ array (plural) of your OpenCode config (`opencode.json`, project or global):
59
59
 
60
60
  ```json
61
61
  {
62
- "plugins": ["opencode-kiro@0.5.0-beta.2"]
62
+ "plugins": ["opencode-kiro@0.5.0-beta.3"]
63
63
  }
64
64
  ```
65
65
 
66
+ > ⚠️ **Always pin the exact version, as above.** The host now background-auto-refreshes
67
+ > UNPINNED npm plugin packages to whatever the registry serves — a bare `"opencode-kiro"`
68
+ > spec can silently move you off the tested build. Use the exact
69
+ > `opencode-kiro@0.5.0-beta.3` spec.
70
+
66
71
  The object form pins the same version and leaves room for future options:
67
72
 
68
73
  ```json
69
74
  {
70
75
  "plugins": [
71
76
  {
72
- "package": "opencode-kiro@0.5.0-beta.2",
77
+ "package": "opencode-kiro@0.5.0-beta.3",
73
78
  "options": {}
74
79
  }
75
80
  ]
@@ -78,7 +83,7 @@ The object form pins the same version and leaves room for future options:
78
83
 
79
84
  This loads the server entry (`./server` export): auth, model discovery, and provider
80
85
  ownership. The server plugin declares **`tui: true`**, so the host TUI **auto-loads the
81
- package's `./tui` entrypoint by itself** — the sidebar credits box and the composer
86
+ package's `./tui` entrypoint by itself** — the sidebar credits box and the prompt footer
82
87
  credits chip appear with no further configuration. **No `cli.json` TUI entry is
83
88
  needed.** (The beta.1 two-file setup is obsolete: if you added `"opencode-kiro"` to
84
89
  your global `cli.json` `plugins` array for beta.1, remove it.)
@@ -91,7 +96,7 @@ activates either:
91
96
 
92
97
  ```json
93
98
  {
94
- "plugins": ["opencode-kiro@0.5.0-beta.2", "-kiro"]
99
+ "plugins": ["opencode-kiro@0.5.0-beta.3", "-kiro"]
95
100
  }
96
101
  ```
97
102
 
@@ -113,14 +118,14 @@ npm install && npm run build && npm pack
113
118
  ```
114
119
 
115
120
  ```json
116
- { "plugins": ["opencode-kiro@file:/absolute/path/to/opencode-kiro-0.5.0-beta.2.tgz"] }
121
+ { "plugins": ["opencode-kiro@file:/absolute/path/to/opencode-kiro-0.5.0-beta.3.tgz"] }
117
122
  ```
118
123
 
119
124
  A bare path or bare `file:` spec is rejected at the tested SHA — the `name@file:` form
120
125
  is required. **Caveat (local `file:` installs only)**: the colon in the resulting
121
126
  install dirname defeats the host's OpenTUI loader shim, so the TUI surfaces render a
122
127
  contained per-slot error notice instead of the credits views (the rest of the TUI keeps
123
- working). Registry installs (`opencode-kiro@0.5.0-beta.2`) use colon-free paths and are
128
+ working). Registry installs (`opencode-kiro@0.5.0-beta.3`) use colon-free paths and are
124
129
  fully green — this affects local tarball validation only.
125
130
 
126
131
  The host resolves entrypoints from the package `exports` (`./server` for the server
@@ -273,7 +278,7 @@ v1 (`opencode >= 1.16.0`). It uses the v1 contract throughout: singular `plugin`
273
278
  arrays in `opencode.json` and `tui.json`, the `opencode plugin opencode-kiro`
274
279
  installer, and `part.metadata.kiro` credits. Its full documentation is the README at
275
280
  the [`v0.4.0` tag](https://github.com/NachoFLizaur/opencode-kiro/tree/v0.4.0)
276
- (equivalently, `main`). Do not install `0.5.0-beta.2` into an OpenCode v1 setup.
281
+ (equivalently, `main`). Do not install `0.5.0-beta.3` into an OpenCode v1 setup.
277
282
 
278
283
  ## Development
279
284
 
package/dist/server.js CHANGED
@@ -8,7 +8,7 @@ var POLL_INTERVAL_MS = 2e3;
8
8
  var MAX_WAIT_MS = 12e4;
9
9
  var NOT_INSTALLED_MESSAGE = "kiro-cli is not installed. Install it from https://kiro.dev/docs/cli/";
10
10
  var TIMEOUT_MESSAGE = "Kiro authentication timed out. Run `kiro-cli login` manually, then re-run `opencode auth login`.";
11
- var LOGIN_INSTRUCTIONS = "Complete Kiro authentication in the browser window that just opened. Waiting for login...";
11
+ var LOGIN_INSTRUCTIONS = "Complete Kiro authentication in the browser window that just opened (if no browser opened, run `kiro-cli login` in another terminal). Waiting for login...";
12
12
  var ALREADY_AUTHENTICATED_INSTRUCTIONS = "Already authenticated with Kiro CLI.";
13
13
  function createAuthResources() {
14
14
  return {
@@ -221,15 +221,26 @@ function createDiscover(context, state) {
221
221
  return run;
222
222
  };
223
223
  }
224
+ function isKiroCredentialEvent(event) {
225
+ const type = event.type;
226
+ if (type === "integration.connection.updated") {
227
+ const data = event.data;
228
+ return data?.integrationID === KIRO_INTEGRATION_ID;
229
+ }
230
+ if (event.type === "credential.switched") {
231
+ return asString(event.data.integrationID) === KIRO_INTEGRATION_ID;
232
+ }
233
+ return type === "credential.updated";
234
+ }
224
235
  async function consumeEvents(iterator, discover) {
225
236
  try {
226
237
  while (true) {
227
238
  const result = await iterator.next();
228
239
  if (result.done) return;
229
240
  const event = result.value;
230
- if (event.type === "integration.connection.updated" && event.data.integrationID === KIRO_INTEGRATION_ID) {
241
+ if (isKiroCredentialEvent(event)) {
231
242
  try {
232
- await discover("connection-updated");
243
+ await discover(event.type);
233
244
  } catch {
234
245
  }
235
246
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-kiro",
3
- "version": "0.5.0-beta.2",
3
+ "version": "0.5.0-beta.3",
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)",
@@ -39,15 +39,15 @@
39
39
  "node": ">=20"
40
40
  },
41
41
  "peerDependencies": {
42
- "@opencode-ai/plugin": "0.0.0-dev-17968"
42
+ "@opencode-ai/plugin": "0.0.0-dev-18686"
43
43
  },
44
44
  "dependencies": {
45
- "@opentui/solid": "0.5.7",
45
+ "@opentui/solid": "0.5.9",
46
46
  "kiro-acp-ai-provider": "3.0.0",
47
47
  "solid-js": "1.9.12"
48
48
  },
49
49
  "devDependencies": {
50
- "@opencode-ai/plugin": "0.0.0-dev-17968",
50
+ "@opencode-ai/plugin": "0.0.0-dev-18686",
51
51
  "@types/node": "^20.19.42",
52
52
  "tsup": "^8.0.0",
53
53
  "typescript": "^5.7.0",