@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,355 @@
|
|
|
1
|
+
import type { BindingPath, ReactiveStore } from '@textui/core';
|
|
2
|
+
import type { HostEvent } from './ahp/connection.js';
|
|
3
|
+
import type { Changeset, PendingInput, QueuedMessage, SessionSummary, Turn } from './ahp/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Where the conversation lives, and how the host's actions get there.
|
|
6
|
+
*
|
|
7
|
+
* The store is the only state. Everything the host says is folded in here, and
|
|
8
|
+
* every screen reads it back out - so the transcript, the sessions list, the
|
|
9
|
+
* status bar and the composer are all looking at one answer to "what is
|
|
10
|
+
* happening", and a turn that finishes updates all four without any of them
|
|
11
|
+
* knowing the others exist.
|
|
12
|
+
*
|
|
13
|
+
* Nothing in this file renders. That is the whole point of it being a file.
|
|
14
|
+
*/
|
|
15
|
+
export declare const HOST: BindingPath;
|
|
16
|
+
export declare const SESSIONS: BindingPath;
|
|
17
|
+
/** The open conversation. One at a time, so it is not keyed by session. */
|
|
18
|
+
export declare const TURNS: BindingPath;
|
|
19
|
+
export declare const INPUT: BindingPath;
|
|
20
|
+
export declare const CHANGES: BindingPath;
|
|
21
|
+
/**
|
|
22
|
+
* What the host handed the open session: plugins, skills, MCP servers.
|
|
23
|
+
*
|
|
24
|
+
* On the conversation rather than the catalogue, because that is where the
|
|
25
|
+
* protocol puts it - two sessions on the same host, opened in different
|
|
26
|
+
* directories, are given different skills, so there is no host-wide answer to
|
|
27
|
+
* cache. Read when a panel that shows them opens.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CUSTOMIZATIONS: BindingPath;
|
|
30
|
+
/**
|
|
31
|
+
* Who else is in the open session.
|
|
32
|
+
*
|
|
33
|
+
* Host-kept membership from `SessionState.activeClients`, including this
|
|
34
|
+
* client, which adds itself on opening the view. A session nobody else is in
|
|
35
|
+
* is the ordinary case and shows nothing.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PRESENT: BindingPath;
|
|
38
|
+
/** Which file of the changeset is open, by uri. Null is the list. */
|
|
39
|
+
export declare const OPEN_FILE: BindingPath;
|
|
40
|
+
/**
|
|
41
|
+
* Which changesets this session offers, and which one is on screen.
|
|
42
|
+
*
|
|
43
|
+
* The session advertises several - what the conversation changed, what one
|
|
44
|
+
* turn changed, what the working tree has - and drawing the first that needs
|
|
45
|
+
* no filling in was drawing one and hiding the rest. `CHANGE_AT` is the
|
|
46
|
+
* chosen changeset's own URI, or empty for "whichever the host would pick".
|
|
47
|
+
*/
|
|
48
|
+
export declare const CHANGE_SCOPES: BindingPath;
|
|
49
|
+
export declare const CHANGE_AT: BindingPath;
|
|
50
|
+
/** The row the cursor is on, so a key can act on it. */
|
|
51
|
+
export declare const CHANGE_ROW: BindingPath;
|
|
52
|
+
/**
|
|
53
|
+
* Where the file browser is looking, and what it found.
|
|
54
|
+
*
|
|
55
|
+
* The host's filesystem, not this machine's. `FILES_AT` is a `file://`
|
|
56
|
+
* directory URI on the host; empty means the session's own workspace, which is
|
|
57
|
+
* the only directory a client can name without having listed something first.
|
|
58
|
+
*/
|
|
59
|
+
export declare const FILES_AT: BindingPath;
|
|
60
|
+
export declare const FILES_ENTRIES: BindingPath;
|
|
61
|
+
export declare const FILES_OPEN: BindingPath;
|
|
62
|
+
/**
|
|
63
|
+
* The automations screen: what the host holds, and which row the cursor is on.
|
|
64
|
+
*
|
|
65
|
+
* The host's, not a session's - an automation outlives every session it
|
|
66
|
+
* starts, and belongs to the host the way the catalogue does.
|
|
67
|
+
*/
|
|
68
|
+
export declare const AUTOMATIONS: BindingPath;
|
|
69
|
+
export declare const AUTOMATION_ROW: BindingPath;
|
|
70
|
+
export declare const STATUS: BindingPath;
|
|
71
|
+
/**
|
|
72
|
+
* Is there a turn to stop, as a `when` clause can ask it.
|
|
73
|
+
*
|
|
74
|
+
* The status is a bitset carrying client flags as well as activity - an idle
|
|
75
|
+
* session that has been read is 33 - so "status > 1" is not "something is
|
|
76
|
+
* happening", it is "something is happening, or somebody looked at it". The
|
|
77
|
+
* decoding belongs in one place, and a clause cannot call it, so the answer is
|
|
78
|
+
* written beside the number.
|
|
79
|
+
*/
|
|
80
|
+
export declare const RUNNING: BindingPath;
|
|
81
|
+
/**
|
|
82
|
+
* What the next message will be sent as.
|
|
83
|
+
*
|
|
84
|
+
* Not a session's state, and deliberately not keyed by session: it is the
|
|
85
|
+
* composer's own row of choices, which exists before there is a session to
|
|
86
|
+
* hang them on. Sending is what turns them into one - a `createSession` with
|
|
87
|
+
* the harness and the workspace, and a `chat/turnStarted` carrying the model,
|
|
88
|
+
* because AHP hangs the model on the message rather than on the session.
|
|
89
|
+
*/
|
|
90
|
+
export declare const PROVIDER: BindingPath;
|
|
91
|
+
export declare const MODEL: BindingPath;
|
|
92
|
+
/**
|
|
93
|
+
* The answers to the chosen model's own questions.
|
|
94
|
+
*
|
|
95
|
+
* A model carries a `configSchema` and the protocol says a client presents it
|
|
96
|
+
* as a form and returns the resolved values in `ModelSelection.config`. Kept
|
|
97
|
+
* beside the model rather than in `SETTINGS`, because they are two different
|
|
98
|
+
* documents answered separately: the session's schema is the host's, this one
|
|
99
|
+
* is the model's, and a model that changes takes its answers with it.
|
|
100
|
+
*/
|
|
101
|
+
export declare const MODEL_CONFIG: BindingPath;
|
|
102
|
+
/**
|
|
103
|
+
* The chat the open session dispatches to.
|
|
104
|
+
*
|
|
105
|
+
* A session is not a conversation - it holds chats - and the uri of the one
|
|
106
|
+
* being read is what gets pasted into a shell or a bug report. Held because
|
|
107
|
+
* only `detail` knows it, and asking again to draw a caption is a round trip
|
|
108
|
+
* for something that does not change.
|
|
109
|
+
*/
|
|
110
|
+
export declare const CHAT_URI: BindingPath;
|
|
111
|
+
/**
|
|
112
|
+
* The open session's chats.
|
|
113
|
+
*
|
|
114
|
+
* A session is a container: it holds chats, and which of them is being read
|
|
115
|
+
* is `CHAT_URI`. One chat is the ordinary case and the row that shows this is
|
|
116
|
+
* hidden then - a list of one is a list nobody needs.
|
|
117
|
+
*/
|
|
118
|
+
export declare const CHATS: BindingPath;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the open session's agent can hold another chat.
|
|
121
|
+
*
|
|
122
|
+
* A path rather than a check, because that is what gates a command: `when`
|
|
123
|
+
* reads the store, and a host that does not advertise `multipleChats` is one
|
|
124
|
+
* where `createChat` MUST NOT be called - so the command is not offered.
|
|
125
|
+
*/
|
|
126
|
+
/** The terminals the host is running. The host's list, not any session's. */
|
|
127
|
+
export declare const TERMINALS: BindingPath;
|
|
128
|
+
/** Which of them is being read. */
|
|
129
|
+
export declare const OPEN_TERMINAL: BindingPath;
|
|
130
|
+
/** Its state. Null while nothing has been read yet, which is not the same as empty. */
|
|
131
|
+
export declare const TERMINAL: BindingPath;
|
|
132
|
+
export declare const CAN_ADD_CHAT: BindingPath;
|
|
133
|
+
/**
|
|
134
|
+
* Whether this session's agent can fork a chat, and whether it can hold a side
|
|
135
|
+
* chat.
|
|
136
|
+
*
|
|
137
|
+
* Two paths rather than one, because `capabilities.multipleChats` carries the
|
|
138
|
+
* two separately and a host may advertise one without the other. A command
|
|
139
|
+
* offered where the host will refuse it is worse than one that is not there.
|
|
140
|
+
*/
|
|
141
|
+
export declare const CAN_FORK: BindingPath;
|
|
142
|
+
export declare const CAN_SIDE_CHAT: BindingPath;
|
|
143
|
+
/** Whether the open session has more than one chat to move between. */
|
|
144
|
+
export declare const HAS_CHATS: BindingPath;
|
|
145
|
+
export declare const WORKSPACE: BindingPath;
|
|
146
|
+
/**
|
|
147
|
+
* Everything else the host asks about, keyed by the host's own keys.
|
|
148
|
+
*
|
|
149
|
+
* Not one path per setting: the settings are whatever the harness advertises,
|
|
150
|
+
* and this client had a `permissions` path because the *fixture* called its
|
|
151
|
+
* key `permissionMode`. A real host's keys are `isolation`, `autoApprove` and
|
|
152
|
+
* `mode`, so the row of chips read every one of them as absent - a control
|
|
153
|
+
* naming a key is a control that works against one host.
|
|
154
|
+
*/
|
|
155
|
+
export declare const SETTINGS: BindingPath;
|
|
156
|
+
/** What the host last refused, in the host's own words. Cleared by success. */
|
|
157
|
+
export declare const HOST_ERROR: BindingPath;
|
|
158
|
+
/**
|
|
159
|
+
* What became of the answer just given, on the row above the composer.
|
|
160
|
+
*
|
|
161
|
+
* Not `HOST_ERROR`, which is the application's last refusal and lives in the
|
|
162
|
+
* footer: this is about the block that is waiting on a person, and it only
|
|
163
|
+
* ever says anything between pressing a button on that block and the host
|
|
164
|
+
* letting go of the question. Both, for a refusal of *this* - the footer is
|
|
165
|
+
* twenty rows from the button that was pressed, and a person who pressed
|
|
166
|
+
* Approve and was told nothing has no reason to look down there.
|
|
167
|
+
*/
|
|
168
|
+
export declare const INPUT_STATUS: BindingPath;
|
|
169
|
+
/** The row's two states: gone to the host, or never going. */
|
|
170
|
+
export interface InputStatus {
|
|
171
|
+
state: 'sending' | 'failed';
|
|
172
|
+
text: string;
|
|
173
|
+
}
|
|
174
|
+
export declare const OPEN: BindingPath;
|
|
175
|
+
/** Which of the bood this run got. One animal, wherever one is drawn. */
|
|
176
|
+
export declare const BOOD: BindingPath;
|
|
177
|
+
/**
|
|
178
|
+
* How many rows the bottom of the screen is keeping, which is the creature's
|
|
179
|
+
* floor.
|
|
180
|
+
*
|
|
181
|
+
* Published by whatever is down there rather than assumed, because it moves:
|
|
182
|
+
* the composer grows a slash menu upward, grows again with a multi-line draft,
|
|
183
|
+
* and is not on every screen at all. A constant was wrong the moment a menu
|
|
184
|
+
* opened - the figure stood at the height the composer used to be, which is
|
|
185
|
+
* inside the menu.
|
|
186
|
+
*/
|
|
187
|
+
export declare const BOOD_FLOOR: BindingPath;
|
|
188
|
+
/**
|
|
189
|
+
* The top row of one thing standing at the bottom, under its own name.
|
|
190
|
+
*
|
|
191
|
+
* A row and not a height, because a height has to be right and a row only has
|
|
192
|
+
* to be where the thing is. Adding up heights meant trusting each measurement
|
|
193
|
+
* and a guess at the chrome underneath them - and the block that asks about a
|
|
194
|
+
* tool reported seven rows while drawing ten, which put the creature inside
|
|
195
|
+
* the question it was supposed to be standing on.
|
|
196
|
+
*
|
|
197
|
+
* A subtree because there is more than one of them: the composer is down
|
|
198
|
+
* there, and the block that asks is a sibling above it rather than a part of
|
|
199
|
+
* it, so neither one knows the whole answer.
|
|
200
|
+
*/
|
|
201
|
+
export declare const boodFloorFor: (key: string) => BindingPath;
|
|
202
|
+
/** The highest thing standing at the bottom, or nothing standing there. */
|
|
203
|
+
export declare function boodFloor(store: ReactiveStore): number | undefined;
|
|
204
|
+
/** Whether the creature roams the whole application rather than one screen. */
|
|
205
|
+
export declare const BOOD_FLOAT: BindingPath;
|
|
206
|
+
/** Whether the header trades its own name for a seven-cell creature. */
|
|
207
|
+
export declare const BOOD_INLINE: BindingPath;
|
|
208
|
+
/** The catalogue's highlight. What a session command acts on when none is open. */
|
|
209
|
+
export declare const SELECTED: BindingPath;
|
|
210
|
+
export declare const DRAFT: BindingPath;
|
|
211
|
+
export declare const QUEUE: BindingPath;
|
|
212
|
+
export declare const HISTORY: BindingPath;
|
|
213
|
+
export declare const FILTER: BindingPath;
|
|
214
|
+
export declare const ARCHIVED: BindingPath;
|
|
215
|
+
export declare const EXPANDED: BindingPath;
|
|
216
|
+
/** What is being looked for in the open conversation. Empty means nothing is. */
|
|
217
|
+
export declare const FIND: BindingPath;
|
|
218
|
+
/** Whether the find box is up. It stays up on an empty query, which is how it is typed into. */
|
|
219
|
+
export declare const FINDING: BindingPath;
|
|
220
|
+
/** Which of the matches the cursor is on, counted from zero. */
|
|
221
|
+
export declare const FIND_AT: BindingPath;
|
|
222
|
+
/**
|
|
223
|
+
* Which block the transcript cursor is on.
|
|
224
|
+
*
|
|
225
|
+
* In the chat screen's own scope, so it survives a trip to the changes list
|
|
226
|
+
* and dies with the screen. Named here because the find commands move it and
|
|
227
|
+
* they do not live in the screen.
|
|
228
|
+
*/
|
|
229
|
+
export declare const CURSOR: BindingPath;
|
|
230
|
+
/**
|
|
231
|
+
* Whether what the agent said is drawn as markdown, or as what it typed.
|
|
232
|
+
*
|
|
233
|
+
* On, because an agent writes markdown and reading `**this**` is reading the
|
|
234
|
+
* punctuation instead of the sentence. Off is for the times the punctuation is
|
|
235
|
+
* the point: copying a fenced block out with the fence, seeing whether a table
|
|
236
|
+
* is a table or four lines that happen to have pipes in them, and reading a
|
|
237
|
+
* link's target rather than its label.
|
|
238
|
+
*/
|
|
239
|
+
export declare const MARKDOWN: BindingPath;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the catalogue's detail pane is out, or `null` for "whatever the
|
|
242
|
+
* terminal is wide enough for".
|
|
243
|
+
*
|
|
244
|
+
* Three states rather than two, because "nobody has said" and "somebody said
|
|
245
|
+
* no" are different: the first still follows the window as it is resized, and
|
|
246
|
+
* the second has to survive a resize or the key that closed the pane would be
|
|
247
|
+
* undone by dragging the corner.
|
|
248
|
+
*/
|
|
249
|
+
export declare const SIDEBAR: BindingPath;
|
|
250
|
+
/**
|
|
251
|
+
* The width at which the detail pane is out to begin with.
|
|
252
|
+
*
|
|
253
|
+
* Under it the two panes are each other's problem: forty cells of detail take
|
|
254
|
+
* the session list down to a column that cuts every title, and the detail
|
|
255
|
+
* pane they were taken for is itself too narrow to hold the URIs it exists to
|
|
256
|
+
* show. So below this the catalogue is one pane, and the detail is something
|
|
257
|
+
* you open.
|
|
258
|
+
*/
|
|
259
|
+
export declare const SPLIT_AT: BindingPath;
|
|
260
|
+
export declare const SPLIT_DEFAULT = 140;
|
|
261
|
+
/**
|
|
262
|
+
* The runtime's own state, read rather than asked for.
|
|
263
|
+
*
|
|
264
|
+
* `screens.current()` and `focus.focused()` are method calls: correct at the
|
|
265
|
+
* moment they run and attached to nothing. A surface that survives navigating -
|
|
266
|
+
* which is the whole point of a surface - has to subscribe instead, or it
|
|
267
|
+
* keeps the chrome of the screen you left.
|
|
268
|
+
*/
|
|
269
|
+
export declare const SCREEN: BindingPath;
|
|
270
|
+
export declare const FOCUS: BindingPath;
|
|
271
|
+
export interface HostState {
|
|
272
|
+
id: string;
|
|
273
|
+
url: string;
|
|
274
|
+
state: 'connecting' | 'connected' | 'offline';
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Fold one thing the host said into the store.
|
|
278
|
+
*
|
|
279
|
+
* A delta is a word, so this runs per word during a turn. It writes the whole
|
|
280
|
+
* turn list because the store is addressed by path and a mutation in place is
|
|
281
|
+
* a change nothing can see - a real client debounces the write, which is a
|
|
282
|
+
* change here and nowhere above.
|
|
283
|
+
*/
|
|
284
|
+
export declare function applyEvent(store: ReactiveStore, event: HostEvent, model: Turn[]): Turn[];
|
|
285
|
+
/** The answer has gone to the host, which has not said anything about it yet. */
|
|
286
|
+
export declare function sendingInput(store: ReactiveStore, text: string): void;
|
|
287
|
+
/** It is not going, and this is why. */
|
|
288
|
+
export declare function inputRefused(store: ReactiveStore, text: string): void;
|
|
289
|
+
/**
|
|
290
|
+
* The host refused something, wherever it was asked from.
|
|
291
|
+
*
|
|
292
|
+
* The footer says so always. The block waiting on a person says so too when
|
|
293
|
+
* it was that block's answer being refused, and only then - a refusal earned
|
|
294
|
+
* by some other command has no business turning the row above the composer
|
|
295
|
+
* red, which is exactly what reading `HOST_ERROR` from there would do.
|
|
296
|
+
*/
|
|
297
|
+
export declare function reportHostError(store: ReactiveStore, message: string): void;
|
|
298
|
+
/** The number, and the one question everything else asks of it. */
|
|
299
|
+
export declare function writeStatus(store: ReactiveStore, status: number): void;
|
|
300
|
+
export declare function writeSessions(store: ReactiveStore, sessions: SessionSummary[]): void;
|
|
301
|
+
export declare function sessions(store: ReactiveStore): SessionSummary[];
|
|
302
|
+
/**
|
|
303
|
+
* The catalogue as the list shows it.
|
|
304
|
+
*
|
|
305
|
+
* Archived is hidden rather than filtered out of existence: a session somebody
|
|
306
|
+
* put away is still a session, and the count of what is hidden is what tells
|
|
307
|
+
* the reader the list is not everything.
|
|
308
|
+
*/
|
|
309
|
+
export declare function visibleSessions(store: ReactiveStore): SessionSummary[];
|
|
310
|
+
/**
|
|
311
|
+
* How many sessions the archived switch is keeping out of the list.
|
|
312
|
+
*
|
|
313
|
+
* Zero while the switch is on, because then it is keeping none out. What it
|
|
314
|
+
* counts is the difference the switch would make: a row offering to show
|
|
315
|
+
* archived sessions where there are none to show is a row that does nothing.
|
|
316
|
+
*/
|
|
317
|
+
export declare function hiddenSessions(store: ReactiveStore): number;
|
|
318
|
+
export declare function openSession(store: ReactiveStore): SessionSummary | null;
|
|
319
|
+
export declare function turns(store: ReactiveStore): Turn[];
|
|
320
|
+
export declare function pendingInput(store: ReactiveStore): PendingInput | null;
|
|
321
|
+
export declare function changes(store: ReactiveStore): Changeset;
|
|
322
|
+
/** The running turn, if there is one. Never in the history until it finishes. */
|
|
323
|
+
export declare function activeTurn(store: ReactiveStore): Turn | null;
|
|
324
|
+
export declare function queue(store: ReactiveStore): QueuedMessage[];
|
|
325
|
+
/** A short name for a `file://` working directory. */
|
|
326
|
+
export declare function workspaceName(uri: string | undefined): string;
|
|
327
|
+
/**
|
|
328
|
+
* What to call the project a session is in.
|
|
329
|
+
*
|
|
330
|
+
* The host's own name when it gives one, and the last segment of the working
|
|
331
|
+
* directory when it does not - which is the same answer for most hosts and the
|
|
332
|
+
* right one for a host that names projects itself.
|
|
333
|
+
*/
|
|
334
|
+
export declare function projectName(session: SessionSummary): string;
|
|
335
|
+
/**
|
|
336
|
+
* The branch a session's directory is on, if its host says.
|
|
337
|
+
*
|
|
338
|
+
* Two spellings, because there are two vocabularies and only one of them is
|
|
339
|
+
* written down anywhere. `branchName` is what the reference host sends and is
|
|
340
|
+
* the one to prefer; `branch` is what one other host sent until it adopted the
|
|
341
|
+
* reference's names. Neither is in the specification - `git` is a well-known
|
|
342
|
+
* key in an open map and its contents are convention - so reading only the
|
|
343
|
+
* name this client happened to meet first is how the branch row came to say
|
|
344
|
+
* "the host does not say" against a host that was saying it all along.
|
|
345
|
+
*/
|
|
346
|
+
export declare function branchName(session: SessionSummary): string | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* How far the branch has drifted, where the host counted.
|
|
349
|
+
*
|
|
350
|
+
* Ahead, behind and uncommitted, in the arrows a person reads without a
|
|
351
|
+
* legend. Zeroes are left out rather than drawn as zeroes: the interesting
|
|
352
|
+
* state is the one that is not clean, and three noughts beside every branch is
|
|
353
|
+
* three columns of nothing.
|
|
354
|
+
*/
|
|
355
|
+
export declare function branchDrift(session: SessionSummary): string | undefined;
|