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.
- package/LICENSE +21 -0
- package/dist/anthropic-auth-plugin.js +7 -0
- package/dist/cli.js +51 -7
- package/dist/commands/abort.js +5 -16
- package/dist/commands/action-buttons.js +3 -3
- package/dist/commands/add-project.js +1 -1
- package/dist/commands/ask-question.js +3 -3
- package/dist/commands/context-usage.js +1 -1
- package/dist/commands/create-new-project.js +1 -1
- package/dist/commands/fork.js +11 -8
- package/dist/commands/merge-worktree.js +1 -1
- package/dist/commands/new-worktree.js +63 -44
- package/dist/commands/remove-project.js +1 -1
- package/dist/commands/resume.js +11 -8
- package/dist/commands/screenshare.js +14 -6
- package/dist/commands/screenshare.test.js +20 -0
- package/dist/commands/session.js +1 -1
- package/dist/commands/undo-redo.js +91 -7
- package/dist/commands/user-command.js +1 -1
- package/dist/config.js +16 -1
- package/dist/database.js +53 -2
- package/dist/db.js +6 -0
- package/dist/discord-bot.js +48 -85
- package/dist/discord-command-registration.js +1 -1
- package/dist/external-opencode-sync.js +515 -0
- package/dist/external-opencode-sync.test.js +151 -0
- package/dist/gateway-proxy.e2e.test.js +8 -5
- package/dist/genai.js +1 -1
- package/dist/generated/enums.js +4 -0
- package/dist/generated/internal/class.js +4 -4
- package/dist/generated/internal/prismaNamespace.js +1 -0
- package/dist/generated/internal/prismaNamespaceBrowser.js +1 -0
- package/dist/generated/models/external_session_pending_prompts.js +1 -0
- package/dist/hrana-server.js +14 -285
- package/dist/hrana-server.test.js +4 -2
- package/dist/kimaki-opencode-plugin-loading.e2e.test.js +7 -0
- package/dist/kimaki-opencode-plugin.js +2 -0
- package/dist/kitty-graphics-parser.js +3 -0
- package/dist/kitty-graphics-parser.test.js +276 -0
- package/dist/kitty-graphics-plugin.js +3 -0
- package/dist/markdown.js +4 -4
- package/dist/markdown.test.js +1 -1
- package/dist/message-formatting.js +54 -15
- package/dist/onboarding-tutorial.js +1 -1
- package/dist/openai-realtime.js +9 -13
- package/dist/opencode.js +28 -5
- package/dist/queue-advanced-e2e-setup.js +89 -0
- package/dist/queue-advanced-permissions-typing.e2e.test.js +5 -5
- package/dist/queue-advanced-typing.e2e.test.js +9 -22
- package/dist/queue-question-select-drain.e2e.test.js +117 -0
- package/dist/session-handler/event-stream-state.js +101 -7
- package/dist/session-handler/event-stream-state.test.js +7 -3
- package/dist/session-handler/thread-session-runtime.js +120 -9
- package/dist/store.js +1 -0
- package/dist/system-message.js +22 -4
- package/dist/system-message.test.js +19 -0
- package/dist/task-runner.js +1 -1
- package/dist/thread-message-queue.e2e.test.js +8 -14
- package/dist/tools.js +1 -1
- package/dist/undo-redo.e2e.test.js +20 -25
- package/package.json +10 -6
- package/schema.prisma +6 -0
- package/skills/errore/SKILL.md +40 -13
- package/skills/goke/SKILL.md +12 -0
- package/skills/lintcn/SKILL.md +868 -0
- package/skills/npm-package/SKILL.md +1 -0
- package/skills/proxyman/SKILL.md +215 -0
- package/skills/spiceflow/SKILL.md +1 -1
- package/skills/usecomputer/SKILL.md +339 -0
- package/src/ai-tool-to-genai.ts +1 -0
- package/src/anthropic-auth-plugin.ts +7 -0
- package/src/cli.ts +59 -6
- package/src/commands/abort.ts +6 -16
- package/src/commands/action-buttons.ts +5 -1
- package/src/commands/add-project.ts +1 -1
- package/src/commands/ask-question.ts +5 -2
- package/src/commands/context-usage.ts +1 -1
- package/src/commands/create-new-project.ts +1 -1
- package/src/commands/fork.ts +12 -11
- package/src/commands/merge-worktree.ts +1 -1
- package/src/commands/new-worktree.ts +74 -55
- package/src/commands/remove-project.ts +1 -1
- package/src/commands/resume.ts +12 -10
- package/src/commands/screenshare.test.ts +30 -0
- package/src/commands/screenshare.ts +18 -6
- package/src/commands/session.ts +1 -1
- package/src/commands/undo-redo.ts +108 -10
- package/src/commands/user-command.ts +1 -1
- package/src/config.ts +19 -1
- package/src/database.ts +72 -3
- package/src/db.ts +8 -0
- package/src/discord-bot.ts +58 -93
- package/src/discord-command-registration.ts +1 -1
- package/src/external-opencode-sync.ts +729 -0
- package/src/gateway-proxy.e2e.test.ts +9 -5
- package/src/genai.ts +3 -3
- package/src/generated/commonInputTypes.ts +34 -0
- package/src/generated/enums.ts +8 -0
- package/src/generated/internal/class.ts +4 -4
- package/src/generated/internal/prismaNamespace.ts +8 -0
- package/src/generated/internal/prismaNamespaceBrowser.ts +1 -0
- package/src/generated/models/thread_sessions.ts +53 -1
- package/src/hrana-server.test.ts +8 -2
- package/src/hrana-server.ts +18 -390
- package/src/kimaki-opencode-plugin-loading.e2e.test.ts +7 -0
- package/src/kimaki-opencode-plugin.ts +2 -0
- package/src/markdown.test.ts +1 -1
- package/src/markdown.ts +4 -4
- package/src/message-formatting.ts +66 -17
- package/src/onboarding-tutorial.ts +1 -1
- package/src/openai-realtime.ts +6 -10
- package/src/opencode.ts +31 -7
- package/src/queue-advanced-e2e-setup.ts +92 -0
- package/src/queue-advanced-permissions-typing.e2e.test.ts +5 -5
- package/src/queue-advanced-typing.e2e.test.ts +9 -22
- package/src/queue-question-select-drain.e2e.test.ts +149 -0
- package/src/schema.sql +1 -0
- package/src/session-handler/event-stream-state.test.ts +7 -2
- package/src/session-handler/event-stream-state.ts +128 -7
- package/src/session-handler/thread-runtime-state.ts +5 -0
- package/src/session-handler/thread-session-runtime.ts +153 -11
- package/src/store.ts +8 -0
- package/src/system-message.ts +27 -4
- package/src/task-runner.ts +1 -1
- package/src/thread-message-queue.e2e.test.ts +8 -14
- package/src/tools.ts +1 -1
- package/src/undo-redo.e2e.test.ts +28 -26
- package/skills/jitter/node_modules/.bin/esbuild +0 -21
- package/skills/jitter/node_modules/.bin/tsc +0 -21
- package/skills/jitter/node_modules/.bin/tsserver +0 -21
- package/skills/jitter/node_modules/typescript/LICENSE.txt +0 -55
- package/skills/jitter/node_modules/typescript/README.md +0 -50
- package/skills/jitter/node_modules/typescript/SECURITY.md +0 -41
- package/skills/jitter/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
- package/skills/jitter/node_modules/typescript/bin/tsc +0 -2
- package/skills/jitter/node_modules/typescript/bin/tsserver +0 -2
- package/skills/jitter/node_modules/typescript/lib/_tsc.js +0 -133792
- package/skills/jitter/node_modules/typescript/lib/_tsserver.js +0 -659
- package/skills/jitter/node_modules/typescript/lib/_typingsInstaller.js +0 -222
- package/skills/jitter/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/lib.d.ts +0 -22
- package/skills/jitter/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
- package/skills/jitter/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
- package/skills/jitter/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
- package/skills/jitter/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
- package/skills/jitter/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
- package/skills/jitter/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/skills/jitter/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
- package/skills/jitter/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
- package/skills/jitter/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
- package/skills/jitter/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
- package/skills/jitter/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
- package/skills/jitter/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
- package/skills/jitter/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
- package/skills/jitter/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
- package/skills/jitter/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
- package/skills/jitter/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
- package/skills/jitter/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
- package/skills/jitter/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
- package/skills/jitter/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
- package/skills/jitter/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
- package/skills/jitter/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
- package/skills/jitter/node_modules/typescript/lib/lib.es6.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -443
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
- package/skills/jitter/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
- package/skills/jitter/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
- package/skills/jitter/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
- package/skills/jitter/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
- package/skills/jitter/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
- package/skills/jitter/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
- package/skills/jitter/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/tsc.js +0 -8
- package/skills/jitter/node_modules/typescript/lib/tsserver.js +0 -8
- package/skills/jitter/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
- package/skills/jitter/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/skills/jitter/node_modules/typescript/lib/typesMap.json +0 -497
- package/skills/jitter/node_modules/typescript/lib/typescript.d.ts +0 -11438
- package/skills/jitter/node_modules/typescript/lib/typescript.js +0 -200253
- package/skills/jitter/node_modules/typescript/lib/typingsInstaller.js +0 -8
- package/skills/jitter/node_modules/typescript/lib/watchGuard.js +0 -53
- package/skills/jitter/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
- package/skills/jitter/node_modules/typescript/node_modules/.bin/tsc +0 -21
- package/skills/jitter/node_modules/typescript/node_modules/.bin/tsserver +0 -21
- package/skills/jitter/node_modules/typescript/package.json +0 -120
|
@@ -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:
|
|
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).
|
package/src/ai-tool-to-genai.ts
CHANGED
|
@@ -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)
|