opencodekit 0.15.18 → 0.15.20

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 (26) hide show
  1. package/dist/index.js +16 -16
  2. package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +32 -0
  3. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +14 -0
  4. package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +63 -0
  5. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +61 -0
  6. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +66 -0
  7. package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +48 -0
  8. package/dist/template/.opencode/memory/research/context-management-analysis.md +685 -0
  9. package/dist/template/.opencode/opencode.json +52 -156
  10. package/dist/template/.opencode/package.json +1 -1
  11. package/dist/template/.opencode/plugins/copilot-auth.ts +286 -29
  12. package/dist/template/.opencode/plugins/sdk/copilot/chat/convert-to-openai-compatible-chat-messages.ts +181 -0
  13. package/dist/template/.opencode/plugins/sdk/copilot/chat/get-response-metadata.ts +15 -0
  14. package/dist/template/.opencode/plugins/sdk/copilot/chat/map-openai-compatible-finish-reason.ts +19 -0
  15. package/dist/template/.opencode/plugins/sdk/copilot/chat/openai-compatible-api-types.ts +72 -0
  16. package/dist/template/.opencode/plugins/sdk/copilot/chat/openai-compatible-chat-language-model.ts +823 -0
  17. package/dist/template/.opencode/plugins/sdk/copilot/chat/openai-compatible-chat-options.ts +30 -0
  18. package/dist/template/.opencode/plugins/sdk/copilot/chat/openai-compatible-metadata-extractor.ts +48 -0
  19. package/dist/template/.opencode/plugins/sdk/copilot/chat/openai-compatible-prepare-tools.ts +92 -0
  20. package/dist/template/.opencode/plugins/sdk/copilot/copilot-provider.ts +94 -0
  21. package/dist/template/.opencode/plugins/sdk/copilot/index.ts +5 -0
  22. package/dist/template/.opencode/plugins/sdk/copilot/openai-compatible-error.ts +30 -0
  23. package/dist/template/.opencode/skills/notebooklm/SKILL.md +272 -0
  24. package/dist/template/.opencode/skills/notebooklm/references/setup.md +353 -0
  25. package/dist/template/.opencode/tools/notebooklm.ts +488 -0
  26. package/package.json +1 -1
