Metadata-Version: 2.5
Name: spaday-studio
Version: 0.2.0
Summary: AI-native visual development environment for spaday
Project-URL: Repository, https://github.com/1kbgz/spaday-studio
Project-URL: Homepage, https://github.com/1kbgz/spaday-studio
Author-email: 1kbgz <dev@1kbgz.com>
License: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
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: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.11
Requires-Dist: mcp<3,>=2
Requires-Dist: pydantic>=2
Requires-Dist: spaday-codemirror<0.3,>=0.2
Requires-Dist: spaday<1.0,>=0.11.4
Requires-Dist: starlette
Requires-Dist: transports<0.11,>=0.10
Provides-Extra: develop
Requires-Dist: build; extra == 'develop'
Requires-Dist: bump-my-version; extra == 'develop'
Requires-Dist: check-dist; extra == 'develop'
Requires-Dist: codespell; extra == 'develop'
Requires-Dist: hatch-js; extra == 'develop'
Requires-Dist: hatchling; extra == 'develop'
Requires-Dist: httpx; extra == 'develop'
Requires-Dist: mdformat; extra == 'develop'
Requires-Dist: mdformat-tables>=1; extra == 'develop'
Requires-Dist: pytest; extra == 'develop'
Requires-Dist: pytest-cov; extra == 'develop'
Requires-Dist: ruff; extra == 'develop'
Requires-Dist: twine; extra == 'develop'
Requires-Dist: ty; extra == 'develop'
Requires-Dist: uv; extra == 'develop'
Requires-Dist: uvicorn; extra == 'develop'
Requires-Dist: websockets; extra == 'develop'
Requires-Dist: wheel; extra == 'develop'
Description-Content-Type: text/markdown

<a href="https://github.com/1kbgz/spaday-studio">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/1kbgz/spaday-studio/raw/main/docs/img/logo-dark.webp?raw=true">
    <img alt="spaday-studio logo, DJ turntables and a mixer inside a browser window" src="https://github.com/1kbgz/spaday-studio/raw/main/docs/img/logo-light.webp?raw=true" width="800">
  </picture>
</a>

AI-native visual development environment for spaday

[![Build Status](https://github.com/1kbgz/spaday-studio/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/1kbgz/spaday-studio/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/1kbgz/spaday-studio/branch/main/graph/badge.svg)](https://codecov.io/gh/1kbgz/spaday-studio)
[![License](https://img.shields.io/github/license/1kbgz/spaday-studio)](https://github.com/1kbgz/spaday-studio)
[![PyPI](https://img.shields.io/pypi/v/spaday-studio.svg)](https://pypi.python.org/pypi/spaday-studio)

## Overview

spaday-studio is a pilot AI-native visual development environment built on spaday's real component
runtime. A structured project document is mirrored through transports; browser and MCP clients submit
validated semantic edits; spaday applies the resulting tree diff without remounting unaffected elements.

The pilot includes:

- a selectable live application canvas with schema-driven property, binding, action, and state controls;
- component catalogs that retain Spaday property, field, event, and named-slot metadata;
- revision-checked title, key, property, binding, event, state, insert, move, and remove operations;
- private browser and MCP drafts with commit, discard, semantic rebase, conflict reporting, inspection,
  actor-aware undo and redo, and browser-refresh recovery;
- revision-scoped CodeMirror buffers using transports sequence CRDTs and cursor awareness;
- versioned atomic project persistence and deterministic Python export;
- host-defined read, edit, and admin roles for browser, WebSocket, and MCP operations;
- public JSON Schemas for documents, semantic operation batches, bindings, expressions, and actions;
- a persistent Spaday `Store` in the preview canvas, so authored bindings and actions run normally;
- a Python+JavaScript Copier scaffold, Playwright coverage, and Yardang/Sphinx documentation.

## Run the pilot

```bash
make develop
make build
spaday-studio --project orbit.studio.json
```

Open <http://127.0.0.1:8020>. Select the headline, change its text or style, and preview the edit. The
draft remains private until you click **Commit**. Accepted documents arrive through transports and the
canvas applies a Spaday component-tree patch without replacing unaffected elements. Canonical edits are
saved to `orbit.studio.json`. Use **Export Python** to download an ordinary Spaday `page()` function and
its initial runtime state.

The MCP endpoint is `http://127.0.0.1:8020/mcp`. Start with the
[guided tutorial](docs/src/tutorial.md), connect an agent with the
[MCP how-to guide](docs/src/how-to.md), [save and export a project](docs/src/save-and-export.md),
[set hosted access roles](docs/src/access-control.md),
[use an installed component package](docs/src/use-component-package.md), consult the
[API reference](docs/src/reference.md), or read
[why Studio uses a structured document](docs/src/explanation.md).

## Pilot boundaries

- Common field bindings and Store-writing actions have direct controls. Validated JSON editors retain the
  complete binding and action surface, plus runtime state.
- Concurrent leaf edits and anchor-based structural edits rebase when their targets remain valid. Numeric
  placement conflicts after another structural edit because its position is stale.
- Revision-scoped collaborative buffers are in-memory, pruned after their last draft retires, and are not
  part of the saved project.
- The default authorizer grants admin access for trusted local use. Network deployments must pass an
  authorizer and authenticate HTTP, WebSocket, and MCP connections upstream.
- Component packages are selected when the server starts; the browser cannot activate a package live.
- Arbitrary handwritten Python is not losslessly round-tripped.
- Python export is one-way generated output; the structured JSON project remains the editable source.

> [!NOTE]
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
