@tomradex/code-sessions 0.15.1 → 0.16.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/dist/index.d.ts +3 -3
- package/dist/protocol.d.ts +25 -1
- package/dist/words.d.ts +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare const Config: z.ZodObject<{
|
|
|
9
9
|
stateFile: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
export type Config = z.infer<typeof Config>;
|
|
12
|
-
/**
|
|
13
|
-
export declare const
|
|
12
|
+
/** A session that ended in herdr this recently may come back with herdr's server: the window starts it for them. */
|
|
13
|
+
export declare const RECENTLY_ENDED_MS: number;
|
|
14
14
|
/** How often an open window asks herdr how it is, besides every session change. */
|
|
15
15
|
export declare const BRIDGE_POLL_MS = 10000;
|
|
16
16
|
/** Whether a stored value is a layout the window can draw. */
|
|
@@ -20,7 +20,7 @@ export declare function isLayout(value: unknown): value is Layout;
|
|
|
20
20
|
* the folder, or a PowerShell window there when it is not installed. Resolves with the app it opened.
|
|
21
21
|
*/
|
|
22
22
|
export declare function openSystemTerminal(cwd: string, platform?: NodeJS.Platform, launch?: typeof spawn): Promise<string>;
|
|
23
|
-
/** A project's code sessions
|
|
23
|
+
/** A project's code sessions, live ones first and needs-you before the rest, then every ended one code link keeps. */
|
|
24
24
|
export declare function sessionRows(codeLink: Pick<CodeLink, "sessionsOf" | "links">, items: {
|
|
25
25
|
get(projectId: string, id: string): {
|
|
26
26
|
key: string;
|
package/dist/protocol.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface SessionRow {
|
|
|
25
25
|
prUrl: string | null;
|
|
26
26
|
worktree: string | null;
|
|
27
27
|
startedAt: number;
|
|
28
|
+
/** When it ended; null while it lives. */
|
|
29
|
+
endedAt: number | null;
|
|
28
30
|
}
|
|
29
31
|
/** A plain terminal the window opened: a herdr pane of the person's, with no ticket or code-link session behind it. */
|
|
30
32
|
export interface TerminalRow {
|
|
@@ -34,6 +36,8 @@ export interface TerminalRow {
|
|
|
34
36
|
/** Null while herdr is still opening it. */
|
|
35
37
|
pane: string | null;
|
|
36
38
|
startedAt: number;
|
|
39
|
+
/** What the agent herdr sees in it calls the conversation; null without one. */
|
|
40
|
+
agentTitle: string | null;
|
|
37
41
|
/** The code session its agent claimed a ticket for: the cell shows that session, on the same pane. */
|
|
38
42
|
sessionId: string | null;
|
|
39
43
|
/** Why it stays a plain terminal although an agent claimed a ticket, when Tomrade cannot tell which terminal that was. */
|
|
@@ -51,10 +55,12 @@ export interface LayoutPreset {
|
|
|
51
55
|
layout: Layout;
|
|
52
56
|
}
|
|
53
57
|
/** A cell of the window's layout: one session or terminal (by its id), or a split of two. */
|
|
58
|
+
/** A leaf `locked` keeps its session until the person unlocks or closes it. */
|
|
54
59
|
export type Layout = {
|
|
55
60
|
type: "leaf";
|
|
56
61
|
id: string;
|
|
57
62
|
sessionId: string | null;
|
|
63
|
+
locked?: true;
|
|
58
64
|
} | {
|
|
59
65
|
type: "split";
|
|
60
66
|
id: string;
|
|
@@ -63,7 +69,10 @@ export type Layout = {
|
|
|
63
69
|
a: Layout;
|
|
64
70
|
b: Layout;
|
|
65
71
|
};
|
|
66
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* What the window shows, set as its whole state. `sessions` holds the live ones and the ended ones a cell still
|
|
74
|
+
* shows; the rest are in `archive`.
|
|
75
|
+
*/
|
|
67
76
|
export interface WindowState {
|
|
68
77
|
projectId: string;
|
|
69
78
|
projectName: string;
|
|
@@ -98,6 +107,13 @@ export interface WindowState {
|
|
|
98
107
|
sessionId: string;
|
|
99
108
|
at: number;
|
|
100
109
|
} | null;
|
|
110
|
+
/** Ended sessions, put away: how many, and the rows themselves only while the window has the archive open, newest first. */
|
|
111
|
+
archive: {
|
|
112
|
+
count: number;
|
|
113
|
+
rows: SessionRow[] | null;
|
|
114
|
+
};
|
|
115
|
+
/** The sidebar folded to a strip, as this project's window was left. */
|
|
116
|
+
folded: boolean;
|
|
101
117
|
}
|
|
102
118
|
/** What the window asks for. */
|
|
103
119
|
export type WindowMessage = {
|
|
@@ -137,6 +153,14 @@ export type WindowMessage = {
|
|
|
137
153
|
} | {
|
|
138
154
|
type: "autoPlace";
|
|
139
155
|
on: boolean;
|
|
156
|
+
}
|
|
157
|
+
/** The archive opened or closed: its rows come with the state while it is open. */
|
|
158
|
+
| {
|
|
159
|
+
type: "archive";
|
|
160
|
+
open: boolean;
|
|
161
|
+
} | {
|
|
162
|
+
type: "fold";
|
|
163
|
+
folded: boolean;
|
|
140
164
|
} | {
|
|
141
165
|
type: "detach";
|
|
142
166
|
cell: string;
|
package/dist/words.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const CODE_SESSIONS_WORDS: import("@tomradex/domain").WordBook<{
|
|
|
3
3
|
readonly open: "Open terminal";
|
|
4
4
|
readonly group: "Code link";
|
|
5
5
|
readonly sidebar: "Terminal";
|
|
6
|
-
readonly windowTitle: "
|
|
6
|
+
readonly windowTitle: "{{project}} — Terminal";
|
|
7
7
|
readonly openProject: "Open a project first";
|
|
8
8
|
readonly noTerminal: "This session has no herdr terminal on this computer";
|
|
9
9
|
readonly noTicket: "This session has no ticket";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/code-sessions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
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.
|
|
30
|
+
"@tomradex/code-link": "0.16.0",
|
|
31
|
+
"@tomradex/contributions": "0.16.0",
|
|
32
|
+
"@tomradex/db": "0.16.0",
|
|
33
|
+
"@tomradex/desktop-surface": "0.16.0",
|
|
34
34
|
"@tomradex/domain": "0.2.18",
|
|
35
|
-
"@tomradex/herdr": "0.
|
|
36
|
-
"@tomradex/items": "0.
|
|
37
|
-
"@tomradex/settings": "0.
|
|
35
|
+
"@tomradex/herdr": "0.16.0",
|
|
36
|
+
"@tomradex/items": "0.16.0",
|
|
37
|
+
"@tomradex/settings": "0.16.0",
|
|
38
38
|
"cordis": "4.0.0-rc.8",
|
|
39
39
|
"zod": "^4.4.3"
|
|
40
40
|
}
|