@codexhost/cli-darwin-x64 0.8.0 → 0.9.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.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.txt +12 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +67 -26
- package/app/host-runtime.mjs +3774 -6483
- package/app/plugins/antigravity/plugin.mjs +114 -93
- package/app/plugins/claude-code/plugin.mjs +480 -239
- package/app/plugins/codebuddy/plugin.mjs +2177 -846
- package/app/plugins/cursor-cli/plugin.mjs +35065 -10156
- package/app/plugins/deepseek-harness/plugin.mjs +72 -84
- package/app/plugins/enabled.json +4 -1
- package/app/plugins/grok/plugin.mjs +60 -78
- package/app/plugins/hermes/plugin.mjs +2431 -174
- package/app/plugins/kiro-cli/plugin.mjs +67 -80
- package/app/plugins/omp/plugin.mjs +106 -91
- package/app/plugins/opencode/plugin.mjs +109 -123
- package/app/plugins/pi/plugin.mjs +71 -84
- package/app/plugins/qoder/assets/icon.svg +1 -0
- package/app/plugins/qoder/manifest.json +12 -0
- package/app/plugins/qoder/plugin.mjs +52267 -0
- package/app/plugins/qoder-cn/assets/icon.svg +1 -0
- package/app/plugins/qoder-cn/manifest.json +12 -0
- package/app/plugins/qoder-cn/plugin.mjs +52265 -0
- package/app/plugins/workbuddy/assets/icon.svg +29 -0
- package/app/plugins/workbuddy/manifest.json +14 -0
- package/app/plugins/workbuddy/plugin.mjs +24818 -0
- package/app/renderer-extension.js +3182 -960
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/licenses/Qoder-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/QoderCN-Agent-SDK-LICENSE.txt +7 -0
- package/licenses/tailwindcss-LICENSE.txt +21 -0
- package/package.json +1 -1
|
@@ -14526,6 +14526,46 @@ config(en_default());
|
|
|
14526
14526
|
// ../../shared-contracts/dist/version.js
|
|
14527
14527
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
14528
14528
|
|
|
14529
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
14530
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
14531
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
14532
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
14533
|
+
enabled: external_exports.boolean(),
|
|
14534
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
14535
|
+
});
|
|
14536
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
14537
|
+
enabled: false,
|
|
14538
|
+
timeoutMinutes: 30
|
|
14539
|
+
});
|
|
14540
|
+
|
|
14541
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
14542
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
14543
|
+
"idle",
|
|
14544
|
+
"running",
|
|
14545
|
+
"busy",
|
|
14546
|
+
"closing",
|
|
14547
|
+
"failed",
|
|
14548
|
+
"blocked"
|
|
14549
|
+
]);
|
|
14550
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
14551
|
+
"none",
|
|
14552
|
+
"disabled",
|
|
14553
|
+
"timeout",
|
|
14554
|
+
"operation",
|
|
14555
|
+
"background",
|
|
14556
|
+
"identity",
|
|
14557
|
+
"persistence",
|
|
14558
|
+
"closeFailed"
|
|
14559
|
+
]);
|
|
14560
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
14561
|
+
threadId: external_exports.string(),
|
|
14562
|
+
title: external_exports.string(),
|
|
14563
|
+
harnessId: external_exports.string(),
|
|
14564
|
+
state: loadedSessionStateSchema,
|
|
14565
|
+
reason: loadedSessionReasonSchema,
|
|
14566
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
14567
|
+
}));
|
|
14568
|
+
|
|
14529
14569
|
// ../../shared-contracts/dist/ids.js
|
|
14530
14570
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
14531
14571
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -15011,6 +15051,8 @@ var pluginPresentationShape = {
|
|
|
15011
15051
|
id: harnessPluginIdSchema,
|
|
15012
15052
|
name: external_exports.string().trim().min(1).max(128),
|
|
15013
15053
|
version: external_exports.string().min(1).max(128),
|
|
15054
|
+
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
15055
|
+
launchCommand: external_exports.literal(true).optional(),
|
|
15014
15056
|
links: external_exports.object({
|
|
15015
15057
|
documentation: documentationUrlSchema.optional(),
|
|
15016
15058
|
installation: documentationUrlSchema.optional()
|
|
@@ -15048,6 +15090,19 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15048
15090
|
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15049
15091
|
}).strict();
|
|
15050
15092
|
|
|
15093
|
+
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
15094
|
+
var harnessLaunchPathSchema = external_exports.string().trim().min(1).max(4096).refine((value) => !/[\u0000\r\n]/u.test(value), "Invalid entrypoint path");
|
|
15095
|
+
var harnessLaunchSettingsGetSchema = external_exports.object({
|
|
15096
|
+
harnessId: harnessPluginIdSchema
|
|
15097
|
+
}).strict();
|
|
15098
|
+
var harnessLaunchSettingsSetSchema = harnessLaunchSettingsGetSchema.extend({
|
|
15099
|
+
path: harnessLaunchPathSchema.nullable()
|
|
15100
|
+
});
|
|
15101
|
+
var harnessLaunchSettingsSchema = external_exports.object({
|
|
15102
|
+
path: harnessLaunchPathSchema.nullable(),
|
|
15103
|
+
restartRequired: external_exports.boolean()
|
|
15104
|
+
}).strict();
|
|
15105
|
+
|
|
15051
15106
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
15052
15107
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
15053
15108
|
var nonBlankTextSchema3 = external_exports.string().trim().min(1);
|
|
@@ -15076,75 +15131,15 @@ var codexAccountSchema = external_exports.object({
|
|
|
15076
15131
|
email: external_exports.string().email().max(320).optional(),
|
|
15077
15132
|
planType: codexAccountPlanTypeSchema.optional()
|
|
15078
15133
|
}).strict();
|
|
15079
|
-
var codexAccountPhaseSchema = external_exports.enum(["ready", "
|
|
15080
|
-
var codexAccountPendingOperationSchema = external_exports.object({
|
|
15081
|
-
operationId: nonBlankTextSchema3.max(1024),
|
|
15082
|
-
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
15083
|
-
}).strict();
|
|
15084
|
-
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
15085
|
-
manage: external_exports.boolean(),
|
|
15086
|
-
switch: external_exports.boolean(),
|
|
15087
|
-
login: external_exports.boolean(),
|
|
15088
|
-
delete: external_exports.boolean(),
|
|
15089
|
-
recover: external_exports.boolean().optional(),
|
|
15090
|
-
logout: external_exports.boolean().optional(),
|
|
15091
|
-
reason: external_exports.enum([
|
|
15092
|
-
"ssh-single-account",
|
|
15093
|
-
"unsupported-storage",
|
|
15094
|
-
"unsupported-version",
|
|
15095
|
-
"recovery-required",
|
|
15096
|
-
"keyring-unavailable",
|
|
15097
|
-
"migration-required"
|
|
15098
|
-
]).optional()
|
|
15099
|
-
}).strict();
|
|
15134
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15100
15135
|
var codexAccountListResultSchema = external_exports.object({
|
|
15101
15136
|
version: external_exports.literal(2),
|
|
15102
15137
|
currentAccountId: accountIdSchema.nullable(),
|
|
15103
15138
|
phase: codexAccountPhaseSchema,
|
|
15104
15139
|
revision: external_exports.number().int().nonnegative(),
|
|
15105
15140
|
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15106
|
-
|
|
15107
|
-
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
15108
|
-
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
15109
|
-
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
15110
|
-
capabilities: codexAccountCapabilitiesSchema,
|
|
15111
|
-
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
15112
|
-
}).strict();
|
|
15113
|
-
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15114
|
-
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15115
|
-
var codexAccountReadyMutationResultShape = {
|
|
15116
|
-
phase: external_exports.literal("ready"),
|
|
15117
|
-
revision: external_exports.number().int().nonnegative()
|
|
15118
|
-
};
|
|
15119
|
-
var codexAccountSwitchResultSchema = external_exports.object({
|
|
15120
|
-
currentAccountId: accountIdSchema,
|
|
15121
|
-
...codexAccountReadyMutationResultShape
|
|
15122
|
-
}).strict();
|
|
15123
|
-
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15124
|
-
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
15125
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
15126
|
-
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
15127
|
-
accountId: accountIdSchema,
|
|
15128
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15129
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15130
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15141
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15131
15142
|
}).strict();
|
|
15132
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15133
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15134
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15135
|
-
accountId: accountIdSchema,
|
|
15136
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15137
|
-
success: external_exports.boolean(),
|
|
15138
|
-
error: external_exports.string().max(4096).nullable(),
|
|
15139
|
-
saved: external_exports.boolean().optional(),
|
|
15140
|
-
cleanupRequired: external_exports.boolean().optional()
|
|
15141
|
-
}).strict();
|
|
15142
|
-
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
15143
|
-
var codexAccountLogoutResultSchema = external_exports.object({
|
|
15144
|
-
currentAccountId: external_exports.null(),
|
|
15145
|
-
...codexAccountReadyMutationResultShape
|
|
15146
|
-
}).strict();
|
|
15147
|
-
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
15148
15143
|
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15149
15144
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15150
15145
|
accountId: accountIdSchema,
|
|
@@ -15153,21 +15148,6 @@ var codexAccountUsageResultSchema = external_exports.object({
|
|
|
15153
15148
|
freshness: external_exports.enum(["live", "cached"]),
|
|
15154
15149
|
observedAt: external_exports.string().datetime().nullable()
|
|
15155
15150
|
}).strict();
|
|
15156
|
-
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
15157
|
-
accountId: accountIdSchema,
|
|
15158
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15159
|
-
}).strict();
|
|
15160
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15161
|
-
"reset",
|
|
15162
|
-
"nothingToReset",
|
|
15163
|
-
"noCredit",
|
|
15164
|
-
"alreadyRedeemed"
|
|
15165
|
-
]);
|
|
15166
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15167
|
-
accountId: accountIdSchema,
|
|
15168
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15169
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15170
|
-
}).strict();
|
|
15171
15151
|
|
|
15172
15152
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
15173
15153
|
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
@@ -21753,6 +21733,7 @@ var KiroTurnOutput = class {
|
|
|
21753
21733
|
const file2 = {
|
|
21754
21734
|
type: "fileChange",
|
|
21755
21735
|
itemId: hostItemIdSchema.parse(`file-${tool.item.itemId}`),
|
|
21736
|
+
sourceItemIds: [tool.item.itemId],
|
|
21756
21737
|
changes: changes ?? []
|
|
21757
21738
|
};
|
|
21758
21739
|
if (tool.file) {
|
|
@@ -22136,6 +22117,10 @@ async function readKiroSnapshot(location) {
|
|
|
22136
22117
|
const completedAtMs = Date.parse(end?.timestamp ?? "");
|
|
22137
22118
|
const hasTiming = Number.isFinite(startedAtMs) && Number.isFinite(completedAtMs) && startedAtMs >= 0 && completedAtMs >= startedAtMs;
|
|
22138
22119
|
const lastContent = turn.rows.findLast((row) => row.payload.type === "tool_call" || row.payload.type === "assistant" && kiroVisibleText(historyText(row.payload)).trim().length > 0 && !["Reasoning", "Summary"].includes(String(row.payload.operationType)));
|
|
22120
|
+
const toolSources = new Map(turn.rows.filter((row) => row.payload.type === "tool_call").map((row) => [
|
|
22121
|
+
row.payload.toolCallId,
|
|
22122
|
+
hostItemIdSchema.parse(`kiro-${nativeSessionId}-${row.id}`)
|
|
22123
|
+
]));
|
|
22139
22124
|
for (const row of turn.rows) {
|
|
22140
22125
|
const type = row.payload?.type;
|
|
22141
22126
|
const itemId = hostItemIdSchema.parse(`kiro-${nativeSessionId}-${row.id}`);
|
|
@@ -22186,10 +22171,12 @@ async function readKiroSnapshot(location) {
|
|
|
22186
22171
|
} else if (type === "tool_result") {
|
|
22187
22172
|
const changes = row.payload.success === true ? projectKiroFileChanges(row.payload.content, location.cwd) : null;
|
|
22188
22173
|
if (changes) {
|
|
22174
|
+
const sourceItemId = toolSources.get(row.payload.toolCallId);
|
|
22189
22175
|
items.push({
|
|
22190
22176
|
item: {
|
|
22191
22177
|
type: "fileChange",
|
|
22192
22178
|
itemId,
|
|
22179
|
+
sourceItemIds: sourceItemId ? [sourceItemId] : [],
|
|
22193
22180
|
changes
|
|
22194
22181
|
},
|
|
22195
22182
|
outcome: { status: "succeeded" }
|
|
@@ -23050,12 +23037,12 @@ var KiroSession = class {
|
|
|
23050
23037
|
return { ok: true, value: { accepted: true } };
|
|
23051
23038
|
}
|
|
23052
23039
|
async #selectModel(command) {
|
|
23053
|
-
if (this.#
|
|
23040
|
+
if (this.#configBusy) {
|
|
23054
23041
|
return {
|
|
23055
23042
|
ok: false,
|
|
23056
23043
|
error: {
|
|
23057
23044
|
code: "sessionBusy",
|
|
23058
|
-
message: "
|
|
23045
|
+
message: "Another configuration change is in progress",
|
|
23059
23046
|
retryable: false
|
|
23060
23047
|
}
|
|
23061
23048
|
};
|
|
@@ -23146,7 +23133,7 @@ var KiroSession = class {
|
|
|
23146
23133
|
});
|
|
23147
23134
|
}
|
|
23148
23135
|
async #selectThinking(command) {
|
|
23149
|
-
if (this.#
|
|
23136
|
+
if (this.#configBusy) {
|
|
23150
23137
|
return {
|
|
23151
23138
|
ok: false,
|
|
23152
23139
|
error: { code: "sessionBusy", message: "Session is busy", retryable: true }
|
|
@@ -15046,6 +15046,46 @@ config(en_default());
|
|
|
15046
15046
|
// ../../shared-contracts/dist/version.js
|
|
15047
15047
|
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
15048
15048
|
|
|
15049
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
15050
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
15051
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
15052
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
15053
|
+
enabled: external_exports.boolean(),
|
|
15054
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
15055
|
+
});
|
|
15056
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
15057
|
+
enabled: false,
|
|
15058
|
+
timeoutMinutes: 30
|
|
15059
|
+
});
|
|
15060
|
+
|
|
15061
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
15062
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
15063
|
+
"idle",
|
|
15064
|
+
"running",
|
|
15065
|
+
"busy",
|
|
15066
|
+
"closing",
|
|
15067
|
+
"failed",
|
|
15068
|
+
"blocked"
|
|
15069
|
+
]);
|
|
15070
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
15071
|
+
"none",
|
|
15072
|
+
"disabled",
|
|
15073
|
+
"timeout",
|
|
15074
|
+
"operation",
|
|
15075
|
+
"background",
|
|
15076
|
+
"identity",
|
|
15077
|
+
"persistence",
|
|
15078
|
+
"closeFailed"
|
|
15079
|
+
]);
|
|
15080
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
15081
|
+
threadId: external_exports.string(),
|
|
15082
|
+
title: external_exports.string(),
|
|
15083
|
+
harnessId: external_exports.string(),
|
|
15084
|
+
state: loadedSessionStateSchema,
|
|
15085
|
+
reason: loadedSessionReasonSchema,
|
|
15086
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
15087
|
+
}));
|
|
15088
|
+
|
|
15049
15089
|
// ../../shared-contracts/dist/ids.js
|
|
15050
15090
|
var opaqueIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
15051
15091
|
message: "Identifier must not be empty or whitespace"
|
|
@@ -15531,6 +15571,8 @@ var pluginPresentationShape = {
|
|
|
15531
15571
|
id: harnessPluginIdSchema,
|
|
15532
15572
|
name: external_exports.string().trim().min(1).max(128),
|
|
15533
15573
|
version: external_exports.string().min(1).max(128),
|
|
15574
|
+
/** The factory accepts a persisted local entrypoint through its construction context. */
|
|
15575
|
+
launchCommand: external_exports.literal(true).optional(),
|
|
15534
15576
|
links: external_exports.object({
|
|
15535
15577
|
documentation: documentationUrlSchema.optional(),
|
|
15536
15578
|
installation: documentationUrlSchema.optional()
|
|
@@ -15568,6 +15610,19 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15568
15610
|
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15569
15611
|
}).strict();
|
|
15570
15612
|
|
|
15613
|
+
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
15614
|
+
var harnessLaunchPathSchema = external_exports.string().trim().min(1).max(4096).refine((value) => !/[\u0000\r\n]/u.test(value), "Invalid entrypoint path");
|
|
15615
|
+
var harnessLaunchSettingsGetSchema = external_exports.object({
|
|
15616
|
+
harnessId: harnessPluginIdSchema
|
|
15617
|
+
}).strict();
|
|
15618
|
+
var harnessLaunchSettingsSetSchema = harnessLaunchSettingsGetSchema.extend({
|
|
15619
|
+
path: harnessLaunchPathSchema.nullable()
|
|
15620
|
+
});
|
|
15621
|
+
var harnessLaunchSettingsSchema = external_exports.object({
|
|
15622
|
+
path: harnessLaunchPathSchema.nullable(),
|
|
15623
|
+
restartRequired: external_exports.boolean()
|
|
15624
|
+
}).strict();
|
|
15625
|
+
|
|
15571
15626
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
15572
15627
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
15573
15628
|
var nonBlankTextSchema3 = external_exports.string().trim().min(1);
|
|
@@ -15596,75 +15651,15 @@ var codexAccountSchema = external_exports.object({
|
|
|
15596
15651
|
email: external_exports.string().email().max(320).optional(),
|
|
15597
15652
|
planType: codexAccountPlanTypeSchema.optional()
|
|
15598
15653
|
}).strict();
|
|
15599
|
-
var codexAccountPhaseSchema = external_exports.enum(["ready", "
|
|
15600
|
-
var codexAccountPendingOperationSchema = external_exports.object({
|
|
15601
|
-
operationId: nonBlankTextSchema3.max(1024),
|
|
15602
|
-
kind: external_exports.enum(["login", "switch", "logout", "recovery"])
|
|
15603
|
-
}).strict();
|
|
15604
|
-
var codexAccountCapabilitiesSchema = external_exports.object({
|
|
15605
|
-
manage: external_exports.boolean(),
|
|
15606
|
-
switch: external_exports.boolean(),
|
|
15607
|
-
login: external_exports.boolean(),
|
|
15608
|
-
delete: external_exports.boolean(),
|
|
15609
|
-
recover: external_exports.boolean().optional(),
|
|
15610
|
-
logout: external_exports.boolean().optional(),
|
|
15611
|
-
reason: external_exports.enum([
|
|
15612
|
-
"ssh-single-account",
|
|
15613
|
-
"unsupported-storage",
|
|
15614
|
-
"unsupported-version",
|
|
15615
|
-
"recovery-required",
|
|
15616
|
-
"keyring-unavailable",
|
|
15617
|
-
"migration-required"
|
|
15618
|
-
]).optional()
|
|
15619
|
-
}).strict();
|
|
15654
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
15620
15655
|
var codexAccountListResultSchema = external_exports.object({
|
|
15621
15656
|
version: external_exports.literal(2),
|
|
15622
15657
|
currentAccountId: accountIdSchema.nullable(),
|
|
15623
15658
|
phase: codexAccountPhaseSchema,
|
|
15624
15659
|
revision: external_exports.number().int().nonnegative(),
|
|
15625
15660
|
instanceId: nonBlankTextSchema3.max(1024).optional(),
|
|
15626
|
-
|
|
15627
|
-
/** Credentials were adopted; other native homes/history remain unmerged. */
|
|
15628
|
-
legacyHistoryPreserved: external_exports.boolean().optional(),
|
|
15629
|
-
pendingOperation: codexAccountPendingOperationSchema.optional(),
|
|
15630
|
-
capabilities: codexAccountCapabilitiesSchema,
|
|
15631
|
-
accounts: external_exports.array(codexAccountSchema).max(128)
|
|
15632
|
-
}).strict();
|
|
15633
|
-
var codexAccountActivateParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15634
|
-
var codexAccountSwitchParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15635
|
-
var codexAccountReadyMutationResultShape = {
|
|
15636
|
-
phase: external_exports.literal("ready"),
|
|
15637
|
-
revision: external_exports.number().int().nonnegative()
|
|
15638
|
-
};
|
|
15639
|
-
var codexAccountSwitchResultSchema = external_exports.object({
|
|
15640
|
-
currentAccountId: accountIdSchema,
|
|
15641
|
-
...codexAccountReadyMutationResultShape
|
|
15642
|
-
}).strict();
|
|
15643
|
-
var codexAccountDeleteParamsSchema = external_exports.object({ accountId: accountIdSchema }).strict();
|
|
15644
|
-
var codexAccountDeleteResultSchema = external_exports.object({ deletedAccountId: accountIdSchema }).strict();
|
|
15645
|
-
var codexAccountLoginStartParamsSchema = external_exports.object({ accountId: accountIdSchema.optional() }).strict();
|
|
15646
|
-
var codexAccountLoginStartResultSchema = external_exports.object({
|
|
15647
|
-
accountId: accountIdSchema,
|
|
15648
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15649
|
-
verificationUrl: external_exports.string().url().max(16384),
|
|
15650
|
-
userCode: nonBlankTextSchema3.max(1024)
|
|
15651
|
-
}).strict();
|
|
15652
|
-
var codexAccountLoginCancelParamsSchema = external_exports.object({ loginId: nonBlankTextSchema3.max(1024) }).strict();
|
|
15653
|
-
var codexAccountLoginCancelResultSchema = external_exports.object({ cancelled: external_exports.boolean() }).strict();
|
|
15654
|
-
var codexAccountLoginCompletedSchema = external_exports.object({
|
|
15655
|
-
accountId: accountIdSchema,
|
|
15656
|
-
loginId: nonBlankTextSchema3.max(1024),
|
|
15657
|
-
success: external_exports.boolean(),
|
|
15658
|
-
error: external_exports.string().max(4096).nullable(),
|
|
15659
|
-
saved: external_exports.boolean().optional(),
|
|
15660
|
-
cleanupRequired: external_exports.boolean().optional()
|
|
15661
|
-
}).strict();
|
|
15662
|
-
var codexAccountLogoutParamsSchema = external_exports.object({}).strict();
|
|
15663
|
-
var codexAccountLogoutResultSchema = external_exports.object({
|
|
15664
|
-
currentAccountId: external_exports.null(),
|
|
15665
|
-
...codexAccountReadyMutationResultShape
|
|
15661
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
15666
15662
|
}).strict();
|
|
15667
|
-
var codexAccountRecoverParamsSchema = external_exports.object({}).strict();
|
|
15668
15663
|
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
15669
15664
|
var codexAccountUsageResultSchema = external_exports.object({
|
|
15670
15665
|
accountId: accountIdSchema,
|
|
@@ -15673,21 +15668,6 @@ var codexAccountUsageResultSchema = external_exports.object({
|
|
|
15673
15668
|
freshness: external_exports.enum(["live", "cached"]),
|
|
15674
15669
|
observedAt: external_exports.string().datetime().nullable()
|
|
15675
15670
|
}).strict();
|
|
15676
|
-
var codexAccountResetCreditConsumeParamsSchema = external_exports.object({
|
|
15677
|
-
accountId: accountIdSchema,
|
|
15678
|
-
idempotencyKey: external_exports.string().uuid().optional()
|
|
15679
|
-
}).strict();
|
|
15680
|
-
var codexAccountResetCreditConsumeOutcomeSchema = external_exports.enum([
|
|
15681
|
-
"reset",
|
|
15682
|
-
"nothingToReset",
|
|
15683
|
-
"noCredit",
|
|
15684
|
-
"alreadyRedeemed"
|
|
15685
|
-
]);
|
|
15686
|
-
var codexAccountResetCreditConsumeResultSchema = external_exports.object({
|
|
15687
|
-
accountId: accountIdSchema,
|
|
15688
|
-
outcome: codexAccountResetCreditConsumeOutcomeSchema,
|
|
15689
|
-
accountCredits: accountCreditsSnapshotSchema.optional()
|
|
15690
|
-
}).strict();
|
|
15691
15671
|
|
|
15692
15672
|
// ../../shared-contracts/dist/harness-session-import.js
|
|
15693
15673
|
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
@@ -16619,7 +16599,7 @@ function withNodeRuntimeOnPath(environment, runtimeExecutable = process.execPath
|
|
|
16619
16599
|
const directories = (environment[pathKey] ?? "").split(delimiter).filter(Boolean);
|
|
16620
16600
|
const equal = platform === "win32" ? (value) => value.toLowerCase() : (value) => value;
|
|
16621
16601
|
if (!directories.some((directory) => equal(directory) === equal(runtimeDirectory))) {
|
|
16622
|
-
directories.
|
|
16602
|
+
directories.push(runtimeDirectory);
|
|
16623
16603
|
}
|
|
16624
16604
|
return { ...environment, [pathKey]: directories.join(delimiter) };
|
|
16625
16605
|
}
|
|
@@ -17244,7 +17224,8 @@ function ompRpcProcessCommand(options, dependencies = {}) {
|
|
|
17244
17224
|
const permissionArguments = options.permissionMode ? ["--approval-mode", options.permissionMode] : [];
|
|
17245
17225
|
const arguments_ = [
|
|
17246
17226
|
"--mode",
|
|
17247
|
-
|
|
17227
|
+
// OMP only creates ask and connects its tool UI in rpc-ui mode.
|
|
17228
|
+
"rpc-ui",
|
|
17248
17229
|
...permissionArguments,
|
|
17249
17230
|
...modelArguments,
|
|
17250
17231
|
...sessionArguments
|
|
@@ -17592,7 +17573,12 @@ var OmpRpcSession = class {
|
|
|
17592
17573
|
if ("confirmed" in response && pending.request.method !== "confirm") {
|
|
17593
17574
|
throw new Error("Omp RPC confirmation does not match the request");
|
|
17594
17575
|
}
|
|
17595
|
-
const frame = "cancelled" in response ? {
|
|
17576
|
+
const frame = "cancelled" in response ? {
|
|
17577
|
+
type: "extension_ui_response",
|
|
17578
|
+
id: response.requestId,
|
|
17579
|
+
cancelled: true,
|
|
17580
|
+
...reason === "expired" ? { timedOut: true } : {}
|
|
17581
|
+
} : "confirmed" in response ? { type: "extension_ui_response", id: response.requestId, confirmed: response.confirmed } : { type: "extension_ui_response", id: response.requestId, value: response.value };
|
|
17596
17582
|
if (!active.interactions.delete(response.requestId)) {
|
|
17597
17583
|
throw new Error("Omp RPC interaction is not pending");
|
|
17598
17584
|
}
|
|
@@ -17902,11 +17888,19 @@ var OmpRpcSession = class {
|
|
|
17902
17888
|
if (!Array.isArray(value.options) || value.options.length === 0 || !value.options.every((option) => typeof option === "string" && option.length > 0)) {
|
|
17903
17889
|
throw new OmpRpcFaultError("protocolError", "Omp RPC select request has invalid options");
|
|
17904
17890
|
}
|
|
17891
|
+
let optionDetails;
|
|
17892
|
+
if (value.optionDetails !== void 0) {
|
|
17893
|
+
if (!Array.isArray(value.optionDetails) || value.optionDetails.length !== value.options.length || !value.optionDetails.every((detail) => typeof detail === "object" && detail !== null && !Array.isArray(detail) && (detail.description === void 0 || typeof detail.description === "string"))) {
|
|
17894
|
+
throw new OmpRpcFaultError("protocolError", "Omp RPC select option details are invalid");
|
|
17895
|
+
}
|
|
17896
|
+
optionDetails = value.optionDetails.map(({ description }) => description === void 0 ? {} : { description });
|
|
17897
|
+
}
|
|
17905
17898
|
request = {
|
|
17906
17899
|
requestId,
|
|
17907
17900
|
method,
|
|
17908
17901
|
title,
|
|
17909
17902
|
options: [...value.options],
|
|
17903
|
+
...optionDetails ? { optionDetails } : {},
|
|
17910
17904
|
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
17911
17905
|
};
|
|
17912
17906
|
} else if (method === "confirm") {
|
|
@@ -18001,8 +17995,13 @@ var OmpRpcSession = class {
|
|
|
18001
17995
|
}
|
|
18002
17996
|
#updateTool(active, value) {
|
|
18003
17997
|
const callId = value.toolCallId;
|
|
18004
|
-
|
|
18005
|
-
|
|
17998
|
+
if (typeof callId !== "string" || callId.length === 0) {
|
|
17999
|
+
throw new OmpRpcFaultError("protocolError", "Omp RPC returned an invalid Tool update");
|
|
18000
|
+
}
|
|
18001
|
+
if (!active.tools.has(callId))
|
|
18002
|
+
return;
|
|
18003
|
+
const outputResult = jsonValueSchema.safeParse(value.partialResult ?? null);
|
|
18004
|
+
if (!outputResult.success) {
|
|
18006
18005
|
throw new OmpRpcFaultError("protocolError", "Omp RPC returned an invalid Tool update");
|
|
18007
18006
|
}
|
|
18008
18007
|
active.onEvent({ type: "tool.updated", callId, output: outputResult.data });
|
|
@@ -18010,9 +18009,14 @@ var OmpRpcSession = class {
|
|
|
18010
18009
|
#completeTool(active, value) {
|
|
18011
18010
|
const callId = value.toolCallId;
|
|
18012
18011
|
const toolName = value.toolName;
|
|
18012
|
+
if (typeof callId !== "string" || callId.length === 0) {
|
|
18013
|
+
throw new OmpRpcFaultError("protocolError", "Omp RPC returned an invalid Tool end");
|
|
18014
|
+
}
|
|
18015
|
+
const expectedName = active.tools.get(callId);
|
|
18016
|
+
if (expectedName === void 0)
|
|
18017
|
+
return;
|
|
18013
18018
|
const result = jsonValueSchema.safeParse(value.result);
|
|
18014
|
-
|
|
18015
|
-
if (typeof callId !== "string" || typeof toolName !== "string" || expectedName !== toolName || value.isError !== void 0 && typeof value.isError !== "boolean" || !result.success) {
|
|
18019
|
+
if (typeof toolName !== "string" || expectedName !== toolName || value.isError !== void 0 && typeof value.isError !== "boolean" || !result.success) {
|
|
18016
18020
|
throw new OmpRpcFaultError("protocolError", "Omp RPC returned an invalid Tool end");
|
|
18017
18021
|
}
|
|
18018
18022
|
active.tools.delete(callId);
|
|
@@ -18644,7 +18648,8 @@ function synthesizeFileChange(kind, args, cwd) {
|
|
|
18644
18648
|
{
|
|
18645
18649
|
path: displayed.path,
|
|
18646
18650
|
kind: "add",
|
|
18647
|
-
unifiedDiff: createTwoFilesPatch(oldHeader2, newHeader2, "", content, "", "", { context: 3 })
|
|
18651
|
+
unifiedDiff: createTwoFilesPatch(oldHeader2, newHeader2, "", content, "", "", { context: 3 }),
|
|
18652
|
+
diffScope: "fragment"
|
|
18648
18653
|
}
|
|
18649
18654
|
];
|
|
18650
18655
|
}
|
|
@@ -18666,7 +18671,8 @@ function synthesizeFileChange(kind, args, cwd) {
|
|
|
18666
18671
|
kind: "update",
|
|
18667
18672
|
unifiedDiff: createTwoFilesPatch(oldHeader, newHeader, oldText, newText, "", "", {
|
|
18668
18673
|
context: 3
|
|
18669
|
-
})
|
|
18674
|
+
}),
|
|
18675
|
+
diffScope: "fragment"
|
|
18670
18676
|
}
|
|
18671
18677
|
];
|
|
18672
18678
|
}
|
|
@@ -19060,7 +19066,7 @@ var OmpHarnessSession = class {
|
|
|
19060
19066
|
return this.#closePromise;
|
|
19061
19067
|
}
|
|
19062
19068
|
async #selectModel(command) {
|
|
19063
|
-
if (this.#acceptingTurn || this.#
|
|
19069
|
+
if (this.#acceptingTurn || this.#configuring) {
|
|
19064
19070
|
return {
|
|
19065
19071
|
ok: false,
|
|
19066
19072
|
error: {
|
|
@@ -19132,7 +19138,7 @@ var OmpHarnessSession = class {
|
|
|
19132
19138
|
}
|
|
19133
19139
|
};
|
|
19134
19140
|
}
|
|
19135
|
-
if (this.#acceptingTurn || this.#
|
|
19141
|
+
if (this.#acceptingTurn || this.#configuring) {
|
|
19136
19142
|
return {
|
|
19137
19143
|
ok: false,
|
|
19138
19144
|
error: {
|
|
@@ -19695,7 +19701,11 @@ var OmpHarnessSession = class {
|
|
|
19695
19701
|
id: "answer",
|
|
19696
19702
|
type: "choice",
|
|
19697
19703
|
prompt: request.title,
|
|
19698
|
-
options: request.options.map((option) => ({
|
|
19704
|
+
options: request.options.map((option, index) => ({
|
|
19705
|
+
value: option,
|
|
19706
|
+
label: option,
|
|
19707
|
+
...request.optionDetails?.[index]?.description ? { description: request.optionDetails[index].description } : {}
|
|
19708
|
+
})),
|
|
19699
19709
|
multiple: false,
|
|
19700
19710
|
allowOther: false,
|
|
19701
19711
|
optional: false
|
|
@@ -19917,12 +19927,17 @@ var OmpHarnessSession = class {
|
|
|
19917
19927
|
try {
|
|
19918
19928
|
const kind = fileMutatingKind(event.toolName);
|
|
19919
19929
|
const args = tool.arguments;
|
|
19920
|
-
if (kind && synthesizeFileChange(kind, args, this.#cwd)) {
|
|
19930
|
+
if (kind && !patchFromResult(event.result) && synthesizeFileChange(kind, args, this.#cwd)) {
|
|
19921
19931
|
return;
|
|
19922
19932
|
}
|
|
19923
19933
|
const changes = reliableFileChange(event.toolName, args, event.result, this.#cwd);
|
|
19924
19934
|
if (changes) {
|
|
19925
|
-
const fileItem = {
|
|
19935
|
+
const fileItem = {
|
|
19936
|
+
type: "fileChange",
|
|
19937
|
+
itemId: this.#newItemId(),
|
|
19938
|
+
sourceItemIds: [tool.item.itemId],
|
|
19939
|
+
changes
|
|
19940
|
+
};
|
|
19926
19941
|
this.#event({ type: "item.started", turnId: active.command.turnId, item: fileItem });
|
|
19927
19942
|
this.#completeItem(active, fileItem, { status: "succeeded" });
|
|
19928
19943
|
}
|