@tomradex/code-sessions 0.14.0 → 0.15.1
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/dist/index.d.ts +7 -0
- package/dist/protocol.d.ts +21 -0
- package/dist/words.d.ts +3 -0
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
1
2
|
import type { Context } from "cordis";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { type CodeLink } from "@tomradex/code-link";
|
|
@@ -14,6 +15,12 @@ export declare const ENDED_SHOWN_MS: number;
|
|
|
14
15
|
export declare const BRIDGE_POLL_MS = 10000;
|
|
15
16
|
/** Whether a stored value is a layout the window can draw. */
|
|
16
17
|
export declare function isLayout(value: unknown): value is Layout;
|
|
18
|
+
/**
|
|
19
|
+
* Where a new terminal opens when herdr cannot show one in a pane (native Windows): Windows Terminal in
|
|
20
|
+
* the folder, or a PowerShell window there when it is not installed. Resolves with the app it opened.
|
|
21
|
+
*/
|
|
22
|
+
export declare function openSystemTerminal(cwd: string, platform?: NodeJS.Platform, launch?: typeof spawn): Promise<string>;
|
|
23
|
+
/** A project's code sessions as the window lists them: live ones first, then the ones ended in the last day. */
|
|
17
24
|
export declare function sessionRows(codeLink: Pick<CodeLink, "sessionsOf" | "links">, items: {
|
|
18
25
|
get(projectId: string, id: string): {
|
|
19
26
|
key: string;
|
package/dist/protocol.d.ts
CHANGED
|
@@ -70,6 +70,8 @@ export interface WindowState {
|
|
|
70
70
|
/** The app's language, so the window speaks it even before the main window says how it looks. */
|
|
71
71
|
locale: string;
|
|
72
72
|
bridge: HerdrBridge;
|
|
73
|
+
/** herdr's server went away under this window's terminals: being started again, or that did not work (the person can retry). */
|
|
74
|
+
revive: "starting" | "failed" | null;
|
|
73
75
|
/** How herdr installs here, when it is missing: the command shown on the button, or only the guide. */
|
|
74
76
|
install: {
|
|
75
77
|
command: string | null;
|
|
@@ -91,6 +93,11 @@ export interface WindowState {
|
|
|
91
93
|
defaultPreset: string | null;
|
|
92
94
|
/** New sessions and terminals go to the first empty cell. */
|
|
93
95
|
autoPlace: boolean;
|
|
96
|
+
/** A session asked to be shown, from outside the window: put in a cell and selected once; `at` tells a new ask from one done. */
|
|
97
|
+
reveal: {
|
|
98
|
+
sessionId: string;
|
|
99
|
+
at: number;
|
|
100
|
+
} | null;
|
|
94
101
|
}
|
|
95
102
|
/** What the window asks for. */
|
|
96
103
|
export type WindowMessage = {
|
|
@@ -108,6 +115,11 @@ export type WindowMessage = {
|
|
|
108
115
|
} | {
|
|
109
116
|
type: "closeTerminal";
|
|
110
117
|
terminalId: string;
|
|
118
|
+
}
|
|
119
|
+
/** Where herdr cannot show a terminal here: open one in the system terminal, in this folder. */
|
|
120
|
+
| {
|
|
121
|
+
type: "openOutside";
|
|
122
|
+
cwd: string | null;
|
|
111
123
|
} | {
|
|
112
124
|
type: "savePreset";
|
|
113
125
|
name: string;
|
|
@@ -173,6 +185,10 @@ export type WindowMessage = {
|
|
|
173
185
|
} | {
|
|
174
186
|
type: "switchTerminal";
|
|
175
187
|
switch: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** Start herdr's server again after it would not come up. */
|
|
190
|
+
| {
|
|
191
|
+
type: "startHerdr";
|
|
176
192
|
} | {
|
|
177
193
|
type: "refresh";
|
|
178
194
|
};
|
|
@@ -189,6 +205,11 @@ export type WindowPost = {
|
|
|
189
205
|
type: "closed";
|
|
190
206
|
cell: string;
|
|
191
207
|
reason: string | null;
|
|
208
|
+
}
|
|
209
|
+
/** herdr's server is back: attach the cell's pane again. */
|
|
210
|
+
| {
|
|
211
|
+
type: "reattach";
|
|
212
|
+
cell: string;
|
|
192
213
|
} | {
|
|
193
214
|
type: "toast";
|
|
194
215
|
text: string;
|
package/dist/words.d.ts
CHANGED
|
@@ -17,5 +17,8 @@ export declare const CODE_SESSIONS_WORDS: import("@tomradex/domain").WordBook<{
|
|
|
17
17
|
readonly stateUnreadable: "The saved layout could not be read, so this window starts from one cell";
|
|
18
18
|
readonly presetName: "Layout";
|
|
19
19
|
readonly switchFailed: "Could not bring {{app}} forward";
|
|
20
|
+
readonly openedOutside: "Opened in {{app}}. An agent you start there shows up here as a session";
|
|
21
|
+
readonly outsideFailed: "Could not open a terminal: {{reason}}";
|
|
22
|
+
readonly herdrRestarting: "herdr's server stopped — starting it again, this terminal comes back on its own";
|
|
20
23
|
}>;
|
|
21
24
|
//# sourceMappingURL=words.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/code-sessions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Haoyuan Tang",
|
|
6
6
|
"engines": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tomradex/code-link": "0.
|
|
31
|
-
"@tomradex/contributions": "0.
|
|
32
|
-
"@tomradex/db": "0.
|
|
33
|
-
"@tomradex/desktop-surface": "0.
|
|
34
|
-
"@tomradex/domain": "0.2.
|
|
35
|
-
"@tomradex/herdr": "0.
|
|
36
|
-
"@tomradex/items": "0.
|
|
37
|
-
"@tomradex/settings": "0.
|
|
30
|
+
"@tomradex/code-link": "0.15.1",
|
|
31
|
+
"@tomradex/contributions": "0.15.1",
|
|
32
|
+
"@tomradex/db": "0.15.1",
|
|
33
|
+
"@tomradex/desktop-surface": "0.15.1",
|
|
34
|
+
"@tomradex/domain": "0.2.18",
|
|
35
|
+
"@tomradex/herdr": "0.15.1",
|
|
36
|
+
"@tomradex/items": "0.15.1",
|
|
37
|
+
"@tomradex/settings": "0.15.1",
|
|
38
38
|
"cordis": "4.0.0-rc.8",
|
|
39
39
|
"zod": "^4.4.3"
|
|
40
40
|
}
|