@schoolai/shipyard 3.9.1 → 3.10.0-rc.20260609.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.
Files changed (61) hide show
  1. package/dist/{auth-UF3MLB77.js → auth-GGM253LQ.js} +3 -3
  2. package/dist/capability-detector-worker.js +9 -9
  3. package/dist/{chunk-LBTLMT5Z.js → chunk-2EQOL57Z.js} +2 -2
  4. package/dist/{chunk-CVMNGYPR.js → chunk-3WEEGJJN.js} +2 -2
  5. package/dist/{chunk-DGX2QR6G.js → chunk-4PBXNWJV.js} +26 -3
  6. package/dist/chunk-4PBXNWJV.js.map +1 -0
  7. package/dist/{chunk-K3QG7S6V.js → chunk-4THTCNVI.js} +4 -4
  8. package/dist/{chunk-K3QG7S6V.js.map → chunk-4THTCNVI.js.map} +1 -1
  9. package/dist/{chunk-7OD3UJUP.js → chunk-6LINHACK.js} +29 -9
  10. package/dist/chunk-6LINHACK.js.map +1 -0
  11. package/dist/{chunk-APVDHUPT.js → chunk-AEUTFH76.js} +28 -4
  12. package/dist/chunk-AEUTFH76.js.map +1 -0
  13. package/dist/{chunk-7AB4NH6T.js → chunk-EI4HMJ54.js} +75 -30
  14. package/dist/chunk-EI4HMJ54.js.map +1 -0
  15. package/dist/{chunk-WYP4NTFE.js → chunk-GM6MH4CD.js} +2 -2
  16. package/dist/{chunk-G7W4GFUC.js → chunk-IJHF4OM4.js} +2 -2
  17. package/dist/{chunk-2I5XDMUD.js → chunk-KRX7OJER.js} +5 -5
  18. package/dist/{chunk-3SXIJEPM.js → chunk-QJP7JCIS.js} +31 -13
  19. package/dist/chunk-QJP7JCIS.js.map +1 -0
  20. package/dist/{chunk-MCDZOOAI.js → chunk-RW2OTTUA.js} +50 -15
  21. package/dist/chunk-RW2OTTUA.js.map +1 -0
  22. package/dist/{chunk-AVF7LE7Q.js → chunk-VKCGK333.js} +192 -25
  23. package/dist/chunk-VKCGK333.js.map +1 -0
  24. package/dist/{chunk-MLEGFDFW.js → chunk-Z37T5W6S.js} +13 -2
  25. package/dist/chunk-Z37T5W6S.js.map +1 -0
  26. package/dist/cursor-runner.js +4 -4
  27. package/dist/electron-utility.js +5 -5
  28. package/dist/{git-repo-723BKZIH.js → git-repo-QNGPCJLI.js} +6 -4
  29. package/dist/index.js +8 -8
  30. package/dist/{logger-KICM6IPJ.js → logger-2F3CBS3V.js} +7 -5
  31. package/dist/{login-OKFUEGZW.js → login-NZKH63H7.js} +7 -7
  32. package/dist/{logout-5RGCOHCI.js → logout-HY3MPOY5.js} +5 -5
  33. package/dist/{mcp-servers-CAUI2K5W.js → mcp-servers-ICHOWXZB.js} +4 -4
  34. package/dist/{roi-Q3BQLIO7.js → roi-YM5OOWHG.js} +3 -3
  35. package/dist/{serve-76X367VD.js → serve-HVLR5UQ7.js} +64218 -62733
  36. package/dist/{serve-76X367VD.js.map → serve-HVLR5UQ7.js.map} +1 -1
  37. package/dist/{skills-YEZJMAPT.js → skills-W2Y6TWHA.js} +2 -2
  38. package/dist/{start-QOGAKRUP.js → start-YA4H2XFQ.js} +11 -10
  39. package/dist/{start-QOGAKRUP.js.map → start-YA4H2XFQ.js.map} +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-3SXIJEPM.js.map +0 -1
  42. package/dist/chunk-7AB4NH6T.js.map +0 -1
  43. package/dist/chunk-7OD3UJUP.js.map +0 -1
  44. package/dist/chunk-APVDHUPT.js.map +0 -1
  45. package/dist/chunk-AVF7LE7Q.js.map +0 -1
  46. package/dist/chunk-DGX2QR6G.js.map +0 -1
  47. package/dist/chunk-MCDZOOAI.js.map +0 -1
  48. package/dist/chunk-MLEGFDFW.js.map +0 -1
  49. /package/dist/{auth-UF3MLB77.js.map → auth-GGM253LQ.js.map} +0 -0
  50. /package/dist/{chunk-LBTLMT5Z.js.map → chunk-2EQOL57Z.js.map} +0 -0
  51. /package/dist/{chunk-CVMNGYPR.js.map → chunk-3WEEGJJN.js.map} +0 -0
  52. /package/dist/{chunk-WYP4NTFE.js.map → chunk-GM6MH4CD.js.map} +0 -0
  53. /package/dist/{chunk-G7W4GFUC.js.map → chunk-IJHF4OM4.js.map} +0 -0
  54. /package/dist/{chunk-2I5XDMUD.js.map → chunk-KRX7OJER.js.map} +0 -0
  55. /package/dist/{git-repo-723BKZIH.js.map → git-repo-QNGPCJLI.js.map} +0 -0
  56. /package/dist/{logger-KICM6IPJ.js.map → logger-2F3CBS3V.js.map} +0 -0
  57. /package/dist/{login-OKFUEGZW.js.map → login-NZKH63H7.js.map} +0 -0
  58. /package/dist/{logout-5RGCOHCI.js.map → logout-HY3MPOY5.js.map} +0 -0
  59. /package/dist/{mcp-servers-CAUI2K5W.js.map → mcp-servers-ICHOWXZB.js.map} +0 -0
  60. /package/dist/{roi-Q3BQLIO7.js.map → roi-YM5OOWHG.js.map} +0 -0
  61. /package/dist/{skills-YEZJMAPT.js.map → skills-W2Y6TWHA.js.map} +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  run,
