opencode-kiro 0.2.0 → 0.2.1

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 +9 -1
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -30,7 +30,7 @@ var server = async (input) => {
30
30
  trustAllTools: true,
31
31
  mcpTimeout: 45,
32
32
  contextWindows: Object.fromEntries(
33
- Object.values(provider.models).filter((m) => (m.limit?.context ?? 0) > 0).map((m) => [m.api.id, m.limit.context])
33
+ Object.values(provider?.models ?? {}).filter((m) => m.api?.id && (m.limit?.context ?? 0) > 0).map((m) => [m.api.id, m.limit.context])
34
34
  )
35
35
  }),
36
36
  methods: [
@@ -92,6 +92,14 @@ var server = async (input) => {
92
92
  }
93
93
  ]
94
94
  },
95
+ // Ensure a kiro provider entry exists so a stored login plus a kiro-less
96
+ // catalog cannot crash opencode (core derefs an undefined provider during
97
+ // auth init). Mutates in place; the ??= keeps it idempotent and never
98
+ // clobbers a real models.dev kiro entry when one is present.
99
+ config: async (input2) => {
100
+ input2.provider ??= {};
101
+ input2.provider.kiro ??= {};
102
+ },
95
103
  provider: {
96
104
  id: "kiro",
97
105
  // Inject per-model reasoning-effort variants, consumed as providerOptions.kiro.reasoningEffort.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-kiro",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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)",