terminal-pilot 0.0.40 → 0.0.42
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 +13 -1
- package/dist/cli.js +751 -9684
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +9 -1
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +9 -1
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/daemon-runtime.js +9 -1
- package/dist/commands/daemon-runtime.js.map +2 -2
- package/dist/commands/fill.js +9 -1
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +9 -1
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.js +19 -2
- package/dist/commands/index.js.map +2 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/installer.js.map +1 -1
- package/dist/commands/list-sessions.js +9 -1
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +9 -1
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +9 -1
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +9 -1
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +9 -1
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.js +9 -1
- package/dist/commands/runtime.js.map +2 -2
- package/dist/commands/screenshot.js +9 -1
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +9 -1
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +9 -1
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/wait-for-exit.js +9 -1
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.d.ts +2 -0
- package/dist/commands/wait-for.js +19 -2
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +2 -2
- package/dist/terminal-pilot.js +9 -1
- package/dist/terminal-pilot.js.map +2 -2
- package/dist/terminal-session.d.ts +1 -0
- package/dist/terminal-session.js +9 -1
- package/dist/terminal-session.js.map +2 -2
- package/dist/testing/cli-repl.js +757 -9690
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +766 -9699
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/toolcraft-design/dist/index.d.ts +2 -2
- package/node_modules/toolcraft-design/dist/index.js +1 -1
- package/node_modules/toolcraft-design/dist/render-markdown-plaintext.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-markdown-plaintext.js +1 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/index.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/index.js +1 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/parser/inline.js +38 -2
- package/node_modules/toolcraft-design/dist/terminal-markdown/plaintext-renderer.d.ts +11 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/plaintext-renderer.js +228 -0
- package/node_modules/toolcraft-design/package.json +4 -0
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poe Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -168,7 +168,10 @@ class TerminalSession {
|
|
|
168
168
|
press(key: TerminalKey): Promise<void>;
|
|
169
169
|
send(raw: string): Promise<void>; // raw bytes / escape sequences
|
|
170
170
|
signal(signal: string): Promise<void>;
|
|
171
|
-
waitFor(
|
|
171
|
+
waitFor(
|
|
172
|
+
pattern: string | RegExp,
|
|
173
|
+
options?: { timeout?: number; scope?: "history" | "screen" }
|
|
174
|
+
): Promise<string>;
|
|
172
175
|
waitForExit(options?: { timeout?: number }): Promise<number>; // throws on timeout
|
|
173
176
|
waitForQuiet(ms: number): Promise<void>;
|
|
174
177
|
screen(): Promise<TerminalScreen>;
|
|
@@ -249,6 +252,15 @@ Typical fixture workflow:
|
|
|
249
252
|
4. Assert with `screen()` or `history()`
|
|
250
253
|
5. `close()` the session
|
|
251
254
|
|
|
255
|
+
`waitFor(...)` searches captured output history by default. Use
|
|
256
|
+
`waitFor(pattern, { scope: "screen" })` when command echoes or previous output could match before
|
|
257
|
+
the expected interactive screen is visible.
|
|
258
|
+
|
|
259
|
+
When launching an interactive program through `npm run`, npm can buffer printable raw keys such as
|
|
260
|
+
`q` until `Enter` is pressed. Prefer launching the underlying executable directly for raw-key tests.
|
|
261
|
+
If the npm wrapper is part of the behavior under test, use `Control+c` for teardown and treat
|
|
262
|
+
printable-key delivery as npm-wrapper behavior rather than application behavior.
|
|
263
|
+
|
|
252
264
|
Example fixture-based test:
|
|
253
265
|
|
|
254
266
|
```ts
|