@moejay/wrightty 0.0.0 → 0.1.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 (92) hide show
  1. package/dist/client.d.ts +14 -0
  2. package/dist/client.js +83 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.js +8 -0
  5. package/dist/terminal.d.ts +48 -0
  6. package/dist/terminal.js +210 -0
  7. package/dist/types.d.ts +90 -0
  8. package/dist/types.js +3 -0
  9. package/package.json +35 -15
  10. package/.github/workflows/ci.yml +0 -90
  11. package/.github/workflows/release.yml +0 -177
  12. package/Cargo.lock +0 -2662
  13. package/Cargo.toml +0 -38
  14. package/PROTOCOL.md +0 -1351
  15. package/README.md +0 -386
  16. package/agents/ceo/AGENTS.md +0 -24
  17. package/agents/ceo/HEARTBEAT.md +0 -72
  18. package/agents/ceo/SOUL.md +0 -33
  19. package/agents/ceo/TOOLS.md +0 -3
  20. package/agents/founding-engineer/AGENTS.md +0 -44
  21. package/crates/wrightty/Cargo.toml +0 -43
  22. package/crates/wrightty/src/client_cmds.rs +0 -366
  23. package/crates/wrightty/src/discover.rs +0 -78
  24. package/crates/wrightty/src/main.rs +0 -100
  25. package/crates/wrightty/src/server.rs +0 -100
  26. package/crates/wrightty/src/term.rs +0 -338
  27. package/crates/wrightty-bridge-ghostty/Cargo.toml +0 -27
  28. package/crates/wrightty-bridge-ghostty/src/ghostty.rs +0 -422
  29. package/crates/wrightty-bridge-ghostty/src/lib.rs +0 -2
  30. package/crates/wrightty-bridge-ghostty/src/main.rs +0 -146
  31. package/crates/wrightty-bridge-ghostty/src/rpc.rs +0 -307
  32. package/crates/wrightty-bridge-kitty/Cargo.toml +0 -26
  33. package/crates/wrightty-bridge-kitty/src/kitty.rs +0 -269
  34. package/crates/wrightty-bridge-kitty/src/lib.rs +0 -2
  35. package/crates/wrightty-bridge-kitty/src/main.rs +0 -124
  36. package/crates/wrightty-bridge-kitty/src/rpc.rs +0 -304
  37. package/crates/wrightty-bridge-tmux/Cargo.toml +0 -26
  38. package/crates/wrightty-bridge-tmux/src/lib.rs +0 -2
  39. package/crates/wrightty-bridge-tmux/src/main.rs +0 -119
  40. package/crates/wrightty-bridge-tmux/src/rpc.rs +0 -291
  41. package/crates/wrightty-bridge-tmux/src/tmux.rs +0 -215
  42. package/crates/wrightty-bridge-wezterm/Cargo.toml +0 -26
  43. package/crates/wrightty-bridge-wezterm/src/lib.rs +0 -2
  44. package/crates/wrightty-bridge-wezterm/src/main.rs +0 -119
  45. package/crates/wrightty-bridge-wezterm/src/rpc.rs +0 -339
  46. package/crates/wrightty-bridge-wezterm/src/wezterm.rs +0 -190
  47. package/crates/wrightty-bridge-zellij/Cargo.toml +0 -27
  48. package/crates/wrightty-bridge-zellij/src/lib.rs +0 -2
  49. package/crates/wrightty-bridge-zellij/src/main.rs +0 -125
  50. package/crates/wrightty-bridge-zellij/src/rpc.rs +0 -328
  51. package/crates/wrightty-bridge-zellij/src/zellij.rs +0 -199
  52. package/crates/wrightty-client/Cargo.toml +0 -16
  53. package/crates/wrightty-client/src/client.rs +0 -254
  54. package/crates/wrightty-client/src/lib.rs +0 -2
  55. package/crates/wrightty-core/Cargo.toml +0 -21
  56. package/crates/wrightty-core/src/input.rs +0 -212
  57. package/crates/wrightty-core/src/lib.rs +0 -4
  58. package/crates/wrightty-core/src/screen.rs +0 -325
  59. package/crates/wrightty-core/src/session.rs +0 -249
  60. package/crates/wrightty-core/src/session_manager.rs +0 -77
  61. package/crates/wrightty-protocol/Cargo.toml +0 -13
  62. package/crates/wrightty-protocol/src/error.rs +0 -8
  63. package/crates/wrightty-protocol/src/events.rs +0 -138
  64. package/crates/wrightty-protocol/src/lib.rs +0 -4
  65. package/crates/wrightty-protocol/src/methods.rs +0 -321
  66. package/crates/wrightty-protocol/src/types.rs +0 -201
  67. package/crates/wrightty-server/Cargo.toml +0 -23
  68. package/crates/wrightty-server/src/lib.rs +0 -2
  69. package/crates/wrightty-server/src/main.rs +0 -65
  70. package/crates/wrightty-server/src/rpc.rs +0 -455
  71. package/crates/wrightty-server/src/state.rs +0 -39
  72. package/examples/basic_command.py +0 -53
  73. package/examples/interactive_tui.py +0 -86
  74. package/examples/record_session.py +0 -96
  75. package/install.sh +0 -81
  76. package/sdks/node/package-lock.json +0 -85
  77. package/sdks/node/package.json +0 -44
  78. package/sdks/node/src/client.ts +0 -94
  79. package/sdks/node/src/index.ts +0 -19
  80. package/sdks/node/src/terminal.ts +0 -258
  81. package/sdks/node/src/types.ts +0 -105
  82. package/sdks/node/tsconfig.json +0 -17
  83. package/sdks/python/README.md +0 -96
  84. package/sdks/python/pyproject.toml +0 -42
  85. package/sdks/python/wrightty/__init__.py +0 -6
  86. package/sdks/python/wrightty/cli.py +0 -210
  87. package/sdks/python/wrightty/client.py +0 -136
  88. package/sdks/python/wrightty/mcp_server.py +0 -434
  89. package/sdks/python/wrightty/terminal.py +0 -333
  90. package/skills/wrightty/SKILL.md +0 -261
  91. package/src/lib.rs +0 -1
  92. package/tests/integration_test.rs +0 -618
