claude-use 4.4.0 → 5.0.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.
Files changed (36) hide show
  1. package/README.md +3 -0
  2. package/dist/cli.cjs +3382 -2595
  3. package/dist/index.cjs +3061 -0
  4. package/dist/index.mjs +2991 -0
  5. package/dist/types/cliError.d.ts +27 -0
  6. package/dist/types/config/classify.d.ts +49 -0
  7. package/dist/types/config/load.d.ts +42 -0
  8. package/dist/types/config/schema.d.ts +689 -0
  9. package/dist/types/config/store.d.ts +46 -0
  10. package/dist/types/frontdoor/capability.d.ts +19 -0
  11. package/dist/types/frontdoor/connect.d.ts +179 -0
  12. package/dist/types/frontdoor/ensure.d.ts +34 -0
  13. package/dist/types/frontdoor/probe.d.ts +13 -0
  14. package/dist/types/frontdoor/state.d.ts +50 -0
  15. package/dist/types/frontdoor/supervisor.d.ts +48 -0
  16. package/dist/types/headroom/ensure.d.ts +31 -0
  17. package/dist/types/headroom/state.d.ts +71 -0
  18. package/dist/types/headroom/supervisor.d.ts +102 -0
  19. package/dist/types/index.d.ts +18 -0
  20. package/dist/types/launcher/farm.d.ts +165 -0
  21. package/dist/types/launcher/guard.d.ts +57 -0
  22. package/dist/types/launcher/lock.d.ts +41 -0
  23. package/dist/types/launcher/ports.d.ts +133 -0
  24. package/dist/types/paths.d.ts +69 -0
  25. package/dist/types/resolve/conditions.d.ts +37 -0
  26. package/dist/types/resolve/decide.d.ts +45 -0
  27. package/dist/types/resolve/extends.d.ts +41 -0
  28. package/dist/types/resolve/flatten.d.ts +13 -0
  29. package/dist/types/resolve/match.d.ts +58 -0
  30. package/dist/types/resolve/pipeline.d.ts +30 -0
  31. package/dist/types/resolve/plan.d.ts +57 -0
  32. package/dist/types/resolve/projects.d.ts +61 -0
  33. package/dist/types/resolve/reconcile.d.ts +80 -0
  34. package/dist/types/resolve/types.d.ts +159 -0
  35. package/dist/types/resolve/walk.d.ts +85 -0
  36. 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, startConnectServer, runFrontDoorSupervisor, 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 front door's CONNECT surface and supervisor and the headroom 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