callai-cli 0.9.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.
Files changed (34) hide show
  1. callai_cli-0.9.0/.python-version +1 -0
  2. callai_cli-0.9.0/CHANGELOG.md +265 -0
  3. callai_cli-0.9.0/LICENSE +201 -0
  4. callai_cli-0.9.0/MANIFEST.in +21 -0
  5. callai_cli-0.9.0/PKG-INFO +218 -0
  6. callai_cli-0.9.0/README.md +178 -0
  7. callai_cli-0.9.0/pyproject.toml +148 -0
  8. callai_cli-0.9.0/setup.cfg +4 -0
  9. callai_cli-0.9.0/src/callai/__init__.py +37 -0
  10. callai_cli-0.9.0/src/callai/__main__.py +8 -0
  11. callai_cli-0.9.0/src/callai/adapters/__init__.py +82 -0
  12. callai_cli-0.9.0/src/callai/adapters/base.py +190 -0
  13. callai_cli-0.9.0/src/callai/adapters/claude_code.py +194 -0
  14. callai_cli-0.9.0/src/callai/adapters/codex.py +155 -0
  15. callai_cli-0.9.0/src/callai/adapters/grok.py +207 -0
  16. callai_cli-0.9.0/src/callai/adapters/hermes.py +112 -0
  17. callai_cli-0.9.0/src/callai/adapters/opencode.py +186 -0
  18. callai_cli-0.9.0/src/callai/adapters/pi.py +179 -0
  19. callai_cli-0.9.0/src/callai/api.py +134 -0
  20. callai_cli-0.9.0/src/callai/cli.py +674 -0
  21. callai_cli-0.9.0/src/callai/config.py +273 -0
  22. callai_cli-0.9.0/src/callai/errors.py +65 -0
  23. callai_cli-0.9.0/src/callai/fanout.py +166 -0
  24. callai_cli-0.9.0/src/callai/py.typed +0 -0
  25. callai_cli-0.9.0/src/callai/request.py +70 -0
  26. callai_cli-0.9.0/src/callai/result.py +95 -0
  27. callai_cli-0.9.0/src/callai/runner.py +233 -0
  28. callai_cli-0.9.0/src/callai_cli.egg-info/PKG-INFO +218 -0
  29. callai_cli-0.9.0/src/callai_cli.egg-info/SOURCES.txt +32 -0
  30. callai_cli-0.9.0/src/callai_cli.egg-info/dependency_links.txt +1 -0
  31. callai_cli-0.9.0/src/callai_cli.egg-info/entry_points.txt +2 -0
  32. callai_cli-0.9.0/src/callai_cli.egg-info/requires.txt +8 -0
  33. callai_cli-0.9.0/src/callai_cli.egg-info/top_level.txt +1 -0
  34. callai_cli-0.9.0/uv.lock +309 -0
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,265 @@
1
+ # Changelog
2
+
3
+ All notable changes to callai are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - The banner shows both install commands (`pip install callai-cli`, `uv tool install callai-cli`), in one box
13
+ (option A, default) or as stacked chips (option B). See
14
+ [`src/tools/banner/CHANGELOG.md`](src/tools/banner/CHANGELOG.md).
15
+
16
+ ## [0.9.0] - 2026-11-04
17
+
18
+ ### Changed
19
+
20
+ - `callai.__version__` comes from the installed `callai-cli` metadata, so `pyproject.toml` is the only place
21
+ the version is written. A source tree that isn't installed reports `0.0.0+unknown`; run
22
+ `uv sync --extra test --extra dev` after cloning.
23
+ - Tests run on GitHub only on pushes to `master`, on manual dispatch, and on pull requests labelled
24
+ `ci::run-tests` (`run-tests-on-label.yml` calls `tests.yml`).
25
+ - uv ignores packages released in the last 5 days (`[tool.uv] exclude-newer = "5 days"`).
26
+ - callai now lives in its own repository, [sugatoray/callai](https://github.com/sugatoray/callai), imported
27
+ from `sugatoray/devx` (`src/experiments/expt_callai`) at 0.8.0. Paths and links in the docs, the HTML docs
28
+ builder and the project notes point at this repository; `pyproject.toml` gains `[project.urls]`.
29
+
30
+ ### Added
31
+
32
+ - `make docs.html` header: a GitHub button (links to https://github.com/sugatoray/callai, no branch) next to the
33
+ light/dark toggle, and a magnifying-glass icon in the search box. On phones the icon replaces the
34
+ "Search the docs" placeholder text, which no longer fits.
35
+ - `make docs.html` opens the landing page with the project banner: its HTML and CSS, without the editing
36
+ features, copied from `src/tools/banner/callai-banner.html` and scaled to the column width (live text, not an
37
+ image; the page stays at about 190 KB). `build_docs_html.py --banner PATH` picks another banner page, and
38
+ `--no-banner` leaves it out.
39
+ - Packaging through uv: `make pkg.build` (sdist + wheel in `dist/`), `make pkg.publish` (needs
40
+ `UV_PUBLISH_TOKEN`; `PUBLISH_URL` for TestPyPI), and `make pkg.install.e`, `pkg.install.local` and
41
+ `pkg.install.pypi`. `MANIFEST.in` lists what the sdist ships. The wheel ships `py.typed`, and
42
+ `pyproject.toml` has more PyPI classifiers, including `Typing :: Typed`. `.editorconfig` added.
43
+ - The docs are published on GitHub Pages: `.github/workflows/docs.yml` builds `make docs.html` and deploys it
44
+ on pushes to `master` that touch the docs, or by hand on any branch.
45
+ - Agent skills for contributors (scrolls memory, `create-lib-docs`, `create-issues-update-pr`) from
46
+ [sugatoray/aiskills](https://github.com/sugatoray/aiskills), installed in `.agents/skills/` and pinned in
47
+ `skills-lock.json`.
48
+ - A maintainer tool that builds the callai-cli banner (`make maint.banner`); see
49
+ [`src/tools/banner/CHANGELOG.md`](src/tools/banner/CHANGELOG.md). It is not packaged.
50
+ - Tested on Python 3.11, 3.12, 3.13 and 3.14. `make test.matrix` runs the suite once per version, each in an
51
+ isolated environment that uv creates (set `PYTHON_VERSIONS` to choose); `make test` runs it on the
52
+ development Python, now pinned to 3.11 in `.python-version`. A GitHub Actions workflow
53
+ (`.github/workflows/tests.yml`) runs the same matrix plus ruff and interrogate. `pyproject.toml` lists the four versions as classifiers; `requires-python` stays
54
+ `>=3.11` (no upper cap).
55
+
56
+ ### Fixed
57
+
58
+ - `test_old_tool_flag_is_gone` failed on Python 3.13, whose `--help` prints `-n, --name HARNESS_NAME`
59
+ instead of `-n HARNESS_NAME, --name HARNESS_NAME`. It now checks the parser's options directly. The
60
+ suite passes on 3.11 and 3.13.
61
+
62
+ ## [0.8.0] - 2026-11-01
63
+
64
+ The docs as one HTML page. No changes to callai itself; nothing here breaks existing use.
65
+
66
+ ### Added
67
+
68
+ - `make docs.html` bundles `docs/callai/` into one self-contained HTML page (`build/docs.html`): a tab per
69
+ docs section, a page list, an on-this-page outline, search, and a light/dark toggle. The builder and
70
+ template are in `docs/site/`; it fails if a page isn't linked from the docs' landing page.
71
+
72
+ ## [0.7.0] - 2026-11-01
73
+
74
+ User documentation. No code changes; nothing here breaks existing use.
75
+
76
+ ### Added
77
+
78
+ - User documentation in `docs/callai/` (32 pages), written with the `/create-lib-docs` skill (now published in [sugatoray/aiskills](https://github.com/sugatoray/aiskills)).
79
+ - **Sections:** Getting Started, an 8-step tutorial, 6 how-to guides, Concepts with a glossary,
80
+ a full reference (CLI, Python API, output formats, configuration, harnesses, every error message),
81
+ and a FAQ.
82
+ - **Diagrams:** 5 SVGs, each with a text equivalent.
83
+ - **For AI agents:** `llms.txt` and `llms-full.txt`.
84
+ - **Checks:** every example was run against the real harness CLIs connected to the stub model, and
85
+ the `--dry-run` examples are checked mechanically.
86
+
87
+ ## [0.6.0] - 2026-10-31
88
+
89
+ Resume sessions, a Python API (`callai.run`), and fan-out to several harnesses with `-n a/b`, `-n a,b`
90
+ or `-n all`. Nothing here breaks existing use.
91
+
92
+ ### Added
93
+
94
+ - `--resume SESSION_ID` and `--continue`: continue a session (the `session_id` a run reported) or the
95
+ harness's most recent one, mapped to each harness's own flags (codex: `exec ... resume ID|--last`).
96
+ Checked with every harness against the stub model: the resumed request carries the earlier turns.
97
+ `--continue` is refused for hermes, which only continues its interactive sessions. No `-c` short
98
+ form, because `-c` is `--command`.
99
+ - Python API: `callai.run(harness_name, prompt, *, model, cwd, timeout, permission, system_prompt,
100
+ extra_args, resume, continue_session, binary, on_event)` returns the `-o json` result; `on_event` gets
101
+ the `-o stream-json` events live. It reads no `CALLAI_*` variables or config file. `Result` and the
102
+ error classes are exported from `callai`. The CLI now runs harnesses through the same code.
103
+ - Fan-out: `-n a/b/c` runs one prompt through several harnesses at the same time, `-n a,b,c` one after
104
+ another, `-n all` every installed harness at the same time. Everything is checked before anything
105
+ runs; `-n all` skips harnesses that refuse the options. Text output puts each answer under a
106
+ `== name ==` header, `-o json` gives `{"results": [...]}`, stream-json events carry `harness_name`.
107
+ One failure (or timeout) doesn't stop the others; the exit code is the first failure's; Ctrl-C
108
+ stops them all. `-o raw` and arguments after `--` need a single harness.
109
+
110
+ ## [0.5.0] - 2026-10-30
111
+
112
+ `-o stream-json`: every harness's run as normalised JSON events, live. Nothing here breaks existing use.
113
+
114
+ ### Added
115
+
116
+ - `-o stream-json`: one JSON event per line as the run happens: `start`, then `text`, `tool_use` and
117
+ `tool_result` mapped from each harness's own event stream, then `result` (the `-o json` object).
118
+ claude runs with `--output-format stream-json --verbose`, grok with `--output-format streaming-json`;
119
+ codex, opencode and pi already stream. hermes has no event stream, so it gives `start` and `result`.
120
+ Checked end to end with each harness (stub model, a real tool call) and live with claude.
121
+ - `Adapter.stream_events(line, state)`, and `runner.run(on_stdout_line=...)` to see output as it arrives.
122
+ - Conformance: `expected_events` in parse cases, `expected.stdout_events` in CLI cases, and
123
+ `stderr_file` for fake harnesses; 7 recorded stream fixtures and 5 CLI cases.
124
+
125
+ ### Fixed
126
+
127
+ - Test fake harnesses write their call record atomically; a test polling for it could read it half-written.
128
+
129
+ ## [0.4.0] - 2026-10-30
130
+
131
+ Adapters can set environment variables for the harness, so hermes now accepts `--system-prompt`.
132
+ Nothing here breaks existing use.
133
+
134
+ ### Added
135
+
136
+ - Adapters can set environment variables for the harness (`Adapter.build_env`, pure like
137
+ `build_argv`); they are added on top of callai's own environment.
138
+ - hermes: `--system-prompt` now works, passed as `HERMES_EPHEMERAL_SYSTEM_PROMPT`. It was refused
139
+ before. Checked against hermes-agent 0.19.0 with the stub model: the text lands in the system message.
140
+ - `--dry-run` shows those variables: as `NAME=value` before the command in text, and as an `"env"`
141
+ object in `-o json` (left out when there are none, so existing output is unchanged).
142
+ - Conformance: `expected_env` in argv cases; `expected.harness_env` in CLI cases (the fake harness
143
+ now records its environment).
144
+
145
+ ## [0.3.0] - 2026-10-30
146
+
147
+ Defaults from the environment and a config file, model aliases, and `--list-harnesses`. Nothing
148
+ here breaks existing use.
149
+
150
+ ### Added
151
+
152
+ - Config file `~/.config/callai/config.toml` (or `$XDG_CONFIG_HOME/callai/…`, or `CALLAI_CONFIG`):
153
+ `default_harness`, `model`, `timeout`, per-harness `binary` / `model` / `extra_args`, and model
154
+ aliases (`-m fast` → each harness's own model). Unknown keys are an error (exit 2).
155
+ - `CALLAI_MODEL` and `CALLAI_TIMEOUT` environment defaults. Precedence: flag > `CALLAI_*` > config
156
+ file > built-in default.
157
+ - `--list-harnesses`: each harness's binary, where it is on PATH and its version, or where to
158
+ install it (`-o json` for JSON).
159
+ - Live smoke tests (`CALLAI_LIVE=all uv run pytest -m live`): each real harness answers a real model.
160
+ - README: defaults and config file section.
161
+
162
+ ### Fixed
163
+
164
+ - DESIGN.md said `--system-prompt` only warns where a harness lacks it; callai refuses it (exit 2).
165
+
166
+ ## [0.2.0] - 2026-10-30
167
+
168
+ Names the harness consistently as `harness_name`, so it isn't confused with the harnesses' own
169
+ `--tool(s)` flags or the tools a model calls. Every change below is breaking.
170
+
171
+ ### Changed
172
+
173
+ - **Breaking:** the harness is chosen with `-n/--name HARNESS_NAME` instead of `-t/--tool`,
174
+ because several harnesses have their own `--tool`/`--tools` flags. `-t` and `--tool` are no
175
+ longer accepted (exit 2).
176
+ - **Breaking:** the default-harness environment variable `CALLAI_TOOL` is now
177
+ `CALLAI_HARNESS_NAME`. A leftover `CALLAI_TOOL` is not used; if no harness is given, the usage
178
+ error says it was renamed.
179
+ - **Breaking:** the `-o json` result key `tool` is now `harness_name` (same value, e.g.
180
+ `"claude-code"`). In the code, `Request.tool` and `Result.tool` are now `harness_name`, and the
181
+ conformance argv/parse cases name their harness in a `harness_name` field.
182
+ - **Breaking:** `callai.adapters.TOOLS` is now `callai.adapters.HARNESS_NAMES`; usage errors say "harness"
183
+ (`unknown harness 'x'`, `no harness given: use -n/--name ...`).
184
+
185
+ ## [0.1.0] - 2026-10-30
186
+
187
+ First release: `callai -t TOOL -p PROMPT` runs claude-code, codex, opencode, pi, grok and hermes.
188
+
189
+ ### Added
190
+
191
+ - Initial scaffold copied from `expt_template`: `docs/` (with its own `docs/.scrolls/`
192
+ memory system), `.trash/`, and `src/`.
193
+ - `docs/DESIGN.md`: design for the `callai` dispatcher CLI (CLI surface, adapter
194
+ architecture, normalised output, permissions, exit codes, test strategy).
195
+ - `SCOPE.md`: language/distribution analysis and agreed roadmap (Python → TypeScript
196
+ port → optional Rust core with PyPI/npm thin wrappers).
197
+ - `conformance/` language-agnostic test suite (argv, parse, CLI cases; recorded
198
+ claude fixtures) with a strict pytest loader in `src/tests/conformance.py`.
199
+ - Python package skeleton: `pyproject.toml` (PyPI name `callai-cli`, Python ≥ 3.11,
200
+ stdlib-only), `callai --version`, `python -m callai`. Licensed Apache-2.0.
201
+ - Core types: `Request`, `Completed`, `Result` (with the `-o json` schema), `UsageError`,
202
+ the `Adapter` base class and the tool registry.
203
+ - `claude-code` adapter command line (`claude -p --output-format json … -- PROMPT`).
204
+ - Full CLI (`-t`, `-p/-c/--prompt/--command`, `-m`, `-o text|json|raw`, `-C`, `--timeout`,
205
+ `--permission`, `--system-prompt`, `--dry-run`, `-v`, `--` passthrough, stdin prompts,
206
+ `CALLAI_TOOL`) and subprocess runner (process-group kill, exit codes 124/127/130).
207
+ - `claude-code` output parsing: answer, error flag, session id, cost, token usage and the
208
+ model actually used, from `claude -p --output-format json`. **First working tool.**
209
+ - `codex` adapter: `codex exec --json`, sandbox permission mapping, `--system-prompt` via
210
+ `developer_instructions`, JSONL event parsing.
211
+ - `opencode` adapter: `opencode run --format json`, prompt passed so opencode doesn't quote it,
212
+ real error reasons from opencode's ERROR log, token/cost totals across steps. `read-only`/`auto`
213
+ permissions and `--system-prompt` are refused (opencode can't honour them).
214
+ - `pi` adapter: `pi --mode json`, tool-allowlist permission mapping, `--system-prompt`,
215
+ model errors detected from `stopReason` (pi exits 0 on them), prompts starting with `@`
216
+ refused (pi would read them as files). Error text that the harness already printed on
217
+ stderr is no longer repeated.
218
+ - `grok` adapter (xAI's Grok Build CLI): `grok --output-format json --single=PROMPT`, permission
219
+ mapping (read-only tools only / `--allow Write --allow Edit` / `bypassPermissions`),
220
+ `--system-prompt` via `--system-prompt-override`, token usage and the model actually used.
221
+ Prompts starting with `/` are refused (grok would run them as slash commands). A run where grok
222
+ refused a tool call (it cancels the turn but exits 0) or hit `--max-turns` is reported as a
223
+ failure, with grok's reason.
224
+ - `hermes` adapter (Nous Research Hermes Agent): `hermes chat -Q --source tool --query=PROMPT`
225
+ (not `-z`, which approves every tool call), the answer separated from hermes's tool previews,
226
+ session id, `auto` = file tools only, `bypass` = `--yolo`. `read-only` and `--system-prompt` are
227
+ refused (hermes can't honour them from the command line). All six tools now work.
228
+ - README usage section, with what each `--permission` level allows per harness.
229
+ - `--permission bypass` prints a one-line warning on stderr before the harness runs.
230
+ - Stub model speaks Anthropic Messages (`/v1/messages`, JSON and SSE, scripted `tool_use`), so the
231
+ permission probe covers claude-code too; its results are in DESIGN §7 and the README.
232
+ - README caution: grok `auto`/`bypass` can write outside the working directory; how to opt in to
233
+ grok's `workspace` sandbox (needs bubblewrap on Linux), with examples.
234
+ - Stub model `--tool-call`: scripts one tool call, so permission behaviour can be recorded.
235
+ - `conformance/tools/permission_probe.py`: runs a harness at every `--permission` level with
236
+ scripted file-write and shell calls (inside and outside the working directory) and reports what
237
+ actually happened. Results are in DESIGN §7.
238
+ - `Makefile`: `make install.harnesses` installs every supported harness CLI at its verified
239
+ version; `make install.<tool>` (claude-code, codex, opencode, pi, hermes, grok) installs one.
240
+ - `conformance/tools/stub_llm_server.py`: local OpenAI-compatible model stub for recording
241
+ real harness output without network access.
242
+
243
+ ### Fixed
244
+
245
+ - `callai -p TEXT` no longer hangs when stdin is a pipe that never closes (common when an agent
246
+ or script runs it): it waits 3 seconds for data (`CALLAI_STDIN_WAIT`), warns and runs with the
247
+ prompt alone, like `claude -p`. Usage errors are reported before stdin is read.
248
+ - Harness output is captured byte-for-byte: `\r\n` line endings were translated to `\n`,
249
+ so `-o raw` wasn't the harness's real output.
250
+
251
+ <!--
252
+ ## [x.y.z] - YYYY-MM-DD
253
+
254
+ ### Added
255
+ - What was added, from a user's perspective.
256
+
257
+ ### Changed
258
+ - What changed in existing behavior.
259
+
260
+ ### Fixed
261
+ - What bug was fixed.
262
+
263
+ ### Removed
264
+ - What was removed and why.
265
+ -->
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Sugato Ray
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ include README.md
2
+ include src/callai/py.typed # marker file for PEP 561
3
+
4
+ include CHANGELOG.md
5
+ include LICENSE
6
+
7
+ include MANIFEST.in
8
+ include pyproject.toml
9
+ include uv.lock
10
+ include .python-version
11
+
12
+ # Not listed on purpose: tests (src/tests), conformance/, docs/, build/, dist/, .github/, .agents/,
13
+ # .claude/, Makefile, the agent/scrolls files. Without a VCS plugin (setuptools-scm) setuptools only
14
+ # packs the files above plus the packages found in src/ (callai*), so they stay out of the sdist.
15
+ # If a plugin is added later, restore `recursive-exclude` lines for them.
16
+
17
+ # Maintainer tools (banner builder, its template, config and tests) never ship. Failsafe, kept on purpose:
18
+ # setuptools doesn't pack src/tools today, so `uv build` warns "no previously-included ... matching";
19
+ # these lines keep it out if a VCS plugin (setuptools-scm) or a package-find change ever pulls it in.
20
+ prune src/tools
21
+ recursive-exclude src/tools *