zai-cli 0.1.0__tar.gz
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.
- zai_cli-0.1.0/CHANGELOG.md +94 -0
- zai_cli-0.1.0/LICENSE +21 -0
- zai_cli-0.1.0/MANIFEST.in +2 -0
- zai_cli-0.1.0/PKG-INFO +722 -0
- zai_cli-0.1.0/README.md +665 -0
- zai_cli-0.1.0/pyproject.toml +125 -0
- zai_cli-0.1.0/scripts/release_preflight.py +169 -0
- zai_cli-0.1.0/setup.cfg +4 -0
- zai_cli-0.1.0/tests/test_agent.py +599 -0
- zai_cli-0.1.0/tests/test_browser.py +141 -0
- zai_cli-0.1.0/tests/test_code_runner.py +79 -0
- zai_cli-0.1.0/tests/test_config_main.py +337 -0
- zai_cli-0.1.0/tests/test_core.py +265 -0
- zai_cli-0.1.0/tests/test_errors.py +97 -0
- zai_cli-0.1.0/tests/test_hooks_skills_session.py +648 -0
- zai_cli-0.1.0/tests/test_input.py +148 -0
- zai_cli-0.1.0/tests/test_integrations_cli.py +378 -0
- zai_cli-0.1.0/tests/test_interactive.py +74 -0
- zai_cli-0.1.0/tests/test_mcp.py +232 -0
- zai_cli-0.1.0/tests/test_plugins.py +420 -0
- zai_cli-0.1.0/tests/test_process.py +73 -0
- zai_cli-0.1.0/tests/test_providers.py +544 -0
- zai_cli-0.1.0/tests/test_release_preflight.py +133 -0
- zai_cli-0.1.0/tests/test_search.py +129 -0
- zai_cli-0.1.0/tests/test_security.py +61 -0
- zai_cli-0.1.0/tests/test_settings_cli.py +410 -0
- zai_cli-0.1.0/tests/test_storage.py +61 -0
- zai_cli-0.1.0/tests/test_streaming.py +257 -0
- zai_cli-0.1.0/tests/test_tool_schema.py +41 -0
- zai_cli-0.1.0/tests/test_tools.py +345 -0
- zai_cli-0.1.0/tests/test_undo.py +72 -0
- zai_cli-0.1.0/tests/test_utilities.py +272 -0
- zai_cli-0.1.0/tests/test_vision.py +171 -0
- zai_cli-0.1.0/tests/test_watch.py +113 -0
- zai_cli-0.1.0/tests/test_workflows.py +212 -0
- zai_cli-0.1.0/zai/__init__.py +1 -0
- zai_cli-0.1.0/zai/__main__.py +4 -0
- zai_cli-0.1.0/zai/cli/__init__.py +1 -0
- zai_cli-0.1.0/zai/cli/common.py +16 -0
- zai_cli-0.1.0/zai/cli/integrations.py +319 -0
- zai_cli-0.1.0/zai/cli/interactive.py +518 -0
- zai_cli-0.1.0/zai/cli/settings.py +436 -0
- zai_cli-0.1.0/zai/cli/utilities.py +227 -0
- zai_cli-0.1.0/zai/cli/workflows.py +137 -0
- zai_cli-0.1.0/zai/commands/commit.md +24 -0
- zai_cli-0.1.0/zai/commands/explain.md +17 -0
- zai_cli-0.1.0/zai/commands/feature.md +34 -0
- zai_cli-0.1.0/zai/commands/fix.md +14 -0
- zai_cli-0.1.0/zai/commands/review.md +22 -0
- zai_cli-0.1.0/zai/config.py +307 -0
- zai_cli-0.1.0/zai/core/__init__.py +0 -0
- zai_cli-0.1.0/zai/core/agent.py +701 -0
- zai_cli-0.1.0/zai/core/cancellation.py +67 -0
- zai_cli-0.1.0/zai/core/commands.py +85 -0
- zai_cli-0.1.0/zai/core/context.py +299 -0
- zai_cli-0.1.0/zai/core/errors.py +125 -0
- zai_cli-0.1.0/zai/core/fallback.py +171 -0
- zai_cli-0.1.0/zai/core/hooks.py +115 -0
- zai_cli-0.1.0/zai/core/memory.py +57 -0
- zai_cli-0.1.0/zai/core/process.py +204 -0
- zai_cli-0.1.0/zai/core/repomap.py +381 -0
- zai_cli-0.1.0/zai/core/runtime.py +29 -0
- zai_cli-0.1.0/zai/core/security.py +33 -0
- zai_cli-0.1.0/zai/core/session.py +425 -0
- zai_cli-0.1.0/zai/core/storage.py +193 -0
- zai_cli-0.1.0/zai/core/streaming.py +157 -0
- zai_cli-0.1.0/zai/core/tool_schema.py +133 -0
- zai_cli-0.1.0/zai/core/undo.py +443 -0
- zai_cli-0.1.0/zai/core/watch.py +80 -0
- zai_cli-0.1.0/zai/main.py +210 -0
- zai_cli-0.1.0/zai/mcp/__init__.py +0 -0
- zai_cli-0.1.0/zai/mcp/client.py +431 -0
- zai_cli-0.1.0/zai/mcp/manager.py +118 -0
- zai_cli-0.1.0/zai/plugins/__init__.py +2 -0
- zai_cli-0.1.0/zai/plugins/base.py +49 -0
- zai_cli-0.1.0/zai/plugins/loader.py +404 -0
- zai_cli-0.1.0/zai/providers/__init__.py +22 -0
- zai_cli-0.1.0/zai/providers/anthropic.py +131 -0
- zai_cli-0.1.0/zai/providers/base.py +67 -0
- zai_cli-0.1.0/zai/providers/cerebras.py +57 -0
- zai_cli-0.1.0/zai/providers/gemini.py +119 -0
- zai_cli-0.1.0/zai/providers/groq.py +116 -0
- zai_cli-0.1.0/zai/providers/ollama.py +62 -0
- zai_cli-0.1.0/zai/providers/openai.py +124 -0
- zai_cli-0.1.0/zai/providers/openrouter.py +63 -0
- zai_cli-0.1.0/zai/providers/qwen.py +47 -0
- zai_cli-0.1.0/zai/skills/__init__.py +0 -0
- zai_cli-0.1.0/zai/skills/registry.py +52 -0
- zai_cli-0.1.0/zai/tools/__init__.py +0 -0
- zai_cli-0.1.0/zai/tools/browser.py +224 -0
- zai_cli-0.1.0/zai/tools/code_runner.py +49 -0
- zai_cli-0.1.0/zai/tools/files.py +53 -0
- zai_cli-0.1.0/zai/tools/git.py +38 -0
- zai_cli-0.1.0/zai/tools/search.py +157 -0
- zai_cli-0.1.0/zai/tools/vision.py +128 -0
- zai_cli-0.1.0/zai/ui/__init__.py +0 -0
- zai_cli-0.1.0/zai/ui/input.py +199 -0
- zai_cli-0.1.0/zai_cli.egg-info/PKG-INFO +722 -0
- zai_cli-0.1.0/zai_cli.egg-info/SOURCES.txt +101 -0
- zai_cli-0.1.0/zai_cli.egg-info/dependency_links.txt +1 -0
- zai_cli-0.1.0/zai_cli.egg-info/entry_points.txt +2 -0
- zai_cli-0.1.0/zai_cli.egg-info/requires.txt +42 -0
- zai_cli-0.1.0/zai_cli.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and the project uses [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-06-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- General DuckDuckGo HTML search adapter with structured results and bounded
|
|
13
|
+
response handling.
|
|
14
|
+
- Ruff, MyPy, and dependency-audit CI gates.
|
|
15
|
+
- A single package-version source in `zai/__init__.py`.
|
|
16
|
+
- Installed-wheel smoke tests across Linux, Windows, and macOS.
|
|
17
|
+
- Concurrent session persistence and invalid-schema recovery tests.
|
|
18
|
+
- Python 3.14 CI coverage and expanded MyPy checks for persistence modules.
|
|
19
|
+
- Deterministic streaming tests for six provider transports and HTTP status
|
|
20
|
+
validation for Ollama and OpenRouter streams.
|
|
21
|
+
- Vision input verification with 10 MB and 40-megapixel limits, plus explicit
|
|
22
|
+
Gemini-to-Groq fallback diagnostics.
|
|
23
|
+
- File/code execution through the active Python interpreter and deterministic
|
|
24
|
+
watch-mode lifecycle, filtering, and cooldown tests.
|
|
25
|
+
- Command-level coverage for built-in/plugin skills and Git status, log, diff,
|
|
26
|
+
commit, and review workflows.
|
|
27
|
+
- Command-level coverage for search, files, execution, repository questions,
|
|
28
|
+
vision, and browser utilities.
|
|
29
|
+
- Command-level coverage for MCP, plugin, and hook integration management.
|
|
30
|
+
- Command-level coverage for setup, models, memory, sessions, and undo
|
|
31
|
+
management.
|
|
32
|
+
- Release preflight checks for version/changelog consistency, built-in command
|
|
33
|
+
package data, artifact names/content, and a mandatory real repository URL
|
|
34
|
+
before publication.
|
|
35
|
+
- Verified project, issue tracker, and changelog URLs in package metadata.
|
|
36
|
+
- User-defined model aliases with validated provider transports, model IDs,
|
|
37
|
+
context windows, interactive completion, and fallback support.
|
|
38
|
+
- `zai model add`, `remove`, `info`, and `test` commands, plus configuration
|
|
39
|
+
schema migration.
|
|
40
|
+
- `zai model configure` with per-model timeout and retry policies for built-in
|
|
41
|
+
and custom aliases, normalized under configuration schema version 3.
|
|
42
|
+
- Normalized provider failures for authentication, quota, missing models,
|
|
43
|
+
timeout, network, and malformed responses, with the final fallback failure
|
|
44
|
+
retained in the user-facing error.
|
|
45
|
+
- Provider/model identity in successful chat, agent, and repository outputs.
|
|
46
|
+
- Global `--debug` traceback diagnostics and `--plain` non-streaming one-shot
|
|
47
|
+
output for scripts and CI.
|
|
48
|
+
- Cooperative cancellation tokens across provider fallback, agent turns,
|
|
49
|
+
subprocess execution, MCP requests, and plugin tool boundaries.
|
|
50
|
+
- Opt-in live integration coverage for provider-native tool calls, browser
|
|
51
|
+
screenshots, and filesystem MCP tool execution.
|
|
52
|
+
- The `zai-cli` distribution while retaining the `zai` command and Python
|
|
53
|
+
import package.
|
|
54
|
+
- Interactive and one-off AI chat with configurable provider fallback.
|
|
55
|
+
- Project-scoped file tools, command execution, repository maps, and context
|
|
56
|
+
management.
|
|
57
|
+
- Persistent sessions with search, rename, delete, resume, and Markdown/JSON
|
|
58
|
+
export.
|
|
59
|
+
- Inspectable multi-step undo, redo, retention limits, and conflict detection.
|
|
60
|
+
- Built-in skills, hooks, MCP integrations, and fingerprint-trusted plugins.
|
|
61
|
+
- Public-web browser automation with SSRF and filesystem boundary checks.
|
|
62
|
+
- Persistent terminal history, completion, multiline input, and cancellation.
|
|
63
|
+
|
|
64
|
+
### Security
|
|
65
|
+
|
|
66
|
+
- Required validated plugin manifests and allowlisted permission declarations
|
|
67
|
+
before local or packaged plugin code can load.
|
|
68
|
+
- Bound plugin trust fingerprints to both code and manifest content, and added
|
|
69
|
+
explicit install/enable confirmations.
|
|
70
|
+
- Disabled browser downloads and rejected oversized top-level browser
|
|
71
|
+
documents when their declared size exceeds 2 MB.
|
|
72
|
+
- Limited web-search responses to 1 MB.
|
|
73
|
+
- Restricted model-controlled filesystem writes to the active project.
|
|
74
|
+
- Validated native tool-call schemas and retained legacy compatibility.
|
|
75
|
+
- Executed commands without a shell and blocked destructive command patterns.
|
|
76
|
+
- Prevented implicit plugin execution and unsafe browser destinations.
|
|
77
|
+
|
|
78
|
+
### Known limitations
|
|
79
|
+
|
|
80
|
+
- Live provider, browser, and MCP checks require external credentials or
|
|
81
|
+
services and are not part of the default test suite.
|
|
82
|
+
- Browser automation requires Playwright and a separately installed Chromium
|
|
83
|
+
browser.
|
|
84
|
+
- Cooperative cancellation depends on provider SDK support.
|
|
85
|
+
- TestPyPI and PyPI publication require ownership of the selected package name
|
|
86
|
+
and configured trusted-publishing environments.
|
|
87
|
+
|
|
88
|
+
### Validation
|
|
89
|
+
|
|
90
|
+
- 440 non-live tests pass with a 75% CI coverage floor.
|
|
91
|
+
- Python 3.10 through 3.14 are covered by CI.
|
|
92
|
+
- Wheel and source distributions pass Twine metadata validation.
|
|
93
|
+
- Live Groq chat/tool calls, DuckDuckGo search, Playwright scrape/screenshot,
|
|
94
|
+
and filesystem MCP tool execution pass on Windows.
|
zai_cli-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zai contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|