@moejay/wrightty 0.0.0

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 (84) hide show
  1. package/.github/workflows/ci.yml +90 -0
  2. package/.github/workflows/release.yml +177 -0
  3. package/Cargo.lock +2662 -0
  4. package/Cargo.toml +38 -0
  5. package/PROTOCOL.md +1351 -0
  6. package/README.md +386 -0
  7. package/agents/ceo/AGENTS.md +24 -0
  8. package/agents/ceo/HEARTBEAT.md +72 -0
  9. package/agents/ceo/SOUL.md +33 -0
  10. package/agents/ceo/TOOLS.md +3 -0
  11. package/agents/founding-engineer/AGENTS.md +44 -0
  12. package/crates/wrightty/Cargo.toml +43 -0
  13. package/crates/wrightty/src/client_cmds.rs +366 -0
  14. package/crates/wrightty/src/discover.rs +78 -0
  15. package/crates/wrightty/src/main.rs +100 -0
  16. package/crates/wrightty/src/server.rs +100 -0
  17. package/crates/wrightty/src/term.rs +338 -0
  18. package/crates/wrightty-bridge-ghostty/Cargo.toml +27 -0
  19. package/crates/wrightty-bridge-ghostty/src/ghostty.rs +422 -0
  20. package/crates/wrightty-bridge-ghostty/src/lib.rs +2 -0
  21. package/crates/wrightty-bridge-ghostty/src/main.rs +146 -0
  22. package/crates/wrightty-bridge-ghostty/src/rpc.rs +307 -0
  23. package/crates/wrightty-bridge-kitty/Cargo.toml +26 -0
  24. package/crates/wrightty-bridge-kitty/src/kitty.rs +269 -0
  25. package/crates/wrightty-bridge-kitty/src/lib.rs +2 -0
  26. package/crates/wrightty-bridge-kitty/src/main.rs +124 -0
  27. package/crates/wrightty-bridge-kitty/src/rpc.rs +304 -0
  28. package/crates/wrightty-bridge-tmux/Cargo.toml +26 -0
  29. package/crates/wrightty-bridge-tmux/src/lib.rs +2 -0
  30. package/crates/wrightty-bridge-tmux/src/main.rs +119 -0
  31. package/crates/wrightty-bridge-tmux/src/rpc.rs +291 -0
  32. package/crates/wrightty-bridge-tmux/src/tmux.rs +215 -0
  33. package/crates/wrightty-bridge-wezterm/Cargo.toml +26 -0
  34. package/crates/wrightty-bridge-wezterm/src/lib.rs +2 -0
  35. package/crates/wrightty-bridge-wezterm/src/main.rs +119 -0
  36. package/crates/wrightty-bridge-wezterm/src/rpc.rs +339 -0
  37. package/crates/wrightty-bridge-wezterm/src/wezterm.rs +190 -0
  38. package/crates/wrightty-bridge-zellij/Cargo.toml +27 -0
  39. package/crates/wrightty-bridge-zellij/src/lib.rs +2 -0
  40. package/crates/wrightty-bridge-zellij/src/main.rs +125 -0
  41. package/crates/wrightty-bridge-zellij/src/rpc.rs +328 -0
  42. package/crates/wrightty-bridge-zellij/src/zellij.rs +199 -0
  43. package/crates/wrightty-client/Cargo.toml +16 -0
  44. package/crates/wrightty-client/src/client.rs +254 -0
  45. package/crates/wrightty-client/src/lib.rs +2 -0
  46. package/crates/wrightty-core/Cargo.toml +21 -0
  47. package/crates/wrightty-core/src/input.rs +212 -0
  48. package/crates/wrightty-core/src/lib.rs +4 -0
  49. package/crates/wrightty-core/src/screen.rs +325 -0
  50. package/crates/wrightty-core/src/session.rs +249 -0
  51. package/crates/wrightty-core/src/session_manager.rs +77 -0
  52. package/crates/wrightty-protocol/Cargo.toml +13 -0
  53. package/crates/wrightty-protocol/src/error.rs +8 -0
  54. package/crates/wrightty-protocol/src/events.rs +138 -0
  55. package/crates/wrightty-protocol/src/lib.rs +4 -0
  56. package/crates/wrightty-protocol/src/methods.rs +321 -0
  57. package/crates/wrightty-protocol/src/types.rs +201 -0
  58. package/crates/wrightty-server/Cargo.toml +23 -0
  59. package/crates/wrightty-server/src/lib.rs +2 -0
  60. package/crates/wrightty-server/src/main.rs +65 -0
  61. package/crates/wrightty-server/src/rpc.rs +455 -0
  62. package/crates/wrightty-server/src/state.rs +39 -0
  63. package/examples/basic_command.py +53 -0
  64. package/examples/interactive_tui.py +86 -0
  65. package/examples/record_session.py +96 -0
  66. package/install.sh +81 -0
  67. package/package.json +24 -0
  68. package/sdks/node/package-lock.json +85 -0
  69. package/sdks/node/package.json +44 -0
  70. package/sdks/node/src/client.ts +94 -0
  71. package/sdks/node/src/index.ts +19 -0
  72. package/sdks/node/src/terminal.ts +258 -0
  73. package/sdks/node/src/types.ts +105 -0
  74. package/sdks/node/tsconfig.json +17 -0
  75. package/sdks/python/README.md +96 -0
  76. package/sdks/python/pyproject.toml +42 -0
  77. package/sdks/python/wrightty/__init__.py +6 -0
  78. package/sdks/python/wrightty/cli.py +210 -0
  79. package/sdks/python/wrightty/client.py +136 -0
  80. package/sdks/python/wrightty/mcp_server.py +434 -0
  81. package/sdks/python/wrightty/terminal.py +333 -0
  82. package/skills/wrightty/SKILL.md +261 -0
  83. package/src/lib.rs +1 -0
  84. package/tests/integration_test.rs +618 -0
