@schoolai/shipyard 3.14.0 → 3.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.
Files changed (37) hide show
  1. package/dist/capability-detector-worker.js +5 -5
  2. package/dist/{chunk-OX3UY44R.js → chunk-5PBWS7BB.js} +31 -42
  3. package/dist/chunk-5PBWS7BB.js.map +1 -0
  4. package/dist/{chunk-RCEAMZVG.js → chunk-6SK6FBYC.js} +2 -2
  5. package/dist/{chunk-M3WBYTB3.js → chunk-AXHG3QQA.js} +16 -1
  6. package/dist/chunk-AXHG3QQA.js.map +1 -0
  7. package/dist/{chunk-T3OTZ66B.js → chunk-B7WZUKYX.js} +219 -86
  8. package/dist/chunk-B7WZUKYX.js.map +1 -0
  9. package/dist/{chunk-BUAEJNUG.js → chunk-HPDRJ4VZ.js} +3 -3
  10. package/dist/{chunk-BUAEJNUG.js.map → chunk-HPDRJ4VZ.js.map} +1 -1
  11. package/dist/{chunk-WGS7ZW6N.js → chunk-L5FQEZ6Y.js} +3 -3
  12. package/dist/{chunk-KUPHN3ZN.js → chunk-RHHRJR3L.js} +2 -2
  13. package/dist/{chunk-3KE2VDKA.js → chunk-VKY7UXTP.js} +25 -3
  14. package/dist/chunk-VKY7UXTP.js.map +1 -0
  15. package/dist/{chunk-IWBDVGD2.js → chunk-VTALUCDB.js} +2 -2
  16. package/dist/cursor-runner.js +3 -3
  17. package/dist/electron-utility.js +2 -2
  18. package/dist/index.js +4 -4
  19. package/dist/{login-HRR3T4SZ.js → login-EYGYOEXL.js} +3 -3
  20. package/dist/{mcp-servers-GUA5WOHO.js → mcp-servers-DSOX243C.js} +8 -2
  21. package/dist/{plan-backfill-QNJUWOYP.js → plan-backfill-SMJEKTMM.js} +4 -4
  22. package/dist/{serve-25I4ML7R.js → serve-DAP6V7SY.js} +339 -147
  23. package/dist/{serve-25I4ML7R.js.map → serve-DAP6V7SY.js.map} +1 -1
  24. package/dist/{start-O2DXLW23.js → start-AX2ZK3AY.js} +6 -6
  25. package/package.json +1 -1
  26. package/dist/chunk-3KE2VDKA.js.map +0 -1
  27. package/dist/chunk-M3WBYTB3.js.map +0 -1
  28. package/dist/chunk-OX3UY44R.js.map +0 -1
  29. package/dist/chunk-T3OTZ66B.js.map +0 -1
  30. /package/dist/{chunk-RCEAMZVG.js.map → chunk-6SK6FBYC.js.map} +0 -0
  31. /package/dist/{chunk-WGS7ZW6N.js.map → chunk-L5FQEZ6Y.js.map} +0 -0
  32. /package/dist/{chunk-KUPHN3ZN.js.map → chunk-RHHRJR3L.js.map} +0 -0
  33. /package/dist/{chunk-IWBDVGD2.js.map → chunk-VTALUCDB.js.map} +0 -0
  34. /package/dist/{login-HRR3T4SZ.js.map → login-EYGYOEXL.js.map} +0 -0
  35. /package/dist/{mcp-servers-GUA5WOHO.js.map → mcp-servers-DSOX243C.js.map} +0 -0
  36. /package/dist/{plan-backfill-QNJUWOYP.js.map → plan-backfill-SMJEKTMM.js.map} +0 -0
  37. /package/dist/{start-O2DXLW23.js.map → start-AX2ZK3AY.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  detectCapabilities,
4
4
  refreshMcpServers,
5
5
  registerBuiltInProfiles
6
- } from "./chunk-OX3UY44R.js";
6
+ } from "./chunk-5PBWS7BB.js";
7
7
  import "./chunk-TUQTEWK3.js";
