octocode-cli 1.3.1 → 1.5.0

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 (101) hide show
  1. package/README.md +129 -28
  2. package/out/chunks/chunk-7476PETK.js +309 -0
  3. package/out/chunks/chunk-CVNNNSMQ.js +26 -0
  4. package/out/chunks/chunk-OQBJTZWK.js +60 -0
  5. package/out/chunks/chunk-UCZCF3BQ.js +9 -0
  6. package/out/chunks/command-help-specs-JZXVSLZ5.js +8 -0
  7. package/out/chunks/commands-XBFPLHSQ.js +8 -0
  8. package/out/chunks/help-P7TCOYAJ.js +10 -0
  9. package/out/chunks/main-help-ULF5PAQY.js +10 -0
  10. package/out/chunks/prompts-5E6VKRX5.js +8 -0
  11. package/out/chunks/spinner-URV2OX6O.js +8 -0
  12. package/out/chunks/tool-command-M6VA7P2F.js +8 -0
  13. package/out/octocode-cli.js +1 -1
  14. package/package.json +5 -3
  15. package/skills/README.md +13 -1
  16. package/skills/agentic-flow-best-practices/SKILL.md +280 -0
  17. package/skills/agentic-flow-best-practices/references/agent-collaboration-patterns.md +75 -0
  18. package/skills/agentic-flow-best-practices/references/pr-review-agent-example.md +47 -0
  19. package/skills/agentic-flow-best-practices/references/resources.md +112 -0
  20. package/skills/octocode-chrome-devtools/README.md +541 -0
  21. package/skills/octocode-chrome-devtools/SKILL.md +197 -0
  22. package/skills/octocode-chrome-devtools/agents/openai.yaml +7 -0
  23. package/skills/octocode-chrome-devtools/references/CDP_AGENT_REFERENCE.md +401 -0
  24. package/skills/octocode-chrome-devtools/references/CHROME_FLAGS.md +234 -0
  25. package/skills/octocode-chrome-devtools/references/INTENTS.md +108 -0
  26. package/skills/octocode-chrome-devtools/references/INTENTS_AUTH.md +179 -0
  27. package/skills/octocode-chrome-devtools/references/INTENTS_AUTOMATION.md +214 -0
  28. package/skills/octocode-chrome-devtools/references/INTENTS_DEBUG.md +329 -0
  29. package/skills/octocode-chrome-devtools/references/INTENTS_ENVIRONMENT.md +237 -0
  30. package/skills/octocode-chrome-devtools/references/INTENTS_INSPECT.md +263 -0
  31. package/skills/octocode-chrome-devtools/references/INTENTS_STORAGE_CONSENT.md +214 -0
  32. package/skills/octocode-chrome-devtools/references/RECOVERY.md +39 -0
  33. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS.md +43 -0
  34. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_ASYNC_WORKERS.md +345 -0
  35. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_BROWSER.md +403 -0
  36. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_OBSERVE.md +275 -0
  37. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_SPECIAL.md +18 -0
  38. package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +503 -0
  39. package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +123 -0
  40. package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +81 -0
  41. package/skills/octocode-chrome-devtools/scripts/octocode-chrome-devtools.vpn.example.json +8 -0
  42. package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +362 -0
  43. package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +193 -0
  44. package/skills/octocode-chrome-devtools/scripts/undercover.mjs +226 -0
  45. package/skills/octocode-design/README.md +2 -2
  46. package/skills/octocode-documentation-writer/README.md +1 -1
  47. package/skills/octocode-engineer/README.md +1 -1
  48. package/skills/octocode-engineer/SKILL.md +4 -2
  49. package/skills/octocode-engineer/references/output-files.md +3 -3
  50. package/skills/octocode-engineer/scripts/run.js +136 -136
  51. package/skills/octocode-engineer/src/reporting/summary-md.test.ts +48 -0
  52. package/skills/octocode-engineer/src/reporting/summary-md.ts +43 -2
  53. package/skills/octocode-install/SKILL.md +1 -1
  54. package/skills/octocode-pull-request-reviewer/README.md +5 -5
  55. package/skills/octocode-pull-request-reviewer/SKILL.md +1 -1
  56. package/skills/octocode-research/AGENTS.md +1 -1
  57. package/skills/octocode-research/README.md +2 -2
  58. package/skills/octocode-research/docs/ARCHITECTURE.md +1 -1
  59. package/skills/octocode-research/scripts/server.js +191 -246
  60. package/skills/octocode-research/src/routes/github.ts +4 -21
  61. package/skills/octocode-research/src/routes/local.ts +4 -21
  62. package/skills/octocode-research/src/utils/fileContentTransform.ts +44 -0
  63. package/skills/octocode-search-skill/SKILL.md +245 -229
  64. package/skills/octocode-search-skill/references/agent-skills-guide.md +177 -0
  65. package/skills/octocode-search-skill/references/discovery-surfaces.md +162 -0
  66. package/skills/octocode-search-skill/references/fetch-and-create-locally.md +57 -0
  67. package/skills/octocode-search-skill/references/install-reference.md +130 -0
  68. package/skills/octocode-search-skill/references/references-template.md +27 -0
  69. package/skills/octocode-search-skill/references/references.md +62 -0
  70. package/skills/octocode-slides/README.md +307 -0
  71. package/skills/octocode-slides/SKILL.md +410 -0
  72. package/skills/octocode-slides/references/01-brief.md +156 -0
  73. package/skills/octocode-slides/references/02-research.md +149 -0
  74. package/skills/octocode-slides/references/03-outline.md +172 -0
  75. package/skills/octocode-slides/references/04-design.md +301 -0
  76. package/skills/octocode-slides/references/05-implementation.md +213 -0
  77. package/skills/octocode-slides/references/06-review.md +258 -0
  78. package/skills/octocode-slides/references/animation.md +281 -0
  79. package/skills/octocode-slides/references/design-system.md +316 -0
  80. package/skills/octocode-slides/references/html-templates.md +673 -0
  81. package/skills/octocode-slides/references/image-generation.md +448 -0
  82. package/skills/octocode-slides/references/resources.md +840 -0
  83. package/skills/octocode-slides/references/slide-rules.md +541 -0
  84. package/skills/octocode-slides/references/wireframes.md +727 -0
  85. package/skills/octocode-slides/scripts/animation.js +182 -0
  86. package/skills/octocode-slides/scripts/base.css +353 -0
  87. package/skills/octocode-slides/scripts/base.html +655 -0
  88. package/skills/octocode-slides/scripts/generate_image.py +221 -0
  89. package/skills/octocode-slides/scripts/navbridge.js +79 -0
  90. package/skills/octocode-slides/scripts/presenter.js +316 -0
  91. package/skills/octocode-slides/scripts/slide.html +248 -0
  92. package/skills/octocode-stats/SKILL.md +73 -0
  93. package/skills/octocode-stats/assets/template.html +1332 -0
  94. package/skills/octocode-stats/scripts/build_dashboard.mjs +407 -0
  95. package/out/chunks/chunk-QCY7Q7YW.js +0 -389
  96. package/out/chunks/command-help-specs-CQ3RBLP6.js +0 -8
  97. package/out/chunks/commands-OCTZP2TO.js +0 -51
  98. package/out/chunks/help-XPXP46ZT.js +0 -10
  99. package/out/chunks/main-help-35HX2UDQ.js +0 -10
  100. package/out/chunks/tool-command-HOSMVLNK.js +0 -8
  101. package/skills/octocode-search-skill/INSTALL_REFERENCE.md +0 -112