11
11
  runWithTimeout,
12
12
  truncateDiff
13
- } from "./chunk-7OD3UJUP.js";
13
+ } from "./chunk-6LINHACK.js";
14
14
  import {
15
15
  gitExecSafe
16
16
  } from "./chunk-4T2OQAVL.js";
@@ -19,13 +19,13 @@ import {
19
19
  CODEX_RUNTIME_ID,
20
20
  CURSOR_RUNTIME_ID,
21
21
  detectMCPServers
22
- } from "./chunk-MCDZOOAI.js";
22
+ } from "./chunk-RW2OTTUA.js";
23
23
  import {
24
24
  isEnoent
25
25
  } from "./chunk-RR6V6SNM.js";
26
26
  import {
27
27
  detectSkills
28
- } from "./chunk-LBTLMT5Z.js";
28
+ } from "./chunk-2EQOL57Z.js";
29
29
  import {
30
30
  createOneShotPool
31
31
  } from "./chunk-ZFKJAYAN.js";
@@ -48,21 +48,21 @@ import {
48
48
  isImageMimeType,
49
49
  toRecord,
50
50
  toSdkContent
51
- } from "./chunk-AVF7LE7Q.js";
51
+ } from "./chunk-VKCGK333.js";
52
52
  import {
53
53
  AnthropicAuthStatusSchema,
54
54
  CodexAuthStatusSchema,
55
55
  CursorAuthStatusSchema,
56
56
  PermissionModeSchema
57
- } from "./chunk-DGX2QR6G.js";
57
+ } from "./chunk-4PBXNWJV.js";
58
58
  import {
59
59
  logger
60
- } from "./chunk-3SXIJEPM.js";
60
+ } from "./chunk-QJP7JCIS.js";
61
61
  import {
62
62
  getShipyardHome,
63
63
  resolveNodeExecPath,
64
64
  validateEnv
65
- } from "./chunk-MLEGFDFW.js";
65
+ } from "./chunk-Z37T5W6S.js";
66
66
  import {
67
67
  external_exports
68
68
  } from "./chunk-CNR7O5YH.js";
