sigil-sh 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 (56) hide show
  1. sigil_sh-0.1.0/.github/workflows/ci.yml +43 -0
  2. sigil_sh-0.1.0/.github/workflows/release.yml +52 -0
  3. sigil_sh-0.1.0/.gitignore +11 -0
  4. sigil_sh-0.1.0/.pre-commit-config.yaml +35 -0
  5. sigil_sh-0.1.0/CHANGELOG.md +29 -0
  6. sigil_sh-0.1.0/CONTRIBUTING.md +48 -0
  7. sigil_sh-0.1.0/LICENSE +183 -0
  8. sigil_sh-0.1.0/MANIFEST.in +7 -0
  9. sigil_sh-0.1.0/PKG-INFO +354 -0
  10. sigil_sh-0.1.0/README.md +326 -0
  11. sigil_sh-0.1.0/docs/cli.md +510 -0
  12. sigil_sh-0.1.0/docs/demo.zsh +31 -0
  13. sigil_sh-0.1.0/docs/make-tuis-obsolete.md +222 -0
  14. sigil_sh-0.1.0/docs/semantic-operators-roadmap.md +189 -0
  15. sigil_sh-0.1.0/docs/trust-model.md +101 -0
  16. sigil_sh-0.1.0/docs/ux-directions.md +81 -0
  17. sigil_sh-0.1.0/pyproject.toml +76 -0
  18. sigil_sh-0.1.0/scripts/render-demo-gifs.sh +32 -0
  19. sigil_sh-0.1.0/setup.cfg +4 -0
  20. sigil_sh-0.1.0/src/sigil/__init__.py +1 -0
  21. sigil_sh-0.1.0/src/sigil/_version.py +24 -0
  22. sigil_sh-0.1.0/src/sigil/acts.py +502 -0
  23. sigil_sh-0.1.0/src/sigil/ansi.py +5 -0
  24. sigil_sh-0.1.0/src/sigil/cli.py +996 -0
  25. sigil_sh-0.1.0/src/sigil/commands.py +87 -0
  26. sigil_sh-0.1.0/src/sigil/failure.py +203 -0
  27. sigil_sh-0.1.0/src/sigil/goals.py +376 -0
  28. sigil_sh-0.1.0/src/sigil/handoff.py +124 -0
  29. sigil_sh-0.1.0/src/sigil/install.py +343 -0
  30. sigil_sh-0.1.0/src/sigil/model.py +147 -0
  31. sigil_sh-0.1.0/src/sigil/operators.py +519 -0
  32. sigil_sh-0.1.0/src/sigil/pi_extensions/bash_handoff.ts +39 -0
  33. sigil_sh-0.1.0/src/sigil/pi_stream.py +519 -0
  34. sigil_sh-0.1.0/src/sigil/policy.py +304 -0
  35. sigil_sh-0.1.0/src/sigil/question.py +230 -0
  36. sigil_sh-0.1.0/src/sigil/security.py +92 -0
  37. sigil_sh-0.1.0/src/sigil/session.py +328 -0
  38. sigil_sh-0.1.0/src/sigil/shell/bash/sigil.bash +406 -0
  39. sigil_sh-0.1.0/src/sigil/shell/zsh/sigil.zsh +438 -0
  40. sigil_sh-0.1.0/src/sigil/state.py +142 -0
  41. sigil_sh-0.1.0/src/sigil/status.py +212 -0
  42. sigil_sh-0.1.0/src/sigil/tty.py +66 -0
  43. sigil_sh-0.1.0/src/sigil_sh.egg-info/PKG-INFO +354 -0
  44. sigil_sh-0.1.0/src/sigil_sh.egg-info/SOURCES.txt +54 -0
  45. sigil_sh-0.1.0/src/sigil_sh.egg-info/dependency_links.txt +1 -0
  46. sigil_sh-0.1.0/src/sigil_sh.egg-info/entry_points.txt +2 -0
  47. sigil_sh-0.1.0/src/sigil_sh.egg-info/requires.txt +1 -0
  48. sigil_sh-0.1.0/src/sigil_sh.egg-info/top_level.txt +1 -0
  49. sigil_sh-0.1.0/tests/_patch.py +74 -0
  50. sigil_sh-0.1.0/tests/conftest.py +17 -0
  51. sigil_sh-0.1.0/tests/test_install.py +118 -0
  52. sigil_sh-0.1.0/tests/test_operators.py +1207 -0
  53. sigil_sh-0.1.0/tests/test_security_state.py +1524 -0
  54. sigil_sh-0.1.0/tests/test_shell_bindings.py +736 -0
  55. sigil_sh-0.1.0/tests/test_status.py +147 -0
  56. sigil_sh-0.1.0/uv.lock +497 -0
