@tomradex/pty-host 0.0.0-stage → 0.21.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.
- package/LICENSE +204 -0
- package/dist/agents.d.ts +26 -0
- package/dist/client.d.ts +23 -0
- package/dist/conpty.d.ts +13 -0
- package/dist/host.d.ts +90 -0
- package/dist/index.d.ts +112 -0
- package/dist/main.d.ts +2 -0
- package/dist/pane.d.ts +98 -0
- package/dist/protocol.d.ts +131 -0
- package/dist/render.d.ts +28 -0
- package/dist/runtime.js +1 -0
- package/dist/shell.d.ts +8 -0
- package/dist/words.d.ts +7 -0
- package/package.json +44 -4
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Copyright 2026 Haoyuan Tang
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Apache License
|
|
5
|
+
Version 2.0, January 2004
|
|
6
|
+
http://www.apache.org/licenses/
|
|
7
|
+
|
|
8
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
9
|
+
|
|
10
|
+
1. Definitions.
|
|
11
|
+
|
|
12
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
13
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
16
|
+
the copyright owner that is granting the License.
|
|
17
|
+
|
|
18
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
19
|
+
other entities that control, are controlled by, or are under common
|
|
20
|
+
control with that entity. For the purposes of this definition,
|
|
21
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
22
|
+
direction or management of such entity, whether by contract or
|
|
23
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
24
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
25
|
+
|
|
26
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
27
|
+
exercising permissions granted by this License.
|
|
28
|
+
|
|
29
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
30
|
+
including but not limited to software source code, documentation
|
|
31
|
+
source, and configuration files.
|
|
32
|
+
|
|
33
|
+
"Object" form shall mean any form resulting from mechanical
|
|
34
|
+
transformation or translation of a Source form, including but
|
|
35
|
+
not limited to compiled object code, generated documentation,
|
|
36
|
+
and conversions to other media types.
|
|
37
|
+
|
|
38
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
39
|
+
Object form, made available under the License, as indicated by a
|
|
40
|
+
copyright notice that is included in or attached to the work
|
|
41
|
+
(an example is provided in the Appendix below).
|
|
42
|
+
|
|
43
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
44
|
+
form, that is based on (or derived from) the Work and for which the
|
|
45
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
46
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
47
|
+
of this License, Derivative Works shall not include works that remain
|
|
48
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
49
|
+
the Work and Derivative Works thereof.
|
|
50
|
+
|
|
51
|
+
"Contribution" shall mean any work of authorship, including
|
|
52
|
+
the original version of the Work and any modifications or additions
|
|
53
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
54
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
55
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
56
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
57
|
+
means any form of electronic, verbal, or written communication sent
|
|
58
|
+
to the Licensor or its representatives, including but not limited to
|
|
59
|
+
communication on electronic mailing lists, source code control systems,
|
|
60
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
62
|
+
excluding communication that is conspicuously marked or otherwise
|
|
63
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
66
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
67
|
+
subsequently incorporated within the Work.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
73
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
74
|
+
Work and such Derivative Works in Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, patent, trademark, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright statement to Your modifications and
|
|
127
|
+
may provide additional or different license terms and conditions
|
|
128
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
129
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
130
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
131
|
+
the conditions stated in this License.
|
|
132
|
+
|
|
133
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
134
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
135
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
136
|
+
this License, without any additional terms or conditions.
|
|
137
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
138
|
+
the terms of any separate license agreement you may have executed
|
|
139
|
+
with Licensor regarding such Contributions.
|
|
140
|
+
|
|
141
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
142
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
143
|
+
except as required for reasonable and customary use in describing the
|
|
144
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
145
|
+
|
|
146
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
147
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
148
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
149
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
150
|
+
implied, including, without limitation, any warranties or conditions
|
|
151
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
152
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
153
|
+
appropriateness of using or redistributing the Work and assume any
|
|
154
|
+
risks associated with Your exercise of permissions under this License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright [yyyy] [name of copyright owner]
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TerminalStatus } from "@tomradex/contracts";
|
|
2
|
+
/** One row of the process table. `created` is a FILETIME (0 when Windows would not say). */
|
|
3
|
+
export interface ProcessRow {
|
|
4
|
+
pid: number;
|
|
5
|
+
ppid: number;
|
|
6
|
+
created: number;
|
|
7
|
+
name: string;
|
|
8
|
+
cmdline: string;
|
|
9
|
+
}
|
|
10
|
+
/** Lines of `pid\tppid\tcreated\tname\tcommand line`, as the scan prints them; anything else is skipped. */
|
|
11
|
+
export declare function parseProcessTable(text: string): ProcessRow[];
|
|
12
|
+
/**
|
|
13
|
+
* The processes under a pane's root, nearest first and the newest of each generation first, without the console's
|
|
14
|
+
* plumbing. Windows reuses a dead parent's pid, so a child is taken only when it is no older than its parent.
|
|
15
|
+
*/
|
|
16
|
+
export declare function descendants(rows: ProcessRow[], rootPid: number): ProcessRow[];
|
|
17
|
+
/** A command line with its program named alone, `claude --resume x` rather than its full quoted path. */
|
|
18
|
+
export declare function shortCommand(row: Pick<ProcessRow, "name" | "cmdline">): string;
|
|
19
|
+
/** Which agent a process is: by its executable, or by the package a script runner was given. Null for anything else. */
|
|
20
|
+
export declare function agentOfProcess(row: Pick<ProcessRow, "name" | "cmdline">): string | null;
|
|
21
|
+
/** The agent running in a pane: the nearest one under its root, or the root itself. */
|
|
22
|
+
export declare function agentIn(root: Pick<ProcessRow, "name" | "cmdline"> | undefined, below: ProcessRow[]): string | null;
|
|
23
|
+
/** What the title says of the agent: only Claude's spinner reads as working; idle and blocked need the screen. */
|
|
24
|
+
export declare function titleStatus(agent: string | null, title: string | null): TerminalStatus;
|
|
25
|
+
export declare function strippedTitle(title: string | null): string | null;
|
|
26
|
+
//# sourceMappingURL=agents.d.ts.map
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TerminalMode, TerminalStream } from "@tomradex/contracts";
|
|
2
|
+
import { PtyHostError } from "./protocol.js";
|
|
3
|
+
/** One request to the host: a line of JSON in, a line back. */
|
|
4
|
+
export declare function hostCall<T = Record<string, unknown>>(pipe: string, method: string, params?: Record<string, unknown>, timeoutMs?: number): Promise<T>;
|
|
5
|
+
/** A subscription to the host's events; `onEnd` hears why it stopped, so the caller can subscribe again. */
|
|
6
|
+
export declare function hostStream(pipe: string, subscriptions: Record<string, unknown>[], onEvent: (event: {
|
|
7
|
+
event: string;
|
|
8
|
+
data: Record<string, unknown>;
|
|
9
|
+
}) => void, onEnd: (error: PtyHostError | null) => void, onStart?: () => void): {
|
|
10
|
+
close(): void;
|
|
11
|
+
};
|
|
12
|
+
/** A terminal as it is opened: `attached` resolves once the host took it, and rejects with why it would not. */
|
|
13
|
+
export interface OpenedTerminal extends TerminalStream {
|
|
14
|
+
readonly attached: Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/** A live terminal of one pane over its own connection: frames in, commands out. */
|
|
17
|
+
export declare function openTerminal(pipe: string, input: {
|
|
18
|
+
paneId: string;
|
|
19
|
+
mode: TerminalMode;
|
|
20
|
+
cols: number;
|
|
21
|
+
rows: number;
|
|
22
|
+
}): OpenedTerminal;
|
|
23
|
+
//# sourceMappingURL=client.d.ts.map
|
package/dist/conpty.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ProcessRow } from "./agents.js";
|
|
2
|
+
import type { SpawnPty } from "./host.js";
|
|
3
|
+
import type { Pane } from "./pane.js";
|
|
4
|
+
/** A program on a pseudoconsole: node-pty over ConPTY with the OpenConsole it ships, the same on Windows 10 and 11 and twice as fast as the system's conhost. */
|
|
5
|
+
export declare const spawnConpty: SpawnPty;
|
|
6
|
+
/** The process table, through Windows PowerShell (always there); rejects when it fails or takes longer than `timeoutMs`. */
|
|
7
|
+
export declare function scanProcesses(timeoutMs?: number): Promise<ProcessRow[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Ends a pane's process and everything it started. taskkill /T walks the tree from the live root, so it goes first;
|
|
10
|
+
* node-pty's kill then closes the console (its helper's "AttachConsole failed" goes to the host's ignored stderr).
|
|
11
|
+
*/
|
|
12
|
+
export declare function killTree(pane: Pane): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=conpty.d.ts.map
|
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import net from "node:net";
|
|
2
|
+
import { type ProcessRow } from "./agents.js";
|
|
3
|
+
import { type LaunchParams } from "./protocol.js";
|
|
4
|
+
import { Pane, type Pty } from "./pane.js";
|
|
5
|
+
/** Starts a program on a pseudo-terminal. */
|
|
6
|
+
export type SpawnPty = (file: string, args: string[], opts: {
|
|
7
|
+
cwd: string;
|
|
8
|
+
env: Record<string, string>;
|
|
9
|
+
cols: number;
|
|
10
|
+
rows: number;
|
|
11
|
+
}) => Pty;
|
|
12
|
+
export interface HostOptions {
|
|
13
|
+
spawn: SpawnPty;
|
|
14
|
+
/** The shell a pane runs when it is given no program. */
|
|
15
|
+
shell: () => {
|
|
16
|
+
file: string;
|
|
17
|
+
args: string[];
|
|
18
|
+
};
|
|
19
|
+
/** Ends a pane's process and everything it started. */
|
|
20
|
+
killTree: (pane: Pane) => Promise<void>;
|
|
21
|
+
version: string;
|
|
22
|
+
/** How long the host stays with no pane before it exits; it exits when its last terminal closes. */
|
|
23
|
+
idleMs: number;
|
|
24
|
+
onIdle: () => void;
|
|
25
|
+
log?: (line: string) => void;
|
|
26
|
+
scrollback?: number;
|
|
27
|
+
/** How long typed text waits before its Enter, so a program that reads a fast burst as a paste still takes the Enter as one. */
|
|
28
|
+
enterDelayMs?: number;
|
|
29
|
+
/** Reads the machine's process table, for what runs in each pane; without it the host names no agent. */
|
|
30
|
+
scan?: () => Promise<ProcessRow[]>;
|
|
31
|
+
scanTiming?: Partial<ScanTiming>;
|
|
32
|
+
}
|
|
33
|
+
export interface ScanTiming {
|
|
34
|
+
/** Scans are at least this far apart. */
|
|
35
|
+
minMs: number;
|
|
36
|
+
/** A read finding the table older than this has it read again, answering from the old one meanwhile. */
|
|
37
|
+
staleMs: number;
|
|
38
|
+
/** How soon after a pane opens or its title changes the table is read again. */
|
|
39
|
+
soonMs: number;
|
|
40
|
+
}
|
|
41
|
+
export declare const SCAN_TIMING: ScanTiming;
|
|
42
|
+
/**
|
|
43
|
+
* The pty host: a process of its own, detached from Tomrade, holding every
|
|
44
|
+
* terminal the person opened so they outlive a restart of the app. It answers
|
|
45
|
+
* one pipe in herdr's shapes, and exits once it has had no pane for `idleMs`.
|
|
46
|
+
*/
|
|
47
|
+
export declare class Host {
|
|
48
|
+
private readonly opts;
|
|
49
|
+
readonly panes: Map<string, Pane>;
|
|
50
|
+
private readonly subscribers;
|
|
51
|
+
private next;
|
|
52
|
+
private readonly prefix;
|
|
53
|
+
private idle;
|
|
54
|
+
private table;
|
|
55
|
+
private scanning;
|
|
56
|
+
private lastScan;
|
|
57
|
+
private soon;
|
|
58
|
+
private readonly timing;
|
|
59
|
+
constructor(opts: HostOptions);
|
|
60
|
+
/** One scan at a time, never one while no pane is open; a scan that fails keeps the table there was. */
|
|
61
|
+
private rescan;
|
|
62
|
+
/** A read of what runs in the panes: a table gone stale is read again behind it. */
|
|
63
|
+
private touchTable;
|
|
64
|
+
/** A scan a moment from now (once the last one is far enough behind); calls meanwhile share it. */
|
|
65
|
+
private scanSoon;
|
|
66
|
+
/** Waits for the scan running now or about to; for tests. */
|
|
67
|
+
settled(): Promise<void>;
|
|
68
|
+
private processesOf;
|
|
69
|
+
/** A pane as `pane.get` and `pane.list` give it, with the agent the process table shows in it. */
|
|
70
|
+
private info;
|
|
71
|
+
private processInfo;
|
|
72
|
+
private armIdle;
|
|
73
|
+
/** One client connection: requests until it closes, or a subscription or a terminal for as long as it lives. */
|
|
74
|
+
connection(socket: net.Socket): void;
|
|
75
|
+
private pane;
|
|
76
|
+
handle(method: string, params: Record<string, unknown>): Promise<unknown>;
|
|
77
|
+
launch(params: LaunchParams): Pane;
|
|
78
|
+
/** Ends the pane's whole process tree; resolves once the pane is gone. */
|
|
79
|
+
close(pane: Pane): Promise<void>;
|
|
80
|
+
private exited;
|
|
81
|
+
private scrolled;
|
|
82
|
+
private emit;
|
|
83
|
+
/** A terminal on this connection: frames out, commands in, until either side closes. */
|
|
84
|
+
private attach;
|
|
85
|
+
/** Every pane ended, for a host that is going away. */
|
|
86
|
+
shutdown(): Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
/** Serves a host on a pipe; resolves once it listens, rejects when the pipe is taken. */
|
|
89
|
+
export declare function serve(host: Host, pipe: string): Promise<net.Server>;
|
|
90
|
+
//# sourceMappingURL=host.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Context, Service } from "cordis";
|
|
2
|
+
import { type TerminalBridge, type TerminalLaunch, type TerminalMode, type TerminalPaneEvent, type TerminalPaneInfo, type TerminalProcess, type TerminalProvider, type TerminalRevive, type TerminalScrollPosition, type TerminalStream } from "@tomradex/contracts";
|
|
3
|
+
export { hostCall } from "./client.js";
|
|
4
|
+
export { pipePath, PROTOCOL, PtyHostError } from "./protocol.js";
|
|
5
|
+
export { defaultShell, onPath } from "./shell.js";
|
|
6
|
+
declare module "cordis" {
|
|
7
|
+
interface Context {
|
|
8
|
+
terminals: TerminalProvider;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export interface PtyHostConfig {
|
|
12
|
+
/** The pipe to use instead of this user's; tests point it at one of their own. */
|
|
13
|
+
pipe?: string;
|
|
14
|
+
/** What keeps this instance's host apart from another Tomrade's on the machine: its data folder. */
|
|
15
|
+
scope?: string;
|
|
16
|
+
/** The binary the host runs on, as Node: Electron's own with ELECTRON_RUN_AS_NODE. */
|
|
17
|
+
nodeBinary?: string;
|
|
18
|
+
/** Where the host writes what it did. */
|
|
19
|
+
logFile?: string;
|
|
20
|
+
/** The app's version, which the host reports. */
|
|
21
|
+
version?: string;
|
|
22
|
+
reconnectMs?: number;
|
|
23
|
+
startTimeoutMs?: number;
|
|
24
|
+
/** How long a host with no terminal stays before it exits. */
|
|
25
|
+
idleMs?: number;
|
|
26
|
+
}
|
|
27
|
+
/** How long to wait before subscribing again after the stream ends; doubled each time it fails, up to the maximum. */
|
|
28
|
+
export declare const RECONNECT_MS = 2000;
|
|
29
|
+
export declare const RECONNECT_MAX_MS = 60000;
|
|
30
|
+
export declare const START_TIMEOUT_MS = 10000;
|
|
31
|
+
/** At most this many starts by `revive` within the window, so a host that keeps dying is not started over and over. */
|
|
32
|
+
export declare const REVIVE_LIMIT = 3;
|
|
33
|
+
export declare const REVIVE_WINDOW_MS: number;
|
|
34
|
+
/** The ConPTY runtime node-pty loads on this machine's arch (`useConptyDll`): null when the build does not carry it. */
|
|
35
|
+
export declare function conptyRuntime(arch?: string): string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Tomrade's own terminal backend on native Windows, where herdr cannot attach:
|
|
38
|
+
* a pty host it starts detached on demand (Electron's binary as Node, node-pty
|
|
39
|
+
* over ConPTY), which keeps the terminals through a restart of the app and
|
|
40
|
+
* exits when the last one closes. It speaks herdr's shapes behind the same
|
|
41
|
+
* contract, so the Terminal window and code link run on it unchanged.
|
|
42
|
+
*/
|
|
43
|
+
export declare class PtyHost extends Service implements TerminalProvider {
|
|
44
|
+
private readonly config;
|
|
45
|
+
static provide: string;
|
|
46
|
+
readonly kind: "builtin";
|
|
47
|
+
private readonly pipe;
|
|
48
|
+
private readonly reconnectMs;
|
|
49
|
+
private readonly startTimeoutMs;
|
|
50
|
+
private disposed;
|
|
51
|
+
private starting;
|
|
52
|
+
private revived;
|
|
53
|
+
private reviving;
|
|
54
|
+
private readonly listeners;
|
|
55
|
+
private readonly watched;
|
|
56
|
+
private global;
|
|
57
|
+
private readonly terminals;
|
|
58
|
+
constructor(ctx: Context, config?: PtyHostConfig);
|
|
59
|
+
[Service.init](): void;
|
|
60
|
+
pipePath(): string;
|
|
61
|
+
private call;
|
|
62
|
+
/** The host answering on the pipe, or null when none does. */
|
|
63
|
+
server(): Promise<{
|
|
64
|
+
version: string;
|
|
65
|
+
protocol: number;
|
|
66
|
+
pid: number;
|
|
67
|
+
} | null>;
|
|
68
|
+
installed(): Promise<string | null>;
|
|
69
|
+
bridge(): Promise<TerminalBridge>;
|
|
70
|
+
serverGone(): Promise<boolean>;
|
|
71
|
+
/** The host on the pipe: the one running, or one started now and ready once it answers. Starts at the same time share one. */
|
|
72
|
+
private ensureHost;
|
|
73
|
+
private startHost;
|
|
74
|
+
/** The host answering again after it went away. Its terminals died with it; the cells attach again and hear so. */
|
|
75
|
+
revive(force?: boolean): Promise<TerminalRevive>;
|
|
76
|
+
private reviveOnce;
|
|
77
|
+
launch(input: TerminalLaunch): Promise<{
|
|
78
|
+
paneId: string;
|
|
79
|
+
} | null>;
|
|
80
|
+
/** A live terminal of a pane. Refused with a PtyHostError: `notRunning` when the host is gone, `pane_not_found` when the pane is. */
|
|
81
|
+
terminal(paneId: string, opts: {
|
|
82
|
+
mode?: TerminalMode;
|
|
83
|
+
cols: number;
|
|
84
|
+
rows: number;
|
|
85
|
+
}): Promise<TerminalStream>;
|
|
86
|
+
/** A request whose answer is whether the host took it. */
|
|
87
|
+
private ok;
|
|
88
|
+
closePane(paneId: string): Promise<boolean>;
|
|
89
|
+
paneAlive(paneId: string): Promise<boolean | null>;
|
|
90
|
+
/** The agent the host sees in each pane, by its processes; an agent's title without the glyph it leads with. */
|
|
91
|
+
panes(): Promise<TerminalPaneInfo[] | null>;
|
|
92
|
+
/** What runs under a pane's root, nearest first; none from a host older than that, or one that cannot tell. */
|
|
93
|
+
processes(paneId: string): Promise<TerminalProcess[]>;
|
|
94
|
+
/** Typed into the pane, then Enter a moment later, as a person would. */
|
|
95
|
+
prompt(paneId: string, text: string): Promise<boolean>;
|
|
96
|
+
readTail(paneId: string, lines?: number): Promise<string | null>;
|
|
97
|
+
onScroll(paneId: string, listener: (scroll: TerminalScrollPosition) => void): () => void;
|
|
98
|
+
scrollTo(paneId: string, offset: number): Promise<boolean>;
|
|
99
|
+
onPane(listener: (event: TerminalPaneEvent) => void): () => void;
|
|
100
|
+
/** The host tells every pane's end on one stream, so following a pane is only remembering it. */
|
|
101
|
+
watch(paneId: string): () => void;
|
|
102
|
+
watching(): string[];
|
|
103
|
+
private exited;
|
|
104
|
+
private startGlobal;
|
|
105
|
+
private stopGlobal;
|
|
106
|
+
/** A host just started: the stream waiting out its backoff subscribes now. */
|
|
107
|
+
private resubscribe;
|
|
108
|
+
private subscribeGlobal;
|
|
109
|
+
private check;
|
|
110
|
+
}
|
|
111
|
+
export default PtyHost;
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/main.d.ts
ADDED
package/dist/pane.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { Terminal as HeadlessTerminal } from "@xterm/headless";
|
|
2
|
+
import type { TerminalFrame, TerminalMode, TerminalMouse, TerminalScroll } from "@tomradex/contracts";
|
|
3
|
+
import { type PaneInfo } from "./protocol.js";
|
|
4
|
+
import { type Screen } from "./render.js";
|
|
5
|
+
/** What the host needs of a pseudo-terminal: node-pty's, or a test's stand-in. */
|
|
6
|
+
export interface Pty {
|
|
7
|
+
readonly pid: number;
|
|
8
|
+
onData(listener: (data: string) => void): unknown;
|
|
9
|
+
onExit(listener: (exit: {
|
|
10
|
+
exitCode: number;
|
|
11
|
+
signal?: number;
|
|
12
|
+
}) => void): unknown;
|
|
13
|
+
write(data: string): void;
|
|
14
|
+
resize(cols: number, rows: number): void;
|
|
15
|
+
kill(): void;
|
|
16
|
+
}
|
|
17
|
+
/** One attached window (or plugin): what it is sent, and how it hears the pane closed. */
|
|
18
|
+
export interface Attachment {
|
|
19
|
+
mode: TerminalMode;
|
|
20
|
+
send(frame: TerminalFrame): void;
|
|
21
|
+
close(reason: string | null): void;
|
|
22
|
+
}
|
|
23
|
+
export interface ScrollState {
|
|
24
|
+
offset: number;
|
|
25
|
+
max: number;
|
|
26
|
+
rows: number;
|
|
27
|
+
}
|
|
28
|
+
/** The rows a pane keeps above its screen. */
|
|
29
|
+
export declare const SCROLLBACK = 5000;
|
|
30
|
+
/** How long the frames of a burst of output wait to go as one. */
|
|
31
|
+
export declare const FRAME_MS = 16;
|
|
32
|
+
/**
|
|
33
|
+
* One terminal of the host: its pseudo-terminal, the screen a headless xterm
|
|
34
|
+
* keeps of it (with capped scrollback), where its view is in that scrollback,
|
|
35
|
+
* and the windows attached to it. The headless xterm answers the program's
|
|
36
|
+
* queries (ConPTY waits for its device attributes before it starts), so the
|
|
37
|
+
* windows are sent only screens, never the program's own bytes.
|
|
38
|
+
*/
|
|
39
|
+
export declare class Pane {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly pty: Pty;
|
|
42
|
+
readonly cwd: string;
|
|
43
|
+
readonly label: string | null;
|
|
44
|
+
private readonly hooks;
|
|
45
|
+
readonly term: HeadlessTerminal;
|
|
46
|
+
title: string | null;
|
|
47
|
+
offset: number;
|
|
48
|
+
exited: boolean;
|
|
49
|
+
private readonly attachments;
|
|
50
|
+
private controller;
|
|
51
|
+
private shown;
|
|
52
|
+
private seq;
|
|
53
|
+
private timer;
|
|
54
|
+
private lastScroll;
|
|
55
|
+
private readonly cell;
|
|
56
|
+
/** Modes the public API does not report, read off the program's own sequences. */
|
|
57
|
+
private cursorVisible;
|
|
58
|
+
private cursorStyle;
|
|
59
|
+
private sgrMouse;
|
|
60
|
+
constructor(id: string, pty: Pty, cwd: string, label: string | null, cols: number, rows: number, hooks: {
|
|
61
|
+
onScroll(pane: Pane, scroll: ScrollState): void;
|
|
62
|
+
onExit(pane: Pane): void;
|
|
63
|
+
onTitle?(pane: Pane): void;
|
|
64
|
+
}, scrollback?: number);
|
|
65
|
+
get pid(): number;
|
|
66
|
+
private maxOffset;
|
|
67
|
+
scroll(): ScrollState;
|
|
68
|
+
info(): PaneInfo;
|
|
69
|
+
/** The screen the view shows now. */
|
|
70
|
+
screen(): Screen;
|
|
71
|
+
private modes;
|
|
72
|
+
/** The last lines with something on them, styling stripped. */
|
|
73
|
+
tail(lines: number): string;
|
|
74
|
+
/** Attaches a window once everything written so far is on the screen: `ready` hears it took, then the window is painted the screen whole. */
|
|
75
|
+
attach(attachment: Attachment, cols: number, rows: number, ready?: () => void): void;
|
|
76
|
+
detach(attachment: Attachment): void;
|
|
77
|
+
controls(attachment: Attachment): boolean;
|
|
78
|
+
input(data: string): void;
|
|
79
|
+
resize(cols: number, rows: number): void;
|
|
80
|
+
scrollTo(offset: number): void;
|
|
81
|
+
/**
|
|
82
|
+
* The wheel and Page Up/Down: to a program that reads the mouse, as its own wheel events; on the alternate screen
|
|
83
|
+
* (a pager, an editor), as the keys; otherwise through the scrollback.
|
|
84
|
+
*/
|
|
85
|
+
wheel(s: TerminalScroll): void;
|
|
86
|
+
/** A click, as the program asked to hear them; nothing when it reads no mouse. */
|
|
87
|
+
mouse(m: TerminalMouse): void;
|
|
88
|
+
private mouseReport;
|
|
89
|
+
/** Paints what changed, for every window at once, a moment after output: a burst goes as one. */
|
|
90
|
+
private schedule;
|
|
91
|
+
private flush;
|
|
92
|
+
private frame;
|
|
93
|
+
private tellScroll;
|
|
94
|
+
/** The pane is over: the windows get its last screen and are told, once. */
|
|
95
|
+
end(): void;
|
|
96
|
+
dispose(): void;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=pane.d.ts.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { TerminalFrame, TerminalMode, TerminalMouse, TerminalScroll, TerminalStatus } from "@tomradex/contracts";
|
|
2
|
+
/** Bumped when a message changes shape; a host speaking another one is not used. */
|
|
3
|
+
export declare const PROTOCOL = 1;
|
|
4
|
+
/** The pipe this user's host listens on; `scope` (the data folder) keeps a checkout's host apart from the installed app's. */
|
|
5
|
+
export declare function pipePath(scope?: string, user?: string): string;
|
|
6
|
+
/** The host answered with an error (`pane_not_found`, `invalid_request`…), or could not be reached (`unreachable`, `timeout`). */
|
|
7
|
+
export declare class PtyHostError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
constructor(code: string, message: string);
|
|
10
|
+
}
|
|
11
|
+
export interface Request {
|
|
12
|
+
id: string;
|
|
13
|
+
method: string;
|
|
14
|
+
params?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
/** Splits a stream into lines, each handed over without its newline; a partial line waits for the rest. */
|
|
17
|
+
export declare function lineReader(onLine: (line: string) => void): (chunk: string) => void;
|
|
18
|
+
export declare const line: (message: unknown) => string;
|
|
19
|
+
/** A pane as `pane.get` and `pane.list` give it. */
|
|
20
|
+
export interface PaneInfo {
|
|
21
|
+
pane_id: string;
|
|
22
|
+
title: string | null;
|
|
23
|
+
label: string | null;
|
|
24
|
+
cwd: string;
|
|
25
|
+
pid: number;
|
|
26
|
+
scroll: {
|
|
27
|
+
offset_from_bottom: number;
|
|
28
|
+
max_offset_from_bottom: number;
|
|
29
|
+
viewport_rows: number;
|
|
30
|
+
};
|
|
31
|
+
/** The coding agent the host sees running in the pane; absent from a host older than that. */
|
|
32
|
+
agent?: string | null;
|
|
33
|
+
agent_status?: TerminalStatus;
|
|
34
|
+
}
|
|
35
|
+
/** What `pane.process_info` gives, in herdr's shape: the pane's processes, nearest first. */
|
|
36
|
+
export interface ProcessInfo {
|
|
37
|
+
foreground_processes: {
|
|
38
|
+
pid: number;
|
|
39
|
+
name: string;
|
|
40
|
+
cmdline: string;
|
|
41
|
+
}[];
|
|
42
|
+
}
|
|
43
|
+
export interface LaunchParams {
|
|
44
|
+
cwd: string;
|
|
45
|
+
/** The program to run; the host's default shell without one. */
|
|
46
|
+
file?: string;
|
|
47
|
+
args?: string[];
|
|
48
|
+
/** Typed into the shell once it runs, with Enter. */
|
|
49
|
+
command?: string;
|
|
50
|
+
env?: Record<string, string>;
|
|
51
|
+
cols?: number;
|
|
52
|
+
rows?: number;
|
|
53
|
+
label?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface AttachParams {
|
|
56
|
+
pane_id: string;
|
|
57
|
+
mode: TerminalMode;
|
|
58
|
+
cols: number;
|
|
59
|
+
rows: number;
|
|
60
|
+
}
|
|
61
|
+
export declare const frameLine: (frame: TerminalFrame) => {
|
|
62
|
+
type: string;
|
|
63
|
+
seq: number;
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
full: boolean;
|
|
67
|
+
bytes: string;
|
|
68
|
+
};
|
|
69
|
+
export type TerminalLine = {
|
|
70
|
+
type: "frame";
|
|
71
|
+
frame: TerminalFrame;
|
|
72
|
+
} | {
|
|
73
|
+
type: "closed";
|
|
74
|
+
reason: string | null;
|
|
75
|
+
};
|
|
76
|
+
/** One line of an attached terminal, as the host sends it; null for anything else. */
|
|
77
|
+
export declare function parseTerminalLine(text: string): TerminalLine | null;
|
|
78
|
+
export declare const clampSize: (n: number) => number;
|
|
79
|
+
/** What an attached terminal sends the host, as herdr's control mode reads it. */
|
|
80
|
+
export declare const terminalCommand: {
|
|
81
|
+
input: (data: string | Uint8Array) => {
|
|
82
|
+
type: string;
|
|
83
|
+
text: string;
|
|
84
|
+
bytes?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
type: string;
|
|
87
|
+
bytes: string;
|
|
88
|
+
text?: undefined;
|
|
89
|
+
};
|
|
90
|
+
resize: (cols: number, rows: number) => {
|
|
91
|
+
type: string;
|
|
92
|
+
cols: number;
|
|
93
|
+
rows: number;
|
|
94
|
+
};
|
|
95
|
+
scroll: (s: TerminalScroll) => {
|
|
96
|
+
modifiers: number;
|
|
97
|
+
row?: number | undefined;
|
|
98
|
+
column?: number | undefined;
|
|
99
|
+
source?: "wheel" | "page_key" | undefined;
|
|
100
|
+
type: string;
|
|
101
|
+
direction: "up" | "down";
|
|
102
|
+
lines: number;
|
|
103
|
+
};
|
|
104
|
+
mouse: (m: TerminalMouse) => {
|
|
105
|
+
type: string;
|
|
106
|
+
action: "up" | "down" | "drag" | "move";
|
|
107
|
+
button: "left" | "middle" | "right" | "none";
|
|
108
|
+
column: number;
|
|
109
|
+
row: number;
|
|
110
|
+
modifiers: number;
|
|
111
|
+
};
|
|
112
|
+
release: () => {
|
|
113
|
+
type: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export type TerminalCommand = {
|
|
117
|
+
type: "terminal.input";
|
|
118
|
+
text?: string;
|
|
119
|
+
bytes?: string;
|
|
120
|
+
} | {
|
|
121
|
+
type: "terminal.resize";
|
|
122
|
+
cols: number;
|
|
123
|
+
rows: number;
|
|
124
|
+
} | ({
|
|
125
|
+
type: "terminal.scroll";
|
|
126
|
+
} & TerminalScroll) | ({
|
|
127
|
+
type: "terminal.mouse";
|
|
128
|
+
} & TerminalMouse) | {
|
|
129
|
+
type: "terminal.release";
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=protocol.d.ts.map
|
package/dist/render.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IBufferCell, IBufferLine } from "@xterm/headless";
|
|
2
|
+
export interface Screen {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
/** Each row's text and styling; trailing blanks left out. */
|
|
6
|
+
rows: string[];
|
|
7
|
+
/** How many columns each row paints, so a short one is cleared to its end. */
|
|
8
|
+
widths: number[];
|
|
9
|
+
/** Where the cursor is on screen; null while it is hidden or the view is up in the scrollback. */
|
|
10
|
+
cursor: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
} | null;
|
|
14
|
+
/** The modes the window's xterm needs to send what the program expects: arrow keys, pastes, focus, the cursor's shape. */
|
|
15
|
+
modes: string;
|
|
16
|
+
}
|
|
17
|
+
/** The SGR that styles a cell, from a reset. */
|
|
18
|
+
export declare function sgrOf(cell: IBufferCell): string;
|
|
19
|
+
/** One row as the ANSI that paints it from its first column, and how many columns that covers. */
|
|
20
|
+
export declare function renderRow(line: IBufferLine | undefined, cols: number, cell: IBufferCell): {
|
|
21
|
+
text: string;
|
|
22
|
+
width: number;
|
|
23
|
+
};
|
|
24
|
+
/** Paints a whole screen over whatever the window showed. */
|
|
25
|
+
export declare function fullFrame(screen: Screen): string;
|
|
26
|
+
/** Paints only what changed from `before`; empty when nothing did. A screen of another size is painted whole. */
|
|
27
|
+
export declare function diffFrame(before: Screen, after: Screen): string;
|
|
28
|
+
//# sourceMappingURL=render.d.ts.map
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
throw new Error("@tomradex/pty-host is Tomrade's own code: a full-mode plugin gets the running app's copy, so load the plugin in Tomrade");
|
package/dist/shell.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The first file of that name on PATH, with Windows' own extensions; null when there is none. */
|
|
2
|
+
export declare function onPath(name: string, env?: NodeJS.ProcessEnv, exists?: (file: string) => boolean): string | null;
|
|
3
|
+
/** What a plain terminal runs: PowerShell 7 when it is installed, else Windows PowerShell. */
|
|
4
|
+
export declare function defaultShell(env?: NodeJS.ProcessEnv, exists?: (file: string) => boolean): {
|
|
5
|
+
file: string;
|
|
6
|
+
args: string[];
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=shell.d.ts.map
|
package/dist/words.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** What the troubleshooter's line about the built-in terminal host says. */
|
|
2
|
+
export declare const PTY_HOST_WORDS: import("@tomradex/domain").WordBook<{
|
|
3
|
+
readonly missing: "this build carries no ConPTY runtime for {{arch}}: terminals open outside Tomrade";
|
|
4
|
+
readonly idle: "ready; starts with the first terminal";
|
|
5
|
+
readonly running: "running (pid {{pid}}) · {{panes}} terminals";
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=words.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/pty-host",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.21.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"author": "Haoyuan Tang",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"description": "ctx.terminals on native Windows: live terminals from a detached pty host Tomrade runs itself (node-pty over ConPTY), behind the same contract herdr fills on macOS and Linux. — declarations for full-mode plugins; Tomrade provides the code at run time",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"tomrade",
|
|
16
|
+
"tomrade-plugin",
|
|
17
|
+
"types"
|
|
18
|
+
],
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/runtime.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@tomradex/contracts": "0.21.0",
|
|
31
|
+
"@tomradex/domain": "0.2.29",
|
|
32
|
+
"cordis": "4.0.0-rc.8"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@xterm/headless": "5.5.0",
|
|
36
|
+
"node-pty": "1.1.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"@xterm/headless": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"node-pty": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/README.md
DELETED