@dreamlake/dreamlake-cli 0.114.0 → 0.115.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.
@@ -674,6 +674,7 @@ export declare function createApi(transport: Transport): {
674
674
  visibility?: string;
675
675
  provider?: import("./sessions.js").Provider;
676
676
  claudeConfigDir?: string;
677
+ codexHome?: string;
677
678
  }) => Promise<unknown>;
678
679
  get: (id: string) => Promise<unknown>;
679
680
  metadata: (id: string, input: Record<string, unknown>) => Promise<unknown>;
@@ -1961,6 +1962,7 @@ export declare function createClient(options: ClientOptions): {
1961
1962
  visibility?: string;
1962
1963
  provider?: import("./sessions.js").Provider;
1963
1964
  claudeConfigDir?: string;
1965
+ codexHome?: string;
1964
1966
  }) => Promise<unknown>;
1965
1967
  get: (id: string) => Promise<unknown>;
1966
1968
  metadata: (id: string, input: Record<string, unknown>) => Promise<unknown>;
@@ -178,6 +178,8 @@ export interface Session {
178
178
  provider: Provider | "dreamlake-agent";
179
179
  cwd: string;
180
180
  codexSessionId: string;
181
+ /** Canonical absolute Codex state root on the enrolled host. Absent/null keeps legacy binding. */
182
+ codexHome?: string | null;
181
183
  vendorSessionId?: string;
182
184
  runState: RunState;
183
185
  runStateObservedAt: string | null;
@@ -532,6 +534,8 @@ export declare function terminalApi(t: Transport, namespace: string): {
532
534
  visibility?: string;
533
535
  provider?: Provider;
534
536
  claudeConfigDir?: string;
537
+ /** Codex only: canonical absolute root owned by the enrolled Unix user; requires API support. */
538
+ codexHome?: string;
535
539
  }) => Promise<unknown>;
536
540
  get: (id: string) => Promise<unknown>;
537
541
  metadata: (id: string, input: Record<string, unknown>) => Promise<unknown>;
