claude-use 4.3.0 → 4.5.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 +3 -0
- package/dist/cli.cjs +1416 -1128
- package/dist/index.cjs +2748 -0
- package/dist/index.mjs +2682 -0
- package/dist/types/cliError.d.ts +27 -0
- package/dist/types/config/classify.d.ts +49 -0
- package/dist/types/config/load.d.ts +42 -0
- package/dist/types/config/schema.d.ts +689 -0
- package/dist/types/config/store.d.ts +46 -0
- package/dist/types/frontdoor/state.d.ts +19 -0
- package/dist/types/headroom/ensure.d.ts +32 -0
- package/dist/types/headroom/mitm.d.ts +138 -0
- package/dist/types/headroom/state.d.ts +73 -0
- package/dist/types/headroom/supervisor.d.ts +107 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/launcher/farm.d.ts +165 -0
- package/dist/types/launcher/guard.d.ts +57 -0
- package/dist/types/launcher/lock.d.ts +41 -0
- package/dist/types/launcher/ports.d.ts +121 -0
- package/dist/types/paths.d.ts +67 -0
- package/dist/types/resolve/conditions.d.ts +37 -0
- package/dist/types/resolve/decide.d.ts +45 -0
- package/dist/types/resolve/extends.d.ts +41 -0
- package/dist/types/resolve/flatten.d.ts +13 -0
- package/dist/types/resolve/match.d.ts +58 -0
- package/dist/types/resolve/pipeline.d.ts +30 -0
- package/dist/types/resolve/plan.d.ts +57 -0
- package/dist/types/resolve/projects.d.ts +61 -0
- package/dist/types/resolve/reconcile.d.ts +80 -0
- package/dist/types/resolve/types.d.ts +159 -0
- package/dist/types/resolve/walk.d.ts +85 -0
- package/package.json +16 -2
package/README.md
CHANGED
|
@@ -138,6 +138,7 @@ src/
|
|
|
138
138
|
configure.ts, check.ts, doctor.ts, claudeShim.ts # interactive picker, dry-run inspector, whole-tree audit, `claude` shim
|
|
139
139
|
resolve/ # the pure cascade resolver: flatten, decide, extends, walk, plan, reconcile
|
|
140
140
|
config/ # Zod schemas, cosmiconfig loading, category classification, atomic JSON store
|
|
141
|
+
index.ts # the library surface (see below): resolver, farm sync, headroom routing, the ambient-credential guard
|
|
141
142
|
schema/ # published JSON Schemas, generated by `pnpm schema`
|
|
142
143
|
scripts/build.mts # esbuild bundle, then `node --build-sea`
|
|
143
144
|
install.sh # downloads, verifies, and installs the latest release binary
|
|
@@ -145,6 +146,8 @@ install.sh # downloads, verifies, and installs the latest releas
|
|
|
145
146
|
|
|
146
147
|
Every custom error extends `CliError`; `main()`'s top-level catch prints its message alone for an expected failure and a full stack trace for anything else. Config validation is Zod throughout, with `categories` a closed shape and `entries` an open, glob-capable record, since the two fields have opposite key cardinality. The resolver itself is pure: it takes filesystem, git, and environment facts as an injected parameter rather than reading them itself, which is what makes it unit-testable with fakes.
|
|
147
148
|
|
|
149
|
+
The package also publishes a library surface alongside the binary: `import { resolveDecisions, resyncFarm, startMitmServer, runSupervisor, detectAmbientCredential } from "claude-use"` (ESM or CJS, with type declarations). It re-exports only the pure, port-injected modules, so another tool can resolve identities, sync a farm, run the headroom MITM proxy and supervisor, or check the ambient-credential guard in process without the CLI installed. Nothing reachable from it imports `commander` or `@clack/prompts`, and the build fails if that stops being true. Its dependencies stay external, installed through the package's own `dependencies`.
|
|
150
|
+
|
|
148
151
|
The full source layout with per-file responsibilities, the schema design rationale, why config loading uses cosmiconfig's `load()` rather than `search()`, and the resolver's merge and materialisation mechanics are in [docs/architecture.md](docs/architecture.md).
|
|
149
152
|
|
|
150
153
|
## Releases and builds
|