13 Commits
Author SHA1 Message Date
zeekayandhanzo-dev 6f990cba1e sdk: ship the generated cloud client — /v1/admin/plugins is reachable
Publish PyPI / Build and publish (push) Failing after 58s
pkg/hanzoai/cloud/ (2163 files) has existed on disk untracked and never shipped.
This commits it, so the operator surface cloud already serves is finally callable:

    AdminApi.plugin_admin_plugins / _enable_plugin / _disable_plugin / _reload_plugin

Generated by hanzoai/openapi `generate.py python` from hanzo.yaml (1885 paths,
69 merged per-service specs). Consumed: cloud 8143fc0e, openapi f581a0e.

One driver, so delete the second one. scripts/generate.sh fetched the spec itself
and then did `rm -rf pkg/hanzoai` + copied generator output over it — which would
have deleted the hand-written config/mcp/protocols/session/zap/api_response
modules AND the new cloud/ tree. Nothing referenced it. hanzoai/openapi's
generate.py + sdks.yaml is the only way now; LLM.md records the pipeline.

`import hanzoai.cloud` raised ImportError as generated. hanzo.yaml has 23 tag
groups differing only by case; openapi-generator maps both spellings to one
module, and for AI/ai, API Keys/api-keys and MCP/mcp it then emits imports for
classes it never wrote (AiApi vs AIApi). Stripped those 9 dead lines. The same
collision silently drops 127 of the 411 operations in those groups — that one is
upstream and only a single tag spelling per service fixes it; noted in LLM.md.

