kimaki 0.4.82 → 0.4.84

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 (264) hide show
  1. package/LICENSE +21 -0
  2. package/dist/anthropic-auth-plugin.js +7 -0
  3. package/dist/cli.js +51 -7
  4. package/dist/commands/abort.js +5 -16
  5. package/dist/commands/action-buttons.js +3 -3
  6. package/dist/commands/add-project.js +1 -1
  7. package/dist/commands/ask-question.js +3 -3
  8. package/dist/commands/context-usage.js +1 -1
  9. package/dist/commands/create-new-project.js +1 -1
  10. package/dist/commands/fork.js +11 -8
  11. package/dist/commands/merge-worktree.js +1 -1
  12. package/dist/commands/new-worktree.js +63 -44
  13. package/dist/commands/remove-project.js +1 -1
  14. package/dist/commands/resume.js +11 -8
  15. package/dist/commands/screenshare.js +14 -6
  16. package/dist/commands/screenshare.test.js +20 -0
  17. package/dist/commands/session.js +1 -1
  18. package/dist/commands/undo-redo.js +91 -7
  19. package/dist/commands/user-command.js +1 -1
  20. package/dist/config.js +16 -1
  21. package/dist/database.js +53 -2
  22. package/dist/db.js +6 -0
  23. package/dist/discord-bot.js +48 -85
  24. package/dist/discord-command-registration.js +1 -1
  25. package/dist/external-opencode-sync.js +515 -0
  26. package/dist/external-opencode-sync.test.js +151 -0
  27. package/dist/gateway-proxy.e2e.test.js +8 -5
  28. package/dist/genai.js +1 -1
  29. package/dist/generated/enums.js +4 -0
  30. package/dist/generated/internal/class.js +4 -4
  31. package/dist/generated/internal/prismaNamespace.js +1 -0
  32. package/dist/generated/internal/prismaNamespaceBrowser.js +1 -0
  33. package/dist/generated/models/external_session_pending_prompts.js +1 -0
  34. package/dist/hrana-server.js +14 -285
  35. package/dist/hrana-server.test.js +4 -2
  36. package/dist/kimaki-opencode-plugin-loading.e2e.test.js +7 -0
  37. package/dist/kimaki-opencode-plugin.js +2 -0
  38. package/dist/kitty-graphics-parser.js +3 -0
  39. package/dist/kitty-graphics-parser.test.js +276 -0
  40. package/dist/kitty-graphics-plugin.js +3 -0
  41. package/dist/markdown.js +4 -4
  42. package/dist/markdown.test.js +1 -1
  43. package/dist/message-formatting.js +54 -15
  44. package/dist/onboarding-tutorial.js +1 -1
  45. package/dist/openai-realtime.js +9 -13
  46. package/dist/opencode.js +28 -5
  47. package/dist/queue-advanced-e2e-setup.js +89 -0
  48. package/dist/queue-advanced-permissions-typing.e2e.test.js +5 -5
  49. package/dist/queue-advanced-typing.e2e.test.js +9 -22
  50. package/dist/queue-question-select-drain.e2e.test.js +117 -0
  51. package/dist/session-handler/event-stream-state.js +101 -7
  52. package/dist/session-handler/event-stream-state.test.js +7 -3
  53. package/dist/session-handler/thread-session-runtime.js +120 -9
  54. package/dist/store.js +1 -0
  55. package/dist/system-message.js +22 -4
  56. package/dist/system-message.test.js +19 -0
  57. package/dist/task-runner.js +1 -1
  58. package/dist/thread-message-queue.e2e.test.js +8 -14
  59. package/dist/tools.js +1 -1
  60. package/dist/undo-redo.e2e.test.js +20 -25
  61. package/package.json +10 -6
  62. package/schema.prisma +6 -0
  63. package/skills/errore/SKILL.md +40 -13
  64. package/skills/goke/SKILL.md +12 -0
  65. package/skills/lintcn/SKILL.md +868 -0
  66. package/skills/npm-package/SKILL.md +1 -0
  67. package/skills/proxyman/SKILL.md +215 -0
  68. package/skills/spiceflow/SKILL.md +1 -1
  69. package/skills/usecomputer/SKILL.md +339 -0
  70. package/src/ai-tool-to-genai.ts +1 -0
  71. package/src/anthropic-auth-plugin.ts +7 -0
  72. package/src/cli.ts +59 -6
  73. package/src/commands/abort.ts +6 -16
  74. package/src/commands/action-buttons.ts +5 -1
  75. package/src/commands/add-project.ts +1 -1
  76. package/src/commands/ask-question.ts +5 -2
  77. package/src/commands/context-usage.ts +1 -1
  78. package/src/commands/create-new-project.ts +1 -1
  79. package/src/commands/fork.ts +12 -11
  80. package/src/commands/merge-worktree.ts +1 -1
  81. package/src/commands/new-worktree.ts +74 -55
  82. package/src/commands/remove-project.ts +1 -1
  83. package/src/commands/resume.ts +12 -10
  84. package/src/commands/screenshare.test.ts +30 -0
  85. package/src/commands/screenshare.ts +18 -6
  86. package/src/commands/session.ts +1 -1
  87. package/src/commands/undo-redo.ts +108 -10
  88. package/src/commands/user-command.ts +1 -1
  89. package/src/config.ts +19 -1
  90. package/src/database.ts +72 -3
  91. package/src/db.ts +8 -0
  92. package/src/discord-bot.ts +58 -93
  93. package/src/discord-command-registration.ts +1 -1
  94. package/src/external-opencode-sync.ts +729 -0
  95. package/src/gateway-proxy.e2e.test.ts +9 -5
  96. package/src/genai.ts +3 -3
  97. package/src/generated/commonInputTypes.ts +34 -0
  98. package/src/generated/enums.ts +8 -0
  99. package/src/generated/internal/class.ts +4 -4
  100. package/src/generated/internal/prismaNamespace.ts +8 -0
  101. package/src/generated/internal/prismaNamespaceBrowser.ts +1 -0
  102. package/src/generated/models/thread_sessions.ts +53 -1
  103. package/src/hrana-server.test.ts +8 -2
  104. package/src/hrana-server.ts +18 -390
  105. package/src/kimaki-opencode-plugin-loading.e2e.test.ts +7 -0
  106. package/src/kimaki-opencode-plugin.ts +2 -0
  107. package/src/markdown.test.ts +1 -1
  108. package/src/markdown.ts +4 -4
  109. package/src/message-formatting.ts +66 -17
  110. package/src/onboarding-tutorial.ts +1 -1
  111. package/src/openai-realtime.ts +6 -10
  112. package/src/opencode.ts +31 -7
  113. package/src/queue-advanced-e2e-setup.ts +92 -0
  114. package/src/queue-advanced-permissions-typing.e2e.test.ts +5 -5
  115. package/src/queue-advanced-typing.e2e.test.ts +9 -22
  116. package/src/queue-question-select-drain.e2e.test.ts +149 -0
  117. package/src/schema.sql +1 -0
  118. package/src/session-handler/event-stream-state.test.ts +7 -2
  119. package/src/session-handler/event-stream-state.ts +128 -7
  120. package/src/session-handler/thread-runtime-state.ts +5 -0
  121. package/src/session-handler/thread-session-runtime.ts +153 -11
  122. package/src/store.ts +8 -0
  123. package/src/system-message.ts +27 -4
  124. package/src/task-runner.ts +1 -1
  125. package/src/thread-message-queue.e2e.test.ts +8 -14
  126. package/src/tools.ts +1 -1
  127. package/src/undo-redo.e2e.test.ts +28 -26
  128. package/skills/jitter/node_modules/.bin/esbuild +0 -21
  129. package/skills/jitter/node_modules/.bin/tsc +0 -21
  130. package/skills/jitter/node_modules/.bin/tsserver +0 -21
  131. package/skills/jitter/node_modules/typescript/LICENSE.txt +0 -55
  132. package/skills/jitter/node_modules/typescript/README.md +0 -50
  133. package/skills/jitter/node_modules/typescript/SECURITY.md +0 -41
  134. package/skills/jitter/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  135. package/skills/jitter/node_modules/typescript/bin/tsc +0 -2
  136. package/skills/jitter/node_modules/typescript/bin/tsserver +0 -2
  137. package/skills/jitter/node_modules/typescript/lib/_tsc.js +0 -133792
  138. package/skills/jitter/node_modules/typescript/lib/_tsserver.js +0 -659
  139. package/skills/jitter/node_modules/typescript/lib/_typingsInstaller.js +0 -222
  140. package/skills/jitter/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  141. package/skills/jitter/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  142. package/skills/jitter/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  143. package/skills/jitter/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  144. package/skills/jitter/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  145. package/skills/jitter/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  146. package/skills/jitter/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  147. package/skills/jitter/node_modules/typescript/lib/lib.d.ts +0 -22
  148. package/skills/jitter/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  149. package/skills/jitter/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  150. package/skills/jitter/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  151. package/skills/jitter/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  152. package/skills/jitter/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  153. package/skills/jitter/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  154. package/skills/jitter/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  155. package/skills/jitter/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  156. package/skills/jitter/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  157. package/skills/jitter/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  158. package/skills/jitter/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  159. package/skills/jitter/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  160. package/skills/jitter/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  161. package/skills/jitter/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  162. package/skills/jitter/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  163. package/skills/jitter/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  164. package/skills/jitter/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  165. package/skills/jitter/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  166. package/skills/jitter/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  167. package/skills/jitter/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  168. package/skills/jitter/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  169. package/skills/jitter/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  170. package/skills/jitter/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  171. package/skills/jitter/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  172. package/skills/jitter/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  173. package/skills/jitter/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  174. package/skills/jitter/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  175. package/skills/jitter/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  176. package/skills/jitter/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  177. package/skills/jitter/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  178. package/skills/jitter/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  179. package/skills/jitter/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  180. package/skills/jitter/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  181. package/skills/jitter/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  182. package/skills/jitter/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  183. package/skills/jitter/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  184. package/skills/jitter/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  185. package/skills/jitter/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  186. package/skills/jitter/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  187. package/skills/jitter/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  188. package/skills/jitter/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  189. package/skills/jitter/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  190. package/skills/jitter/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  191. package/skills/jitter/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  192. package/skills/jitter/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  193. package/skills/jitter/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  194. package/skills/jitter/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  195. package/skills/jitter/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  196. package/skills/jitter/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  197. package/skills/jitter/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  198. package/skills/jitter/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  199. package/skills/jitter/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  200. package/skills/jitter/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  201. package/skills/jitter/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  202. package/skills/jitter/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  203. package/skills/jitter/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  204. package/skills/jitter/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  205. package/skills/jitter/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  206. package/skills/jitter/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  207. package/skills/jitter/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  208. package/skills/jitter/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  209. package/skills/jitter/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  210. package/skills/jitter/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  211. package/skills/jitter/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  212. package/skills/jitter/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  213. package/skills/jitter/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  214. package/skills/jitter/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  215. package/skills/jitter/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  216. package/skills/jitter/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  217. package/skills/jitter/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  218. package/skills/jitter/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  219. package/skills/jitter/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  220. package/skills/jitter/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  221. package/skills/jitter/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  222. package/skills/jitter/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  223. package/skills/jitter/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  224. package/skills/jitter/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  225. package/skills/jitter/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  226. package/skills/jitter/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  227. package/skills/jitter/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  228. package/skills/jitter/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  229. package/skills/jitter/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  230. package/skills/jitter/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  231. package/skills/jitter/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  232. package/skills/jitter/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  233. package/skills/jitter/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  234. package/skills/jitter/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  235. package/skills/jitter/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  236. package/skills/jitter/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -443
  237. package/skills/jitter/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  238. package/skills/jitter/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  239. package/skills/jitter/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  240. package/skills/jitter/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  241. package/skills/jitter/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  242. package/skills/jitter/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  243. package/skills/jitter/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  244. package/skills/jitter/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  245. package/skills/jitter/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  246. package/skills/jitter/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  247. package/skills/jitter/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  248. package/skills/jitter/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  249. package/skills/jitter/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  250. package/skills/jitter/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  251. package/skills/jitter/node_modules/typescript/lib/tsc.js +0 -8
  252. package/skills/jitter/node_modules/typescript/lib/tsserver.js +0 -8
  253. package/skills/jitter/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  254. package/skills/jitter/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  255. package/skills/jitter/node_modules/typescript/lib/typesMap.json +0 -497
  256. package/skills/jitter/node_modules/typescript/lib/typescript.d.ts +0 -11438
  257. package/skills/jitter/node_modules/typescript/lib/typescript.js +0 -200253
  258. package/skills/jitter/node_modules/typescript/lib/typingsInstaller.js +0 -8
  259. package/skills/jitter/node_modules/typescript/lib/watchGuard.js +0 -53
  260. package/skills/jitter/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
  261. package/skills/jitter/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
  262. package/skills/jitter/node_modules/typescript/node_modules/.bin/tsc +0 -21
  263. package/skills/jitter/node_modules/typescript/node_modules/.bin/tsserver +0 -21
  264. package/skills/jitter/node_modules/typescript/package.json +0 -120
