@wbcode/avron 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WBCode (더블유비코드 김태환)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,143 @@
1
- # Temporary Holding Version
1
+ # Avron
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One clearly labelled sponsor line while your AI coding agent is thinking. It clears the moment the agent stops. You get a share of what the sponsor pays.
4
+
5
+ ```text
6
+ > Refactor auth middleware to use JWT
7
+ * Thinking...
8
+
9
+ Sponsored NORTHWIND │ Branch Postgres per PR in 1s · Try it ↗
10
+ ```
11
+
12
+ (The sponsor above is a made-up example.)
13
+
14
+ Avron is opt-in. You install it yourself, and you can remove it with one command.
15
+
16
+ ## Supported tools
17
+
18
+ `npx @wbcode/avron install` looks for these on your machine and adds Avron only to the ones it finds.
19
+
20
+ | Tool | Where the line shows |
21
+ |---|---|
22
+ | Claude Code | Its status line |
23
+ | GitHub Copilot CLI | Under the input box |
24
+ | Antigravity CLI | Its status line |
25
+ | OpenCode | The bottom row of its screen |
26
+
27
+ Four more tools get the same hooks, but their screens have no place for a line, so a small editor extension draws it in the editor's status bar:
28
+
29
+ | Tool | Needs |
30
+ |---|---|
31
+ | GitHub Copilot chat in VS Code | The Avron editor extension |
32
+ | Cursor (classic editor window) | The Avron editor extension |
33
+ | Antigravity IDE | The Avron editor extension |
34
+ | Codex CLI | The Avron editor extension, with Codex running in that window's terminal |
35
+
36
+ The Avron editor extension is not published yet. Until it is, these four show nothing. On the desktop apps of Claude and Codex there is no line either; a desktop notification can stand in (see "Formats").
37
+
38
+ Each tool is added only after it passes the checks in "How it is tested".
39
+
40
+ ## Install and remove
41
+
42
+ ```sh
43
+ npx @wbcode/avron install # backs up each settings file first, then adds Avron
44
+ npx @wbcode/avron doctor # checks that everything is wired correctly
45
+ npx @wbcode/avron uninstall # restores the settings files exactly as they were
46
+ ```
47
+
48
+ Requires Node.js 20 or newer. Not offered in mainland China, Japan, the European Union, the European Economic Area or the United Kingdom; requests from there get the line switched off and nothing is stored.
49
+
50
+ ## What it does to your machine
51
+
52
+ - **Edits only the tools' own settings files**, and only for tools it found: Claude Code's `settings.json`, GitHub Copilot's hook file and `settings.json`, Cursor's `hooks.json`, Codex's `hooks.json`, Antigravity's `hooks.json` and CLI `settings.json`, OpenCode's `tui.json`. A backup is saved first. Your existing status line keeps running and its output is kept; your existing hooks stay where they are, in the same order. Other people's entries in shared files are never touched.
53
+ - **Adds hooks that print nothing** and run in the background.
54
+ - **Runs one small background process** per machine. It exits by itself after three hours without use, and it does not stay in your project directory. On Windows it starts itself a second time through `powershell.exe Start-Process` and the first copy exits, so that a hook's output pipe is not held open.
55
+ - **Keeps its files in `~/.avron`.** Shell profiles (`.bashrc`, `.zshrc`, PowerShell profile) are never touched.
56
+ - **Never changes the tools themselves.** No edits to their program files or extensions, no stand-in commands in your `PATH`, no reading of what goes through your terminal. Only what each tool offers for this: hooks, status line settings, plugins, and the editor's status bar.
57
+ - **Silent in CI.** When the `CI` variable is set, nothing is shown and nothing is recorded. `npx @wbcode/avron pause` stops the line on your machine until `npx @wbcode/avron resume`.
58
+ - `npx @wbcode/avron uninstall` puts each settings file back byte for byte if you have not edited it since. If you have, it removes only its own entries and keeps your edits.
59
+
60
+ ## What it never collects
61
+
62
+ Prompts, source code, file names, paths, Git URLs, environment variables, API keys. It does not read your project files.
63
+
64
+ The tools pass the prompt and the working directory to every hook. Avron copies a few identifiers out of that input (session id, prompt id, hook name) and discards the rest in memory.
65
+
66
+ ## What it sends
67
+
68
+ At most once an hour, a signed batch of valid impressions. Run this to see the exact bytes before anything is sent:
69
+
70
+ ```sh
71
+ npx @wbcode/avron audit
72
+ ```
73
+
74
+ Each event holds a turn hash, a timestamp, the campaign id, the agent name, the agent's tier, two durations, the display mode and the format. Our database keeps your country code and never your IP address (Cloudflare, which runs the server, sees it to deliver the request). Server records are deleted after 13 months. You do not need an account to run Avron: the batch is signed with a key pair created on your machine at install time. An account is only for receiving your share (below).
75
+
76
+ To run with no network access at all, set `AVRON_OFFLINE=1`. See [SECURITY.md](SECURITY.md) for how to verify these claims yourself.
77
+
78
+ ## When the line shows
79
+
80
+ - Only while the agent is thinking. Turns shorter than 1.5 seconds show nothing.
81
+ - One sponsor per turn. The line does not change or blink during a turn.
82
+ - It clears when the turn ends. In tools that send no signal when you interrupt a turn, the line stays until its display cap runs out: up to 15 seconds after the turn started, or 8 seconds once you have interrupted a turn in that session.
83
+ - A turn counts as one valid impression only if the agent thought for at least 5 seconds, and at most once per turn. The same machine counts at most one turn every 15 seconds.
84
+ - If anything fails, Avron shows nothing. It never prints an error into your terminal; diagnostics go to `~/.avron/logs/daemon.log`.
85
+
86
+ ## Formats
87
+
88
+ By default you may see the one-line form and, where the tool has room, a card with a short description and a button (in the editor, on mouse-over or click). A sponsor's logo or picture is shown only after it has been checked. On the desktop apps of Claude and Codex, where there is no line, a short desktop notification is the format. Change what is shown with `npx @wbcode/avron config`, for example `npx @wbcode/avron config set formats.toast false`.
89
+
90
+ ## Sponsors
91
+
92
+ Every sponsor line is read by a person before it runs. Lines are plain text: no emoji, no underlined sentences, no claims that cannot be checked, nothing illegal, harmful or spam. Every line starts with a visible `Sponsored` label (or the label in your language when a translation is shown).
93
+
94
+ Lines are in English. When a sponsor provides a translation (for example Korean, Simplified or Traditional Chinese) and your system language matches, that translation is shown instead. Avron reads `LC_ALL`, `LC_MESSAGES` and `LANG`, then your operating system's language setting. Set `AVRON_LOCALE=en` to always see English.
95
+
96
+ ## Your share
97
+
98
+ 50% of what each sponsor pays, after refunds, the payment fee and a 5% reserve, goes to the developers whose machines showed the line, split by valid impressions shown while the order ran. It is confirmed 30 days after the order ends. Avron's own lines earn nothing, so while there are few sponsors the share is small. The money side is public at [avron.dev/open](https://avron.dev/open).
99
+
100
+ To receive it, link the machine to your account (an emailed code, Google or GitHub; up to five machines per account):
101
+
102
+ ```sh
103
+ npx @wbcode/avron login
104
+ ```
105
+
106
+ Then withdraw it on [avron.dev/dashboard](https://avron.dev/dashboard): by bank transfer in Korea (3.3% tax withheld) or with a Tremendous reward link elsewhere, once those payouts are open.
107
+
108
+ ## Commands
109
+
110
+ | Command | What it does |
111
+ |---|---|
112
+ | `install` / `uninstall` | Add or remove Avron (`--agent <id>` for one tool) |
113
+ | `doctor` | Verify the setup |
114
+ | `status` | Valid turns, what the server credited and your share |
115
+ | `login` (also `claim`) | Sign in and link this machine to your account |
116
+ | `key export` / `key import` | Back up or restore this machine's key |
117
+ | `audit` | Local files and the next upload, byte for byte |
118
+ | `open` | Open the last sponsor link and copy its promo code |
119
+ | `pause` / `resume` | Hide or show lines on this machine |
120
+ | `config` | Preferences, including which formats are shown |
121
+
122
+ ## How it is tested
123
+
124
+ Every tool must pass these before it is called supported:
125
+
126
+ 1. Install then uninstall leaves the settings file byte-identical.
127
+ 2. Existing settings, status line and hooks are chained, never overwritten.
128
+ 3. Nothing stays on screen after a turn ends.
129
+ 4. With the background process stopped or slow, the adapter returns an empty string within 15 ms and prints nothing.
130
+ 5. Turns under 5.0 seconds are not recorded; a turn is counted once.
131
+ 6. Concurrent sessions never mix.
132
+ 7. No prompt, code, path or project file is read or sent.
133
+ 8. Verified on each operating system the tool supports.
134
+
135
+ A release rehearsal packs the package, installs it into a throwaway directory and checks 1 to 7 end to end.
136
+
137
+ ## Operator
138
+
139
+ Avron (https://avron.dev) is operated by WBCode, Republic of Korea. Contact: contact@avron.dev. Run `npx @wbcode/avron --version` for the full operator notice.
140
+
141
+ ## License
142
+
143
+ MIT
package/SECURITY.md ADDED
@@ -0,0 +1,78 @@
1
+ # Security and privacy
2
+
3
+ This page lists what Avron claims and how you can check each claim yourself, on your own machine, without our source repository.
4
+
5
+ ## Claims
6
+
7
+ 1. Avron does not collect prompts, source code, file names, paths, Git URLs, environment variables or API keys, and does not read project files.
8
+ 2. The only data that leaves your machine is the batch shown by `npx @wbcode/avron audit`, plus ordinary HTTPS requests for the sponsor manifest and for the sponsor's logo or picture.
9
+ 3. The server database stores a country code and no IP address. Cloudflare, which runs the server, sees the IP address to deliver each request; it is not written to the database.
10
+ 4. A failure in Avron never prints into your terminal and never blocks the agent.
11
+ 5. Uninstall restores your settings files.
12
+
13
+ ## How to verify
14
+
15
+ ### See exactly what would be sent
16
+
17
+ ```sh
18
+ npx @wbcode/avron audit
19
+ ```
20
+
21
+ This prints every file Avron keeps on your machine and the next upload, byte for byte. Nothing is sent by this command. One event has nine fixed fields: `turnKey`, `timestamp`, `campaignId`, `agentName`, `agentTier`, `exposureDurationSec`, `displayedDurationSec`, `mode` and `format`.
22
+
23
+ `turnKey` is a SHA-256 hash of the session id and prompt id. The ids themselves are not stored or sent.
24
+
25
+ ### Read the one place where agent input is handled
26
+
27
+ The tools give hooks and status line commands a JSON object on stdin that can include the prompt, the working directory and the transcript path. The scripts Avron installs are plain, unminified JavaScript in `~/.avron/bin/`. In `avron-hook.cjs` the function `extractIds` is the only code that parses that input. It returns the session id, the prompt id and the hook name, and nothing else.
28
+
29
+ Messages to the background process are then rebuilt from a field whitelist (`parseAdapterMessage` in `avron-daemon.cjs`), so an unexpected field cannot pass through.
30
+
31
+ ### Watch the network
32
+
33
+ Avron talks to one host. Capture traffic while you use your agent:
34
+
35
+ ```sh
36
+ # macOS / Linux
37
+ sudo tcpdump -i any -n host avron.dev
38
+ ```
39
+
40
+ You should see a manifest request about every 30 minutes and at most one upload an hour. To rule out network use completely, set `AVRON_OFFLINE=1` in your environment; the sponsor line then comes from the manifest bundled with the package.
41
+
42
+ ### Inspect what was changed
43
+
44
+ ```sh
45
+ npx @wbcode/avron doctor
46
+ ```
47
+
48
+ For every tool Avron changed, the backup of your original file is saved next to it with the ending `.avron-backup` (for example `settings.json.avron-backup`). Compare the two to see every change. `npx @wbcode/avron uninstall` restores the backup and removes it.
49
+
50
+ ## Local files
51
+
52
+ Everything is under `~/.avron`:
53
+
54
+ | Path | Content |
55
+ |---|---|
56
+ | `adapters/` | One small record per tool Avron was added to (what to restore on uninstall) |
57
+ | `bin/` | The scripts the tools run (plain JavaScript) |
58
+ | `keys/` | Ed25519 key pair created at install. The private key never leaves the machine |
59
+ | `logs/impressions.ndjson` | Append-only log of valid impressions |
60
+ | `logs/daemon.log` | Diagnostics |
61
+ | `data/` | Totals shown by `avron status`, what was already shown today, and upload state |
62
+ | `cache/` | The last synced sponsor manifest and logos |
63
+ | `run/` | The background process id and the last sponsors shown on this machine |
64
+ | `config.json` | Your preferences |
65
+
66
+ ## Sponsor text is untrusted input
67
+
68
+ Manifest text is stripped of control characters, escape sequences and bidirectional overrides before it is printed. Only `https://avron.dev/go/…` links can become clickable, and only logos and pictures from `https://avron.dev/` are shown. The redirector only forwards to destinations in its own table and cannot be used as an open redirect.
69
+
70
+ ## Known limits
71
+
72
+ - In tools that send no signal when you interrupt a turn, the line can stay for a few seconds (see README, "When the line shows").
73
+ - On Windows, a named pipe is visible to other processes of the same machine. The pipe serves sponsor text only and accepts nothing but the four protocol messages.
74
+ - Timestamps in an upload come from your machine's clock.
75
+
76
+ ## Reporting a vulnerability
77
+
78
+ Email contact@avron.dev with steps to reproduce, or see <https://avron.dev/.well-known/security.txt>. Please do not open a public issue for a security problem.