@prestyj/cli 4.3.15 → 4.3.54

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 (148) hide show
  1. package/README.md +4 -4
  2. package/dist/cli.js +529 -74
  3. package/dist/cli.js.map +1 -1
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +122 -3
  6. package/dist/config.js.map +1 -1
  7. package/dist/core/agent-session.d.ts.map +1 -1
  8. package/dist/core/agent-session.js +41 -23
  9. package/dist/core/agent-session.js.map +1 -1
  10. package/dist/core/auth-storage.d.ts.map +1 -1
  11. package/dist/core/auth-storage.js +14 -2
  12. package/dist/core/auth-storage.js.map +1 -1
  13. package/dist/core/auto-update.d.ts +24 -3
  14. package/dist/core/auto-update.d.ts.map +1 -1
  15. package/dist/core/auto-update.js +143 -55
  16. package/dist/core/auto-update.js.map +1 -1
  17. package/dist/core/auto-update.test.d.ts +2 -0
  18. package/dist/core/auto-update.test.d.ts.map +1 -0
  19. package/dist/core/auto-update.test.js +205 -0
  20. package/dist/core/auto-update.test.js.map +1 -0
  21. package/dist/core/compaction/compactor.d.ts +4 -0
  22. package/dist/core/compaction/compactor.d.ts.map +1 -1
  23. package/dist/core/compaction/compactor.js +17 -1
  24. package/dist/core/compaction/compactor.js.map +1 -1
  25. package/dist/core/compaction/compactor.test.js +44 -11
  26. package/dist/core/compaction/compactor.test.js.map +1 -1
  27. package/dist/core/compaction/token-estimator.d.ts.map +1 -1
  28. package/dist/core/compaction/token-estimator.js +14 -1
  29. package/dist/core/compaction/token-estimator.js.map +1 -1
  30. package/dist/core/compaction/token-estimator.test.js +1 -1
  31. package/dist/core/logger.d.ts +7 -2
  32. package/dist/core/logger.d.ts.map +1 -1
  33. package/dist/core/logger.js +48 -4
  34. package/dist/core/logger.js.map +1 -1
  35. package/dist/core/model-registry.d.ts.map +1 -1
  36. package/dist/core/model-registry.js +56 -21
  37. package/dist/core/model-registry.js.map +1 -1
  38. package/dist/core/prompt-commands.d.ts.map +1 -1
  39. package/dist/core/prompt-commands.js +356 -1
  40. package/dist/core/prompt-commands.js.map +1 -1
  41. package/dist/core/settings-manager.d.ts +1 -0
  42. package/dist/core/settings-manager.d.ts.map +1 -1
  43. package/dist/core/settings-manager.js +3 -1
  44. package/dist/core/settings-manager.js.map +1 -1
  45. package/dist/core/skills.d.ts.map +1 -1
  46. package/dist/core/skills.js +29 -14
  47. package/dist/core/skills.js.map +1 -1
  48. package/dist/modes/agent-home-mode.d.ts +21 -0
  49. package/dist/modes/agent-home-mode.d.ts.map +1 -0
  50. package/dist/modes/agent-home-mode.js +553 -0
  51. package/dist/modes/agent-home-mode.js.map +1 -0
  52. package/dist/system-prompt.d.ts +5 -1
  53. package/dist/system-prompt.d.ts.map +1 -1
  54. package/dist/system-prompt.js +118 -82
  55. package/dist/system-prompt.js.map +1 -1
  56. package/dist/tools/bash.js +1 -1
  57. package/dist/tools/bash.js.map +1 -1
  58. package/dist/tools/edit.d.ts +4 -2
  59. package/dist/tools/edit.d.ts.map +1 -1
  60. package/dist/tools/edit.js +61 -33
  61. package/dist/tools/edit.js.map +1 -1
  62. package/dist/tools/edit.test.js +80 -20
  63. package/dist/tools/edit.test.js.map +1 -1
  64. package/dist/tools/grep.d.ts.map +1 -1
  65. package/dist/tools/grep.js +12 -0
  66. package/dist/tools/grep.js.map +1 -1
  67. package/dist/tools/plan-mode.test.js +22 -6
  68. package/dist/tools/plan-mode.test.js.map +1 -1
  69. package/dist/tools/prompt-hints.d.ts +10 -0
  70. package/dist/tools/prompt-hints.d.ts.map +1 -0
  71. package/dist/tools/prompt-hints.js +45 -0
  72. package/dist/tools/prompt-hints.js.map +1 -0
  73. package/dist/tools/read.d.ts.map +1 -1
  74. package/dist/tools/read.js +32 -6
  75. package/dist/tools/read.js.map +1 -1
  76. package/dist/tools/read.test.js +23 -4
  77. package/dist/tools/read.test.js.map +1 -1
  78. package/dist/tools/subagent.d.ts.map +1 -1
  79. package/dist/tools/subagent.js +20 -3
  80. package/dist/tools/subagent.js.map +1 -1
  81. package/dist/tools/write.test.js +13 -1
  82. package/dist/tools/write.test.js.map +1 -1
  83. package/dist/ui/App.d.ts +6 -1
  84. package/dist/ui/App.d.ts.map +1 -1
  85. package/dist/ui/App.js +195 -70
  86. package/dist/ui/App.js.map +1 -1
  87. package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
  88. package/dist/ui/components/ActivityIndicator.js +0 -1
  89. package/dist/ui/components/ActivityIndicator.js.map +1 -1
  90. package/dist/ui/components/EyesOverlay.d.ts +10 -0
  91. package/dist/ui/components/EyesOverlay.d.ts.map +1 -0
  92. package/dist/ui/components/EyesOverlay.js +220 -0
  93. package/dist/ui/components/EyesOverlay.js.map +1 -0
  94. package/dist/ui/components/Footer.d.ts.map +1 -1
  95. package/dist/ui/components/Footer.js +7 -6
  96. package/dist/ui/components/Footer.js.map +1 -1
  97. package/dist/ui/components/InputArea.d.ts +4 -1
  98. package/dist/ui/components/InputArea.d.ts.map +1 -1
  99. package/dist/ui/components/InputArea.js +6 -5
  100. package/dist/ui/components/InputArea.js.map +1 -1
  101. package/dist/ui/components/ModelSelector.d.ts.map +1 -1
  102. package/dist/ui/components/ModelSelector.js +2 -1
  103. package/dist/ui/components/ModelSelector.js.map +1 -1
  104. package/dist/ui/components/PlanOverlay.d.ts.map +1 -1
  105. package/dist/ui/components/PlanOverlay.js +7 -1
  106. package/dist/ui/components/PlanOverlay.js.map +1 -1
  107. package/dist/ui/components/SelectList.d.ts +3 -1
  108. package/dist/ui/components/SelectList.d.ts.map +1 -1
  109. package/dist/ui/components/SelectList.js +15 -2
  110. package/dist/ui/components/SelectList.js.map +1 -1
  111. package/dist/ui/components/SkillsOverlay.d.ts.map +1 -1
  112. package/dist/ui/components/SkillsOverlay.js +6 -59
  113. package/dist/ui/components/SkillsOverlay.js.map +1 -1
  114. package/dist/ui/components/SlashCommandMenu.d.ts.map +1 -1
  115. package/dist/ui/components/SlashCommandMenu.js +18 -8
  116. package/dist/ui/components/SlashCommandMenu.js.map +1 -1
  117. package/dist/ui/hooks/stall-retry-duplicate.test.d.ts +2 -0
  118. package/dist/ui/hooks/stall-retry-duplicate.test.d.ts.map +1 -0
  119. package/dist/ui/hooks/stall-retry-duplicate.test.js +94 -0
  120. package/dist/ui/hooks/stall-retry-duplicate.test.js.map +1 -0
  121. package/dist/ui/hooks/useAgentLoop.d.ts +1 -1
  122. package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
  123. package/dist/ui/hooks/useAgentLoop.js +19 -0
  124. package/dist/ui/hooks/useAgentLoop.js.map +1 -1
  125. package/dist/ui/login.d.ts.map +1 -1
  126. package/dist/ui/login.js +6 -5
  127. package/dist/ui/login.js.map +1 -1
  128. package/dist/ui/stores/create-store.d.ts +15 -0
  129. package/dist/ui/stores/create-store.d.ts.map +1 -0
  130. package/dist/ui/stores/create-store.js +30 -0
  131. package/dist/ui/stores/create-store.js.map +1 -0
  132. package/dist/ui/stores/index.d.ts +3 -0
  133. package/dist/ui/stores/index.d.ts.map +1 -0
  134. package/dist/ui/stores/index.js +3 -0
  135. package/dist/ui/stores/index.js.map +1 -0
  136. package/dist/ui/stores/taskbar-store.d.ts +19 -0
  137. package/dist/ui/stores/taskbar-store.d.ts.map +1 -0
  138. package/dist/ui/stores/taskbar-store.js +59 -0
  139. package/dist/ui/stores/taskbar-store.js.map +1 -0
  140. package/dist/ui/utils/token-to-ansi.d.ts.map +1 -1
  141. package/dist/ui/utils/token-to-ansi.js +9 -1
  142. package/dist/ui/utils/token-to-ansi.js.map +1 -1
  143. package/dist/utils/image.d.ts +18 -1
  144. package/dist/utils/image.d.ts.map +1 -1
  145. package/dist/utils/image.js +80 -31
  146. package/dist/utils/image.js.map +1 -1
  147. package/dist/utils/session-title.js +1 -1
  148. package/package.json +13 -9