@@ -152,6 +152,7 @@ Use Node ESM-compatible compiler settings:
152
152
  "declarationMap": true,
153
153
  "noEmit": false,
154
154
  "strict": true,
155
+ "noUncheckedIndexedAccess": true,
155
156
  "skipLibCheck": true,
156
157
  "useUnknownInCatchVariables": false
157
158
  },
@@ -0,0 +1,215 @@
1
+ ---
2
+ name: proxyman
3
+ description: >
4
+ Reverse-engineer HTTP APIs using Proxyman for macOS. Intercept, record, and export
5
+ network traffic from CLI tools and apps (Node.js, Python, Ruby, Go, curl).
6
+ Export as HAR (JSON) and analyze with jq. Use this skill when the user wants
7
+ to capture, inspect, or reverse-engineer HTTP traffic from macOS applications.
8
+ ---
9
+
10
+ # proxyman — HTTP traffic capture and reverse-engineering
11
+
12
+ Proxyman is a macOS proxy that intercepts HTTP/HTTPS traffic. Use it to
13
+ reverse-engineer APIs: capture what an app sends, inspect headers and bodies,
14
+ and build SDKs or integrations from the captured data.
15
+
16
+ ## Important
17
+
18
+ **Always run `proxyman-cli --help` and `proxyman-cli <subcommand> --help`
19
+ before using.** The help output is the source of truth for all commands and
20
+ options. The CLI binary lives inside the app bundle:
21
+
22
+ ```
23
+ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli
24
+ ```
25
+
26
+ **Proxyman GUI must be running** for the CLI to work. The CLI talks to the
27
+ running app — it does not work standalone or headless.
28
+
29
+ ```bash
30
+ open -a Proxyman
31
+ ```
32
+
33
+ ## Node.js, Python, Ruby, Go, curl do NOT use macOS system proxy
34
+
35
+ This is critical. Even though Proxyman auto-configures macOS system proxy
36
+ settings, **CLI tools and runtimes ignore them**. You must set env vars so
37
+ traffic routes through Proxyman (default port 9090):
38
+
39
+ ```bash
40
+ HTTPS_PROXY=http://127.0.0.1:9090 \
41
+ HTTP_PROXY=http://127.0.0.1:9090 \
42
+ NODE_TLS_REJECT_UNAUTHORIZED=0 \
43
+ <your-command-here>
44
+ ```
45
+
46
+ - `HTTPS_PROXY` / `HTTP_PROXY`: route traffic through Proxyman
47
+ - `NODE_TLS_REJECT_UNAUTHORIZED=0`: accept Proxyman's SSL cert for Node.js apps
48
+ - For Python: `REQUESTS_CA_BUNDLE` or `SSL_CERT_FILE` may be needed instead
49
+ - For curl: use `--proxy http://127.0.0.1:9090 -k` or set the env vars
50
+
51
+ Proxyman also has an "Automatic Setup" feature (Setup menu > Automatic Setup)
52
+ that opens a pre-configured terminal with all env vars set. But for scripting
53
+ and agent use, set the env vars explicitly as shown above.
54
+
55
+ ## CLI reference
56
+
57
+ ```
58
+ proxyman-cli clear-session Clear current captured traffic
59
+ proxyman-cli export-log [options] Export captured traffic to file
60
+ proxyman-cli export [options] Export debug tool rules (Map Local, etc)
61
+ proxyman-cli import --input <file> Import debug tool rules
62
+ proxyman-cli proxy on|off Toggle macOS system HTTP proxy
63
+ proxyman-cli breakpoint enable|disable Toggle Breakpoint tool
64
+ proxyman-cli maplocal enable|disable Toggle Map Local tool
65
+ proxyman-cli scripting enable|disable Toggle Scripting tool
66
+ proxyman-cli install-root-cert <file> Install custom root cert (requires sudo)
67
+ ```
68
+
69
+ ### export-log options
70
+
71
+ ```
72
+ -m, --mode <mode> all | domains (default: all)
73
+ -o, --output <path> Output file path (required)
74
+ -d, --domains <domain> Filter by domain (repeatable, only with -m domains)
75
+ -f, --format <format> proxymansession | har | raw (default: proxymansession)
76
+ ```
77
+
78
+ **Always use `-f har`** for agent workflows. HAR is JSON and works with jq.
79
+
80
+ ### export-log timing bug
81
+
82
+ The CLI can report "Exported Completed!" before the file is actually written.
83
+ Add `sleep 3` after export-log before reading the file:
84
+
85
+ ```bash
86
+ proxyman-cli export-log -m all -o capture.har -f har
87
+ sleep 3
88
+ jq '.log.entries | length' capture.har
89
+ ```
90
+
91
+ ## Reverse-engineering workflow
92
+
93
+ This is the primary use case. Example: figuring out how Claude Code talks to
94
+ the Anthropic API.
95
+
96
+ ```bash
97
+ # 1. Make sure Proxyman is running
98
+ open -a Proxyman
99
+
100
+ # 2. Clear previous traffic
101
+ proxyman-cli clear-session
102
+
103
+ # 3. Run the target app through the proxy
104
+ HTTPS_PROXY=http://127.0.0.1:9090 \
105
+ HTTP_PROXY=http://127.0.0.1:9090 \
106
+ NODE_TLS_REJECT_UNAUTHORIZED=0 \
107
+ claude -p "say hi" --max-turns 1
108
+
109
+ # 4. Export captured traffic as HAR
110
+ proxyman-cli export-log -m all -o capture.har -f har
111
+ sleep 3
112
+
113
+ # 5. Filter for the domain you care about
114
+ jq '[.log.entries[] | select(.request.url | test("anthropic"))]' capture.har
115
+ ```
116
+
117
+ ## Analyzing HAR files with jq
118
+
119
+ ### List all domains and request counts
120
+
121
+ ```bash
122
+ jq '[.log.entries[].request.url] | map(split("/")[2])
123
+ | group_by(.) | map({domain: .[0], count: length})
124
+ | sort_by(-.count)' capture.har
125
+ ```
126
+
127
+ ### Filter by domain
128
+
129
+ ```bash
130
+ jq '.log.entries[] | select(.request.url | test("api.example.com"))' capture.har
131
+ ```
132
+
133
+ ### Request summary (method, url, status)
134
+
135
+ ```bash
136
+ jq '[.log.entries[] | select(.request.url | test("api.example.com")) | {
137
+ method: .request.method,
138
+ url: .request.url,
139
+ status: .response.status
140
+ }]' capture.har
141
+ ```
142
+
143
+ ### Full request details (headers + body)
144
+
145
+ ```bash
146
+ jq '.log.entries[] | select(.request.url | test("v1/messages")) | {
147
+ url: .request.url,
148
+ method: .request.method,
149
+ status: .response.status,
150
+ request_headers: [.request.headers[] | {(.name): .value}] | add,
151
+ request_body: (.request.postData.text | fromjson? // .request.postData.text),
152
+ response_body: (.response.content.text | fromjson? // .response.content.text)
153
+ }' capture.har
154
+ ```
155
+
156
+ ### Request body structure (without full content)
157
+
158
+ Useful for large payloads — see the shape without the bulk:
159
+
160
+ ```bash
161
+ jq '.log.entries[] | select(.request.url | test("v1/messages"))
162
+ | .request.postData.text | fromjson
163
+ | {model, max_tokens, stream,
164
+ system_count: (.system | length),
165
+ messages_count: (.messages | length),
166
+ tools_count: (.tools | length),
167
+ messages: [.messages[] | {role, content_type: (.content | type)}]
168
+ }' capture.har
169
+ ```
170
+
171
+ ### Extract specific headers
172
+
173
+ ```bash
174
+ jq '.log.entries[] | select(.request.url | test("api.example.com"))
175
+ | {url: .request.url, auth: (.request.headers[] | select(.name == "authorization") | .value)}' capture.har
176
+ ```
177
+
178
+ ### Only failed requests
179
+
180
+ ```bash
181
+ jq '[.log.entries[] | select(.response.status >= 400) | {
182
+ url: .request.url,
183
+ status: .response.status,
184
+ error: .response.content.text
185
+ }]' capture.har
186
+ ```
187
+
188
+ ## Domain-filtered export
189
+
190
+ If you only care about one domain, filter at export time to get a smaller file:
191
+
192
+ ```bash
193
+ proxyman-cli export-log -m domains --domains 'api.anthropic.com' -o anthropic.har -f har
194
+ ```
195
+
196
+ Multiple domains:
197
+
198
+ ```bash
199
+ proxyman-cli export-log -m domains \
200
+ --domains 'api.anthropic.com' \
201
+ --domains 'mcp-proxy.anthropic.com' \
202
+ -o anthropic.har -f har
203
+ ```
204
+
205
+ ## SSL proxying
206
+
207
+ Proxyman needs to decrypt HTTPS to see request/response bodies. For Node.js
208
+ apps, `NODE_TLS_REJECT_UNAUTHORIZED=0` handles this. For system apps and
209
+ browsers, install and trust the Proxyman root certificate:
210
+
211
+ - Proxyman menu > Certificate > Install Certificate on this Mac
212
+ - Or via CLI: `proxyman-cli install-root-cert <path-to-cert>`
213
+
214
+ Without SSL proxying enabled for a domain, you'll see the connection but not
215
+ the decrypted body content.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spiceflow
3
- description: "Spiceflow is a super simple, fast, and type-safe API and React Server Components framework for TypeScript. Works on Node.js, Bun, and Cloudflare Workers. Use this skill whenever working with spiceflow to get the latest docs and API reference."
3
+ description: 'Spiceflow is a super simple, fast, and type-safe API and React Server Components framework for TypeScript. Works on Node.js, Bun, and Cloudflare Workers. Use this skill whenever working with spiceflow to get the latest docs and API reference.'
4
4
  ---
