@aistastudio/myc 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +64 -3
  2. package/dist/myc.js +1092 -460
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -31,7 +31,7 @@ Installation is one command:
31
31
 
32
32
  ```bash
33
33
  bun install -g @aistastudio/myc # 3.20 MB, 10 files, no models pulled at install
34
- myc --version # myc 0.3.2 (schema 1)
34
+ myc --version # myc 0.3.3 (schema 1)
35
35
  ```
36
36
 
37
37
  The embedding model is **not** downloaded during install. Semantic search is
@@ -65,6 +65,63 @@ writing a config that silently won't start.
65
65
 
66
66
  Full command list: `./dist/myc --help`.
67
67
 
68
+ ## Heavy commands take turns
69
+
70
+ Several agents on one machine — in one tree or in neighbouring projects — each
71
+ run the heavy things: the full test suite, builds, benchmarks. Run at once, they
72
+ get in each other's way: full runs take twice as long, and latency budgets fail
73
+ because of the neighbour, not the code. `myc run` puts such a command into one
74
+ queue shared by every repository of the machine user (`~/.myc/queue.db`), waits
75
+ for a free slot (first come, first served) and then runs it with the terminal
76
+ and the exit code left alone:
77
+
78
+ ```bash
79
+ myc run -- bun test # waits its turn (--max-wait 5m by default), then runs
80
+ myc run --max-wait 15m -- make # a longer wait for a longer tool timeout
81
+ myc queue # who is running, who is waiting, for how long
82
+ ```
83
+
84
+ ```
85
+ $ myc queue
86
+ heavy · slots 1 · 1 running · 1 waiting · ~/.myc/queue.db
87
+ running #1 4s bun test ~/src/api session 6468c59d · orca term_efe4850f · pid 44815 · command pid 44827
88
+ waiting #2 3s bun run build ~/src/web session 6468c59d · orca term_efe4850f · pid 44850 (#1 in line)
89
+ ```
90
+
91
+ A waiting command says on stderr whom it waits for; past `--max-wait` it gives
92
+ up with exit code 9 and names what is ahead:
93
+
94
+ ```
95
+ myc run: waiting for a 'heavy' slot (1/1 busy, 1 waiting ahead), waited 0.0s of max 3s — held by 'bun test' in ~/src/api, session 6468c59d, orca term_efe4850f, pid 44815, running 13s
96
+ ```
97
+
98
+ A holder that dies — even by `SIGKILL` — frees its slot; a `myc run` nested
99
+ inside another one runs at once, in its parent's slot. One slot per lane by
100
+ default, `MYC_HEAVY_SLOTS=2` for two.
101
+
102
+ **Agents don't have to remember it.** `myc wire --queue-hook` installs a Claude
103
+ Code `PreToolUse` hook that rewrites a heavy Bash command into
104
+ `myc run -- <the same command>` before it runs. Heavy means a full test run or a
105
+ build: `bun test` with no paths, `bun run build` / `typecheck`, `npm` / `pnpm` /
106
+ `yarn` `test` and `build`, `cargo test` / `build`, `go test ./...`, `pytest`
107
+ with no paths, `make`. A targeted `bun test path/file.test.ts`, a command already
108
+ under `myc run`, a background one and a nested one pass untouched.
109
+ `MYC_QUEUE_HEAVY` replaces the list (`+…` adds to it, `off` turns the hook off).
110
+ It is opt-in: `wire` without the flag writes no such hook, and `unwire` removes
111
+ it. It is cheap, because it runs on every Bash call: a command that is not heavy
112
+ is let through by the host's own shell without starting bun or node — 3.4 ms at
113
+ the median and 4.3 ms at p99 in the run of 2026-09-11, against 30 ms for the
114
+ prime hook (`bun test packages/cli/src/hooks/queue-hook.multiprocess.test.ts`).
115
+
116
+ **`myc run` is not a way around permissions.** It runs whatever it is given, so
117
+ a queued command goes through without a question only when your own rules would
118
+ let the original command through — `Bash(bun test:*)` keeps `bun test` silent
119
+ under the queue as well. Otherwise Claude Code asks, and the question shows the
120
+ whole command; a deny or ask rule on the original command still holds. The same
121
+ goes for a `myc run -- <cmd>` an agent types itself. For the same reason `wire`
122
+ no longer writes the broad `Bash(myc:*)`: it allows myc's subcommands one by
123
+ one, and `run`, `statusline --then`, `wire` and `unwire` ask.
124
+
68
125
  ## What makes it different
69
126
 
70
127
  **Speed is a constraint, not an optimisation.** Every hot path has a budget
@@ -193,8 +250,12 @@ in git.** There is no server, no ACL and no team mode. Those are designed
193
250
  (`docs/design/03…`, `04…`, `05…`) and tracked, not implemented.
194
251
 
195
252
  Code intelligence is built in, and it is the same engine the alternatives use:
196
- tree-sitter, with grammars fetched on demand rather than shipped (all 36 weigh
197
- 49 MB against a 12 MB package). `myc code index` builds it — on this repository,
253
+ tree-sitter, with grammars fetched on demand rather than shipped. Symbols,
254
+ callers and code search work for TypeScript, TSX, JavaScript (js, jsx, mjs,
255
+ cjs) and Python — the languages myc has definition rules for. The grammar
256
+ package holds 36; a language is added as a pair, a rule and a catalog entry,
257
+ so a grammar that would yield no symbols is never offered. Every other file
258
+ still gets `code grep`, anchors and staleness. `myc code index` builds it — on this repository,
198
259
  826 files and 3 949 symbols in 904 ms — and four commands read it:
199
260
 
200
261
  ```