wrenn 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.
Files changed (39) hide show
  1. wrenn-0.1.0/.github/workflows/release.yml +24 -0
  2. wrenn-0.1.0/.gitignore +177 -0
  3. wrenn-0.1.0/.python-version +1 -0
  4. wrenn-0.1.0/.woodpecker/check.yml +21 -0
  5. wrenn-0.1.0/CLAUDE.md +132 -0
  6. wrenn-0.1.0/LICENSE +18 -0
  7. wrenn-0.1.0/Makefile +38 -0
  8. wrenn-0.1.0/PKG-INFO +648 -0
  9. wrenn-0.1.0/README.md +623 -0
  10. wrenn-0.1.0/api/openapi.yaml +3166 -0
  11. wrenn-0.1.0/pyproject.toml +52 -0
  12. wrenn-0.1.0/src/wrenn/__init__.py +107 -0
  13. wrenn-0.1.0/src/wrenn/_config.py +33 -0
  14. wrenn-0.1.0/src/wrenn/_git/__init__.py +1435 -0
  15. wrenn-0.1.0/src/wrenn/_git/_auth.py +104 -0
  16. wrenn-0.1.0/src/wrenn/_git/_cmd.py +499 -0
  17. wrenn-0.1.0/src/wrenn/_git/exceptions.py +28 -0
  18. wrenn-0.1.0/src/wrenn/async_capsule.py +395 -0
  19. wrenn-0.1.0/src/wrenn/capsule.py +470 -0
  20. wrenn-0.1.0/src/wrenn/client.py +471 -0
  21. wrenn-0.1.0/src/wrenn/code_interpreter/__init__.py +35 -0
  22. wrenn-0.1.0/src/wrenn/code_interpreter/async_capsule.py +270 -0
  23. wrenn-0.1.0/src/wrenn/code_interpreter/capsule.py +296 -0
  24. wrenn-0.1.0/src/wrenn/code_interpreter/models.py +156 -0
  25. wrenn-0.1.0/src/wrenn/commands.py +480 -0
  26. wrenn-0.1.0/src/wrenn/exceptions.py +155 -0
  27. wrenn-0.1.0/src/wrenn/files.py +404 -0
  28. wrenn-0.1.0/src/wrenn/models/__init__.py +67 -0
  29. wrenn-0.1.0/src/wrenn/models/_generated.py +625 -0
  30. wrenn-0.1.0/src/wrenn/pty.py +306 -0
  31. wrenn-0.1.0/src/wrenn/py.typed +0 -0
  32. wrenn-0.1.0/src/wrenn/sandbox.py +22 -0
  33. wrenn-0.1.0/tests/conftest.py +37 -0
  34. wrenn-0.1.0/tests/test_capsule_features.py +197 -0
  35. wrenn-0.1.0/tests/test_client.py +262 -0
  36. wrenn-0.1.0/tests/test_filesystem_pty.py +491 -0
  37. wrenn-0.1.0/tests/test_git.py +1137 -0
  38. wrenn-0.1.0/tests/test_integration.py +405 -0
  39. wrenn-0.1.0/uv.lock +728 -0
