claude-use 14.10.0 → 14.11.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/README.md +7 -3
- package/dist/cli.cjs +18150 -15734
- package/dist/index.cjs +2970 -1507
- package/dist/index.mjs +2942 -1480
- package/dist/types/index.d.ts +284 -45
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -91,9 +91,9 @@ The full mechanics, including the credential block, the merge algorithm, conditi
|
|
|
91
91
|
|
|
92
92
|
## CLI reference
|
|
93
93
|
|
|
94
|
-
Every command is `agent-shim <noun> <verb> [name] [options]`, over the nouns `identity`, `profile`, `pool`, `provider`, `model`, `rule` and `job`, plus the top-level `run`, `configure`, `check`, `doctor`, `usage`, `update` and the others; `claude @<identity>` is the same as `agent-shim run @<identity>` once `agent-shim shim enable` has run. The full list of commands with every flag is in [docs/cli-reference.md](docs/cli-reference.md#full-command-list), and `agent-shim --help` and `agent-shim <noun> --help` print it from the installed version.
|
|
94
|
+
Every command is `agent-shim <noun> <verb> [name] [options]`, over the nouns `identity`, `profile`, `pool`, `provider`, `model`, `route`, `rule` and `job`, plus the top-level `run`, `configure`, `check`, `doctor`, `usage`, `update` and the others; `claude @<identity>` is the same as `agent-shim run @<identity>` once `agent-shim shim enable` has run. The full list of commands with every flag is in [docs/cli-reference.md](docs/cli-reference.md#full-command-list), and `agent-shim --help` and `agent-shim <noun> --help` print it from the installed version.
|
|
95
95
|
|
|
96
|
-
Every `list`, `show`, `check`, `doctor` and `headroom status` prints text by default and JSON with `--json`, and so do the mutating commands (`add`, `set`, `remove` and `use` on identities, profiles, providers, pools and rules), which print one object naming the `action`, the `kind`, the `name` and, for a creation or update, the stored `value`. `identity rename` prints its report of what it rewrote (and with `--move` moved) as the `value`, with the `action` `planned` under `--dry-run`. Prompts appear only when standard input is a terminal; without one, a command that needs input fails with the option that supplies it (a `remove` needs `--yes`). Failures print as `agent-shim: <message>` and exit 1, usage errors exit 2, a selected provider or identity whose credential block yields no token exits 64, and `AGENT_SHIM_DEBUG=1` adds stack traces to unexpected errors. `agent-shim completion <bash|zsh|fish>` prints a shell completion script.
|
|
96
|
+
Every `list`, `show`, `check`, `doctor` and `headroom status` prints text by default and JSON with `--json`, and so do the mutating commands (`add`, `set`, `remove` and `use` on identities, profiles, providers, pools, routes and rules), which print one object naming the `action`, the `kind`, the `name` and, for a creation or update, the stored `value`; `route remove` also names each key it took as `removed`. `identity rename` prints its report of what it rewrote (and with `--move` moved) as the `value`, with the `action` `planned` under `--dry-run`. Prompts appear only when standard input is a terminal; without one, a command that needs input fails with the option that supplies it (a `remove` needs `--yes`). Failures print as `agent-shim: <message>` and exit 1, usage errors exit 2, a selected provider or identity whose credential block yields no token exits 64, and `AGENT_SHIM_DEBUG=1` adds stack traces to unexpected errors. `agent-shim completion <bash|zsh|fish>` prints a shell completion script.
|
|
97
97
|
|
|
98
98
|
`agent-shim check [path]` resolves the full cascade for a directory without touching the farm, and is the primary way to answer "why is X shared or hidden here". `agent-shim doctor` audits the whole `~/.agent-shim` config graph at once: every identity (and every link in its farm that leads nowhere, which `agent-shim identity resync <name>` repairs without launching), profile, `extends` chain, provider (naming the exact replacement for a file still in the format before the credential block) and directory rule, plus whether the right `agent-shim` is the one actually on `PATH`.
|
|
99
99
|
|
|
@@ -118,6 +118,8 @@ src/
|
|
|
118
118
|
config/ # Zod schemas, cosmiconfig loading, category classification, atomic JSON store
|
|
119
119
|
index.ts # the library surface (see below): resolver, farm sync, headroom routing, the ambient-credential guard
|
|
120
120
|
schema/ # published JSON Schemas, generated by `pnpm schema`
|
|
121
|
+
conformance/ # language-neutral cases every implementation runs; the format is in conformance/README.md
|
|
122
|
+
rust/ # the Rust workspace, built and checked through scripts/rust.sh
|
|
121
123
|
scripts/build.mts # esbuild bundle, then `node --build-sea`
|
|
122
124
|
install.sh # downloads, verifies, and installs the latest release binary
|
|
123
125
|
```
|
|
@@ -140,6 +142,8 @@ The full CI pipeline (why the six platform builds also run on every PR, the sema
|
|
|
140
142
|
|
|
141
143
|
The resolver's cascade and materialisation logic is pure, taking filesystem, git, and environment facts as an injected parameter, so it is unit-tested extensively with fakes rather than a real filesystem, `git`, or `~/.agent-shim`. `launcher.ts`, `check.ts`, and `doctor.ts` each get their own coverage for the real side effects the resolver's purity does not reach: symlink and materialised-directory writes, spawning the real `claude` binary, and the ambient-credential guard.
|
|
142
144
|
|
|
145
|
+
The pure helpers' tests are cases of the JSON corpus in [conformance/](conformance/README.md), which `pnpm test` runs through the TypeScript runner in `conformance/runner/`; a new test for a module whose tests have moved there is a case, not a unit test. The Rust workspace is checked by `sh scripts/rust.sh fmt|clippy|test` and `sh scripts/rust.sh xtask lint-config`, the dependency allowlist by `sh scripts/rust.sh deny`, and `sh scripts/rust.sh xtask corpus scrub-check` searches the corpus for anything shaped like a real credential, identifier or personal path.
|
|
146
|
+
|
|
143
147
|
The full list of test cases, including the two-phase merge algorithm, conditional entries, farm reconciliation, and every command's own edge cases, is in [docs/testing.md](docs/testing.md).
|
|
144
148
|
|
|
145
149
|
## Development
|
|
@@ -155,7 +159,7 @@ pnpm schema # regenerate schema/*.schema.json from src/config/schema.ts; CI
|
|
|
155
159
|
|
|
156
160
|
Run a single test file directly with `pnpm exec vitest run <path>`. Tests never touch a real identity: `vitest.config.ts` sets `AGENT_SHIM_HOME` to a throwaway directory, and a setup file refuses to run at all if that variable is unset or resolves to the real `~/.agent-shim`.
|
|
157
161
|
|
|
158
|
-
Commits are gated by Husky hooks: `commit-msg` enforces conventional-commit format, `pre-commit` runs `eslint --fix` on staged files and rejects merge/squash commits and mass deletions on `main`, and `pre-push` runs typecheck, the schema drift check, knip, the tests related to what the push changes and the tests that read the repository's own files (`*.repo.test.ts
|
|
162
|
+
Commits are gated by Husky hooks: `commit-msg` enforces conventional-commit format, `pre-commit` runs `eslint --fix` on staged files and rejects merge/squash commits and mass deletions on `main`, and `pre-push` runs typecheck, the schema drift check, knip, the tests related to what the push changes and the tests that read the repository's own files (`*.repo.test.ts`, except the kept-tests guard, which runs only when the push changes `conformance/`, `src/conformance/` or a test file; CI runs the full suite) and also rejects a push that would delete more than 100 files on the remote.
|
|
159
163
|
|
|
160
164
|
A fresh clone needs one extra step before committing anything, since git stores filter definitions in `.git/config` rather than in the repository:
|
|
161
165
|
|