ostacky 0.9.6 → 0.9.7
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 +37 -17
- package/assets/agents/ostacky.md +4 -4
- package/assets/commands/install-stack.md +11 -11
- package/assets/commands/opsx-sync.md +1 -0
- package/assets/mcp/ostacky-controller/index.js +2 -2
- package/dist/cli.js +236 -80
- package/manifest.json +29 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,16 +109,35 @@ npx ostacky
|
|
|
109
109
|
|
|
110
110
|
Detecta automáticamente el directorio `.opencode/` del proyecto (o lo crea) y muestra un menú para elegir qué hacer.
|
|
111
111
|
|
|
112
|
-
### Instalar todo
|
|
112
|
+
### Instalar todo (local, default)
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
npx ostacky install #
|
|
116
|
-
npx ostacky install --scope local # <proyecto>/.opencode (
|
|
115
|
+
npx ostacky install # local en <proyecto>/.opencode (default)
|
|
116
|
+
npx ostacky install --scope local # <proyecto>/.opencode (explícito)
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Descarga todos los agentes y commands definidos en el manifest y los escribe en `<proyecto>/.opencode`. Además copia los plugins **Ostacky-owned** `ostacky-plugin.ts` + `engram.ts` en `.opencode/plugins/` (el legacy `ostacky-guard.ts` fue fusionado en `ostacky-plugin.ts` y ya no se instala; `ostacky-controller.ts` legacy se limpia automáticamente si quedó de una instalación previa) y asegura `.gitignore` con ` .opencode/tools/, .codegraph/, .opencode/cache/, ostacky-state.json*`.
|
|
120
120
|
|
|
121
|
-
> **Instalación
|
|
121
|
+
> **Instalación local (default):** Ostacky vive por proyecto/worktree (CodeGraph index `.codegraph/` y `ostacky-state.json` aislados). Si ves `C:\Users\...\ .opencode\tools\codegraph` y esperabas `D:\mi-proyecto\.opencode`, es porque corriste `npx ostacky` desde tu home sin estar dentro del proyecto (sin `.git`). Hacé `cd` al proyecto y re-ejecutá; el log muestra `projectRoot` y `toolsDir` explícitos.
|
|
122
|
+
|
|
123
|
+
### Instalación global (opt-in)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx ostacky --scope global # menú interactivo global
|
|
127
|
+
npx ostacky install --scope global # núcleo global (agente + commands + skills + MCPs + plugins)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Escribe el núcleo en el config dir global de OpenCode sin tocar ningún proyecto:
|
|
131
|
+
|
|
132
|
+
| SO | Dir global |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Linux / macOS | `~/.config/opencode` (respeta `XDG_CONFIG_HOME`) |
|
|
135
|
+
| Windows | config dir global de OpenCode según SO |
|
|
136
|
+
| WSL | como Linux |
|
|
137
|
+
|
|
138
|
+
El stack de binarios (CodeGraph, Engram) es **siempre local por proyecto**: con `--scope global` se omite y se indica instalarlo por proyecto (`npx ostacky install-stack` dentro del proyecto). La config global acepta `opencode.json` o `opencode.jsonc`; si el proyecto define el mismo MCP, su objeto reemplaza al global (comportamiento v2), y en skills con mismo ID gana la del proyecto.
|
|
139
|
+
|
|
140
|
+
> **Migración v1 → v2:** `npx ostacky` (sin subcomando) busca la última versión publicada y, si detecta v1 instalada, ofrece desinstalar v1 e instalar v2 (siempre con confirmación; sin red o no-interactivo sigue al menú sin preguntar).
|
|
122
141
|
|
|
123
142
|
### Agregar agentes o commands individualmente
|
|
124
143
|
|
|
@@ -152,8 +171,9 @@ Solo descarga los items que cambiaron de versión.
|
|
|
152
171
|
### Desinstalar
|
|
153
172
|
|
|
154
173
|
```bash
|
|
155
|
-
npx ostacky uninstall # qué borrar en <proyecto>/.opencode
|
|
174
|
+
npx ostacky uninstall # qué borrar en <proyecto>/.opencode (default local)
|
|
156
175
|
npx ostacky uninstall --scope local # fuerza scope local
|
|
176
|
+
npx ostacky uninstall --scope global # qué borrar en el dir global
|
|
157
177
|
```
|
|
158
178
|
|
|
159
179
|
**Safe-delete:** solo borra lo trackeado en `.opencode/ostacky-lock.json` (agentes, commands, skills, MCPs) — nunca toca componentes previos del usuario que no estén en el lockfile. Antes de borrar muestra preview con `Scope: <ruta>` + lista de paths y pide confirmación. Los plugins Ostacky-owned (`ostacky-plugin.ts`, `engram.ts` + legacy `ostacky-guard.ts`/`ostacky-controller.ts` si quedaron) se limpian automáticamente via allowlist, nunca se borran plugins custom.
|
|
@@ -250,37 +270,37 @@ Tras instalar (`--scope local`), el proyecto queda así:
|
|
|
250
270
|
|
|
251
271
|
```json
|
|
252
272
|
{
|
|
253
|
-
"version": "0.9.
|
|
273
|
+
"version": "0.9.7",
|
|
254
274
|
"lockedAt": "2025-01-01T00:00:00.000Z",
|
|
255
275
|
"repo": "JaimeHoracio/Ostacky",
|
|
256
|
-
"tag": "v0.9.
|
|
276
|
+
"tag": "v0.9.7",
|
|
257
277
|
"agents": {
|
|
258
278
|
"ostacky": {
|
|
259
|
-
"version": "0.9.
|
|
279
|
+
"version": "0.9.7",
|
|
260
280
|
"installedAt": "2025-01-01T00:00:00.000Z",
|
|
261
281
|
"sha256": "abc123..."
|
|
262
282
|
}
|
|
263
283
|
},
|
|
264
284
|
"commands": {
|
|
265
285
|
"install-stack": {
|
|
266
|
-
"version": "0.9.
|
|
286
|
+
"version": "0.9.7",
|
|
267
287
|
"installedAt": "2025-01-01T00:00:00.000Z",
|
|
268
288
|
"sha256": "def456..."
|
|
269
289
|
},
|
|
270
290
|
"opsx-sync": {
|
|
271
|
-
"version": "0.9.
|
|
291
|
+
"version": "0.9.7",
|
|
272
292
|
"installedAt": "2025-01-01T00:00:00.000Z",
|
|
273
293
|
"sha256": "ghi789..."
|
|
274
294
|
}
|
|
275
295
|
},
|
|
276
296
|
"skills": {
|
|
277
|
-
"brainstorming": { "version": "0.9.
|
|
278
|
-
"execution-mode-evaluation": { "version": "0.9.
|
|
279
|
-
"openspec-propose": { "version": "0.9.
|
|
297
|
+
"brainstorming": { "version": "0.9.7", ... },
|
|
298
|
+
"execution-mode-evaluation": { "version": "0.9.7", ... },
|
|
299
|
+
"openspec-propose": { "version": "0.9.7", ... }
|
|
280
300
|
},
|
|
281
301
|
"mcpServers": {
|
|
282
|
-
"ostacky-controller": { "version": "0.9.
|
|
283
|
-
"openspec": { "version": "0.9.
|
|
302
|
+
"ostacky-controller": { "version": "0.9.7", ... },
|
|
303
|
+
"openspec": { "version": "0.9.7", ... }
|
|
284
304
|
}
|
|
285
305
|
}
|
|
286
306
|
```
|
|
@@ -312,7 +332,7 @@ Es opcional y solo necesario si algo falló durante la instalación o si querés
|
|
|
312
332
|
## Seguridad
|
|
313
333
|
|
|
314
334
|
- `opencode.jsonc` se versiona en el repo para compartir permisos y MCP de forma reproducible.
|
|
315
|
-
- Las URLs de descarga usan **tags de GitHub** (ej. `v0.9.
|
|
335
|
+
- Las URLs de descarga usan **tags de GitHub** (ej. `v0.9.7`), nunca `main` — instalaciones reproducibles
|
|
316
336
|
- Cada path de archivo descargado es validado para prevenir **path traversal**
|
|
317
337
|
- Los archivos incluyen **checksum SHA-256** opcional; si el manifest lo define, el contenido se verifica antes de escribir
|
|
318
338
|
- El cache local (`.opencode/cache/`) también valida integridad al servir archivos cacheados
|
|
@@ -369,7 +389,7 @@ CodeGraph está instalado en `.opencode/tools/codegraph/bin/codegraph` y se conf
|
|
|
369
389
|
| `.opencode/tools/codegraph/bin/codegraph status` | Muestra estado del index y archivos pendientes |
|
|
370
390
|
| `.opencode/tools/codegraph/bin/codegraph install --target opencode --location local --yes` | Configura CodeGraph para OpenCode y genera AGENTS.md |
|
|
371
391
|
|
|
372
|
-
> **Windows:** si ves `Command failed: cmd.exe /d /c call ... codegraph.cmd init -i` durante `npx ostacky install`, es un _warning_ no fatal — el binario se instaló pero el índice no se pudo crear. Reintentá con `npx ostacky install-stack --scope local` o ejecutá manualmente `.opencode\tools\codegraph\bin\codegraph.exe init -i` (o `codegraph.cmd` si no hay `.exe`) dentro del proyecto. Desde v0.9.
|
|
392
|
+
> **Windows:** si ves `Command failed: cmd.exe /d /c call ... codegraph.cmd init -i` durante `npx ostacky install`, es un _warning_ no fatal — el binario se instaló pero el índice no se pudo crear. Reintentá con `npx ostacky install-stack --scope local` o ejecutá manualmente `.opencode\tools\codegraph\bin\codegraph.exe init -i` (o `codegraph.cmd` si no hay `.exe`) dentro del proyecto. Desde v0.9.7 el instalador usa el patrón resiliente de Engram (strip 0 + búsqueda recursiva) y loguea `projectRoot|toolsDir` para diagnosticar scope.
|
|
373
393
|
|
|
374
394
|
## Licencia
|
|
375
395
|
|
package/assets/agents/ostacky.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Orquestador principal — rutea por nivel, orquesta CodeGraph + OpenSpec + Superpowers.
|
|
3
3
|
mode: primary
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.7
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Sos **Ostacky v0.9.
|
|
7
|
+
Sos **Ostacky v0.9.7**, orquestás, no implementás. Interpretás, clasificás (0/0+1/1+), ruteás y coordinás.
|
|
8
8
|
|
|
9
|
-
> **Versión:** `0.9.
|
|
9
|
+
> **Versión:** `0.9.7` (sincronizada desde `package.json` vía `scripts/sync-version.ts`). Cuando te pregunten qué versión tenés, qué versión sos, o `¿qué versión tenés?` / `version` / `¿en qué versión estás?`, respondé exactamente: **"Ostacky v0.9.7"** (o `v0.9.7` si te piden solo el número). No inventes otra versión.
|
|
10
10
|
|
|
11
11
|
## Reglas innegociables
|
|
12
12
|
|
|
@@ -71,7 +71,7 @@ Si vago → preguntar. Si claro → `start_request`.
|
|
|
71
71
|
|
|
72
72
|
`record_discovery({level,snapshot})` → `ROUTE_DECISION_PENDING` (`SPEC` si 1+, `DIRECT` si 0/0+1). `proceed_to_route` deprecated no-op.
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
**Nivel 0 → DIRECT automático (sin pregunta de ruteo):** anunciar `Nivel 0 + archivos + qué se va a hacer` y proceder con `consume_route_decision(DIRECT)`; el veto del usuario vale (si objeta, se frena). Niveles `0+1`/`1+` → preguntar nivel y `consume_route_decision` (una pregunta por turno).
|
|
75
75
|
|
|
76
76
|
### 3. Specification (solo SPEC)
|
|
77
77
|
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Instala CodeGraph, skills curadas, OpenSpec y Engram localmente para OpenCode únicamente
|
|
3
3
|
agent: build
|
|
4
|
+
subagent: false
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Instala el stack tecnológico de desarrollo para OpenCode. **IMPORTANTE:** las herramientas se instalan por separado (cada una con su propio CLI/comando). `npx ostacky install` solo instala el agente y commands de Ostacky en `.opencode/`. Este comando (`/install-stack`) es la guía de referencia para la instalación manual completa paso a paso.
|
|
7
8
|
|
|
8
|
-
**Nota:** A partir de v0.9.
|
|
9
|
+
**Nota:** A partir de v0.9.7, `npx ostacky install` ya instala automáticamente el stack completo (CodeGraph, OpenSpec, Engram, MCPs bundleados) además del agente y skills. Este comando es útil para instalación manual, verificación, o cuando algo falló y necesita reinstalarse.
|
|
9
10
|
|
|
10
11
|
**RESTRICCIÓN ABSOLUTA:** instalar ÚNICAMENTE para OpenCode. Está terminantemente prohibido crear o modificar archivos en `.claude/`, `.kiro/`, `.cursor/`, `.gemini/`, `.codex/`, `.antigravity/`, `.windsurf/` o cualquier otro directorio de plataformas externas.
|
|
11
12
|
|
|
12
13
|
**Origen del set curado:** el set de 15 skills referenciado en `assets/agents/ostacky.md` está bundleado en `assets/skills/` dentro del paquete npm. La definición del set y su trazabilidad viven en `manifest.json` y `.opencode/ostacky-lock.json`.
|
|
13
14
|
|
|
14
|
-
## Scope de instalación — local vs global (
|
|
15
|
+
## Scope de instalación — local (default) vs global (opt-in)
|
|
15
16
|
|
|
16
|
-
`npx ostacky install` soporta `--scope local|global
|
|
17
|
+
`npx ostacky install` soporta `--scope local|global` (también `--scope=...`):
|
|
17
18
|
|
|
18
|
-
- `local` (
|
|
19
|
-
- `global`: escribe en `~/.config/opencode`
|
|
20
|
-
- `
|
|
21
|
-
- Sin flag: pregunta interactivamente (default local)
|
|
19
|
+
- `local` (default): escribe en `<proyecto>/.opencode` (`opencode.json` local). Sin flag asume local.
|
|
20
|
+
- `global`: escribe el núcleo (agente, commands, skills, MCPs, plugins) en el config dir global de OpenCode (`~/.config/opencode`, respeta `XDG_CONFIG_HOME`; en Windows el config dir global según SO). No toca `<proyecto>/.opencode`.
|
|
21
|
+
- `--scope auto` y `-g` son error educativo: usá `--scope local` o `--scope global` explícito.
|
|
22
22
|
|
|
23
|
-
Herramientas (`tools/`) permanecen siempre en `<proyecto>/.opencode/tools` por reproducibilidad
|
|
23
|
+
Herramientas (`tools/` CodeGraph/Engram) permanecen siempre en `<proyecto>/.opencode/tools` por reproducibilidad, también con `--scope global`. `npx ostacky install-stack --scope global` avisa y usa local — el stack se instala por proyecto:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npx ostacky install
|
|
27
|
-
npx ostacky install --scope global
|
|
28
|
-
npx ostacky install-stack
|
|
26
|
+
npx ostacky install # local (default)
|
|
27
|
+
npx ostacky install --scope global # núcleo global (sin stack)
|
|
28
|
+
npx ostacky install-stack # stack local por proyecto
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
> **Windows con espacios** (ej. `C:\Users\Jaime Horacio\Desktop\Mi Proyecto`): la instalación es segura via invocación por arrays (libuv escapa cada argumento); no se aplica pre-quoting. `opencode.json` guarda `command` como array JSON.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Sincroniza el grafo de CodeGraph y luego los delta specs del change activo con la implementación
|
|
3
3
|
agent: build
|
|
4
|
+
subagent: false
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Sincroniza primero el grafo y luego los delta specs (`proposal.md` / `design.md` / `tasks.md`) del change activo en `openspec/changes/<name>/` con el estado actual de la implementación.
|
|
@@ -2996,7 +2996,7 @@ function safeHandler(fn, options = {}) {
|
|
|
2996
2996
|
|
|
2997
2997
|
const server = new McpServer({
|
|
2998
2998
|
name: 'ostacky-controller',
|
|
2999
|
-
version: '0.9.
|
|
2999
|
+
version: '0.9.7',
|
|
3000
3000
|
});
|
|
3001
3001
|
|
|
3002
3002
|
server.registerTool(
|
|
@@ -3598,7 +3598,7 @@ function setupGracefulShutdown(ctrl) {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
|
|
3600
3600
|
async function main() {
|
|
3601
|
-
log('Starting ostacky-controller MCP v0.9.
|
|
3601
|
+
log('Starting ostacky-controller MCP v0.9.7...');
|
|
3602
3602
|
log('State path:', { path: statePath });
|
|
3603
3603
|
// Clean up stale tmp/lock files from previous runs
|
|
3604
3604
|
cleanupTmpFiles(statePath);
|
package/dist/cli.js
CHANGED
|
@@ -222,6 +222,7 @@ import {
|
|
|
222
222
|
renameSync
|
|
223
223
|
} from "fs";
|
|
224
224
|
import { createHash as createHash2 } from "crypto";
|
|
225
|
+
import { homedir } from "os";
|
|
225
226
|
import { join, resolve, dirname, relative, basename } from "path";
|
|
226
227
|
import { execFileSync } from "child_process";
|
|
227
228
|
function findOpenCodeDir(startDir = process.cwd()) {
|
|
@@ -261,7 +262,23 @@ function isGitRepo(dir = process.cwd()) {
|
|
|
261
262
|
function initGitRepo(dir) {
|
|
262
263
|
execFileSync("git", ["init"], { cwd: dir, stdio: "pipe" });
|
|
263
264
|
}
|
|
265
|
+
function getGlobalOpenCodeDir(opts) {
|
|
266
|
+
const platform = opts?.platform ?? process.platform;
|
|
267
|
+
const env = opts?.env ?? process.env;
|
|
268
|
+
const home = opts?.home ?? homedir();
|
|
269
|
+
const xdg = env.XDG_CONFIG_HOME?.trim();
|
|
270
|
+
if (xdg)
|
|
271
|
+
return join(xdg, "opencode");
|
|
272
|
+
if (platform === "win32") {
|
|
273
|
+
const appdata = env.APPDATA?.trim();
|
|
274
|
+
if (appdata)
|
|
275
|
+
return join(appdata, "opencode");
|
|
276
|
+
}
|
|
277
|
+
return join(home, ".config", "opencode");
|
|
278
|
+
}
|
|
264
279
|
function getOpenCodeDirForScope(scope, cwd = process.cwd()) {
|
|
280
|
+
if (scope === "global")
|
|
281
|
+
return getGlobalOpenCodeDir();
|
|
265
282
|
return join(findProjectRoot(cwd), ".opencode");
|
|
266
283
|
}
|
|
267
284
|
function ensureOpenCodePaths(opencodeDir) {
|
|
@@ -624,47 +641,47 @@ var init_fs = __esm(() => {
|
|
|
624
641
|
var manifest_default;
|
|
625
642
|
var init_manifest = __esm(() => {
|
|
626
643
|
manifest_default = {
|
|
627
|
-
version: "0.9.
|
|
644
|
+
version: "0.9.7",
|
|
628
645
|
repo: "JaimeHoracio/Ostacky",
|
|
629
|
-
tag: "v0.9.
|
|
646
|
+
tag: "v0.9.7",
|
|
630
647
|
agents: [
|
|
631
648
|
{
|
|
632
649
|
name: "ostacky",
|
|
633
650
|
file: "assets/agents/ostacky.md",
|
|
634
|
-
description: "Orquestador con recuperación automática (nunca se congela), ruteo por nivel de impacto, controller MCP con SDK oficial, edición segura con fallback inline, y delegación en OpenSpec + Superpowers. v0.9.
|
|
635
|
-
version: "0.9.
|
|
636
|
-
sha256: "
|
|
651
|
+
description: "Orquestador con recuperación automática (nunca se congela), ruteo por nivel de impacto, controller MCP con SDK oficial, edición segura con fallback inline, y delegación en OpenSpec + Superpowers. v0.9.7: prune de skills obsoletas, lastHandoff, getAvailableTransitions, consecutiveFailures real, mem_session_summary automático al cierre.",
|
|
652
|
+
version: "0.9.7",
|
|
653
|
+
sha256: "4481017881dadef3cabf516053d13930b5c948f879f8996fcb03ca5133073199"
|
|
637
654
|
}
|
|
638
655
|
],
|
|
639
656
|
commands: [
|
|
640
657
|
{
|
|
641
658
|
name: "install-stack",
|
|
642
659
|
file: "assets/commands/install-stack.md",
|
|
643
|
-
description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, controller plugin). v0.9.
|
|
644
|
-
version: "0.9.
|
|
645
|
-
sha256: "
|
|
660
|
+
description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, controller plugin). v0.9.7: controller plugin como alma hard-gate, Context7 removido del stack.",
|
|
661
|
+
version: "0.9.7",
|
|
662
|
+
sha256: "0e1f52a236843fffbf166c1b381c52907abe19887e2472f667642ecbcb0f43a8"
|
|
646
663
|
},
|
|
647
664
|
{
|
|
648
665
|
name: "opsx-sync",
|
|
649
666
|
file: "assets/commands/opsx-sync.md",
|
|
650
667
|
description: "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
|
|
651
|
-
version: "0.9.
|
|
652
|
-
sha256: "
|
|
668
|
+
version: "0.9.7",
|
|
669
|
+
sha256: "f883f9ad96f7d75778631d5cc13d8a1a9c3e6ec41396bbce8ce13cff2e66fca2"
|
|
653
670
|
}
|
|
654
671
|
],
|
|
655
672
|
mcpServers: [
|
|
656
673
|
{
|
|
657
674
|
name: "ostacky-controller",
|
|
658
675
|
file: "assets/mcp/ostacky-controller/",
|
|
659
|
-
description: "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.9.
|
|
660
|
-
version: "0.9.
|
|
661
|
-
sha256: "
|
|
676
|
+
description: "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.9.7: 22 tools (incluye set_handoff, get_handoff, clear_handoff, get_available_transitions funcional). Bugfixes: consecutiveFailures real, lastHandoff state, defaultChoice persistido. Robustez: degraded mode automático tras 3 fallos, persistence condicional para Nivel 0, prune de skills obsoletas.",
|
|
677
|
+
version: "0.9.7",
|
|
678
|
+
sha256: "41bfad0ddf21fac992c72e2a4e590445d075a5f8e8cb30a165728dff23a5d41a"
|
|
662
679
|
},
|
|
663
680
|
{
|
|
664
681
|
name: "openspec",
|
|
665
682
|
file: "assets/mcp/openspec/",
|
|
666
683
|
description: "MCP server local para OpenSpec - proposal, apply, archive, sync de cambios",
|
|
667
|
-
version: "0.9.
|
|
684
|
+
version: "0.9.7",
|
|
668
685
|
sha256: "bdb283fe8ec2dfcba2ec4f38191f4039e58cd7ae12e44e66310783b42c827638"
|
|
669
686
|
}
|
|
670
687
|
],
|
|
@@ -673,105 +690,105 @@ var init_manifest = __esm(() => {
|
|
|
673
690
|
name: "brainstorming",
|
|
674
691
|
file: "assets/skills/brainstorming/SKILL.md",
|
|
675
692
|
description: "Skill unificado de pensamiento con dos modos: creative-design (producción de diseño → transición a implementación directa o openspec-propose) y open-exploration (exploración libre)",
|
|
676
|
-
version: "0.9.
|
|
693
|
+
version: "0.9.7",
|
|
677
694
|
sha256: "f1013a86a8f27914d85a716e23c7fd32db1786d93615e8b0834b13d184308549"
|
|
678
695
|
},
|
|
679
696
|
{
|
|
680
697
|
name: "execution-mode-evaluation",
|
|
681
698
|
file: "assets/skills/execution-mode-evaluation/SKILL.md",
|
|
682
699
|
description: "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
|
|
683
|
-
version: "0.9.
|
|
700
|
+
version: "0.9.7",
|
|
684
701
|
sha256: "2158a6864c0912e868a9d720db7fd79441e6cc298e3320833d2527c9727c852e"
|
|
685
702
|
},
|
|
686
703
|
{
|
|
687
704
|
name: "tdd",
|
|
688
705
|
file: "assets/skills/tdd/SKILL.md",
|
|
689
706
|
description: "Skill de test-driven development (Superpowers)",
|
|
690
|
-
version: "0.9.
|
|
707
|
+
version: "0.9.7",
|
|
691
708
|
sha256: "f0ebfbbc43a8868d31a3fd2df37ae7f60fe8add09c6475862395a68269e5ff7f"
|
|
692
709
|
},
|
|
693
710
|
{
|
|
694
711
|
name: "subagent-driven-development",
|
|
695
712
|
file: "assets/skills/subagent-driven-development/SKILL.md",
|
|
696
713
|
description: "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
|
|
697
|
-
version: "0.9.
|
|
714
|
+
version: "0.9.7",
|
|
698
715
|
sha256: "1a42d714a9a13faf05f0bf7b580e8d837c2e77a5633839542ccce603023419e8"
|
|
699
716
|
},
|
|
700
717
|
{
|
|
701
718
|
name: "dispatching-parallel-agents",
|
|
702
719
|
file: "assets/skills/dispatching-parallel-agents/SKILL.md",
|
|
703
720
|
description: "Skill de dispatch paralelo de agentes (Superpowers)",
|
|
704
|
-
version: "0.9.
|
|
721
|
+
version: "0.9.7",
|
|
705
722
|
sha256: "7e7b712ef742d5631e302e6a71583e2bbbd33094da9281abfb84b43505fc3ef1"
|
|
706
723
|
},
|
|
707
724
|
{
|
|
708
725
|
name: "review",
|
|
709
726
|
file: "assets/skills/review/SKILL.md",
|
|
710
727
|
description: "Skill de revisión de código (Superpowers)",
|
|
711
|
-
version: "0.9.
|
|
728
|
+
version: "0.9.7",
|
|
712
729
|
sha256: "b19650ed4d1d4d9857a4dd5b7e08e91328a1a1fc9c45bcc2fb600fa9d0213279"
|
|
713
730
|
},
|
|
714
731
|
{
|
|
715
732
|
name: "receiving-code-review",
|
|
716
733
|
file: "assets/skills/receiving-code-review/SKILL.md",
|
|
717
734
|
description: "Skill de recibir y procesar feedback de code review",
|
|
718
|
-
version: "0.9.
|
|
735
|
+
version: "0.9.7",
|
|
719
736
|
sha256: "d761e884e71d8d3476ac734d287cae403a4024506a7d12e7361a448217c0a831"
|
|
720
737
|
},
|
|
721
738
|
{
|
|
722
739
|
name: "openspec-propose",
|
|
723
740
|
file: "assets/skills/openspec-propose/SKILL.md",
|
|
724
741
|
description: "Skill de generación de proposal (OpenSpec)",
|
|
725
|
-
version: "0.9.
|
|
742
|
+
version: "0.9.7",
|
|
726
743
|
sha256: "6a517f750f24c008208156a2d653e97ed30b1e53878aeac5ce394e573db0678f"
|
|
727
744
|
},
|
|
728
745
|
{
|
|
729
746
|
name: "openspec-apply-change",
|
|
730
747
|
file: "assets/skills/openspec-apply-change/SKILL.md",
|
|
731
748
|
description: "Skill de aplicación de change (OpenSpec)",
|
|
732
|
-
version: "0.9.
|
|
749
|
+
version: "0.9.7",
|
|
733
750
|
sha256: "dfc823bf89fc7505e91ab6dee9c1f004be38a410bd3d88fb67b211b1b6cbb1d0"
|
|
734
751
|
},
|
|
735
752
|
{
|
|
736
753
|
name: "openspec-archive-change",
|
|
737
754
|
file: "assets/skills/openspec-archive-change/SKILL.md",
|
|
738
755
|
description: "Skill de archivo de change (OpenSpec)",
|
|
739
|
-
version: "0.9.
|
|
756
|
+
version: "0.9.7",
|
|
740
757
|
sha256: "16e4b561de7747283663fed602e506abf502452c49a8d4b86d7a5539c40f0195"
|
|
741
758
|
},
|
|
742
759
|
{
|
|
743
760
|
name: "openspec-explore",
|
|
744
761
|
file: "assets/skills/openspec-explore/SKILL.md",
|
|
745
762
|
description: "Modo explore para OpenSpec — thinking partner para explorar ideas, investigar problemas y clarificar requisitos antes/durante un cambio",
|
|
746
|
-
version: "0.9.
|
|
763
|
+
version: "0.9.7",
|
|
747
764
|
sha256: "9eafc3a8c693b8d9916867ef764d49e5222da717fde501c957bb3f6c312d2415"
|
|
748
765
|
},
|
|
749
766
|
{
|
|
750
767
|
name: "using-git-worktrees",
|
|
751
768
|
file: "assets/skills/using-git-worktrees/SKILL.md",
|
|
752
769
|
description: "Skill de uso de git worktrees para aislamiento de trabajo",
|
|
753
|
-
version: "0.9.
|
|
770
|
+
version: "0.9.7",
|
|
754
771
|
sha256: "93341bc1b7c053618a8b6dc07e3615b77990d7b549a0201f5835d95fef67ce13"
|
|
755
772
|
},
|
|
756
773
|
{
|
|
757
774
|
name: "using-superpowers",
|
|
758
775
|
file: "assets/skills/using-superpowers/SKILL.md",
|
|
759
776
|
description: "Skill de orquestación de Superpowers skills",
|
|
760
|
-
version: "0.9.
|
|
777
|
+
version: "0.9.7",
|
|
761
778
|
sha256: "7e54536f96d2a379185a10bfc1e970850caa2561b6d8aca7080f0defea0381a4"
|
|
762
779
|
},
|
|
763
780
|
{
|
|
764
781
|
name: "writing-skills",
|
|
765
782
|
file: "assets/skills/writing-skills/SKILL.md",
|
|
766
783
|
description: "Skill de creación y edición de skills",
|
|
767
|
-
version: "0.9.
|
|
784
|
+
version: "0.9.7",
|
|
768
785
|
sha256: "3d76b906cee518a2b809febb70db95697a35b9f368986bb504b4120c3bfb437a"
|
|
769
786
|
},
|
|
770
787
|
{
|
|
771
788
|
name: "graceful-degradation",
|
|
772
789
|
file: "assets/skills/graceful-degradation/SKILL.md",
|
|
773
790
|
description: "Skill de degradación graceful cuando múltiples tools están indisponibles",
|
|
774
|
-
version: "0.9.
|
|
791
|
+
version: "0.9.7",
|
|
775
792
|
sha256: "363449bd9e6f800a0a3168667cf78f767fb105d86e4a4adadcc649d418139303"
|
|
776
793
|
}
|
|
777
794
|
]
|
|
@@ -1566,8 +1583,9 @@ function checkDoctorV2(projectRoot) {
|
|
|
1566
1583
|
if (found) {
|
|
1567
1584
|
try {
|
|
1568
1585
|
const src = readFileSync6(found, "utf-8");
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1586
|
+
const hasDefault = /export\s+default/.test(src);
|
|
1587
|
+
const hasLegacyPkg = src.includes("@opencode-ai/");
|
|
1588
|
+
if (hasDefault && !hasLegacyPkg)
|
|
1571
1589
|
lines.push(`✅ controller: plugin V2 (${found})`);
|
|
1572
1590
|
else
|
|
1573
1591
|
lines.push(`⚠️ controller: plugin legacy V1 en ${found} — no corre en V2, reinstalá con ostacky`);
|
|
@@ -1647,12 +1665,40 @@ function checkDoctorV2(projectRoot) {
|
|
|
1647
1665
|
for (const [name, entry] of Object.entries(servers)) {
|
|
1648
1666
|
if (!entry || typeof entry !== "object")
|
|
1649
1667
|
continue;
|
|
1650
|
-
const
|
|
1651
|
-
if (
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1668
|
+
const e = entry;
|
|
1669
|
+
if (e.type !== "local" && e.type !== "remote") {
|
|
1670
|
+
lines.push(`⚠️ mcp.servers.${name} sin type local|remote — V2 lo requiere (ver mcp-servers)`);
|
|
1671
|
+
continue;
|
|
1672
|
+
}
|
|
1673
|
+
if ("enabled" in e) {
|
|
1674
|
+
lines.push(`⚠️ mcp.servers.${name} usa enabled (forma V1) — V2 usa disabled invertido`);
|
|
1675
|
+
}
|
|
1676
|
+
if (typeof e.timeout === "number") {
|
|
1677
|
+
lines.push(`⚠️ mcp.servers.${name} timeout numérico (forma V1) — V2 usa timeout: { catalog, execution }`);
|
|
1678
|
+
}
|
|
1679
|
+
if (e.type === "local") {
|
|
1680
|
+
const cmd = e.command;
|
|
1681
|
+
if (!Array.isArray(cmd) || typeof cmd[0] !== "string") {
|
|
1682
|
+
lines.push(`⚠️ mcp.servers.${name} local sin command array — V2 requiere command: [bin, ...args]`);
|
|
1683
|
+
} else {
|
|
1684
|
+
const bin = cmd[0];
|
|
1685
|
+
const ok = isAbsolute(bin) ? existsSync8(bin) : lookupOnPath(bin) !== null;
|
|
1686
|
+
if (!ok)
|
|
1687
|
+
lines.push(`⚠️ mcp.servers.${name} command no existe (${bin}) — ¿proyecto movido? re-corré install`);
|
|
1688
|
+
}
|
|
1689
|
+
} else {
|
|
1690
|
+
if (typeof e.url !== "string" || !/^https?:\/\//.test(e.url)) {
|
|
1691
|
+
lines.push(`⚠️ mcp.servers.${name} remote sin url absoluta — V2 requiere url https://...`);
|
|
1692
|
+
}
|
|
1693
|
+
const oauth = e.oauth;
|
|
1694
|
+
if (oauth && typeof oauth === "object") {
|
|
1695
|
+
for (const k of ["clientId", "clientSecret", "callbackPort", "redirectUri"]) {
|
|
1696
|
+
if (k in oauth) {
|
|
1697
|
+
lines.push(`⚠️ mcp.servers.${name} oauth.${k} camelCase (forma V1) — V2 usa snake_case`);
|
|
1698
|
+
break;
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1656
1702
|
}
|
|
1657
1703
|
}
|
|
1658
1704
|
return lines;
|
|
@@ -1681,7 +1727,7 @@ var init_doctor_v2 = __esm(() => {
|
|
|
1681
1727
|
// package.json
|
|
1682
1728
|
var package_default = {
|
|
1683
1729
|
name: "ostacky",
|
|
1684
|
-
version: "0.9.
|
|
1730
|
+
version: "0.9.7",
|
|
1685
1731
|
description: "Instalador interactivo de agentes y comandos para OpenCode",
|
|
1686
1732
|
type: "module",
|
|
1687
1733
|
bin: {
|
|
@@ -2860,7 +2906,7 @@ async function probeMcpServer(nodeExecutable, serverPath, cwd, statePath, option
|
|
|
2860
2906
|
params: {
|
|
2861
2907
|
protocolVersion: "2025-03-26",
|
|
2862
2908
|
capabilities: {},
|
|
2863
|
-
clientInfo: { name: "ostacky-installer", version: "0.9.
|
|
2909
|
+
clientInfo: { name: "ostacky-installer", version: "0.9.7" }
|
|
2864
2910
|
}
|
|
2865
2911
|
});
|
|
2866
2912
|
});
|
|
@@ -3021,7 +3067,8 @@ async function installMcpServer(item, manifest, paths) {
|
|
|
3021
3067
|
const treeHash = computeTreeHash(src);
|
|
3022
3068
|
assertBundledTreeHash("mcpServers", item.name, treeHash);
|
|
3023
3069
|
const nodeExecutable = getVerifiedNodeExecutable();
|
|
3024
|
-
|
|
3070
|
+
await Promise.resolve().then(() => init_fs());
|
|
3071
|
+
const projectRoot = paths.root === getGlobalOpenCodeDir() ? paths.root : dirname4(paths.root);
|
|
3025
3072
|
const dest = join6(paths.mcp, item.name);
|
|
3026
3073
|
const staging = `${dest}.staging-${process.pid}-${Date.now()}`;
|
|
3027
3074
|
const statePath = item.name === "ostacky-controller" ? join6(paths.root, "ostacky-state.json") : undefined;
|
|
@@ -3269,11 +3316,23 @@ function printPostInstallSteps() {
|
|
|
3269
3316
|
`), "Próximos pasos");
|
|
3270
3317
|
}
|
|
3271
3318
|
async function resolveOpenCodePaths(scope, opts) {
|
|
3319
|
+
const effective = scope ?? "local";
|
|
3320
|
+
if (effective === "global") {
|
|
3321
|
+
await Promise.resolve().then(() => init_fs());
|
|
3322
|
+
const dir = getGlobalOpenCodeDir();
|
|
3323
|
+
try {
|
|
3324
|
+
const paths = ensureOpenCodePaths(dir);
|
|
3325
|
+
ye(dir, "Instalación global");
|
|
3326
|
+
return paths;
|
|
3327
|
+
} catch (e) {
|
|
3328
|
+
throw e;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3272
3331
|
const cwd = process.cwd();
|
|
3273
3332
|
const base = opts?.gitPreflight ? (await runGitPreflight(cwd)).projectRoot : cwd;
|
|
3274
3333
|
const dir = getOpenCodeDirForScope("local", base);
|
|
3275
|
-
if (scope && scope !== "local") {
|
|
3276
|
-
v2.warn(`Scope ${scope}
|
|
3334
|
+
if (scope && scope !== "local" && scope !== "global") {
|
|
3335
|
+
v2.warn(`Scope ${scope} no soportado; usando local en ${dir}`);
|
|
3277
3336
|
}
|
|
3278
3337
|
try {
|
|
3279
3338
|
const paths = ensureOpenCodePaths(dir);
|
|
@@ -3411,8 +3470,11 @@ async function doInstallStack(toolsDir, projectRoot) {
|
|
|
3411
3470
|
async function doInstallAll(manifest, paths, opts) {
|
|
3412
3471
|
const spin = L2();
|
|
3413
3472
|
let errors = 0;
|
|
3414
|
-
|
|
3415
|
-
|
|
3473
|
+
const isGlobal = opts?.scope === "global";
|
|
3474
|
+
v2.info(`Scope → ${isGlobal ? "global" : "local"} | opencodeDir: ${paths.root} | tools: ${paths.tools}`);
|
|
3475
|
+
if (isGlobal) {
|
|
3476
|
+
v2.info("Scope global: núcleo (agente/commands/skills/MCPs/plugins) en dir global; el stack (CodeGraph/Engram) es siempre local por proyecto — omitido aquí. Instalalo por proyecto con `npx ostacky install-stack --scope local`.");
|
|
3477
|
+
} else if (!opts?.noStack) {
|
|
3416
3478
|
ensureToolDirs(paths.tools, ["codegraph", "engram"]);
|
|
3417
3479
|
}
|
|
3418
3480
|
for (const agent of manifest.agents) {
|
|
@@ -3490,7 +3552,9 @@ async function doInstallAll(manifest, paths, opts) {
|
|
|
3490
3552
|
} catch {}
|
|
3491
3553
|
let stackOk = true;
|
|
3492
3554
|
let missingTools = [];
|
|
3493
|
-
if (
|
|
3555
|
+
if (isGlobal) {
|
|
3556
|
+
v2.info("Scope global: stack omitido (siempre local por proyecto).");
|
|
3557
|
+
} else if (opts?.noStack) {
|
|
3494
3558
|
v2.info("Stack omitido (--no-stack): solo núcleo (agente/commands/skills/MCPs/plugins).");
|
|
3495
3559
|
} else {
|
|
3496
3560
|
v2.info("Instalando stack de herramientas...");
|
|
@@ -3500,7 +3564,7 @@ async function doInstallAll(manifest, paths, opts) {
|
|
|
3500
3564
|
}
|
|
3501
3565
|
const codegraphDir = join8(paths.tools, "codegraph");
|
|
3502
3566
|
const engramDir = join8(paths.tools, "engram");
|
|
3503
|
-
if (!opts?.noStack) {
|
|
3567
|
+
if (!isGlobal && !opts?.noStack) {
|
|
3504
3568
|
if (!existsSync7(codegraphDir) || !findBinaryInDir(codegraphDir, "codegraph"))
|
|
3505
3569
|
missingTools.push("CodeGraph");
|
|
3506
3570
|
if (!existsSync7(engramDir) || !findBinaryInDir(engramDir, "engram"))
|
|
@@ -3523,12 +3587,14 @@ async function doInstallAll(manifest, paths, opts) {
|
|
|
3523
3587
|
v2.warn("Además el stack quedó parcial: reintentá con `npx ostacky install-stack --scope local`.");
|
|
3524
3588
|
}
|
|
3525
3589
|
try {
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3590
|
+
if (!isGlobal) {
|
|
3591
|
+
const projectRoot = dirname6(paths.root);
|
|
3592
|
+
const gi = ensureGitignore(projectRoot);
|
|
3593
|
+
if (gi.created)
|
|
3594
|
+
v2.info(`.gitignore creado con patrones Ostacky`);
|
|
3595
|
+
else if (gi.updated)
|
|
3596
|
+
v2.info(`.gitignore actualizado: ${gi.patternsAdded.join(", ")}`);
|
|
3597
|
+
}
|
|
3532
3598
|
} catch {}
|
|
3533
3599
|
return coreOk && !stackPartial;
|
|
3534
3600
|
}
|
|
@@ -4177,7 +4243,7 @@ async function runInteractiveMenu(scope) {
|
|
|
4177
4243
|
we(" OpenCode Installer ");
|
|
4178
4244
|
await ensureOpencodeInstalled();
|
|
4179
4245
|
const manifest = await loadManifest();
|
|
4180
|
-
const paths = await resolveOpenCodePaths(scope ?? null, { gitPreflight:
|
|
4246
|
+
const paths = await resolveOpenCodePaths(scope ?? null, { gitPreflight: scope !== "global" });
|
|
4181
4247
|
if (!paths) {
|
|
4182
4248
|
fe("Instalación cancelada.");
|
|
4183
4249
|
return;
|
|
@@ -4251,12 +4317,12 @@ async function runInstallCommand(scope, opts) {
|
|
|
4251
4317
|
we(" OpenCode Installer ");
|
|
4252
4318
|
await ensureOpencodeInstalled();
|
|
4253
4319
|
const manifest = await loadManifest();
|
|
4254
|
-
const paths = await resolveOpenCodePaths(scope ?? null, { gitPreflight:
|
|
4320
|
+
const paths = await resolveOpenCodePaths(scope ?? null, { gitPreflight: scope !== "global" });
|
|
4255
4321
|
if (!paths) {
|
|
4256
4322
|
fe("Cancelado.");
|
|
4257
4323
|
return;
|
|
4258
4324
|
}
|
|
4259
|
-
if (!await doInstallAll(manifest, paths, opts))
|
|
4325
|
+
if (!await doInstallAll(manifest, paths, { ...opts, scope: scope ?? "local" }))
|
|
4260
4326
|
process.exitCode = 1;
|
|
4261
4327
|
printPostInstallSteps();
|
|
4262
4328
|
fe(process.exitCode ? "Instalación parcial." : "Instalación completada.");
|
|
@@ -4515,59 +4581,142 @@ async function runUninstallMcpCommand(name, scope) {
|
|
|
4515
4581
|
}
|
|
4516
4582
|
|
|
4517
4583
|
// src/cli.ts
|
|
4518
|
-
init_fs();
|
|
4519
4584
|
import { existsSync as existsSync9, statSync as statSync3, readFileSync as readFileSync7, readdirSync as readdirSync4 } from "node:fs";
|
|
4520
4585
|
import { join as join11, dirname as dirname8 } from "node:path";
|
|
4586
|
+
import { spawnSync } from "node:child_process";
|
|
4587
|
+
init_fs();
|
|
4588
|
+
|
|
4589
|
+
// src/version-check.ts
|
|
4590
|
+
function parseMajor(version) {
|
|
4591
|
+
if (!version)
|
|
4592
|
+
return null;
|
|
4593
|
+
const m = /v?(\d+)\.\d+\.\d+/.exec(version.trim());
|
|
4594
|
+
if (!m)
|
|
4595
|
+
return null;
|
|
4596
|
+
const major = parseInt(m[1], 10);
|
|
4597
|
+
return Number.isNaN(major) ? null : major;
|
|
4598
|
+
}
|
|
4599
|
+
function compareVersions(a, b) {
|
|
4600
|
+
const pa = a.replace(/^v/, "").split(".").map((n) => parseInt(n, 10) || 0);
|
|
4601
|
+
const pb = b.replace(/^v/, "").split(".").map((n) => parseInt(n, 10) || 0);
|
|
4602
|
+
for (let i = 0;i < 3; i++) {
|
|
4603
|
+
if ((pa[i] ?? 0) < (pb[i] ?? 0))
|
|
4604
|
+
return -1;
|
|
4605
|
+
if ((pa[i] ?? 0) > (pb[i] ?? 0))
|
|
4606
|
+
return 1;
|
|
4607
|
+
}
|
|
4608
|
+
return 0;
|
|
4609
|
+
}
|
|
4610
|
+
async function fetchLatestNpmVersion(pkg = "ostacky", timeoutMs = 5000) {
|
|
4611
|
+
try {
|
|
4612
|
+
const res = await fetch(`https://registry.npmjs.org/${pkg}/latest`, {
|
|
4613
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
4614
|
+
headers: { "User-Agent": "ostacky-installer" }
|
|
4615
|
+
});
|
|
4616
|
+
if (!res.ok)
|
|
4617
|
+
return null;
|
|
4618
|
+
const data = await res.json();
|
|
4619
|
+
return typeof data.version === "string" ? data.version : null;
|
|
4620
|
+
} catch {
|
|
4621
|
+
return null;
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
function decideOffer(installed, latest) {
|
|
4625
|
+
if (!latest || compareVersions(installed, latest) >= 0) {
|
|
4626
|
+
return { kind: "none", installed, latest };
|
|
4627
|
+
}
|
|
4628
|
+
if (parseMajor(installed) === 1) {
|
|
4629
|
+
return { kind: "migrate-v1", installed, latest };
|
|
4630
|
+
}
|
|
4631
|
+
return { kind: "update-available", installed, latest };
|
|
4632
|
+
}
|
|
4633
|
+
function canPrompt(argv = process.argv, isTTY = process.stdin.isTTY === true) {
|
|
4634
|
+
if (!isTTY)
|
|
4635
|
+
return false;
|
|
4636
|
+
return !argv.includes("--yes") && !argv.includes("--no-interactive") && !argv.includes("--non-interactive");
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4639
|
+
// src/cli.ts
|
|
4640
|
+
async function maybeOfferUpdateOrMigrate(installed, scope) {
|
|
4641
|
+
const latest = await fetchLatestNpmVersion();
|
|
4642
|
+
const offer = decideOffer(installed, latest);
|
|
4643
|
+
if (offer.kind === "none" || !offer.latest)
|
|
4644
|
+
return;
|
|
4645
|
+
if (!canPrompt()) {
|
|
4646
|
+
console.error(`Hay una versión más nueva de ostacky: ${offer.latest} (instalada: ${installed}). Re-ejecutá con npx ostacky@latest.`);
|
|
4647
|
+
return;
|
|
4648
|
+
}
|
|
4649
|
+
if (offer.kind === "migrate-v1") {
|
|
4650
|
+
const confirm = await me({
|
|
4651
|
+
message: `Tenés Ostacky v1 instalada (${installed}) y la última es ${offer.latest} (v2). ¿Desinstalar v1 e instalar v2? (los artefactos legacy se limpian automáticamente)${scope === "global" ? " (scope global)" : ""}`,
|
|
4652
|
+
initialValue: true
|
|
4653
|
+
});
|
|
4654
|
+
if (BD(confirm) || !confirm)
|
|
4655
|
+
return;
|
|
4656
|
+
} else {
|
|
4657
|
+
const confirm = await me({
|
|
4658
|
+
message: `Hay una versión más nueva de ostacky: ${offer.latest} (instalada: ${installed}). ¿Actualizar y re-ejecutar con @latest?`,
|
|
4659
|
+
initialValue: true
|
|
4660
|
+
});
|
|
4661
|
+
if (BD(confirm) || !confirm)
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4664
|
+
const userArgs = process.argv.slice(2);
|
|
4665
|
+
const invocation = getCommandInvocation("npx", ["ostacky@latest", ...userArgs]);
|
|
4666
|
+
const res = spawnSync(invocation.command, invocation.args, { stdio: "inherit" });
|
|
4667
|
+
process.exit(res.status ?? 0);
|
|
4668
|
+
}
|
|
4521
4669
|
var HELP = `
|
|
4522
4670
|
ostacky — Instalador de agentes, comandos, skills y MCPs para OpenCode
|
|
4523
4671
|
|
|
4524
4672
|
Uso:
|
|
4525
|
-
npx ostacky [--scope local]
|
|
4526
|
-
npx ostacky install [--scope local] [--no-stack] Instalar TODO (agente + skills + MCPs + CodeGraph + OpenSpec + Engram; --no-stack omite el stack)
|
|
4527
|
-
npx ostacky add agent [--scope local]
|
|
4528
|
-
npx ostacky add command [--scope local]
|
|
4529
|
-
npx ostacky add skill [--scope local]
|
|
4530
|
-
npx ostacky add mcp [--scope local]
|
|
4531
|
-
npx ostacky install-stack [--scope local] Instalar solo el stack de herramientas (CodeGraph, OpenSpec, Engram)
|
|
4673
|
+
npx ostacky [--scope local|global] Menú interactivo (default: local en <proyecto>/.opencode)
|
|
4674
|
+
npx ostacky install [--scope local|global] [--no-stack] Instalar TODO (agente + skills + MCPs + CodeGraph + OpenSpec + Engram; --no-stack omite el stack)
|
|
4675
|
+
npx ostacky add agent [--scope local|global] Agregar agente(s)
|
|
4676
|
+
npx ostacky add command [--scope local|global] Agregar command(s)
|
|
4677
|
+
npx ostacky add skill [--scope local|global] Agregar skill(s)
|
|
4678
|
+
npx ostacky add mcp [--scope local|global] Agregar MCP server(s)
|
|
4679
|
+
npx ostacky install-stack [--scope local] Instalar solo el stack de herramientas (CodeGraph, OpenSpec, Engram — siempre local por proyecto)
|
|
4532
4680
|
npx ostacky uninstall-stack [--scope local] Remover la configuración del stack del proyecto
|
|
4533
4681
|
npx ostacky doctor Diagnostica locks, tools, state health
|
|
4534
4682
|
npx ostacky status [--json] Muestra estado del controller sin MCP
|
|
4535
|
-
npx ostacky update [--scope local]
|
|
4536
|
-
npx ostacky uninstall [--scope local]
|
|
4537
|
-
npx ostacky uninstall agent [--scope local] Desinstalar agente(s)
|
|
4538
|
-
npx ostacky uninstall command [--scope local] Desinstalar command(s)
|
|
4539
|
-
npx ostacky uninstall skill [--scope local] Desinstalar skill(s)
|
|
4540
|
-
npx ostacky uninstall mcp [--scope local] Desinstalar MCP server(s)
|
|
4683
|
+
npx ostacky update [--scope local|global] Actualizar instalación
|
|
4684
|
+
npx ostacky uninstall [--scope local|global] Desinstalar todo
|
|
4685
|
+
npx ostacky uninstall agent [--scope local|global] Desinstalar agente(s)
|
|
4686
|
+
npx ostacky uninstall command [--scope local|global] Desinstalar command(s)
|
|
4687
|
+
npx ostacky uninstall skill [--scope local|global] Desinstalar skill(s)
|
|
4688
|
+
npx ostacky uninstall mcp [--scope local|global] Desinstalar MCP server(s)
|
|
4541
4689
|
npx ostacky --help Mostrar esta ayuda
|
|
4542
4690
|
npx ostacky --version Mostrar versión
|
|
4543
4691
|
|
|
4544
4692
|
Scope:
|
|
4545
|
-
--scope local
|
|
4546
|
-
|
|
4693
|
+
--scope local Escribe en <proyecto>/.opencode (default; no pregunta global)
|
|
4694
|
+
--scope global Escribe en el config dir global de OpenCode (~/.config/opencode, respeta XDG_CONFIG_HOME)
|
|
4695
|
+
Sin flag Asume local implícito
|
|
4547
4696
|
`.trim();
|
|
4548
4697
|
function parseScopeArg(argv = process.argv) {
|
|
4549
4698
|
for (let i = 0;i < argv.length; i++) {
|
|
4550
4699
|
const arg = argv[i];
|
|
4551
4700
|
if (arg === "--scope" && i + 1 < argv.length) {
|
|
4552
4701
|
const v = argv[i + 1];
|
|
4553
|
-
if (v === "local")
|
|
4702
|
+
if (v === "local" || v === "global")
|
|
4554
4703
|
return v;
|
|
4555
|
-
if (v === "
|
|
4556
|
-
console.error(`Error: --scope
|
|
4704
|
+
if (v === "auto") {
|
|
4705
|
+
console.error(`Error: --scope auto removido; usá --scope local o --scope global explícito.`);
|
|
4557
4706
|
process.exit(1);
|
|
4558
4707
|
}
|
|
4559
4708
|
}
|
|
4560
4709
|
if (arg.startsWith("--scope=")) {
|
|
4561
4710
|
const v = arg.split("=")[1];
|
|
4562
|
-
if (v === "local")
|
|
4711
|
+
if (v === "local" || v === "global")
|
|
4563
4712
|
return v;
|
|
4564
|
-
if (v === "
|
|
4565
|
-
console.error(`Error: --scope
|
|
4713
|
+
if (v === "auto") {
|
|
4714
|
+
console.error(`Error: --scope auto removido; usá --scope local o --scope global explícito.`);
|
|
4566
4715
|
process.exit(1);
|
|
4567
4716
|
}
|
|
4568
4717
|
}
|
|
4569
4718
|
if (arg === "-g") {
|
|
4570
|
-
console.error(`Error: -g
|
|
4719
|
+
console.error(`Error: -g removido; usá --scope global (instalación global) o --scope local (default por proyecto).`);
|
|
4571
4720
|
process.exit(1);
|
|
4572
4721
|
}
|
|
4573
4722
|
}
|
|
@@ -4928,10 +5077,16 @@ async function main() {
|
|
|
4928
5077
|
await runInstallCommand(scope, { noStack });
|
|
4929
5078
|
break;
|
|
4930
5079
|
case "install-stack":
|
|
4931
|
-
|
|
5080
|
+
if (scope === "global") {
|
|
5081
|
+
console.error(`Aviso: el stack (CodeGraph/Engram) se instala siempre local por proyecto. Ignorando --scope global y usando local.`);
|
|
5082
|
+
}
|
|
5083
|
+
await runInstallStackCommand(null);
|
|
4932
5084
|
break;
|
|
4933
5085
|
case "uninstall-stack":
|
|
4934
|
-
|
|
5086
|
+
if (scope === "global") {
|
|
5087
|
+
console.error(`Aviso: el stack es siempre local por proyecto. Ignorando --scope global y usando local.`);
|
|
5088
|
+
}
|
|
5089
|
+
await runUninstallStackCommand(null);
|
|
4935
5090
|
break;
|
|
4936
5091
|
case "add":
|
|
4937
5092
|
if (subcmd === "agent") {
|
|
@@ -4989,6 +5144,7 @@ async function main() {
|
|
|
4989
5144
|
console.error(`Comando desconocido: "${cmd}". Usá --help para ver los comandos disponibles.`);
|
|
4990
5145
|
process.exit(1);
|
|
4991
5146
|
}
|
|
5147
|
+
await maybeOfferUpdateOrMigrate(package_default.version, scope);
|
|
4992
5148
|
await runInteractiveMenu(scope);
|
|
4993
5149
|
}
|
|
4994
5150
|
}
|
package/manifest.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.9.
|
|
2
|
+
"version": "0.9.7",
|
|
3
3
|
"repo": "JaimeHoracio/Ostacky",
|
|
4
|
-
"tag": "v0.9.
|
|
4
|
+
"tag": "v0.9.7",
|
|
5
5
|
"agents": [
|
|
6
6
|
{
|
|
7
7
|
"name": "ostacky",
|
|
8
8
|
"file": "assets/agents/ostacky.md",
|
|
9
|
-
"description": "Orquestador con recuperación automática (nunca se congela), ruteo por nivel de impacto, controller MCP con SDK oficial, edición segura con fallback inline, y delegación en OpenSpec + Superpowers. v0.9.
|
|
10
|
-
"version": "0.9.
|
|
11
|
-
"sha256": "
|
|
9
|
+
"description": "Orquestador con recuperación automática (nunca se congela), ruteo por nivel de impacto, controller MCP con SDK oficial, edición segura con fallback inline, y delegación en OpenSpec + Superpowers. v0.9.7: prune de skills obsoletas, lastHandoff, getAvailableTransitions, consecutiveFailures real, mem_session_summary automático al cierre.",
|
|
10
|
+
"version": "0.9.7",
|
|
11
|
+
"sha256": "4481017881dadef3cabf516053d13930b5c948f879f8996fcb03ca5133073199"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"commands": [
|
|
15
15
|
{
|
|
16
16
|
"name": "install-stack",
|
|
17
17
|
"file": "assets/commands/install-stack.md",
|
|
18
|
-
"description": "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, controller plugin). v0.9.
|
|
19
|
-
"version": "0.9.
|
|
20
|
-
"sha256": "
|
|
18
|
+
"description": "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, controller plugin). v0.9.7: controller plugin como alma hard-gate, Context7 removido del stack.",
|
|
19
|
+
"version": "0.9.7",
|
|
20
|
+
"sha256": "0e1f52a236843fffbf166c1b381c52907abe19887e2472f667642ecbcb0f43a8"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"name": "opsx-sync",
|
|
24
24
|
"file": "assets/commands/opsx-sync.md",
|
|
25
25
|
"description": "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
|
|
26
|
-
"version": "0.9.
|
|
27
|
-
"sha256": "
|
|
26
|
+
"version": "0.9.7",
|
|
27
|
+
"sha256": "f883f9ad96f7d75778631d5cc13d8a1a9c3e6ec41396bbce8ce13cff2e66fca2"
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"mcpServers": [
|
|
31
31
|
{
|
|
32
32
|
"name": "ostacky-controller",
|
|
33
33
|
"file": "assets/mcp/ostacky-controller/",
|
|
34
|
-
"description": "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.9.
|
|
35
|
-
"version": "0.9.
|
|
36
|
-
"sha256": "
|
|
34
|
+
"description": "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.9.7: 22 tools (incluye set_handoff, get_handoff, clear_handoff, get_available_transitions funcional). Bugfixes: consecutiveFailures real, lastHandoff state, defaultChoice persistido. Robustez: degraded mode automático tras 3 fallos, persistence condicional para Nivel 0, prune de skills obsoletas.",
|
|
35
|
+
"version": "0.9.7",
|
|
36
|
+
"sha256": "41bfad0ddf21fac992c72e2a4e590445d075a5f8e8cb30a165728dff23a5d41a"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"name": "openspec",
|
|
40
40
|
"file": "assets/mcp/openspec/",
|
|
41
41
|
"description": "MCP server local para OpenSpec - proposal, apply, archive, sync de cambios",
|
|
42
|
-
"version": "0.9.
|
|
42
|
+
"version": "0.9.7",
|
|
43
43
|
"sha256": "bdb283fe8ec2dfcba2ec4f38191f4039e58cd7ae12e44e66310783b42c827638"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
@@ -48,105 +48,105 @@
|
|
|
48
48
|
"name": "brainstorming",
|
|
49
49
|
"file": "assets/skills/brainstorming/SKILL.md",
|
|
50
50
|
"description": "Skill unificado de pensamiento con dos modos: creative-design (producción de diseño → transición a implementación directa o openspec-propose) y open-exploration (exploración libre)",
|
|
51
|
-
"version": "0.9.
|
|
51
|
+
"version": "0.9.7",
|
|
52
52
|
"sha256": "f1013a86a8f27914d85a716e23c7fd32db1786d93615e8b0834b13d184308549"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "execution-mode-evaluation",
|
|
56
56
|
"file": "assets/skills/execution-mode-evaluation/SKILL.md",
|
|
57
57
|
"description": "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
|
|
58
|
-
"version": "0.9.
|
|
58
|
+
"version": "0.9.7",
|
|
59
59
|
"sha256": "2158a6864c0912e868a9d720db7fd79441e6cc298e3320833d2527c9727c852e"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "tdd",
|
|
63
63
|
"file": "assets/skills/tdd/SKILL.md",
|
|
64
64
|
"description": "Skill de test-driven development (Superpowers)",
|
|
65
|
-
"version": "0.9.
|
|
65
|
+
"version": "0.9.7",
|
|
66
66
|
"sha256": "f0ebfbbc43a8868d31a3fd2df37ae7f60fe8add09c6475862395a68269e5ff7f"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"name": "subagent-driven-development",
|
|
70
70
|
"file": "assets/skills/subagent-driven-development/SKILL.md",
|
|
71
71
|
"description": "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
|
|
72
|
-
"version": "0.9.
|
|
72
|
+
"version": "0.9.7",
|
|
73
73
|
"sha256": "1a42d714a9a13faf05f0bf7b580e8d837c2e77a5633839542ccce603023419e8"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "dispatching-parallel-agents",
|
|
77
77
|
"file": "assets/skills/dispatching-parallel-agents/SKILL.md",
|
|
78
78
|
"description": "Skill de dispatch paralelo de agentes (Superpowers)",
|
|
79
|
-
"version": "0.9.
|
|
79
|
+
"version": "0.9.7",
|
|
80
80
|
"sha256": "7e7b712ef742d5631e302e6a71583e2bbbd33094da9281abfb84b43505fc3ef1"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"name": "review",
|
|
84
84
|
"file": "assets/skills/review/SKILL.md",
|
|
85
85
|
"description": "Skill de revisión de código (Superpowers)",
|
|
86
|
-
"version": "0.9.
|
|
86
|
+
"version": "0.9.7",
|
|
87
87
|
"sha256": "b19650ed4d1d4d9857a4dd5b7e08e91328a1a1fc9c45bcc2fb600fa9d0213279"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"name": "receiving-code-review",
|
|
91
91
|
"file": "assets/skills/receiving-code-review/SKILL.md",
|
|
92
92
|
"description": "Skill de recibir y procesar feedback de code review",
|
|
93
|
-
"version": "0.9.
|
|
93
|
+
"version": "0.9.7",
|
|
94
94
|
"sha256": "d761e884e71d8d3476ac734d287cae403a4024506a7d12e7361a448217c0a831"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"name": "openspec-propose",
|
|
98
98
|
"file": "assets/skills/openspec-propose/SKILL.md",
|
|
99
99
|
"description": "Skill de generación de proposal (OpenSpec)",
|
|
100
|
-
"version": "0.9.
|
|
100
|
+
"version": "0.9.7",
|
|
101
101
|
"sha256": "6a517f750f24c008208156a2d653e97ed30b1e53878aeac5ce394e573db0678f"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"name": "openspec-apply-change",
|
|
105
105
|
"file": "assets/skills/openspec-apply-change/SKILL.md",
|
|
106
106
|
"description": "Skill de aplicación de change (OpenSpec)",
|
|
107
|
-
"version": "0.9.
|
|
107
|
+
"version": "0.9.7",
|
|
108
108
|
"sha256": "dfc823bf89fc7505e91ab6dee9c1f004be38a410bd3d88fb67b211b1b6cbb1d0"
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
"name": "openspec-archive-change",
|
|
112
112
|
"file": "assets/skills/openspec-archive-change/SKILL.md",
|
|
113
113
|
"description": "Skill de archivo de change (OpenSpec)",
|
|
114
|
-
"version": "0.9.
|
|
114
|
+
"version": "0.9.7",
|
|
115
115
|
"sha256": "16e4b561de7747283663fed602e506abf502452c49a8d4b86d7a5539c40f0195"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"name": "openspec-explore",
|
|
119
119
|
"file": "assets/skills/openspec-explore/SKILL.md",
|
|
120
120
|
"description": "Modo explore para OpenSpec — thinking partner para explorar ideas, investigar problemas y clarificar requisitos antes/durante un cambio",
|
|
121
|
-
"version": "0.9.
|
|
121
|
+
"version": "0.9.7",
|
|
122
122
|
"sha256": "9eafc3a8c693b8d9916867ef764d49e5222da717fde501c957bb3f6c312d2415"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "using-git-worktrees",
|
|
126
126
|
"file": "assets/skills/using-git-worktrees/SKILL.md",
|
|
127
127
|
"description": "Skill de uso de git worktrees para aislamiento de trabajo",
|
|
128
|
-
"version": "0.9.
|
|
128
|
+
"version": "0.9.7",
|
|
129
129
|
"sha256": "93341bc1b7c053618a8b6dc07e3615b77990d7b549a0201f5835d95fef67ce13"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "using-superpowers",
|
|
133
133
|
"file": "assets/skills/using-superpowers/SKILL.md",
|
|
134
134
|
"description": "Skill de orquestación de Superpowers skills",
|
|
135
|
-
"version": "0.9.
|
|
135
|
+
"version": "0.9.7",
|
|
136
136
|
"sha256": "7e54536f96d2a379185a10bfc1e970850caa2561b6d8aca7080f0defea0381a4"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"name": "writing-skills",
|
|
140
140
|
"file": "assets/skills/writing-skills/SKILL.md",
|
|
141
141
|
"description": "Skill de creación y edición de skills",
|
|
142
|
-
"version": "0.9.
|
|
142
|
+
"version": "0.9.7",
|
|
143
143
|
"sha256": "3d76b906cee518a2b809febb70db95697a35b9f368986bb504b4120c3bfb437a"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"name": "graceful-degradation",
|
|
147
147
|
"file": "assets/skills/graceful-degradation/SKILL.md",
|
|
148
148
|
"description": "Skill de degradación graceful cuando múltiples tools están indisponibles",
|
|
149
|
-
"version": "0.9.
|
|
149
|
+
"version": "0.9.7",
|
|
150
150
|
"sha256": "363449bd9e6f800a0a3168667cf78f767fb105d86e4a4adadcc649d418139303"
|
|
151
151
|
}
|
|
152
152
|
]
|