impel-cli 0.18.15-beta.5 → 0.18.15-beta.6
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/package.json +1 -1
- package/src/apps.js +34 -4
package/package.json
CHANGED
package/src/apps.js
CHANGED
|
@@ -257,7 +257,10 @@ export function managedAppIdentity(target, tenantId = null, tenantName = null) {
|
|
|
257
257
|
// and the tenant manifest so unsupported hosts keep Chat and Code usable.
|
|
258
258
|
// 25: remove the unproven Windows Cowork capability gate from beta.0 profiles
|
|
259
259
|
// and restore the reviewed always-enabled managed policy.
|
|
260
|
-
|
|
260
|
+
// 26: remember the managed provider defaults and move legacy GPT-5.5 profiles
|
|
261
|
+
// onto GPT-5.6 Sol so ChatGPT's compact Work picker does not fall back to its
|
|
262
|
+
// unsupported-selection "Reset to default" treatment.
|
|
263
|
+
export const CURRENT_CONFIG_VERSION = 26;
|
|
261
264
|
|
|
262
265
|
// Identifies the bundle-BUILDING logic — the asar patches, plist rewrites,
|
|
263
266
|
// helper rebranding, and signing. A vendored bundle is rebuilt only when this
|
|
@@ -756,6 +759,7 @@ export function installManagedAppFiles({
|
|
|
756
759
|
target,
|
|
757
760
|
vendorPaths[target] || findVendorApp(target, homeDir),
|
|
758
761
|
]));
|
|
762
|
+
const previousManifest = readTenantManifest(homeDir, config.tenantId);
|
|
759
763
|
const vendorCodexModels = targets.includes("chatgpt")
|
|
760
764
|
? readVendorCodexModels(resolvedVendorPaths.chatgpt)
|
|
761
765
|
: new Map();
|
|
@@ -806,6 +810,7 @@ export function installManagedAppFiles({
|
|
|
806
810
|
vendorCodexModels,
|
|
807
811
|
chatgptInvocations,
|
|
808
812
|
generatedAt,
|
|
813
|
+
previousManifest,
|
|
809
814
|
);
|
|
810
815
|
if (RUNTIME_BRAND.features.sessions) ensureCodexSessionHooks(paths.chatgpt.codexHome, config.tenantId, "codex_desktop");
|
|
811
816
|
}
|
|
@@ -817,7 +822,7 @@ export function installManagedAppFiles({
|
|
|
817
822
|
}
|
|
818
823
|
|
|
819
824
|
writeAtomic(path.join(paths.tenantRoot, "manifest.json"), JSON.stringify({
|
|
820
|
-
schemaVersion:
|
|
825
|
+
schemaVersion: 7,
|
|
821
826
|
configVersion: CURRENT_CONFIG_VERSION,
|
|
822
827
|
modelCatalogVersion: 3,
|
|
823
828
|
gatewayUrl: config.gatewayUrl,
|
|
@@ -830,6 +835,10 @@ export function installManagedAppFiles({
|
|
|
830
835
|
models,
|
|
831
836
|
config,
|
|
832
837
|
),
|
|
838
|
+
modelDefaults: {
|
|
839
|
+
claude: models.find((model) => model.provider === "claude" && model.default)?.id ?? null,
|
|
840
|
+
chatgpt: models.find((model) => model.provider === "codex" && model.default)?.id ?? null,
|
|
841
|
+
},
|
|
833
842
|
models: models.map((model) => model.id),
|
|
834
843
|
updatedAt: generatedAt,
|
|
835
844
|
}, null, 2) + "\n", 0o600);
|
|
@@ -1163,6 +1172,7 @@ function writeChatGPTConfig(
|
|
|
1163
1172
|
vendorCodexModels,
|
|
1164
1173
|
invocations = null,
|
|
1165
1174
|
generatedAt = new Date().toISOString(),
|
|
1175
|
+
previousManifest = null,
|
|
1166
1176
|
) {
|
|
1167
1177
|
const experimental = crossAppModelsEnabled(config);
|
|
1168
1178
|
const orderedModels = experimental
|
|
@@ -1178,8 +1188,28 @@ function writeChatGPTConfig(
|
|
|
1178
1188
|
const currentToml = fs.existsSync(configPath) ? fs.readFileSync(configPath, "utf8") : "";
|
|
1179
1189
|
const configuredModel = readTopLevelTomlString(currentToml, "model");
|
|
1180
1190
|
const defaultModelID = orderedModels.find((model) => model.provider === "codex" && model.default)?.id;
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1191
|
+
const defaultModel = codexModels.find((model) => model.slug === defaultModelID);
|
|
1192
|
+
const previousDefaultModelID = previousManifest?.modelDefaults?.chatgpt;
|
|
1193
|
+
const followsPreviousManagedDefault = (
|
|
1194
|
+
typeof previousDefaultModelID === "string"
|
|
1195
|
+
&& configuredModel === previousDefaultModelID
|
|
1196
|
+
&& configuredModel !== defaultModelID
|
|
1197
|
+
);
|
|
1198
|
+
// Profiles written before the default-model field existed cannot distinguish
|
|
1199
|
+
// an old managed default from an explicit user choice. GPT-5.5 is the one
|
|
1200
|
+
// observed legacy default that ChatGPT 26.727 renders as an unsupported
|
|
1201
|
+
// compact-picker selection; migrate it once, while preserving every other
|
|
1202
|
+
// explicit model choice.
|
|
1203
|
+
const hasLegacyCompactPickerDefault = (
|
|
1204
|
+
previousDefaultModelID == null
|
|
1205
|
+
&& Number(previousManifest?.configVersion ?? 0) < CURRENT_CONFIG_VERSION
|
|
1206
|
+
&& configuredModel === "gpt-5.5"
|
|
1207
|
+
&& defaultModelID === "gpt-5.6-sol"
|
|
1208
|
+
);
|
|
1209
|
+
const selectedModel = (followsPreviousManagedDefault || hasLegacyCompactPickerDefault
|
|
1210
|
+
? defaultModel
|
|
1211
|
+
: codexModels.find((model) => model.slug === configuredModel))
|
|
1212
|
+
|| defaultModel
|
|
1183
1213
|
|| codexModels[0];
|
|
1184
1214
|
if (!selectedModel) throw new Error("no Codex models are available for Impel ChatGPT");
|
|
1185
1215
|
const configuredEffort = readTopLevelTomlString(currentToml, "model_reasoning_effort");
|