@@ -0,0 +1,353 @@
1
+ # NotebookLM Skill Setup Guide
2
+
3
+ Complete setup instructions for the NotebookLM skill integration.
4
+
5
+ ## Prerequisites
6
+
7
+ ### 1. Python 3.10+
8
+
9
+ Check if Python is installed:
10
+
11
+ ```bash
12
+ python --version
13
+ # or
14
+ python3 --version
15
+ ```
16
+
17
+ **Install if missing:**
18
+
19
+ **macOS (using Homebrew):**
20
+
21
+ ```bash
22
+ brew install python@3.11
23
+ ```
24
+
25
+ **Ubuntu/Debian:**
26
+
27
+ ```bash
28
+ sudo apt update
29
+ sudo apt install python3 python3-pip python3-venv
30
+ ```
31
+
32
+ **Windows:**
33
+ Download from [python.org](https://python.org) and install with "Add to PATH" checked.
34
+
35
+ ### 2. Google Chrome
36
+
37
+ Check if Chrome is installed:
38
+
39
+ **macOS:**
40
+
41
+ ```bash
42
+ ls /Applications/Google\ Chrome.app
43
+ ```
44
+
45
+ **Linux:**
46
+
47
+ ```bash
48
+ which google-chrome
49
+ ```
50
+
51
+ **Windows:**
52
+ Check Start Menu for Google Chrome.
53
+
54
+ **Install if missing:**
55
+ Download from [google.com/chrome](https://google.com/chrome)
56
+
57
+ ### 3. NotebookLM Account
58
+
59
+ 1. Visit [notebooklm.google.com](https://notebooklm.google.com)
60
+ 2. Sign in with Google account
61
+ 3. Upload documents to create notebooks
62
+
63
+ ## First-Time Setup
64
+
65
+ ### Step 1: Verify Tool Installation
66
+
67
+ The tool auto-installs the Python skill on first use. Verify it's working:
68
+
69
+ ```typescript
70
+ const setup = await notebooklm({ operation: "setup" });
71
+ console.log(setup.output);
72
+ ```
73
+
74
+ Expected output:
75
+
76
+ ```
77
+ 📦 NotebookLM skill not found. Installing...
78
+ Cloning from https://github.com/PleasePrompto/notebooklm-skill...
79
+ ✓ Skill installed successfully
80
+ 📍 Location: ~/.opencode/skills/notebooklm
81
+ ```
82
+
83
+ ### Step 2: Authenticate with Google
84
+
85
+ **CRITICAL:** Browser must be visible for manual login.
86
+
87
+ ```typescript
88
+ await notebooklm({
89
+ operation: "auth",
90
+ subOperation: "setup",
91
+ showBrowser: true,
92
+ });
93
+ ```
94
+
95
+ **What happens:**
96
+
97
+ 1. Browser window opens automatically
98
+ 2. Navigate to notebooklm.google.com
99
+ 3. **You must manually log in** to your Google account
100
+ 4. Authentication state is saved for future use
101
+
102
+ **Authentication lasts:** ~7 days (then requires re-auth)
103
+
104
+ ### Step 3: Verify Authentication
105
+
106
+ ```typescript
107
+ const status = await notebooklm({
108
+ operation: "auth",
109
+ subOperation: "status",
110
+ });
111
+
112
+ console.log(status.output);
113
+ ```
114
+
115
+ Expected output:
116
+
117
+ ```
118
+ 🔐 Authentication Status:
119
+ Authenticated: Yes
120
+ State age: 0.5 hours
121
+ Last auth: 2025-01-30 14:32:15
122
+ ```
123
+
124
+ ## Adding Notebooks
125
+
126
+ ### Method 1: Smart Discovery (Recommended)
127
+
128
+ If you don't know the notebook content:
129
+
130
+ ```typescript
131
+ // Step 1: Query to discover content
132
+ const discovery = await notebooklm({
133
+ operation: "query",
134
+ question:
135
+ "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely",
136
+ notebookUrl: "https://notebooklm.google.com/notebook/abc123...",
137
+ });
138
+
139
+ // Step 2: Add with discovered info
140
+ await notebooklm({
141
+ operation: "library",
142
+ subOperation: "add",
143
+ url: "https://notebooklm.google.com/notebook/abc123...",
144
+ name: "API Documentation",
145
+ description: "REST API reference with authentication examples",
146
+ topics: ["api", "rest", "authentication"],
147
+ });
148
+ ```
149
+
150
+ ### Method 2: Manual Entry
151
+
152
+ If you already know the details:
153
+
154
+ ```typescript
155
+ await notebooklm({
156
+ operation: "library",
157
+ subOperation: "add",
158
+ url: "https://notebooklm.google.com/notebook/abc123...",
159
+ name: "Project Documentation",
160
+ description: "Architecture and design decisions",
161
+ topics: ["architecture", "design", "documentation"],
162
+ });
163
+ ```
164
+
165
+ ## Usage Examples
166
+
167
+ ### Query Active Notebook
168
+
169
+ ```typescript
170
+ // Set active notebook first
171
+ await notebooklm({
172
+ operation: "library",
173
+ subOperation: "activate",
174
+ notebookId: "api-docs",
175
+ });
176
+
177
+ // Query without specifying notebook
178
+ const answer = await notebooklm({
179
+ operation: "query",
180
+ question: "What are the rate limits?",
181
+ });
182
+
183
+ console.log(answer.output);
184
+ ```
185
+
186
+ ### Query Specific Notebook
187
+
188
+ ```typescript
189
+ const answer = await notebooklm({
190
+ operation: "query",
191
+ question: "What are the rate limits?",
192
+ notebookId: "api-docs",
193
+ });
194
+ ```
195
+
196
+ ### Query by URL
197
+
198
+ ```typescript
199
+ const answer = await notebooklm({
200
+ operation: "query",
201
+ question: "What are the rate limits?",
202
+ notebookUrl: "https://notebooklm.google.com/notebook/abc123...",
203
+ });
204
+ ```
205
+
206
+ ### List All Notebooks
207
+
208
+ ```typescript
209
+ const library = await notebooklm({
210
+ operation: "library",
211
+ subOperation: "list",
212
+ });
213
+
214
+ console.log(library.output);
215
+ ```
216
+
217
+ ### Search Notebooks
218
+
219
+ ```typescript
220
+ const results = await notebooklm({
221
+ operation: "library",
222
+ subOperation: "search",
223
+ query: "authentication",
224
+ });
225
+
226
+ console.log(results.output);
227
+ ```
228
+
229
+ ## Troubleshooting
230
+
231
+ ### "Not authenticated" Error
232
+
233
+ **Cause:** Authentication expired or never completed.
234
+
235
+ **Fix:**
236
+
237
+ ```typescript
238
+ await notebooklm({
239
+ operation: "auth",
240
+ subOperation: "setup",
241
+ showBrowser: true,
242
+ });
243
+ ```
244
+
245
+ ### "ModuleNotFoundError" Error
246
+
247
+ **Cause:** Python dependencies not installed.
248
+
249
+ **Fix:** The tool auto-installs on first use. If it fails:
250
+
251
+ ```bash
252
+ cd ~/.opencode/skills/notebooklm
253
+ python -m venv .venv
254
+ source .venv/bin/activate # Linux/Mac
255
+ # or .venv\Scripts\activate # Windows
256
+ pip install -r requirements.txt
257
+ python -m patchright install chromium
258
+ ```
259
+
260
+ ### "Notebook not found" Error
261
+
262
+ **Cause:** Notebook ID doesn't exist in library.
263
+
264
+ **Fix:**
265
+
266
+ ```typescript
267
+ // List available notebooks
268
+ await notebooklm({ operation: "library", subOperation: "list" });
269
+
270
+ // Or add the notebook first
271
+ await notebooklm({
272
+ operation: "library",
273
+ subOperation: "add",
274
+ url: "...",
275
+ name: "...",
276
+ description: "...",
277
+ topics: ["..."],
278
+ });
279
+ ```
280
+
281
+ ### Rate Limit (50 queries/day)
282
+
283
+ **Cause:** Free Google account limit reached.
284
+
285
+ **Fix:**
286
+
287
+ - Wait 24 hours
288
+ - Use a different Google account
289
+ - Upgrade to Google One AI Premium (if available)
290
+
291
+ ### Browser Not Opening
292
+
293
+ **Cause:** Chrome not found or headless mode enabled.
294
+
295
+ **Fix:**
296
+
297
+ ```typescript
298
+ // Always use showBrowser: true for auth
299
+ await notebooklm({
300
+ operation: "auth",
301
+ subOperation: "setup",
302
+ showBrowser: true, // Required!
303
+ });
304
+ ```
305
+
306
+ ## Data Locations
307
+
308
+ All data stored in `~/.opencode/skills/notebooklm/`:
309
+
310
+ ```
311
+ ~/.opencode/skills/notebooklm/
312
+ ├── data/
313
+ │ ├── library.json # Your notebook library
314
+ │ ├── auth_info.json # Authentication metadata
315
+ │ └── browser_state/ # Browser cookies/session
316
+ │ ├── state.json
317
+ │ └── browser_profile/
318
+ ├── scripts/ # Python automation scripts
319
+ │ ├── run.py # Virtual environment wrapper
320
+ │ ├── ask_question.py # Query interface
321
+ │ ├── notebook_manager.py # Library management
322
+ │ ├── auth_manager.py # Authentication
323
+ │ ├── browser_utils.py # Browser utilities
324
+ │ └── config.py # Configuration
325
+ ├── .venv/ # Python virtual environment
326
+ ├── requirements.txt # Python dependencies
327
+ └── .gitignore # Protects sensitive data
328
+ ```
329
+
330
+ **Security Note:** The `data/` directory contains authentication cookies. Never commit this to git.
331
+
332
+ ## Updating the Skill
333
+
334
+ To update to the latest version:
335
+
336
+ ```bash
337
+ cd ~/.opencode/skills/notebooklm
338
+ git pull origin master
339
+ ```
340
+
341
+ ## Uninstalling
342
+
343
+ To completely remove the skill:
344
+
345
+ ```bash
346
+ rm -rf ~/.opencode/skills/notebooklm
347
+ ```
348
+
349
+ ## Getting Help
350
+
351
+ - **Original Repository:** https://github.com/PleasePrompto/notebooklm-skill
352
+ - **NotebookLM Help:** https://support.google.com/notebooklm
353
+ - **OpenCodeKit Issues:** File an issue in the opencodekit-template repository