@tomradex/code-sessions 0.16.0 → 0.16.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/drop.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /** A path as Terminal.app types a dropped file: a backslash before blanks and the shell's special characters. */
2
+ export declare function shellEscape(file: string): string;
3
+ /**
4
+ * What a drop of files types into a terminal: their paths, escaped, one space apart and one after,
5
+ * as a bracketed paste (herdr drops the markers for a program that did not ask for them). Null when
6
+ * no file had a path on disk.
7
+ */
8
+ export declare function droppedPaste(paths: readonly string[]): string | null;
9
+ /**
10
+ * Whether a dropped file sits in the temp folder's TemporaryItems, where macOS keeps what is dragged out of a
11
+ * screenshot's thumbnail: only the app it was dropped on may read it there, not the programs in its terminals.
12
+ */
13
+ export declare const heldForDrop: (file: string, tmp?: string) => boolean;
14
+ /**
15
+ * The dropped paths as a terminal's programs can read them: each file held for Tomrade alone is copied, under
16
+ * its own name, into a new folder in `into`; one that cannot be copied keeps its own path.
17
+ */
18
+ export declare function readableDrops(paths: readonly string[], into: string, tmp?: string): Promise<string[]>;
19
+ //# sourceMappingURL=drop.d.ts.map
@@ -13,6 +13,18 @@ export interface SessionRow {
13
13
  activity: string | null;
14
14
  mode: "run" | "terminal";
15
15
  agent: string;
16
+ /** The agent's own name (Claude Code, Codex…), for a session with no ticket to go by; null when Tomrade does not know it. */
17
+ agentName: string | null;
18
+ /** What the agent herdr sees in the session's pane calls the conversation; null without one, or when a terminal row speaks for it. */
19
+ agentTitle: string | null;
20
+ /** What the conversation was called, kept after it ended: the agent's title, its pane's, or its first prompt. */
21
+ conversation: string | null;
22
+ /** The folder the agent ran in, as its hooks said. */
23
+ cwd: string | null;
24
+ /** Someone spoke to it. */
25
+ prompted: boolean;
26
+ /** Its agent can take it up again by its id in a new terminal. */
27
+ resumable: boolean;
16
28
  /** The herdr pane it runs in, on this machine; null when it has no terminal here. */
17
29
  pane: string | null;
18
30
  /** Where its terminal is: a herdr pane here, another terminal app here, another computer, or Tomrade running it. */
@@ -38,6 +50,8 @@ export interface TerminalRow {
38
50
  startedAt: number;
39
51
  /** What the agent herdr sees in it calls the conversation; null without one. */
40
52
  agentTitle: string | null;
53
+ /** With no agent in it: what runs in its foreground when that is not the shell, else the title its shell set. */
54
+ running: string | null;
41
55
  /** The code session its agent claimed a ticket for: the cell shows that session, on the same pane. */
42
56
  sessionId: string | null;
43
57
  /** Why it stays a plain terminal although an agent claimed a ticket, when Tomrade cannot tell which terminal that was. */
@@ -124,10 +138,18 @@ export type WindowMessage = {
124
138
  rows: number;
125
139
  }
126
140
  /** The window names the new terminal's id, so its cell shows it before herdr has opened it. */
141
+ /** The ended session a cell shows: its conversation, read from its agent's own record. */
142
+ | {
143
+ type: "conversation";
144
+ cell: string;
145
+ sessionId: string;
146
+ }
147
+ /** `resume`: a conversation's session, taken up again in the new terminal by its agent. */
127
148
  | {
128
149
  type: "newTerminal";
129
150
  terminalId: string;
130
151
  cwd: string | null;
152
+ resume?: string;
131
153
  } | {
132
154
  type: "closeTerminal";
133
155
  terminalId: string;
@@ -168,6 +190,12 @@ export type WindowMessage = {
168
190
  type: "input";
169
191
  cell: string;
170
192
  data: string;
193
+ }
194
+ /** Files dropped onto a cell's terminal, by their paths on disk: typed into it as a paste. */
195
+ | {
196
+ type: "drop";
197
+ cell: string;
198
+ paths: string[];
171
199
  } | {
172
200
  type: "resize";
173
201
  cell: string;
@@ -234,6 +262,23 @@ export type WindowPost = {
234
262
  | {
235
263
  type: "reattach";
236
264
  cell: string;
265
+ }
266
+ /** A session's conversation, read-only; `lines` null when its agent's record cannot be read. */
267
+ | {
268
+ type: "conversation";
269
+ cell: string;
270
+ sessionId: string;
271
+ lines: {
272
+ who: "person" | "agent" | "tool";
273
+ text: string;
274
+ }[] | null;
275
+ cut: boolean;
276
+ }
277
+ /** The pane the cell asked for streams in `other` already: one pane, one cell. */
278
+ | {
279
+ type: "shownIn";
280
+ cell: string;
281
+ other: string;
237
282
  } | {
238
283
  type: "toast";
239
284
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/code-sessions",
3
- "version": "0.16.0",
3
+ "version": "0.16.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.16.0",
31
- "@tomradex/contributions": "0.16.0",
32
- "@tomradex/db": "0.16.0",
33
- "@tomradex/desktop-surface": "0.16.0",
30
+ "@tomradex/code-link": "0.16.1",
31
+ "@tomradex/contributions": "0.16.1",
32
+ "@tomradex/db": "0.16.1",
33
+ "@tomradex/desktop-surface": "0.16.1",
34
34
  "@tomradex/domain": "0.2.18",
35
- "@tomradex/herdr": "0.16.0",
36
- "@tomradex/items": "0.16.0",
37
- "@tomradex/settings": "0.16.0",
35
+ "@tomradex/herdr": "0.16.1",
36
+ "@tomradex/items": "0.16.1",
37
+ "@tomradex/settings": "0.16.1",
38
38
  "cordis": "4.0.0-rc.8",
39
39
  "zod": "^4.4.3"
40
40
  }