@@ -0,0 +1,24 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ pypi-publish:
10
+ name: Upload release to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment: pypi
13
+ permissions:
14
+ id-token: write
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: astral-sh/setup-uv@v6
19
+
20
+ - name: Build package
21
+ run: uv build
22
+
23
+ - name: Publish package distributions to PyPI
24
+ uses: pypa/gh-action-pypi-publish@release/v1
wrenn-0.1.0/.gitignore ADDED
@@ -0,0 +1,177 @@
1
+ # ---> Python
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ #pdm.lock
114
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
115
+ # in version control.
116
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
117
+ .pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
122
+ __pypackages__/
123
+
124
+ # Celery stuff
125
+ celerybeat-schedule
126
+ celerybeat.pid
127
+
128
+ # SageMath parsed files
129
+ *.sage.py
130
+
131
+ # Environments
132
+ .env
133
+ .venv
134
+ env/
135
+ venv/
136
+ ENV/
137
+ env.bak/
138
+ venv.bak/
139
+
140
+ # Spyder project settings
141
+ .spyderproject
142
+ .spyproject
143
+
144
+ # Rope project settings
145
+ .ropeproject
146
+
147
+ # mkdocs documentation
148
+ /site
149
+
150
+ # mypy
151
+ .mypy_cache/
152
+ .dmypy.json
153
+ dmypy.json
154
+
155
+ # Pyre type checker
156
+ .pyre/
157
+
158
+ # pytype static type analyzer
159
+ .pytype/
160
+
161
+ # Cython debug symbols
162
+ cython_debug/
163
+
164
+ # PyCharm
165
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
166
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
167
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
168
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
169
+ #.idea/
170
+
171
+ # Ruff stuff:
172
+ .ruff_cache/
173
+
174
+ # PyPI configuration file
175
+ .pypirc
176
+
177
+ CODE_EXECUTION.md
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,21 @@
1
+ when:
2
+ event: push
3
+ branch:
4
+ - main
5
+ - dev
6
+
7
+ steps:
8
+ unit-tests:
9
+ image: ghcr.io/astral-sh/uv:python3.13-bookworm
10
+ commands:
11
+ - uv sync --dev
12
+ - uv run pytest -m "not integration" -v
13
+
14
+ integration-tests:
15
+ image: ghcr.io/astral-sh/uv:python3.13-bookworm
16
+ environment:
17
+ WRENN_API_KEY:
18
+ from_secret: WRENN_API_KEY
19
+ commands:
20
+ - uv sync --dev
21
+ - uv run pytest -m integration -v
wrenn-0.1.0/CLAUDE.md ADDED
@@ -0,0 +1,132 @@
1
+ ## Design Context
2
+
3
+ ### Users
4
+ Developers across the full spectrum — solo engineers building side projects, startup teams integrating sandboxed execution into products, and platform/infra engineers at larger organizations running production workloads on Firecracker microVMs. They arrive with context: they know what a process is, what a rootfs is, what a TTY means. The interface must feel at home for all three: approachable enough not to intimidate a hacker, precise enough to earn the trust of a production ops team. Never condescend, never oversimplify. Trust the user to understand what they're looking at.
5
+
6
+ **Primary job to be done:** Understand what's running, act on it confidently, and get back to code.
7
+
8
+ ### Brand Personality
9
+ **Precise. Warm. Uncompromising.**
10
+
11
+ Wrenn is an engineer's favorite tool — built with visible care, not assembled from defaults. It runs real infrastructure (Firecracker microVMs), so the UI should reflect that seriousness without becoming cold or corporate. The warmth comes from the typography and color palette; the precision comes from hierarchy, density, and data fidelity.
12
+
13
+ Emotional goal: **in control.** Users leave a session with full confidence in what's running, what happened, and what comes next. Nothing is hidden, nothing is ambiguous.
14
+
15
+ ### Aesthetic Direction
16
+ **Dark-only (permanently), industrial-warm, data-forward.**
17
+
18
+ No light mode planned. All design decisions should optimize for dark. The near-black-green background palette (`#0a0c0b` through `#2a302d`) reads as "black with intention" — not pitch black (cold) and not charcoal (dated). The sage green accent (`#5e8c58`) is muted and organic, a meaningful departure from the startup-green neon that saturates the developer tool space.
19
+
20
+ **Anti-references:**
21
+ - **Supabase**: avoid the friendly, approachable startup-green energy — too generic, too eager to please
22
+ - **AWS / GCP consoles**: avoid utility-first density without craft — functional but joyless, visually dated
23
+
24
+ **References that capture the right spirit:**
25
+ - The precision of a well-calibrated instrument
26
+ - Editorial typography from technical publications
27
+ - The quiet confidence of tools that don't need to explain themselves
28
+
29
+ ### Type System
30
+ Four fonts with strict roles — this is the design system's strongest personality trait and must be respected:
31
+
32
+ | Font | CSS Class | Role | When to use |
33
+ |------|-----------|------|-------------|
34
+ | **Manrope** (variable, sans) | `font-sans` | UI workhorse | All body copy, nav, labels, buttons, form text |
35
+ | **Instrument Serif** | `font-serif` | Display / editorial | Page titles (h1), dialog headings, metric values, hero moments |
36
+ | **JetBrains Mono** (variable) | `font-mono` | Data / code | IDs, timestamps, key prefixes, file paths, terminal output, metrics |
37
+ | **Alice** | brand wordmark only | Brand wordmark | "Wrenn" in sidebar and login only — nowhere else |
38
+
39
+ Instrument Serif at scale creates the signature editorial moments. Mono provides the precision signal for technical data. Never swap these roles.
40
+
41
+ **Tracking overrides (app.css):**
42
+ - `.font-serif` — `letter-spacing: 0.015em` (positive tracking; Instrument Serif reads less condensed at display sizes)
43
+ - `.font-mono` — `font-variant-numeric: tabular-nums` (numbers align in tables and metric displays)
44
+
45
+ **Type scale (root: 87.5% = 14px base):**
46
+ | Token | Value | Use |
47
+ |---|---|---|
48
+ | `--text-display` | 2.571rem (~36px) | Auth section headings |
49
+ | `--text-page` | 2rem (~28px) | Page h1 titles |
50
+ | `--text-heading` | 1.429rem (~20px) | Dialog headings, empty states |
51
+ | `--text-body` | 1rem (~14px) | Primary body, buttons, inputs |
52
+ | `--text-ui` | 0.929rem (~13px) | Nav labels, table cells |
53
+ | `--text-meta` | 0.857rem (~12px) | Key prefixes, minor info |
54
+ | `--text-label` | 0.786rem (~11px) | Uppercase section labels |
55
+ | `--text-badge` | 0.714rem (~10px) | Live badges, tiny indicators |
56
+
57
+ ### Color System
58
+
59
+ All values are CSS custom properties in `frontend/src/app.css`.
60
+
61
+ **Backgrounds (6-step near-black-green scale):**
62
+ | Token | Value | Use |
63
+ |---|---|---|
64
+ | `--color-bg-0` | `#0a0c0b` | Page base, sidebar deepest layer |
65
+ | `--color-bg-1` | `#0f1211` | Sidebar surface |
66
+ | `--color-bg-2` | `#141817` | Card backgrounds |
67
+ | `--color-bg-3` | `#1a1e1c` | Table headers, elevated surfaces |
68
+ | `--color-bg-4` | `#212624` | Hover states, inputs |
69
+ | `--color-bg-5` | `#2a302d` | Highlighted items, selected rows |
70
+
71
+ **Text (5-level hierarchy):**
72
+ | Token | Value | Use |
73
+ |---|---|---|
74
+ | `--color-text-bright` | `#eae7e2` | H1s, dialog headings |
75
+ | `--color-text-primary` | `#d0cdc6` | Body copy, primary labels |
76
+ | `--color-text-secondary` | `#9b9790` | Secondary labels, descriptions |
77
+ | `--color-text-tertiary` | `#6b6862` | Hints, placeholders |
78
+ | `--color-text-muted` | `#454340` | Dividers as text, ultra-subtle |
79
+
80
+ **Accent (sage green — use sparingly, must feel earned):**
81
+ | Token | Value | Use |
82
+ |---|---|---|
83
+ | `--color-accent` | `#5e8c58` | Primary CTA, live indicators, focus rings, active nav |
84
+ | `--color-accent-mid` | `#89a785` | Hover accent text |
85
+ | `--color-accent-bright` | `#a4c89f` | Accent on dark backgrounds |
86
+ | `--color-accent-glow` | `rgba(94,140,88,0.07)` | Subtle tinted backgrounds |
87
+ | `--color-accent-glow-mid` | `rgba(94,140,88,0.14)` | Hover tint on accent items |
88
+
89
+ **Status semantics:**
90
+ | Token | Value | Use |
91
+ |---|---|---|
92
+ | `--color-amber` | `#d4a73c` | Warning, paused state |
93
+ | `--color-red` | `#cf8172` | Error, destructive actions |
94
+ | `--color-blue` | `#5a9fd4` | Info, neutral system states |
95
+
96
+ **Borders:** `--color-border` (`#1f2321`) default; `--color-border-mid` (`#2a2f2c`) for inputs/hover.
97
+
98
+ ### Component Patterns
99
+
100
+ **Buttons:**
101
+ - Primary: solid sage green (`--color-accent`), hover brightness boost + micro-lift (`-translate-y-px`)
102
+ - Secondary: bordered (`--color-border-mid`), text transitions to accent on hover
103
+ - Danger: red text + subtle red background on hover
104
+ - All: `transition-all duration-150`
105
+
106
+ **Inputs:**
107
+ - Border `--color-border`, background `--color-bg-2`; focus transitions border and icon to accent
108
+ - Group focus pattern: `group` wrapper + `group-focus-within:text-[var(--color-accent)]` on icon
109
+
110
+ **Tables / data lists:**
111
+ - Grid layout; header `bg-3` + uppercase `--text-label`; row hover `hover:bg-[var(--color-bg-3)]`
112
+ - Status stripe: left border color matches sandbox state
113
+
114
+ **Status indicators:** Running = animated ping + sage green dot; Paused = amber dot; Stopped = muted gray. Color is never the sole differentiator.
115
+
116
+ **Modals & dialogs:** Border + shadow only — no accent gradient bars/strips. `fadeUp` 0.35s entrance.
117
+
118
+ **Empty states:** Large icon with glow, Instrument Serif heading, secondary body text, CTA below, `iconFloat` 4s animation.
119
+
120
+ **Animations (always respect `prefers-reduced-motion`):** `fadeUp` (entrance), `status-ping` (live indicator), `iconFloat` (empty states), `spin-once` (refresh), staggered `animation-delay` on lists.
121
+
122
+ ### Design Principles
123
+
124
+ 1. **Precision over friendliness.** Every element earns its place. Wrenn doesn't need to tell you it's developer-friendly — that should be self-evident from the quality of the information architecture.
125
+
126
+ 2. **Density with breathing room.** Data-forward doesn't mean cramped. Strategic whitespace creates calm hierarchy within dense contexts. Sections breathe; rows don't waste space.
127
+
128
+ 3. **Industrial warmth.** The serif + mono + warm-black combination prevents sterility. This is a forge, not a gallery. The warmth is in the details, not the primary colors.
129
+
130
+ 4. **Legible at speed.** Users scan dashboards in seconds. Strong typographic contrast (serif h1, mono IDs, sans body), consistent patterns, and predictable placement let users orientate instantly without reading everything.
131
+
132
+ 5. **Craft signals trust.** For infrastructure that runs production code, the quality of the UI is a proxy for the quality of the product. Pixel-level decisions matter. Polish is not decoration — it's a trust signal.
wrenn-0.1.0/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 M/S Omukk, Bangladesh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
wrenn-0.1.0/Makefile ADDED
@@ -0,0 +1,38 @@
1
+ # Makefile
2
+ .PHONY: generate lint test check test-integration
3
+
4
+ # Variables
5
+ SPEC_URL = "https://raw.githubusercontent.com/wrennhq/wrenn/refs/heads/main/internal/api/openapi.yaml"
6
+ SPEC_PATH = "api/openapi.yaml"
7
+
8
+ generate:
9
+ @echo "Fetching latest OpenAPI spec from Git repo..."
10
+
11
+ mkdir -p api
12
+
13
+ curl -fsSL $(SPEC_URL) -o $(SPEC_PATH)
14
+
15
+ uv run datamodel-codegen \
16
+ --input $(SPEC_PATH) \
17
+ --output src/wrenn/models/_generated.py \
18
+ --output-model-type pydantic_v2.BaseModel \
19
+ --snake-case-field \
20
+ --field-constraints \
21
+ --use-schema-description \
22
+ --target-python-version 3.13 \
23
+ --use-annotated \
24
+ --openapi-scopes schemas \
25
+ --formatters ruff-format ruff-check \
26
+ --input-file-type openapi
27
+
28
+ lint:
29
+ uv run ruff check src/
30
+ uv run ruff format --check src/
31
+
32
+ test:
33
+ uv run pytest tests/test_client.py -v
34
+
35
+ test-integration:
36
+ uv run pytest tests/ -v -m "integration or not integration"
37
+
38
+ check: lint test