8
8
  import {
9
9
  getRepoMetadata
@@ -11,13 +11,13 @@ import {
11
11
  import "./chunk-4T2OQAVL.js";
12
12
  import {
13
13
  MCPTokenStore
14
- } from "./chunk-T3OTZ66B.js";
14
+ } from "./chunk-B7WZUKYX.js";
15
15
  import "./chunk-RR6V6SNM.js";
16
16
  import "./chunk-4MRKRVIQ.js";
17
17
  import "./chunk-ZFKJAYAN.js";
18
- import "./chunk-RCEAMZVG.js";
19
- import "./chunk-IWBDVGD2.js";
20
- import "./chunk-M3WBYTB3.js";
18
+ import "./chunk-6SK6FBYC.js";
19
+ import "./chunk-VTALUCDB.js";
20
+ import "./chunk-AXHG3QQA.js";
21
21
  import "./chunk-EHQITHQX.js";
22
22
  import "./chunk-X3MULCV5.js";
23
23
  import {
@@ -19,7 +19,7 @@ import {
19
19
  CODEX_RUNTIME_ID,
20
20
  CURSOR_RUNTIME_ID,
21
21
  detectMCPServers
22
- } from "./chunk-T3OTZ66B.js";
22
+ } from "./chunk-B7WZUKYX.js";
23
23
  import {
24
24
  isEnoent
25
25
  } from "./chunk-RR6V6SNM.js";
@@ -38,7 +38,7 @@ import {
38
38
  formatTaskFeedback,
39
39
  toRecord,
40
40
  toSdkContent
41
- } from "./chunk-RCEAMZVG.js";
41
+ } from "./chunk-6SK6FBYC.js";
42
42
  import {
43
43
  AGENT_IDS,
44
44
  AGENT_SYSTEM_CLAUDE_CODE,
@@ -50,13 +50,14 @@ import {
50
50
  REASONING_EFFORTS,
51
51
  inflateToolResultContent,
52
52
  isImageMimeType
53
- } from "./chunk-IWBDVGD2.js";
53
+ } from "./chunk-VTALUCDB.js";
54
54
  import {
55
55
  AnthropicAuthStatusSchema,
56
56
  CodexAuthStatusSchema,
57
57
  CursorAuthStatusSchema,
58
- PermissionModeSchema
59
- } from "./chunk-M3WBYTB3.js";
58
+ PermissionModeSchema,
59
+ TESTED_CODEX_VERSION
60
+ } from "./chunk-AXHG3QQA.js";
60
61
  import {
61
62
  logger
62
63
  } from "./chunk-X53VIV2J.js";