5
5
 
6
6
  # Spiceflow
@@ -0,0 +1,339 @@
1
+ ---
2
+ name: usecomputer
3
+ description: macOS desktop automation CLI for AI agents. Screenshot, click, type, scroll, drag with native Zig backend. Use this skill when automating desktop apps with computer use models (GPT-5.4, Claude). Covers coord-map workflow, system prompts for accurate clicking, and the screenshot-action loop.
4
+ ---
5
+
6
+ # usecomputer
7
+
8
+ macOS desktop automation CLI. Takes screenshots, clicks, types, scrolls, drags
9
+ using native Quartz events through a Zig N-API module.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g usecomputer
15
+ ```
16
+
17
+ Requires macOS + Accessibility permission for your terminal app.
18
+
19
+ ## Core workflow: screenshot -> click -> screenshot
20
+
21
+ Every computer use loop follows this pattern:
22
+
23
+ 1. Take a screenshot with `usecomputer screenshot`
24
+ 2. Send the screenshot to the model
25
+ 3. Model returns coordinates to click
26
+ 4. Click using the **exact coord-map** from step 1
27
+ 5. Take another screenshot and repeat
28
+
29
+ ```bash
30
+ # 1. screenshot (always use --json to get coordMap)
31
+ usecomputer screenshot ./tmp/screen.png --json
32
+
33
+ # 2. model says "click at x=400 y=220"
34
+
35
+ # 3. click using coord-map from screenshot output
36
+ usecomputer click -x 400 -y 220 --coord-map "0,0,1600,900,1568,882"
37
+
38
+ # 4. validate before clicking (optional but recommended)
39
+ usecomputer debug-point -x 400 -y 220 --coord-map "0,0,1600,900,1568,882"
40
+ ```
41
+
42
+ **CRITICAL: always pass `--coord-map` from the screenshot output to click.**
43
+ Screenshots are scaled (longest edge <= 1568px). The coord-map maps
44
+ screenshot-space pixels back to real screen coordinates. Without it, clicks
45
+ land in wrong positions.
46
+
47
+ ## System prompt for accurate clicking
48
+
49
+ When using GPT-5.4 or Claude for computer use, the system prompt / instructions
50
+ matter for click accuracy. Keep instructions short and task-focused.
51
+
52
+ ### GPT-5.4 native computer tool
53
+
54
+ Use `detail: "original"` on screenshot inputs. This is the single most
55
+ important setting for click accuracy.
56
+
57
+ ```ts
58
+ // sending screenshot back to the model
59
+ {
60
+ type: "computer_call_output",
61
+ call_id: computerCall.call_id,
62
+ output: {
63
+ type: "computer_screenshot",
64
+ image_url: `data:image/png;base64,${screenshotBase64}`,
65
+ detail: "original", // CRITICAL for click accuracy
66
+ },
67
+ }
68
+ ```
69
+
70
+ Recommended resolutions when downscaling: **1440x900** and **1600x900**.
71
+ usecomputer already scales to max 1568px longest edge which is in this range.
72
+
73
+ Avoid `detail: "high"` or `detail: "low"` for computer use tasks.
74
+
75
+ ### System prompt template (native computer tool)
76
+
77
+ ```
78
+ You are controlling a desktop application through the built-in computer tool.
79
+ Use the computer tool for all UI interaction.
80
+ Use only the operator prompt as the source of truth.
81
+ <task-specific instruction here>
82
+ Reply briefly once the task is complete.
83
+ ```
84
+
85
+ ### System prompt template (code execution / Playwright REPL)
86
+
87
+ ```
88
+ You are operating a persistent Playwright browser session.
89
+ You must use the exec_js tool before you answer.
90
+ The app is already open at {url}.
91
+ Use only the operator prompt as the source of truth.
92
+ <task-specific instruction here>
93
+ Reply briefly once done.
94
+ ```
95
+
96
+ ### Key prompt patterns from OpenAI docs
97
+
98
+ These XML blocks can be added to agent instructions for better reliability:
99
+
100
+ ```xml
101
+ <tool_persistence_rules>
102
+ - Use tools whenever they materially improve correctness.
103
+ - Do not stop early when another tool call would improve completeness.
104
+ - Keep calling tools until the task is complete and verification passes.
105
+ - If a tool returns empty or partial results, retry with a different strategy.
106
+ </tool_persistence_rules>
107
+ ```
108
+
109
+ ```xml
110
+ <verification_loop>
111
+ Before finalizing:
112
+ - Check correctness: does the output satisfy every requirement?
113
+ - Check formatting: does the output match the requested schema?
114
+ - Check safety: if the next step has external side effects, ask permission.
115
+ </verification_loop>
116
+ ```
117
+
118
+ ```xml
119
+ <completeness_contract>
120
+ - Treat the task as incomplete until all requested items are covered.
121
+ - Keep an internal checklist of required deliverables.
122
+ - If any item is blocked by missing data, mark it [blocked] and state what is missing.
123
+ </completeness_contract>
124
+ ```
125
+
126
+ ## Commands reference
127
+
128
+ ### screenshot
129
+
130
+ ```bash
131
+ usecomputer screenshot [path] --json
132
+ usecomputer screenshot ./shot.png --display 0 --json
133
+ usecomputer screenshot ./shot.png --region "100,100,800,600" --json
134
+ usecomputer screenshot ./shot.png --window 12345 --json
135
+ ```
136
+
137
+ JSON output includes `path`, `coordMap`, `hint`, `desktopIndex`, `imageWidth`,
138
+ `imageHeight`. Always use `--json` and always pass the `coordMap` value to
139
+ subsequent click/hover/drag commands.
140
+
141
+ ### click
142
+
143
+ ```bash
144
+ usecomputer click -x 400 -y 220 --coord-map "0,0,1600,900,1568,882"
145
+ usecomputer click -x 400 -y 220 --button right --coord-map "..."
146
+ usecomputer click -x 400 -y 220 --count 2 --coord-map "..." # double click
147
+ ```
148
+
149
+ `-x` and `-y` are **screenshot-space pixels** when using `--coord-map`.
150
+
151
+ ### debug-point
152
+
153
+ Validate coordinates before clicking. Captures a screenshot and draws a red
154
+ marker where the click would land:
155
+
156
+ ```bash
157
+ usecomputer debug-point -x 400 -y 220 --coord-map "0,0,1600,900,1568,882"
158
+ usecomputer debug-point -x 400 -y 220 --coord-map "..." --json
159
+ ```
160
+
161
+ Use this when clicks are landing in wrong positions. Send the output image
162
+ to the model so it can see where the marker is and adjust.
163
+
164
+ ### type
165
+
166
+ ```bash
167
+ usecomputer type "hello"
168
+ usecomputer type "hello" --delay 20 # per-char delay ms
169
+ cat file.txt | usecomputer type --stdin --chunk-size 4000 --chunk-delay 15
170
+ ```
171
+
172
+ ### press
173
+
174
+ ```bash
175
+ usecomputer press "enter"
176
+ usecomputer press "cmd+s"
177
+ usecomputer press "cmd+shift+p"
178
+ usecomputer press "down" --count 10 --delay 30
179
+ ```
180
+
181
+ Modifier aliases: `cmd`/`command`/`meta`, `ctrl`/`control`, `alt`/`option`,
182
+ `shift`, `fn`.
183
+
184
+ ### scroll
185
+
186
+ ```bash
187
+ usecomputer scroll down 5
188
+ usecomputer scroll up 3
189
+ usecomputer scroll down 5 --at "400,300" # scroll at specific position
190
+ ```
191
+
192
+ ### drag
193
+
194
+ ```bash
195
+ usecomputer drag "100,200" "400,500"
196
+ usecomputer drag "100,200" "400,500" --coord-map "..."
197
+ usecomputer drag "100,200" "400,500" --duration 500
198
+ ```
199
+
200
+ ### mouse
201
+
202
+ ```bash
203
+ usecomputer mouse position --json
204
+ usecomputer mouse move -x 500 -y 500
205
+ usecomputer mouse move -x 500 -y 500 --coord-map "..."
206
+ usecomputer mouse down --button left
207
+ usecomputer mouse up --button left
208
+ ```
209
+
210
+ ### hover
211
+
212
+ ```bash
213
+ usecomputer hover -x 300 -y 200 --coord-map "..."
214
+ ```
215
+
216
+ ### display / desktop
217
+
218
+ ```bash
219
+ usecomputer display list --json
220
+ usecomputer desktop list --json
221
+ usecomputer desktop list --windows --json
222
+ ```
223
+
224
+ ### clipboard
225
+
226
+ ```bash
227
+ usecomputer clipboard get
228
+ usecomputer clipboard set "copied text"
229
+ ```
230
+
231
+ ### window
232
+
233
+ ```bash
234
+ usecomputer window list --json
235
+ ```
236
+
237
+ ## Library usage (Node.js)
238
+
239
+ usecomputer exports all commands as functions:
240
+
241
+ ```ts
242
+ import * as usecomputer from 'usecomputer'
243
+
244
+ const screenshot = await usecomputer.screenshot({
245
+ path: './tmp/shot.png',
246
+ display: null,
247
+ window: null,
248
+ region: null,
249
+ annotate: null,
250
+ })
251
+
252
+ // map model coordinates to real screen coordinates
253
+ const coordMap = usecomputer.parseCoordMapOrThrow(screenshot.coordMap)
254
+ const point = usecomputer.mapPointFromCoordMap({
255
+ point: { x: 400, y: 220 },
256
+ coordMap,
257
+ })
258
+
259
+ await usecomputer.click({ point, button: 'left', count: 1 })
260
+ ```
261
+
262
+ ## OpenAI computer tool integration
263
+
264
+ ```ts
265
+ import fs from 'node:fs'
266
+ import * as usecomputer from 'usecomputer'
267
+
268
+ async function captureScreenshot() {
269
+ const screenshot = await usecomputer.screenshot({
270
+ path: './tmp/computer-tool.png',
271
+ display: null, window: null, region: null, annotate: null,
272
+ })
273
+ return {
274
+ screenshot,
275
+ imageBase64: await fs.promises.readFile(screenshot.path, 'base64'),
276
+ }
277
+ }
278
+
279
+ async function executeAction(action, coordMapStr) {
280
+ const coordMap = usecomputer.parseCoordMapOrThrow(coordMapStr)
281
+ const mapPoint = (x, y) =>
282
+ usecomputer.mapPointFromCoordMap({ point: { x, y }, coordMap })
283
+
284
+ switch (action.type) {
285
+ case 'click':
286
+ await usecomputer.click({
287
+ point: mapPoint(action.x, action.y),
288
+ button: action.button ?? 'left',
289
+ count: 1,
290
+ })
291
+ break
292
+ case 'double_click':
293
+ await usecomputer.click({
294
+ point: mapPoint(action.x, action.y),
295
+ button: action.button ?? 'left',
296
+ count: 2,
297
+ })
298
+ break
299
+ case 'type':
300
+ await usecomputer.typeText({ text: action.text, delayMs: null })
301
+ break
302
+ case 'keypress':
303
+ await usecomputer.press({
304
+ key: action.keys.join('+'),
305
+ count: 1,
306
+ delayMs: null,
307
+ })
308
+ break
309
+ case 'scroll':
310
+ await usecomputer.scroll({
311
+ direction: action.scrollY < 0 ? 'up' : 'down',
312
+ amount: Math.abs(action.scrollY ?? 0),
313
+ at: typeof action.x === 'number'
314
+ ? mapPoint(action.x, action.y)
315
+ : null,
316
+ })
317
+ break
318
+ }
319
+ }
320
+ ```
321
+
322
+ ## Troubleshooting click accuracy
323
+
324
+ 1. **Always pass `--coord-map`** from the screenshot that the model analyzed.
325
+ Without it, coordinates are treated as raw screen coordinates.
326
+
327
+ 2. **Use `debug-point`** to visually verify where a click will land before
328
+ sending the real click. Send the debug image back to the model.
329
+
330
+ 3. **Retina displays**: usecomputer handles scaling internally via coord-map.
331
+ But if you bypass coord-map and use raw pyautogui-style coordinates, you
332
+ need to account for display scaling yourself.
333
+
334
+ 4. **Model sees wrong resolution**: if the model returns coordinates outside
335
+ the screenshot dimensions, it may be hallucinating. Re-send the screenshot
336
+ with `detail: "original"` and remind it of the image dimensions.
337
+
338
+ 5. **Stale screenshots**: always take a fresh screenshot after each action.
339
+ The UI may have changed (menus opened, pages scrolled, dialogs appeared).
@@ -111,6 +111,7 @@ function jsonSchemaToGenAISchema(jsonSchema: JSONSchema7Definition): Schema {
111
111
  if (Array.isArray(jsonSchema.enum)) {
112
112
  schema.enum = jsonSchema.enum.map((x) => String(x))
113
113
  }
114
+
114
115
  if ('default' in jsonSchema) {
115
116
  schema.default = jsonSchema.default as unknown
116
117
  }
@@ -1,6 +1,13 @@
1
1
  /**
2
2
  * Anthropic OAuth authentication plugin for OpenCode.
3
3
  *
4
+ * If you're copy-pasting this plugin into your OpenCode config folder,
5
+ * you need to install the runtime dependencies first:
6
+ *
7
+ * cd ~/.config/opencode
8
+ * bun init -y
9
+ * bun add @openauthjs/openauth proper-lockfile
10
+ *
4
11
  * Handles two concerns:
5
12
  * 1. OAuth login + token refresh (PKCE flow against claude.ai)
6
13
  * 2. Request/response rewriting (tool names, system prompt, beta headers)