changex 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.4
2
+ Name: changex
3
+ Version: 0.1.0
4
+ Summary: ChangeX: provenance-first change tracking for AI document edits. Meta package — installs the core CLI (changex) and the MCP server (changex-mcp).
5
+ Project-URL: Homepage, https://github.com/ArioMoniri/changex
6
+ Project-URL: Documentation, https://github.com/ArioMoniri/changex/tree/main/docs
7
+ Project-URL: Repository, https://github.com/ArioMoniri/changex
8
+ Author: ChangeX
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,csv,docx,event-sourcing,llm,mcp,ooxml,pptx,provenance,track-changes,xlsx
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Office/Business :: Office Suites
16
+ Classifier: Topic :: Software Development :: Version Control
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: changex-api>=0.1.0
19
+ Requires-Dist: changex-core>=0.1.0
20
+ Requires-Dist: changex-mcp>=0.1.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: mypy>=1.5; extra == 'dev'
23
+ Requires-Dist: pytest>=7.0; extra == 'dev'
24
+ Requires-Dist: ruff>=0.1; extra == 'dev'
25
+ Description-Content-Type: text/markdown
26
+
27
+ # ChangeX
28
+
29
+ **Provenance-first change tracking for AI document edits.**
30
+
31
+ ChangeX records *exactly* what an LLM (Claude, Gemini, OpenAI, or any MCP-capable
32
+ agent) changed in an Office document — `.docx`, `.xlsx`, `.csv`, `.pptx`, `.doc` —
33
+ **end to end, as the edits happen**, not by diffing two files after the fact.
34
+
35
+ Every change is captured as a structured, attributable operation: *what* changed,
36
+ *where*, *which model/agent/prompt* produced it, and *when*. ChangeX then renders
37
+ that history several ways:
38
+
39
+ 1. **Native track changes inside the file** — real Word revisions (`<w:ins>`/`<w:del>`)
40
+ for `.docx`. Excel and PowerPoint have **no native track-changes**, so there ChangeX
41
+ renders a **non-native overlay** (colored cells + comments + a "Changes" audit sheet
42
+ for `.xlsx`/`.csv`; revision callouts + a "Revisions" summary for `.pptx`) — see
43
+ [docs/FIDELITY.md](docs/FIDELITY.md).
44
+ 2. **A portable sidecar journal** (`.changex`) — an event-sourced, hash-chained log
45
+ of every operation with provenance, independent of the document format.
46
+ 3. **Lightweight visualization, your choice** —
47
+ - a **single-file HTML report** (`changex review --out review.html`): no server,
48
+ no deps, open locally or share as a link;
49
+ - a **local review webserver** (`changex view`): an interactive `127.0.0.1` page
50
+ with inline + side-by-side redline, a provenance timeline filterable by
51
+ model/seq, and live accept/reject — nothing leaves the machine;
52
+ - the document's **own native track changes** in Word;
53
+ - an **optional desktop app** (Tauri, `packages/viewer`) over the same renderer.
54
+
55
+ ## Install
56
+
57
+ > Full matrix (uv / pipx / pip, from-source, every MCP client, system deps) lives in
58
+ > **[docs/INSTALL.md](docs/INSTALL.md)**. The copy-paste essentials:
59
+
60
+ **Quick install** — one name gives you both the `changex` CLI and the `changex-mcp` server:
61
+
62
+ ```bash
63
+ uv tool install changex # recommended (isolated, fast)
64
+ # or
65
+ pipx install changex # isolated via pipx
66
+ # or
67
+ pip install changex # into the current environment
68
+ ```
69
+
70
+ Zero-install, run once:
71
+
72
+ ```bash
73
+ uvx changex --help # the CLI
74
+ uvx changex-mcp # the MCP stdio server
75
+ ```
76
+
77
+ **From source** (this repo) — a uv workspace; one sync wires up both packages:
78
+
79
+ ```bash
80
+ git clone https://github.com/ArioMoniri/changex && cd changex
81
+ uv sync # installs the CLI + MCP server into .venv
82
+ # …or without uv:
83
+ pip install -e packages/core -e packages/mcp
84
+ ```
85
+
86
+ **Wire it into your AI client** (MCP active-capture, captures provenance at the source).
87
+ One line for Claude Code:
88
+
89
+ ```bash
90
+ claude mcp add changex -- uvx changex-mcp
91
+ ```
92
+
93
+ For every other client, drop this stdio block into the client's MCP config
94
+ (`~/.gemini/settings.json`, `.cursor/mcp.json`, Cline/Continue, Claude Desktop, OpenAI
95
+ Agents SDK — full list in [docs/INTEGRATION.md](docs/INTEGRATION.md)):
96
+
97
+ ```json
98
+ { "mcpServers": { "changex": { "command": "uvx", "args": ["changex-mcp"] } } }
99
+ ```
100
+
101
+ **Optional system dependency:** legacy `.doc` ingest needs **LibreOffice** (headless)
102
+ on PATH for the `.doc` → `.docx` conversion. Nothing else requires it; `.docx` / `.xlsx`
103
+ / `.csv` / `.pptx` are pure-Python. Install via `brew install --cask libreoffice` (macOS)
104
+ or `apt-get install libreoffice` (Debian/Ubuntu).
105
+
106
+ ## Quickstart (60 seconds)
107
+
108
+ ChangeX has **two interchangeable paths** that produce the **same** `.changex` journal
109
+ and the **same** visualizations. Pick whichever fits how your model runs.
110
+
111
+ ### Path A — active capture (MCP): the model edits *through* ChangeX
112
+
113
+ 1. Register the server (once): `claude mcp add changex -- uvx changex-mcp`.
114
+ 2. In your MCP client, tell the agent to open and edit a doc. It calls
115
+ `open_tracked` → `edit` → `save_tracked` and writes a tracked `.docx` plus a
116
+ `.changex` journal — provenance captured live. Declare your model so revisions are
117
+ authored correctly:
118
+
119
+ ```jsonc
120
+ open_tracked({ "path": "/abs/report.docx",
121
+ "agent_context": { "model": "claude-opus-4-8", "vendor": "anthropic" } })
122
+ ```
123
+
124
+ (Full tool contract: [`packages/mcp/README.md`](packages/mcp/README.md).)
125
+
126
+ ### Path B — passive capture (no tools needed): `open` → edit → `seal`
127
+
128
+ Works with **any** model or human — Ollama, LM Studio, llama.cpp, a text box. Provenance
129
+ is honestly **degraded** here (who/why unknown; see [docs/FIDELITY.md](docs/FIDELITY.md)).
130
+
131
+ ```bash
132
+ changex open report.docx --changex report.changex # snapshot the baseline
133
+ # … anything edits report.docx in place (model, script, or you) …
134
+ changex seal report.docx --changex report.changex # reconstruct the journal by diff
135
+ ```
136
+
137
+ ### See the changes — three visualizations, same journal
138
+
139
+ ```bash
140
+ # 1. single-file HTML report (no server, no deps) — open locally or share as a link
141
+ changex review report.changex --out review.html
142
+ # ...add --doc to show the changes INLINE in the document's own outline:
143
+ changex review report.changex --doc report-tracked.docx --out review.html
144
+
145
+ # 2. interactive local webserver (127.0.0.1; nothing leaves the machine)
146
+ changex view report.changex --doc report.docx
147
+
148
+ # 3. the document's OWN native track changes — just open the tracked .docx in Word
149
+ ```
150
+
151
+ > **Try it now, no setup beyond `uv sync`:** run `make demo` (or `./scripts/demo.sh`).
152
+ > It tracks two edits on `examples/sample.docx`, then `review`s and `verify`s them,
153
+ > printing exactly where the tracked `.docx`, the `.changex` journal, and the HTML
154
+ > report landed.
155
+
156
+ **Honesty note:** native in-file accept/reject is `.docx`-only; `.xlsx`/`.csv`/`.pptx`
157
+ ship a **journal + non-native overlay** (annotations / audit sheet / summary), since
158
+ those formats have no native track-changes concept. Passive capture is faithful for
159
+ *what changed* but **degraded** for *who/why*. Details in
160
+ [docs/FIDELITY.md](docs/FIDELITY.md).
161
+
162
+ ## Why not just diff the files?
163
+
164
+ A diff answers "how do these two files differ." ChangeX answers
165
+ **"what did the AI actually do, in order, and why."** In active capture it records the
166
+ operation stream live (insert paragraph, set cell `B7=...`, delete slide 3, restyle
167
+ run), attributes each op to a model/turn/prompt, and can replay or selectively roll
168
+ back. When an edit happens outside the tracked tools, the `open`/`seal` fallback
169
+ reconstructs the operations by diff — faithfully recovering *what* changed, though in
170
+ that mode the *who/why* is unknown (honest, degraded provenance — see
171
+ [docs/FIDELITY.md](docs/FIDELITY.md)).
172
+
173
+ ## How it integrates with the models — native to any model
174
+
175
+ ChangeX is native to *any* model through **two interchangeable paths** that produce
176
+ the **same** `.changex` journal and the **same** visualizations:
177
+
178
+ - **MCP active-capture** — the **MCP server** is the vendor-neutral seam across
179
+ Claude, Gemini, OpenAI, Cursor, Cline, and any MCP client. The agent opens, edits,
180
+ and saves *through* ChangeX tools, so provenance is captured at the source.
181
+ - **`changex open` / `seal` passive-capture** — for ANY model, including local/offline
182
+ ones that can't call tools (Ollama, LM Studio, llama.cpp) and human-in-the-loop:
183
+ `changex open` snapshots a baseline, anything edits the file in place, and
184
+ `changex seal` reconstructs the attributed journal by diff. No SDK, no tool-calling.
185
+ Provenance is honestly **degraded** in this mode (who/why unknown) — see
186
+ [docs/FIDELITY.md](docs/FIDELITY.md).
187
+
188
+ A Claude **Skill** and a thin **CLI** wrap the same core. Copy-paste config for every
189
+ surface is in [docs/INTEGRATION.md](docs/INTEGRATION.md).
190
+
191
+ ## Call it from your app
192
+
193
+ Per-app, copy-paste recipes — real flags, URLs, and endpoints — live in
194
+ **[docs/CALL-FROM-YOUR-APP.md](docs/CALL-FROM-YOUR-APP.md)** (Claude Desktop/Code,
195
+ claude.ai connectors, ChatGPT connectors + custom-GPT Actions, OpenAI Agents/Responses,
196
+ Gemini CLI/API, Cursor, Cline, Ollama, LM Studio). The single most likely path for each
197
+ first-class target:
198
+
199
+ - **Claude** (Desktop / Code) — MCP over stdio:
200
+
201
+ ```bash
202
+ claude mcp add changex -- uvx changex-mcp
203
+ ```
204
+
205
+ (claude.ai web uses a *custom connector*: run `changex-mcp --http` → paste
206
+ `http://127.0.0.1:9000/mcp` + a bearer token — see the recipe and its security note.)
207
+
208
+ - **ChatGPT / OpenAI** — a custom GPT **Action** pointed at the REST OpenAPI schema:
209
+
210
+ ```bash
211
+ uv sync && changex-api # serves http://127.0.0.1:8000/openapi.json (the Action schema)
212
+ ```
213
+
214
+ (OpenAI Agents SDK can instead use the MCP stdio server directly.)
215
+
216
+ - **Gemini** — MCP over stdio (CLI), via `~/.gemini/settings.json`:
217
+
218
+ ```json
219
+ { "mcpServers": { "changex": { "command": "uvx", "args": ["changex-mcp"] } } }
220
+ ```
221
+
222
+ (The Gemini API path uses the function declarations in
223
+ [`integrations/gemini-functions.json`](integrations/gemini-functions.json).)
224
+
225
+ Honest caveats carry through: a **public** MCP/REST bind is refused without a bearer
226
+ token (loopback is the safe default), and the **passive** `open`/`seal` fallback for
227
+ no-tool-calling models is faithful for *what* changed but **degraded** for *who/why* (see
228
+ [docs/FIDELITY.md](docs/FIDELITY.md)).
229
+
230
+ ## Status
231
+
232
+ 🚧 Early build, but the core is end-to-end. **Available today:**
233
+
234
+ - **`.docx`** — the full spine: MCP active-capture, `changex open`/`seal`
235
+ passive-capture, the `.changex` journal, the single-file HTML report
236
+ (`changex review`), and the local review webserver (`changex view`), with **native
237
+ Word revisions** for in-file accept/reject.
238
+ - **`.xlsx` / `.csv` / `.pptx`** — **Available** as **journal + non-native overlay**
239
+ (colored cells + comments + a "Changes" audit sheet for spreadsheets; revision
240
+ callouts + a "Revisions" summary for slides). These formats have **no native
241
+ track-changes**, so review lives in the journal + overlay, **not** host-app
242
+ accept/reject. Same `.changex` journal and same `review`/`view` surfaces as docx.
243
+
244
+ **Still planned:** legacy `.doc` ingest (via LibreOffice conversion) and the optional
245
+ Tauri desktop app. See [docs/ROADMAP.md](docs/ROADMAP.md) for milestones,
246
+ [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design, and
247
+ [docs/FIDELITY.md](docs/FIDELITY.md) for the honest per-format and per-capture-mode limits.
248
+
249
+ ## Repo layout
250
+
251
+ ```
252
+ packages/core changex-core — canonical model, adapters, journal, renderers, diff (Python)
253
+ packages/mcp changex-mcp — MCP server exposing tracked open/edit/save tools (Python)
254
+ packages/viewer changex-viewer — Tauri + React desktop review app
255
+ skill/ Claude Skill packaging of the core
256
+ docs/ roadmap, architecture, .changex format spec, integration guide, fidelity/limits
257
+ examples/ sample documents and tracked sessions
258
+ ```
259
+
260
+ ## License
261
+
262
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,5 @@
1
+ changex-0.1.0.dist-info/METADATA,sha256=l_R5vitD9LbkY1wShHxYhdk26hHOGOEpHvspOYRk8Pk,11839
2
+ changex-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
3
+ changex-0.1.0.dist-info/entry_points.txt,sha256=scpD8QZKB3ZOAW6iop7-C4Wjp_Ncl_xtaJSTgg17DXE,128
4
+ changex-0.1.0.dist-info/licenses/LICENSE,sha256=5qBe8VP3umqM2WMYBYJ4B9tznqeKkjmIhXZ62pJ0038,1068
5
+ changex-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ changex = changex_core.cli:main
3
+ changex-api = changex_api.__main__:main
4
+ changex-mcp = changex_mcp.server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ario Moniri
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.