@@ -1,8 +1,10 @@
1
+ // Provider display order — mirrors `PROVIDERS` in ui/login.tsx so the
2
+ // /model selector and login selector sort models identically.
1
3
  export const MODELS = [
2
4
  // ── Anthropic ──────────────────────────────────────────
3
5
  {
4
- id: "claude-opus-4-6",
5
- name: "Claude Opus 4.6",
6
+ id: "claude-opus-4-7",
7
+ name: "Claude Opus 4.7",
6
8
  provider: "anthropic",
7
9
  contextWindow: 1_000_000,
8
10
  maxOutputTokens: 128_000,
@@ -30,18 +32,27 @@ export const MODELS = [
30
32
  supportsImages: true,
31
33
  costTier: "low",
32
34
  },
33
- // ── Xiaomi (MiMo) ──────────────────────────────────────
35
+ // ── OpenAI (Codex) ─────────────────────────────────────
34
36
  {
35
- id: "mimo-v2-pro",
36
- name: "MiMo-V2-Pro",
37
- provider: "xiaomi",
37
+ id: "gpt-5.5",
38
+ name: "GPT-5.5",
39
+ provider: "openai",
38
40
  contextWindow: 1_000_000,
39
- maxOutputTokens: 131_072,
41
+ maxOutputTokens: 128_000,
40
42
  supportsThinking: true,
41
- supportsImages: false,
42
- costTier: "medium",
43
+ supportsImages: true,
44
+ costTier: "high",
45
+ },
46
+ {
47
+ id: "gpt-5.5-pro",
48
+ name: "GPT-5.5 Pro",
49
+ provider: "openai",
50
+ contextWindow: 1_000_000,
51
+ maxOutputTokens: 128_000,
52
+ supportsThinking: true,
53
+ supportsImages: true,
54
+ costTier: "high",
43
55
  },
44
- // ── OpenAI (Codex) ─────────────────────────────────────
45
56
  {
46
57
  id: "gpt-5.4",
47
58
  name: "GPT-5.4",
@@ -82,7 +93,18 @@ export const MODELS = [
82
93
  supportsImages: true,
83
94
  costTier: "low",
84
95
  },
85
- // ── GLM (Z.AI) ───────────────────────────────────────────
96
+ // ── Moonshot (Kimi) ────────────────────────────────────
97
+ {
98
+ id: "kimi-k2.6",
99
+ name: "Kimi K2.6",
100
+ provider: "moonshot",
101
+ contextWindow: 262_144,
102
+ maxOutputTokens: 16_384,
103
+ supportsThinking: true,
104
+ supportsImages: true,
105
+ costTier: "medium",
106
+ },
107
+ // ── Z.AI (GLM) ─────────────────────────────────────────
86
108
  {
87
109
  id: "glm-5v-turbo",
88
110
  name: "GLM-5V-Turbo",
@@ -123,7 +145,7 @@ export const MODELS = [
123
145
  supportsImages: false,
124
146
  costTier: "low",
125
147
  },
126
- // ── MiniMax ───────────────────────────────────────────────
148
+ // ── MiniMax ────────────────────────────────────────────
127
149
  {
128
150
  id: "MiniMax-M2.7",
129
151
  name: "MiniMax M2.7",
@@ -144,15 +166,26 @@ export const MODELS = [
144
166
  supportsImages: false,
145
167
  costTier: "medium",
146
168
  },
147
- // ── Moonshot (Kimi) ──────────────────────────────────────
169
+ // ── Xiaomi (MiMo) ──────────────────────────────────────
148
170
  {
149
- id: "kimi-k2.5",
150
- name: "Kimi K2.5",
151
- provider: "moonshot",
152
- contextWindow: 200_000,
153
- maxOutputTokens: 16_384,
171
+ id: "mimo-v2-pro",
172
+ name: "MiMo-V2-Pro",
173
+ provider: "xiaomi",
174
+ contextWindow: 1_000_000,
175
+ maxOutputTokens: 131_072,
154
176
  supportsThinking: true,
155
- supportsImages: true,
177
+ supportsImages: false,
178
+ costTier: "medium",
179
+ },
180
+ // ── OpenRouter ─────────────────────────────────────────
181
+ {
182
+ id: "qwen/qwen3.6-plus",
183
+ name: "Qwen3.6-Plus",
184
+ provider: "openrouter",
185
+ contextWindow: 1_000_000,
186
+ maxOutputTokens: 65_536,
187
+ supportsThinking: true,
188
+ supportsImages: false,
156
189
  costTier: "medium",
157
190
  },
158
191
  ];
@@ -166,13 +199,15 @@ export function getDefaultModel(provider) {
166
199
  if (provider === "xiaomi")
167
200
  return MODELS.find((m) => m.id === "mimo-v2-pro");
168
201
  if (provider === "openai")
169
- return MODELS.find((m) => m.id === "gpt-5.4");
202
+ return MODELS.find((m) => m.id === "gpt-5.5");
170
203
  if (provider === "glm")
171
204
  return MODELS.find((m) => m.id === "glm-5.1");
172
205
  if (provider === "moonshot")
173
- return MODELS.find((m) => m.id === "kimi-k2.5");
206
+ return MODELS.find((m) => m.id === "kimi-k2.6");
174
207
  if (provider === "minimax")
175
208
  return MODELS.find((m) => m.id === "MiniMax-M2.7");
209
+ if (provider === "openrouter")
210
+ return MODELS.find((m) => m.id === "qwen/qwen3.6-plus");
176
211
  return MODELS.find((m) => m.id === "claude-sonnet-4-6");
177
212
  }
178
213
  export function getContextWindow(modelId) {
@@ -1 +1 @@
1
- {"version":3,"file":"model-registry.js","sourceRoot":"","sources":["../../src/core/model-registry.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,MAAM,GAAgB;IACjC,0DAA0D;IAC1D;QACE,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,aAAa,EAAE,SAAS;QACxB,eAAe,EAAE,OAAO;QACxB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,MAAM;KACjB;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,WAAW;QACrB,aAAa,EAAE,SAAS;QACxB,eAAe,EAAE,MAAM;QACvB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,QAAQ;KACnB;IACD;QACE,EAAE,EAAE,2BAA2B;QAC/B,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,WAAW;QACrB,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,MAAM;QACvB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,0DAA0D;IAC1D;QACE,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,SAAS;QACxB,eAAe,EAAE,OAAO;QACxB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,KAAK;QACrB,QAAQ,EAAE,QAAQ;KACnB;IACD,0DAA0D;IAC1D;QACE,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,QAAQ;QAClB,aAAa,E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,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,mBAAmB,CAAE,CAAC;IAC3D,CAAC;IACD,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QAChD,MAAM,GAAG,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC;QAC7E,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;IACtB,CAAC;IACD,0CAA0C;IAC1C,OAAO,QAAQ,CAAC,cAAc,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAse1C,CAAC;AAEF,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExE"}
1
+ {"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAy0B1C,CAAC;AAEF,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExE"}
@@ -214,7 +214,13 @@ Create a concise tree structure showing key directories and files with brief des
214
214
 
215
215
  Create CLAUDE.md with: project description, project structure tree, organization rules (one file per component, single responsibility), and zero-tolerance code quality checks with the exact commands for this project.
216
216
 
217
- Keep total file under 100 lines. If updating, preserve any custom sections the user added.`,
217
+ Keep total file under 100 lines. If updating, preserve any custom sections the user added.
218
+
219
+ ## Step 6: Restart Notice
220
+
221
+ End your reply with this exact notice so the user doesn't miss it:
222
+
223
+ > ⚠️ CLAUDE.md was created/updated. ezcoder loads it at startup, so **exit and restart ezcoder** (\`/quit\` then run \`ezcoder\` again) before continuing. Without a restart, I won't see the new context.`,
218
224
  },
219
225
  {
220
226
  name: "setup-lint",
@@ -466,6 +472,256 @@ Replace all placeholders with the actual commands for the detected project type
466
472
  ## Step 3: Confirm
467
473
 
468
474
  Report that /update is now available with dependency updates, security audits, and deprecation fixes.`,
475
+ },
476
+ {
477
+ name: "setup-eyes",
478
+ aliases: [],
479
+ description: "Set up project perception probes and document them",
480
+ prompt: `# Eyes: Set Up or Expand Project Perception
481
+
482
+ Build the perception probes this project needs and document them in CLAUDE.md so any future agent can use them. The \`ezcoder eyes\` CLI does the mechanical work (detect, install, verify); your job is **judgment** (which capabilities matter for THIS project) and **prose** (the project-specific triggers in CLAUDE.md). Re-run this command anytime to add or fix probes.
483
+
484
+ ## Steps
485
+
486
+ 1. \`ezcoder eyes list\` — see what's already installed/verified. **Resume**, don't restart. Skip verified probes; re-run failed ones.
487
+ 2. \`ezcoder eyes detect\` — emits JSON of \`{capability: {candidates, primary}}\` for this project.
488
+ 3. **Pick 3–8 capabilities to install this run.** Heuristics:
489
+ - Universal: \`http\` for any API/backend, \`runtime_logs\` for anything with a server.
490
+ - UI: \`visual\` — for multi-stack projects (e.g. React Native), install all primary candidates with distinct names: \`install visual --impl playwright --as visual-web\`, \`install visual --impl adb --as visual-android\`, \`install visual --impl simctl --as visual-ios\`.
491
+ - Backend with email/webhooks: \`capture_email\`, \`capture_webhook\`.
492
+ - **Always defer** opt-ins: \`load\`, \`chaos\`, \`remote\`, \`apm\` — unless the user explicitly asked.
493
+ 4. For each pick: \`ezcoder eyes install <cap> [--impl <name>] [--as <name>]\`. On failure: retry once, then mark and continue — don't abort the whole run.
494
+ 5. \`ezcoder eyes verify\` — runs every installed probe's self-test. Some failures (\`adb\` no device, \`simctl\` no booted simulator) are expected; they get recorded.
495
+ 6. **Write/update the \`## Eyes\` section in CLAUDE.md** (create CLAUDE.md if missing; do NOT clobber other sections). Use the template below. The triggers are the load-bearing piece — make them project-specific and actionable.
496
+ 7. **Report**: list verified ✓ / failed ✗ / deferred. End with the restart notice.
497
+
498
+ ## CLAUDE.md \`## Eyes\` template
499
+
500
+ \`\`\`markdown
501
+ ## Eyes
502
+
503
+ Perception probes live in \`.ezcoder/eyes/\`. All headless. Artifacts → \`.ezcoder/eyes/out/\` (gitignored). Invoke probes yourself; don't ask the user to verify what you can verify.
504
+
505
+ ### Available probes
506
+
507
+ | Need | Run | Then |
508
+ |---|---|---|
509
+ | <one-line need> | \`.ezcoder/eyes/<id>.sh <args>\` | <how to consume the output> |
510
+ | ... | ... | ... |
511
+
512
+ ### When to use these eyes (automatically, without being asked)
513
+
514
+ Reach for probes ON YOUR OWN INITIATIVE when any of these apply:
515
+
516
+ - <project-specific trigger 1, e.g. "After editing any \`.tsx\` file under \`src/components/\`, screenshot the affected page with \`.ezcoder/eyes/visual.sh http://localhost:3000/<path>\`.">
517
+ - <trigger 2, e.g. "After adding/modifying a route under \`src/routes/\`, hit it with \`.ezcoder/eyes/http.sh\` and confirm the response shape.">
518
+ - <trigger 3>
519
+
520
+ If a probe fails or returns unexpected results, investigate the artifact directly before assuming the probe itself is broken.
521
+
522
+ ### When NOT to use
523
+
524
+ - Docs-only changes, comments, formatting.
525
+ - Refactors covered by tests.
526
+ - Dev server / simulator / sink isn't up AND the task doesn't require runtime verification.
527
+ - Same probe already ran this turn on the same artifact — reuse the output.
528
+
529
+ ### When to escalate a capability gap (the self-improvement loop)
530
+
531
+ If you're about to **guess**, **skip verification**, or **hand-wave** about something a better probe would show you — STOP and surface the tradeoff inline. Phrasing like:
532
+
533
+ > "I tried screenshotting but the failure is a JS error I can only see in the browser console — and there's no \`browser_console\` probe. Two paths: (a) ~3 min to add it, then I can diagnose properly. (b) Workaround: I'd guess from the DOM state. Your call?"
534
+
535
+ Wait for the user's choice. **Don't escalate more than once per request** — if the user picked the workaround, don't re-ask in the same turn.
536
+
537
+ For minor friction (worked around it but wished it were better), don't interrupt — log it for later review:
538
+ - \`ezcoder eyes log rough "<reason>" [--probe <name>]\` — minor friction, you handled it
539
+ - \`ezcoder eyes log wish "<gap>"\` — capability you wished existed
540
+ - \`ezcoder eyes log blocked "<reason>"\` — call this AFTER the user approves an inline-escalation fix, for the audit trail
541
+
542
+ These accumulate quietly. The user reviews them periodically. Open signals will appear in your context on future turns until they're acked.
543
+ \`\`\`
544
+
545
+ ## Trigger writing rules
546
+
547
+ The "When to use" triggers are project-specific and the load-bearing piece — without them the agent has probes but no instinct to use them. Rules:
548
+ - For each verified probe, write at least one trigger that names a real **file pattern** or **task type** the agent will recognize ("after editing \`*.tsx\` under \`src/ui/\`", not "after UI changes").
549
+ - Be **actionable** ("screenshot the page", "hit the endpoint") not **vague** ("verify it works").
550
+ - Match density to the project: a UI-heavy app warrants strong visual triggers; a pure backend library does not.
551
+
552
+ ## Restart notice
553
+
554
+ End your report with:
555
+
556
+ > ⚠ CLAUDE.md was updated. ezcoder loads CLAUDE.md at startup, so **exit and restart ezcoder** (\`/quit\` then \`ezcoder\` again) before asking me to use these probes. Without a restart, I won't see the new instructions in my context.`,
557
+ },
558
+ {
559
+ name: "eyes-improve",
560
+ aliases: [],
561
+ description: "Triage eyes signals and apply approved probe fixes",
562
+ prompt: `# Eyes Improve: Triage Accumulated Signals
563
+
564
+ Read the open signals in \`.ezcoder/eyes/journal.jsonl\`, group related ones, propose concrete fixes, and apply what the user approves. This isn't unbounded refactoring — it's incremental probe improvement driven by real use.
565
+
566
+ ## Steps
567
+
568
+ 1. \`ezcoder eyes log list --status open\` — if zero entries, say "nothing to triage" and stop.
569
+ 2. **Group** signals by likely fix:
570
+ - Multiple \`rough\` entries naming the same probe / same frustration → one patch to that probe.
571
+ - \`wish\` entries naming a capability not installed → one \`ezcoder eyes install <cap>\` proposal.
572
+ - \`blocked\` entries are historical (user already resolved inline) → ack them, no new work.
573
+ 3. **Cap at 5 proposals this run.** If more would apply, mention them and stop — they'll resurface next run.
574
+ 4. For each group, propose ONE concrete change:
575
+ - **Probe tweak**: read \`.ezcoder/eyes/<name>.sh\`, show a diff, explain what it fixes.
576
+ - **New probe**: \`ezcoder eyes install <cap>\` with a one-line justification.
577
+ - **New/updated trigger**: bullet added under \`## Eyes → When to use\` in CLAUDE.md.
578
+ 5. Present all proposals as a numbered list with diffs inline. Ask: **"Accept which? Reply with numbers (e.g. '1, 3') or 'none'."**
579
+ 6. On user reply:
580
+ - For accepted: apply the change. Then \`ezcoder eyes log ack <id>\` for every journal entry the proposal covers.
581
+ - For unmentioned / rejected: \`ezcoder eyes log defer <id>\` so they stop appearing in context every turn. The user can resurrect deferred entries later.
582
+ 7. **Report**: applied changes (one line each), entries acked, entries deferred.
583
+
584
+ ## Rules
585
+
586
+ - **No fishing.** Only act on entries already in the journal. Don't scan the repo for hypothetical gaps.
587
+ - **No scope creep.** "Add a \`--wait-for-selector\` flag to the visual probe" is in scope. "Rewrite the probe in TypeScript" is not.
588
+ - **Preserve user edits.** If \`.ezcoder/eyes/<name>.sh\` has diverged from the shipped impl (user hand-edited), point this out and ask before overwriting.
589
+ - **Be honest about tradeoffs.** If a proposed fix might break existing invocations, say so in the proposal.
590
+ - **Decline when appropriate.** If open signals are all vague or low-value, say so and defer them — don't manufacture fixes.`,
591
+ },
592
+ {
593
+ name: "simplify",
594
+ aliases: [],
595
+ description: "Review changed code and fix issues found",
596
+ prompt: `# Simplify: Code Review and Cleanup
597
+
598
+ Review all changed files for reuse, quality, and efficiency. Fix any issues found.
599
+
600
+ ## Phase 1: Identify Changes
601
+
602
+ Run \`git diff\` (or \`git diff HEAD\` if there are staged changes) to see what changed. If there are no git changes, review the most recently modified files that the user mentioned or that you edited earlier in this conversation.
603
+
604
+ ## Phase 2: Launch Three Review Agents in Parallel
605
+
606
+ Use the subagent tool to launch all three agents concurrently in a single response (call the subagent tool 3 times in one message). Pass each agent the full diff so it has the complete context.
607
+
608
+ ### Agent 1: Code Reuse Review
609
+
610
+ For each change:
611
+
612
+ 1. **Search for existing utilities and helpers** that could replace newly written code. Look for similar patterns elsewhere in the codebase — common locations are utility directories, shared modules, and files adjacent to the changed ones.
613
+ 2. **Flag any new function that duplicates existing functionality.** Suggest the existing function to use instead.
614
+ 3. **Flag any inline logic that could use an existing utility** — hand-rolled string manipulation, manual path handling, custom environment checks, ad-hoc type guards, and similar patterns are common candidates.
615
+
616
+ ### Agent 2: Code Quality Review
617
+
618
+ Review the same changes for hacky patterns:
619
+
620
+ 1. **Redundant state**: state that duplicates existing state, cached values that could be derived, observers/effects that could be direct calls
621
+ 2. **Parameter sprawl**: adding new parameters to a function instead of generalizing or restructuring existing ones
622
+ 3. **Copy-paste with slight variation**: near-duplicate code blocks that should be unified with a shared abstraction
623
+ 4. **Leaky abstractions**: exposing internal details that should be encapsulated, or breaking existing abstraction boundaries
624
+ 5. **Stringly-typed code**: using raw strings where constants, enums (string unions), or branded types already exist in the codebase
625
+ 6. **Unnecessary JSX nesting**: wrapper Boxes/elements that add no layout value — check if inner component props (flexShrink, alignItems, etc.) already provide the needed behavior
626
+ 7. **Unnecessary comments**: comments explaining WHAT the code does (well-named identifiers already do that), narrating the change, or referencing the task/caller — delete; keep only non-obvious WHY (hidden constraints, subtle invariants, workarounds)
627
+
628
+ ### Agent 3: Efficiency Review
629
+
630
+ Review the same changes for efficiency:
631
+
632
+ 1. **Unnecessary work**: redundant computations, repeated file reads, duplicate network/API calls, N+1 patterns
633
+ 2. **Missed concurrency**: independent operations run sequentially when they could run in parallel
634
+ 3. **Hot-path bloat**: new blocking work added to startup or per-request/per-render hot paths
635
+ 4. **Recurring no-op updates**: state/store updates inside polling loops, intervals, or event handlers that fire unconditionally — add a change-detection guard so downstream consumers aren't notified when nothing changed. Also: if a wrapper function takes an updater/reducer callback, verify it honors same-reference returns (or whatever the "no change" signal is) — otherwise callers' early-return no-ops are silently defeated
636
+ 5. **Unnecessary existence checks**: pre-checking file/resource existence before operating (TOCTOU anti-pattern) — operate directly and handle the error
637
+ 6. **Memory**: unbounded data structures, missing cleanup, event listener leaks
638
+ 7. **Overly broad operations**: reading entire files when only a portion is needed, loading all items when filtering for one
639
+
640
+ ## Phase 3: Fix Issues
641
+
642
+ Wait for all three agents to complete. Aggregate their findings and fix each issue directly. If a finding is a false positive or not worth addressing, note it and move on — do not argue with the finding, just skip it.
643
+
644
+ When done, briefly summarize what was fixed (or confirm the code was already clean).`,
645
+ },
646
+ {
647
+ name: "batch",
648
+ aliases: [],
649
+ description: "Plan a large change, execute in parallel PRs",
650
+ prompt: `# Batch: Parallel Work Orchestration
651
+
652
+ You are orchestrating a large, parallelizable change across this codebase.
653
+
654
+ ## Phase 1: Research
655
+
656
+ Launch one or more subagents using the subagent tool with \`agent: "researcher"\` to deeply research what this instruction touches. You need their results before proceeding, so wait for them to complete. Have them:
657
+
658
+ - Find ALL files, patterns, and call sites that need to change
659
+ - Understand existing conventions so the migration is consistent
660
+ - Quantify the surface area (how many files, how many call sites)
661
+ - Note any risks or complications
662
+
663
+ ## Phase 2: Plan
664
+
665
+ After research completes, call the enter_plan tool to enter plan mode. Using the research findings:
666
+
667
+ 1. **Decompose into independent units.** Break the work into 5–30 self-contained units. Each unit must:
668
+ - Be independently implementable on its own git branch (no shared state with sibling units)
669
+ - Be mergeable on its own without depending on another unit's PR landing first
670
+ - Be roughly uniform in size (split large units, merge trivial ones)
671
+
672
+ Scale the count to the actual work: few files → closer to 5; hundreds of files → closer to 30. Prefer per-directory or per-module slicing over arbitrary file lists.
673
+
674
+ 2. **Determine the test recipe.** Figure out how a worker can verify its change actually works — not just that unit tests pass. Look for:
675
+ - An existing e2e/integration test suite the worker can run
676
+ - A dev-server + curl pattern (for API changes)
677
+ - A CLI verification pattern (for CLI changes)
678
+
679
+ If you cannot find a concrete verification path, ask the user how to verify. Offer 2–3 specific options based on what the researcher found. Do not skip this — the workers cannot ask the user themselves.
680
+
681
+ 3. **Write the plan** to \`.ezcoder/plans/batch.md\` with:
682
+ - Summary of research findings
683
+ - Numbered list of work units — each with: title, file list, one-line description
684
+ - The test recipe (or "skip e2e because …")
685
+ - Note that each worker will use the \`worker\` agent (branch-isolated)
686
+
687
+ 4. Call exit_plan to present the plan for approval.
688
+
689
+ ## Phase 3: Spawn Workers (After Plan Approval)
690
+
691
+ Record the current branch name first: \`git branch --show-current\`.
692
+
693
+ Spawn one subagent per work unit using the subagent tool with \`agent: "worker"\`. **Launch them all in a single message block so they run in parallel.**
694
+
695
+ For each worker, the task must be fully self-contained. Include:
696
+ - The overall goal (the user's instruction)
697
+ - The starting branch to branch from (the branch name you recorded above)
698
+ - This unit's specific task (title, file list, change description — copied verbatim from your plan)
699
+ - Any codebase conventions discovered during research
700
+ - The test recipe from your plan (or "skip e2e because …")
701
+ - These additional instructions, copied verbatim:
702
+
703
+ \`\`\`
704
+ After you finish implementing the change:
705
+ 1. Self-review your diff for code reuse, quality, and efficiency. Search the codebase for existing utilities that could replace new code. Fix any issues found.
706
+ 2. Run the project's test suite (check for package.json scripts, Makefile targets, or common commands like npm test, pnpm test, pytest, go test). If tests fail, fix them.
707
+ 3. Follow the e2e test recipe above. If it says to skip e2e, skip it.
708
+ 4. Commit all changes with a clear message, push the branch, and create a PR with gh pr create. Use a descriptive title.
709
+ 5. Switch back to the original branch with git checkout -.
710
+ 6. End with exactly: PR: <url> or PR: none — <reason>
711
+ \`\`\`
712
+
713
+ ## Phase 4: Track Results
714
+
715
+ After launching all workers, render an initial status table:
716
+
717
+ | # | Unit | Status | PR |
718
+ |---|------|--------|----|
719
+ | 1 | <title> | running | — |
720
+ | 2 | <title> | running | — |
721
+
722
+ As workers complete, parse the \`PR: <url>\` line from each result and re-render the table with updated status (\`done\` / \`failed\`) and PR links. Keep a brief failure note for any worker that did not produce a PR.
723
+
724
+ When all workers have reported, render the final table and a one-line summary (e.g., "22/24 units landed as PRs").`,
469
725
  },
470
726
  {
471
727
  name: "compare",
@@ -488,6 +744,105 @@ Style preferences and subjective improvements are not valid findings. Only repor
488
744
 
489
745
  If the code aligns well with real-world patterns, say so. That's a good outcome.`,
490
746
  },
747
+ {
748
+ name: "setup-skills",
749
+ aliases: [],
750
+ description: "Audit project, recommend skills ranked by impact",
751
+ prompt: `# Skills Audit: Find useful skills for this project
752
+
753
+ Analyze this project and recommend skills from the open ecosystem that would make **working on this project more efficient, easier, and safer**. That is the goal, full stop. Every recommendation must pass the test: does this skill save real time, lower real cognitive load, or prevent real mistakes for someone working on THIS project, repeatedly?
754
+
755
+ Ranked by real impact, not volume.
756
+
757
+ This project could be anything — a web app, a CLI, a mobile app, a game, firmware, a data pipeline, a library, a scientific tool. Do not assume a stack. Let the codebase tell you what it is, then decide what to look for.
758
+
759
+ ## Phase 1: Understand what this project is
760
+
761
+ Read just enough to know what kind of project this is. Look at whichever signals actually apply:
762
+
763
+ - Build / manifest files: \`package.json\`, \`pyproject.toml\`, \`Cargo.toml\`, \`go.mod\`, \`pubspec.yaml\`, \`Podfile\`, Xcode project, Gradle build, \`*.csproj\`, \`CMakeLists.txt\`, Unity/Unreal project files, Makefile — whatever exists.
764
+ - Any README, CLAUDE.md, or AGENTS.md.
765
+ - Top-level directory layout and obvious entry points.
766
+ - Any CI config, lockfile, or config directory that hints at workflow.
767
+
768
+ **Do NOT read source code yet.** You need only a coarse answer to: what kind of project is this, what platform/stack/language, what stage (greenfield vs mature), and what does the surrounding workflow look like (build, test, release, distribute, deploy — whatever applies for THIS project type).
769
+
770
+ ## Phase 2: Decide which domains to investigate
771
+
772
+ Based on Phase 1, pick 4–6 domain slices that represent the **recurring work someone actually does on this project** — not abstract "areas of the codebase," but the real activities that eat time, attention, or trust. Do not use a fixed template. The right domains for a Rust CLI are different from an iOS app, a Unity game, a Django backend, a Kubernetes operator, or an ML notebook.
773
+
774
+ Illustrative only (not prescriptive):
775
+
776
+ - Web app → shipping features, API changes, handling data safely, deploys
777
+ - Mobile app → building screens, store releases, platform quirks, crash & accessibility triage
778
+ - CLI tool → adding commands, packaging & distribution, user-facing UX, error handling
779
+ - Game → adding content, platform ports, perf passes, build pipeline
780
+ - Library → designing public APIs, cutting releases, downstream compatibility, docs/examples
781
+ - Data / ML → running experiments, pipeline orchestration, reproducibility, serving models
782
+ - Embedded → adding peripherals, size/memory passes, flashing, hardware bring-up
783
+
784
+ **Announce your chosen domains to the user in one line before spawning agents**, so they can see what you're looking at (e.g. \`Domains: adding content, platform ports, perf passes, build pipeline\`).
785
+
786
+ ## Phase 3: Parallel sweep
787
+
788
+ Spawn one sub-agent per domain you chose, in parallel using the subagent tool (call it N times in a single response, one task per domain). Each explores its assigned domain and returns skill-worthy opportunities.
789
+
790
+ **Skill-worthy means**: a recurring activity someone will do on THIS project — shipping, reviewing, migrating, debugging, onboarding, whatever applies — where a reusable instruction set would make it **faster** (efficient), **lower-effort** (easier), or **less likely to break something** (safer). The test is: will this skill save real time, reduce real cognitive load, or prevent real mistakes, repeatedly, on this project? If no, drop it. A domain returning zero candidates is a valid outcome.
791
+
792
+ Each sub-agent must return candidates in this exact shape, nothing else:
793
+
794
+ \`\`\`
795
+ [domain] — candidate title
796
+ Why: one sentence on the real friction observed in THIS project
797
+ Search terms: 2–3 keywords the parent should feed to find-skills
798
+ \`\`\`
799
+
800
+ Don't invent. Don't pad.
801
+
802
+ ## Phase 4: Ecosystem search
803
+
804
+ After all sub-agents complete, use the **skill** tool to invoke the \`find-skills\` skill. Feed it the aggregated candidate list with search terms. Let find-skills drive discovery across skills.sh, vercel-labs/agent-skills, and anthropics/skills.
805
+
806
+ For each candidate, record the best 0–1 ecosystem match: skill name, source repo URL. If no fit exists, record "no match". **Do NOT install anything yet.**
807
+
808
+ ## Phase 5: Prioritized recommendation
809
+
810
+ Rank every candidate that returned a real match by **crucial factor** — a 0–100% score combining:
811
+
812
+ - **Frequency** — how often someone will do this work on this project
813
+ - **Lift** — how much the skill makes it faster (efficient), lower-effort (easier), or safer (fewer mistakes, broken builds, bad releases) per hit
814
+ - **Fit** — how well the ecosystem match actually matches this project
815
+
816
+ Present highest first, in this exact format:
817
+
818
+ \`\`\`
819
+ # Skills Audit
820
+
821
+ 1. <skill-name> — 92%
822
+ Benefit: <one sentence on what it does for this project>
823
+ Source: <repo URL>
824
+ Scope: project
825
+
826
+ 2. <skill-name> — 78%
827
+ Benefit: …
828
+ Source: …
829
+ Scope: project
830
+ \`\`\`
831
+
832
+ Cap the list at 8. If you'd list more, you're padding. Default scope is \`project\` per find-skills' rules; only mark \`global\` when the skill is genuinely cross-cutting.
833
+
834
+ If strong candidates had no ecosystem match, list them at the bottom:
835
+
836
+ \`\`\`
837
+ ## Gaps worth authoring
838
+
839
+ - <candidate title> — <why it matters for this project> — consider scaffolding a custom SKILL.md
840
+ \`\`\`
841
+
842
+ ## Phase 6: Wait for the user
843
+
844
+ After presenting the list, ask which (if any) to install. Install nothing without explicit confirmation. Once confirmed, hand off to find-skills to perform the actual install.`,
845
+ },
491
846
  ];
492
847
  /** Look up a prompt command by name or alias */
493
848
  export function getPromptCommand(name) {
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-commands.js","sourceRoot":"","sources":["../../src/core/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2CAA2C;QACxD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAuC2E;KACpF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mHA0EuG;KAChH;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8DAA8D;QAC3E,MAAM,EAAE;;;;;;;;;;;;;;;iFAeqE;KAC9E;IACD;QACE,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kDAAkD;QAC/D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gLA6FoK;KAC7K;CACF,CAAC;AAEF,gDAAgD;AAChD,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACxF,CAAC"}
@@ -7,6 +7,7 @@ declare const SettingsSchema: z.ZodObject<{
7
7
  openai: "openai";
8
8
  glm: "glm";
9
9
  moonshot: "moonshot";
10
+ openrouter: "openrouter";
10
11
  }>>;
11
12
  defaultModel: z.ZodOptional<z.ZodString>;
12
13
  maxTokens: z.ZodDefault<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"settings-manager.d.ts","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC;AAIF,qBAAa,eAAe;IAC1B,OA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QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9E,MAAM,IAAI,QAAQ;CAGnB"}
@@ -5,7 +5,9 @@ import { getAppPaths } from "../config.js";
5
5
  const SettingsSchema = z.object({
6
6
  autoCompact: z.boolean().default(true),
7
7
  compactThreshold: z.number().min(0.1).max(1.0).default(0.8),
8
- defaultProvider: z.enum(["anthropic", "openai", "glm", "moonshot"]).default("anthropic"),
8
+ defaultProvider: z
9
+ .enum(["anthropic", "openai", "glm", "moonshot", "openrouter"])
10
+ .default("anthropic"),
9
11
  defaultModel: z.string().optional(),
10
12
  maxTokens: z.number().int().min(256).default(16384),
11
13
  thinkingEnabled: z.boolean().default(false),
@@ -1 +1 @@
1
- {"version":3,"file":"settings-manager.js","sourceRoot":"","sources":["../../src/core/settings-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,8DAA8D;AAE9D,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC3D,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACxF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAA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I,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CAA2B,GAAM;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,GAAG,CAA2B,GAAM,EAAE,KAAkB;QAC5D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC3B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAenB;AA+BD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAwBjE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAY7D"}
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/core/skills.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAenB;AA6CD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAwBjE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAY7D"}