@tomradex/code-sessions 0.14.0 → 0.15.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 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;
@@ -108,6 +108,11 @@ export type WindowMessage = {
108
108
  } | {
109
109
  type: "closeTerminal";
110
110
  terminalId: string;
111
+ }
112
+ /** Where herdr cannot show a terminal here: open one in the system terminal, in this folder. */
113
+ | {
114
+ type: "openOutside";
115
+ cwd: string | null;
111
116
  } | {
112
117
  type: "savePreset";
113
118
  name: string;
package/dist/words.d.ts CHANGED
@@ -17,5 +17,7 @@ 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}}";
20
22
  }>;
21
23
  //# sourceMappingURL=words.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/code-sessions",
3
- "version": "0.14.0",
3
+ "version": "0.15.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.14.0",
31
- "@tomradex/contributions": "0.14.0",
32
- "@tomradex/db": "0.14.0",
33
- "@tomradex/desktop-surface": "0.14.0",
34
- "@tomradex/domain": "0.2.16",
35
- "@tomradex/herdr": "0.14.0",
36
- "@tomradex/items": "0.14.0",
37
- "@tomradex/settings": "0.14.0",
30
+ "@tomradex/code-link": "0.15.0",
31
+ "@tomradex/contributions": "0.15.0",
32
+ "@tomradex/db": "0.15.0",
33
+ "@tomradex/desktop-surface": "0.15.0",
34
+ "@tomradex/domain": "0.2.18",
35
+ "@tomradex/herdr": "0.15.0",
36
+ "@tomradex/items": "0.15.0",
37
+ "@tomradex/settings": "0.15.0",
38
38
  "cordis": "4.0.0-rc.8",
39
39
  "zod": "^4.4.3"
40
40
  }