@mycadet/cli 0.13.0-dev.202611140319.cca5491 → 0.13.0-dev.202611141723.98995ee

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Model IDs Cadet allows through the ChatGPT Codex subscription endpoint
3
+ * (`https://chatgpt.com/backend-api/codex`).
4
+ *
5
+ * `oauth_subscription` OpenAI connections hard-route every request to that
6
+ * endpoint. Because unsupported model IDs return HTTP 400, this manually
7
+ * maintained compatibility allowlist gates whether such a connection may
8
+ * serve a given model during auto-resolution of an "Any active OpenAI
9
+ * connection" profile.
10
+ *
11
+ * Lives in the @mycadet/assistant-api package so the web client imports
12
+ * the same set the daemon enforces — one source, no drift.
13
+ */
14
+ export const CODEX_SUBSCRIPTION_MODEL_IDS: ReadonlySet<string> = new Set([
15
+ "gpt-6-astra",
16
+ "gpt-6-sol",
17
+ "gpt-6-luna",
18
+ "gpt-5.6-sol",
19
+ "gpt-5.6-terra",
20
+ "gpt-5.6-luna",
21
+ "gpt-5.5",
22
+ ]);
@@ -154,6 +154,7 @@ export {
154
154
  CALL_SITE_COMPACTION_AGENT,
155
155
  CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE,
156
156
  } from "./constants/call-sites.js";
157
+ export { CODEX_SUBSCRIPTION_MODEL_IDS } from "./constants/codex-models.js";
157
158
  export {
158
159
  DOCUMENT_EDIT_TOOL_NAMES,
159
160
  DOCUMENT_MUTATION_TOOL_NAMES,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/service-contracts",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/avatar-manifest",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/ipc-server-utils",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/avatar-manifest",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/ipc-server-utils",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/service-contracts",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/shared",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "exports": {
6
6
  ".": "./index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/local-mode",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -510,7 +510,7 @@ export async function fetchCurrentUser(token: string): Promise<PlatformUser> {
510
510
  throw new Error("Invalid or expired token. Please login again.");
511
511
  }
512
512
  throw new Error(
513
- `Platform API error: ${response.status} ${response.statusText}`,
513
+ `Cloud API error: ${response.status} ${response.statusText}`,
514
514
  );
515
515
  }
516
516
 
@@ -99,7 +99,7 @@ export async function hatchCloud(): Promise<HatchCloudResult> {
99
99
  status: response.status,
100
100
  error:
101
101
  errorBody.detail ??
102
- `Platform API error: ${response.status} ${response.statusText}`,
102
+ `Cloud API error: ${response.status} ${response.statusText}`,
103
103
  };