@@ -0,0 +1,43 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ name: Tests and pre-commit / Python ${{ matrix.python-version }}
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.11", "3.12", "3.13"]
20
+
21
+ steps:
22
+ - name: Check out repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Install zsh for shell binding tests
34
+ run: sudo apt-get update && sudo apt-get install -y zsh
35
+
36
+ - name: Sync dependencies
37
+ run: uv sync --group dev
38
+
39
+ - name: Run pre-commit
40
+ run: uv run pre-commit run --all-files
41
+
42
+ - name: Run tests
43
+ run: uv run pytest
@@ -0,0 +1,52 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ name: Build and publish to PyPI
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Check out repository
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Ensure tag points at main history
24
+ run: |
25
+ git fetch origin main
26
+ git merge-base --is-ancestor "$GITHUB_SHA" origin/main
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v5
30
+
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.13"
35
+
36
+ - name: Install zsh for shell binding tests
37
+ run: sudo apt-get update && sudo apt-get install -y zsh
38
+
39
+ - name: Sync dependencies
40
+ run: uv sync --group dev
41
+
42
+ - name: Run pre-commit
43
+ run: uv run pre-commit run --all-files
44
+
45
+ - name: Run tests
46
+ run: uv run pytest
47
+
48
+ - name: Build distributions
49
+ run: uv build
50
+
51
+ - name: Publish to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ .DS_Store
8
+ src/sigil/_version.py
9
+ src/sigil_sh.egg-info/
10
+ node_modules/
11
+ package-lock.json
@@ -0,0 +1,35 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-check
5
+ name: ruff check
6
+ entry: uv run ruff check
7
+ language: system
8
+ require_serial: true
9
+ types_or: [python, pyi]
10
+ exclude: ^docs/demos/
11
+ - id: ruff-format
12
+ name: ruff format
13
+ entry: uv run ruff format --check
14
+ language: system
15
+ require_serial: true
16
+ types_or: [python, pyi]
17
+ exclude: ^docs/demos/
18
+ - id: ty-check
19
+ name: ty check
20
+ entry: uv run ty check src tests
21
+ language: system
22
+ require_serial: true
23
+ pass_filenames: false
24
+ - id: vulture
25
+ name: vulture
26
+ entry: uv run vulture src tests --min-confidence 80
27
+ language: system
28
+ require_serial: true
29
+ pass_filenames: false
30
+ - id: complexipy
31
+ name: complexipy
32
+ entry: uv run complexipy src tests --plain --failed --max-complexity-allowed 25
33
+ language: system
34
+ require_serial: true
35
+ pass_filenames: false
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ All notable changes to Sigil are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
+ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-05-28
10
+
11
+ First alpha release.
12
+
13
+ ### Added
14
+
15
+ - Verb-first CLI (`sigil command`, `events`, `session`, `status`, `install`,
16
+ `doctor`) with optional punctuation glyphs.
17
+ - Glyph routes: `,` (propose), `,,` / `,,,` (one agent step), `?` / `??`
18
+ (read-only answers), `@` / `@@` (bounded goal loops).
19
+ - zsh and Bash bindings installed via `sigil install`, with `--no-glyphs` for a
20
+ punctuation-free setup.
21
+ - Event-sourced state under `~/.sigil/` with trust records (route, mode, risk
22
+ labels, input lineage) inspectable through `sigil events` and
23
+ `sigil events lineage`.
24
+ - `sigil doctor` environment checks for the `pi`, `glow`, and `sigil`
25
+ executables, model endpoint reachability, model configuration, state
26
+ writability, and shell binding installation.
27
+
28
+ [Unreleased]: https://github.com/rlouf/sigil/compare/v0.1.0...HEAD
29
+ [0.1.0]: https://github.com/rlouf/sigil/releases/tag/v0.1.0
@@ -0,0 +1,48 @@
1
+ # Contributing to Sigil
2
+
3
+ Sigil is alpha software. Bug reports, reproductions, and focused pull requests
4
+ are all welcome.
5
+
6
+ ## Development setup
7
+
8
+ Sigil uses [uv](https://docs.astral.sh/uv/). Install the dev dependencies:
9
+
10
+ ```sh
11
+ uv sync --group dev
12
+ ```
13
+
14
+ ## Checks
15
+
16
+ Run the same checks CI runs before opening a pull request:
17
+
18
+ ```sh
19
+ uv run pre-commit run --all-files
20
+ uv run pytest
21
+ ```
22
+
23
+ Pre-commit runs ruff (lint + format), `ty` type checking, vulture, and
24
+ complexipy. Tests live in `tests/` and use pytest with indicative function
25
+ names rather than test classes.
26
+
27
+ ## Working on the agent routes
28
+
29
+ The `pi`-backed routes (`?`, `??`, `,,`, `,,,`, `@`, `@@`) need the
30
+ [pi-mono](https://github.com/earendil-works/pi) coding-agent CLI and a local
31
+ OpenAI-compatible model endpoint. The `,` route needs only the endpoint. See
32
+ the README's Requirements section for setup, and run `sigil doctor` to confirm
33
+ your environment.
34
+
35
+ ## Demos
36
+
37
+ Deterministic demo GIFs are rendered from VHS tapes in `docs/demos/`, shimming
38
+ external dependencies (model server, `pi`, `uv`):
39
+
40
+ ```sh
41
+ scripts/render-demo-gifs.sh
42
+ ```
43
+
44
+ ## Pull requests
45
+
46
+ - Keep changes focused and explain the motivation.
47
+ - Add or update tests for behavior changes.
48
+ - Make sure `pre-commit` and `pytest` pass.
sigil_sh-0.1.0/LICENSE ADDED
@@ -0,0 +1,183 @@
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, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work (an example is provided in the Appendix
36
+ below).
37
+
38
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
39
+ is based on (or derived from) the Work and for which the editorial revisions,
40
+ annotations, elaborations, or other modifications represent, as a whole, an
41
+ original work of authorship. For the purposes of this License, Derivative Works
42
+ shall not include works that remain separable from, or merely link (or bind by
43
+ name) to the interfaces of, the Work and Derivative Works thereof.
44
+
45
+ "Contribution" shall mean any work of authorship, including the original version
46
+ of the Work and any modifications or additions to that Work or Derivative Works
47
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work by
48
+ the copyright owner or by an individual or Legal Entity authorized to submit on
49
+ behalf of the copyright owner. For the purposes of this definition, "submitted"
50
+ means any form of electronic, verbal, or written communication sent to the
51
+ Licensor or its representatives, including but not limited to communication on
52
+ electronic mailing lists, source code control systems, and issue tracking
53
+ systems that are managed by, or on behalf of, the Licensor for the purpose of
54
+ discussing and improving the Work, but excluding communication that is
55
+ conspicuously marked or otherwise designated in writing by the copyright owner
56
+ as "Not a Contribution."
57
+
58
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
59
+ of whom a Contribution has been received by Licensor and subsequently
60
+ incorporated within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
63
+ License, each Contributor hereby grants to You a perpetual, worldwide,
64
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
65
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
66
+ sublicense, and distribute the Work and such Derivative Works in Source or
67
+ Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
70
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
71
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
72
+ license to make, have made, use, offer to sell, sell, import, and otherwise
73
+ transfer the Work, where such license applies only to those patent claims
74
+ licensable by such Contributor that are necessarily infringed by their
75
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
76
+ to which such Contribution(s) was submitted. If You institute patent litigation
77
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
78
+ alleging that the Work or a Contribution incorporated within the Work
79
+ constitutes direct or contributory patent infringement, then any patent licenses
80
+ granted to You under this License for that Work shall terminate as of the date
81
+ such litigation is filed.
82
+
83
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
84
+ Derivative Works thereof in any medium, with or without modifications, and in
85
+ Source or Object form, provided that You meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
88
+ this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices stating that
91
+ You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works that You
94
+ distribute, all copyright, patent, trademark, and attribution notices from the
95
+ Source form of the Work, excluding those notices that do not pertain to any part
96
+ of the Derivative Works; and
97
+
98
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
99
+ any Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or, within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents of
106
+ the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+
112
+ You may add Your own copyright statement to Your modifications and may provide
113
+ additional or different license terms and conditions for use, reproduction, or
114
+ distribution of Your modifications, or for any such Derivative Works as a whole,
115
+ provided Your use, reproduction, and distribution of the Work otherwise complies
116
+ with the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
119
+ Contribution intentionally submitted for inclusion in the Work by You to the
120
+ Licensor shall be under the terms and conditions of this License, without any
121
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
122
+ supersede or modify the terms of any separate license agreement you may have
123
+ executed with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade names,
126
+ trademarks, service marks, or product names of the Licensor, except as required
127
+ for reasonable and customary use in describing the origin of the Work and
128
+ reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
131
+ writing, Licensor provides the Work (and each Contributor provides its
132
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
133
+ KIND, either express or implied, including, without limitation, any warranties or
134
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135
+ PARTICULAR PURPOSE. You are solely responsible for determining the
136
+ appropriateness of using or redistributing the Work and assume any risks
137
+ associated with Your exercise of permissions under this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
140
+ tort (including negligence), contract, or otherwise, unless required by
141
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
142
+ writing, shall any Contributor be liable to You for damages, including any
143
+ direct, indirect, special, incidental, or consequential damages of any character
144
+ arising as a result of this License or out of the use or inability to use the
145
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
146
+ computer failure or malfunction, or any and all other commercial damages or
147
+ losses), even if such Contributor has been advised of the possibility of such
148
+ damages.
149
+
150
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
151
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
152
+ acceptance of support, warranty, indemnity, or other liability obligations
153
+ and/or rights consistent with this License. However, in accepting such
154
+ obligations, You may act only on Your own behalf and on Your sole
155
+ responsibility, not on behalf of any other Contributor, and only if You agree to
156
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
157
+ by, or claims asserted against, such Contributor by reason of your accepting any
158
+ such warranty or additional liability.
159
+
160
+ END OF TERMS AND CONDITIONS
161
+
162
+ APPENDIX: How to apply the Apache License to your work.
163
+
164
+ To apply the Apache License to your work, attach the following boilerplate
165
+ notice, with the fields enclosed by brackets "[]" replaced with your own
166
+ identifying information. (Don't include the brackets!) The text should be
167
+ enclosed in the appropriate comment syntax for the file format. We also
168
+ recommend that a file or class name and description of purpose be included on
169
+ the same "printed page" as the copyright notice for easier identification within
170
+ third-party archives.
171
+
172
+ Copyright 2026 Remi Louf
173
+
174
+ Licensed under the Apache License, Version 2.0 (the "License");
175
+ you may not use this file except in compliance with the License.
176
+ You may obtain a copy of the License at
177
+
178
+ http://www.apache.org/licenses/LICENSE-2.0
179
+
180
+ Unless required by applicable law or agreed to in writing, software distributed
181
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
182
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
183
+ specific language governing permissions and limitations under the License.
@@ -0,0 +1,7 @@
1
+ # Keep the sdist lean. setuptools-scm adds every tracked file by default; the
2
+ # demo recordings and rendered GIFs are dev-only artifacts the package does not
3
+ # need. The shell bindings and Pi extension ship via package-data, not here.
4
+ prune docs/demos
5
+ exclude docs/demo.gif
6
+ exclude docs/demo.tape
7
+ global-exclude .DS_Store