@@ -0,0 +1,248 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ ╔══════════════════════════════════════════════════════════════════════════╗
4
+ ║ OCTOCODE SLIDES — INDIVIDUAL SLIDE PAGE ║
5
+ ║ Generated from: skills/octocode-slides/scripts/slide.html ║
6
+ ║ ║
7
+ ║ CANONICAL SLIDE SKELETON — a slide uses up to four regions: ║
8
+ ║ ║
9
+ ║ .slide-logo optional · brand mark, anchored top-right ║
10
+ ║ .slide-header optional · .title + .description ║
11
+ ║ .slide-content REQUIRED · smart flex body ║
12
+ ║ .slide-footer optional · source / page / link ║
13
+ ║ ║
14
+ ║ Only .slide-content is required. The skeleton is a contract for ║
15
+ ║ WHERE things go when present, not a recipe for what every slide must ║
16
+ ║ contain. Use only the regions that serve this slide; omit the rest. ║
17
+ ║ ║
18
+ ║ LLM INSTRUCTIONS: ║
19
+ ║ 1. Replace every <!-- LLM: ... --> comment with actual content ║
20
+ ║ 2. Change slide--TYPE on the root .slide div (see types below) ║
21
+ ║ 3. Keep regions this slide needs; delete the rest. Variety is good. ║
22
+ ║ 4. Logo / footer rhythm is usually deck-wide (always-on, always-off, ║
23
+ ║ or always-except-hero). Pick one posture in Phase 4 and stick to it. ║
24
+ ║ 5. Add CDN <script>/<link> tags in <head> only when needed ║
25
+ ║ 6. Remove this comment block before saving the final slide ║
26
+ ║ ║
27
+ ║ SLIDE TYPES: ║
28
+ ║ slide--title slide--agenda slide--section ║
29
+ ║ slide--content slide--two-col slide--quote ║
30
+ ║ slide--code slide--chart slide--timeline ║
31
+ ║ slide--comparison slide--closing slide--markdown-content ║
32
+ ║ slide--stats slide--image ║
33
+ ║ ║
34
+ ║ See references/html-templates.md for the full markup for each type. ║
35
+ ║ See references/wireframes.md to pick a layout from content. ║
36
+ ╚══════════════════════════════════════════════════════════════════════════╝
37
+ -->
38
+ <html lang="en">
39
+ <head>
40
+ <meta charset="UTF-8">
41
+
42
+ <!-- LLM: Set this to the slide heading. Used as tab title in standalone mode. -->
43
+ <title><!-- LLM: Slide title (e.g., "The Problem") --></title>
44
+
45
+ <!-- Always include both CSS files. Paths are relative to slides/ subfolder. -->
46
+ <link rel="stylesheet" href="../css/base.css">
47
+ <link rel="stylesheet" href="../css/theme.css">
48
+
49
+ <!--
50
+ ═══════════════════════════════════════════════════════════════════
51
+ LLM: ADD CDN LIBRARIES HERE — only if this specific slide needs them.
52
+
53
+ highlight.js (code syntax coloring):
54
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/styles/github-dark.min.css">
55
+ <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js"></script>
56
+ Then add at bottom of body: <script>hljs.highlightAll();</script>
57
+
58
+ marked.js (render Markdown content):
59
+ <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
60
+
61
+ Chart.js (bar, line, donut, scatter, radar):
62
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
63
+
64
+ ECharts / uPlot / ApexCharts / D3 / Mermaid / Motion:
65
+ See references/html-templates.md and references/resources.md.
66
+ ═══════════════════════════════════════════════════════════════════
67
+ -->
68
+ </head>
69
+ <body>
70
+
71
+ <!--
72
+ ═══════════════════════════════════════════════════════════════════════════
73
+ SLIDE CONTAINER — change slide--TYPE to the correct type for this slide.
74
+ Each type sets centering, padding, and color treatment via base.css.
75
+ ═══════════════════════════════════════════════════════════════════════════
76
+ -->
77
+ <div class="slide slide--<!-- LLM: TYPE (e.g., content) -->">
78
+
79
+ <!--
80
+ ─── REGION 1 · LOGO (optional) ───
81
+ Brand mark anchored top-right. Decide once for the whole deck whether to
82
+ show a logo on every slide. Mixing some-with, some-without breaks rhythm.
83
+ Delete this header if the deck has no logo.
84
+ -->
85
+ <!--
86
+ <header class="slide-logo">
87
+ <img src="../assets/logo.svg" alt="LLM: Brand name">
88
+ </header>
89
+ -->
90
+
91
+ <!--
92
+ ─── REGION 2 · HEADER (optional) ───
93
+ Title + description, stacked. The description is muted subtitle text and
94
+ is optional — use it to add a "why this matters" line under a claim title.
95
+ Centered slide types (title, section, quote, closing) carry their heading
96
+ here using .display instead of .title.
97
+ Pure-message slides (single quote, single number) can omit this region.
98
+ -->
99
+ <header class="slide-header">
100
+ <!--
101
+ Heading classes:
102
+ .display → large accent display text (title/section/closing slides)
103
+ .title → standard slide heading (content/code/chart/timeline/etc.)
104
+ -->
105
+ <h2 class="title fade-in"><!-- LLM: Slide heading — claim sentence --></h2>
106
+ <!-- description is optional — delete this <p> if not needed -->
107
+ <p class="description"><!-- LLM: One-line description (optional) --></p>
108
+ </header>
109
+
110
+ <!--
111
+ ─── REGION 3 · CONTENT (required) ───
112
+ The body of the slide. Uses flex column by default with vertical gap.
113
+ Add a modifier class when the default flex isn't right:
114
+ slide-content--center → center on both axes (single number, hero block)
115
+ slide-content--middle → vertically center only
116
+ slide-content--row → flex-row (text + image side-by-side)
117
+ slide-content--grid-2 → 2 equal columns
118
+ slide-content--grid-3 → 3 equal columns
119
+
120
+ Common bodies (replace this comment with one of these):
121
+ Bullets:
122
+ <ul class="bullets">
123
+ <li class="slide-up delay-1">{{Point}}</li>
124
+ ...max 4 items
125
+ </ul>
126
+
127
+ Two columns:
128
+ Use slide-content--grid-2 on this <main>, then:
129
+ <div class="col"><h3 class="col-heading">{{Left}}</h3>...</div>
130
+ <div class="col"><h3 class="col-heading">{{Right}}</h3>...</div>
131
+
132
+ Code (with highlight.js):
133
+ <pre class="code-block slide-up delay-1"><code class="language-{{lang}}">
134
+ {{ ≤ 20 lines }}
135
+ </code></pre>
136
+ <p class="code-caption">{{One-line takeaway}}</p>
137
+
138
+ Quote:
139
+ <p class="quote-mark fade-in" aria-hidden="true">"</p>
140
+ <blockquote class="quote-text slide-up">{{quote}}</blockquote>
141
+ <cite class="quote-attr fade-in delay-2">— {{Name}}</cite>
142
+
143
+ KPI grid (1–3 numbers):
144
+ <div class="stat-grid">
145
+ <div class="stat-item"><span class="stat-value">{{N}}</span>
146
+ <span class="stat-label">{{label}}</span></div>
147
+ </div>
148
+
149
+ Chart (HTML+CSS bars — no JS library):
150
+ <div class="bar-chart slide-up" role="img" aria-label="{{description}}">
151
+ <div class="bar-row">
152
+ <span class="bar-label">{{Label}}</span>
153
+ <div class="bar" style="--pct:75%"><span>{{Value}}</span></div>
154
+ </div>
155
+ </div>
156
+ <p class="chart-insight">{{Insight}}</p>
157
+
158
+ Full per-type templates → references/html-templates.md
159
+ -->
160
+ <main class="slide-content">
161
+ <!-- LLM: Replace this comment with the body markup for this slide type -->
162
+ </main>
163
+
164
+ <!--
165
+ ─── REGION 4 · FOOTER (optional) ───
166
+ Source line, page number, link, or attribution. Like the logo, this is
167
+ a deck-wide decision. Include on every slide or none. Footer must not
168
+ introduce new evidence — sources/links/page numbers only.
169
+ Delete this footer if the deck has no footer.
170
+ -->
171
+ <!--
172
+ <footer class="slide-footer">
173
+ <span><!-- LLM: Source or context --></span>
174
+ <span><!-- LLM: Page number or link --></span>
175
+ </footer>
176
+ -->
177
+
178
+ </div><!-- end .slide -->
179
+
180
+
181
+ <!--
182
+ ═══════════════════════════════════════════════════════════════════════════
183
+ SPEAKER NOTES — hidden in the presentation, surfaced by the P key.
184
+ Always include this. Write 2–4 sentences the presenter would say.
185
+ ═══════════════════════════════════════════════════════════════════════════
186
+ -->
187
+ <aside class="speaker-notes">
188
+ <!-- LLM: Speaker notes go here -->
189
+ </aside>
190
+
191
+
192
+ <!--
193
+ ═══════════════════════════════════════════════════════════════════════════
194
+ CDN LIBRARY INIT SCRIPTS (at end of body)
195
+ Place library initialization scripts here, after slide content.
196
+
197
+ highlight.js (if added in <head>):
198
+ <script>hljs.highlightAll();</script>
199
+
200
+ marked.js (if added in <head>):
201
+ <script>
202
+ marked.setOptions({ breaks: true, gfm: true });
203
+ document.querySelectorAll('[data-md]').forEach(el => {
204
+ el.innerHTML = marked.parse(el.textContent.trim());
205
+ });
206
+ </script>
207
+
208
+ Mermaid.js (if added in <head>):
209
+ <script>mermaid.initialize({ theme: 'dark', startOnLoad: true });</script>
210
+
211
+ Chart.js (if added in <head>):
212
+ <script>
213
+ new Chart(document.getElementById('chart'), {
214
+ type: 'bar',
215
+ data: { labels: [...], datasets: [{ data: [...],
216
+ backgroundColor: getComputedStyle(document.documentElement)
217
+ .getPropertyValue('--accent').trim() }] },
218
+ options: { responsive: false, animation: { duration: 800 },
219
+ plugins: { legend: { display: false } } }
220
+ });
221
+ </script>
222
+
223
+ Motion animation (use type="module"):
224
+ <script type="module">
225
+ import { animate, stagger, timeline } from "https://cdn.jsdelivr.net/npm/motion@latest/+esm";
226
+ if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
227
+ animate('.bullets li, .agenda-list li, .stat-item, .tl-item',
228
+ { opacity: [0,1], y: [16,0] },
229
+ { delay: stagger(0.12), duration: 0.45, easing: [0.22,1,0.36,1] });
230
+ }
231
+ </script>
232
+
233
+ LLM: Only keep the script blocks this slide actually uses. Delete the rest.
234
+ ═══════════════════════════════════════════════════════════════════════════
235
+ -->
236
+
237
+ <!-- LLM: Put CDN init scripts here if needed. Delete this comment otherwise. -->
238
+
239
+
240
+ <!--
241
+ NAVBRIDGE — keeps arrow-key navigation working when the iframe has focus.
242
+ Forwards key events to the parent index.html via postMessage.
243
+ Path is one level up from slides/ — keep this path unchanged.
244
+ -->
245
+ <script src="../js/navbridge.js"></script>
246
+
247
+ </body>
248
+ </html>
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: octocode-stats
3
+ description: Render an Octocode MCP usage dashboard from `${OCTOCODE_HOME}/stats.json` or `~/.octocode/stats.json`. Use when the user asks to show Octocode stats, usage, tokens/chars saved, cache hits, errors, rate limits, or visualize `stats.json`.
4
+ ---
5
+
6
+ # Octocode Stats Dashboard
7
+
8
+ Generate a local HTML dashboard from Octocode usage stats. The build script owns all parsing, calculations, rendering, and browser-opening behavior; do not reimplement those calculations in chat or another script.
9
+
10
+ ## When to Activate
11
+
12
+ Use this skill when the user asks to:
13
+
14
+ - Show Octocode stats, usage, dashboard, or report
15
+ - Check tokens/chars saved
16
+ - Inspect tool response savings
17
+ - Inspect GitHub cache hits or avoided rate limits
18
+ - Compare raw GitHub/package payload size with the final tool response sent back
19
+ - Review errors, rate limits, or package registry failures
20
+ - Render `stats.json` or data under `~/.octocode/`
21
+
22
+ Do not use it for session ID lookup, credentials, or unrelated configuration files.
23
+
24
+ ## Workflow
25
+
26
+ 1. Resolve the stats file:
27
+ - `${OCTOCODE_HOME}/stats.json` when `OCTOCODE_HOME` is set
28
+ - `~/.octocode/stats.json` otherwise
29
+ - A user-provided path via `--stats <path>` when explicitly requested
30
+
31
+ 2. If the stats file is missing, say:
32
+ `No stats yet — run any Octocode MCP tool first, then re-run this skill.`
33
+
34
+ 3. Run the dashboard builder from the repo root:
35
+
36
+ ```bash
37
+ node skills/octocode-stats/scripts/build_dashboard.mjs
38
+ ```
39
+
40
+ Common flags:
41
+
42
+ - `--stats <path>`: read a non-default stats file
43
+ - `--output <path>`: write the dashboard somewhere else
44
+ - `--no-open`: generate without opening the browser
45
+ - `--allow-empty`: render an empty-state dashboard even when stats are missing
46
+ - `--help`: print script usage
47
+
48
+ 4. Report only the useful result:
49
+ - Dashboard path
50
+ - Stats source path
51
+ - Total tool calls
52
+ - Estimated tokens saved
53
+ - GitHub cache hits
54
+ - Errors
55
+
56
+ If the browser did not open, include a manual `open <dashboard-path>` command on macOS.
57
+
58
+ ## Measurement Notes
59
+
60
+ - Token counts are estimates: `estimatedTokensSaved = savedChars / 4`. Always describe them as approximate.
61
+ - `charsSavedByTool` is cumulative response-savings data, not a recent activity log and not a complete per-tool call ledger.
62
+ - Tool response savings may exclude zero-savings tools from visual breakdowns, while total measured calls can still include those calls.
63
+ - `rawChars`, `responseChars`, and `savedChars` are measurements from the response pipeline, not a perfect partition where `raw = response + saved`.
64
+ - `responseChars` is the final tool response after output pagination; `rawChars` counts upstream API/command/file payloads that were actually fetched or read.
65
+ - For paginated upstream APIs, only pages that were actually requested are counted. Later pages appear in stats when those tool calls run.
66
+ - Avoid invented comparisons like pages, words, books, or money unless the script explicitly computes them.
67
+
68
+ ## References
69
+
70
+ - Schema: [packages/octocode-shared/src/session/schemas.ts](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-shared/src/session/schemas.ts)
71
+ - Stats path: [packages/octocode-shared/src/paths.ts](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-shared/src/paths.ts)
72
+ - Session docs: [docs/SESSION_PERSISTENCE.md](https://github.com/bgauryy/octocode-mcp/blob/main/docs/dev/architecture/SESSION_PERSISTENCE.md)
73
+ - Config: [docs/CONFIGURATION_REFERENCE.md](https://github.com/bgauryy/octocode-mcp/blob/main/docs/configuration/CONFIGURATION_REFERENCE.md)