@valni/cli-darwin-x64 0.1.2 → 0.1.3

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 (149) hide show
  1. package/LICENSE +1 -2
  2. package/package.json +1 -1
  3. package/runtime/LICENSE +1 -2
  4. package/runtime/examples/extensions/auto-commit-on-exit.ts +6 -6
  5. package/runtime/examples/extensions/bash-spawn-hook.ts +3 -3
  6. package/runtime/examples/extensions/bookmark.ts +5 -5
  7. package/runtime/examples/extensions/border-status-editor.ts +7 -7
  8. package/runtime/examples/extensions/built-in-tool-renderer.ts +6 -6
  9. package/runtime/examples/extensions/claude-rules.ts +4 -4
  10. package/runtime/examples/extensions/commands.ts +5 -5
  11. package/runtime/examples/extensions/confirm-destructive.ts +3 -3
  12. package/runtime/examples/extensions/custom-footer.ts +2 -2
  13. package/runtime/examples/extensions/custom-header.ts +5 -5
  14. package/runtime/examples/extensions/custom-provider-anthropic/index.ts +4 -4
  15. package/runtime/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
  16. package/runtime/examples/extensions/custom-provider-anthropic/package.json +3 -3
  17. package/runtime/examples/extensions/dirty-repo-guard.ts +7 -7
  18. package/runtime/examples/extensions/doom-overlay/doom/build.sh +4 -4
  19. package/runtime/examples/extensions/doom-overlay/doom/{doomgeneric_pi.c → doomgeneric_valni.c} +1 -1
  20. package/runtime/examples/extensions/doom-overlay/index.ts +3 -3
  21. package/runtime/examples/extensions/dynamic-resources/dynamic.json +0 -1
  22. package/runtime/examples/extensions/dynamic-resources/index.ts +2 -4
  23. package/runtime/examples/extensions/dynamic-tools.ts +4 -4
  24. package/runtime/examples/extensions/entry-renderer.ts +6 -6
  25. package/runtime/examples/extensions/event-bus.ts +8 -8
  26. package/runtime/examples/extensions/file-trigger.ts +3 -3
  27. package/runtime/examples/extensions/git-checkpoint.ts +7 -7
  28. package/runtime/examples/extensions/git-merge-and-resolve.ts +14 -14
  29. package/runtime/examples/extensions/github-issue-autocomplete.ts +6 -6
  30. package/runtime/examples/extensions/hello.ts +2 -2
  31. package/runtime/examples/extensions/hidden-thinking-label.ts +4 -4
  32. package/runtime/examples/extensions/inline-bash.ts +5 -5
  33. package/runtime/examples/extensions/input-transform-streaming.ts +5 -5
  34. package/runtime/examples/extensions/input-transform.ts +5 -5
  35. package/runtime/examples/extensions/interactive-shell.ts +3 -3
  36. package/runtime/examples/extensions/mac-system-theme.ts +5 -5
  37. package/runtime/examples/extensions/message-renderer.ts +4 -4
  38. package/runtime/examples/extensions/minimal-mode.ts +9 -9
  39. package/runtime/examples/extensions/modal-editor.ts +3 -3
  40. package/runtime/examples/extensions/model-status.ts +3 -3
  41. package/runtime/examples/extensions/notify.ts +5 -5
  42. package/runtime/examples/extensions/overlay-qa-tests.ts +20 -20
  43. package/runtime/examples/extensions/overlay-test.ts +3 -3
  44. package/runtime/examples/extensions/permission-gate.ts +2 -2
  45. package/runtime/examples/extensions/pirate.ts +4 -4
  46. package/runtime/examples/extensions/plan-mode/index.ts +21 -21
  47. package/runtime/examples/extensions/preset.ts +26 -26
  48. package/runtime/examples/extensions/project-trust.ts +7 -7
  49. package/runtime/examples/extensions/prompt-customizer.ts +3 -3
  50. package/runtime/examples/extensions/protected-paths.ts +2 -2
  51. package/runtime/examples/extensions/provider-payload.ts +3 -3
  52. package/runtime/examples/extensions/question.ts +2 -2
  53. package/runtime/examples/extensions/questionnaire.ts +2 -2
  54. package/runtime/examples/extensions/rainbow-editor.ts +3 -3
  55. package/runtime/examples/extensions/reload-runtime.ts +4 -4
  56. package/runtime/examples/extensions/rpc-demo.ts +10 -10
  57. package/runtime/examples/extensions/sandbox/index.ts +15 -15
  58. package/runtime/examples/extensions/sandbox/package-lock.json +4 -4
  59. package/runtime/examples/extensions/sandbox/package.json +3 -3
  60. package/runtime/examples/extensions/send-user-message.ts +13 -13
  61. package/runtime/examples/extensions/session-name.ts +4 -4
  62. package/runtime/examples/extensions/shutdown-command.ts +10 -10
  63. package/runtime/examples/extensions/snake.ts +3 -3
  64. package/runtime/examples/extensions/space-invaders.ts +3 -3
  65. package/runtime/examples/extensions/ssh.ts +12 -12
  66. package/runtime/examples/extensions/status-line.ts +4 -4
  67. package/runtime/examples/extensions/structured-output.ts +2 -2
  68. package/runtime/examples/extensions/subagent/index.ts +5 -5
  69. package/runtime/examples/extensions/system-prompt-header.ts +3 -3
  70. package/runtime/examples/extensions/tic-tac-toe.ts +15 -15
  71. package/runtime/examples/extensions/timed-confirm.ts +4 -4
  72. package/runtime/examples/extensions/titlebar-spinner.ts +11 -11
  73. package/runtime/examples/extensions/todo.ts +5 -5
  74. package/runtime/examples/extensions/tool-override.ts +5 -5
  75. package/runtime/examples/extensions/tools.ts +10 -10
  76. package/runtime/examples/extensions/trigger-compact.ts +3 -3
  77. package/runtime/examples/extensions/truncated-tool.ts +3 -3
  78. package/runtime/examples/extensions/widget-placement.ts +2 -2
  79. package/runtime/examples/extensions/with-deps/index.ts +2 -2
  80. package/runtime/examples/extensions/with-deps/package-lock.json +4 -4
  81. package/runtime/examples/extensions/with-deps/package.json +3 -3
  82. package/runtime/examples/extensions/working-indicator.ts +7 -7
  83. package/runtime/examples/extensions/working-message-test.ts +3 -3
  84. package/runtime/examples/sdk/01-minimal.ts +1 -1
  85. package/runtime/examples/sdk/03-custom-prompt.ts +1 -1
  86. package/runtime/examples/sdk/04-skills.ts +1 -1
  87. package/runtime/examples/sdk/05-tools.ts +1 -1
  88. package/runtime/examples/sdk/06-extensions.ts +11 -11
  89. package/runtime/examples/sdk/08-prompt-templates.ts +1 -1
  90. package/runtime/export-html/template.js +3 -3
  91. package/runtime/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
  92. package/runtime/package.json +8 -14
  93. package/runtime/theme/dark.json +0 -1
  94. package/runtime/theme/light.json +0 -1
  95. package/runtime/theme/theme-schema.json +2 -2
  96. package/runtime/valni +2 -2
  97. package/runtime/README.md +0 -674
  98. package/runtime/docs/extensions.md +0 -2910
  99. package/runtime/docs/json.md +0 -82
  100. package/runtime/docs/models.md +0 -540
  101. package/runtime/docs/packages.md +0 -228
  102. package/runtime/docs/rpc.md +0 -1480
  103. package/runtime/docs/sdk.md +0 -1183
  104. package/runtime/docs/session-format.md +0 -422
  105. package/runtime/docs/settings.md +0 -315
  106. package/runtime/docs/shell-aliases.md +0 -13
  107. package/runtime/docs/terminal-setup.md +0 -142
  108. package/runtime/docs/termux.md +0 -127
  109. package/runtime/docs/tmux.md +0 -63
  110. package/runtime/docs/tui.md +0 -927
  111. package/runtime/docs/windows.md +0 -17
  112. package/runtime/examples/README.md +0 -25
  113. package/runtime/examples/extensions/README.md +0 -212
  114. package/runtime/examples/extensions/doom-overlay/README.md +0 -46
  115. package/runtime/examples/extensions/dynamic-resources/SKILL.md +0 -8
  116. package/runtime/examples/extensions/dynamic-resources/dynamic.md +0 -5
  117. package/runtime/examples/extensions/gondolin/index.ts +0 -531
  118. package/runtime/examples/extensions/gondolin/package-lock.json +0 -185
  119. package/runtime/examples/extensions/gondolin/package.json +0 -19
  120. package/runtime/examples/extensions/plan-mode/README.md +0 -66
  121. package/runtime/examples/extensions/subagent/README.md +0 -175
  122. package/runtime/examples/extensions/subagent/agents/planner.md +0 -37
  123. package/runtime/examples/extensions/subagent/agents/reviewer.md +0 -35
  124. package/runtime/examples/extensions/subagent/agents/scout.md +0 -50
  125. package/runtime/examples/extensions/subagent/agents/worker.md +0 -24
  126. package/runtime/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
  127. package/runtime/examples/extensions/subagent/prompts/implement.md +0 -10
  128. package/runtime/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
  129. package/runtime/examples/sdk/README.md +0 -140
  130. package/runtime/node_modules/@mariozechner/clipboard/.yarnrc.yml +0 -1
  131. package/runtime/node_modules/@mariozechner/clipboard/Cargo.toml +0 -45
  132. package/runtime/node_modules/@mariozechner/clipboard/README.md +0 -60
  133. package/runtime/node_modules/@mariozechner/clipboard/build.rs +0 -5
  134. package/runtime/node_modules/@mariozechner/clipboard/clipboard.darwin-x64.node +0 -0
  135. package/runtime/node_modules/@mariozechner/clipboard/exp.ts +0 -12
  136. package/runtime/node_modules/@mariozechner/clipboard/index.js +0 -606
  137. package/runtime/node_modules/@mariozechner/clipboard/package.json +0 -56
  138. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/common.rs +0 -307
  139. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/mod.rs +0 -93
  140. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/ios.rs +0 -313
  141. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/macos.rs +0 -471
  142. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/mod.rs +0 -252
  143. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/wayland.rs +0 -431
  144. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/win.rs +0 -712
  145. package/runtime/node_modules/@mariozechner/clipboard/src/clipboard_rs/platform/x11.rs +0 -916
  146. package/runtime/node_modules/@mariozechner/clipboard/src/lib.rs +0 -194
  147. package/runtime/node_modules/@mariozechner/clipboard-darwin-x64/README.md +0 -3
  148. package/runtime/node_modules/@mariozechner/clipboard-darwin-x64/clipboard.darwin-x64.node +0 -0
  149. package/runtime/node_modules/@mariozechner/clipboard-darwin-x64/package.json +0 -22
