armin-opencode 0.1.4 → 0.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/README.md +3 -3
- package/bin/armin.js +15 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@ for AI coding agents — packaged for [opencode](https://opencode.ai).
|
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npx armin-opencode install # or: npm i -g armin-opencode && armin install
|
|
8
|
-
export ARMIN_ENABLED=1
|
|
9
8
|
```
|
|
10
9
|
|
|
11
10
|
Prefer a global install over one-off `npx` runs: the plugin registration
|
|
@@ -13,8 +12,9 @@ points at the package's install location, and `npx` caches are evicted.
|
|
|
13
12
|
|
|
14
13
|
`armin install` downloads the `armin-engine` sidecar binary for your platform
|
|
15
14
|
from the [GitHub releases](https://github.com/bastian-seifert/armin/releases)
|
|
16
|
-
and registers the plugin in your global opencode config
|
|
17
|
-
|
|
15
|
+
and registers + enables the plugin in your global opencode config
|
|
16
|
+
(`"armin": { "enabled": true }`). `ARMIN_ENABLED=1` remains as a
|
|
17
|
+
per-environment escape hatch.
|
|
18
18
|
|
|
19
19
|
See the [main repo](https://github.com/bastian-seifert/armin) for what the
|
|
20
20
|
agent gets (durable decisions/rules/open items, scoped reasoning-state brief,
|
package/bin/armin.js
CHANGED
|
@@ -148,8 +148,8 @@ function registerPlugin() {
|
|
|
148
148
|
try {
|
|
149
149
|
data = JSON.parse(text.replace(/^\s*\/\/.*$/gm, ""));
|
|
150
150
|
} catch {
|
|
151
|
-
console.log(`\nCould not parse ${cfgPath} —
|
|
152
|
-
return;
|
|
151
|
+
console.log(`\nCould not parse ${cfgPath} — set up manually:\n add "plugin": ["file://${plugin}"] and "armin": { "enabled": true } to your opencode config\n`);
|
|
152
|
+
return false;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
const entry = "file://" + plugin;
|
|
@@ -160,6 +160,12 @@ function registerPlugin() {
|
|
|
160
160
|
data.plugin = plugins;
|
|
161
161
|
changed = true;
|
|
162
162
|
}
|
|
163
|
+
// `armin install` is an explicit opt-in — enable in config so no
|
|
164
|
+
// per-shell env var is needed (ARMIN_ENABLED stays as escape hatch).
|
|
165
|
+
if (data.armin?.enabled !== true) {
|
|
166
|
+
data.armin = { ...(data.armin || {}), enabled: true };
|
|
167
|
+
changed = true;
|
|
168
|
+
}
|
|
163
169
|
if (pendingTypesafeKey && !process.env.TYPESAFE_AI_API_KEY) {
|
|
164
170
|
data.armin = { ...(data.armin || {}), typesafeKey: pendingTypesafeKey };
|
|
165
171
|
changed = true;
|
|
@@ -180,6 +186,7 @@ function registerPlugin() {
|
|
|
180
186
|
fs.writeFileSync(cfgPath, JSON.stringify(data, null, 2));
|
|
181
187
|
}
|
|
182
188
|
console.log(`plugin registered in ${cfgPath}`);
|
|
189
|
+
return true;
|
|
183
190
|
}
|
|
184
191
|
|
|
185
192
|
async function install() {
|
|
@@ -202,7 +209,7 @@ async function install() {
|
|
|
202
209
|
}
|
|
203
210
|
}
|
|
204
211
|
await askForExtractionSetup();
|
|
205
|
-
registerPlugin();
|
|
212
|
+
const registered = registerPlugin();
|
|
206
213
|
const tsKey = process.env.TYPESAFE_AI_API_KEY || pendingTypesafeKey;
|
|
207
214
|
const orKey = process.env.OPENROUTER_API_KEY || pendingOpenrouterKey;
|
|
208
215
|
const llmKey = process.env.ANTHROPIC_API_KEY || process.env.OPENAI_API_KEY;
|
|
@@ -228,11 +235,12 @@ async function install() {
|
|
|
228
235
|
}
|
|
229
236
|
console.log(`
|
|
230
237
|
── done ────────────────────────────────────────────────────────
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
${registered
|
|
239
|
+
? 'ARMIN is enabled in your opencode config ("armin": { "enabled": true }).\nRestart opencode to activate it; remove "enabled" to turn it off.'
|
|
240
|
+
: "ARMIN is not enabled yet — follow the manual setup steps above."}
|
|
234
241
|
|
|
235
|
-
Optional:
|
|
242
|
+
Optional overrides (env wins over config):
|
|
243
|
+
ARMIN_ENABLED=1 force-enable without the config entry
|
|
236
244
|
ARMIN_EXTRACTION_MODE=jev System One extraction (default; needs
|
|
237
245
|
TYPESAFE_AI_API_KEY or OPENROUTER_API_KEY)
|
|
238
246
|
ARMIN_JEV_PROVIDER=openrouter route jev via OpenRouter (auto-detected
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "armin-opencode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "ARMIN — queryable decision memory for AI coding agents. Installs the armin-engine sidecar and registers the opencode plugin.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Bastian Seifert",
|