mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
Add `dev agent {list,run,show}` over the canonical `/v1/agents` registry
(cloud/clients/agents), reusing the signed-in hanzo.id session for auth.
- New crate `agents-client` mirrors `cloud-tasks-client`: wire types
(Agent/AgentDetail/Run matching the server contract), an `AgentsBackend`
trait, and a reqwest `HttpClient` that targets `{base}/v1/agents…`,
injects the bearer JWT via `codex_api::SharedAuthProvider`, and quotes
server errors honestly. A recorded error run (HTTP 502 with a Run body)
is surfaced as the Run, not swallowed as a bare status.
- New `cli/src/agent_cmd.rs` module wires the subcommand like the existing
`cloud` command: resolves base URL (default https://api.hanzo.ai,
override CODEX_AGENTS_BASE_URL) + AuthManager from the loaded Config,
fails secure when not signed in. `list`/`run`/`show`, each with `--json`;
`run` reads the prompt from an arg or stdin.
- Cloud-agent invocation is additive and orthogonal to the local
config-defined subprocess agents; no shared state.
Tests: 8 wiremock unit tests (list/get/run happy + recorded-error 502 +
503 server error + bearer header + path encoding). `cargo build`, `cargo
clippy -D warnings`, and `cargo test` are clean for the touched crates.
Bumps @hanzo/dev 0.6.91 -> 0.6.92 (patch) so a release can publish.
45 lines
1.4 KiB
JSON
45 lines
1.4 KiB
JSON
{
|
|
"name": "@hanzo/dev",
|
|
"version": "0.6.92",
|
|
"license": "Apache-2.0",
|
|
"description": "Hanzo AI coding assistant - intelligent CLI for developers",
|
|
"bin": {
|
|
"dev": "bin/dev.js",
|
|
"hanzo": "bin/dev.js"
|
|
},
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=16"
|
|
},
|
|
"files": [
|
|
"bin/dev.js",
|
|
"postinstall.js",
|
|
"scripts/preinstall.js",
|
|
"scripts/windows-cleanup.ps1",
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"preinstall": "node scripts/preinstall.js",
|
|
"postinstall": "node postinstall.js",
|
|
"prepublishOnly": "node -e \"const fs=require('fs'),path=require('path'); const repoGit=path.join(__dirname,'..','.git'); const inCi=process.env.GITHUB_ACTIONS==='true'||process.env.CI==='true'; if(fs.existsSync(repoGit) && !inCi){ console.error('Refusing to publish from dev-cli. Publishing happens via release.yml.'); process.exit(1);} else { console.log(inCi ? 'CI publish detected.' : 'Publishing staged package...'); }\""
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/hanzoai/dev.git"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"dependencies": {},
|
|
"devDependencies": {
|
|
"prettier": "^3.3.3"
|
|
},
|
|
"optionalDependencies": {
|
|
"@hanzo/dev-darwin-arm64": "0.6.92",
|
|
"@hanzo/dev-darwin-x64": "0.6.92",
|
|
"@hanzo/dev-linux-x64-musl": "0.6.92",
|
|
"@hanzo/dev-linux-arm64-musl": "0.6.92",
|
|
"@hanzo/dev-win32-x64": "0.6.92"
|
|
}
|
|
}
|