@aistastudio/myc 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +49 -1
  2. package/dist/myc.js +768 -532
  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.3 (schema 1)
34
+ myc --version # myc 0.3.4 (schema 1)
35
35
  ```
36
36
 
37
37
  The embedding model is **not** downloaded during install. Semantic search is
@@ -56,6 +56,7 @@ writing a config that silently won't start.
56
56
  ```bash
57
57
  ./dist/myc init # .myc/ + SQLite + migrations in this repo
58
58
  ./dist/myc wire # hooks for Claude Code / Codex / opencode / Kimi
59
+ ./dist/myc wire --scope user # the same for agents in git worktrees (Claude Code's user layer)
59
60
  ./dist/myc ready # what can be picked up right now
60
61
  ./dist/myc remember "why X, not Y" # record a fact or decision
61
62
  ./dist/myc recall "how retrieval works"
@@ -65,6 +66,25 @@ writing a config that silently won't start.
65
66
 
66
67
  Full command list: `./dist/myc --help`.
67
68
 
69
+ **Agents in git worktrees.** `myc wire` writes into the project:
70
+ `.claude/settings.json`, `.mcp.json`. An agent that orca starts in a git
71
+ worktree of a nested repository (`~/orca/workspaces/<repo>/<branch>`) lives in
72
+ the team's tree, where those files are not, even though `myc` itself finds the
73
+ main copy's workspace from there. `myc wire --scope user` puts the same into
74
+ Claude Code's user layer, which every session reads:
75
+ `~/.claude/helpers/myc-hooks.mjs`, SessionStart/PreCompact/PostToolUse hooks and
76
+ `Bash(myc <command>:*)` rules in `~/.claude/settings.json` (merged node by node;
77
+ the hooks of orca, herdr and other tools stay byte for byte), the skill in
78
+ `~/.claude/skills/myc`, and the MCP server through `claude mcp add --scope user`.
79
+ Before anything else the helper checks, without starting myc, whether there is
80
+ a workspace here (a git worktree is resolved through its main copy), and stays
81
+ silent when there is none or the project wires myc itself: in a project without
82
+ myc the hook costs one node start, and prime never arrives twice. Outside a
83
+ workspace the MCP server offers zero tools and no instructions. The user's
84
+ `statusLine` is never touched (it belongs to orca), and `--hook-mode replace`
85
+ is refused here. The journal is `~/.myc/wire-user.json`; `myc unwire --scope
86
+ user` restores the settings node by node and removes the MCP server.
87
+
68
88
  ## Heavy commands take turns
69
89
 
70
90
  Several agents on one machine — in one tree or in neighbouring projects — each
@@ -266,6 +286,34 @@ myc code grep "<lit>" exhaustive, every occurrence; --in <path> narrows it
266
286
  myc skeleton <file> the file's API — 26× cheaper than reading it
267
287
  ```
268
288
 
289
+ The file list is git's own (`git ls-files`, so `.gitignore` applies; a tree
290
+ without git is walked, and the command says so). On top of any list,
291
+ secret-named files are never indexed, whatever `.gitignore` says: `.env` and
292
+ `.env.*` (templates like `.env.example` are indexed), `*.pem`, `*.key`,
293
+ keystores, private SSH keys, `.npmrc`, `.netrc` and other credential files —
294
+ `code index` counts them without naming them, and `code grep` refuses to read one.
295
+
296
+ **Nested repositories and git worktrees.** A workspace can be an ecosystem: a
297
+ root that is a git repository with independent repositories inside it (not
298
+ submodules). It has one code index, built from the root — one row per file,
299
+ paths like `messaging-server/server/src/x.ts`. From inside a nested
300
+ repository every code command answers from that repository's part of the
301
+ root index, with paths relative to the repository you are in; from the root
302
+ the answers do not change. `myc code index` run inside a nested repository
303
+ refreshes its part of the root index instead of building a second copy of the
304
+ same files, and so does the background refresh. A git worktree — even one
305
+ outside the workspace tree — is answered from the index of the main checkout:
306
+ there is no index per branch. When the worktree is on another commit, or has
307
+ uncommitted changes to tracked files, every answer carries
308
+ `WARN code_index.worktree_divergent` naming both branches, because lines and
309
+ spans may not match your files. `code grep` reads the worktree's files (the
310
+ line numbers are yours, the owning symbols come from the index); `skeleton`
311
+ shows the main copy's declarations when your copy differs from what the index
312
+ saw, and says so. When nothing covers the repository, the hint is the command
313
+ for the workspace root (`myc -C <root> code index`), not one that would build a
314
+ duplicate. Anchors set from the root and from inside a repository are stored
315
+ under different keys; `code symbol` reads both.
316
+
269
317
  Anchors tie knowledge to a span and follow the code as it moves; that half is
270
318
  language-agnostic and was verified on Python as well as TypeScript.
271
319