@@ -1,17 +0,0 @@
1
- # Windows Setup
2
-
3
- Pi requires a bash shell on Windows. Checked locations (in order):
4
-
5
- 1. Custom path from `~/.valni/agent/settings.json`
6
- 2. Git Bash (`C:\Program Files\Git\bin\bash.exe`, or `C:\Program Files (x86)\Git\bin\bash.exe` for a 32-bit install)
7
- 3. `bash.exe` on PATH (Cygwin, MSYS2, WSL)
8
-
9
- For most users, [Git for Windows](https://git-scm.com/download/win) is sufficient.
10
-
11
- ## Custom Shell Path
12
-
13
- ```json
14
- {
15
- "shellPath": "C:\\cygwin64\\bin\\bash.exe"
16
- }
17
- ```
@@ -1,25 +0,0 @@
1
- # Examples
2
-
3
- Example code for pi-coding-agent SDK and extensions.
4
-
5
- ## Directories
6
-
7
- ### [sdk/](sdk/)
8
- Programmatic usage via `createAgentSession()`. Shows how to customize models, prompts, tools, extensions, and session management.
9
-
10
- ### [extensions/](extensions/)
11
- Example extensions demonstrating:
12
- - Lifecycle event handlers (tool interception, safety gates, context modifications)
13
- - Custom tools (todo lists, questions, subagents, output truncation)
14
- - Commands and keyboard shortcuts
15
- - Custom UI (footers, headers, editors, overlays)
16
- - Git integration (checkpoints, auto-commit)
17
- - System prompt modifications and custom compaction
18
- - External integrations (SSH, file watchers, system theme sync)
19
- - Custom providers (Anthropic with custom streaming, GitLab Duo)
20
-
21
- ## Documentation
22
-
23
- - [SDK Reference](sdk/README.md)
24
- - [Extensions Documentation](../docs/extensions.md)
25
- - [Skills Documentation](../docs/skills.md)
@@ -1,212 +0,0 @@
1
- # Extension Examples
2
-
3
- Example extensions for pi-coding-agent.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- # Load an extension with --extension flag
9
- pi --extension examples/extensions/permission-gate.ts
10
-
11
- # Or copy to extensions directory for auto-discovery
12
- cp permission-gate.ts ~/.valni/agent/extensions/
13
- ```
14
-
15
- ## Examples
16
-
17
- ### Lifecycle & Safety
18
-
19
- | Extension | Description |
20
- |-----------|-------------|
21
- | `permission-gate.ts` | Prompts for confirmation before dangerous bash commands (rm -rf, sudo, etc.) |
22
- | `project-trust.ts` | Demonstrates the `project_trust` event for user/global and CLI extensions |
23
- | `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
24
- | `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
25
- | `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
26
- | `sandbox/` | OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config |
27
- | `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
28
-
29
- ### Custom Tools
30
-
31
- | Extension | Description |
32
- |-----------|-------------|
33
- | `todo.ts` | Todo list tool + `/todos` command with custom rendering and state persistence |
34
- | `hello.ts` | Minimal custom tool example |
35
- | `question.ts` | Demonstrates `ctx.ui.select()` for asking the user questions with custom UI |
36
- | `questionnaire.ts` | Multi-question input with tab bar navigation between questions |
37
- | `tool-override.ts` | Override built-in tools (e.g., add logging/access control to `read`) |
38
- | `dynamic-tools.ts` | Register tools after startup (`session_start`) and at runtime via command, with prompt snippets and tool-specific prompt guidelines |
39
- | `kimi-deferred-tools.ts` | Search for and progressively activate tools for Kimi's deferred-tool loading protocol |
40
- | `structured-output.ts` | Final structured-output tool that returns `terminate: true` so the agent can end on the tool call |
41
- | `built-in-tool-renderer.ts` | Custom compact rendering for built-in tools (read, bash, edit, write) while keeping original behavior |
42
- | `minimal-mode.ts` | Override built-in tool rendering for minimal display (only tool calls, no output in collapsed mode) |
43
- | `truncated-tool.ts` | Wraps ripgrep with proper output truncation (50KB/2000 lines) |
44
- | `ssh.ts` | Delegate all tools to a remote machine via SSH using pluggable operations |
45
- | `subagent/` | Delegate tasks to specialized subagents with isolated context windows |
46
-
47
- ### Commands & UI
48
-
49
- | Extension | Description |
50
- |-----------|-------------|
51
- | `preset.ts` | Named presets for model, thinking level, tools, and instructions via `--preset` flag and `/preset` command |
52
- | `plan-mode/` | Claude Code-style plan mode for read-only exploration with `/plan` command and step tracking |
53
- | `tools.ts` | Interactive `/tools` command to enable/disable tools with session persistence |
54
- | `handoff.ts` | Transfer context to a new focused session via `/handoff <goal>` |
55
- | `qna.ts` | Extracts questions from last response into editor via `ctx.ui.setEditorText()` |
56
- | `status-line.ts` | Shows turn progress in footer via `ctx.ui.setStatus()` with themed colors |
57
- | `github-issue-autocomplete.ts` | Adds `#1234` issue completions by stacking a custom autocomplete provider that preloads open issues from `gh issue list` |
58
- | `widget-placement.ts` | Shows widgets above and below the editor via `ctx.ui.setWidget()` placement |
59
- | `hidden-thinking-label.ts` | Customizes the collapsed thinking label via `ctx.ui.setHiddenThinkingLabel()` |
60
- | `working-indicator.ts` | Customizes the streaming working indicator via `ctx.ui.setWorkingIndicator()` |
61
- | `model-status.ts` | Shows model changes in status bar via `model_select` hook |
62
- | `snake.ts` | Snake game with custom UI, keyboard handling, and session persistence |
63
- | `tic-tac-toe.ts` | Tic-tac-toe vs the agent with `executionMode: "sequential"` tools to prevent race conditions on shared cursor state |
64
- | `send-user-message.ts` | Demonstrates `pi.sendUserMessage()` for sending user messages from extensions |
65
- | `timed-confirm.ts` | Demonstrates AbortSignal for auto-dismissing `ctx.ui.confirm()` and `ctx.ui.select()` dialogs |
66
- | `rpc-demo.ts` | Exercises all RPC-supported extension UI methods; pair with [`examples/rpc-extension-ui.ts`](../rpc-extension-ui.ts) |
67
- | `modal-editor.ts` | Custom vim-like modal editor via `ctx.ui.setEditorComponent()` |
68
- | `rainbow-editor.ts` | Animated rainbow text effect via custom editor |
69
- | `notify.ts` | Desktop notifications via OSC 777 when agent finishes (Ghostty, iTerm2, WezTerm) |
70
- | `titlebar-spinner.ts` | Braille spinner animation in terminal title while the agent is working |
71
- | `summarize.ts` | Summarize conversation with GPT-5.2 and show in transient UI |
72
- | `custom-footer.ts` | Custom footer with git branch and token stats via `ctx.ui.setFooter()` |
73
- | `custom-header.ts` | Custom header via `ctx.ui.setHeader()` |
74
- | `overlay-test.ts` | Test overlay compositing with inline text inputs and edge cases |
75
- | `overlay-qa-tests.ts` | Comprehensive overlay QA tests: anchors, margins, stacking, overflow, animation |
76
- | `doom-overlay/` | DOOM game running as an overlay at 35 FPS (demonstrates real-time game rendering) |
77
- | `shutdown-command.ts` | Adds `/quit` command demonstrating `ctx.shutdown()` |
78
- | `reload-runtime.ts` | Adds `/reload-runtime` and `reload_runtime` tool showing safe reload flow |
79
- | `interactive-shell.ts` | Run interactive commands (vim, htop) with full terminal via `user_bash` hook |
80
- | `inline-bash.ts` | Expands `!{command}` patterns in prompts via `input` event transformation |
81
- | `input-transform-streaming.ts` | Skips expensive input preprocessing for mid-stream steering via `streamingBehavior` |
82
-
83
- ### Git Integration
84
-
85
- | Extension | Description |
86
- |-----------|-------------|
87
- | `git-checkpoint.ts` | Creates git stash checkpoints at each turn for code restoration on fork |
88
- | `auto-commit-on-exit.ts` | Auto-commits on exit using last assistant message for commit message |
89
-
90
- ### System Prompt & Compaction
91
-
92
- | Extension | Description |
93
- |-----------|-------------|
94
- | `pirate.ts` | Demonstrates `systemPromptAppend` to dynamically modify system prompt |
95
- | `claude-rules.ts` | Scans `.claude/rules/` folder and lists rules in system prompt |
96
- | `custom-compaction.ts` | Custom compaction that summarizes entire conversation |
97
- | `trigger-compact.ts` | Triggers compaction when context usage exceeds 100k tokens and adds `/trigger-compact` command |
98
-
99
- ### System Integration
100
-
101
- | Extension | Description |
102
- |-----------|-------------|
103
- | `mac-system-theme.ts` | Syncs pi theme with macOS dark/light mode |
104
-
105
- ### Resources
106
-
107
- | Extension | Description |
108
- |-----------|-------------|
109
- | `dynamic-resources/` | Loads skills, prompts, and themes using `resources_discover` |
110
-
111
- ### Messages & Communication
112
-
113
- | Extension | Description |
114
- |-----------|-------------|
115
- | `message-renderer.ts` | Custom message rendering with colors and expandable details via `registerMessageRenderer` |
116
- | `entry-renderer.ts` | TUI-only session entry rendering via `appendEntry` and `registerEntryRenderer` |
117
- | `event-bus.ts` | Inter-extension communication via `pi.events` |
118
-
119
- ### Session Metadata
120
-
121
- | Extension | Description |
122
- |-----------|-------------|
123
- | `session-name.ts` | Name sessions for the session selector via `setSessionName` |
124
- | `bookmark.ts` | Bookmark entries with labels for `/tree` navigation via `setLabel` |
125
-
126
- ### Custom Providers
127
-
128
- | Extension | Description |
129
- |-----------|-------------|
130
- | `custom-provider-anthropic/` | Custom Anthropic provider with OAuth support and custom streaming implementation |
131
-
132
- ### External Dependencies
133
-
134
- | Extension | Description |
135
- |-----------|-------------|
136
- | `with-deps/` | Extension with its own package.json and dependencies (demonstrates jiti module resolution) |
137
- | `file-trigger.ts` | Watches a trigger file and injects contents into conversation |
138
-
139
- ## Writing Extensions
140
-
141
- See [docs/extensions.md](../../docs/extensions.md) for full documentation.
142
-
143
- ```typescript
144
- import type { ExtensionAPI } from "@valni/cli";
145
- import { Type } from "typebox";
146
-
147
- export default function (pi: ExtensionAPI) {
148
- // Subscribe to lifecycle events
149
- pi.on("tool_call", async (event, ctx) => {
150
- if (event.toolName === "bash" && event.input.command?.includes("rm -rf")) {
151
- const ok = await ctx.ui.confirm("Dangerous!", "Allow rm -rf?");
152
- if (!ok) return { block: true, reason: "Blocked by user" };
153
- }
154
- });
155
-
156
- // Register custom tools
157
- pi.registerTool({
158
- name: "greet",
159
- label: "Greeting",
160
- description: "Generate a greeting",
161
- parameters: Type.Object({
162
- name: Type.String({ description: "Name to greet" }),
163
- }),
164
- async execute(toolCallId, params, onUpdate, ctx, signal) {
165
- return {
166
- content: [{ type: "text", text: `Hello, ${params.name}!` }],
167
- details: {},
168
- };
169
- },
170
- });
171
-
172
- // Register commands
173
- pi.registerCommand("hello", {
174
- description: "Say hello",
175
- handler: async (args, ctx) => {
176
- ctx.ui.notify("Hello!", "info");
177
- },
178
- });
179
- }
180
- ```
181
-
182
- ## Key Patterns
183
-
184
- **Use StringEnum for string parameters** (required for Google API compatibility):
185
- ```typescript
186
- import { StringEnum } from "@valni/ai";
187
-
188
- // Good
189
- action: StringEnum(["list", "add"] as const)
190
-
191
- // Bad - doesn't work with Google
192
- action: Type.Union([Type.Literal("list"), Type.Literal("add")])
193
- ```
194
-
195
- **State persistence via details:**
196
- ```typescript
197
- // Store state in tool result details for proper forking support
198
- return {
199
- content: [{ type: "text", text: "Done" }],
200
- details: { todos: [...todos], nextId }, // Persisted in session
201
- };
202
-
203
- // Reconstruct on session events
204
- pi.on("session_start", async (_event, ctx) => {
205
- for (const entry of ctx.sessionManager.getBranch()) {
206
- if (entry.type === "message" && entry.message.toolName === "my_tool") {
207
- const details = entry.message.details;
208
- // Reconstruct state from details
209
- }
210
- }
211
- });
212
- ```
@@ -1,46 +0,0 @@
1
- # DOOM Overlay Demo
2
-
3
- Play DOOM as an overlay in pi. Demonstrates that the overlay system can handle real-time game rendering at 35 FPS.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- pi --extension ./examples/extensions/doom-overlay
9
- ```
10
-
11
- Then run:
12
- ```
13
- /doom-overlay
14
- ```
15
-
16
- The shareware WAD file (~4MB) is auto-downloaded on first run.
17
-
18
- ## Controls
19
-
20
- | Action | Keys |
21
- |--------|------|
22
- | Move | WASD or Arrow Keys |
23
- | Run | Shift + WASD |
24
- | Fire | F or Ctrl |
25
- | Use/Open | Space |
26
- | Weapons | 1-7 |
27
- | Map | Tab |
28
- | Menu | Escape |
29
- | Pause/Quit | Q |
30
-
31
- ## How It Works
32
-
33
- DOOM runs as WebAssembly compiled from [doomgeneric](https://github.com/ozkl/doomgeneric). Each frame is rendered using half-block characters (▀) with 24-bit color, where the top pixel is the foreground color and the bottom pixel is the background color.
34
-
35
- The overlay uses:
36
- - `width: "90%"` - 90% of terminal width
37
- - `maxHeight: "80%"` - Maximum 80% of terminal height
38
- - `anchor: "center"` - Centered in terminal
39
-
40
- Height is calculated from width to maintain DOOM's 3.2:1 aspect ratio (accounting for half-block rendering).
41
-
42
- ## Credits
43
-
44
- - [id Software](https://github.com/id-Software/DOOM) for the original DOOM
45
- - [doomgeneric](https://github.com/ozkl/doomgeneric) for the portable DOOM implementation
46
- - [pi-doom](https://github.com/badlogic/pi-doom) for the original pi integration
@@ -1,8 +0,0 @@
1
- ---
2
- name: dynamic-resources
3
- description: Example skill loaded from resources_discover
4
- ---
5
-
6
- # Dynamic Resources Skill
7
-
8
- This skill is provided by the dynamic-resources extension.
@@ -1,5 +0,0 @@
1
- ---
2
- description: Example prompt template loaded from resources_discover
3
- ---
4
-
5
- Summarize the current repository structure and mention any build or test commands.