@@ -79,16 +79,18 @@ function codexAuthFilePath() {
79
79
  function isPlainObject(value) {
80
80
  return typeof value === "object" && value !== null && !Array.isArray(value);
81
81
  }
82
+ function isCodexTokens(value) {
83
+ if (!isPlainObject(value)) return false;
84
+ if (value.access_token !== void 0 && typeof value.access_token !== "string") return false;
85
+ if (value.id_token !== void 0 && typeof value.id_token !== "string") return false;
86
+ return value.account_id === void 0 || value.account_id === null || typeof value.account_id === "string";
87
+ }
82
88
  function isCodexAuthFile(value) {
83
89
  if (!isPlainObject(value)) return false;
84
90
  if (value.OPENAI_API_KEY !== void 0 && value.OPENAI_API_KEY !== null && typeof value.OPENAI_API_KEY !== "string")
85
91
  return false;
86
92
  const tokens = value.tokens;
87
- if (tokens !== void 0 && tokens !== null) {
88
- if (!isPlainObject(tokens)) return false;
89
- if (tokens.access_token !== void 0 && typeof tokens.access_token !== "string") return false;
90
- if (tokens.id_token !== void 0 && typeof tokens.id_token !== "string") return false;
91
- }
93
+ if (tokens !== void 0 && tokens !== null && !isCodexTokens(tokens)) return false;
92
94
  return true;
93
95
  }
94
96
  function parseIdTokenClaims(idToken) {
@@ -115,16 +117,29 @@ function classifyJwtFreshness(token, nowSeconds, nowOffsetSeconds = 60) {
115
117
  if (exp <= nowSeconds + nowOffsetSeconds) return "expired";
116
118
  return "fresh";
117
119
  }
118
- function extractIdentity(claims) {
120
+ function readNamespacedClaim(claims, namespace, field2) {
121
+ const ns = claims[namespace];
122
+ return isPlainObject(ns) ? ns[field2] : void 0;
123
+ }
124
+ function extractIdentity(claims, fileAccountId) {
119
125
  const result = {};
120
- const emailCandidates = [claims.chatgpt_account_email, claims.email];
126
+ const emailCandidates = [
127
+ claims.chatgpt_account_email,
128
+ claims.email,
129
+ readNamespacedClaim(claims, "https://api.openai.com/profile", "email")
130
+ ];
121
131
  for (const c of emailCandidates) {
122
132
  if (typeof c === "string" && c.length > 0) {
123
133
  result.email = c;
124
134
  break;
125
135
  }
126
136
  }
127
- const accountCandidates = [claims.account_id, claims.chatgpt_account_id];
137
+ const accountCandidates = [
138
+ fileAccountId,
139
+ readNamespacedClaim(claims, "https://api.openai.com/auth", "chatgpt_account_id"),
140
+ claims.account_id,
141
+ claims.chatgpt_account_id
142
+ ];
128
143
  for (const c of accountCandidates) {
129
144
  if (typeof c === "string" && c.length > 0) {
130
145
  result.accountId = c;
@@ -170,14 +185,10 @@ function detectChatgpt(file, nowSeconds) {
170
185
  method: "chatgpt"
171
186
  };
172
187
  const idToken = file.tokens?.id_token;
173
- if (idToken && idToken.length > 0) {
174
- const claims = parseIdTokenClaims(idToken);
175
- if (claims) {
176
- const identity = extractIdentity(claims);
177
- if (identity.email) auth.email = identity.email;
178
- if (identity.accountId) auth.accountId = identity.accountId;
179
- }
180
- }
188
+ const claims = idToken && idToken.length > 0 ? parseIdTokenClaims(idToken) : null;
189
+ const identity = extractIdentity(claims ?? {}, file.tokens?.account_id);
190
+ if (identity.email) auth.email = identity.email;
191
+ if (identity.accountId) auth.accountId = identity.accountId;
181
192
  return { kind: "detected", auth };
182
193
  }
183
194
  function detectApiKey() {
@@ -305,6 +316,7 @@ function decideCodexAuthRefresh(result, lastKnown) {
305
316
 
306
317
  // src/shared/observability/bootstrap-phase.ts
307
318
  var metricsSink = null;
319
+ var breadcrumbSink = null;
308
320
  var accumulator = [];
309
321
  var inFlightPhases = /* @__PURE__ */ new Set();
310
322
  var startupBootStart = performance.now();
@@ -312,6 +324,9 @@ var startupCompleteEmitted = false;
312
324
  function setBootstrapPhaseMetricsSink(sink) {
313
325
  metricsSink = sink;
314
326
  }
327
+ function setBootstrapPhaseBreadcrumbSink(sink) {
328
+ breadcrumbSink = sink;
329
+ }
315
330
  function logInFlightPhasesAsKilled() {
316
331
  const now = performance.now();
317
332
  const snapshot = [...inFlightPhases];
@@ -338,6 +353,7 @@ async function bootstrapPhase(name, fn) {
338
353
  const tracker = { name, start };
339
354
  inFlightPhases.add(tracker);
340
355
  safeLog("info", { event: "bootstrap_phase_start", phase: name });
356
+ safeRecordBreadcrumb(name);
341
357
  try {
342
358
  const result = await fn();
343
359
  if (!inFlightPhases.delete(tracker)) return result;
@@ -389,6 +405,13 @@ function emitStartupComplete() {
389
405
  phases: accumulator
390
406
  });
391
407
  }
408
+ function getCurrentBootPhase() {
409
+ let latest;
410
+ for (const phase of inFlightPhases) latest = phase;
411
+ if (latest) return latest.name;
412
+ const last = accumulator.at(-1);
413
+ return last ? last.name : "unknown";
414
+ }
392
415
  function safeLog(level, obj) {
393
416
  try {
394
417
  if (level === "info") logger.info(obj);
@@ -404,6 +427,14 @@ function safeEmit(eventType, payload) {
404
427
  } catch {
405
428
  }
406
429
  }
430
+ function safeRecordBreadcrumb(phase) {
431
+ const sink = breadcrumbSink;
432
+ if (!sink) return;
433
+ try {
434
+ sink(phase);
435
+ } catch {
436
+ }
437
+ }
407
438
 
408
439
  // src/shared/capabilities/effort-probe.ts
409
440
  import { existsSync as existsSync2 } from "fs";
@@ -1076,8 +1107,9 @@ function classifyStreamEvent(message) {
1076
1107
  }
1077
1108
  function convertAssistantBlock(block, parentToolUseId) {
1078
1109
  if (!isRecord(block)) return null;
1110
+ const parentField = parentToolUseId != null ? { parentToolUseId } : {};
1079
1111
  if (block.type === "text") {
1080
- return typeof block.text === "string" ? { type: "text", text: block.text } : null;
1112
+ return typeof block.text === "string" ? { type: "text", text: block.text, ...parentField } : null;
1081
1113
  }
1082
1114
  if (block.type === "tool_use") {
1083
1115
  if (typeof block.id !== "string" || typeof block.name !== "string") return null;
@@ -1090,10 +1122,10 @@ function convertAssistantBlock(block, parentToolUseId) {
1090
1122
  };
1091
1123
  }
1092
1124
  if (block.type === "thinking") {
1093
- return typeof block.thinking === "string" && block.thinking.length > 0 ? { type: "thinking", text: block.thinking } : null;
1125
+ return typeof block.thinking === "string" && block.thinking.length > 0 ? { type: "thinking", text: block.thinking, ...parentField } : null;
1094
1126
  }
1095
1127
  if (block.type === "redacted_thinking") {
1096
- return { type: "thinking", text: REDACTED_THINKING_PLACEHOLDER };
1128
+ return { type: "thinking", text: REDACTED_THINKING_PLACEHOLDER, ...parentField };
1097
1129
  }
1098
1130
  return null;
1099
1131
  }
@@ -1105,6 +1137,10 @@ function convertAssistantContent(content, parentToolUseId) {
1105
1137
  }
1106
1138
  return blocks;
1107
1139
  }
1140
+ function skipForMainChannel(content) {
1141
+ if (content.length === 0) return true;
1142
+ return content.every((b) => "parentToolUseId" in b && b.parentToolUseId != null);
1143
+ }
1108
1144
  function flattenRawToolResultContent(content) {
1109
1145
  if (typeof content === "string") return content;
1110
1146
  if (!Array.isArray(content)) return "";
@@ -3122,7 +3158,7 @@ var CODEX_MODEL_CATALOG = withCapabilityTiers([
3122
3158
 
3123
3159
  // src/services/session/profiles/codex-profile.ts
3124
3160
  var execFileAsync = promisify(execFile);
3125
- var CODEX_BUNDLED_VERSION = "0.135.0";
3161
+ var CODEX_BUNDLED_VERSION = "0.138.0";
3126
3162
  function codexPermissionModeMap(mode) {
3127
3163
  switch (mode) {
3128
3164
  case "default":
@@ -6344,6 +6380,10 @@ async function detectModels(lastKnown) {
6344
6380
  }
6345
6381
  return models;
6346
6382
  }
6383
+ var PICKER_HIDDEN_MODEL_IDS = /* @__PURE__ */ new Set(["gpt-5.3-codex"]);
6384
+ function pickerVisibleModels(models) {
6385
+ return models.filter((model) => !PICKER_HIDDEN_MODEL_IDS.has(model.id));
6386
+ }
6347
6387
  var INTENSITY_ORDER = [
6348
6388
  "low",
6349
6389
  "medium",
@@ -6380,7 +6420,9 @@ function toModelInfo(profile, model, efforts = model.supportedEfforts) {
6380
6420
  };
6381
6421
  }
6382
6422
  function buildCatalogModelInfos() {
6383
- return profileRegistry.list().flatMap((profile) => profile.models.map((model) => toModelInfo(profile, model)));
6423
+ return profileRegistry.list().flatMap(
6424
+ (profile) => pickerVisibleModels(profile.models).map((model) => toModelInfo(profile, model))
6425
+ );
6384
6426
  }
6385
6427
  async function collectProfileModels(profile) {
6386
6428
  let binaryPath = null;
@@ -6407,7 +6449,7 @@ async function collectProfileModels(profile) {
6407
6449
  return probed.has(e);
6408
6450
  });
6409
6451
  };
6410
- return profile.models.map(
6452
+ return pickerVisibleModels(profile.models).map(
6411
6453
  (model) => toModelInfo(profile, model, filterEfforts(model.supportedEfforts))
6412
6454
  );
6413
6455
  }
@@ -7982,8 +8024,10 @@ export {
7982
8024
  detectCodexAuth,
7983
8025
  REFRESH_DEBOUNCE_MS,
7984
8026
  setBootstrapPhaseMetricsSink,
8027
+ setBootstrapPhaseBreadcrumbSink,
7985
8028
  bootstrapPhase,
7986
8029
  emitStartupComplete,
8030
+ getCurrentBootPhase,
7987
8031
  resolveClaudeBinaryPath,
7988
8032
  getSupportedEfforts,
7989
8033
  getSupportedEffortsSync,
@@ -7995,6 +8039,7 @@ export {
7995
8039
  REDACTED_THINKING_PLACEHOLDER,
7996
8040
  classifyMessage,
7997
8041
  convertAssistantContent,
8042
+ skipForMainChannel,
7998
8043
  extractToolResults,
7999
8044
  convertUserContent,
8000
8045
  estimateCodexCost,
@@ -8090,4 +8135,4 @@ export {
8090
8135
  refreshInstalledAgents,
8091
8136
  refreshCodexAuthSlice
8092
8137
  };
8093
- //# sourceMappingURL=chunk-7AB4NH6T.js.map
8138
+ //# sourceMappingURL=chunk-EI4HMJ54.js.map