@schoolai/shipyard 3.10.0-rc.20260609.0 → 3.10.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/capability-detector-worker.js +2 -2
- package/dist/{chunk-Q2HUVPOL.js → chunk-EI4HMJ54.js} +39 -22
- package/dist/chunk-EI4HMJ54.js.map +1 -0
- package/dist/{chunk-WMOR5Q6C.js → chunk-VKCGK333.js} +12 -3
- package/dist/chunk-VKCGK333.js.map +1 -0
- package/dist/cursor-runner.js +1 -1
- package/dist/electron-utility.js +1 -1
- package/dist/index.js +2 -2
- package/dist/{serve-FJT6POBH.js → serve-HVLR5UQ7.js} +10 -12
- package/dist/{serve-FJT6POBH.js.map → serve-HVLR5UQ7.js.map} +1 -1
- package/dist/{start-MD62XHS6.js → start-YA4H2XFQ.js} +2 -2
- package/package.json +2 -2
- package/dist/chunk-Q2HUVPOL.js.map +0 -1
- package/dist/chunk-WMOR5Q6C.js.map +0 -1
- /package/dist/{start-MD62XHS6.js.map → start-YA4H2XFQ.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
detectCapabilities,
|
|
4
4
|
refreshMcpServers,
|
|
5
5
|
registerBuiltInProfiles
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EI4HMJ54.js";
|
|
7
7
|
import "./chunk-GM6MH4CD.js";
|
|
8
8
|
import {
|
|
9
9
|
getRepoMetadata
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-RR6V6SNM.js";
|
|
16
16
|
import "./chunk-2EQOL57Z.js";
|
|
17
17
|
import "./chunk-ZFKJAYAN.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-VKCGK333.js";
|
|
19
19
|
import "./chunk-4PBXNWJV.js";
|
|
20
20
|
import "./chunk-EHQITHQX.js";
|
|
21
21
|
import "./chunk-X3MULCV5.js";
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
isImageMimeType,
|
|
49
49
|
toRecord,
|
|
50
50
|
toSdkContent
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-VKCGK333.js";
|
|
52
52
|
import {
|
|
53
53
|
AnthropicAuthStatusSchema,
|
|
54
54
|
CodexAuthStatusSchema,
|
|
@@ -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
|
|
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 = [
|
|
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 = [
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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() {
|
|
@@ -1096,8 +1107,9 @@ function classifyStreamEvent(message) {
|
|
|
1096
1107
|
}
|
|
1097
1108
|
function convertAssistantBlock(block, parentToolUseId) {
|
|
1098
1109
|
if (!isRecord(block)) return null;
|
|
1110
|
+
const parentField = parentToolUseId != null ? { parentToolUseId } : {};
|
|
1099
1111
|
if (block.type === "text") {
|
|
1100
|
-
return typeof block.text === "string" ? { type: "text", text: block.text } : null;
|
|
1112
|
+
return typeof block.text === "string" ? { type: "text", text: block.text, ...parentField } : null;
|
|
1101
1113
|
}
|
|
1102
1114
|
if (block.type === "tool_use") {
|
|
1103
1115
|
if (typeof block.id !== "string" || typeof block.name !== "string") return null;
|
|
@@ -1110,10 +1122,10 @@ function convertAssistantBlock(block, parentToolUseId) {
|
|
|
1110
1122
|
};
|
|
1111
1123
|
}
|
|
1112
1124
|
if (block.type === "thinking") {
|
|
1113
|
-
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;
|
|
1114
1126
|
}
|
|
1115
1127
|
if (block.type === "redacted_thinking") {
|
|
1116
|
-
return { type: "thinking", text: REDACTED_THINKING_PLACEHOLDER };
|
|
1128
|
+
return { type: "thinking", text: REDACTED_THINKING_PLACEHOLDER, ...parentField };
|
|
1117
1129
|
}
|
|
1118
1130
|
return null;
|
|
1119
1131
|
}
|
|
@@ -1125,6 +1137,10 @@ function convertAssistantContent(content, parentToolUseId) {
|
|
|
1125
1137
|
}
|
|
1126
1138
|
return blocks;
|
|
1127
1139
|
}
|
|
1140
|
+
function skipForMainChannel(content) {
|
|
1141
|
+
if (content.length === 0) return true;
|
|
1142
|
+
return content.every((b) => "parentToolUseId" in b && b.parentToolUseId != null);
|
|
1143
|
+
}
|
|
1128
1144
|
function flattenRawToolResultContent(content) {
|
|
1129
1145
|
if (typeof content === "string") return content;
|
|
1130
1146
|
if (!Array.isArray(content)) return "";
|
|
@@ -3142,7 +3158,7 @@ var CODEX_MODEL_CATALOG = withCapabilityTiers([
|
|
|
3142
3158
|
|
|
3143
3159
|
// src/services/session/profiles/codex-profile.ts
|
|
3144
3160
|
var execFileAsync = promisify(execFile);
|
|
3145
|
-
var CODEX_BUNDLED_VERSION = "0.
|
|
3161
|
+
var CODEX_BUNDLED_VERSION = "0.138.0";
|
|
3146
3162
|
function codexPermissionModeMap(mode) {
|
|
3147
3163
|
switch (mode) {
|
|
3148
3164
|
case "default":
|
|
@@ -8023,6 +8039,7 @@ export {
|
|
|
8023
8039
|
REDACTED_THINKING_PLACEHOLDER,
|
|
8024
8040
|
classifyMessage,
|
|
8025
8041
|
convertAssistantContent,
|
|
8042
|
+
skipForMainChannel,
|
|
8026
8043
|
extractToolResults,
|
|
8027
8044
|
convertUserContent,
|
|
8028
8045
|
estimateCodexCost,
|
|
@@ -8118,4 +8135,4 @@ export {
|
|
|
8118
8135
|
refreshInstalledAgents,
|
|
8119
8136
|
refreshCodexAuthSlice
|
|
8120
8137
|
};
|
|
8121
|
-
//# sourceMappingURL=chunk-
|
|
8138
|
+
//# sourceMappingURL=chunk-EI4HMJ54.js.map
|