@@ -0,0 +1,90 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ build-and-test:
14
+ name: Build, Test, Lint
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Install Rust toolchain
21
+ uses: dtolnay/rust-toolchain@stable
22
+ with:
23
+ components: clippy
24
+
25
+ - name: Cache cargo registry
26
+ uses: actions/cache@v4
27
+ with:
28
+ path: |
29
+ ~/.cargo/registry
30
+ ~/.cargo/git
31
+ target
32
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
33
+ restore-keys: |
34
+ ${{ runner.os }}-cargo-
35
+
36
+ - name: cargo build
37
+ run: cargo build --workspace
38
+
39
+ - name: cargo test
40
+ run: cargo test --workspace
41
+
42
+ - name: cargo clippy
43
+ run: cargo clippy --workspace -- -D warnings
44
+
45
+ node-sdk:
46
+ name: Node.js SDK
47
+ runs-on: ubuntu-latest
48
+
49
+ steps:
50
+ - uses: actions/checkout@v4
51
+
52
+ - name: Set up Node.js
53
+ uses: actions/setup-node@v4
54
+ with:
55
+ node-version: 20
56
+
57
+ - name: Install and build
58
+ working-directory: sdks/node
59
+ run: |
60
+ npm install
61
+ npm run build
62
+
63
+ python-sdk:
64
+ name: Python SDK
65
+ runs-on: ubuntu-latest
66
+
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+
70
+ - name: Set up Python
71
+ uses: actions/setup-python@v5
72
+ with:
73
+ python-version: "3.12"
74
+
75
+ - name: Install Python SDK
76
+ working-directory: sdks/python
77
+ run: pip install -e ".[cli,mcp]"
78
+
79
+ - name: Check Python syntax
80
+ working-directory: sdks/python
81
+ run: python -m py_compile wrightty/*.py
82
+
83
+ - name: Run Python tests (if any)
84
+ working-directory: sdks/python
85
+ run: |
86
+ if find . -name "test_*.py" | grep -q .; then
87
+ python -m pytest
88
+ else
89
+ echo "No Python tests found, skipping."
90
+ fi
@@ -0,0 +1,177 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ env:
12
+ CARGO_TERM_COLOR: always
13
+
14
+ jobs:
15
+ build:
16
+ strategy:
17
+ matrix:
18
+ include:
19
+ - target: x86_64-unknown-linux-gnu
20
+ os: ubuntu-latest
21
+ name: wrightty-linux-x86_64
22
+ - target: aarch64-unknown-linux-gnu
23
+ os: ubuntu-latest
24
+ name: wrightty-linux-aarch64
25
+ - target: x86_64-apple-darwin
26
+ os: macos-latest
27
+ name: wrightty-macos-x86_64
28
+ - target: aarch64-apple-darwin
29
+ os: macos-latest
30
+ name: wrightty-macos-aarch64
31
+
32
+ runs-on: ${{ matrix.os }}
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+
36
+ - name: Install Rust
37
+ uses: dtolnay/rust-toolchain@stable
38
+ with:
39
+ targets: ${{ matrix.target }}
40
+
41
+ - name: Install cross-compilation tools (Linux aarch64)
42
+ if: matrix.target == 'aarch64-unknown-linux-gnu'
43
+ run: |
44
+ sudo apt-get update
45
+ sudo apt-get install -y gcc-aarch64-linux-gnu
46
+
47
+ - name: Build
48
+ run: cargo build --release --target ${{ matrix.target }} -p wrightty
49
+ env:
50
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
51
+
52
+ - name: Package
53
+ run: |
54
+ mkdir -p dist
55
+ cp target/${{ matrix.target }}/release/wrightty dist/
56
+ cd dist
57
+ tar czf ../${{ matrix.name }}.tar.gz wrightty
58
+
59
+ - name: Upload artifact
60
+ uses: actions/upload-artifact@v4
61
+ with:
62
+ name: ${{ matrix.name }}
63
+ path: ${{ matrix.name }}.tar.gz
64
+
65
+ release:
66
+ needs: build
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+
71
+ - name: Download all artifacts
72
+ uses: actions/download-artifact@v4
73
+ with:
74
+ path: artifacts
75
+
76
+ - name: Create Release
77
+ uses: softprops/action-gh-release@v2
78
+ with:
79
+ files: artifacts/**/*.tar.gz
80
+ generate_release_notes: true
81
+ draft: false
82
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
83
+
84
+ publish-crates:
85
+ needs: release
86
+ runs-on: ubuntu-latest
87
+ steps:
88
+ - uses: actions/checkout@v4
89
+
90
+ - name: Install Rust
91
+ uses: dtolnay/rust-toolchain@stable
92
+
93
+ - name: Publish to crates.io
94
+ env:
95
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
96
+ run: |
97
+ # Publish in dependency order, skipping crates already at this version.
98
+ # crates.io rate limits new crates to ~5 burst then 1 per 10 min.
99
+ VERSION="0.1.0"
100
+ publish_if_needed() {
101
+ local crate=$1
102
+ local wait_after=${2:-30}
103
+ local existing
104
+ existing=$(curl -sf -H "User-Agent: wrightty-ci" \
105
+ "https://crates.io/api/v1/crates/$crate" 2>/dev/null | \
106
+ grep -o "\"num\":\"$VERSION\"" | head -1)
107
+ if [ -n "$existing" ]; then
108
+ echo "Skipping $crate: v$VERSION already published"
109
+ return 0
110
+ fi
111
+ echo "Publishing $crate v$VERSION..."
112
+ cargo publish -p "$crate"
113
+ echo "Waiting ${wait_after}s for indexing / rate limit..."
114
+ sleep "$wait_after"
115
+ }
116
+ # Level 0: no internal deps
117
+ publish_if_needed wrightty-protocol 30
118
+ # Level 1: depend on protocol
119
+ publish_if_needed wrightty-core 30
120
+ publish_if_needed wrightty-client 30
121
+ publish_if_needed wrightty-bridge-wezterm 30
122
+ publish_if_needed wrightty-bridge-tmux 30
123
+ publish_if_needed wrightty-bridge-kitty 30
124
+ publish_if_needed wrightty-bridge-zellij 30
125
+ publish_if_needed wrightty-bridge-ghostty 30
126
+ # Level 2: depend on core/protocol
127
+ publish_if_needed wrightty-server 30
128
+ # Level 3: depends on everything
129
+ publish_if_needed wrightty 0
130
+
131
+ publish-npm:
132
+ needs: release
133
+ runs-on: ubuntu-latest
134
+ permissions:
135
+ id-token: write # Required for npm trusted publishing (OIDC)
136
+ steps:
137
+ - uses: actions/checkout@v4
138
+
139
+ - uses: actions/setup-node@v4
140
+ with:
141
+ node-version: 24
142
+ registry-url: https://registry.npmjs.org
143
+
144
+ - name: Build and publish npm package
145
+ working-directory: sdks/node
146
+ run: |
147
+ npm install
148
+ npm run build
149
+ npm publish --access public --provenance
150
+
151
+ publish-pypi:
152
+ needs: release
153
+ runs-on: ubuntu-latest
154
+ environment:
155
+ name: pypi
156
+ url: https://pypi.org/p/wrightty
157
+ permissions:
158
+ id-token: write # Required for PyPI trusted publishing (OIDC)
159
+ steps:
160
+ - uses: actions/checkout@v4
161
+
162
+ - uses: actions/setup-python@v5
163
+ with:
164
+ python-version: "3.12"
165
+
166
+ - name: Build Python package
167
+ working-directory: sdks/python
168
+ run: |
169
+ pip install build
170
+ python -m build
171
+
172
+ - name: Publish to PyPI
173
+ uses: pypa/gh-action-pypi-publish@release/v1
174
+ with:
175
+ packages-dir: sdks/python/dist/
176
+ verbose: true
177
+ attestations: false