@b0tts/template-dev-installer 1.0.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 (34) hide show
  1. package/cli.mjs +129 -0
  2. package/files/.agents/skills/_explain-it-v1-disabled/SKILL.md +86 -0
  3. package/files/.agents/skills/close/SKILL.md +112 -0
  4. package/files/.agents/skills/closev2/REFERENCE.md +194 -0
  5. package/files/.agents/skills/closev2/SKILL.md +84 -0
  6. package/files/.agents/skills/create-nav-guide/SKILL.md +39 -0
  7. package/files/.agents/skills/docs-mcp/SKILL.md +91 -0
  8. package/files/.agents/skills/explain-it-v2/REFERENCE.md +213 -0
  9. package/files/.agents/skills/explain-it-v2/SKILL.md +133 -0
  10. package/files/.agents/skills/grill-me/SKILL.md +10 -0
  11. package/files/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  12. package/files/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +63 -0
  13. package/files/.agents/skills/grill-with-docs/SKILL.md +88 -0
  14. package/files/.agents/skills/handoff/SKILL.md +34 -0
  15. package/files/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  16. package/files/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  17. package/files/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  18. package/files/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  19. package/files/.agents/skills/improve-codebase-architecture/SKILL.md +81 -0
  20. package/files/.agents/skills/karpathy-guidelines/SKILL.md +0 -0
  21. package/files/.agents/skills/regenerate-minecraft-world/SKILL.md +46 -0
  22. package/files/.agents/skills/to-prd/SKILL.md +76 -0
  23. package/files/.agents/skills/tutorial/SKILL.md +43 -0
  24. package/files/.agents/skills/write-a-skill/SKILL.md +117 -0
  25. package/files/.agents/skills/zoom-out/SKILL.md +7 -0
  26. package/files/AGENTS.md +40 -0
  27. package/files/README.md +245 -0
  28. package/files/opencode/opencode.json +178 -0
  29. package/files/opencode/plugins/Notifications.js +66 -0
  30. package/files/opencode/settings.json +1 -0
  31. package/files/pi/extensions/context-tiers.ts +250 -0
  32. package/files/pi/mcp.json +12 -0
  33. package/files/pi/settings.json +13 -0
  34. package/package.json +23 -0
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: write-a-skill
3
+ description: Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
4
+ ---
5
+
6
+ # Writing Skills
7
+
8
+ ## Process
9
+
10
+ 1. **Gather requirements** - ask user about:
11
+ - What task/domain does the skill cover?
12
+ - What specific use cases should it handle?
13
+ - Does it need executable scripts or just instructions?
14
+ - Any reference materials to include?
15
+
16
+ 2. **Draft the skill** - create:
17
+ - SKILL.md with concise instructions
18
+ - Additional reference files if content exceeds 500 lines
19
+ - Utility scripts if deterministic operations needed
20
+
21
+ 3. **Review with user** - present draft and ask:
22
+ - Does this cover your use cases?
23
+ - Anything missing or unclear?
24
+ - Should any section be more/less detailed?
25
+
26
+ ## Skill Structure
27
+
28
+ ```
29
+ skill-name/
30
+ ├── SKILL.md # Main instructions (required)
31
+ ├── REFERENCE.md # Detailed docs (if needed)
32
+ ├── EXAMPLES.md # Usage examples (if needed)
33
+ └── scripts/ # Utility scripts (if needed)
34
+ └── helper.js
35
+ ```
36
+
37
+ ## SKILL.md Template
38
+
39
+ ```md
40
+ ---
41
+ name: skill-name
42
+ description: Brief description of capability. Use when [specific triggers].
43
+ ---
44
+
45
+ # Skill Name
46
+
47
+ ## Quick start
48
+
49
+ [Minimal working example]
50
+
51
+ ## Workflows
52
+
53
+ [Step-by-step processes with checklists for complex tasks]
54
+
55
+ ## Advanced features
56
+
57
+ [Link to separate files: See [REFERENCE.md](REFERENCE.md)]
58
+ ```
59
+
60
+ ## Description Requirements
61
+
62
+ The description is **the only thing your agent sees** when deciding which skill to load. It's surfaced in the system prompt alongside all other installed skills. Your agent reads these descriptions and picks the relevant skill based on the user's request.
63
+
64
+ **Goal**: Give your agent just enough info to know:
65
+
66
+ 1. What capability this skill provides
67
+ 2. When/why to trigger it (specific keywords, contexts, file types)
68
+
69
+ **Format**:
70
+
71
+ - Max 1024 chars
72
+ - Write in third person
73
+ - First sentence: what it does
74
+ - Second sentence: "Use when [specific triggers]"
75
+
76
+ **Good example**:
77
+
78
+ ```
79
+ Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
80
+ ```
81
+
82
+ **Bad example**:
83
+
84
+ ```
85
+ Helps with documents.
86
+ ```
87
+
88
+ The bad example gives your agent no way to distinguish this from other document skills.
89
+
90
+ ## When to Add Scripts
91
+
92
+ Add utility scripts when:
93
+
94
+ - Operation is deterministic (validation, formatting)
95
+ - Same code would be generated repeatedly
96
+ - Errors need explicit handling
97
+
98
+ Scripts save tokens and improve reliability vs generated code.
99
+
100
+ ## When to Split Files
101
+
102
+ Split into separate files when:
103
+
104
+ - SKILL.md exceeds 100 lines
105
+ - Content has distinct domains (finance vs sales schemas)
106
+ - Advanced features are rarely needed
107
+
108
+ ## Review Checklist
109
+
110
+ After drafting, verify:
111
+
112
+ - [ ] Description includes triggers ("Use when...")
113
+ - [ ] SKILL.md under 100 lines
114
+ - [ ] No time-sensitive info
115
+ - [ ] Consistent terminology
116
+ - [ ] Concrete examples included
117
+ - [ ] References one level deep
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: zoom-out
3
+ description: Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ I don't know this area of code well. Go up a layer of abstraction. Give me a map of all the relevant modules and callers, using the project's domain glossary vocabulary.
@@ -0,0 +1,40 @@
1
+ # AGENTS.md
2
+
3
+ This file provides guidance to AI coding agents (Claude Code, Cursor, Copilot, Antigravity, etc.) when working with code in this repository.
4
+
5
+ ### Core Rules
6
+
7
+ - If a task matches a skill, you MUST invoke it
8
+ - Skills are located in `skills/<skill-name>/SKILL.md`
9
+ - Never implement directly if a skill applies
10
+ - Always follow the skill instructions exactly (do not partially apply them)
11
+ - **NEVER attempt to SSH into the VPS.** The VPS is strictly off-limits for direct access. All VPS information is documented in the navigation guides — read those instead.
12
+
13
+ ### Execution Model
14
+
15
+ For every request:
16
+
17
+ 1. Determine if any skill applies (even 1% chance)
18
+ 2. Invoke the appropriate skill using the `skill` tool
19
+ 3. Follow the skill workflow strictly
20
+ 4. Only proceed to implementation after required steps (spec, plan, etc.) are complete
21
+
22
+ ### Navigation Guides
23
+
24
+ Reference documents for configured services and systems (VPS, Docker, Minecraft, Prism, etc.) are stored in `b0ttsagent/NavGuides/`. Each guide has YAML front matter with `name`, `topics` (keywords), and `description` fields. Scan the front matter to find relevant guides when the user asks about anything that might have stored reference material.
25
+
26
+ ### Handoffs
27
+
28
+ Handoff documents are saved to `b0ttsagent/handoffs/<MM-DD-YYYY>/` (date-based folders).
29
+
30
+ ### Anti-Rationalization
31
+
32
+ The following thoughts are incorrect and must be ignored:
33
+
34
+ - "This is too small for a skill"
35
+ - "I can just quickly implement this"
36
+ - "I’ll gather context first"
37
+
38
+ Correct behavior:
39
+
40
+ - Always check for and use skills first
@@ -0,0 +1,245 @@
1
+ # Setup
2
+
3
+ ### Docker
4
+
5
+ **1. Create and start the Docker workspace:**
6
+
7
+ ```bash
8
+ docker run -it \
9
+ --name project_name \
10
+ -v "C:\_Project_Directory:/workspace" \
11
+ -w /workspace \
12
+ -p 58741:58741 \
13
+ -p 2222:22 \
14
+ ghcr.io/anomalyco/opencode
15
+ ```
16
+
17
+ (Flatten that to a single line using an AI chat or Docker Gordon, then run it.)
18
+
19
+ **2. Enter the container:**
20
+
21
+ ```bash
22
+ docker exec -it project_name sh
23
+ ```
24
+
25
+ **2.1 Find your container** (if you forgot the name):
26
+
27
+ ```bash
28
+ docker ps
29
+ ```
30
+
31
+ ### Install Dependencies
32
+
33
+ **1. Node.js:**
34
+
35
+ ```bash
36
+ apk add nodejs npm
37
+ ```
38
+
39
+ **2. Git:**
40
+
41
+ ```bash
42
+ apk add git
43
+ ```
44
+
45
+ ### OpenSSH (Remote Access)
46
+
47
+ **1. Install OpenSSH server:**
48
+
49
+ ```bash
50
+ apk add openssh-server
51
+ ```
52
+
53
+ **2. Generate host keys:**
54
+
55
+ ```bash
56
+ ssh-keygen -A
57
+ ```
58
+
59
+ **3. Enable root login with password — append to `/etc/ssh/sshd_config`:**
60
+
61
+ ```bash
62
+ echo -e "PermitRootLogin yes\nPasswordAuthentication yes" >> /etc/ssh/sshd_config
63
+ ```
64
+
65
+ **4. Set root password:**
66
+
67
+ ```bash
68
+ passwd root
69
+ ```
70
+
71
+ **5. Start SSH server:**
72
+
73
+ ```bash
74
+ /usr/sbin/sshd
75
+ ```
76
+
77
+ ### Auto-Start SSH on Container Restart
78
+
79
+ After completing all setup above (dependencies, OpenSSH, tmux), save the container as an image so SSH auto-starts on future `docker start`:
80
+
81
+ **1. Exit the container:**
82
+
83
+ ```bash
84
+ exit
85
+ ```
86
+
87
+ **2. Save the container as an image:**
88
+
89
+ ```bash
90
+ docker commit project_name project_name-image
91
+ ```
92
+
93
+ **3. Remove the old container:**
94
+
95
+ ```bash
96
+ docker stop project_name && docker rm project_name
97
+ ```
98
+
99
+ **4. Run a new container from the saved image:**
100
+
101
+ ```bash
102
+ docker run -it \
103
+ --name project_name \
104
+ -v "C:\_Project_Directory:/workspace" \
105
+ -w /workspace \
106
+ -p 58741:58741 \
107
+ -p 2222:22 \
108
+ --entrypoint sh \
109
+ project_name-image \
110
+ -c "/usr/sbin/sshd && exec sh"
111
+ ```
112
+
113
+ (Flatten that to a single line using an AI chat or Docker Gordon, then run it.)
114
+
115
+ **Note:** If you install new packages later, re-run step 2 to update the image:
116
+
117
+ ```bash
118
+ docker commit project_name project_name-image
119
+ ```
120
+
121
+ ### tmux + Termius (Persistent Sessions)
122
+
123
+ **1. Install tmux:**
124
+
125
+ ```bash
126
+ apk add tmux
127
+ ```
128
+
129
+ **2. Create a named session:**
130
+
131
+ ```bash
132
+ tmux new-session -d -s main
133
+ ```
134
+
135
+ **3. Auto-attach on login — append to `~/.profile`:**
136
+
137
+ ```bash
138
+ if command -v tmux &>/dev/null && [ -z "$TMUX" ]; then
139
+ tmux attach -t main 2>/dev/null || tmux new -s main
140
+ fi
141
+ ```
142
+
143
+ (Flatten that to a single line using an AI chat or Docker Gordon, then run it.)
144
+
145
+ **4. Connect from Termius (phone):**
146
+
147
+ | Field | Value |
148
+ | -------- | ------------------------ |
149
+ | Host | Your Windows PC local IP |
150
+ | Port | 2222 |
151
+ | User | root |
152
+ | Password | *(the one you set)* |
153
+
154
+ Run `ipconfig` on Windows to find your local IP.
155
+
156
+ **5. Using tmux from phone:**
157
+
158
+ - `tmux ls` — list sessions
159
+ - `tmux attach -t main` — attach to session
160
+ - `Ctrl+B, D` — detach (keeps session running)
161
+
162
+ ### GSD
163
+
164
+ **1. Install GSD:**
165
+
166
+ ```
167
+ npx @opengsd/gsd-core@latest
168
+ ```
169
+
170
+ **2. Install GSD SDK globally**
171
+
172
+ ```
173
+ npm install -g @gsd-build/sdk
174
+ ```
175
+
176
+ **Note:** you can also just ask the model to do it, so you don't have to reinstall every session.
177
+
178
+ **3. Configure model overrides** — paste into `.opencode/opencode.json` under `"agent"`.
179
+ For other override strategies, see `C:\Users\Jonah\.config\opencode\Model Overrides\model-override-strategies.md`.
180
+
181
+ ### opencode MCPs
182
+
183
+ **1. Roblox Studio MCP** (read-only inspector) — browse the live place file from AI. Add to `.opencode/opencode.json`:
184
+
185
+ ```json
186
+ "mcp": {
187
+ "robloxstudio": {
188
+ "type": "local",
189
+ "command": ["npx", "-y", "robloxstudio-mcp-inspector@latest"],
190
+ "enabled": true,
191
+ "timeout": 30000
192
+ }
193
+ }
194
+ ```
195
+
196
+ **1.1 - Requirements:** Enable `HTTP Requests` in Roblox Studio (`File > Game Settings > Security`).
197
+
198
+ **2. Context7 MCP** — Roblox/Luau documentation lookups. Add to `.opencode/opencode.json`:
199
+
200
+ ```json
201
+ "mcp": {
202
+ "context7": {
203
+ "type": "remote",
204
+ "url": "https://mcp.context7.com/mcp",
205
+ "headers": {
206
+ "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
207
+ },
208
+ "enabled": true
209
+ }
210
+ }
211
+ ```
212
+
213
+ Then set the env var: `export CONTEXT7_API_KEY=ctx7sk-...`
214
+
215
+ ### Notifications
216
+
217
+ Push notifications via [ntfy.sh](https://ntfy.sh) when the AI finishes, needs permission, or errors.
218
+
219
+ **1.** Create a `plugins` folder inside `.opencode/` in your project.
220
+
221
+ **2.** Copy `Notifications.js` from `C:\Users\Jonah\.config\opencode\Plugins\Notifications.js` into `.opencode/plugins/`.
222
+
223
+ **3.** Update placeholders in `.opencode/plugins/Notifications.js`:
224
+
225
+ - Replace the ntfy topic URL with your own (get one at [ntfy.sh](https://ntfy.sh)).
226
+ - Replace `project_name` in the title strings.
227
+
228
+ **4.** Subscribe — install the ntfy app ([Android](https://play.google.com/store/apps/details?id=io.heckel.ntfy) / [iOS](https://apps.apple.com/app/ntfy/id1625396347)) and subscribe to your topic.
229
+
230
+ ### Cleanup
231
+
232
+ **Remove a specific project:**
233
+
234
+ ```bash
235
+ docker stop project_name && docker rm project_name
236
+ docker rmi project_name-image
237
+ ```
238
+
239
+ **Remove all unused images and containers:**
240
+
241
+ ```bash
242
+ docker system prune
243
+ ```
244
+
245
+ </instructions>
@@ -0,0 +1,178 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "permission": {
4
+ "read": {
5
+ ".opencode/get-shit-done/*": "allow"
6
+ },
7
+ "external_directory": {
8
+ ".opencode/get-shit-done/*": "allow"
9
+ }
10
+ },
11
+ "provider": {
12
+ "ollama": {
13
+ "models": {
14
+ "qwen2.5:14b-instruct-q5_K_M": {
15
+ "_launch": true,
16
+ "name": "qwen2.5:14b-instruct-q5_K_M"
17
+ }
18
+ },
19
+ "name": "Ollama",
20
+ "npm": "@ai-sdk/openai-compatible",
21
+ "options": {
22
+ "baseURL": "http://127.0.0.1:11434/v1"
23
+ }
24
+ }
25
+ },
26
+ "mcp": {
27
+ "context7": {
28
+ "type": "remote",
29
+ "url": "https://mcp.context7.com/mcp",
30
+ "headers": {
31
+ "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
32
+ },
33
+ "enabled": true
34
+ }
35
+ },
36
+ "agent": {
37
+ "gsd-roadmapper": {
38
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
39
+ "reasoning": "high"
40
+ },
41
+ "gsd-planner": {
42
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
43
+ "reasoning": "high"
44
+ },
45
+ "gsd-plan-checker": {
46
+ "model": "opencode-go/deepseek-v4-pro",
47
+ "reasoning": "max"
48
+ },
49
+ "gsd-code-reviewer": {
50
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
51
+ "reasoning": "high"
52
+ },
53
+ "gsd-verifier": {
54
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
55
+ "reasoning": "high"
56
+ },
57
+ "gsd-debugger": {
58
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
59
+ "reasoning": "high"
60
+ },
61
+ "gsd-eval-planner": {
62
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
63
+ "reasoning": "high"
64
+ },
65
+ "gsd-executor": {
66
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
67
+ "reasoning": "high"
68
+ },
69
+ "gsd-phase-researcher": {
70
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
71
+ "reasoning": "high"
72
+ },
73
+ "gsd-project-researcher": {
74
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
75
+ "reasoning": "high"
76
+ },
77
+ "gsd-code-fixer": {
78
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
79
+ "reasoning": "high"
80
+ },
81
+ "gsd-nyquist-auditor": {
82
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
83
+ "reasoning": "high"
84
+ },
85
+ "gsd-eval-auditor": {
86
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
87
+ "reasoning": "high"
88
+ },
89
+ "gsd-integration-checker": {
90
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
91
+ "reasoning": "high"
92
+ },
93
+ "gsd-security-auditor": {
94
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
95
+ "reasoning": "high"
96
+ },
97
+ "gsd-pattern-mapper": {
98
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
99
+ "reasoning": "high"
100
+ },
101
+ "gsd-doc-synthesizer": {
102
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
103
+ "reasoning": "high"
104
+ },
105
+ "gsd-research-synthesizer": {
106
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
107
+ "reasoning": "high"
108
+ },
109
+ "gsd-codebase-mapper": {
110
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
111
+ "reasoning": "high"
112
+ },
113
+ "gsd-ui-researcher": {
114
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
115
+ "reasoning": "high"
116
+ },
117
+ "gsd-ui-auditor": {
118
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
119
+ "reasoning": "high"
120
+ },
121
+ "gsd-doc-classifier": {
122
+ "model": "deepseek/deepseek-v4-flash",
123
+ "reasoning": "high"
124
+ },
125
+ "gsd-doc-verifier": {
126
+ "model": "deepseek/deepseek-v4-flash",
127
+ "reasoning": "high"
128
+ },
129
+ "gsd-assumptions-analyzer": {
130
+ "model": "opencode-go/deepseek-v4-flash",
131
+ "reasoning": "high"
132
+ },
133
+ "gsd-advisor-researcher": {
134
+ "model": "opencode-go/deepseek-v4-flash",
135
+ "reasoning": "high"
136
+ },
137
+ "gsd-framework-selector": {
138
+ "model": "opencode-go/deepseek-v4-flash",
139
+ "reasoning": "high"
140
+ },
141
+ "gsd-user-profiler": {
142
+ "model": "opencode-go/deepseek-v4-flash",
143
+ "reasoning": "high"
144
+ },
145
+ "gsd-ai-researcher": {
146
+ "model": "opencode-go/deepseek-v4-flash",
147
+ "reasoning": "high"
148
+ },
149
+ "gsd-domain-researcher": {
150
+ "model": "opencode-go/deepseek-v4-flash",
151
+ "reasoning": "high"
152
+ },
153
+ "gsd-doc-writer": {
154
+ "model": "opencode-go/deepseek-v4-flash",
155
+ "reasoning": "high"
156
+ },
157
+ "gsd-ui-checker": {
158
+ "model": "opencode-go/deepseek-v4-flash",
159
+ "reasoning": "high"
160
+ },
161
+ "gsd-debug-session-manager": {
162
+ "model": "opencode-go/deepseek-v4-flash",
163
+ "reasoning": "high"
164
+ },
165
+ "gsd-intel-updater": {
166
+ "model": "opencode-go/deepseek-v4-flash",
167
+ "reasoning": "high"
168
+ },
169
+ "explore": {
170
+ "model": "opencode-go/deepseek-v4-flash",
171
+ "reasoning": "high"
172
+ },
173
+ "general": {
174
+ "model": "xiaomi-token-plan-sgp/mimo-v2.5-pro",
175
+ "reasoning": "high"
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,66 @@
1
+ // ── Notifications Plugin for OpenCode ───────────────────────────────
2
+ // Sends push notifications via ntfy.sh when the AI finishes, needs
3
+ // permission, or encounters errors.
4
+ //
5
+ // SETUP:
6
+ // 1. Get a topic at https://ntfy.sh (or self-host)
7
+ // 2. Update NTFY_CONFIG below with your URL, topic, and auth
8
+ // 3. Subscribe to the topic in the ntfy app (Android / iOS)
9
+ //
10
+ // Replace "project_name" in the event titles with your project name.
11
+ // ────────────────────────────────────────────────────────────────────
12
+
13
+ const USE_SELF_HOSTED = false // set to true if you self-host ntfy
14
+
15
+ const NTFY_CONFIG = {
16
+ self: {
17
+ baseUrl: "https://{YOUR_TAILSCALE_URL}:3000",
18
+ topic: "{YOUR_NTFY_TOPIC}",
19
+ headers: {
20
+ "Authorization": "Basic " + btoa("{YOUR_USER}:{YOUR_PASSWORD}"),
21
+ },
22
+ },
23
+ cloud: {
24
+ baseUrl: "https://ntfy.sh",
25
+ topic: "{YOUR_NTFY_TOPIC}",
26
+ headers: {},
27
+ },
28
+ }
29
+
30
+ export const NotifyPlugin = async () => {
31
+ const config = USE_SELF_HOSTED ? NTFY_CONFIG.self : NTFY_CONFIG.cloud
32
+
33
+ const send = async (title, body, priority = "default", tags = "robot") => {
34
+ try {
35
+ await fetch(`${config.baseUrl}/${config.topic}`, {
36
+ method: "POST",
37
+ body,
38
+ headers: {
39
+ "Title": title,
40
+ "Priority": priority,
41
+ "Tags": tags,
42
+ ...config.headers,
43
+ },
44
+ })
45
+ } catch {}
46
+ }
47
+
48
+ return {
49
+ event: async ({ event }) => {
50
+ switch (event.type) {
51
+ case "session.idle":
52
+ await send("OpenCode - project_name", "Response ready")
53
+ break
54
+ case "session.error":
55
+ await send("OpenCode - project_name", "Session errored", "high", "warning")
56
+ break
57
+ case "permission.asked":
58
+ await send("OpenCode - project_name", "Needs permission", "high", "lock")
59
+ break
60
+ case "question.asked":
61
+ await send("OpenCode - project_name", "Has a question", "high", "question")
62
+ break
63
+ }
64
+ },
65
+ }
66
+ }
@@ -0,0 +1 @@
1
+ {}