@valni/cli-darwin-x64 0.1.2 → 0.1.4

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,185 +0,0 @@
1
- {
2
- "name": "pi-extension-gondolin",
3
- "version": "0.80.10",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "pi-extension-gondolin",
9
- "version": "0.80.10",
10
- "dependencies": {
11
- "@earendil-works/gondolin": "0.12.0"
12
- }
13
- },
14
- "node_modules/@cto.af/wtf8": {
15
- "version": "0.0.5",
16
- "resolved": "https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.5.tgz",
17
- "integrity": "sha512-LfUFi+Vv4eDzj+XAtR89e3wwjXA/NZjUSwU5NhwbBrLecxPaBYFy3exCuc1j+D4UZeOVdqlsl8G7LmOt18V0tg==",
18
- "license": "MIT",
19
- "engines": {
20
- "node": ">=20"
21
- }
22
- },
23
- "node_modules/@earendil-works/gondolin": {
24
- "version": "0.12.0",
25
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.12.0.tgz",
26
- "integrity": "sha512-BXbvzQKb5QmxY5NtthRDONJTu7+IDKbzqWGrJyyNXMP7N681Tx0Q9TK8pK1ba8nUvYQTipNJyGZOsJfYiZll1A==",
27
- "license": "Apache-2.0",
28
- "dependencies": {
29
- "cbor2": "^2.3.0",
30
- "node-forge": "^1.3.3",
31
- "ssh2": "^1.17.0",
32
- "undici": "^6.21.0"
33
- },
34
- "bin": {
35
- "gondolin": "dist/bin/gondolin.js"
36
- },
37
- "engines": {
38
- "node": ">=23.6.0"
39
- },
40
- "optionalDependencies": {
41
- "@earendil-works/gondolin-krun-runner-darwin-arm64": "0.12.0",
42
- "@earendil-works/gondolin-krun-runner-linux-x64": "0.12.0"
43
- }
44
- },
45
- "node_modules/@earendil-works/gondolin-krun-runner-darwin-arm64": {
46
- "version": "0.12.0",
47
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.12.0.tgz",
48
- "integrity": "sha512-ftDlusht4PcT7Y3TuPrZIKrCXy3isiBTVMvlXYK0pcud2uXY6uwFTGeunYgP+8ND/60ddb+MImqbfmkcK8B84A==",
49
- "cpu": [
50
- "arm64"
51
- ],
52
- "license": "Apache-2.0",
53
- "optional": true,
54
- "os": [
55
- "darwin"
56
- ],
57
- "bin": {
58
- "gondolin-krun-runner": "bin/gondolin-krun-runner"
59
- }
60
- },
61
- "node_modules/@earendil-works/gondolin-krun-runner-linux-x64": {
62
- "version": "0.12.0",
63
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.12.0.tgz",
64
- "integrity": "sha512-RRYsgwe2r5ApKmFNy469QgwnyjAHpAs9XANdWpTd9ol4iUYOY3sX7e0xIooAKxd+ktxGI4N/xRWicwGen3D/Ow==",
65
- "cpu": [
66
- "x64"
67
- ],
68
- "license": "Apache-2.0",
69
- "optional": true,
70
- "os": [
71
- "linux"
72
- ],
73
- "bin": {
74
- "gondolin-krun-runner": "bin/gondolin-krun-runner"
75
- }
76
- },
77
- "node_modules/asn1": {
78
- "version": "0.2.6",
79
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
80
- "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
81
- "license": "MIT",
82
- "dependencies": {
83
- "safer-buffer": "~2.1.0"
84
- }
85
- },
86
- "node_modules/bcrypt-pbkdf": {
87
- "version": "1.0.2",
88
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
89
- "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
90
- "license": "BSD-3-Clause",
91
- "dependencies": {
92
- "tweetnacl": "^0.14.3"
93
- }
94
- },
95
- "node_modules/buildcheck": {
96
- "version": "0.0.7",
97
- "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.7.tgz",
98
- "integrity": "sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA==",
99
- "optional": true,
100
- "engines": {
101
- "node": ">=10.0.0"
102
- }
103
- },
104
- "node_modules/cbor2": {
105
- "version": "2.3.0",
106
- "resolved": "https://registry.npmjs.org/cbor2/-/cbor2-2.3.0.tgz",
107
- "integrity": "sha512-76WB3hq8BoaGkMkBVJ27fW5LJU+qqDLEpgRNCG/SYKhODWXpVPOTD4UcUto3IEzYLA52nsvbhb0wabhHDn3qXg==",
108
- "license": "MIT",
109
- "dependencies": {
110
- "@cto.af/wtf8": "0.0.5"
111
- },
112
- "engines": {
113
- "node": ">=20"
114
- }
115
- },
116
- "node_modules/cpu-features": {
117
- "version": "0.0.10",
118
- "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz",
119
- "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==",
120
- "hasInstallScript": true,
121
- "optional": true,
122
- "dependencies": {
123
- "buildcheck": "~0.0.6",
124
- "nan": "^2.19.0"
125
- },
126
- "engines": {
127
- "node": ">=10.0.0"
128
- }
129
- },
130
- "node_modules/nan": {
131
- "version": "2.27.0",
132
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.27.0.tgz",
133
- "integrity": "sha512-hC+0LidcL3XE4rp1C4H54KujgXKzbfyTngZTwBByQxsOxCEKZT0MPQ4hOKUH2jU1OYstqdDH4onyHPDzcV0XdQ==",
134
- "license": "MIT",
135
- "optional": true
136
- },
137
- "node_modules/node-forge": {
138
- "version": "1.4.0",
139
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
140
- "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
141
- "license": "(BSD-3-Clause OR GPL-2.0)",
142
- "engines": {
143
- "node": ">= 6.13.0"
144
- }
145
- },
146
- "node_modules/safer-buffer": {
147
- "version": "2.1.2",
148
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
149
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
150
- "license": "MIT"
151
- },
152
- "node_modules/ssh2": {
153
- "version": "1.17.0",
154
- "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.17.0.tgz",
155
- "integrity": "sha512-wPldCk3asibAjQ/kziWQQt1Wh3PgDFpC0XpwclzKcdT1vql6KeYxf5LIt4nlFkUeR8WuphYMKqUA56X4rjbfgQ==",
156
- "hasInstallScript": true,
157
- "dependencies": {
158
- "asn1": "^0.2.6",
159
- "bcrypt-pbkdf": "^1.0.2"
160
- },
161
- "engines": {
162
- "node": ">=10.16.0"
163
- },
164
- "optionalDependencies": {
165
- "cpu-features": "~0.0.10",
166
- "nan": "^2.23.0"
167
- }
168
- },
169
- "node_modules/tweetnacl": {
170
- "version": "0.14.5",
171
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
172
- "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
173
- "license": "Unlicense"
174
- },
175
- "node_modules/undici": {
176
- "version": "6.26.0",
177
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz",
178
- "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==",
179
- "license": "MIT",
180
- "engines": {
181
- "node": ">=18.17"
182
- }
183
- }
184
- }
185
- }
@@ -1,19 +0,0 @@
1
- {
2
- "name": "pi-extension-gondolin",
3
- "private": true,
4
- "version": "0.80.10",
5
- "type": "module",
6
- "scripts": {
7
- "clean": "echo 'nothing to clean'",
8
- "build": "echo 'nothing to build'",
9
- "check": "echo 'nothing to check'"
10
- },
11
- "pi": {
12
- "extensions": [
13
- "./index.ts"
14
- ]
15
- },
16
- "dependencies": {
17
- "@earendil-works/gondolin": "0.12.0"
18
- }
19
- }
@@ -1,66 +0,0 @@
1
- # Plan Mode Extension
2
-
3
- Read-only exploration mode for safe code analysis.
4
-
5
- ## Features
6
-
7
- - **Built-in write tools disabled**: Disables edit/write while preserving other active tools
8
- - **Bash allowlist**: Only read-only bash commands are allowed
9
- - **Plan extraction**: Extracts numbered steps from `Plan:` sections
10
- - **Progress tracking**: Widget shows completion status during execution
11
- - **[DONE:n] markers**: Explicit step completion tracking
12
- - **Session persistence**: State survives session resume
13
-
14
- ## Commands
15
-
16
- - `/plan` - Toggle plan mode
17
- - `/todos` - Show current plan progress
18
- - `Ctrl+Alt+P` - Toggle plan mode (shortcut)
19
-
20
- ## Usage
21
-
22
- 1. Enable plan mode with `/plan` or `--plan` flag
23
- 2. Ask the agent to analyze code and create a plan
24
- 3. The agent should output a numbered plan under a `Plan:` header:
25
-
26
- ```
27
- Plan:
28
- 1. First step description
29
- 2. Second step description
30
- 3. Third step description
31
- ```
32
-
33
- 4. Choose "Execute the plan" when prompted
34
- 5. During execution, the agent marks steps complete with `[DONE:n]` tags
35
- 6. Progress widget shows completion status
36
-
37
- ## How It Works
38
-
39
- ### Plan Mode (Read-Only)
40
- - Built-in edit/write tools disabled
41
- - Other active tools remain available
42
- - Bash commands filtered through allowlist
43
- - Agent creates a plan without making changes
44
-
45
- ### Execution Mode
46
- - Full tool access restored
47
- - Agent executes steps in order
48
- - `[DONE:n]` markers track completion
49
- - Widget shows progress
50
-
51
- ### Command Allowlist
52
-
53
- Safe commands (allowed):
54
- - File inspection: `cat`, `head`, `tail`, `less`, `more`
55
- - Search: `grep`, `find`, `rg`, `fd`
56
- - Directory: `ls`, `pwd`, `tree`
57
- - Git read: `git status`, `git log`, `git diff`, `git branch`
58
- - Package info: `npm list`, `npm outdated`, `yarn info`
59
- - System info: `uname`, `whoami`, `date`, `uptime`
60
-
61
- Blocked commands:
62
- - File modification: `rm`, `mv`, `cp`, `mkdir`, `touch`
63
- - Git write: `git add`, `git commit`, `git push`
64
- - Package install: `npm install`, `yarn add`, `pip install`
65
- - System: `sudo`, `kill`, `reboot`
66
- - Editors: `vim`, `nano`, `code`
@@ -1,175 +0,0 @@
1
- # Subagent Example
2
-
3
- Delegate tasks to specialized subagents with isolated context windows.
4
-
5
- ## Features
6
-
7
- - **Isolated context**: Each subagent runs in a separate `pi` process
8
- - **Streaming output**: See tool calls and progress as they happen
9
- - **Parallel streaming**: All parallel tasks stream updates simultaneously
10
- - **Markdown rendering**: Final output rendered with proper formatting (expanded view)
11
- - **Usage tracking**: Shows turns, tokens, cost, and context usage per agent
12
- - **Abort support**: Ctrl+C propagates to kill subagent processes
13
-
14
- ## Structure
15
-
16
- ```
17
- subagent/
18
- ├── README.md # This file
19
- ├── index.ts # The extension (entry point)
20
- ├── agents.ts # Agent discovery logic
21
- ├── agents/ # Sample agent definitions
22
- │ ├── scout.md # Fast recon, returns compressed context
23
- │ ├── planner.md # Creates implementation plans
24
- │ ├── reviewer.md # Code review
25
- │ └── worker.md # General-purpose (full capabilities)
26
- └── prompts/ # Workflow presets (prompt templates)
27
- ├── implement.md # scout -> planner -> worker
28
- ├── scout-and-plan.md # scout -> planner (no implementation)
29
- └── implement-and-review.md # worker -> reviewer -> worker
30
- ```
31
-
32
- ## Installation
33
-
34
- From the repository root, symlink the files:
35
-
36
- ```bash
37
- # Symlink the extension (must be in a subdirectory with index.ts)
38
- mkdir -p ~/.valni/agent/extensions/subagent
39
- ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.valni/agent/extensions/subagent/index.ts
40
- ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.valni/agent/extensions/subagent/agents.ts
41
-
42
- # Symlink agents
43
- mkdir -p ~/.valni/agent/agents
44
- for f in packages/coding-agent/examples/extensions/subagent/agents/*.md; do
45
- ln -sf "$(pwd)/$f" ~/.valni/agent/agents/$(basename "$f")
46
- done
47
-
48
- # Symlink workflow prompts
49
- mkdir -p ~/.valni/agent/prompts
50
- for f in packages/coding-agent/examples/extensions/subagent/prompts/*.md; do
51
- ln -sf "$(pwd)/$f" ~/.valni/agent/prompts/$(basename "$f")
52
- done
53
- ```
54
-
55
- ## Security Model
56
-
57
- This tool executes a separate `pi` subprocess with a delegated system prompt and tool/model configuration.
58
-
59
- **Project-local agents** (`.valni/agents/*.md`) are repo-controlled prompts that can instruct the model to read files, run bash commands, etc.
60
-
61
- **Default behavior:** Only loads **user-level agents** from `~/.valni/agent/agents`.
62
-
63
- To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
64
-
65
- When running interactively, the tool prompts for confirmation before running project-local agents. Set `confirmProjectAgents: false` to disable.
66
-
67
- ## Usage
68
-
69
- ### Single agent
70
- ```
71
- Use scout to find all authentication code
72
- ```
73
-
74
- ### Parallel execution
75
- ```
76
- Run 2 scouts in parallel: one to find models, one to find providers
77
- ```
78
-
79
- ### Chained workflow
80
- ```
81
- Use a chain: first have scout find the read tool, then have planner suggest improvements
82
- ```
83
-
84
- ### Workflow prompts
85
- ```
86
- /implement add Redis caching to the session store
87
- /scout-and-plan refactor auth to support OAuth
88
- /implement-and-review add input validation to API endpoints
89
- ```
90
-
91
- ## Tool Modes
92
-
93
- | Mode | Parameter | Description |
94
- |------|-----------|-------------|
95
- | Single | `{ agent, task }` | One agent, one task |
96
- | Parallel | `{ tasks: [...] }` | Multiple agents run concurrently (max 8, 4 concurrent) |
97
- | Chain | `{ chain: [...] }` | Sequential with `{previous}` placeholder |
98
-
99
- ## Output Display
100
-
101
- **Collapsed view** (default):
102
- - Status icon (✓/✗/⏳) and agent name
103
- - Last 5-10 items (tool calls and text)
104
- - Usage stats: `3 turns ↑input ↓output RcacheRead WcacheWrite $cost ctx:contextTokens model`
105
-
106
- **Expanded view** (Ctrl+O):
107
- - Full task text
108
- - All tool calls with formatted arguments
109
- - Final output rendered as Markdown
110
- - Per-task usage (for chain/parallel)
111
-
112
- **Parallel mode streaming**:
113
- - Shows all tasks with live status (⏳ running, ✓ done, ✗ failed)
114
- - Updates as each task makes progress
115
- - Shows "2/3 done, 1 running" status
116
- - Returns each completed task's final output to the parent model, capped at 50 KB per task
117
- - Returns failure diagnostics from stderr/error messages when a child exits before producing output
118
-
119
- **Tool call formatting** (mimics built-in tools):
120
- - `$ command` for bash
121
- - `read ~/path:1-10` for read
122
- - `grep /pattern/ in ~/path` for grep
123
- - etc.
124
-
125
- ## Agent Definitions
126
-
127
- Agents are markdown files with YAML frontmatter:
128
-
129
- ```markdown
130
- ---
131
- name: my-agent
132
- description: What this agent does
133
- tools: read, grep, find, ls
134
- model: claude-haiku-4-5
135
- ---
136
-
137
- System prompt for the agent goes here.
138
- ```
139
-
140
- **Locations:**
141
- - `~/.valni/agent/agents/*.md` - User-level (always loaded)
142
- - `.valni/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
143
-
144
- Project agents override user agents with the same name when `agentScope: "both"`.
145
-
146
- ## Sample Agents
147
-
148
- | Agent | Purpose | Model | Tools |
149
- |-------|---------|-------|-------|
150
- | `scout` | Fast codebase recon | Haiku | read, grep, find, ls, bash |
151
- | `planner` | Implementation plans | Sonnet | read, grep, find, ls |
152
- | `reviewer` | Code review | Sonnet | read, grep, find, ls, bash |
153
- | `worker` | General-purpose | Sonnet | (all default) |
154
-
155
- ## Workflow Prompts
156
-
157
- | Prompt | Flow |
158
- |--------|------|
159
- | `/implement <query>` | scout → planner → worker |
160
- | `/scout-and-plan <query>` | scout → planner |
161
- | `/implement-and-review <query>` | worker → reviewer → worker |
162
-
163
- ## Error Handling
164
-
165
- - **Exit code != 0**: Tool returns error with stderr/output
166
- - **stopReason "error"**: LLM error propagated with error message
167
- - **stopReason "aborted"**: User abort (Ctrl+C) kills subprocess, throws error
168
- - **Chain mode**: Stops at first failing step, reports which step failed
169
-
170
- ## Limitations
171
-
172
- - Output truncated to last 10 items in collapsed view (expand to see all)
173
- - Parallel model-visible output is capped at 50 KB per task; full results remain in tool details
174
- - Agents discovered fresh on each invocation (allows editing mid-session)
175
- - Parallel mode limited to 8 tasks, 4 concurrent
@@ -1,37 +0,0 @@
1
- ---
2
- name: planner
3
- description: Creates implementation plans from context and requirements
4
- tools: read, grep, find, ls
5
- model: claude-sonnet-4-5
6
- ---
7
-
8
- You are a planning specialist. You receive context (from a scout) and requirements, then produce a clear implementation plan.
9
-
10
- You must NOT make any changes. Only read, analyze, and plan.
11
-
12
- Input format you'll receive:
13
- - Context/findings from a scout agent
14
- - Original query or requirements
15
-
16
- Output format:
17
-
18
- ## Goal
19
- One sentence summary of what needs to be done.
20
-
21
- ## Plan
22
- Numbered steps, each small and actionable:
23
- 1. Step one - specific file/function to modify
24
- 2. Step two - what to add/change
25
- 3. ...
26
-
27
- ## Files to Modify
28
- - `path/to/file.ts` - what changes
29
- - `path/to/other.ts` - what changes
30
-
31
- ## New Files (if any)
32
- - `path/to/new.ts` - purpose
33
-
34
- ## Risks
35
- Anything to watch out for.
36
-
37
- Keep the plan concrete. The worker agent will execute it verbatim.
@@ -1,35 +0,0 @@
1
- ---
2
- name: reviewer
3
- description: Code review specialist for quality and security analysis
4
- tools: read, grep, find, ls, bash
5
- model: claude-sonnet-4-5
6
- ---
7
-
8
- You are a senior code reviewer. Analyze code for quality, security, and maintainability.
9
-
10
- Bash is for read-only commands only: `git diff`, `git log`, `git show`. Do NOT modify files or run builds.
11
- Assume tool permissions are not perfectly enforceable; keep all bash usage strictly read-only.
12
-
13
- Strategy:
14
- 1. Run `git diff` to see recent changes (if applicable)
15
- 2. Read the modified files
16
- 3. Check for bugs, security issues, code smells
17
-
18
- Output format:
19
-
20
- ## Files Reviewed
21
- - `path/to/file.ts` (lines X-Y)
22
-
23
- ## Critical (must fix)
24
- - `file.ts:42` - Issue description
25
-
26
- ## Warnings (should fix)
27
- - `file.ts:100` - Issue description
28
-
29
- ## Suggestions (consider)
30
- - `file.ts:150` - Improvement idea
31
-
32
- ## Summary
33
- Overall assessment in 2-3 sentences.
34
-
35
- Be specific with file paths and line numbers.
@@ -1,50 +0,0 @@
1
- ---
2
- name: scout
3
- description: Fast codebase recon that returns compressed context for handoff to other agents
4
- tools: read, grep, find, ls, bash
5
- model: claude-haiku-4-5
6
- ---
7
-
8
- You are a scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
9
-
10
- Your output will be passed to an agent who has NOT seen the files you explored.
11
-
12
- Thoroughness (infer from task, default medium):
13
- - Quick: Targeted lookups, key files only
14
- - Medium: Follow imports, read critical sections
15
- - Thorough: Trace all dependencies, check tests/types
16
-
17
- Strategy:
18
- 1. grep/find to locate relevant code
19
- 2. Read key sections (not entire files)
20
- 3. Identify types, interfaces, key functions
21
- 4. Note dependencies between files
22
-
23
- Output format:
24
-
25
- ## Files Retrieved
26
- List with exact line ranges:
27
- 1. `path/to/file.ts` (lines 10-50) - Description of what's here
28
- 2. `path/to/other.ts` (lines 100-150) - Description
29
- 3. ...
30
-
31
- ## Key Code
32
- Critical types, interfaces, or functions:
33
-
34
- ```typescript
35
- interface Example {
36
- // actual code from the files
37
- }
38
- ```
39
-
40
- ```typescript
41
- function keyFunction() {
42
- // actual implementation
43
- }
44
- ```
45
-
46
- ## Architecture
47
- Brief explanation of how the pieces connect.
48
-
49
- ## Start Here
50
- Which file to look at first and why.
@@ -1,24 +0,0 @@
1
- ---
2
- name: worker
3
- description: General-purpose subagent with full capabilities, isolated context
4
- model: claude-sonnet-4-5
5
- ---
6
-
7
- You are a worker agent with full capabilities. You operate in an isolated context window to handle delegated tasks without polluting the main conversation.
8
-
9
- Work autonomously to complete the assigned task. Use all available tools as needed.
10
-
11
- Output format when finished:
12
-
13
- ## Completed
14
- What was done.
15
-
16
- ## Files Changed
17
- - `path/to/file.ts` - what changed
18
-
19
- ## Notes (if any)
20
- Anything the main agent should know.
21
-
22
- If handing off to another agent (e.g. reviewer), include:
23
- - Exact file paths changed
24
- - Key functions/types touched (short list)
@@ -1,10 +0,0 @@
1
- ---
2
- description: Worker implements, reviewer reviews, worker applies feedback
3
- ---
4
- Use the subagent tool with the chain parameter to execute this workflow:
5
-
6
- 1. First, use the "worker" agent to implement: $@
7
- 2. Then, use the "reviewer" agent to review the implementation from the previous step (use {previous} placeholder)
8
- 3. Finally, use the "worker" agent to apply the feedback from the review (use {previous} placeholder)
9
-
10
- Execute this as a chain, passing output between steps via {previous}.
@@ -1,10 +0,0 @@
1
- ---
2
- description: Full implementation workflow - scout gathers context, planner creates plan, worker implements
3
- ---
4
- Use the subagent tool with the chain parameter to execute this workflow:
5
-
6
- 1. First, use the "scout" agent to find all code relevant to: $@
7
- 2. Then, use the "planner" agent to create an implementation plan for "$@" using the context from the previous step (use {previous} placeholder)
8
- 3. Finally, use the "worker" agent to implement the plan from the previous step (use {previous} placeholder)
9
-
10
- Execute this as a chain, passing output between steps via {previous}.
@@ -1,9 +0,0 @@
1
- ---
2
- description: Scout gathers context, planner creates implementation plan (no implementation)
3
- ---
4
- Use the subagent tool with the chain parameter to execute this workflow:
5
-
6
- 1. First, use the "scout" agent to find all code relevant to: $@
7
- 2. Then, use the "planner" agent to create an implementation plan for "$@" using the context from the previous step (use {previous} placeholder)
8
-
9
- Execute this as a chain, passing output between steps via {previous}. Do NOT implement - just return the plan.