104
104
  } catch (error) {
105
105
  return {
@@ -1,6 +1,5 @@
1
1
  import { execFileSync, spawn, spawnSync, execSync } from "node:child_process";
2
2
  import type { ChildProcess } from "node:child_process";
3
- import { createHash } from "node:crypto";
4
3
  import {
5
4
  chmodSync,
6
5
  existsSync,
@@ -13,7 +12,7 @@ import {
13
12
  } from "node:fs";
14
13
  import { createRequire } from "node:module";
15
14
  import { Socket } from "node:net";
16
- import { homedir, platform, tmpdir } from "node:os";
15
+ import { homedir, platform } from "node:os";
17
16
  import { delimiter, dirname, isAbsolute, join, resolve } from "node:path";
18
17
 
19
18
  import {
@@ -46,12 +45,6 @@ import { getDaemonPidPath, getLocalInstanceDir } from "./instance";
46
45
 
47
46
  const _require = createRequire(import.meta.url);
48
47
 
49
- // macOS AF_UNIX path limit (sun_path is 104 bytes, null-terminated → 103 usable).
50
- const DARWIN_UNIX_SOCKET_MAX_PATH_BYTES = 103;
51
-
52
- // The longest socket filename we place in the workspace directory.
53
- // assistant.sock = 14 chars, plus 1 for the "/" separator = 15 overhead.
54
- const LONGEST_SOCKET_FILENAME = "assistant.sock";
55
48
  const LOCAL_RUNTIME_PACKAGE = "cadet";
56
49
  const PATH_DELIMITER = pathListDelimiter(platform());
57
50
  const DEFAULT_EXECUTABLE_PATH =
@@ -288,46 +281,32 @@ export function ensureLocalRuntime(
288
281
  }
289
282
 
290
283
  /**
291
- * On macOS, if `{workspaceDir}/assistant.sock` would exceed the
292
- * 103-byte AF_UNIX path limit, compute a short tmpdir-based IPC socket
293
- * directory and return it. Returns `undefined` when no override is needed
294
- * (the workspace path is short enough, or we're not on macOS).
295
- */
296
- function computeIpcSocketDirOverride(workspaceDir: string): string | undefined {
297
- if (platform() !== "darwin") return undefined;
298
-
299
- const longestPath = join(workspaceDir, LONGEST_SOCKET_FILENAME);
300
- if (
301
- Buffer.byteLength(longestPath, "utf8") <= DARWIN_UNIX_SOCKET_MAX_PATH_BYTES
302
- ) {
303
- return undefined;
304
- }
305
-
306
- // Use a short hash of the workspace dir so multiple instances get
307
- // distinct socket directories under /tmp.
308
- const hash = createHash("sha256")
309
- .update(workspaceDir)
310
- .digest("hex")
311
- .slice(0, 12);
312
- return join(tmpdir(), `cadet-ipc-${hash}`);
313
- }
314
-
315
- /**
316
- * If the workspace path is too long for AF_UNIX sockets on macOS, compute
317
- * a short override directory and set all IPC socket env vars on the target
318
- * env object. No-op on non-macOS or when paths are within limits.
284
+ * Pin the gateway IPC socket directory to a short, per-instance path —
285
+ * matching the docker topology, which mounts `GATEWAY_IPC_SOCKET_DIR`
286
+ * (`/run/gateway-ipc`) on both the assistant and gateway containers.
287
+ *
288
+ * Local assistants previously resolved `gateway.sock` from the workspace
289
+ * path and only pinned an override dir when that path exceeded macOS's
290
+ * 103-byte AF_UNIX cap, so the resolved path drifted between processes
291
+ * (and from the docker convention). Always pinning
292
+ * `<instanceDir>/ipc/gateway.sock` in BOTH the assistant and gateway envs
293
+ * keeps the two sides in exact agreement and far under the socket path
294
+ * limit.
319
295
  */
320
296
  function applyIpcSocketDirOverride(
321
297
  env: Record<string, string | undefined>,
322
298
  ): void {
323
299
  const workspaceDir =
324
300
  env.CADET_WORKSPACE_DIR || join(resolveDataDir(), "workspace");
325
- const override = computeIpcSocketDirOverride(workspaceDir);
326
- if (!override) return;
327
-
328
- mkdirSync(override, { recursive: true });
301
+ const instanceDir = dirname(workspaceDir);
302
+ const override = join(instanceDir, "ipc");
303
+ try {
304
+ mkdirSync(override, { recursive: true });
305
+ } catch {
306
+ // Fall through: the gateway/assistant envs still carry the pinned dir;
307
+ // the socket bind error surfaces at startup if the dir is unwritable.
308
+ }
329
309
  env.GATEWAY_IPC_SOCKET_DIR = override;
330
- env.ASSISTANT_IPC_SOCKET_DIR = override;
331
310
  }
332
311
 
333
312
  function isAssistantSourceDir(dir: string): boolean {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/service-contracts",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/shared",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "private": true,
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mycadet/cli",
3
- "version": "0.13.0-dev.202611140319.cca5491",
3
+ "version": "0.13.0-dev.202611141723.98995ee",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/vargasjr-dev/mycadet-temp.git"