@@ -1,6 +1,7 @@
1
1
  export interface SessionInput {
2
2
  provider?: 'codex' | 'claude';
3
3
  claudeConfigDir?: string;
4
+ codexHome?: string;
4
5
  targetId: string;
5
6
  enrollmentId: string;
6
7
  cwd: string;
@@ -25,6 +26,7 @@ export interface TerminalSession extends SessionInput {
25
26
  launch: {
26
27
  kind: 'codex' | 'claude';
27
28
  claudeConfigDir?: string;
29
+ codexHome?: string;
28
30
  cwd: string;
29
31
  codexSessionId: string;
30
32
  enrollmentId: string;
@@ -10,6 +10,12 @@ export function sessionPath(namespace, id) {
10
10
  export function validateSessionInput(input) {
11
11
  if (input.provider !== undefined && !['codex', 'claude'].includes(input.provider))
12
12
  throw new Error('--provider must be codex or claude');
13
+ // This is a remote path: do not resolve it against the CLI user's filesystem or environment.
14
+ if (input.codexHome !== undefined && ((input.provider ?? 'codex') !== 'codex' || typeof input.codexHome !== 'string' ||
15
+ !input.codexHome.startsWith('/') || Buffer.byteLength(input.codexHome) > 4096 || /[\x00-\x1f\x7f]/.test(input.codexHome) ||
16
+ (input.codexHome !== '/' && input.codexHome.slice(1).split('/').some(part => !part || part === '.' || part === '..')))) {
17
+ throw new Error('codexHome requires Codex and a canonical absolute target-host path');
18
+ }
13
19
  if (input.claudeConfigDir !== undefined && (input.provider !== 'claude' || typeof input.claudeConfigDir !== 'string' || !input.claudeConfigDir.startsWith('/') || Buffer.byteLength(input.claudeConfigDir) > 4096 || /[\x00-\x1f\x7f]/.test(input.claudeConfigDir)))
14
20
  throw new Error('--claude-config-dir requires Claude and an absolute path');
15
21
  if (!/^[A-Za-z0-9_-]{1,128}$/.test(input.targetId))
@@ -79,10 +85,12 @@ export function readSession(value) {
79
85
  if (!value || !validId(value.id) || !validId(value.enrollmentId) || typeof value.targetId !== 'string' ||
80
86
  typeof value.name !== 'string' || typeof value.username !== 'string' || typeof value.machineId !== 'string' ||
81
87
  typeof value.cwd !== 'string' || typeof value.codexSessionId !== 'string' || typeof value.tmuxSession !== 'string' ||
82
- value.launch?.kind !== (value.provider ?? 'codex') || (value.launch?.claudeConfigDir ?? null) !== (value.claudeConfigDir ?? null) || value.launch.cwd !== value.cwd || value.launch.codexSessionId !== value.codexSessionId || value.launch.enrollmentId !== value.enrollmentId) {
88
+ value.launch?.kind !== (value.provider ?? 'codex') || (value.launch?.claudeConfigDir ?? null) !== (value.claudeConfigDir ?? null) ||
89
+ value.launch?.codexHome === null || (value.launch?.codexHome ?? null) !== (value.codexHome ?? null) ||
90
+ value.launch.cwd !== value.cwd || value.launch.codexSessionId !== value.codexSessionId || value.launch.enrollmentId !== value.enrollmentId) {
83
91
  throw new Error('Terminal API returned an invalid session descriptor');
84
92
  }
85
- validateSessionInput({ ...value, ...(value.claudeConfigDir === null ? { claudeConfigDir: undefined } : {}) });
93
+ validateSessionInput({ ...value, ...(value.claudeConfigDir === null ? { claudeConfigDir: undefined } : {}), ...(value.codexHome === null ? { codexHome: undefined } : {}) });
86
94
  // Do not forward unknown launch fields into an execution request.
87
- return { ...value, launch: { kind: value.provider ?? 'codex', ...(value.claudeConfigDir === undefined || value.claudeConfigDir === null ? {} : { claudeConfigDir: value.claudeConfigDir }), cwd: value.cwd, codexSessionId: value.codexSessionId, enrollmentId: value.enrollmentId } };
95
+ return { ...value, launch: { kind: value.provider ?? 'codex', ...(value.claudeConfigDir === undefined || value.claudeConfigDir === null ? {} : { claudeConfigDir: value.claudeConfigDir }), ...(value.codexHome === undefined || value.codexHome === null ? {} : { codexHome: value.codexHome }), cwd: value.cwd, codexSessionId: value.codexSessionId, enrollmentId: value.enrollmentId } };
88
96
  }
@@ -1 +1 @@
1
- export declare const VERSION = "0.114.0";
1
+ export declare const VERSION = "0.115.0";
@@ -6,4 +6,4 @@
6
6
  // value means a binary that re-installs the same version forever.
7
7
  //
8
8
  // Editing this by hand does nothing for a release; bump package.json.
9
- export const VERSION = "0.114.0";
9
+ export const VERSION = "0.115.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dreamlake-cli",
3
- "version": "0.114.0",
3
+ "version": "0.115.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
@@ -37,13 +37,13 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "optionalDependencies": {
40
- "@dreamlake/dreamlake-cli-darwin-arm64": "0.114.0",
41
- "@dreamlake/dreamlake-cli-darwin-x64": "0.114.0",
42
- "@dreamlake/dreamlake-cli-linux-x64": "0.114.0",
43
- "@dreamlake/dreamlake-cli-linux-arm64": "0.114.0",
44
- "@dreamlake/dreamlake-cli-linux-x64-musl": "0.114.0",
45
- "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.114.0",
46
- "@dreamlake/dreamlake-cli-win32-x64": "0.114.0",
47
- "@dreamlake/dreamlake-cli-win32-arm64": "0.114.0"
40
+ "@dreamlake/dreamlake-cli-darwin-arm64": "0.115.0",
41
+ "@dreamlake/dreamlake-cli-darwin-x64": "0.115.0",
42
+ "@dreamlake/dreamlake-cli-linux-x64": "0.115.0",
43
+ "@dreamlake/dreamlake-cli-linux-arm64": "0.115.0",
44
+ "@dreamlake/dreamlake-cli-linux-x64-musl": "0.115.0",
45
+ "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.115.0",
46
+ "@dreamlake/dreamlake-cli-win32-x64": "0.115.0",
47
+ "@dreamlake/dreamlake-cli-win32-arm64": "0.115.0"
48
48
  }
49
49
  }