Version: 3.1.1 -> 3.1.2, patch only. pkg/hanzoai/__init__.py said 1.0.0 (the
generator default) — now resolved from the installed distribution, same pattern
as hanzo_cli/hanzo_iam in 4a713aeb. uv.lock refreshed to match committed pkg
versions. test_smoke.py locks the cloud import, the four plugin ops, and that
__version__ equals the distribution: 6 passed.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-28 10:27:07 -07:00
55edde1660 fix(generate): authenticated spec fetch — hanzoai/openapi is private (#49)
raw.githubusercontent.com/hanzoai/openapi/main/hanzo.yaml 404s (openapi is a
private repo), so every spec-update regen failed at the fetch. Fetch hanzo.yaml
through the GitHub Contents API with a SPEC_TOKEN (repo/contents:read on
hanzoai/openapi) instead. Local SPEC=... override unchanged.

Co-authored-by: zeekay <ai@hanzo.ai>
2026-07-18 12:31:17 -07:00
648e73549e feat(hanzoai): regenerate client from unified OpenAPI spec (retire Stainless) (#45)
Replace the Stainless-generated `hanzoai` client (188 legacy LLM-gateway
endpoints) with an openapi-generator `python` (urllib3 + pydantic v2)
client built from hanzoai/openapi `hanzo.yaml` — the full unified
api.hanzo.ai/v1 surface (493 API groups, 1710 models, all /v1 products).

- scripts/generate.sh: the one-way generator; emits only pkg/hanzoai
  (other pkg/hanzo-* packages untouched).
- pyproject: deps -> urllib3 / python-dateutil / pydantic>=2 /
  typing-extensions; version 2.2.3 -> 3.0.0 (breaking surface change).
- tests/: Stainless client tests replaced with a surface smoke test.
- .github/workflows/generate.yml: regenerate on openapi spec-update.
- Base URL https://api.hanzo.ai, Bearer hk- / JWT auth.

Verified: wheel hanzoai-3.0.0 builds, installs into a clean venv, and
`import hanzoai` + product API construction succeed.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-04 20:07:32 -07:00
hanzo-dev 0a61b93bcc feat: hanzo-dev Python TUI + LSP + hooks + sandbox + vim + git + multi-auth + full parity
Rename hanzo-repl → hanzo-dev to match @hanzo/dev (Rust/TS).

New packages:
- hanzo-lsp: async LSP client (diagnostics, go-to-def, references, context enrichment)
- hanzo-hooks: pre/post tool use hooks (shell scripts, exit-code deny)
- hanzo-sandbox: container detection, filesystem isolation, Linux unshare

hanzo-dev TUI:
- Vim keybindings (Normal/Insert/Visual/Command modes, 37 tests)
- Git slash commands (/branch /commit /worktree /diff /stash, 13 tests)
- All slash commands at parity: /model /permissions /clear /resume /memory
  /init /export /session /plan /solve /code /auto /fast /remote-control
- Multi-provider auth: Anthropic OAuth, OpenAI device code, Hanzo PKCE, auto-detect

Auth:
- login_with_anthropic() — PKCE via console.hanzo.ai
- login_with_openai() — device code flow via auth.openai.com
- login_auto() — env var detection + saved credential fallback
- OAuthCredentialStore supports provider keys (hanzo/anthropic/openai)

Parity test suite (38 tests): SSE, MCP normalization, permissions, compaction,
token usage, PKCE RFC vector, config, backoff, session roundtrip, hooks.

348 tests total, 0 failures across Python + Rust + Universe E2E.
2026-04-01 10:41:46 -07:00
Zoo Queenandhanzo-dev 8bd394fd15 style: auto-fix ruff lint and format for Python 3.12
Run ruff check --fix and ruff format across the repo to fix ~495
auto-fixable lint errors (mostly I001 import sorting) and reformat
225 files to match the py312 target.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-02-20 21:29:31 -08:00
Zach Kelling d10d3734aa fix: run ruff check --fix and format across entire codebase 2025-12-26 04:31:06 -08:00
hanzo-dev 83f8086558 feat: Add STRICT CI/CD quality gates - NO MORE TODO/STUB BULLSHIT
- Added comprehensive anti-stub test suite that detects:
  - TODO/FIXME/STUB/FAKE/UNFINISHED patterns
  - Empty functions with only pass/ellipsis
  - NotImplementedError raises
  - Mock implementations in production
  - Debug prints in production
  - Skipped tests

- Created strict GitHub Actions workflow that:
  - BLOCKS deployment if ANY forbidden patterns found
  - Requires ALL tests to pass (no skips allowed)
  - Runs security scans
  - Verifies all functions are implemented
  - Only allows PyPI publish after ALL checks pass

- Added pre-commit hooks to catch issues locally before push
- Updated Makefile with 'make check' that runs all quality gates
- Fixed stub function issue in tools/__init__.py

This ensures we NEVER deploy incomplete or stub code to production again!
2025-09-17 02:55:28 +00:00
hanzo-dev cdbcb26e54 Fix all SDK tests - achieve 100% pass rate
- Remove dependency on external Prism mock server
- Create comprehensive respx mock fixtures for all endpoints
- Fix SDK bugs in organization.py (incorrect return types)
- Update test script to use respx mocks instead of Prism
- All 3,141 tests now pass without external dependencies
2025-08-14 01:52:01 -05:00
hanzo-dev d64fedfe04 Fix all test issues and achieve 100% test pass rate
- Remove all unconditional pytest.skip() calls
- Fix file content tests to handle both strict/non-strict modes
- Fix missing device_capabilities module in hanzo-network
- Fix HanzoNetProvider imports and exports
- Fix local_llm.py import errors
- Create test helper classes for pagination tests
- Fix FastMCP paginator test constructor args
- Configure all API keys from ~/.zsh/after.zsh
- All tests now pass or skip conditionally based on actual requirements
2025-08-12 16:19:34 -05:00
hanzo-dev 405c433b16 Update publish scripts 2025-08-08 17:04:47 -05:00
hanzo-dev eca8bac8e5 Update python monorepo 2025-07-27 03:02:44 -05:00
stainless-app[bot] db09188901 feat(api): update via SDK Studio (#4) 2025-03-15 03:56:11 +00:00
stainless-app[bot] 9626b2b0d6 initial commit 2025-03-15 03:31:14 +00:00