@@ -663,9 +664,18 @@ function resolveEnvMethod(env) {
663
664
  async function detectAnthropicAuth(methodHint) {
664
665
  const envResult = detectFromEnvVars();
665
666
  if (envResult) return { kind: "detected", auth: envResult };
667
+ const claudeBinary = resolveClaudeBinaryPath(
668
+ (entry) => logger.warn(entry, "Failed to resolve Claude binary during auth detection")
669
+ );
670
+ if (!claudeBinary) return { kind: "preserved", reason: "spawn-error" };
666
671
  let stdout;
667
672
  try {
668
- stdout = await run("claude", ["auth", "status", "--json"], void 0, AUTH_STATUS_TIMEOUT_MS);
673
+ stdout = await run(
674
+ claudeBinary,
675
+ ["auth", "status", "--json"],
676
+ void 0,
677
+ AUTH_STATUS_TIMEOUT_MS
678
+ );
669
679
  } catch (err) {
670
680
  const reason = classifyCliError(err);
671
681
  logger.warn(
@@ -965,7 +975,7 @@ function classifyUserMessage(message) {
965
975
  }
966
976
  function parseTaskNotificationXml(content) {
967
977
  const text = typeof content === "string" ? content : null;
968
- if (!text || !text.startsWith("<task-notification>")) return null;
978
+ if (!text?.startsWith("<task-notification>")) return null;
969
979
  const taskId = extractXmlTag(text, "task-id");
970
980
  const result = extractXmlTag(text, "result");
971
981
  if (!taskId || !result) return null;
@@ -1922,10 +1932,7 @@ var claudeCodeProfile = {
1922
1932
  };
1923
1933
 
1924
1934
  // src/services/session/profiles/codex-profile.ts
1925
- import { execFile } from "child_process";
1926
1935
  import { createRequire as createRequire2 } from "module";
1927
- import { platform } from "os";
1928
- import { promisify } from "util";
1929
1936
 
1930
1937
  // src/services/billing/codex-cost-estimator.ts
1931
1938
  var HIGH_CONTEXT_THRESHOLD = 272e3;
@@ -3190,8 +3197,7 @@ var CODEX_MODEL_CATALOG = withCapabilityTiers([
3190
3197
  ]);
3191
3198
 
3192
3199
  // src/services/session/profiles/codex-profile.ts
3193
- var execFileAsync = promisify(execFile);
3194
- var CODEX_BUNDLED_VERSION = "0.138.0";
3200
+ var CODEX_BUNDLED_VERSION = TESTED_CODEX_VERSION;
3195
3201
  function codexPermissionModeMap(mode) {
3196
3202
  switch (mode) {
3197
3203
  case "default":
@@ -3214,15 +3220,6 @@ var lastKnownCodexBinary = null;
3214
3220
  function getCachedCodexBinaryPath() {
3215
3221
  return lastKnownCodexBinary;
3216
3222
  }
3217
- function isAuthoritativeNotFound(err) {
3218
- if (!(err instanceof Error)) return false;
3219
- if ("killed" in err && err.killed === true) return false;
3220
- if ("signal" in err && typeof err.signal === "string") return false;
3221
- if (!("code" in err)) return false;
3222
- const code = err.code;
3223
- if (typeof code === "string") return false;
3224
- return code === 1;
3225
- }
3226
3223
  function resolveBundledCodexBinary() {
3227
3224
  try {
3228
3225
  const req = createRequire2(import.meta.url);
@@ -3231,7 +3228,7 @@ function resolveBundledCodexBinary() {
3231
3228
  } catch (err) {
3232
3229
  logger.debug(
3233
3230
  { err, codexBundledVersion: CODEX_BUNDLED_VERSION },
3234
- "codex_bundled_binary_resolve_failed_falling_back_to_path"
3231
+ "codex_bundled_binary_resolve_failed"
3235
3232
  );
3236
3233
  return null;
3237
3234
  }
@@ -3242,20 +3239,8 @@ async function resolveCodexBinary() {
3242
3239
  lastKnownCodexBinary = bundled;
3243
3240
  return bundled;
3244
3241
  }
3245
- const lookup = platform() === "win32" ? "where" : "which";
3246
- try {
3247
- const { stdout } = await execFileAsync(lookup, ["codex"]);
3248
- const first = stdout.split(/\r?\n/).find((line) => line.trim().length > 0);
3249
- const resolved = first ? first.trim() : null;
3250
- lastKnownCodexBinary = resolved;
3251
- return resolved;
3252
- } catch (err) {
3253
- if (isAuthoritativeNotFound(err)) {
3254
- lastKnownCodexBinary = null;
3255
- return null;
3256
- }
3257
- return lastKnownCodexBinary;
3258
- }
3242
+ lastKnownCodexBinary = null;
3243
+ return null;
3259
3244
  }
3260
3245
  function isRecord3(v) {
3261
3246
  return typeof v === "object" && v !== null;
@@ -3338,7 +3323,10 @@ async function resolveCodexAuthCredentials(methodId) {
3338
3323
  };
3339
3324
  }
3340
3325
  async function triggerCodexLogin(methodId) {
3341
- const binary = await resolveCodexBinary() ?? "codex";
3326
+ const binary = await resolveCodexBinary();
3327
+ if (binary === null) {
3328
+ throw new Error("Codex binary not resolved");
3329
+ }
3342
3330
  return {
3343
3331
  binary,
3344
3332
  argv: ["login", methodId]
@@ -5751,7 +5739,7 @@ function persistSessionVersionCache(cache) {
5751
5739
  );
5752
5740
  });
5753
5741
  }
5754
- function isAuthoritativeNotFound2(err) {
5742
+ function isAuthoritativeNotFound(err) {
5755
5743
  if (!(err instanceof Error)) return false;
5756
5744
  if ("killed" in err && err.killed === true) return false;
5757
5745
  if ("signal" in err && typeof err.signal === "string") return false;
@@ -5854,7 +5842,7 @@ async function probeClaudeUncached(lastKnown) {
5854
5842
  try {
5855
5843
  binaryPath = (await run(whichCmd, ["claude"])).split(/\r?\n/)[0]?.trim() ?? "";
5856
5844
  } catch (err) {
5857
- if (isAuthoritativeNotFound2(err)) {
5845
+ if (isAuthoritativeNotFound(err)) {
5858
5846
  logger.warn({ err }, "Claude Code CLI not found");
5859
5847
  return { binaryPath: null, binaryMtimeMs: null, version: void 0 };
5860
5848
  }
@@ -5992,7 +5980,7 @@ async function detectCommands(environments) {
5992
5980
 
5993
5981
  // src/shared/capabilities/common-dirs.ts
5994
5982
  import { access } from "fs/promises";
5995
- import { homedir as homedir5, platform as platform2 } from "os";
5983
+ import { homedir as homedir5, platform } from "os";
5996
5984
  import { join as join7 } from "path";
5997
5985
  var CANDIDATES = [
5998
5986
  { subdir: "Documents", label: "~/Documents" },
@@ -6024,7 +6012,7 @@ async function findCommonDirs(home, currentPlatform, fileExists) {
6024
6012
  }
6025
6013
  async function detectCommonDirs(deps = {}) {
6026
6014
  const getHomedir = deps.homedir ?? homedir5;
6027
- const getPlatform = deps.platform ?? platform2;
6015
+ const getPlatform = deps.platform ?? platform;
6028
6016
  const fileExists = deps.fileExists ?? defaultFileExists;
6029
6017
  return findCommonDirs(getHomedir(), getPlatform(), fileExists);
6030
6018
  }
@@ -8143,6 +8131,7 @@ export {
8143
8131
  translateErrorNotification,
8144
8132
  translateContextCompacted,
8145
8133
  translateCodexItem,
8134
+ CODEX_BUNDLED_VERSION,
8146
8135
  getCachedCodexBinaryPath,
8147
8136
  codexProfile,
8148
8137
  decideCursorAuthRefresh,
@@ -8218,4 +8207,4 @@ export {
8218
8207
  refreshInstalledAgents,
8219
8208
  refreshCodexAuthSlice
8220
8209
  };
8221
- //# sourceMappingURL=chunk-OX3UY44R.js.map
8210
+ //# sourceMappingURL=chunk-5PBWS7BB.js.map