Metadata-Version: 2.4
Name: apatch-studio
Version: 0.1.7
Summary: Local contract-driven workspace for governing AI-agent work with APatch and TrustChain Cowork
Author: Ed Cherednik
License-Expression: MIT
Project-URL: Homepage, https://github.com/petro1eum/apatch-studio-oss
Project-URL: Documentation, https://github.com/petro1eum/apatch-studio-oss#readme
Project-URL: Issues, https://github.com/petro1eum/apatch-studio-oss/issues
Project-URL: Source, https://github.com/petro1eum/apatch-studio-oss
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: apatch[mcp]>=0.8.54
Requires-Dist: cryptography<47,>=45
Requires-Dist: fastapi<1,>=0.115
Requires-Dist: markdown-it-py<5,>=4.0
Requires-Dist: uvicorn<1,>=0.34
Provides-Extra: dev
Requires-Dist: build<2,>=1; extra == "dev"
Requires-Dist: httpx<1,>=0.27; extra == "dev"
Requires-Dist: pytest<10,>=8; extra == "dev"
Requires-Dist: pytest-asyncio<2,>=0.24; extra == "dev"
Requires-Dist: ruff<1,>=0.12; extra == "dev"
Requires-Dist: setuptools>=75; extra == "dev"
Requires-Dist: twine<7,>=6; extra == "dev"
Dynamic: license-file

# APatch Studio OSS

APatch Studio OSS is the local workspace for contract-driven work with AI agents.

Most agent sessions begin as requests in natural language: “read the specification,”
“write the tests,” “do not change them,” “implement the feature.” Studio turns that
fragile conversation into an explicit local contract that connects:

- the human intent and selected scope;
- the exact RFP, SPEC and requirement being executed;
- the agent run and every governed mutation;
- verification results, recovery checkpoints and signed evidence;
- the delivery decision and a factual time draft.

The result is not merely “AI generated code.” It is work whose mandate, changes,
tests and proof remain inspectable after the chat session ends.

Studio is useful without an account, subscription or network connection. When the
owner chooses to connect it to [TrustChain Cowork](https://trust-chain.ai/), the same
local workspace can receive signed assignments, require explicit local acceptance,
bind them to an existing SPEC, run APatch locally and return only authorized,
content-safe evidence. Source code, diffs, prompts, credentials and private keys stay
on the user's machine unless the user separately publishes them through Git.

## Install

For normal use, install the published Studio in its own Python 3.11+ environment.
It installs the compatible public APatch Core automatically; no separate Core
checkout, account or Node.js installation is needed.

```bash
python3 -m venv ~/.venvs/apatch-studio
source ~/.venvs/apatch-studio/bin/activate
python -m pip install apatch-studio
apatch-studio serve --workspace /path/to/your/git/repository
```

Studio opens a loopback-only browser interface. Reactivate the same environment
next time, or run `~/.venvs/apatch-studio/bin/apatch-studio` directly. The
[Studio package](https://pypi.org/project/apatch-studio/) and
[Core package](https://pypi.org/project/apatch/) list the published versions.
The development branch can be newer. To run or test a checkout, use the
[source installation instructions](https://github.com/petro1eum/apatch-studio-oss/blob/main/docs/GETTING-STARTED.md#develop-from-source).

## What is included

- local governed changes and exact SPEC requirement execution;
- Codex and Claude Code runner supervision;
- interruption recovery, retry and rollback;
- local review, delivery packs and owner decisions;
- signed evidence, WorkAssets, Avatar evidence export and factual time drafts;
- an opt-in signed Inbox and APatch governed-work round trip with Cowork;
- workspace, policy and runtime diagnostics.

## What is not included

The public distribution contains no organization control plane, membership or
entitlement service, fleet management, hosted database, cloud source storage or
remote arbitrary-execution endpoint. Those collaboration capabilities belong to
TrustChain Cowork and its hosted services. Their absence never disables local work.

## Documentation

- [Getting started](https://github.com/petro1eum/apatch-studio-oss/blob/main/docs/GETTING-STARTED.md)
- [OSS publication contract](https://github.com/petro1eum/apatch-studio-oss/blob/main/docs/RFP-023-studio-oss-publication.md)
- [Executable publication specification](https://github.com/petro1eum/apatch-studio-oss/blob/main/docs/specs/SPEC-STUDIO-OSS-PUBLICATION-1.md)
- [APatch OSS](https://github.com/petro1eum/apatch-oss)
- [TrustChain](https://trust-chain.ai/)

## Security

Please report security issues privately through the repository's GitHub Security
Advisory flow. Do not open a public issue containing credentials, private keys,
source code or personal data.

## License

MIT. See [LICENSE](https://github.com/petro1eum/apatch-studio-oss/blob/main/LICENSE).

## Service maintenance 0.1.7 (20 October 2026)

Preserves the installed 0.1.6 result-delivery journal and routes, and adds guarded exact-contract import with an explicitly configured public trust document (`--exact-contract-trust-file`). Import never authorizes execution. Without an enrolled server binding and matching public pins, this channel is unavailable. The existing local service uses APatch 0.8.54; this source branch does not claim PyPI publication or a completed production exact-contract scenario.

Packaging now rebuilds the Python package from source even if a cached build copy has a newer timestamp, and removes stale modules from that generated package directory. Focused verification: 45 API/security/result-delivery tests and the actual stale-build regression.


The additive execution source declaration producer in `apatch_studio/execution_source_declarations.py` verifies the workspace's existing signer, native execution receipt, independently signed source receipt and exact shared Change before emitting a separate signed statement. It derives the real 16-hex execution project through the native SDK and keeps it distinct from the ProjectGroup. The canonical portable wire is pinned from avatar-contract5e8a43d under `_contracts/UPSTREAM.json`, preserving the installed Avatar runtime. Nineteen source/crypto/path-boundary tests pass. A real local native run was used to verify its declaration separately; this helper alone is not a Company admission, Tracker receipt, production installation or a browser flow.

### Company execution source publication

A composition that enables `TC_COWORK_EXECUTION_SOURCE_PUBLICATION_ENABLED=true`
publishes the exact execution source while preparing signed evidence. The
workspace's existing enrolled key signs the declaration and native HTTP request;
no key is generated or exported. Studio validates both native receipts, retains
one declaration outside the Git workspace before network I/O, and requires the
exact Platform publication acknowledgement. Retry reuses the signed bytes.
The Company server can then resolve source references itself without asking a
person to copy JSON. Publication grants no role, Company contract, acceptance or
payment. Existing local/disconnected deliveries retain their original behavior
unless the release composition explicitly enables this integration.
