pty-auto 0.3.6
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.
- package/LICENSE +21 -0
- package/README.md +515 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/src/plugin/constants.d.ts +5 -0
- package/dist/src/plugin/constants.d.ts.map +1 -0
- package/dist/src/plugin/constants.js +7 -0
- package/dist/src/plugin/constants.js.map +1 -0
- package/dist/src/plugin/pty/buffer.d.ts +19 -0
- package/dist/src/plugin/pty/buffer.d.ts.map +1 -0
- package/dist/src/plugin/pty/buffer.js +61 -0
- package/dist/src/plugin/pty/buffer.js.map +1 -0
- package/dist/src/plugin/pty/formatters.d.ts +4 -0
- package/dist/src/plugin/pty/formatters.d.ts.map +1 -0
- package/dist/src/plugin/pty/formatters.js +22 -0
- package/dist/src/plugin/pty/formatters.js.map +1 -0
- package/dist/src/plugin/pty/manager.d.ts +33 -0
- package/dist/src/plugin/pty/manager.d.ts.map +1 -0
- package/dist/src/plugin/pty/manager.js +108 -0
- package/dist/src/plugin/pty/manager.js.map +1 -0
- package/dist/src/plugin/pty/notification-manager.d.ts +9 -0
- package/dist/src/plugin/pty/notification-manager.d.ts.map +1 -0
- package/dist/src/plugin/pty/notification-manager.js +69 -0
- package/dist/src/plugin/pty/notification-manager.js.map +1 -0
- package/dist/src/plugin/pty/output-manager.d.ts +7 -0
- package/dist/src/plugin/pty/output-manager.d.ts.map +1 -0
- package/dist/src/plugin/pty/output-manager.js +26 -0
- package/dist/src/plugin/pty/output-manager.js.map +1 -0
- package/dist/src/plugin/pty/permissions.d.ts +27 -0
- package/dist/src/plugin/pty/permissions.d.ts.map +1 -0
- package/dist/src/plugin/pty/permissions.js +54 -0
- package/dist/src/plugin/pty/permissions.js.map +1 -0
- package/dist/src/plugin/pty/session-lifecycle.d.ts +20 -0
- package/dist/src/plugin/pty/session-lifecycle.d.ts.map +1 -0
- package/dist/src/plugin/pty/session-lifecycle.js +177 -0
- package/dist/src/plugin/pty/session-lifecycle.js.map +1 -0
- package/dist/src/plugin/pty/tools/kill.d.ts +12 -0
- package/dist/src/plugin/pty/tools/kill.d.ts.map +1 -0
- package/dist/src/plugin/pty/tools/kill.js +37 -0
- package/dist/src/plugin/pty/tools/kill.js.map +1 -0
- package/dist/src/plugin/pty/tools/kill.txt +25 -0
- package/dist/src/plugin/pty/tools/list.d.ts +6 -0
- package/dist/src/plugin/pty/tools/list.d.ts.map +1 -0
- package/dist/src/plugin/pty/tools/list.js +22 -0
- package/dist/src/plugin/pty/tools/list.js.map +1 -0
- package/dist/src/plugin/pty/tools/list.txt +22 -0
- package/dist/src/plugin/pty/tools/read.d.ts +18 -0
- package/dist/src/plugin/pty/tools/read.d.ts.map +1 -0
- package/dist/src/plugin/pty/tools/read.js +165 -0
- package/dist/src/plugin/pty/tools/read.js.map +1 -0
- package/dist/src/plugin/pty/tools/read.txt +39 -0
- package/dist/src/plugin/pty/tools/spawn.d.ts +24 -0
- package/dist/src/plugin/pty/tools/spawn.d.ts.map +1 -0
- package/dist/src/plugin/pty/tools/spawn.js +75 -0
- package/dist/src/plugin/pty/tools/spawn.js.map +1 -0
- package/dist/src/plugin/pty/tools/spawn.txt +52 -0
- package/dist/src/plugin/pty/tools/write.d.ts +12 -0
- package/dist/src/plugin/pty/tools/write.d.ts.map +1 -0
- package/dist/src/plugin/pty/tools/write.js +62 -0
- package/dist/src/plugin/pty/tools/write.js.map +1 -0
- package/dist/src/plugin/pty/tools/write.txt +28 -0
- package/dist/src/plugin/pty/types.d.ts +70 -0
- package/dist/src/plugin/pty/types.d.ts.map +1 -0
- package/dist/src/plugin/pty/types.js +1 -0
- package/dist/src/plugin/pty/types.js.map +1 -0
- package/dist/src/plugin/pty/utils.d.ts +12 -0
- package/dist/src/plugin/pty/utils.d.ts.map +1 -0
- package/dist/src/plugin/pty/utils.js +17 -0
- package/dist/src/plugin/pty/utils.js.map +1 -0
- package/dist/src/plugin/pty/wildcard.d.ts +7 -0
- package/dist/src/plugin/pty/wildcard.d.ts.map +1 -0
- package/dist/src/plugin/pty/wildcard.js +51 -0
- package/dist/src/plugin/pty/wildcard.js.map +1 -0
- package/dist/src/plugin/types.d.ts +5 -0
- package/dist/src/plugin/types.d.ts.map +1 -0
- package/dist/src/plugin/types.js +1 -0
- package/dist/src/plugin/types.js.map +1 -0
- package/dist/src/plugin.d.ts +3 -0
- package/dist/src/plugin.d.ts.map +1 -0
- package/dist/src/plugin.js +71 -0
- package/dist/src/plugin.js.map +1 -0
- package/dist/src/shared/constants.d.ts +5 -0
- package/dist/src/shared/constants.d.ts.map +1 -0
- package/dist/src/shared/constants.js +7 -0
- package/dist/src/shared/constants.js.map +1 -0
- package/dist/src/web/server/callback-manager.d.ts +8 -0
- package/dist/src/web/server/callback-manager.d.ts.map +1 -0
- package/dist/src/web/server/callback-manager.js +23 -0
- package/dist/src/web/server/callback-manager.js.map +1 -0
- package/dist/src/web/server/handlers/health.d.ts +3 -0
- package/dist/src/web/server/handlers/health.d.ts.map +1 -0
- package/dist/src/web/server/handlers/health.js +33 -0
- package/dist/src/web/server/handlers/health.js.map +1 -0
- package/dist/src/web/server/handlers/responses.d.ts +10 -0
- package/dist/src/web/server/handlers/responses.d.ts.map +1 -0
- package/dist/src/web/server/handlers/responses.js +26 -0
- package/dist/src/web/server/handlers/responses.js.map +1 -0
- package/dist/src/web/server/handlers/sessions.d.ts +13 -0
- package/dist/src/web/server/handlers/sessions.d.ts.map +1 -0
- package/dist/src/web/server/handlers/sessions.js +96 -0
- package/dist/src/web/server/handlers/sessions.js.map +1 -0
- package/dist/src/web/server/handlers/static.d.ts +2 -0
- package/dist/src/web/server/handlers/static.d.ts.map +1 -0
- package/dist/src/web/server/handlers/static.js +38 -0
- package/dist/src/web/server/handlers/static.js.map +1 -0
- package/dist/src/web/server/handlers/upgrade.d.ts +2 -0
- package/dist/src/web/server/handlers/upgrade.d.ts.map +1 -0
- package/dist/src/web/server/handlers/upgrade.js +11 -0
- package/dist/src/web/server/handlers/upgrade.js.map +1 -0
- package/dist/src/web/server/handlers/websocket.d.ts +3 -0
- package/dist/src/web/server/handlers/websocket.d.ts.map +1 -0
- package/dist/src/web/server/handlers/websocket.js +119 -0
- package/dist/src/web/server/handlers/websocket.js.map +1 -0
- package/dist/src/web/server/server.d.ts +12 -0
- package/dist/src/web/server/server.d.ts.map +1 -0
- package/dist/src/web/server/server.js +73 -0
- package/dist/src/web/server/server.js.map +1 -0
- package/dist/src/web/shared/api-client.d.ts +132 -0
- package/dist/src/web/shared/api-client.d.ts.map +1 -0
- package/dist/src/web/shared/api-client.js +79 -0
- package/dist/src/web/shared/api-client.js.map +1 -0
- package/dist/src/web/shared/constants.d.ts +11 -0
- package/dist/src/web/shared/constants.d.ts.map +1 -0
- package/dist/src/web/shared/constants.js +23 -0
- package/dist/src/web/shared/constants.js.map +1 -0
- package/dist/src/web/shared/route-builder.d.ts +30 -0
- package/dist/src/web/shared/route-builder.d.ts.map +1 -0
- package/dist/src/web/shared/route-builder.js +42 -0
- package/dist/src/web/shared/route-builder.js.map +1 -0
- package/dist/src/web/shared/routes.d.ts +37 -0
- package/dist/src/web/shared/routes.d.ts.map +1 -0
- package/dist/src/web/shared/routes.js +39 -0
- package/dist/src/web/shared/routes.js.map +1 -0
- package/dist/src/web/shared/types.d.ts +87 -0
- package/dist/src/web/shared/types.d.ts.map +1 -0
- package/dist/src/web/shared/types.js +15 -0
- package/dist/src/web/shared/types.js.map +1 -0
- package/dist/web/assets/index-CYWtqpTG.js +24 -0
- package/dist/web/assets/index-DDGTF8rc.css +1 -0
- package/dist/web/index.html +204 -0
- package/package.json +107 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-builder.js","sourceRoot":"","sources":["../../../../src/web/shared/route-builder.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,2DAA2D;AAE3D,2DAA2D;AAC3D,SAAS,QAAQ,CA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IAAI,EAAE,MAAM,CAAC;QAEvF,IAAI,EAAE,CAAC,MAA+B,EAAU,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;QAExF,OAAO,EAAE,CAAC,MAA+B,EAAU,EAAE,CACnD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;QAE/C,KAAK,EAAE,CAAC,MAA+B,EAAU,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;QAE/F,SAAS,EAAE,CAAC,MAA+B,EAAU,EAAE,CACrD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;QAElD,WAAW,EAAE,CAAC,MAA+B,EAAU,EAAE,CACvD,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;KACrD;CACF,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const routes: {
|
|
2
|
+
readonly websocket: {
|
|
3
|
+
readonly path: "/ws";
|
|
4
|
+
readonly methods: readonly ["GET"];
|
|
5
|
+
};
|
|
6
|
+
readonly health: {
|
|
7
|
+
readonly path: "/health";
|
|
8
|
+
readonly methods: readonly ["GET"];
|
|
9
|
+
};
|
|
10
|
+
readonly sessions: {
|
|
11
|
+
readonly path: "/api/sessions";
|
|
12
|
+
readonly methods: readonly ["GET", "POST", "DELETE"];
|
|
13
|
+
};
|
|
14
|
+
readonly session: {
|
|
15
|
+
readonly path: "/api/sessions/:id";
|
|
16
|
+
readonly methods: readonly ["GET", "DELETE"];
|
|
17
|
+
readonly input: {
|
|
18
|
+
readonly path: "/api/sessions/:id/input";
|
|
19
|
+
readonly methods: readonly ["POST"];
|
|
20
|
+
};
|
|
21
|
+
readonly cleanup: {
|
|
22
|
+
readonly path: "/api/sessions/:id/cleanup";
|
|
23
|
+
readonly methods: readonly ["DELETE"];
|
|
24
|
+
};
|
|
25
|
+
readonly buffer: {
|
|
26
|
+
readonly raw: {
|
|
27
|
+
readonly path: "/api/sessions/:id/buffer/raw";
|
|
28
|
+
readonly methods: readonly ["GET"];
|
|
29
|
+
};
|
|
30
|
+
readonly plain: {
|
|
31
|
+
readonly path: "/api/sessions/:id/buffer/plain";
|
|
32
|
+
readonly methods: readonly ["GET"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/web/shared/routes.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCT,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Structured route definitions with paths, methods, and type information
|
|
2
|
+
// Used by both server and client for type-safe API interactions
|
|
3
|
+
export const routes = {
|
|
4
|
+
websocket: {
|
|
5
|
+
path: '/ws',
|
|
6
|
+
methods: ['GET'],
|
|
7
|
+
},
|
|
8
|
+
health: {
|
|
9
|
+
path: '/health',
|
|
10
|
+
methods: ['GET'],
|
|
11
|
+
},
|
|
12
|
+
sessions: {
|
|
13
|
+
path: '/api/sessions',
|
|
14
|
+
methods: ['GET', 'POST', 'DELETE'],
|
|
15
|
+
},
|
|
16
|
+
session: {
|
|
17
|
+
path: '/api/sessions/:id',
|
|
18
|
+
methods: ['GET', 'DELETE'],
|
|
19
|
+
input: {
|
|
20
|
+
path: '/api/sessions/:id/input',
|
|
21
|
+
methods: ['POST'],
|
|
22
|
+
},
|
|
23
|
+
cleanup: {
|
|
24
|
+
path: '/api/sessions/:id/cleanup',
|
|
25
|
+
methods: ['DELETE'],
|
|
26
|
+
},
|
|
27
|
+
buffer: {
|
|
28
|
+
raw: {
|
|
29
|
+
path: '/api/sessions/:id/buffer/raw',
|
|
30
|
+
methods: ['GET'],
|
|
31
|
+
},
|
|
32
|
+
plain: {
|
|
33
|
+
path: '/api/sessions/:id/buffer/plain',
|
|
34
|
+
methods: ['GET'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../src/web/shared/routes.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,gEAAgE;AAEhE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC,KAAK,CAAU;KAC1B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,CAAC,KAAK,CAAU;KAC1B;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAU;KAC5C;IACD,OAAO,EAAE;QACP,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAU;QACnC,KAAK,EAAE;YACL,IAAI,EAAE,yBAAyB;YAC/B,OAAO,EAAE,CAAC,MAAM,CAAU;SAC3B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,2BAA2B;YACjC,OAAO,EAAE,CAAC,QAAQ,CAAU;SAC7B;QACD,MAAM,EAAE;YACN,GAAG,EAAE;gBACH,IAAI,EAAE,8BAA8B;gBACpC,OAAO,EAAE,CAAC,KAAK,CAAU;aAC1B;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,gCAAgC;gBACtC,OAAO,EAAE,CAAC,KAAK,CAAU;aAC1B;SACF;KACF;CACO,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { PTYSessionInfo, PTYStatus, SpawnOptions } from '../../plugin/pty/types';
|
|
2
|
+
export type { PTYSessionInfo, PTYStatus, HealthResponse };
|
|
3
|
+
export declare class CustomError extends Error {
|
|
4
|
+
name: string;
|
|
5
|
+
prettyPrintColor: string;
|
|
6
|
+
prettyPrintNoColor: string;
|
|
7
|
+
toJSON(): Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface WSMessageClient {
|
|
10
|
+
type: 'subscribe' | 'unsubscribe' | 'session_list' | 'spawn' | 'input' | 'readRaw';
|
|
11
|
+
}
|
|
12
|
+
export interface WSMessageClientSubscribeSession extends WSMessageClient {
|
|
13
|
+
type: 'subscribe';
|
|
14
|
+
sessionId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface WSMessageClientUnsubscribeSession extends WSMessageClient {
|
|
17
|
+
type: 'unsubscribe';
|
|
18
|
+
sessionId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface WSMessageClientSessionList extends WSMessageClient {
|
|
21
|
+
type: 'session_list';
|
|
22
|
+
}
|
|
23
|
+
export interface WSMessageClientSpawnSession extends WSMessageClient, SpawnOptions {
|
|
24
|
+
type: 'spawn';
|
|
25
|
+
subscribe?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface WSMessageClientInput extends WSMessageClient {
|
|
28
|
+
type: 'input';
|
|
29
|
+
sessionId: string;
|
|
30
|
+
data: string;
|
|
31
|
+
}
|
|
32
|
+
export interface WSMessageClientReadRaw extends WSMessageClient {
|
|
33
|
+
type: 'readRaw';
|
|
34
|
+
sessionId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface WSMessageServer {
|
|
37
|
+
type: 'subscribed' | 'unsubscribed' | 'raw_data' | 'readRawResponse' | 'session_list' | 'session_update' | 'error';
|
|
38
|
+
}
|
|
39
|
+
export interface WSMessageServerSubscribedSession extends WSMessageServer {
|
|
40
|
+
type: 'subscribed';
|
|
41
|
+
sessionId: string;
|
|
42
|
+
}
|
|
43
|
+
export interface WSMessageServerUnsubscribedSession extends WSMessageServer {
|
|
44
|
+
type: 'unsubscribed';
|
|
45
|
+
sessionId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface WSMessageServerRawData extends WSMessageServer {
|
|
48
|
+
type: 'raw_data';
|
|
49
|
+
session: PTYSessionInfo;
|
|
50
|
+
rawData: string;
|
|
51
|
+
}
|
|
52
|
+
export interface WSMessageServerReadRawResponse extends WSMessageServer {
|
|
53
|
+
type: 'readRawResponse';
|
|
54
|
+
sessionId: string;
|
|
55
|
+
rawData: string;
|
|
56
|
+
}
|
|
57
|
+
export interface WSMessageServerSessionList extends WSMessageServer {
|
|
58
|
+
type: 'session_list';
|
|
59
|
+
sessions: PTYSessionInfo[];
|
|
60
|
+
}
|
|
61
|
+
export interface WSMessageServerSessionUpdate extends WSMessageServer {
|
|
62
|
+
type: 'session_update';
|
|
63
|
+
session: PTYSessionInfo;
|
|
64
|
+
}
|
|
65
|
+
export interface WSMessageServerError extends WSMessageServer {
|
|
66
|
+
type: 'error';
|
|
67
|
+
error: CustomError;
|
|
68
|
+
}
|
|
69
|
+
interface HealthResponse {
|
|
70
|
+
status: 'healthy';
|
|
71
|
+
timestamp: string;
|
|
72
|
+
uptime: number;
|
|
73
|
+
sessions: {
|
|
74
|
+
total: number;
|
|
75
|
+
active: number;
|
|
76
|
+
};
|
|
77
|
+
websocket: {
|
|
78
|
+
connections: number;
|
|
79
|
+
};
|
|
80
|
+
memory?: {
|
|
81
|
+
rss: number;
|
|
82
|
+
heapUsed: number;
|
|
83
|
+
heapTotal: number;
|
|
84
|
+
};
|
|
85
|
+
responseTime?: number;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/web/shared/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wB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: true, depth: 10 });
|
|
4
|
+
prettyPrintNoColor = Bun.stripANSI(this.prettyPrintColor);
|
|
5
|
+
toJSON() {
|
|
6
|
+
const obj = {};
|
|
7
|
+
// Include all own properties, including non-enumerable ones like 'message' and 'stack'
|
|
8
|
+
// prettyPrintColor and prettyPrintNoColor are now included automatically as strings
|
|
9
|
+
Object.getOwnPropertyNames(this).forEach((key) => {
|
|
10
|
+
obj[key] = this[key];
|
|
11
|
+
});
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/web/shared/types.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,IAAI,GAAG,aAAa,CAAA;IAC7B,gBAAgB,GAAW,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAA;IACzE,kBAAkB,GAAW,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAEjE,MAAM;QACJ,MAAM,GAAG,GAA4B,EAAE,CAAA;QACvC,uFAAuF;QACvF,oFAAoF;QACpF,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/C,GAAG,CAAC,GAAG,CAAC,GAAI,IAAgC,CAAC,GAAG,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;QACF,OAAO,GAAG,CAAA;IACZ,CAAC;CACF"}
|