@@ -0,0 +1,14 @@
1
+ /** Low-level WebSocket JSON-RPC 2.0 client for the Wrightty protocol. */
2
+ export declare class WrighttyError extends Error {
3
+ code: number;
4
+ constructor(code: number, message: string);
5
+ }
6
+ export declare class WrighttyClient {
7
+ private ws;
8
+ private nextId;
9
+ private pending;
10
+ private constructor();
11
+ static connect(url: string, timeoutMs?: number): Promise<WrighttyClient>;
12
+ request(method: string, params?: Record<string, any>): Promise<any>;
13
+ close(): void;
14
+ }
package/dist/client.js ADDED
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ /** Low-level WebSocket JSON-RPC 2.0 client for the Wrightty protocol. */
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.WrighttyClient = exports.WrighttyError = void 0;
8
+ const ws_1 = __importDefault(require("ws"));
9
+ class WrighttyError extends Error {
10
+ code;
11
+ constructor(code, message) {
12
+ super(`[${code}] ${message}`);
13
+ this.code = code;
14
+ this.name = "WrighttyError";
15
+ }
16
+ }
17
+ exports.WrighttyError = WrighttyError;
18
+ class WrighttyClient {
19
+ ws;
20
+ nextId = 1;
21
+ pending = new Map();
22
+ constructor(ws) {
23
+ this.ws = ws;
24
+ ws.on("message", (data) => {
25
+ try {
26
+ const msg = JSON.parse(data.toString());
27
+ const entry = this.pending.get(msg.id);
28
+ if (!entry)
29
+ return;
30
+ this.pending.delete(msg.id);
31
+ if (msg.error) {
32
+ entry.reject(new WrighttyError(msg.error.code ?? -1, msg.error.message ?? "Unknown error"));
33
+ }
34
+ else {
35
+ entry.resolve(msg.result);
36
+ }
37
+ }
38
+ catch {
39
+ // Ignore malformed messages
40
+ }
41
+ });
42
+ ws.on("close", () => {
43
+ for (const [id, entry] of this.pending) {
44
+ entry.reject(new Error("Connection closed"));
45
+ this.pending.delete(id);
46
+ }
47
+ });
48
+ }
49
+ static connect(url, timeoutMs = 5000) {
50
+ return new Promise((resolve, reject) => {
51
+ const ws = new ws_1.default(url);
52
+ const timer = setTimeout(() => {
53
+ ws.close();
54
+ reject(new Error(`Connection timeout after ${timeoutMs}ms: ${url}`));
55
+ }, timeoutMs);
56
+ ws.on("open", () => {
57
+ clearTimeout(timer);
58
+ resolve(new WrighttyClient(ws));
59
+ });
60
+ ws.on("error", (err) => {
61
+ clearTimeout(timer);
62
+ reject(err);
63
+ });
64
+ });
65
+ }
66
+ async request(method, params = {}) {
67
+ const id = this.nextId++;
68
+ const msg = JSON.stringify({ jsonrpc: "2.0", id, method, params });
69
+ return new Promise((resolve, reject) => {
70
+ this.pending.set(id, { resolve, reject });
71
+ this.ws.send(msg, (err) => {
72
+ if (err) {
73
+ this.pending.delete(id);
74
+ reject(err);
75
+ }
76
+ });
77
+ });
78
+ }
79
+ close() {
80
+ this.ws.close();
81
+ }
82
+ }
83
+ exports.WrighttyClient = WrighttyClient;
@@ -0,0 +1,3 @@
1
+ export { Terminal } from "./terminal";
2
+ export { WrighttyClient, WrighttyError } from "./client";
3
+ export type { ServerInfo, Capabilities, ScreenshotFormat, SessionInfo, KeyInput, KeyEvent, TextMatch, WaitForTextResult, ScreenshotResult, RecordingResult, SessionRecordingData, ActionRecordingData, DiscoveredServer, ConnectOptions, SpawnOptions, } from "./types";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WrighttyError = exports.WrighttyClient = exports.Terminal = void 0;
4
+ var terminal_1 = require("./terminal");
5
+ Object.defineProperty(exports, "Terminal", { enumerable: true, get: function () { return terminal_1.Terminal; } });
6
+ var client_1 = require("./client");
7
+ Object.defineProperty(exports, "WrighttyClient", { enumerable: true, get: function () { return client_1.WrighttyClient; } });
8
+ Object.defineProperty(exports, "WrighttyError", { enumerable: true, get: function () { return client_1.WrighttyError; } });
@@ -0,0 +1,48 @@
1
+ /** High-level Terminal API for AI agents and automation. */
2
+ import type { ConnectOptions, DiscoveredServer, ScreenshotFormat, ScreenshotResult, SpawnOptions, SessionRecordingData, ActionRecordingData } from "./types";
3
+ export declare class Terminal {
4
+ private client;
5
+ private sessionId;
6
+ private promptPattern;
7
+ private constructor();
8
+ /** Scan for running wrightty servers on ports 9420-9520. */
9
+ static discover(host?: string): Promise<DiscoveredServer[]>;
10
+ /** Connect to a wrightty server. Auto-discovers if no URL given. */
11
+ static connect(options?: ConnectOptions): Promise<Terminal>;
12
+ /** Connect to a headless server and create a new session. */
13
+ static spawn(options?: SpawnOptions): Promise<Terminal>;
14
+ /** Close the connection. */
15
+ close(): void;
16
+ /** Run a command and return its output. */
17
+ run(command: string, timeoutMs?: number): Promise<string>;
18
+ /** Send raw text to the terminal. */
19
+ sendText(text: string): Promise<void>;
20
+ /** Send structured keystrokes. */
21
+ sendKeys(...keys: string[]): Promise<void>;
22
+ /** Read the current visible screen as text. */
23
+ readScreen(): Promise<string>;
24
+ /** Take a screenshot. */
25
+ screenshot(format?: ScreenshotFormat): Promise<ScreenshotResult>;
26
+ /** Wait until a pattern appears on screen. */
27
+ waitFor(pattern: string | RegExp, timeoutMs?: number): Promise<string>;
28
+ /** Wait for the shell prompt to appear. */
29
+ waitForPrompt(timeoutMs?: number): Promise<string>;
30
+ /** Override the regex used to detect the shell prompt. */
31
+ setPromptPattern(pattern: RegExp): void;
32
+ /** Get terminal dimensions as [cols, rows]. */
33
+ getSize(): Promise<[number, number]>;
34
+ /** Resize the terminal. */
35
+ resize(cols: number, rows: number): Promise<void>;
36
+ /** Get server info and capabilities. */
37
+ getInfo(): Promise<Record<string, any>>;
38
+ /** Start recording raw PTY I/O (asciicast v2 format). */
39
+ startSessionRecording(includeInput?: boolean): Promise<string>;
40
+ /** Stop a session recording and return asciicast data. */
41
+ stopSessionRecording(recordingId: string): Promise<SessionRecordingData>;
42
+ /** Start recording wrightty API calls as a replayable script. */
43
+ startActionRecording(format?: "python" | "json" | "cli"): Promise<string>;
44
+ /** Stop action recording and return the generated script. */
45
+ stopActionRecording(recordingId: string): Promise<ActionRecordingData>;
46
+ /** Capture a single screen frame. */
47
+ captureScreen(format?: ScreenshotFormat): Promise<Record<string, any>>;
48
+ }
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ /** High-level Terminal API for AI agents and automation. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Terminal = void 0;
5
+ const client_1 = require("./client");
6
+ const PORT_RANGE_START = 9420;
7
+ const PORT_RANGE_END = 9520;
8
+ class Terminal {
9
+ client;
10
+ sessionId;
11
+ promptPattern = /[$#>%]\s*$/;
12
+ constructor(client, sessionId) {
13
+ this.client = client;
14
+ this.sessionId = sessionId;
15
+ }
16
+ /** Scan for running wrightty servers on ports 9420-9520. */
17
+ static async discover(host = "127.0.0.1") {
18
+ const found = [];
19
+ const checks = [];
20
+ for (let port = PORT_RANGE_START; port <= PORT_RANGE_END; port++) {
21
+ const url = `ws://${host}:${port}`;
22
+ checks.push(client_1.WrighttyClient.connect(url, 200)
23
+ .then(async (client) => {
24
+ try {
25
+ const info = await client.request("Wrightty.getInfo");
26
+ found.push({
27
+ url,
28
+ port,
29
+ version: info.version ?? "unknown",
30
+ implementation: info.implementation ?? "unknown",
31
+ capabilities: info.capabilities ?? {},
32
+ });
33
+ }
34
+ finally {
35
+ client.close();
36
+ }
37
+ })
38
+ .catch(() => {
39
+ /* port not listening */
40
+ }));
41
+ }
42
+ await Promise.all(checks);
43
+ return found.sort((a, b) => a.port - b.port);
44
+ }
45
+ /** Connect to a wrightty server. Auto-discovers if no URL given. */
46
+ static async connect(options = {}) {
47
+ let url = options.url;
48
+ if (!url) {
49
+ const servers = await Terminal.discover();
50
+ if (servers.length === 0) {
51
+ throw new Error("No wrightty server found. Start one with:\n" +
52
+ " wrightty term --headless\n" +
53
+ " wrightty term --bridge-tmux\n" +
54
+ " wrightty term --bridge-wezterm");
55
+ }
56
+ url = servers[0].url;
57
+ }
58
+ const client = await client_1.WrighttyClient.connect(url, options.timeout ?? 5000);
59
+ let sessionId = options.sessionId;
60
+ if (!sessionId) {
61
+ const result = await client.request("Session.list");
62
+ const sessions = result.sessions ?? [];
63
+ sessionId = sessions.length > 0 ? sessions[0].sessionId : "0";
64
+ }
65
+ return new Terminal(client, sessionId);
66
+ }
67
+ /** Connect to a headless server and create a new session. */
68
+ static async spawn(options = {}) {
69
+ const url = options.serverUrl ?? "ws://127.0.0.1:9420";
70
+ const client = await client_1.WrighttyClient.connect(url);
71
+ const result = await client.request("Session.create", {
72
+ cols: options.cols ?? 120,
73
+ rows: options.rows ?? 40,
74
+ shell: options.shell,
75
+ cwd: options.cwd,
76
+ });
77
+ const term = new Terminal(client, result.sessionId);
78
+ await term.waitForPrompt(5000);
79
+ return term;
80
+ }
81
+ /** Close the connection. */
82
+ close() {
83
+ this.client.close();
84
+ }
85
+ // --- High-level API ---
86
+ /** Run a command and return its output. */
87
+ async run(command, timeoutMs = 30000) {
88
+ await this.sendText(command + "\n");
89
+ await this.waitForPrompt(timeoutMs);
90
+ const screen = await this.readScreen();
91
+ const lines = screen.trim().split("\n");
92
+ const outputLines = [];
93
+ let foundCmd = false;
94
+ for (const line of lines) {
95
+ if (!foundCmd) {
96
+ if (line.includes(command))
97
+ foundCmd = true;
98
+ continue;
99
+ }
100
+ if (this.promptPattern.test(line))
101
+ break;
102
+ outputLines.push(line);
103
+ }
104
+ return outputLines.join("\n");
105
+ }
106
+ /** Send raw text to the terminal. */
107
+ async sendText(text) {
108
+ await this.client.request("Input.sendText", {
109
+ sessionId: this.sessionId,
110
+ text,
111
+ });
112
+ }
113
+ /** Send structured keystrokes. */
114
+ async sendKeys(...keys) {
115
+ await this.client.request("Input.sendKeys", {
116
+ sessionId: this.sessionId,
117
+ keys,
118
+ });
119
+ }
120
+ /** Read the current visible screen as text. */
121
+ async readScreen() {
122
+ const result = await this.client.request("Screen.getText", {
123
+ sessionId: this.sessionId,
124
+ });
125
+ return result.text;
126
+ }
127
+ /** Take a screenshot. */
128
+ async screenshot(format = "svg") {
129
+ return this.client.request("Screen.screenshot", {
130
+ sessionId: this.sessionId,
131
+ format,
132
+ });
133
+ }
134
+ /** Wait until a pattern appears on screen. */
135
+ async waitFor(pattern, timeoutMs = 30000) {
136
+ const isRegex = pattern instanceof RegExp;
137
+ const patternStr = isRegex ? pattern.source : pattern;
138
+ const result = await this.client.request("Screen.waitForText", {
139
+ sessionId: this.sessionId,
140
+ pattern: patternStr,
141
+ isRegex,
142
+ timeout: timeoutMs,
143
+ interval: 50,
144
+ });
145
+ if (!result.found) {
146
+ throw new Error(`Pattern ${patternStr} not found within ${timeoutMs}ms`);
147
+ }
148
+ return this.readScreen();
149
+ }
150
+ /** Wait for the shell prompt to appear. */
151
+ async waitForPrompt(timeoutMs = 10000) {
152
+ return this.waitFor(this.promptPattern, timeoutMs);
153
+ }
154
+ /** Override the regex used to detect the shell prompt. */
155
+ setPromptPattern(pattern) {
156
+ this.promptPattern = pattern;
157
+ }
158
+ /** Get terminal dimensions as [cols, rows]. */
159
+ async getSize() {
160
+ const result = await this.client.request("Terminal.getSize", {
161
+ sessionId: this.sessionId,
162
+ });
163
+ return [result.cols, result.rows];
164
+ }
165
+ /** Resize the terminal. */
166
+ async resize(cols, rows) {
167
+ await this.client.request("Terminal.resize", {
168
+ sessionId: this.sessionId,
169
+ cols,
170
+ rows,
171
+ });
172
+ }
173
+ /** Get server info and capabilities. */
174
+ async getInfo() {
175
+ return this.client.request("Wrightty.getInfo");
176
+ }
177
+ // --- Recording ---
178
+ /** Start recording raw PTY I/O (asciicast v2 format). */
179
+ async startSessionRecording(includeInput = false) {
180
+ const result = await this.client.request("Recording.startSession", {
181
+ sessionId: this.sessionId,
182
+ includeInput,
183
+ });
184
+ return result.recordingId;
185
+ }
186
+ /** Stop a session recording and return asciicast data. */
187
+ async stopSessionRecording(recordingId) {
188
+ return this.client.request("Recording.stopSession", { recordingId });
189
+ }
190
+ /** Start recording wrightty API calls as a replayable script. */
191
+ async startActionRecording(format = "python") {
192
+ const result = await this.client.request("Recording.startActions", {
193
+ sessionId: this.sessionId,
194
+ format,
195
+ });
196
+ return result.recordingId;
197
+ }
198
+ /** Stop action recording and return the generated script. */
199
+ async stopActionRecording(recordingId) {
200
+ return this.client.request("Recording.stopActions", { recordingId });
201
+ }
202
+ /** Capture a single screen frame. */
203
+ async captureScreen(format = "svg") {
204
+ return this.client.request("Recording.captureScreen", {
205
+ sessionId: this.sessionId,
206
+ format,
207
+ });
208
+ }
209
+ }
210
+ exports.Terminal = Terminal;
@@ -0,0 +1,90 @@
1
+ /** Wrightty protocol types — mirrors wrightty-protocol Rust crate. */
2
+ export interface ServerInfo {
3
+ version: string;
4
+ implementation: string;
5
+ capabilities: Capabilities;
6
+ }
7
+ export interface Capabilities {
8
+ screenshot: ScreenshotFormat[];
9
+ maxSessions: number;
10
+ supportsResize: boolean;
11
+ supportsScrollback: boolean;
12
+ supportsMouse: boolean;
13
+ supportsSessionCreate: boolean;
14
+ supportsColorPalette: boolean;
15
+ supportsRawOutput: boolean;
16
+ supportsShellIntegration: boolean;
17
+ events: string[];
18
+ }
19
+ export type ScreenshotFormat = "text" | "svg" | "png" | "json";
20
+ export interface SessionInfo {
21
+ sessionId: string;
22
+ title: string;
23
+ cwd?: string;
24
+ cols: number;
25
+ rows: number;
26
+ pid?: number;
27
+ running: boolean;
28
+ alternateScreen: boolean;
29
+ }
30
+ export type KeyInput = string | KeyEvent;
31
+ export interface KeyEvent {
32
+ key: string;
33
+ char?: string;
34
+ n?: number;
35
+ modifiers: string[];
36
+ }
37
+ export interface TextMatch {
38
+ text: string;
39
+ row: number;
40
+ col: number;
41
+ length: number;
42
+ }
43
+ export interface WaitForTextResult {
44
+ found: boolean;
45
+ matches: TextMatch[];
46
+ elapsed: number;
47
+ }
48
+ export interface ScreenshotResult {
49
+ format: ScreenshotFormat;
50
+ data: string;
51
+ width?: number;
52
+ height?: number;
53
+ }
54
+ export interface RecordingResult {
55
+ recordingId: string;
56
+ }
57
+ export interface SessionRecordingData {
58
+ format: string;
59
+ data: string;
60
+ duration: number;
61
+ events: number;
62
+ }
63
+ export interface ActionRecordingData {
64
+ format: string;
65
+ data: string;
66
+ actions: number;
67
+ duration: number;
68
+ }
69
+ export interface DiscoveredServer {
70
+ url: string;
71
+ port: number;
72
+ version: string;
73
+ implementation: string;
74
+ capabilities: Capabilities;
75
+ }
76
+ export interface ConnectOptions {
77
+ /** Server URL (default: auto-discover) */
78
+ url?: string;
79
+ /** Session ID (default: first available) */
80
+ sessionId?: string;
81
+ /** Connection timeout in ms (default: 5000) */
82
+ timeout?: number;
83
+ }
84
+ export interface SpawnOptions {
85
+ shell?: string;
86
+ cols?: number;
87
+ rows?: number;
88
+ cwd?: string;
89
+ serverUrl?: string;
90
+ }
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ /** Wrightty protocol types — mirrors wrightty-protocol Rust crate. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,24 +1,44 @@
1
1
  {
2
2
  "name": "@moejay/wrightty",
3
- "version": "0.0.0",
4
- "description": "[![CI](https://github.com/moejay/wrightty/actions/workflows/ci.yml/badge.svg)](https://github.com/moejay/wrightty/actions/workflows/ci.yml) [![Release](https://github.com/moejay/wrightty/actions/workflows/release.yml/badge.svg)](https://github.com/moejay/wrightty/actions/workflows/release.yml) [![crates.io](https://img.shields.io/crates/v/wrightty.svg)](https://crates.io/crates/wrightty) [![PyPI](https://img.shields.io/pypi/v/wrightty.svg)](https://pypi.org/project/wrightty/) [![npm](https://img.shields.io/npm/v/@moejay/wrightty.svg)](https://www.npmjs.com/package/@moejay/wrightty) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)",
5
- "homepage": "https://github.com/moejay/wrightty#readme",
6
- "bugs": {
7
- "url": "https://github.com/moejay/wrightty/issues"
8
- },
3
+ "version": "0.1.0",
4
+ "description": "Node.js SDK for Wrightty terminal automation protocol",
5
+ "author": "Moe Jay",
6
+ "homepage": "https://github.com/moejay/wrightty",
9
7
  "repository": {
10
8
  "type": "git",
11
- "url": "git+https://github.com/moejay/wrightty.git"
9
+ "url": "https://github.com/moejay/wrightty.git",
10
+ "directory": "sdks/node"
12
11
  },
13
- "license": "ISC",
14
- "author": "",
15
- "type": "commonjs",
16
- "main": "index.js",
17
- "directories": {
18
- "example": "examples",
19
- "test": "tests"
12
+ "bugs": {
13
+ "url": "https://github.com/moejay/wrightty/issues"
20
14
  },
15
+ "main": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
21
20
  "scripts": {
22
- "test": "echo \"Error: no test specified\" && exit 1"
21
+ "build": "tsc",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "terminal",
26
+ "automation",
27
+ "tui",
28
+ "playwright",
29
+ "testing",
30
+ "ai",
31
+ "agent"
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "ws": "^8.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/ws": "^8.0.0",
39
+ "typescript": "^5.0.0"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
23
43
  }
24
44
  }
@@ -1,90 +0,0 @@
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