ostacky 0.7.3 → 0.7.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.
package/dist/cli.js CHANGED
@@ -20,12 +20,14 @@ var __toESM = (mod, isNodeMode, target) => {
20
20
  }
21
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
22
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
23
+ if (mod && typeof mod === "object" || typeof mod === "function") {
24
+ for (let key of __getOwnPropNames(mod))
25
+ if (!__hasOwnProp.call(to, key))
26
+ __defProp(to, key, {
27
+ get: __accessProp.bind(mod, key),
28
+ enumerable: true
29
+ });
30
+ }
29
31
  if (canCache)
30
32
  cache.set(mod, to);
31
33
  return to;
@@ -48,7 +50,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
50
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
49
51
 
50
52
  // node_modules/sisteransi/src/index.js
51
- var require_src = __commonJS((exports, module) => {
53
+ var require_src = __commonJS(function(exports, module) {
52
54
  var ESC = "\x1B";
53
55
  var CSI = `${ESC}[`;
54
56
  var beep = "\x07";
@@ -106,7 +108,7 @@ var require_src = __commonJS((exports, module) => {
106
108
  });
107
109
 
108
110
  // node_modules/picocolors/picocolors.js
109
- var require_picocolors = __commonJS((exports, module) => {
111
+ var require_picocolors = __commonJS(function(exports, module) {
110
112
  var p = process || {};
111
113
  var argv = p.argv || [];
112
114
  var env = p.env || {};
@@ -178,9 +180,14 @@ var require_picocolors = __commonJS((exports, module) => {
178
180
  // src/security.ts
179
181
  var exports_security = {};
180
182
  __export(exports_security, {
181
- verifyChecksum: () => verifyChecksum,
183
+ BASH_SENSITIVE_RE: () => BASH_SENSITIVE_RE,
184
+ SENSITIVE_DEFAULT: () => SENSITIVE_DEFAULT,
185
+ extractPathsFromBash: () => extractPathsFromBash,
186
+ getSensitivePatterns: () => getSensitivePatterns,
187
+ isSensitive: () => isSensitive,
188
+ sha256: () => sha256,
182
189
  validateFilePath: () => validateFilePath,
183
- sha256: () => sha256
190
+ verifyChecksum: () => verifyChecksum
184
191
  });
185
192
  import { createHash } from "crypto";
186
193
  function validateFilePath(filePath) {
@@ -201,7 +208,89 @@ function verifyChecksum(content, expectedHash, label) {
201
208
  recibido: ${actual}`);
202
209
  }
203
210
  }
204
- var init_security = () => {};
211
+ function isSensitive(filePath, patterns = SENSITIVE_DEFAULT) {
212
+ if (!filePath)
213
+ return false;
214
+ const normalized = filePath.replace(/\\/g, "/");
215
+ const lower = normalized.toLowerCase();
216
+ if (lower.endsWith(".env.example") || lower.endsWith(".env.template") || lower.endsWith(".env.sample"))
217
+ return false;
218
+ const base = lower.split("/").pop() || "";
219
+ for (const pat of patterns) {
220
+ if (pat.includes(".env") && base.startsWith(".env"))
221
+ return true;
222
+ if (pat.includes(".secrets") && lower.includes(".secrets"))
223
+ return true;
224
+ if (pat.includes("*.pem") && lower.endsWith(".pem"))
225
+ return true;
226
+ if (pat.includes("*.key") && lower.endsWith(".key"))
227
+ return true;
228
+ if (pat.includes(".aws") && lower.includes(".aws"))
229
+ return true;
230
+ if (pat.includes(".ssh") && lower.includes(".ssh"))
231
+ return true;
232
+ if (pat.includes("credentials.json") && lower.endsWith("credentials.json"))
233
+ return true;
234
+ if (pat.includes(".npmrc") && lower.endsWith(".npmrc"))
235
+ return true;
236
+ }
237
+ if (/\.(pem|key)$/i.test(normalized))
238
+ return true;
239
+ if (base.startsWith(".env"))
240
+ return true;
241
+ return false;
242
+ }
243
+ function extractPathsFromBash(cmd) {
244
+ if (!cmd)
245
+ return [];
246
+ const normalized = cmd.replace(/&&/g, ";").replace(/\|\|/g, ";");
247
+ const segments = normalized.split(/[|;><\n]+/);
248
+ const paths = [];
249
+ for (const seg of segments) {
250
+ const trimmed = seg.trim();
251
+ if (!trimmed)
252
+ continue;
253
+ const tokens = trimmed.match(/(?:[^\s"'`\\]+|"[^"]*"|'[^']*'|`[^`]*`)+/g) || [];
254
+ for (let token of tokens) {
255
+ const stripped = token.replace(/["'`]/g, "").replace(/\\/g, "");
256
+ if (!stripped)
257
+ continue;
258
+ if (["cat", "grep", "ls", "echo", "awk", "sed", "cut", "head", "tail", "wc", "find", "xargs", "bash", "sh", "zsh", "env", "printenv", "node", "bun", "npm", "npx", "ls"].includes(stripped))
259
+ continue;
260
+ if (stripped.startsWith("-"))
261
+ continue;
262
+ const lower = stripped.toLowerCase();
263
+ if (stripped.includes("/") || stripped.includes(".") || lower.startsWith(".env") || lower.includes(".secrets") || lower.endsWith(".pem") || lower.endsWith(".key") || lower.includes(".aws") || lower.includes(".ssh") || lower.endsWith("credentials.json") || lower.endsWith(".npmrc")) {
264
+ const cleaned = stripped.replace(/[,:;)\]]+$/, "");
265
+ if (cleaned)
266
+ paths.push(cleaned);
267
+ } else if (stripped === ".env") {
268
+ paths.push(stripped);
269
+ }
270
+ }
271
+ }
272
+ return [...new Set(paths)];
273
+ }
274
+ function getSensitivePatterns() {
275
+ const raw = process.env.OSTACKY_SENSITIVE_PATTERNS;
276
+ if (!raw)
277
+ return SENSITIVE_DEFAULT;
278
+ return raw.split(",").map((s) => s.trim()).filter(Boolean);
279
+ }
280
+ var SENSITIVE_DEFAULT, BASH_SENSITIVE_RE;
281
+ var init_security = __esm(() => {
282
+ SENSITIVE_DEFAULT = [
283
+ "**/.env*",
284
+ "**/.secrets/**",
285
+ "**/*.pem",
286
+ "**/*.key",
287
+ "**/.aws/**",
288
+ "**/.ssh/**",
289
+ "**/credentials.json",
290
+ "**/.npmrc"
291
+ ];
292
+ BASH_SENSITIVE_RE = /(?:^|[^a-zA-Z0-9_.-])(\.env(\b|[_.-])|\.secrets\b|\.pem\b|\.key\b|credentials\.json|\.aws\b|\.ssh\b|\.npmrc\b)/i;
293
+ });
205
294
 
206
295
  // src/fs.ts
207
296
  import {
@@ -551,31 +640,31 @@ var init_fs = __esm(() => {
551
640
  var manifest_default;
552
641
  var init_manifest = __esm(() => {
553
642
  manifest_default = {
554
- version: "0.7.3",
643
+ version: "0.7.4",
555
644
  repo: "JaimeHoracio/Ostacky",
556
- tag: "v0.7.3",
645
+ tag: "v0.7.4",
557
646
  agents: [
558
647
  {
559
648
  name: "ostacky",
560
649
  file: "assets/agents/ostacky.md",
561
- 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.7.3: prune de skills obsoletas, lastHandoff, getAvailableTransitions, consecutiveFailures real, mem_session_summary automático al cierre.",
562
- version: "0.7.3",
563
- sha256: "b6dc55a9571f9626e7912ac493cc3bfe6b0798a597f706904b2106a4a9acfcd5"
650
+ 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.7.4: prune de skills obsoletas, lastHandoff, getAvailableTransitions, consecutiveFailures real, mem_session_summary automático al cierre.",
651
+ version: "0.7.4",
652
+ sha256: "ffda231d1a9df1693f32460bdb6811077f7f53ba7902b2616d82231a3d6d43bb"
564
653
  }
565
654
  ],
566
655
  commands: [
567
656
  {
568
657
  name: "install-stack",
569
658
  file: "assets/commands/install-stack.md",
570
- description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, Context7, controller MCP con SDK oficial). v0.7.3: Paso 1.5 controller expandido con verificación post-instalación y troubleshooting.",
571
- version: "0.7.3",
572
- sha256: "0d4bc0938110c40633b041847148d8212e34a5b5876752825cfd6e186c328b8b"
659
+ description: "Instala el stack tecnológico del proyecto (CodeGraph, skills, OpenSpec, Engram, Context7, controller MCP con SDK oficial). v0.7.4: Paso 1.5 controller expandido con verificación post-instalación y troubleshooting.",
660
+ version: "0.7.4",
661
+ sha256: "6887499074a82c3b4538e38ca501290cacd3afad676bd127662fed77e268f299"
573
662
  },
574
663
  {
575
664
  name: "opsx-sync",
576
665
  file: "assets/commands/opsx-sync.md",
577
666
  description: "Sincroniza delta specs del change activo sin inicializar CodeGraph si ya existe índice",
578
- version: "0.7.3",
667
+ version: "0.7.4",
579
668
  sha256: "fe0158478f2ca63b315037a85fc1632b77868532e319af6c7384285441767d64"
580
669
  }
581
670
  ],
@@ -583,15 +672,15 @@ var init_manifest = __esm(() => {
583
672
  {
584
673
  name: "ostacky-controller",
585
674
  file: "assets/mcp/ostacky-controller/",
586
- description: "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.7.3: 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.",
587
- version: "0.7.3",
588
- sha256: "d723afc107c8a36721e7f04dc1c16694a617cd562492e1ece362482c9023b945"
675
+ description: "Máquina de estados persistida con @modelcontextprotocol/server SDK. v0.7.4: 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.",
676
+ version: "0.7.4",
677
+ sha256: "4f86b6829293024caeb3d09c83b61aee158c383a7bb053a49e5a33c7c55862d1"
589
678
  },
590
679
  {
591
680
  name: "openspec",
592
681
  file: "assets/mcp/openspec/",
593
682
  description: "MCP server local para OpenSpec - proposal, apply, archive, sync de cambios",
594
- version: "0.7.3",
683
+ version: "0.7.4",
595
684
  sha256: "fa4be28bfc1e75db8f1a037e2580f04a60066c80e8e5934e90e1041020d04609"
596
685
  }
597
686
  ],
@@ -600,106 +689,106 @@ var init_manifest = __esm(() => {
600
689
  name: "brainstorming",
601
690
  file: "assets/skills/brainstorming/SKILL.md",
602
691
  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)",
603
- version: "0.7.3",
604
- sha256: "333810ca63450e8ab795e8c5a58e645101e788d79210ca8ac36e10d11be39585"
692
+ version: "0.7.4",
693
+ sha256: "7b0020f31f346d8f2070219930cfb9341135d40941195f0ea50c3bd7f4a42990"
605
694
  },
606
695
  {
607
696
  name: "execution-mode-evaluation",
608
697
  file: "assets/skills/execution-mode-evaluation/SKILL.md",
609
698
  description: "Skill de análisis de modo de ejecución — output reconciliado con controller snapshot contract (recommendation field)",
610
- version: "0.7.3",
699
+ version: "0.7.4",
611
700
  sha256: "e17f1e0309572841dc1fa537b1f32c7468eb70b3acf453b9ff5cc4fa8d94fd39"
612
701
  },
613
702
  {
614
703
  name: "tdd",
615
704
  file: "assets/skills/tdd/SKILL.md",
616
705
  description: "Skill de test-driven development (Superpowers)",
617
- version: "0.7.3",
706
+ version: "0.7.4",
618
707
  sha256: "aa412298980b7826165c211145c1b8e9135f68f36247bb3cb96d0a0eae274486"
619
708
  },
620
709
  {
621
710
  name: "subagent-driven-development",
622
711
  file: "assets/skills/subagent-driven-development/SKILL.md",
623
712
  description: "Skill de ejecución con subagentes (Superpowers) — ejecuta solo después de confirmación del coordinador Ostacky",
624
- version: "0.7.3",
713
+ version: "0.7.4",
625
714
  sha256: "1a42d714a9a13faf05f0bf7b580e8d837c2e77a5633839542ccce603023419e8"
626
715
  },
627
716
  {
628
717
  name: "dispatching-parallel-agents",
629
718
  file: "assets/skills/dispatching-parallel-agents/SKILL.md",
630
719
  description: "Skill de dispatch paralelo de agentes (Superpowers)",
631
- version: "0.7.3",
720
+ version: "0.7.4",
632
721
  sha256: "3c8a66d51ae2e719e877d02c3dac32bd804722c3bb9227c258ecae78252a20ab"
633
722
  },
634
723
  {
635
724
  name: "review",
636
725
  file: "assets/skills/review/SKILL.md",
637
726
  description: "Skill de revisión de código (Superpowers)",
638
- version: "0.7.3",
727
+ version: "0.7.4",
639
728
  sha256: "b19650ed4d1d4d9857a4dd5b7e08e91328a1a1fc9c45bcc2fb600fa9d0213279"
640
729
  },
641
730
  {
642
731
  name: "receiving-code-review",
643
732
  file: "assets/skills/receiving-code-review/SKILL.md",
644
733
  description: "Skill de recibir y procesar feedback de code review",
645
- version: "0.7.3",
734
+ version: "0.7.4",
646
735
  sha256: "d761e884e71d8d3476ac734d287cae403a4024506a7d12e7361a448217c0a831"
647
736
  },
648
737
  {
649
738
  name: "openspec-propose",
650
739
  file: "assets/skills/openspec-propose/SKILL.md",
651
740
  description: "Skill de generación de proposal (OpenSpec)",
652
- version: "0.7.3",
741
+ version: "0.7.4",
653
742
  sha256: "bb59100b9fd3c9f9a1ec6509fa975ec55bf7fc737df4fe73bb3e9bbc217b83f7"
654
743
  },
655
744
  {
656
745
  name: "openspec-apply-change",
657
746
  file: "assets/skills/openspec-apply-change/SKILL.md",
658
747
  description: "Skill de aplicación de change (OpenSpec)",
659
- version: "0.7.3",
748
+ version: "0.7.4",
660
749
  sha256: "dfc823bf89fc7505e91ab6dee9c1f004be38a410bd3d88fb67b211b1b6cbb1d0"
661
750
  },
662
751
  {
663
752
  name: "openspec-archive-change",
664
753
  file: "assets/skills/openspec-archive-change/SKILL.md",
665
754
  description: "Skill de archivo de change (OpenSpec)",
666
- version: "0.7.3",
755
+ version: "0.7.4",
667
756
  sha256: "16e4b561de7747283663fed602e506abf502452c49a8d4b86d7a5539c40f0195"
668
757
  },
669
758
  {
670
759
  name: "openspec-explore",
671
760
  file: "assets/skills/openspec-explore/SKILL.md",
672
761
  description: "Modo explore para OpenSpec — thinking partner para explorar ideas, investigar problemas y clarificar requisitos antes/durante un cambio",
673
- version: "0.7.3",
762
+ version: "0.7.4",
674
763
  sha256: "37ae4aaf17ea71a395bab6dc4d9d61b9a49d7910f6692535ae8553244c46880b"
675
764
  },
676
765
  {
677
766
  name: "using-git-worktrees",
678
767
  file: "assets/skills/using-git-worktrees/SKILL.md",
679
768
  description: "Skill de uso de git worktrees para aislamiento de trabajo",
680
- version: "0.7.3",
769
+ version: "0.7.4",
681
770
  sha256: "93341bc1b7c053618a8b6dc07e3615b77990d7b549a0201f5835d95fef67ce13"
682
771
  },
683
772
  {
684
773
  name: "using-superpowers",
685
774
  file: "assets/skills/using-superpowers/SKILL.md",
686
775
  description: "Skill de orquestación de Superpowers skills",
687
- version: "0.7.3",
776
+ version: "0.7.4",
688
777
  sha256: "7e54536f96d2a379185a10bfc1e970850caa2561b6d8aca7080f0defea0381a4"
689
778
  },
690
779
  {
691
780
  name: "writing-skills",
692
781
  file: "assets/skills/writing-skills/SKILL.md",
693
782
  description: "Skill de creación y edición de skills",
694
- version: "0.7.3",
783
+ version: "0.7.4",
695
784
  sha256: "3d76b906cee518a2b809febb70db95697a35b9f368986bb504b4120c3bfb437a"
696
785
  },
697
786
  {
698
787
  name: "graceful-degradation",
699
788
  file: "assets/skills/graceful-degradation/SKILL.md",
700
789
  description: "Skill de degradación graceful cuando múltiples tools están indisponibles",
701
- version: "0.7.3",
702
- sha256: "630b87c16d78212c865696ca5df6abb0834606095ffe0e80cff8e04350f01054"
790
+ version: "0.7.4",
791
+ sha256: "40f929e8032b70d51b3548bddcc383b931d6044fd9d4acce8a5b9f7acd014f59"
703
792
  }
704
793
  ]
705
794
  };
@@ -840,12 +929,12 @@ var init_github = __esm(() => {
840
929
  // src/lockfile.ts
841
930
  var exports_lockfile = {};
842
931
  __export(exports_lockfile, {
843
- writeLockfile: () => writeLockfile,
844
- removeFromLockfile: () => removeFromLockfile,
845
- readLockfile: () => readLockfile,
846
- getLockfilePath: () => getLockfilePath,
932
+ clearLockfile: () => clearLockfile,
847
933
  getInstalledVersion: () => getInstalledVersion,
848
- clearLockfile: () => clearLockfile
934
+ getLockfilePath: () => getLockfilePath,
935
+ readLockfile: () => readLockfile,
936
+ removeFromLockfile: () => removeFromLockfile,
937
+ writeLockfile: () => writeLockfile
849
938
  });
850
939
  import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
851
940
  import { join as join4 } from "path";
@@ -910,16 +999,16 @@ var init_lockfile = __esm(() => {
910
999
  // src/config.ts
911
1000
  var exports_config = {};
912
1001
  __export(exports_config, {
913
- writeOpenCodeConfig: () => writeOpenCodeConfig,
914
- stripJsoncComments: () => stripJsoncComments,
915
- setMcpEntryAtProjectRoot: () => setMcpEntryAtProjectRoot,
916
- setMcpEntry: () => setMcpEntry,
917
- readOpenCodeConfig: () => readOpenCodeConfig,
918
- patchOpenCodeConfig: () => patchOpenCodeConfig,
919
- findOpenCodeConfig: () => findOpenCodeConfig,
920
- ensureOpenCodeConfig: () => ensureOpenCodeConfig,
1002
+ ensureMcpEntry: () => ensureMcpEntry,
921
1003
  ensureMcpEntryAtProjectRoot: () => ensureMcpEntryAtProjectRoot,
922
- ensureMcpEntry: () => ensureMcpEntry
1004
+ ensureOpenCodeConfig: () => ensureOpenCodeConfig,
1005
+ findOpenCodeConfig: () => findOpenCodeConfig,
1006
+ patchOpenCodeConfig: () => patchOpenCodeConfig,
1007
+ readOpenCodeConfig: () => readOpenCodeConfig,
1008
+ setMcpEntry: () => setMcpEntry,
1009
+ setMcpEntryAtProjectRoot: () => setMcpEntryAtProjectRoot,
1010
+ stripJsoncComments: () => stripJsoncComments,
1011
+ writeOpenCodeConfig: () => writeOpenCodeConfig
923
1012
  });
924
1013
  import { existsSync as existsSync4, readFileSync as readFileSync4, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync4 } from "fs";
925
1014
  import { join as join5 } from "path";
@@ -1067,17 +1156,17 @@ var init_config = __esm(() => {
1067
1156
  // src/stack.ts
1068
1157
  var exports_stack = {};
1069
1158
  __export(exports_stack, {
1070
- verifyMcpServers: () => verifyMcpServers,
1071
- uninstallStackConfig: () => uninstallStackConfig,
1072
- uninstallEngramConfig: () => uninstallEngramConfig,
1073
- setupOpenSpec: () => setupOpenSpec,
1074
- setupContext7: () => setupContext7,
1075
- installStack: () => installStack,
1076
- installEngram: () => installEngram,
1077
- installCodeGraph: () => installCodeGraph,
1078
- buildLocalMcpCommand: () => buildLocalMcpCommand,
1159
+ OPENSPEC_NPM_PACKAGE: () => OPENSPEC_NPM_PACKAGE,
1079
1160
  buildEngramDownloadUrl: () => buildEngramDownloadUrl,
1080
- OPENSPEC_NPM_PACKAGE: () => OPENSPEC_NPM_PACKAGE
1161
+ buildLocalMcpCommand: () => buildLocalMcpCommand,
1162
+ installCodeGraph: () => installCodeGraph,
1163
+ installEngram: () => installEngram,
1164
+ installStack: () => installStack,
1165
+ setupContext7: () => setupContext7,
1166
+ setupOpenSpec: () => setupOpenSpec,
1167
+ uninstallEngramConfig: () => uninstallEngramConfig,
1168
+ uninstallStackConfig: () => uninstallStackConfig,
1169
+ verifyMcpServers: () => verifyMcpServers
1081
1170
  });
1082
1171
  import { chmodSync, copyFileSync as copyFileSync3, existsSync as existsSync6, mkdirSync as mkdirSync4, rmSync as rmSync4, unlinkSync as unlinkSync3 } from "fs";
1083
1172
  import { basename as basename2, dirname as dirname5, join as join7, resolve as resolve2 } from "path";
@@ -1499,7 +1588,7 @@ var init_stack = __esm(() => {
1499
1588
  // package.json
1500
1589
  var package_default = {
1501
1590
  name: "ostacky",
1502
- version: "0.7.3",
1591
+ version: "0.7.4",
1503
1592
  description: "Instalador interactivo de agentes y comandos para OpenCode",
1504
1593
  type: "module",
1505
1594
  bin: {
@@ -1548,23 +1637,23 @@ var package_default = {
1548
1637
  // node_modules/@clack/prompts/dist/index.mjs
1549
1638
  var exports_dist = {};
1550
1639
  __export(exports_dist, {
1551
- updateSettings: () => hD,
1552
- text: () => ue,
1553
- tasks: () => xe,
1554
- spinner: () => L2,
1555
- selectKey: () => he,
1556
- select: () => de,
1557
- password: () => $e,
1558
- outro: () => fe,
1559
- note: () => ye,
1560
- multiselect: () => pe,
1561
- log: () => v2,
1562
- isCancel: () => BD,
1563
- intro: () => we,
1564
- groupMultiselect: () => ge,
1565
- group: () => be,
1640
+ cancel: () => ve,
1566
1641
  confirm: () => me,
1567
- cancel: () => ve
1642
+ group: () => be,
1643
+ groupMultiselect: () => ge,
1644
+ intro: () => we,
1645
+ isCancel: () => BD,
1646
+ log: () => v2,
1647
+ multiselect: () => pe,
1648
+ note: () => ye,
1649
+ outro: () => fe,
1650
+ password: () => $e,
1651
+ select: () => de,
1652
+ selectKey: () => he,
1653
+ spinner: () => L2,
1654
+ tasks: () => xe,
1655
+ text: () => ue,
1656
+ updateSettings: () => hD
1568
1657
  });
1569
1658
  import { stripVTControlCharacters as T2 } from "node:util";
1570
1659
 
@@ -2674,7 +2763,7 @@ async function probeMcpServer(nodeExecutable, serverPath, cwd, statePath, option
2674
2763
  params: {
2675
2764
  protocolVersion: "2025-03-26",
2676
2765
  capabilities: {},
2677
- clientInfo: { name: "ostacky-installer", version: "0.7.3" }
2766
+ clientInfo: { name: "ostacky-installer", version: "0.7.4" }
2678
2767
  }
2679
2768
  });
2680
2769
  });
@@ -4142,7 +4231,7 @@ async function runUninstallMcpCommand(name, scope) {
4142
4231
 
4143
4232
  // src/cli.ts
4144
4233
  init_fs();
4145
- import { existsSync as existsSync8, statSync as statSync3, readFileSync as readFileSync6 } from "node:fs";
4234
+ import { existsSync as existsSync8, statSync as statSync3, readFileSync as readFileSync6, readdirSync as readdirSync3 } from "node:fs";
4146
4235
  import { join as join11, dirname as dirname8 } from "node:path";
4147
4236
  var HELP = `
4148
4237
  ostacky — Instalador de agentes, comandos, skills y MCPs para OpenCode
@@ -4243,6 +4332,10 @@ async function runDoctorCommand() {
4243
4332
  console.log(`⚠️ stateOversizedCount=${parsed.stateOversizedCount} snapshots perdidos`);
4244
4333
  if (parsed.sensitiveAccess)
4245
4334
  console.log(`ℹ️ sensitiveAccess: allowed=${parsed.sensitiveAccess.allowed || 0} denied=${parsed.sensitiveAccess.denied || 0} blocked=${parsed.sensitiveAccess.blockedAttempts || 0}`);
4335
+ if (parsed.sensitivePatterns)
4336
+ console.log(`ℹ️ sensitivePatterns: ${parsed.sensitivePatterns.join(", ")}`);
4337
+ if (parsed.allowedFiles && Object.keys(parsed.allowedFiles).length)
4338
+ console.log(`ℹ️ allowedFiles: ${Object.keys(parsed.allowedFiles).join(", ")}`);
4246
4339
  if (parsed.deniedFiles && Object.keys(parsed.deniedFiles).length) {
4247
4340
  console.log(`ℹ️ denied files: ${Object.keys(parsed.deniedFiles).join(", ")} (denied by user)`);
4248
4341
  }
@@ -4330,6 +4423,60 @@ async function runDoctorCommand() {
4330
4423
  if (s.allowedFiles || s.deniedFiles) {}
4331
4424
  } catch {}
4332
4425
  }
4426
+ try {
4427
+ const cacheDir = join11(opencodeDir, "cache", "codegraph");
4428
+ if (!existsSync8(cacheDir)) {
4429
+ console.log("ℹ️ cache: no cache dir yet (ok)");
4430
+ } else {
4431
+ const files = readdirSync3(cacheDir);
4432
+ let total = 0;
4433
+ for (const f2 of files) {
4434
+ try {
4435
+ total += statSync3(join11(cacheDir, f2)).size;
4436
+ } catch {}
4437
+ }
4438
+ const totalMB = (total / 1048576).toFixed(2);
4439
+ if (total > 52428800) {
4440
+ console.log(`⚠️ cache: ${totalMB}MB >50MB — LRU cleanup needed`);
4441
+ hasWarn = true;
4442
+ } else {
4443
+ console.log(`✅ cache: OK (${files.length} files, ${totalMB}MB)`);
4444
+ }
4445
+ try {
4446
+ const s = JSON.parse(readFileSync6(statePath, "utf-8"));
4447
+ if (s.cacheHitCount !== undefined) {
4448
+ console.log(`ℹ️ cacheHitCount=${s.cacheHitCount} cacheMissCount=${s.cacheMissCount || 0} tokenSavingEstimate=${s.tokenSavingEstimate || 0}`);
4449
+ }
4450
+ } catch {}
4451
+ }
4452
+ } catch (e2) {
4453
+ console.log(`⚠️ cache: check failed ${e2.message}`);
4454
+ }
4455
+ try {
4456
+ const secPath = join11(cwd, "src", "security.ts");
4457
+ if (!existsSync8(secPath)) {
4458
+ console.log("⚠️ src/security.ts: missing (source-of-truth)");
4459
+ hasWarn = true;
4460
+ } else {
4461
+ const sec = readFileSync6(secPath, "utf-8");
4462
+ const hasSensitiveDefault = sec.includes("SENSITIVE_DEFAULT");
4463
+ const hasBashRe = sec.includes("BASH_SENSITIVE_RE");
4464
+ const hasIsSensitive = sec.includes("function isSensitive");
4465
+ const hasExtract = sec.includes("extractPathsFromBash");
4466
+ if (hasSensitiveDefault && hasBashRe && hasIsSensitive && hasExtract) {
4467
+ console.log("✅ src/security.ts: source-of-truth OK");
4468
+ } else {
4469
+ console.log("⚠️ src/security.ts: missing exports (SENSITIVE_DEFAULT/BASH_SENSITIVE_RE/isSensitive/extractPathsFromBash)");
4470
+ hasWarn = true;
4471
+ }
4472
+ }
4473
+ } catch {}
4474
+ try {
4475
+ const s = JSON.parse(readFileSync6(statePath, "utf-8"));
4476
+ if (s.sensitiveAccess?.blockedAttempts > 0) {
4477
+ console.log(`ℹ️ sensitiveAccess: blockedAttempts includes bash (${s.sensitiveAccess.blockedAttempts})`);
4478
+ }
4479
+ } catch {}
4333
4480
  if (hasError)
4334
4481
  process.exit(1);
4335
4482
  if (hasWarn)