@softov/ahpc 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.
- package/LICENSE +21 -0
- package/README.md +296 -0
- package/dist/src/ahp/channels.d.ts +146 -0
- package/dist/src/ahp/channels.js +423 -0
- package/dist/src/ahp/connection.d.ts +656 -0
- package/dist/src/ahp/connection.js +1 -0
- package/dist/src/ahp/fake.d.ts +69 -0
- package/dist/src/ahp/fake.js +1996 -0
- package/dist/src/ahp/live.d.ts +160 -0
- package/dist/src/ahp/live.js +2641 -0
- package/dist/src/ahp/operate.d.ts +36 -0
- package/dist/src/ahp/operate.js +56 -0
- package/dist/src/ahp/publish.d.ts +39 -0
- package/dist/src/ahp/publish.js +370 -0
- package/dist/src/ahp/status.d.ts +23 -0
- package/dist/src/ahp/status.js +23 -0
- package/dist/src/ahp/types.d.ts +745 -0
- package/dist/src/ahp/types.js +27 -0
- package/dist/src/app.d.ts +54 -0
- package/dist/src/app.js +369 -0
- package/dist/src/blocks.d.ts +88 -0
- package/dist/src/blocks.js +102 -0
- package/dist/src/cli/main.d.ts +13 -0
- package/dist/src/cli/main.js +1537 -0
- package/dist/src/cli/render.d.ts +43 -0
- package/dist/src/cli/render.js +91 -0
- package/dist/src/config.d.ts +63 -0
- package/dist/src/config.js +45 -0
- package/dist/src/connect.d.ts +53 -0
- package/dist/src/connect.js +69 -0
- package/dist/src/control.d.ts +189 -0
- package/dist/src/control.js +2241 -0
- package/dist/src/diff.d.ts +44 -0
- package/dist/src/diff.js +111 -0
- package/dist/src/flags.d.ts +28 -0
- package/dist/src/flags.js +76 -0
- package/dist/src/main.d.ts +10 -0
- package/dist/src/main.js +54 -0
- package/dist/src/schedule.d.ts +46 -0
- package/dist/src/schedule.js +140 -0
- package/dist/src/screens.d.ts +79 -0
- package/dist/src/screens.js +1322 -0
- package/dist/src/state.d.ts +355 -0
- package/dist/src/state.js +531 -0
- package/dist/src/terminal.d.ts +44 -0
- package/dist/src/terminal.js +101 -0
- package/dist/src/tui.d.ts +92 -0
- package/dist/src/tui.js +372 -0
- package/dist/src/view/automations.d.ts +31 -0
- package/dist/src/view/automations.js +76 -0
- package/dist/src/view/bood/art.d.ts +90 -0
- package/dist/src/view/bood/art.js +152 -0
- package/dist/src/view/bood/beetle.d.ts +7 -0
- package/dist/src/view/bood/beetle.js +123 -0
- package/dist/src/view/bood/bunny.d.ts +8 -0
- package/dist/src/view/bood/bunny.js +228 -0
- package/dist/src/view/bood/cat.d.ts +9 -0
- package/dist/src/view/bood/cat.js +358 -0
- package/dist/src/view/bood/crab.d.ts +7 -0
- package/dist/src/view/bood/crab.js +121 -0
- package/dist/src/view/bood/index.d.ts +29 -0
- package/dist/src/view/bood/index.js +25 -0
- package/dist/src/view/bood/motion.d.ts +178 -0
- package/dist/src/view/bood/motion.js +298 -0
- package/dist/src/view/bood/owl.d.ts +9 -0
- package/dist/src/view/bood/owl.js +285 -0
- package/dist/src/view/bood/registry.d.ts +36 -0
- package/dist/src/view/bood/registry.js +218 -0
- package/dist/src/view/bood/render.d.ts +31 -0
- package/dist/src/view/bood/render.js +196 -0
- package/dist/src/view/bood/sprite.d.ts +18 -0
- package/dist/src/view/bood/sprite.js +130 -0
- package/dist/src/view/bood/sprout.d.ts +8 -0
- package/dist/src/view/bood/sprout.js +121 -0
- package/dist/src/view/bood/types.d.ts +158 -0
- package/dist/src/view/bood/types.js +57 -0
- package/dist/src/view/bubble.d.ts +75 -0
- package/dist/src/view/bubble.js +86 -0
- package/dist/src/view/changes.d.ts +35 -0
- package/dist/src/view/changes.js +22 -0
- package/dist/src/view/composer.d.ts +64 -0
- package/dist/src/view/composer.js +192 -0
- package/dist/src/view/controls.d.ts +44 -0
- package/dist/src/view/controls.js +49 -0
- package/dist/src/view/creature.d.ts +69 -0
- package/dist/src/view/creature.js +83 -0
- package/dist/src/view/customizations.d.ts +28 -0
- package/dist/src/view/customizations.js +53 -0
- package/dist/src/view/details.d.ts +65 -0
- package/dist/src/view/details.js +65 -0
- package/dist/src/view/filediff.d.ts +29 -0
- package/dist/src/view/filediff.js +24 -0
- package/dist/src/view/files.d.ts +31 -0
- package/dist/src/view/files.js +39 -0
- package/dist/src/view/hitl.d.ts +43 -0
- package/dist/src/view/hitl.js +171 -0
- package/dist/src/view/icons.d.ts +13 -0
- package/dist/src/view/icons.js +71 -0
- package/dist/src/view/picker.d.ts +42 -0
- package/dist/src/view/picker.js +71 -0
- package/dist/src/view/sessionhead.d.ts +41 -0
- package/dist/src/view/sessionhead.js +60 -0
- package/dist/src/view/sessions.d.ts +34 -0
- package/dist/src/view/sessions.js +61 -0
- package/dist/src/view/terminal.d.ts +30 -0
- package/dist/src/view/terminal.js +32 -0
- package/dist/src/view/toolcall.d.ts +27 -0
- package/dist/src/view/toolcall.js +48 -0
- package/dist/src/view/transcript.d.ts +50 -0
- package/dist/src/view/transcript.js +60 -0
- package/package.json +72 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { HostConnection } from './connection.js';
|
|
2
|
+
import type { SessionUri } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A host, scripted.
|
|
5
|
+
*
|
|
6
|
+
* An example nothing checks is an example that is already broken, and nothing
|
|
7
|
+
* can check one that needs an editor running on another machine. So the seam
|
|
8
|
+
* is `HostConnection` and this is the other implementation of it: the same
|
|
9
|
+
* shapes, the same order, the same "the turn appears when the host reduced it".
|
|
10
|
+
*
|
|
11
|
+
* Time is a `pump`, not a timer. The application drives it from a ticker and a
|
|
12
|
+
* test calls it in a loop, so what the test exercises is the streaming path
|
|
13
|
+
* rather than a fixture that arrived all at once.
|
|
14
|
+
*
|
|
15
|
+
* Two things it is deliberately strict about, both because a lie here reads
|
|
16
|
+
* as a bug in the client:
|
|
17
|
+
*
|
|
18
|
+
* - **The status is derived, never assigned.** It is computed from what this
|
|
19
|
+
* host is actually holding, so a session cannot say "waiting on you" with
|
|
20
|
+
* nothing waiting. It did, and the bug looked exactly like a client that
|
|
21
|
+
* drops a pending confirmation when you leave the screen.
|
|
22
|
+
* - **The sessions differ, and so do the replies.** Every conversation opening
|
|
23
|
+
* on the same text, and every message getting the same answer, hides every
|
|
24
|
+
* layout problem that only appears on prose of another shape.
|
|
25
|
+
*/
|
|
26
|
+
export interface FakeHost extends HostConnection {
|
|
27
|
+
/** Emit the next scripted step. False when there is nothing waiting. */
|
|
28
|
+
pump(): boolean;
|
|
29
|
+
/** Everything the script can emit without being answered. */
|
|
30
|
+
drain(limit?: number): void;
|
|
31
|
+
pending(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Retitle a session, the way a host does once it has read the first message.
|
|
34
|
+
*
|
|
35
|
+
* Not on `HostConnection`: a client never renames a session, it is told.
|
|
36
|
+
* Here so that "the host changed something about a session nobody is
|
|
37
|
+
* watching" is a thing a test can make happen.
|
|
38
|
+
*/
|
|
39
|
+
rename(uri: SessionUri, title: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Every action sent through `dispatch`, in order.
|
|
42
|
+
*
|
|
43
|
+
* Not on `HostConnection`: a real host does not hand its clients back what
|
|
44
|
+
* they sent it. Here because `dispatch` carries actions this fake has no
|
|
45
|
+
* behaviour for, and an escape hatch whose effect is nothing observable is
|
|
46
|
+
* one nothing can check.
|
|
47
|
+
*/
|
|
48
|
+
dispatched(): {
|
|
49
|
+
uri: SessionUri;
|
|
50
|
+
action: Record<string, unknown>;
|
|
51
|
+
chat?: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
/**
|
|
54
|
+
* Every changeset operation that actually ran.
|
|
55
|
+
*
|
|
56
|
+
* Not on `HostConnection` for the same reason `dispatched` is not: a real
|
|
57
|
+
* host does not hand a client back its own history. Here because the
|
|
58
|
+
* interesting assertion is that an operation ran *after* the grant rather
|
|
59
|
+
* than despite the gate.
|
|
60
|
+
*/
|
|
61
|
+
invoked(): {
|
|
62
|
+
changeset: string;
|
|
63
|
+
operationId: string;
|
|
64
|
+
target?: unknown;
|
|
65
|
+
}[];
|
|
66
|
+
/** Paths a watch is open on, so releasing one can be asserted. */
|
|
67
|
+
watching(): string[];
|
|
68
|
+
}
|
|
69
|
+
export declare function fakeHost(): FakeHost;
|