@codexhost/cli-win32-arm64 0.26.1 → 0.27.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/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +561 -322
- package/app/console-web.js +543 -369
- package/app/desktop-controller.mjs +385 -243
- package/app/host-runtime.mjs +7774 -3488
- package/app/plugins/antigravity/plugin.mjs +8669 -417
- package/app/plugins/claude-code/plugin.mjs +736 -393
- package/app/plugins/codebuddy/plugin.mjs +388 -233
- package/app/plugins/codex-usage/plugin.mjs +363 -230
- package/app/plugins/copilot/plugin.mjs +388 -233
- package/app/plugins/cursor-cli/plugin.mjs +363 -230
- package/app/plugins/deepseek-harness/plugin.mjs +388 -233
- package/app/plugins/devin/plugin.mjs +363 -230
- package/app/plugins/grok/plugin.mjs +363 -230
- package/app/plugins/hermes/plugin.mjs +363 -230
- package/app/plugins/kimi-code/plugin.mjs +492 -270
- package/app/plugins/kiro-cli/plugin.mjs +363 -230
- package/app/plugins/omp/plugin.mjs +363 -230
- package/app/plugins/opencode/manifest.json +1 -1
- package/app/plugins/opencode/plugin.mjs +439 -248
- package/app/plugins/pi/plugin.mjs +363 -230
- package/app/plugins/qoder/plugin.mjs +363 -230
- package/app/plugins/qoder-cn/plugin.mjs +363 -230
- package/app/plugins/qwen-code/plugin.mjs +363 -230
- package/app/plugins/workbuddy/plugin.mjs +383 -245
- package/app/plugins/zcode/plugin.mjs +363 -230
- package/app/renderer-extension.js +2071 -555
- package/app/web/assets/index-D9l7_ThH.js +199 -0
- package/app/web/assets/index-nw2RXcDu.css +1 -0
- package/app/web/codexhost-settings.js +67 -67
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-shortcuts/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-approval/client.js +4 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +75 -75
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +16 -16
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +19 -19
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-shortcuts/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-right/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-user-questions/client.js +4 -4
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +71 -71
- package/app/web/plugins.json +2 -1
- package/app/web-modules/server.mjs +2884 -1128
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shell.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-CR4Y8Ndj.css +0 -1
- package/app/web/assets/index-Dw-yHAxN.js +0 -196
package/app/console-web.js
CHANGED
|
@@ -19967,6 +19967,38 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
19967
19967
|
// ../shared-contracts/dist/harness-route-limit.js
|
|
19968
19968
|
var HARNESS_TRANSPORT_MODEL_ID_MAX_LENGTH = 8192;
|
|
19969
19969
|
|
|
19970
|
+
// ../shared-contracts/dist/thread-handoff.js
|
|
19971
|
+
var nonBlankTextSchema2 = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
19972
|
+
message: "Value must not be empty or whitespace"
|
|
19973
|
+
});
|
|
19974
|
+
var THREAD_HANDOFF_METHOD = "codexhost/thread/handoff";
|
|
19975
|
+
var threadHandoffParamsSchema = external_exports.object({
|
|
19976
|
+
sourceThreadId: hostThreadIdSchema,
|
|
19977
|
+
lastTurnId: hostTurnIdSchema.optional(),
|
|
19978
|
+
targetHarnessId: harnessIdSchema,
|
|
19979
|
+
targetModel: nonBlankTextSchema2.max(1024).optional(),
|
|
19980
|
+
targetThinkingOptionId: nonBlankTextSchema2.max(128).regex(/^[A-Za-z0-9._~-]+$/u, "Thinking option ID must use transport-safe characters").optional()
|
|
19981
|
+
}).strict();
|
|
19982
|
+
var threadHandoffMetadataSchema = external_exports.object({
|
|
19983
|
+
sourceThreadId: hostThreadIdSchema,
|
|
19984
|
+
sourceHarnessId: harnessIdSchema,
|
|
19985
|
+
sourceHarnessLabel: nonBlankTextSchema2.max(256).optional(),
|
|
19986
|
+
sourceModel: nonBlankTextSchema2.max(1024).optional(),
|
|
19987
|
+
targetHarnessId: harnessIdSchema,
|
|
19988
|
+
targetHarnessLabel: nonBlankTextSchema2.max(256).optional(),
|
|
19989
|
+
targetModel: nonBlankTextSchema2.max(1024).optional(),
|
|
19990
|
+
totalTurns: external_exports.number().int().min(1),
|
|
19991
|
+
boundaryTurnNumber: external_exports.number().int().min(1),
|
|
19992
|
+
includedTurnNumbers: external_exports.array(external_exports.number().int().min(1)),
|
|
19993
|
+
omittedTurns: external_exports.number().int().min(0),
|
|
19994
|
+
preview: external_exports.string().max(32e3),
|
|
19995
|
+
createdAtMs: external_exports.number().int().nonnegative()
|
|
19996
|
+
}).strict();
|
|
19997
|
+
var threadHandoffResultSchema = external_exports.object({
|
|
19998
|
+
threadId: hostThreadIdSchema,
|
|
19999
|
+
handoff: threadHandoffMetadataSchema
|
|
20000
|
+
}).strict();
|
|
20001
|
+
|
|
19970
20002
|
// ../shared-contracts/dist/thread-usage.js
|
|
19971
20003
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
19972
20004
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
@@ -20150,7 +20182,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20150
20182
|
var HARNESS_MODEL_LABEL_MAX_LENGTH = 256;
|
|
20151
20183
|
var HARNESS_THINKING_OPTION_ID_MAX_LENGTH = 128;
|
|
20152
20184
|
var THREAD_OWNERSHIP_LIST_MAX_LENGTH = 100;
|
|
20153
|
-
var
|
|
20185
|
+
var nonBlankTextSchema3 = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
20154
20186
|
message: "Value must not be empty or whitespace"
|
|
20155
20187
|
});
|
|
20156
20188
|
var harnessModelRefIdSchema = external_exports.string().min(1).max(HARNESS_MODEL_REF_MAX_LENGTH).refine((id2) => !/\p{Cc}/u.test(id2), "Model Ref must not contain control characters").brand();
|
|
@@ -20169,15 +20201,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20169
20201
|
const separator = key2.indexOf("");
|
|
20170
20202
|
return harnessModelRefSchema.parse(separator === -1 ? { id: key2 } : { id: key2.slice(0, separator), serviceTier: key2.slice(separator + 1) });
|
|
20171
20203
|
}
|
|
20172
|
-
var harnessThinkingOptionIdSchema =
|
|
20173
|
-
var harnessResolvedModelLabelSchema =
|
|
20204
|
+
var harnessThinkingOptionIdSchema = nonBlankTextSchema3.max(HARNESS_THINKING_OPTION_ID_MAX_LENGTH).regex(/^[A-Za-z0-9._~-]+$/u, "Thinking option ID must use transport-safe characters").brand();
|
|
20205
|
+
var harnessResolvedModelLabelSchema = nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH);
|
|
20174
20206
|
var harnessThinkingOptionSchema = external_exports.object({
|
|
20175
20207
|
id: harnessThinkingOptionIdSchema,
|
|
20176
|
-
label:
|
|
20208
|
+
label: nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH)
|
|
20177
20209
|
}).strict();
|
|
20178
20210
|
var harnessModelSchema = external_exports.object({
|
|
20179
20211
|
ref: harnessModelRefSchema,
|
|
20180
|
-
label:
|
|
20212
|
+
label: nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH),
|
|
20181
20213
|
resolvedModelLabel: harnessResolvedModelLabelSchema.optional(),
|
|
20182
20214
|
/** Optional opaque selection for this same Model with priority processing enabled. */
|
|
20183
20215
|
fastModel: harnessModelRefSchema.optional(),
|
|
@@ -20342,7 +20374,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20342
20374
|
]);
|
|
20343
20375
|
var harnessInspectParamsSchema = external_exports.object({
|
|
20344
20376
|
harnessId: harnessIdSchema,
|
|
20345
|
-
cwd:
|
|
20377
|
+
cwd: nonBlankTextSchema3.max(16384).optional(),
|
|
20346
20378
|
refresh: external_exports.boolean().optional(),
|
|
20347
20379
|
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
20348
20380
|
purpose: external_exports.literal("availability").optional(),
|
|
@@ -20372,12 +20404,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20372
20404
|
effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
20373
20405
|
effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
20374
20406
|
history: harnessHistoryCapabilitiesSchema.optional(),
|
|
20375
|
-
supportsThreadReferences: external_exports.literal(true).optional()
|
|
20407
|
+
supportsThreadReferences: external_exports.literal(true).optional(),
|
|
20408
|
+
handoff: threadHandoffMetadataSchema.optional()
|
|
20376
20409
|
}).strict();
|
|
20377
20410
|
var externalThreadInspectionSchema = external_exports.object({
|
|
20378
20411
|
owner: external_exports.literal("external"),
|
|
20379
|
-
harnessId:
|
|
20380
|
-
transportModelId:
|
|
20412
|
+
harnessId: nonBlankTextSchema3.max(256),
|
|
20413
|
+
transportModelId: nonBlankTextSchema3.max(HARNESS_TRANSPORT_MODEL_ID_MAX_LENGTH),
|
|
20381
20414
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
20382
20415
|
resolvedModelLabel: harnessResolvedModelLabelSchema.optional(),
|
|
20383
20416
|
effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
@@ -20387,6 +20420,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
20387
20420
|
catalog: harnessModelCatalogSchema.optional(),
|
|
20388
20421
|
history: harnessHistoryCapabilitiesSchema,
|
|
20389
20422
|
usage: threadUsageSnapshotSchema.optional(),
|
|
20423
|
+
handoff: threadHandoffMetadataSchema.optional(),
|
|
20390
20424
|
locked: external_exports.literal(true)
|
|
20391
20425
|
}).strict();
|
|
20392
20426
|
var threadInspectionSchema = external_exports.discriminatedUnion("owner", [
|
|
@@ -21099,6 +21133,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21099
21133
|
"codexhost/harness/preferences/get",
|
|
21100
21134
|
"codexhost/harness/preferences/patch",
|
|
21101
21135
|
"thread/list",
|
|
21136
|
+
"thread/metadata/update",
|
|
21102
21137
|
"codexhost/thread/catalog/read",
|
|
21103
21138
|
"thread/read",
|
|
21104
21139
|
"thread/resume",
|
|
@@ -21123,6 +21158,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21123
21158
|
"thread/queue/start",
|
|
21124
21159
|
"codexhost/thread/queue/send-now",
|
|
21125
21160
|
"codexhost/workspace/read",
|
|
21161
|
+
"project/create",
|
|
21162
|
+
"project/update",
|
|
21163
|
+
"project/delete",
|
|
21164
|
+
"project/move",
|
|
21126
21165
|
"codexhost/thread/tree/read",
|
|
21127
21166
|
"codexhost/thread/pins/list",
|
|
21128
21167
|
"codexhost/thread/sections/list",
|
|
@@ -21140,6 +21179,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21140
21179
|
"codexhost/harness/commands/inspect",
|
|
21141
21180
|
"codexhost/thread/command/execute",
|
|
21142
21181
|
"codexhost/thread/fork",
|
|
21182
|
+
THREAD_HANDOFF_METHOD,
|
|
21143
21183
|
"codexhost/harness/session-import/sources",
|
|
21144
21184
|
"codexhost/harness/session-import/list",
|
|
21145
21185
|
"codexhost/harness/session-import/import",
|
|
@@ -21191,6 +21231,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21191
21231
|
}).strict();
|
|
21192
21232
|
var clientWorkspaceSnapshotSchema = external_exports.object({
|
|
21193
21233
|
projects: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string(), rootPaths: external_exports.array(external_exports.string()) })),
|
|
21234
|
+
nativeProjects: external_exports.literal(true).optional(),
|
|
21194
21235
|
assignments: external_exports.record(external_exports.string(), external_exports.string()),
|
|
21195
21236
|
projectless: external_exports.array(external_exports.string()),
|
|
21196
21237
|
/** Canonical external pin membership; pins/list provides the native merged order. */
|
|
@@ -21205,6 +21246,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21205
21246
|
sequence: external_exports.number().int().nonnegative()
|
|
21206
21247
|
});
|
|
21207
21248
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
21249
|
+
external_exports.object({ type: external_exports.literal("projects-changed"), cursor: clientChannelCursorSchema }),
|
|
21208
21250
|
external_exports.object({
|
|
21209
21251
|
type: external_exports.literal("skills-changed"),
|
|
21210
21252
|
cursor: clientChannelCursorSchema,
|
|
@@ -21368,7 +21410,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21368
21410
|
items: external_exports.array(clientQueuedSubmissionSchema),
|
|
21369
21411
|
pausedReason: external_exports.enum(["interrupted", "outcome-unknown", "failed"]).nullable()
|
|
21370
21412
|
}).optional(),
|
|
21371
|
-
interactions: external_exports.array(clientInteractionSchema)
|
|
21413
|
+
interactions: external_exports.array(clientInteractionSchema),
|
|
21414
|
+
handoff: threadHandoffMetadataSchema.optional()
|
|
21372
21415
|
});
|
|
21373
21416
|
var clientChannelDescriptorSchema = external_exports.object({
|
|
21374
21417
|
version: external_exports.literal(CLIENT_CHANNEL_VERSION),
|
|
@@ -21377,7 +21420,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21377
21420
|
port: external_exports.number().int().min(1).max(65535),
|
|
21378
21421
|
token: external_exports.string().regex(/^[0-9a-f]{64}$/u),
|
|
21379
21422
|
startedAt: external_exports.number(),
|
|
21380
|
-
epoch: external_exports.string().uuid()
|
|
21423
|
+
epoch: external_exports.string().uuid(),
|
|
21424
|
+
capabilities: external_exports.object({
|
|
21425
|
+
peerDelegation: external_exports.literal(1).optional()
|
|
21426
|
+
}).optional()
|
|
21381
21427
|
});
|
|
21382
21428
|
var clientChannelResponseSchema = external_exports.object({
|
|
21383
21429
|
epoch: external_exports.string().uuid(),
|
|
@@ -21396,10 +21442,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21396
21442
|
* `excludeCwds` folder, the branch ends, or a page bound is reached. Every row read is
|
|
21397
21443
|
* returned, so the native cursors stay contiguous.
|
|
21398
21444
|
*/
|
|
21399
|
-
scope: external_exports.
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21445
|
+
scope: external_exports.union([
|
|
21446
|
+
external_exports.object({
|
|
21447
|
+
cwd: external_exports.string().min(1).max(4096),
|
|
21448
|
+
excludeCwds: external_exports.array(external_exports.string().min(1).max(4096)).max(1024)
|
|
21449
|
+
}).strict(),
|
|
21450
|
+
external_exports.object({
|
|
21451
|
+
projectId: external_exports.string().min(1).max(1024),
|
|
21452
|
+
legacyThreadIds: external_exports.array(external_exports.string().min(1).max(1024)).max(1024),
|
|
21453
|
+
/** Roots whose Threads without a project ID belong to this project, as on Desktop. */
|
|
21454
|
+
rootPaths: external_exports.array(external_exports.string().min(1).max(4096)).max(1024).optional()
|
|
21455
|
+
}).strict()
|
|
21456
|
+
]).optional()
|
|
21403
21457
|
}).strict();
|
|
21404
21458
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
21405
21459
|
threads: external_exports.array(jsonObjectSchema),
|
|
@@ -21592,6 +21646,283 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21592
21646
|
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
21593
21647
|
});
|
|
21594
21648
|
|
|
21649
|
+
// ../shared-contracts/dist/remote-peers.js
|
|
21650
|
+
var REMOTE_PEER_ID_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/u;
|
|
21651
|
+
var remotePeerIdSchema = external_exports.string().regex(REMOTE_PEER_ID_PATTERN);
|
|
21652
|
+
var remotePeerHostIdSchema = external_exports.string().regex(/^remote-peer:[a-zA-Z0-9_-]{1,64}$/u);
|
|
21653
|
+
var remotePeerTransportKindSchema = external_exports.enum(["relay", "tailscale", "lan", "custom"]);
|
|
21654
|
+
var REMOTE_PEER_COLORS = [
|
|
21655
|
+
"blue",
|
|
21656
|
+
"purple",
|
|
21657
|
+
"cyan",
|
|
21658
|
+
"green",
|
|
21659
|
+
"amber",
|
|
21660
|
+
"rose",
|
|
21661
|
+
"slate"
|
|
21662
|
+
];
|
|
21663
|
+
var remotePeerColorSchema = external_exports.enum(REMOTE_PEER_COLORS);
|
|
21664
|
+
var REMOTE_PEER_COLOR_SET = new Set(REMOTE_PEER_COLORS);
|
|
21665
|
+
var remotePeerStateSchema = external_exports.enum([
|
|
21666
|
+
"connected",
|
|
21667
|
+
"connecting",
|
|
21668
|
+
"auth-error",
|
|
21669
|
+
"offline",
|
|
21670
|
+
"disabled"
|
|
21671
|
+
]);
|
|
21672
|
+
var remotePeerSummarySchema = external_exports.object({
|
|
21673
|
+
peerId: remotePeerIdSchema,
|
|
21674
|
+
hostId: remotePeerHostIdSchema,
|
|
21675
|
+
name: external_exports.string().min(1).max(120),
|
|
21676
|
+
color: remotePeerColorSchema.optional(),
|
|
21677
|
+
origin: external_exports.string().min(1).max(2048),
|
|
21678
|
+
transportKind: remotePeerTransportKindSchema,
|
|
21679
|
+
encrypted: external_exports.boolean(),
|
|
21680
|
+
enabled: external_exports.boolean(),
|
|
21681
|
+
state: remotePeerStateSchema,
|
|
21682
|
+
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
21683
|
+
version: external_exports.string().max(128).optional(),
|
|
21684
|
+
platform: external_exports.string().max(64).optional(),
|
|
21685
|
+
hostname: external_exports.string().max(255).optional(),
|
|
21686
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
21687
|
+
lastError: external_exports.string().max(1e3).optional(),
|
|
21688
|
+
projectCount: external_exports.number().int().nonnegative(),
|
|
21689
|
+
createdAt: external_exports.string(),
|
|
21690
|
+
updatedAt: external_exports.string()
|
|
21691
|
+
});
|
|
21692
|
+
var remotePeerListResultSchema = external_exports.object({
|
|
21693
|
+
peers: external_exports.array(remotePeerSummarySchema)
|
|
21694
|
+
});
|
|
21695
|
+
var remotePeerAddParamsSchema = external_exports.object({
|
|
21696
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21697
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21698
|
+
token: external_exports.string().min(1).max(2048).optional(),
|
|
21699
|
+
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
21700
|
+
color: remotePeerColorSchema.optional()
|
|
21701
|
+
}).refine((input3) => Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide either connectionUrl or both origin and token");
|
|
21702
|
+
var remotePeerUpdateParamsSchema = external_exports.object({
|
|
21703
|
+
peerId: remotePeerIdSchema,
|
|
21704
|
+
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
21705
|
+
color: remotePeerColorSchema.nullable().optional(),
|
|
21706
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21707
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21708
|
+
token: external_exports.string().min(1).max(2048).optional(),
|
|
21709
|
+
enabled: external_exports.boolean().optional()
|
|
21710
|
+
});
|
|
21711
|
+
var remotePeerIdParamsSchema = external_exports.object({
|
|
21712
|
+
peerId: remotePeerIdSchema
|
|
21713
|
+
});
|
|
21714
|
+
var remotePeerRemoveResultSchema = external_exports.object({
|
|
21715
|
+
removed: external_exports.boolean()
|
|
21716
|
+
});
|
|
21717
|
+
var remotePeerTestParamsSchema = external_exports.object({
|
|
21718
|
+
peerId: remotePeerIdSchema.optional(),
|
|
21719
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21720
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21721
|
+
token: external_exports.string().min(1).max(2048).optional()
|
|
21722
|
+
}).refine((input3) => Boolean(input3.peerId) || Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide peerId, connectionUrl, or both origin and token");
|
|
21723
|
+
var remotePeerTestProjectSchema = external_exports.object({
|
|
21724
|
+
id: external_exports.string().min(1).max(1024),
|
|
21725
|
+
name: external_exports.string().min(1).max(512),
|
|
21726
|
+
path: external_exports.string().min(1).max(8192)
|
|
21727
|
+
});
|
|
21728
|
+
var remotePeerTestResultSchema = external_exports.object({
|
|
21729
|
+
ok: external_exports.boolean(),
|
|
21730
|
+
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
21731
|
+
origin: external_exports.string().max(2048).optional(),
|
|
21732
|
+
transportKind: remotePeerTransportKindSchema.optional(),
|
|
21733
|
+
encrypted: external_exports.boolean().optional(),
|
|
21734
|
+
version: external_exports.string().max(128).optional(),
|
|
21735
|
+
platform: external_exports.string().max(64).optional(),
|
|
21736
|
+
hostname: external_exports.string().max(255).optional(),
|
|
21737
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
21738
|
+
projectCount: external_exports.number().int().nonnegative().optional(),
|
|
21739
|
+
projects: external_exports.array(remotePeerTestProjectSchema).optional(),
|
|
21740
|
+
error: external_exports.string().max(1e3).optional()
|
|
21741
|
+
});
|
|
21742
|
+
var remotePeerManifestProjectSchema = external_exports.object({
|
|
21743
|
+
id: external_exports.string().min(1).max(1024),
|
|
21744
|
+
name: external_exports.string().min(1).max(512),
|
|
21745
|
+
path: external_exports.string().min(1).max(8192),
|
|
21746
|
+
threadIds: external_exports.array(external_exports.string().min(1).max(1024))
|
|
21747
|
+
});
|
|
21748
|
+
var remotePeerCapabilitiesSchema = external_exports.object({
|
|
21749
|
+
/** /api/peer/v1/uploads, /api/peer/v1/prompt, and /api/peer/v1/file are all available. */
|
|
21750
|
+
attachments: external_exports.literal(1).optional(),
|
|
21751
|
+
/** /api/peer/v1/workspace-files/rpc and /api/peer/v1/workspace-files/download are available. */
|
|
21752
|
+
workspaceFiles: external_exports.literal(1).optional(),
|
|
21753
|
+
/** Peer supports officeToPdf/render over /api/peer/v1/workspace-files/rpc. */
|
|
21754
|
+
officePreview: external_exports.literal(1).optional(),
|
|
21755
|
+
/** /api/peer/v1/delegation is available for fixed-whitelist cross-host delegation. */
|
|
21756
|
+
delegation: external_exports.literal(1).optional()
|
|
21757
|
+
});
|
|
21758
|
+
var remotePeerManifestSchema = external_exports.object({
|
|
21759
|
+
version: external_exports.string().max(128),
|
|
21760
|
+
platform: external_exports.string().max(64),
|
|
21761
|
+
hostname: external_exports.string().max(255),
|
|
21762
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
21763
|
+
epoch: external_exports.string().min(1).max(256),
|
|
21764
|
+
projects: external_exports.array(remotePeerManifestProjectSchema),
|
|
21765
|
+
capabilities: remotePeerCapabilitiesSchema.optional()
|
|
21766
|
+
});
|
|
21767
|
+
var REMOTE_PEER_UPLOAD_SCOPE_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
|
|
21768
|
+
var remotePeerPromptParamsSchema = external_exports.strictObject({
|
|
21769
|
+
threadId: external_exports.string().min(1).max(1024),
|
|
21770
|
+
scope: external_exports.string().regex(REMOTE_PEER_UPLOAD_SCOPE_PATTERN).optional(),
|
|
21771
|
+
requestId: external_exports.string().min(1).max(256).optional(),
|
|
21772
|
+
mode: external_exports.enum(["queue", "steer"]).optional(),
|
|
21773
|
+
expectedTurnId: external_exports.string().min(1).max(1024).nullable().optional(),
|
|
21774
|
+
content: external_exports.array(external_exports.discriminatedUnion("type", [
|
|
21775
|
+
external_exports.strictObject({ type: external_exports.literal("text"), text: external_exports.string() }),
|
|
21776
|
+
external_exports.strictObject({ type: external_exports.literal("file"), receiptId: external_exports.string().min(1).max(128) })
|
|
21777
|
+
])).min(1).max(64)
|
|
21778
|
+
});
|
|
21779
|
+
var remotePeerErrorEnvelopeSchema = external_exports.object({
|
|
21780
|
+
ok: external_exports.literal(false),
|
|
21781
|
+
error: external_exports.object({
|
|
21782
|
+
code: external_exports.string(),
|
|
21783
|
+
message: external_exports.string(),
|
|
21784
|
+
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
21785
|
+
})
|
|
21786
|
+
});
|
|
21787
|
+
var remotePeerUploadResultSchema = external_exports.union([
|
|
21788
|
+
external_exports.object({
|
|
21789
|
+
ok: external_exports.literal(true),
|
|
21790
|
+
value: external_exports.object({
|
|
21791
|
+
receiptId: external_exports.string().min(1),
|
|
21792
|
+
file: external_exports.object({
|
|
21793
|
+
attachmentId: external_exports.string(),
|
|
21794
|
+
name: external_exports.string(),
|
|
21795
|
+
bytes: external_exports.number().int().nonnegative()
|
|
21796
|
+
})
|
|
21797
|
+
})
|
|
21798
|
+
}),
|
|
21799
|
+
remotePeerErrorEnvelopeSchema
|
|
21800
|
+
]);
|
|
21801
|
+
var remotePeerPromptResultSchema = external_exports.union([
|
|
21802
|
+
external_exports.object({
|
|
21803
|
+
ok: external_exports.literal(true),
|
|
21804
|
+
value: external_exports.object({ accepted: external_exports.literal(true) })
|
|
21805
|
+
}),
|
|
21806
|
+
remotePeerErrorEnvelopeSchema
|
|
21807
|
+
]);
|
|
21808
|
+
var remotePeerDirectoryEntrySchema = external_exports.object({
|
|
21809
|
+
name: external_exports.string().min(1).max(512),
|
|
21810
|
+
path: external_exports.string().min(1).max(8192),
|
|
21811
|
+
kind: external_exports.literal("directory")
|
|
21812
|
+
});
|
|
21813
|
+
var remotePeerListDirsParamsSchema = external_exports.object({
|
|
21814
|
+
peerId: remotePeerIdSchema,
|
|
21815
|
+
path: external_exports.string().min(1).max(8192).optional()
|
|
21816
|
+
});
|
|
21817
|
+
var remotePeerListDirsResultSchema = external_exports.object({
|
|
21818
|
+
path: external_exports.string().min(1).max(8192),
|
|
21819
|
+
parentPath: external_exports.string().min(1).max(8192).nullable(),
|
|
21820
|
+
homeDir: external_exports.string().min(1).max(8192).optional(),
|
|
21821
|
+
entries: external_exports.array(remotePeerDirectoryEntrySchema)
|
|
21822
|
+
});
|
|
21823
|
+
var remotePeerCreateDirParamsSchema = external_exports.object({
|
|
21824
|
+
peerId: remotePeerIdSchema,
|
|
21825
|
+
parentPath: external_exports.string().min(1).max(8192),
|
|
21826
|
+
name: external_exports.string().min(1).max(255).refine((value) => value.trim().length > 0, "Directory name cannot be blank")
|
|
21827
|
+
});
|
|
21828
|
+
var remotePeerCreateDirResultSchema = external_exports.object({
|
|
21829
|
+
path: external_exports.string().min(1).max(8192),
|
|
21830
|
+
name: external_exports.string().min(1).max(255)
|
|
21831
|
+
});
|
|
21832
|
+
var remotePeerCreateWorkspaceParamsSchema = external_exports.object({
|
|
21833
|
+
peerId: remotePeerIdSchema,
|
|
21834
|
+
path: external_exports.string().min(1).max(8192),
|
|
21835
|
+
title: external_exports.string().trim().min(1).max(255).optional()
|
|
21836
|
+
});
|
|
21837
|
+
var remotePeerRenameWorkspaceParamsSchema = external_exports.object({
|
|
21838
|
+
peerId: remotePeerIdSchema,
|
|
21839
|
+
workspaceId: external_exports.string().min(1).max(1024),
|
|
21840
|
+
title: external_exports.string().trim().min(1).max(255)
|
|
21841
|
+
});
|
|
21842
|
+
var remotePeerDeleteWorkspaceParamsSchema = external_exports.object({
|
|
21843
|
+
peerId: remotePeerIdSchema,
|
|
21844
|
+
workspaceId: external_exports.string().min(1).max(1024)
|
|
21845
|
+
});
|
|
21846
|
+
var remotePeerWorkspaceMutationResultSchema = external_exports.object({
|
|
21847
|
+
workspaceId: external_exports.string().min(1).max(1024).optional(),
|
|
21848
|
+
manifest: remotePeerManifestSchema
|
|
21849
|
+
});
|
|
21850
|
+
|
|
21851
|
+
// ../shared-contracts/dist/peer-delegation.js
|
|
21852
|
+
var PEER_DELEGATION_BRIDGE_VERSION = 1;
|
|
21853
|
+
var PEER_DELEGATION_OPERATIONS = [
|
|
21854
|
+
"listHarnesses",
|
|
21855
|
+
"inspect",
|
|
21856
|
+
"start",
|
|
21857
|
+
"send",
|
|
21858
|
+
"cancel",
|
|
21859
|
+
"read",
|
|
21860
|
+
"answer",
|
|
21861
|
+
"list"
|
|
21862
|
+
];
|
|
21863
|
+
var peerDelegationOperationSchema = external_exports.enum(PEER_DELEGATION_OPERATIONS);
|
|
21864
|
+
var peerDelegationRequestSchema = external_exports.strictObject({
|
|
21865
|
+
operation: peerDelegationOperationSchema,
|
|
21866
|
+
hopCount: external_exports.number().int().min(0).max(16),
|
|
21867
|
+
/** Opaque A-side peer pairing identifier used by B to scope implicit deduplication per Peer. */
|
|
21868
|
+
sourceId: remotePeerIdSchema.optional(),
|
|
21869
|
+
input: jsonObjectSchema
|
|
21870
|
+
});
|
|
21871
|
+
var peerDelegationErrorSchema = external_exports.strictObject({
|
|
21872
|
+
code: external_exports.string().min(1).max(128),
|
|
21873
|
+
message: external_exports.string().max(4096),
|
|
21874
|
+
details: jsonObjectSchema.optional()
|
|
21875
|
+
});
|
|
21876
|
+
var peerDelegationResponseSchema = external_exports.union([
|
|
21877
|
+
external_exports.strictObject({
|
|
21878
|
+
ok: external_exports.literal(true),
|
|
21879
|
+
value: jsonValueSchema
|
|
21880
|
+
}),
|
|
21881
|
+
external_exports.strictObject({
|
|
21882
|
+
ok: external_exports.literal(false),
|
|
21883
|
+
error: peerDelegationErrorSchema
|
|
21884
|
+
})
|
|
21885
|
+
]);
|
|
21886
|
+
var peerDelegationHostProjectSchema = external_exports.strictObject({
|
|
21887
|
+
id: external_exports.string().min(1).max(1024),
|
|
21888
|
+
name: external_exports.string().min(1).max(512),
|
|
21889
|
+
path: external_exports.string().min(1).max(8192)
|
|
21890
|
+
});
|
|
21891
|
+
var peerDelegationHostSummarySchema = external_exports.strictObject({
|
|
21892
|
+
hostId: remotePeerHostIdSchema,
|
|
21893
|
+
displayName: external_exports.string().min(1).max(120),
|
|
21894
|
+
online: external_exports.boolean(),
|
|
21895
|
+
state: remotePeerStateSchema,
|
|
21896
|
+
delegation: external_exports.boolean(),
|
|
21897
|
+
projects: external_exports.array(peerDelegationHostProjectSchema),
|
|
21898
|
+
platform: external_exports.string().max(64).optional(),
|
|
21899
|
+
hostname: external_exports.string().max(255).optional(),
|
|
21900
|
+
homeDir: external_exports.string().max(4096).optional()
|
|
21901
|
+
});
|
|
21902
|
+
var peerDelegationHostsResultSchema = external_exports.strictObject({
|
|
21903
|
+
hosts: external_exports.array(peerDelegationHostSummarySchema)
|
|
21904
|
+
});
|
|
21905
|
+
var peerDelegationBridgeDescriptorSchema = external_exports.strictObject({
|
|
21906
|
+
version: external_exports.literal(PEER_DELEGATION_BRIDGE_VERSION),
|
|
21907
|
+
instanceId: external_exports.string().min(1).max(128),
|
|
21908
|
+
pid: external_exports.number().int().positive(),
|
|
21909
|
+
endpoint: external_exports.string().min(1).max(256),
|
|
21910
|
+
token: external_exports.string().regex(/^[0-9a-f]{64}$/u),
|
|
21911
|
+
startedAt: external_exports.number().int().nonnegative()
|
|
21912
|
+
});
|
|
21913
|
+
var peerDelegationBridgeRequestSchema = external_exports.union([
|
|
21914
|
+
external_exports.strictObject({
|
|
21915
|
+
operation: external_exports.literal("hosts")
|
|
21916
|
+
}),
|
|
21917
|
+
external_exports.strictObject({
|
|
21918
|
+
operation: peerDelegationOperationSchema,
|
|
21919
|
+
hostId: remotePeerHostIdSchema,
|
|
21920
|
+
hopCount: external_exports.number().int().min(0).max(16),
|
|
21921
|
+
timeoutMs: external_exports.number().int().min(1).max(12e4).optional(),
|
|
21922
|
+
input: jsonObjectSchema
|
|
21923
|
+
})
|
|
21924
|
+
]);
|
|
21925
|
+
|
|
21595
21926
|
// ../shared-contracts/dist/credential-imports.js
|
|
21596
21927
|
var credentialSourceSchema = external_exports.object({
|
|
21597
21928
|
id: external_exports.string().min(1).max(256),
|
|
@@ -22232,7 +22563,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22232
22563
|
|
|
22233
22564
|
// ../shared-contracts/dist/codex-accounts.js
|
|
22234
22565
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
22235
|
-
var
|
|
22566
|
+
var nonBlankTextSchema4 = external_exports.string().trim().min(1);
|
|
22236
22567
|
var codexAccountPlanTypeSchema = external_exports.enum([
|
|
22237
22568
|
"free",
|
|
22238
22569
|
"go",
|
|
@@ -22254,7 +22585,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22254
22585
|
]);
|
|
22255
22586
|
var codexAccountSchema = external_exports.object({
|
|
22256
22587
|
accountId: accountIdSchema,
|
|
22257
|
-
label:
|
|
22588
|
+
label: nonBlankTextSchema4.max(256),
|
|
22258
22589
|
email: external_exports.string().email().max(320).optional(),
|
|
22259
22590
|
planType: codexAccountPlanTypeSchema.optional()
|
|
22260
22591
|
}).strict();
|
|
@@ -22264,7 +22595,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22264
22595
|
currentAccountId: accountIdSchema.nullable(),
|
|
22265
22596
|
phase: codexAccountPhaseSchema,
|
|
22266
22597
|
revision: external_exports.number().int().nonnegative(),
|
|
22267
|
-
instanceId:
|
|
22598
|
+
instanceId: nonBlankTextSchema4.max(1024).optional(),
|
|
22268
22599
|
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
22269
22600
|
}).strict();
|
|
22270
22601
|
var codexAccountChangedSchema = codexAccountListResultSchema;
|
|
@@ -22284,13 +22615,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22284
22615
|
var HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH = 1e3;
|
|
22285
22616
|
var HARNESS_SESSION_IMPORT_DEFAULT_PAGE_SIZE = 20;
|
|
22286
22617
|
var HARNESS_SESSION_IMPORT_UPDATED_AT_MAX = 864e13;
|
|
22287
|
-
var
|
|
22288
|
-
var harnessSessionImportIdSchema =
|
|
22618
|
+
var nonBlankTextSchema5 = external_exports.string().refine((value) => value.trim().length > 0, "Value must not be empty or whitespace").refine((value) => !value.includes("\0"), "Value must not contain NUL");
|
|
22619
|
+
var harnessSessionImportIdSchema = nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_ID_MAX_LENGTH);
|
|
22289
22620
|
var harnessSessionImportCandidateSchema = external_exports.object({
|
|
22290
22621
|
nativeSessionId: harnessSessionImportIdSchema,
|
|
22291
|
-
title:
|
|
22622
|
+
title: nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_TITLE_MAX_LENGTH).nullable(),
|
|
22292
22623
|
updatedAt: external_exports.number().int().nonnegative().max(HARNESS_SESSION_IMPORT_UPDATED_AT_MAX),
|
|
22293
|
-
cwd:
|
|
22624
|
+
cwd: nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_CWD_MAX_LENGTH),
|
|
22294
22625
|
// Native file discovery cannot reliably observe another process's activity.
|
|
22295
22626
|
running: external_exports.boolean().nullable()
|
|
22296
22627
|
}).strict();
|
|
@@ -22298,7 +22629,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22298
22629
|
var harnessSessionImportSourcesResultSchema = external_exports.object({
|
|
22299
22630
|
harnesses: external_exports.array(external_exports.object({
|
|
22300
22631
|
harnessId: harnessPluginIdSchema,
|
|
22301
|
-
name:
|
|
22632
|
+
name: nonBlankTextSchema5.max(128)
|
|
22302
22633
|
}).strict()).max(128)
|
|
22303
22634
|
}).strict();
|
|
22304
22635
|
var harnessSessionListParamsSchema = external_exports.object({
|
|
@@ -22316,13 +22647,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22316
22647
|
nativeSessionId: harnessSessionImportIdSchema
|
|
22317
22648
|
}).strict();
|
|
22318
22649
|
var harnessSessionImportResultSchema = external_exports.object({
|
|
22319
|
-
threadId:
|
|
22650
|
+
threadId: nonBlankTextSchema5.max(1024).pipe(hostThreadIdSchema)
|
|
22320
22651
|
}).strict();
|
|
22321
22652
|
|
|
22322
22653
|
// ../shared-contracts/dist/deepseek-modern-sessions.js
|
|
22323
22654
|
var DEEPSEEK_MODERN_SESSION_LIST_MAX_LENGTH = HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH;
|
|
22324
22655
|
var DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH = 1024;
|
|
22325
|
-
var
|
|
22656
|
+
var nonBlankTextSchema6 = external_exports.string().refine((value) => value.trim().length > 0, "Value must not be empty or whitespace").refine((value) => !value.includes("\0"), "Value must not contain NUL");
|
|
22326
22657
|
var deepSeekModernSessionIdSchema = harnessSessionImportIdSchema;
|
|
22327
22658
|
var deepSeekModernSessionCandidateSchema = harnessSessionImportCandidateSchema;
|
|
22328
22659
|
var deepSeekModernSessionListParamsSchema = external_exports.object({}).strict();
|
|
@@ -22333,7 +22664,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22333
22664
|
nativeSessionId: deepSeekModernSessionIdSchema
|
|
22334
22665
|
}).strict();
|
|
22335
22666
|
var deepSeekModernSessionImportResultSchema = external_exports.object({
|
|
22336
|
-
threadId:
|
|
22667
|
+
threadId: nonBlankTextSchema6.max(DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH).pipe(hostThreadIdSchema)
|
|
22337
22668
|
}).strict();
|
|
22338
22669
|
|
|
22339
22670
|
// ../shared-contracts/dist/external-thread-fork.js
|
|
@@ -22368,9 +22699,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22368
22699
|
/** Partial discovery failures; valid commands remain available. */
|
|
22369
22700
|
warnings: external_exports.array(external_exports.string().min(1)).optional(),
|
|
22370
22701
|
/**
|
|
22371
|
-
* `live` when
|
|
22372
|
-
* workspace (
|
|
22373
|
-
*
|
|
22702
|
+
* `live` when a native Session has reported its live catalog for the
|
|
22703
|
+
* workspace (even when filtering leaves only built-ins); `static` for
|
|
22704
|
+
* Adapter built-ins only before live commands arrive. Adapters may set
|
|
22705
|
+
* `live` once their Session's live catalog has loaded.
|
|
22374
22706
|
*/
|
|
22375
22707
|
source: external_exports.enum(["live", "static"]).optional()
|
|
22376
22708
|
}).strict().superRefine((catalog, context) => {
|
|
@@ -22727,7 +23059,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22727
23059
|
kind: external_exports.literal("start"),
|
|
22728
23060
|
itemId: identity,
|
|
22729
23061
|
onlyIfHead: external_exports.literal(true).optional()
|
|
22730
|
-
})
|
|
23062
|
+
}),
|
|
23063
|
+
external_exports.strictObject({ kind: external_exports.literal("sendNow"), itemId: identity })
|
|
22731
23064
|
])
|
|
22732
23065
|
}),
|
|
22733
23066
|
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
@@ -22843,206 +23176,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
22843
23176
|
var webUiExtensionEnabledSchema = external_exports.object({ id: webUiExtensionIdSchema, enabled: external_exports.boolean() }).strict();
|
|
22844
23177
|
var webUiExtensionRemoveSchema = external_exports.object({ id: webUiExtensionIdSchema }).strict();
|
|
22845
23178
|
|
|
22846
|
-
// ../shared-contracts/dist/remote-peers.js
|
|
22847
|
-
var REMOTE_PEER_ID_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/u;
|
|
22848
|
-
var remotePeerIdSchema = external_exports.string().regex(REMOTE_PEER_ID_PATTERN);
|
|
22849
|
-
var remotePeerHostIdSchema = external_exports.string().regex(/^remote-peer:[a-zA-Z0-9_-]{1,64}$/u);
|
|
22850
|
-
var remotePeerTransportKindSchema = external_exports.enum(["relay", "tailscale", "lan", "custom"]);
|
|
22851
|
-
var REMOTE_PEER_COLORS = [
|
|
22852
|
-
"blue",
|
|
22853
|
-
"purple",
|
|
22854
|
-
"cyan",
|
|
22855
|
-
"green",
|
|
22856
|
-
"amber",
|
|
22857
|
-
"rose",
|
|
22858
|
-
"slate"
|
|
22859
|
-
];
|
|
22860
|
-
var remotePeerColorSchema = external_exports.enum(REMOTE_PEER_COLORS);
|
|
22861
|
-
var REMOTE_PEER_COLOR_SET = new Set(REMOTE_PEER_COLORS);
|
|
22862
|
-
var remotePeerStateSchema = external_exports.enum([
|
|
22863
|
-
"connected",
|
|
22864
|
-
"connecting",
|
|
22865
|
-
"auth-error",
|
|
22866
|
-
"offline",
|
|
22867
|
-
"disabled"
|
|
22868
|
-
]);
|
|
22869
|
-
var remotePeerSummarySchema = external_exports.object({
|
|
22870
|
-
peerId: remotePeerIdSchema,
|
|
22871
|
-
hostId: remotePeerHostIdSchema,
|
|
22872
|
-
name: external_exports.string().min(1).max(120),
|
|
22873
|
-
color: remotePeerColorSchema.optional(),
|
|
22874
|
-
origin: external_exports.string().min(1).max(2048),
|
|
22875
|
-
transportKind: remotePeerTransportKindSchema,
|
|
22876
|
-
encrypted: external_exports.boolean(),
|
|
22877
|
-
enabled: external_exports.boolean(),
|
|
22878
|
-
state: remotePeerStateSchema,
|
|
22879
|
-
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
22880
|
-
version: external_exports.string().max(128).optional(),
|
|
22881
|
-
platform: external_exports.string().max(64).optional(),
|
|
22882
|
-
hostname: external_exports.string().max(255).optional(),
|
|
22883
|
-
homeDir: external_exports.string().max(4096).optional(),
|
|
22884
|
-
lastError: external_exports.string().max(1e3).optional(),
|
|
22885
|
-
projectCount: external_exports.number().int().nonnegative(),
|
|
22886
|
-
createdAt: external_exports.string(),
|
|
22887
|
-
updatedAt: external_exports.string()
|
|
22888
|
-
});
|
|
22889
|
-
var remotePeerListResultSchema = external_exports.object({
|
|
22890
|
-
peers: external_exports.array(remotePeerSummarySchema)
|
|
22891
|
-
});
|
|
22892
|
-
var remotePeerAddParamsSchema = external_exports.object({
|
|
22893
|
-
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
22894
|
-
origin: external_exports.string().min(1).max(2048).optional(),
|
|
22895
|
-
token: external_exports.string().min(1).max(2048).optional(),
|
|
22896
|
-
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
22897
|
-
color: remotePeerColorSchema.optional()
|
|
22898
|
-
}).refine((input3) => Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide either connectionUrl or both origin and token");
|
|
22899
|
-
var remotePeerUpdateParamsSchema = external_exports.object({
|
|
22900
|
-
peerId: remotePeerIdSchema,
|
|
22901
|
-
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
22902
|
-
color: remotePeerColorSchema.nullable().optional(),
|
|
22903
|
-
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
22904
|
-
origin: external_exports.string().min(1).max(2048).optional(),
|
|
22905
|
-
token: external_exports.string().min(1).max(2048).optional(),
|
|
22906
|
-
enabled: external_exports.boolean().optional()
|
|
22907
|
-
});
|
|
22908
|
-
var remotePeerIdParamsSchema = external_exports.object({
|
|
22909
|
-
peerId: remotePeerIdSchema
|
|
22910
|
-
});
|
|
22911
|
-
var remotePeerRemoveResultSchema = external_exports.object({
|
|
22912
|
-
removed: external_exports.boolean()
|
|
22913
|
-
});
|
|
22914
|
-
var remotePeerTestParamsSchema = external_exports.object({
|
|
22915
|
-
peerId: remotePeerIdSchema.optional(),
|
|
22916
|
-
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
22917
|
-
origin: external_exports.string().min(1).max(2048).optional(),
|
|
22918
|
-
token: external_exports.string().min(1).max(2048).optional()
|
|
22919
|
-
}).refine((input3) => Boolean(input3.peerId) || Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide peerId, connectionUrl, or both origin and token");
|
|
22920
|
-
var remotePeerTestProjectSchema = external_exports.object({
|
|
22921
|
-
id: external_exports.string().min(1).max(1024),
|
|
22922
|
-
name: external_exports.string().min(1).max(512),
|
|
22923
|
-
path: external_exports.string().min(1).max(8192)
|
|
22924
|
-
});
|
|
22925
|
-
var remotePeerTestResultSchema = external_exports.object({
|
|
22926
|
-
ok: external_exports.boolean(),
|
|
22927
|
-
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
22928
|
-
origin: external_exports.string().max(2048).optional(),
|
|
22929
|
-
transportKind: remotePeerTransportKindSchema.optional(),
|
|
22930
|
-
encrypted: external_exports.boolean().optional(),
|
|
22931
|
-
version: external_exports.string().max(128).optional(),
|
|
22932
|
-
platform: external_exports.string().max(64).optional(),
|
|
22933
|
-
hostname: external_exports.string().max(255).optional(),
|
|
22934
|
-
homeDir: external_exports.string().max(4096).optional(),
|
|
22935
|
-
projectCount: external_exports.number().int().nonnegative().optional(),
|
|
22936
|
-
projects: external_exports.array(remotePeerTestProjectSchema).optional(),
|
|
22937
|
-
error: external_exports.string().max(1e3).optional()
|
|
22938
|
-
});
|
|
22939
|
-
var remotePeerManifestProjectSchema = external_exports.object({
|
|
22940
|
-
id: external_exports.string().min(1).max(1024),
|
|
22941
|
-
name: external_exports.string().min(1).max(512),
|
|
22942
|
-
path: external_exports.string().min(1).max(8192),
|
|
22943
|
-
threadIds: external_exports.array(external_exports.string().min(1).max(1024))
|
|
22944
|
-
});
|
|
22945
|
-
var remotePeerCapabilitiesSchema = external_exports.object({
|
|
22946
|
-
/** /api/peer/v1/uploads, /api/peer/v1/prompt, and /api/peer/v1/file are all available. */
|
|
22947
|
-
attachments: external_exports.literal(1).optional(),
|
|
22948
|
-
/** /api/peer/v1/workspace-files/rpc and /api/peer/v1/workspace-files/download are available. */
|
|
22949
|
-
workspaceFiles: external_exports.literal(1).optional(),
|
|
22950
|
-
/** Peer supports officeToPdf/render over /api/peer/v1/workspace-files/rpc. */
|
|
22951
|
-
officePreview: external_exports.literal(1).optional()
|
|
22952
|
-
});
|
|
22953
|
-
var remotePeerManifestSchema = external_exports.object({
|
|
22954
|
-
version: external_exports.string().max(128),
|
|
22955
|
-
platform: external_exports.string().max(64),
|
|
22956
|
-
hostname: external_exports.string().max(255),
|
|
22957
|
-
homeDir: external_exports.string().max(4096).optional(),
|
|
22958
|
-
epoch: external_exports.string().min(1).max(256),
|
|
22959
|
-
projects: external_exports.array(remotePeerManifestProjectSchema),
|
|
22960
|
-
capabilities: remotePeerCapabilitiesSchema.optional()
|
|
22961
|
-
});
|
|
22962
|
-
var REMOTE_PEER_UPLOAD_SCOPE_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
|
|
22963
|
-
var remotePeerPromptParamsSchema = external_exports.strictObject({
|
|
22964
|
-
threadId: external_exports.string().min(1).max(1024),
|
|
22965
|
-
scope: external_exports.string().regex(REMOTE_PEER_UPLOAD_SCOPE_PATTERN).optional(),
|
|
22966
|
-
requestId: external_exports.string().min(1).max(256).optional(),
|
|
22967
|
-
mode: external_exports.enum(["queue", "steer"]).optional(),
|
|
22968
|
-
expectedTurnId: external_exports.string().min(1).max(1024).nullable().optional(),
|
|
22969
|
-
content: external_exports.array(external_exports.discriminatedUnion("type", [
|
|
22970
|
-
external_exports.strictObject({ type: external_exports.literal("text"), text: external_exports.string() }),
|
|
22971
|
-
external_exports.strictObject({ type: external_exports.literal("file"), receiptId: external_exports.string().min(1).max(128) })
|
|
22972
|
-
])).min(1).max(64)
|
|
22973
|
-
});
|
|
22974
|
-
var remotePeerErrorEnvelopeSchema = external_exports.object({
|
|
22975
|
-
ok: external_exports.literal(false),
|
|
22976
|
-
error: external_exports.object({
|
|
22977
|
-
code: external_exports.string(),
|
|
22978
|
-
message: external_exports.string(),
|
|
22979
|
-
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
22980
|
-
})
|
|
22981
|
-
});
|
|
22982
|
-
var remotePeerUploadResultSchema = external_exports.union([
|
|
22983
|
-
external_exports.object({
|
|
22984
|
-
ok: external_exports.literal(true),
|
|
22985
|
-
value: external_exports.object({
|
|
22986
|
-
receiptId: external_exports.string().min(1),
|
|
22987
|
-
file: external_exports.object({
|
|
22988
|
-
attachmentId: external_exports.string(),
|
|
22989
|
-
name: external_exports.string(),
|
|
22990
|
-
bytes: external_exports.number().int().nonnegative()
|
|
22991
|
-
})
|
|
22992
|
-
})
|
|
22993
|
-
}),
|
|
22994
|
-
remotePeerErrorEnvelopeSchema
|
|
22995
|
-
]);
|
|
22996
|
-
var remotePeerPromptResultSchema = external_exports.union([
|
|
22997
|
-
external_exports.object({
|
|
22998
|
-
ok: external_exports.literal(true),
|
|
22999
|
-
value: external_exports.object({ accepted: external_exports.literal(true) })
|
|
23000
|
-
}),
|
|
23001
|
-
remotePeerErrorEnvelopeSchema
|
|
23002
|
-
]);
|
|
23003
|
-
var remotePeerDirectoryEntrySchema = external_exports.object({
|
|
23004
|
-
name: external_exports.string().min(1).max(512),
|
|
23005
|
-
path: external_exports.string().min(1).max(8192),
|
|
23006
|
-
kind: external_exports.literal("directory")
|
|
23007
|
-
});
|
|
23008
|
-
var remotePeerListDirsParamsSchema = external_exports.object({
|
|
23009
|
-
peerId: remotePeerIdSchema,
|
|
23010
|
-
path: external_exports.string().min(1).max(8192).optional()
|
|
23011
|
-
});
|
|
23012
|
-
var remotePeerListDirsResultSchema = external_exports.object({
|
|
23013
|
-
path: external_exports.string().min(1).max(8192),
|
|
23014
|
-
parentPath: external_exports.string().min(1).max(8192).nullable(),
|
|
23015
|
-
homeDir: external_exports.string().min(1).max(8192).optional(),
|
|
23016
|
-
entries: external_exports.array(remotePeerDirectoryEntrySchema)
|
|
23017
|
-
});
|
|
23018
|
-
var remotePeerCreateDirParamsSchema = external_exports.object({
|
|
23019
|
-
peerId: remotePeerIdSchema,
|
|
23020
|
-
parentPath: external_exports.string().min(1).max(8192),
|
|
23021
|
-
name: external_exports.string().min(1).max(255).refine((value) => value.trim().length > 0, "Directory name cannot be blank")
|
|
23022
|
-
});
|
|
23023
|
-
var remotePeerCreateDirResultSchema = external_exports.object({
|
|
23024
|
-
path: external_exports.string().min(1).max(8192),
|
|
23025
|
-
name: external_exports.string().min(1).max(255)
|
|
23026
|
-
});
|
|
23027
|
-
var remotePeerCreateWorkspaceParamsSchema = external_exports.object({
|
|
23028
|
-
peerId: remotePeerIdSchema,
|
|
23029
|
-
path: external_exports.string().min(1).max(8192),
|
|
23030
|
-
title: external_exports.string().trim().min(1).max(255).optional()
|
|
23031
|
-
});
|
|
23032
|
-
var remotePeerRenameWorkspaceParamsSchema = external_exports.object({
|
|
23033
|
-
peerId: remotePeerIdSchema,
|
|
23034
|
-
workspaceId: external_exports.string().min(1).max(1024),
|
|
23035
|
-
title: external_exports.string().trim().min(1).max(255)
|
|
23036
|
-
});
|
|
23037
|
-
var remotePeerDeleteWorkspaceParamsSchema = external_exports.object({
|
|
23038
|
-
peerId: remotePeerIdSchema,
|
|
23039
|
-
workspaceId: external_exports.string().min(1).max(1024)
|
|
23040
|
-
});
|
|
23041
|
-
var remotePeerWorkspaceMutationResultSchema = external_exports.object({
|
|
23042
|
-
workspaceId: external_exports.string().min(1).max(1024).optional(),
|
|
23043
|
-
manifest: remotePeerManifestSchema
|
|
23044
|
-
});
|
|
23045
|
-
|
|
23046
23179
|
// ../shared-contracts/dist/index.js
|
|
23047
23180
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
23048
23181
|
|
|
@@ -27119,6 +27252,11 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
27119
27252
|
const result = await manager.sendRequest(THREAD_FORK_METHOD, params);
|
|
27120
27253
|
return externalThreadForkResultSchema.parse(result);
|
|
27121
27254
|
},
|
|
27255
|
+
async handoffThread(input3) {
|
|
27256
|
+
const params = threadHandoffParamsSchema.parse(input3);
|
|
27257
|
+
const result = await manager.sendRequest(THREAD_HANDOFF_METHOD, params);
|
|
27258
|
+
return threadHandoffResultSchema.parse(result);
|
|
27259
|
+
},
|
|
27122
27260
|
inspectHarness,
|
|
27123
27261
|
async listSkills(params) {
|
|
27124
27262
|
return skillsListResultSchema.parse(
|
|
@@ -40521,18 +40659,20 @@ ${error62.stderrTail}`] : []
|
|
|
40521
40659
|
const renderActions = (extensionId, displayName, installed, catalogEntry, state) => {
|
|
40522
40660
|
if (!actionBar || !modalToggle) return;
|
|
40523
40661
|
const updateAvailable = hasCatalogUpdate(installed, catalogEntry);
|
|
40524
|
-
const
|
|
40662
|
+
const extAction = state.pendingMutations.get(extensionId) ?? null;
|
|
40663
|
+
const controlsDisabled = extAction !== null || state.globalBusy;
|
|
40525
40664
|
const nodes = [];
|
|
40526
40665
|
if (!installed && catalogEntry) {
|
|
40527
40666
|
const installButton = createEl(
|
|
40528
40667
|
document2,
|
|
40529
40668
|
"button",
|
|
40530
40669
|
"settings-command-button",
|
|
40531
|
-
|
|
40670
|
+
extAction === "install" ? copy.installing : copy.install
|
|
40532
40671
|
);
|
|
40533
40672
|
installButton.type = "button";
|
|
40534
40673
|
installButton.dataset.action = "install";
|
|
40535
|
-
installButton.
|
|
40674
|
+
installButton.setAttribute("aria-busy", String(extAction === "install"));
|
|
40675
|
+
installButton.disabled = controlsDisabled || !state.canInstall;
|
|
40536
40676
|
installButton.addEventListener("click", () => {
|
|
40537
40677
|
if (!installButton.disabled) onInstall?.(catalogEntry, false);
|
|
40538
40678
|
});
|
|
@@ -40552,11 +40692,12 @@ ${error62.stderrTail}`] : []
|
|
|
40552
40692
|
document2,
|
|
40553
40693
|
"button",
|
|
40554
40694
|
"settings-command-button",
|
|
40555
|
-
|
|
40695
|
+
extAction === "update" ? copy.updating : formatMessage(copy.updateToVersion, { version: catalogEntry.version })
|
|
40556
40696
|
);
|
|
40557
40697
|
updateButton.type = "button";
|
|
40558
40698
|
updateButton.dataset.action = "update";
|
|
40559
|
-
updateButton.
|
|
40699
|
+
updateButton.setAttribute("aria-busy", String(extAction === "update"));
|
|
40700
|
+
updateButton.disabled = controlsDisabled || !state.canInstall;
|
|
40560
40701
|
updateButton.addEventListener("click", () => {
|
|
40561
40702
|
if (!updateButton.disabled) onInstall?.(catalogEntry, true);
|
|
40562
40703
|
});
|
|
@@ -40564,7 +40705,7 @@ ${error62.stderrTail}`] : []
|
|
|
40564
40705
|
}
|
|
40565
40706
|
const blocked = isToggleBlocked(installed);
|
|
40566
40707
|
modalToggle.checked = installed.enabled;
|
|
40567
|
-
modalToggle.disabled =
|
|
40708
|
+
modalToggle.disabled = controlsDisabled || blocked;
|
|
40568
40709
|
modalToggle.setAttribute(
|
|
40569
40710
|
"aria-label",
|
|
40570
40711
|
formatMessage(copy.toggleLabel, { name: displayName })
|
|
@@ -40575,7 +40716,7 @@ ${error62.stderrTail}`] : []
|
|
|
40575
40716
|
const openPageButton = createEl(document2, "button", "settings-command-button");
|
|
40576
40717
|
openPageButton.type = "button";
|
|
40577
40718
|
openPageButton.dataset.action = "open-page";
|
|
40578
|
-
openPageButton.disabled =
|
|
40719
|
+
openPageButton.disabled = controlsDisabled;
|
|
40579
40720
|
openPageButton.append(
|
|
40580
40721
|
createRendererSettingsIcon("external-link", 13),
|
|
40581
40722
|
createEl(document2, "span", "", copy.openPage)
|
|
@@ -40595,7 +40736,7 @@ ${error62.stderrTail}`] : []
|
|
|
40595
40736
|
);
|
|
40596
40737
|
openSettingsButton.type = "button";
|
|
40597
40738
|
openSettingsButton.dataset.action = "open-settings";
|
|
40598
|
-
openSettingsButton.disabled =
|
|
40739
|
+
openSettingsButton.disabled = controlsDisabled;
|
|
40599
40740
|
openSettingsButton.append(
|
|
40600
40741
|
createRendererSettingsIcon("settings", 13),
|
|
40601
40742
|
createEl(document2, "span", "", copy.openExtensionSettings)
|
|
@@ -40624,11 +40765,12 @@ ${error62.stderrTail}`] : []
|
|
|
40624
40765
|
document2,
|
|
40625
40766
|
"button",
|
|
40626
40767
|
"settings-command-button settings-command-button--secondary settings-command-button--danger",
|
|
40627
|
-
|
|
40768
|
+
extAction === "uninstall" ? copy.uninstalling : copy.uninstallConfirm
|
|
40628
40769
|
);
|
|
40629
40770
|
confirmButton.type = "button";
|
|
40630
40771
|
confirmButton.dataset.action = "confirm-uninstall";
|
|
40631
|
-
confirmButton.
|
|
40772
|
+
confirmButton.setAttribute("aria-busy", String(extAction === "uninstall"));
|
|
40773
|
+
confirmButton.disabled = controlsDisabled;
|
|
40632
40774
|
confirmButton.addEventListener("click", () => {
|
|
40633
40775
|
if (!confirmButton.disabled) onUninstall?.(installed);
|
|
40634
40776
|
});
|
|
@@ -40640,9 +40782,9 @@ ${error62.stderrTail}`] : []
|
|
|
40640
40782
|
);
|
|
40641
40783
|
cancelButton.type = "button";
|
|
40642
40784
|
cancelButton.dataset.action = "cancel-uninstall";
|
|
40643
|
-
cancelButton.disabled =
|
|
40785
|
+
cancelButton.disabled = controlsDisabled;
|
|
40644
40786
|
cancelButton.addEventListener("click", () => {
|
|
40645
|
-
if (
|
|
40787
|
+
if (controlsDisabled) return;
|
|
40646
40788
|
confirmingUninstall = false;
|
|
40647
40789
|
if (currentState) {
|
|
40648
40790
|
renderContent(extensionId, currentItem, currentCatalogEntry, currentState);
|
|
@@ -40658,13 +40800,13 @@ ${error62.stderrTail}`] : []
|
|
|
40658
40800
|
);
|
|
40659
40801
|
uninstallButton.type = "button";
|
|
40660
40802
|
uninstallButton.dataset.action = "uninstall";
|
|
40661
|
-
uninstallButton.disabled =
|
|
40803
|
+
uninstallButton.disabled = controlsDisabled;
|
|
40662
40804
|
uninstallButton.append(
|
|
40663
40805
|
createRendererSettingsIcon("trash", 13),
|
|
40664
40806
|
createEl(document2, "span", "", copy.uninstall)
|
|
40665
40807
|
);
|
|
40666
40808
|
uninstallButton.addEventListener("click", () => {
|
|
40667
|
-
if (
|
|
40809
|
+
if (controlsDisabled) return;
|
|
40668
40810
|
confirmingUninstall = true;
|
|
40669
40811
|
if (currentState) {
|
|
40670
40812
|
renderContent(extensionId, currentItem, currentCatalogEntry, currentState);
|
|
@@ -40697,7 +40839,7 @@ ${error62.stderrTail}`] : []
|
|
|
40697
40839
|
} else {
|
|
40698
40840
|
delete dialog.dataset.extensionState;
|
|
40699
40841
|
}
|
|
40700
|
-
if (state.
|
|
40842
|
+
if (state.pendingMutations.has(extensionId)) dialog.dataset.busy = "true";
|
|
40701
40843
|
else delete dialog.dataset.busy;
|
|
40702
40844
|
const categories = (installed?.state === "valid" ? installed.manifest.categories : void 0) ?? catalogEntry?.categories;
|
|
40703
40845
|
const iconUrl = resolveInstalledExtensionIconUrl(installed, catalogEntry);
|
|
@@ -40982,7 +41124,8 @@ ${error62.stderrTail}`] : []
|
|
|
40982
41124
|
modalToggle.addEventListener("change", () => {
|
|
40983
41125
|
if (!currentItem || !modalToggle) return;
|
|
40984
41126
|
const desired = modalToggle.checked;
|
|
40985
|
-
|
|
41127
|
+
const isBusyThis = currentState?.globalBusy || Boolean(currentState?.pendingMutations.has(currentItem.id));
|
|
41128
|
+
if (isBusyThis || isToggleBlocked(currentItem)) {
|
|
40986
41129
|
modalToggle.checked = currentItem.enabled;
|
|
40987
41130
|
return;
|
|
40988
41131
|
}
|
|
@@ -41583,9 +41726,8 @@ ${error62.stderrTail}`] : []
|
|
|
41583
41726
|
visibleEntries,
|
|
41584
41727
|
installedById,
|
|
41585
41728
|
canInstall,
|
|
41586
|
-
|
|
41587
|
-
|
|
41588
|
-
activeMutationAction,
|
|
41729
|
+
pendingMutations,
|
|
41730
|
+
globalBusy,
|
|
41589
41731
|
onOpenDetails,
|
|
41590
41732
|
onInstall,
|
|
41591
41733
|
onViewInstalled
|
|
@@ -41598,22 +41740,26 @@ ${error62.stderrTail}`] : []
|
|
|
41598
41740
|
const installed = installedById.get(entry.id);
|
|
41599
41741
|
const updateAvailable = hasCatalogUpdate(installed, entry);
|
|
41600
41742
|
const installState = installed ? updateAvailable ? "update" : "installed" : "available";
|
|
41601
|
-
const
|
|
41743
|
+
const entryAction = pendingMutations.get(entry.id) ?? null;
|
|
41744
|
+
const isBusyCard = entryAction !== null;
|
|
41745
|
+
const controlsDisabled = isBusyCard || globalBusy;
|
|
41602
41746
|
const actionButton = createEl(document2, "button");
|
|
41603
41747
|
actionButton.type = "button";
|
|
41604
41748
|
actionButton.dataset.extensionId = entry.id;
|
|
41605
41749
|
if (installState === "available") {
|
|
41606
41750
|
actionButton.className = "settings-command-button settings-extensions-card__button";
|
|
41607
41751
|
actionButton.dataset.action = "install";
|
|
41608
|
-
const installingThis =
|
|
41752
|
+
const installingThis = entryAction === "install";
|
|
41609
41753
|
actionButton.textContent = installingThis ? copy.installing : copy.install;
|
|
41610
|
-
actionButton.
|
|
41754
|
+
actionButton.setAttribute("aria-busy", String(installingThis));
|
|
41755
|
+
actionButton.disabled = controlsDisabled || !canInstall;
|
|
41611
41756
|
} else if (installState === "update") {
|
|
41612
41757
|
actionButton.className = "settings-command-button settings-extensions-card__button settings-extensions-card__button--update";
|
|
41613
41758
|
actionButton.dataset.action = "update";
|
|
41614
|
-
const updatingThis =
|
|
41759
|
+
const updatingThis = entryAction === "update";
|
|
41615
41760
|
actionButton.textContent = updatingThis ? copy.updating : copy.update;
|
|
41616
|
-
actionButton.
|
|
41761
|
+
actionButton.setAttribute("aria-busy", String(updatingThis));
|
|
41762
|
+
actionButton.disabled = controlsDisabled || !canInstall;
|
|
41617
41763
|
} else {
|
|
41618
41764
|
actionButton.className = "settings-command-button settings-command-button--secondary settings-extensions-card__button settings-extensions-card__button--installed";
|
|
41619
41765
|
actionButton.dataset.action = "installed";
|
|
@@ -41621,7 +41767,7 @@ ${error62.stderrTail}`] : []
|
|
|
41621
41767
|
createRendererSettingsIcon("check", 12),
|
|
41622
41768
|
createEl(document2, "span", "", copy.installedBadge)
|
|
41623
41769
|
);
|
|
41624
|
-
actionButton.disabled =
|
|
41770
|
+
actionButton.disabled = controlsDisabled;
|
|
41625
41771
|
}
|
|
41626
41772
|
actionButton.addEventListener("click", (event) => {
|
|
41627
41773
|
event.stopPropagation?.();
|
|
@@ -41934,16 +42080,18 @@ ${error62.stderrTail}`] : []
|
|
|
41934
42080
|
let loading = false;
|
|
41935
42081
|
let catalogLoading = false;
|
|
41936
42082
|
let catalogRequestToken = 0;
|
|
41937
|
-
let
|
|
41938
|
-
|
|
41939
|
-
let
|
|
42083
|
+
let listApplyToken = 0;
|
|
42084
|
+
const pendingMutations = /* @__PURE__ */ new Map();
|
|
42085
|
+
let importing = false;
|
|
42086
|
+
let recovering = false;
|
|
42087
|
+
let toggleQueue = Promise.resolve();
|
|
41940
42088
|
let pollTimer;
|
|
41941
42089
|
let activeRecoveryDialog = null;
|
|
41942
42090
|
let selectedCapability = "all";
|
|
41943
42091
|
let selectedCategory = null;
|
|
41944
42092
|
let searchQuery = "";
|
|
41945
|
-
let
|
|
41946
|
-
|
|
42093
|
+
let modalFeedback = null;
|
|
42094
|
+
const hasPendingMutations = () => pendingMutations.size > 0 || importing || recovering;
|
|
41947
42095
|
const clientCapabilities = () => {
|
|
41948
42096
|
const client = resolveAvailableClient(getClient);
|
|
41949
42097
|
return {
|
|
@@ -42002,10 +42150,9 @@ ${error62.stderrTail}`] : []
|
|
|
42002
42150
|
unavailable,
|
|
42003
42151
|
canInstall,
|
|
42004
42152
|
canUninstall,
|
|
42005
|
-
|
|
42006
|
-
|
|
42007
|
-
|
|
42008
|
-
feedback: modalFeedbackExtensionId !== null && modalFeedbackExtensionId === detailModal.extensionId ? currentFeedback : null
|
|
42153
|
+
pendingMutations: new Map(pendingMutations),
|
|
42154
|
+
globalBusy: recovering,
|
|
42155
|
+
feedback: modalFeedback !== null && modalFeedback.extensionId === detailModal.extensionId ? modalFeedback.feedback : null
|
|
42009
42156
|
};
|
|
42010
42157
|
};
|
|
42011
42158
|
const detailModal = createDesktopExtensionDetailModal({
|
|
@@ -42046,7 +42193,7 @@ ${error62.stderrTail}`] : []
|
|
|
42046
42193
|
if (pageId) context.navigateToPage?.(pageId);
|
|
42047
42194
|
} : void 0,
|
|
42048
42195
|
onClose: () => {
|
|
42049
|
-
|
|
42196
|
+
modalFeedback = null;
|
|
42050
42197
|
}
|
|
42051
42198
|
});
|
|
42052
42199
|
const createModal = createDesktopExtensionCreateModal({
|
|
@@ -42066,8 +42213,10 @@ ${error62.stderrTail}`] : []
|
|
|
42066
42213
|
}
|
|
42067
42214
|
});
|
|
42068
42215
|
const setFeedback = (next, modalExtensionId = null) => {
|
|
42069
|
-
|
|
42070
|
-
|
|
42216
|
+
if (modalExtensionId !== null) {
|
|
42217
|
+
modalFeedback = next ? { extensionId: modalExtensionId, feedback: next } : null;
|
|
42218
|
+
return;
|
|
42219
|
+
}
|
|
42071
42220
|
if (!next) {
|
|
42072
42221
|
banner.hidden = true;
|
|
42073
42222
|
bannerText.textContent = "";
|
|
@@ -42086,14 +42235,13 @@ ${error62.stderrTail}`] : []
|
|
|
42086
42235
|
};
|
|
42087
42236
|
const syncToolbarState = () => {
|
|
42088
42237
|
const activeLoading = activeTab === "installed" ? loading : catalogLoading;
|
|
42089
|
-
|
|
42090
|
-
refreshButton.disabled = busy;
|
|
42238
|
+
refreshButton.disabled = activeLoading || recovering;
|
|
42091
42239
|
refreshButton.setAttribute("aria-busy", String(activeLoading));
|
|
42092
42240
|
refreshButton.title = activeLoading ? copy.refreshing : copy.refresh;
|
|
42093
42241
|
refreshButton.setAttribute("aria-label", activeLoading ? copy.refreshing : copy.refresh);
|
|
42094
42242
|
const { canInstall, canRecover } = clientCapabilities();
|
|
42095
|
-
importButton.disabled =
|
|
42096
|
-
recoveryMenuItem.disabled =
|
|
42243
|
+
importButton.disabled = importing || recovering || !canInstall;
|
|
42244
|
+
recoveryMenuItem.disabled = hasPendingMutations() || !canRecover;
|
|
42097
42245
|
installedTabLabel.textContent = formatMessage(copy.tabInstalled, {
|
|
42098
42246
|
count: String(listing?.extensions.length ?? 0)
|
|
42099
42247
|
});
|
|
@@ -42272,7 +42420,7 @@ ${error62.stderrTail}`] : []
|
|
|
42272
42420
|
}
|
|
42273
42421
|
closeHeaderMenus();
|
|
42274
42422
|
if (detailModal.extensionId !== extensionId) {
|
|
42275
|
-
|
|
42423
|
+
modalFeedback = null;
|
|
42276
42424
|
}
|
|
42277
42425
|
detailModal.open(extensionId, buildDetailModalState());
|
|
42278
42426
|
};
|
|
@@ -42283,10 +42431,13 @@ ${error62.stderrTail}`] : []
|
|
|
42283
42431
|
const errorId = preferenceId(`host-ext-error-${item.id}`);
|
|
42284
42432
|
const blocked = isToggleBlocked(item);
|
|
42285
42433
|
const statusState = itemStatusState(item);
|
|
42434
|
+
const extAction = pendingMutations.get(item.id) ?? null;
|
|
42435
|
+
const isExtBusy = extAction !== null;
|
|
42436
|
+
const controlsDisabled = isExtBusy || recovering;
|
|
42286
42437
|
const toggle = createPreferenceSwitch(document2, switchId, errorId);
|
|
42287
42438
|
toggle.checked = item.enabled;
|
|
42288
42439
|
toggle.setAttribute("aria-label", formatMessage(copy.toggleLabel, { name: displayName }));
|
|
42289
|
-
toggle.disabled =
|
|
42440
|
+
toggle.disabled = controlsDisabled || blocked;
|
|
42290
42441
|
if (blocked) {
|
|
42291
42442
|
toggle.title = blockedToggleReason(item, copy);
|
|
42292
42443
|
}
|
|
@@ -42297,7 +42448,7 @@ ${error62.stderrTail}`] : []
|
|
|
42297
42448
|
toggle.addEventListener("keydown", stopTrigger);
|
|
42298
42449
|
toggle.addEventListener("change", () => {
|
|
42299
42450
|
const desired = toggle.checked;
|
|
42300
|
-
if (
|
|
42451
|
+
if (recovering || pendingMutations.has(item.id) || blocked) {
|
|
42301
42452
|
toggle.checked = item.enabled;
|
|
42302
42453
|
return;
|
|
42303
42454
|
}
|
|
@@ -42314,7 +42465,7 @@ ${error62.stderrTail}`] : []
|
|
|
42314
42465
|
btn.type = "button";
|
|
42315
42466
|
btn.dataset.action = "open-page";
|
|
42316
42467
|
btn.dataset.extensionId = item.id;
|
|
42317
|
-
btn.disabled =
|
|
42468
|
+
btn.disabled = controlsDisabled;
|
|
42318
42469
|
btn.addEventListener("click", (event) => {
|
|
42319
42470
|
event.stopPropagation?.();
|
|
42320
42471
|
if (!btn.disabled) openExtensionPage(item);
|
|
@@ -42324,7 +42475,7 @@ ${error62.stderrTail}`] : []
|
|
|
42324
42475
|
}
|
|
42325
42476
|
let update;
|
|
42326
42477
|
if (catalogEntry && hasCatalogUpdate(item, catalogEntry)) {
|
|
42327
|
-
const updating =
|
|
42478
|
+
const updating = extAction === "update";
|
|
42328
42479
|
const button2 = createEl(
|
|
42329
42480
|
document2,
|
|
42330
42481
|
"button",
|
|
@@ -42334,7 +42485,7 @@ ${error62.stderrTail}`] : []
|
|
|
42334
42485
|
button2.type = "button";
|
|
42335
42486
|
button2.dataset.action = "update";
|
|
42336
42487
|
button2.setAttribute("aria-busy", String(updating));
|
|
42337
|
-
button2.disabled =
|
|
42488
|
+
button2.disabled = controlsDisabled || !canUpdate;
|
|
42338
42489
|
button2.addEventListener("click", () => {
|
|
42339
42490
|
if (!button2.disabled) void installFromCatalog(catalogEntry, true);
|
|
42340
42491
|
});
|
|
@@ -42368,7 +42519,7 @@ ${error62.stderrTail}`] : []
|
|
|
42368
42519
|
capabilityBadges: deriveCapabilityBadges(itemCapabilities(item), copy),
|
|
42369
42520
|
secondaryAction: openPageButton,
|
|
42370
42521
|
actionControl: toggle,
|
|
42371
|
-
busy:
|
|
42522
|
+
busy: isExtBusy,
|
|
42372
42523
|
dataset: {
|
|
42373
42524
|
extensionState: statusState,
|
|
42374
42525
|
trustTier: catalogEntry?.trustTier
|
|
@@ -42505,7 +42656,7 @@ ${error62.stderrTail}`] : []
|
|
|
42505
42656
|
{
|
|
42506
42657
|
label: copy.retry,
|
|
42507
42658
|
onClick: () => {
|
|
42508
|
-
if (!catalogLoading && !
|
|
42659
|
+
if (!catalogLoading && !recovering) {
|
|
42509
42660
|
void loadCatalog({ forceRefresh: true, silent: false });
|
|
42510
42661
|
}
|
|
42511
42662
|
}
|
|
@@ -42520,9 +42671,9 @@ ${error62.stderrTail}`] : []
|
|
|
42520
42671
|
document2,
|
|
42521
42672
|
messages,
|
|
42522
42673
|
catalog,
|
|
42523
|
-
catalogLoading ||
|
|
42674
|
+
catalogLoading || recovering,
|
|
42524
42675
|
() => {
|
|
42525
|
-
if (!catalogLoading && !
|
|
42676
|
+
if (!catalogLoading && !recovering) {
|
|
42526
42677
|
void loadCatalog({ forceRefresh: true, silent: false });
|
|
42527
42678
|
}
|
|
42528
42679
|
},
|
|
@@ -42584,9 +42735,8 @@ ${error62.stderrTail}`] : []
|
|
|
42584
42735
|
visibleEntries,
|
|
42585
42736
|
installedById,
|
|
42586
42737
|
canInstall,
|
|
42587
|
-
|
|
42588
|
-
|
|
42589
|
-
activeMutationAction,
|
|
42738
|
+
pendingMutations,
|
|
42739
|
+
globalBusy: recovering,
|
|
42590
42740
|
onOpenDetails: openDetailModal,
|
|
42591
42741
|
onInstall: (entry, isUpdate) => {
|
|
42592
42742
|
void installFromCatalog(entry, isUpdate);
|
|
@@ -42602,7 +42752,7 @@ ${error62.stderrTail}`] : []
|
|
|
42602
42752
|
render();
|
|
42603
42753
|
},
|
|
42604
42754
|
onRetryCatalog: () => {
|
|
42605
|
-
if (!catalogLoading && !
|
|
42755
|
+
if (!catalogLoading && !recovering) {
|
|
42606
42756
|
void loadCatalog({ forceRefresh: true, silent: false });
|
|
42607
42757
|
}
|
|
42608
42758
|
}
|
|
@@ -42638,14 +42788,16 @@ ${error62.stderrTail}`] : []
|
|
|
42638
42788
|
clearPollTimer();
|
|
42639
42789
|
if (disposed || context.signal.aborted || document2.visibilityState === "hidden") return;
|
|
42640
42790
|
pollTimer = setTimeout(() => {
|
|
42641
|
-
if (disposed || context.signal.aborted ||
|
|
42791
|
+
if (disposed || context.signal.aborted || hasPendingMutations() || loading || activeRecoveryDialog || importModal.isOpen) {
|
|
42642
42792
|
schedulePoll();
|
|
42643
42793
|
return;
|
|
42644
42794
|
}
|
|
42645
42795
|
void loadInstalled({ silent: true });
|
|
42646
42796
|
}, POLL_INTERVAL_MS2);
|
|
42647
42797
|
};
|
|
42648
|
-
const applyLoadedList = (result) => {
|
|
42798
|
+
const applyLoadedList = (result, token) => {
|
|
42799
|
+
if (token !== void 0 && token !== listApplyToken) return false;
|
|
42800
|
+
if (token === void 0) listApplyToken += 1;
|
|
42649
42801
|
const hadOpenPageId = pageHost.extensionId;
|
|
42650
42802
|
listing = result;
|
|
42651
42803
|
pluginPages?.syncInstalledExtensions?.(result.extensions, result.configuration.revision);
|
|
@@ -42653,6 +42805,18 @@ ${error62.stderrTail}`] : []
|
|
|
42653
42805
|
if (hadOpenPageId && !pageHost.isOpen) {
|
|
42654
42806
|
setFeedback({ tone: "info", text: copy.pageClosedDisabled });
|
|
42655
42807
|
}
|
|
42808
|
+
return true;
|
|
42809
|
+
};
|
|
42810
|
+
const refreshInstalledAfterMutation = async () => {
|
|
42811
|
+
const client = resolveAvailableClient(getClient);
|
|
42812
|
+
if (!client?.listHostExtensions) return;
|
|
42813
|
+
const token = ++listApplyToken;
|
|
42814
|
+
try {
|
|
42815
|
+
const refreshed = await client.listHostExtensions();
|
|
42816
|
+
if (disposed || context.signal.aborted) return;
|
|
42817
|
+
applyLoadedList(refreshed, token);
|
|
42818
|
+
} catch {
|
|
42819
|
+
}
|
|
42656
42820
|
};
|
|
42657
42821
|
const loadInstalled = async (options = {}) => {
|
|
42658
42822
|
const silent = options.silent ?? false;
|
|
@@ -42673,17 +42837,23 @@ ${error62.stderrTail}`] : []
|
|
|
42673
42837
|
render();
|
|
42674
42838
|
}
|
|
42675
42839
|
const listHostExtensions = client.listHostExtensions.bind(client);
|
|
42840
|
+
const token = ++listApplyToken;
|
|
42676
42841
|
await context.runLatest(async () => listHostExtensions(), {
|
|
42677
42842
|
success(result) {
|
|
42678
42843
|
loading = false;
|
|
42679
42844
|
unavailable = false;
|
|
42680
|
-
applyLoadedList(result);
|
|
42681
|
-
if (!keepFeedback) setFeedback(null);
|
|
42845
|
+
const applied = applyLoadedList(result, token);
|
|
42846
|
+
if (applied && !keepFeedback) setFeedback(null);
|
|
42682
42847
|
render();
|
|
42683
42848
|
schedulePoll();
|
|
42684
42849
|
},
|
|
42685
42850
|
failure(error62) {
|
|
42686
42851
|
loading = false;
|
|
42852
|
+
if (token !== listApplyToken) {
|
|
42853
|
+
render();
|
|
42854
|
+
schedulePoll();
|
|
42855
|
+
return;
|
|
42856
|
+
}
|
|
42687
42857
|
if (error62 instanceof RendererMethodUnavailableError) {
|
|
42688
42858
|
unavailable = true;
|
|
42689
42859
|
listing = null;
|
|
@@ -42754,7 +42924,8 @@ ${error62.stderrTail}`] : []
|
|
|
42754
42924
|
}
|
|
42755
42925
|
};
|
|
42756
42926
|
const installFromCatalog = async (entry, isUpdate) => {
|
|
42757
|
-
if (
|
|
42927
|
+
if (recovering || pendingMutations.has(entry.id) || disposed || context.signal.aborted)
|
|
42928
|
+
return;
|
|
42758
42929
|
const client = resolveAvailableClient(getClient);
|
|
42759
42930
|
const installedItem = listing?.extensions.find((item) => item.id === entry.id);
|
|
42760
42931
|
const canUpdate = isUpdate && installedItem?.state === "valid" && Boolean(client?.updateHostExtension);
|
|
@@ -42762,10 +42933,7 @@ ${error62.stderrTail}`] : []
|
|
|
42762
42933
|
const update = client?.updateHostExtension?.bind(client);
|
|
42763
42934
|
if (!canUpdate && !install) return;
|
|
42764
42935
|
const fallbackName = catalogDisplayName(entry, messages.locale);
|
|
42765
|
-
|
|
42766
|
-
mutating = true;
|
|
42767
|
-
activeMutationId = entry.id;
|
|
42768
|
-
activeMutationAction = isUpdate ? "update" : "install";
|
|
42936
|
+
pendingMutations.set(entry.id, isUpdate ? "update" : "install");
|
|
42769
42937
|
clearPollTimer();
|
|
42770
42938
|
render();
|
|
42771
42939
|
try {
|
|
@@ -42786,6 +42954,7 @@ ${error62.stderrTail}`] : []
|
|
|
42786
42954
|
}
|
|
42787
42955
|
if (disposed || context.signal.aborted) return;
|
|
42788
42956
|
const displayName = result.manifest.name[messages.locale] || result.manifest.name.en || fallbackName;
|
|
42957
|
+
const modalTargetId = detailModal.extensionId === entry.id ? entry.id : null;
|
|
42789
42958
|
setFeedback(
|
|
42790
42959
|
{
|
|
42791
42960
|
tone: "success",
|
|
@@ -42796,14 +42965,10 @@ ${error62.stderrTail}`] : []
|
|
|
42796
42965
|
},
|
|
42797
42966
|
modalTargetId
|
|
42798
42967
|
);
|
|
42799
|
-
|
|
42800
|
-
const refreshed = await client.listHostExtensions();
|
|
42801
|
-
if (!disposed && !context.signal.aborted) {
|
|
42802
|
-
applyLoadedList(refreshed);
|
|
42803
|
-
}
|
|
42804
|
-
}
|
|
42968
|
+
await refreshInstalledAfterMutation();
|
|
42805
42969
|
} catch (error62) {
|
|
42806
42970
|
if (disposed || context.signal.aborted) return;
|
|
42971
|
+
const modalTargetId = detailModal.extensionId === entry.id ? entry.id : null;
|
|
42807
42972
|
setFeedback(
|
|
42808
42973
|
{
|
|
42809
42974
|
tone: "danger",
|
|
@@ -42812,24 +42977,21 @@ ${error62.stderrTail}`] : []
|
|
|
42812
42977
|
modalTargetId
|
|
42813
42978
|
);
|
|
42814
42979
|
} finally {
|
|
42980
|
+
pendingMutations.delete(entry.id);
|
|
42815
42981
|
if (!disposed && !context.signal.aborted) {
|
|
42816
|
-
mutating = false;
|
|
42817
|
-
activeMutationId = null;
|
|
42818
|
-
activeMutationAction = null;
|
|
42819
42982
|
render();
|
|
42820
|
-
schedulePoll();
|
|
42983
|
+
if (!hasPendingMutations()) schedulePoll();
|
|
42821
42984
|
}
|
|
42822
42985
|
}
|
|
42823
42986
|
};
|
|
42824
42987
|
const importExtension = async (source) => {
|
|
42988
|
+
if (importing || recovering) return;
|
|
42825
42989
|
const client = resolveAvailableClient(getClient);
|
|
42826
42990
|
const install = client?.installHostExtension?.bind(client);
|
|
42827
42991
|
if (!install) {
|
|
42828
42992
|
throw new Error(copy.importUnavailable);
|
|
42829
42993
|
}
|
|
42830
|
-
|
|
42831
|
-
activeMutationId = null;
|
|
42832
|
-
activeMutationAction = "install";
|
|
42994
|
+
importing = true;
|
|
42833
42995
|
clearPollTimer();
|
|
42834
42996
|
syncToolbarState();
|
|
42835
42997
|
try {
|
|
@@ -42849,32 +43011,23 @@ ${error62.stderrTail}`] : []
|
|
|
42849
43011
|
version: result.manifest.version
|
|
42850
43012
|
})
|
|
42851
43013
|
});
|
|
42852
|
-
|
|
42853
|
-
const refreshed = await client.listHostExtensions();
|
|
42854
|
-
if (!disposed && !context.signal.aborted) {
|
|
42855
|
-
applyLoadedList(refreshed);
|
|
42856
|
-
}
|
|
42857
|
-
}
|
|
43014
|
+
await refreshInstalledAfterMutation();
|
|
42858
43015
|
} finally {
|
|
43016
|
+
importing = false;
|
|
42859
43017
|
if (!disposed && !context.signal.aborted) {
|
|
42860
|
-
mutating = false;
|
|
42861
|
-
activeMutationId = null;
|
|
42862
|
-
activeMutationAction = null;
|
|
42863
43018
|
render();
|
|
42864
|
-
schedulePoll();
|
|
43019
|
+
if (!hasPendingMutations()) schedulePoll();
|
|
42865
43020
|
}
|
|
42866
43021
|
}
|
|
42867
43022
|
};
|
|
42868
43023
|
const uninstallExtension = async (item) => {
|
|
42869
|
-
if (
|
|
43024
|
+
if (recovering || pendingMutations.has(item.id) || disposed || context.signal.aborted)
|
|
43025
|
+
return;
|
|
42870
43026
|
const client = resolveAvailableClient(getClient);
|
|
42871
43027
|
const uninstall = client?.uninstallHostExtension?.bind(client);
|
|
42872
43028
|
if (!uninstall) return;
|
|
42873
43029
|
const displayName = extensionDisplayName(item, messages.locale);
|
|
42874
|
-
|
|
42875
|
-
mutating = true;
|
|
42876
|
-
activeMutationId = item.id;
|
|
42877
|
-
activeMutationAction = "uninstall";
|
|
43030
|
+
pendingMutations.set(item.id, "uninstall");
|
|
42878
43031
|
clearPollTimer();
|
|
42879
43032
|
render();
|
|
42880
43033
|
try {
|
|
@@ -42886,19 +43039,17 @@ ${error62.stderrTail}`] : []
|
|
|
42886
43039
|
if (pageHost.extensionId === item.id) {
|
|
42887
43040
|
pageHost.close();
|
|
42888
43041
|
}
|
|
42889
|
-
detailModal.
|
|
43042
|
+
if (detailModal.extensionId === item.id) {
|
|
43043
|
+
detailModal.close();
|
|
43044
|
+
}
|
|
42890
43045
|
setFeedback({
|
|
42891
43046
|
tone: "success",
|
|
42892
43047
|
text: formatMessage(copy.uninstalledSuccess, { name: displayName })
|
|
42893
43048
|
});
|
|
42894
|
-
|
|
42895
|
-
const refreshed = await client.listHostExtensions();
|
|
42896
|
-
if (!disposed && !context.signal.aborted) {
|
|
42897
|
-
applyLoadedList(refreshed);
|
|
42898
|
-
}
|
|
42899
|
-
}
|
|
43049
|
+
await refreshInstalledAfterMutation();
|
|
42900
43050
|
} catch (error62) {
|
|
42901
43051
|
if (disposed || context.signal.aborted) return;
|
|
43052
|
+
const modalTargetId = detailModal.extensionId === item.id ? item.id : null;
|
|
42902
43053
|
setFeedback(
|
|
42903
43054
|
{
|
|
42904
43055
|
tone: "danger",
|
|
@@ -42907,17 +43058,16 @@ ${error62.stderrTail}`] : []
|
|
|
42907
43058
|
modalTargetId
|
|
42908
43059
|
);
|
|
42909
43060
|
} finally {
|
|
43061
|
+
pendingMutations.delete(item.id);
|
|
42910
43062
|
if (!disposed && !context.signal.aborted) {
|
|
42911
|
-
mutating = false;
|
|
42912
|
-
activeMutationId = null;
|
|
42913
|
-
activeMutationAction = null;
|
|
42914
43063
|
render();
|
|
42915
|
-
schedulePoll();
|
|
43064
|
+
if (!hasPendingMutations()) schedulePoll();
|
|
42916
43065
|
}
|
|
42917
43066
|
}
|
|
42918
43067
|
};
|
|
42919
43068
|
const toggleExtension = async (item, enable) => {
|
|
42920
|
-
if (
|
|
43069
|
+
if (recovering || pendingMutations.has(item.id) || disposed || context.signal.aborted)
|
|
43070
|
+
return;
|
|
42921
43071
|
const client = resolveAvailableClient(getClient);
|
|
42922
43072
|
const mutate = enable ? client?.enableHostExtension?.bind(client) : client?.disableHostExtension?.bind(client);
|
|
42923
43073
|
if (!mutate) {
|
|
@@ -42925,17 +43075,17 @@ ${error62.stderrTail}`] : []
|
|
|
42925
43075
|
render();
|
|
42926
43076
|
return;
|
|
42927
43077
|
}
|
|
42928
|
-
const expectedRevision2 = listing?.configuration.revision ?? 0;
|
|
42929
43078
|
const displayName = extensionDisplayName(item, messages.locale);
|
|
42930
|
-
|
|
42931
|
-
mutating = true;
|
|
42932
|
-
activeMutationId = item.id;
|
|
42933
|
-
activeMutationAction = "toggle";
|
|
43079
|
+
pendingMutations.set(item.id, "toggle");
|
|
42934
43080
|
clearPollTimer();
|
|
42935
43081
|
render();
|
|
42936
|
-
|
|
43082
|
+
let shouldReload = false;
|
|
43083
|
+
const runQueued = toggleQueue.then(async () => {
|
|
43084
|
+
if (disposed || context.signal.aborted) return;
|
|
43085
|
+
const expectedRevision2 = listing?.configuration.revision ?? 0;
|
|
42937
43086
|
const result = await mutate({ id: item.id, expectedRevision: expectedRevision2 });
|
|
42938
43087
|
if (disposed || context.signal.aborted) return;
|
|
43088
|
+
const modalTargetId = detailModal.extensionId === item.id ? item.id : null;
|
|
42939
43089
|
if (result.state === "saved") {
|
|
42940
43090
|
if (!enable && pageHost.extensionId === item.id) {
|
|
42941
43091
|
pageHost.close();
|
|
@@ -42958,14 +43108,17 @@ ${error62.stderrTail}`] : []
|
|
|
42958
43108
|
},
|
|
42959
43109
|
modalTargetId
|
|
42960
43110
|
);
|
|
42961
|
-
|
|
42962
|
-
activeMutationId = null;
|
|
42963
|
-
activeMutationAction = null;
|
|
42964
|
-
render();
|
|
42965
|
-
await loadInstalled({ silent: true, keepFeedback: true });
|
|
43111
|
+
shouldReload = true;
|
|
42966
43112
|
return;
|
|
42967
43113
|
}
|
|
42968
43114
|
if (result.state === "revision-conflict") {
|
|
43115
|
+
listApplyToken += 1;
|
|
43116
|
+
if (listing) {
|
|
43117
|
+
listing = {
|
|
43118
|
+
...listing,
|
|
43119
|
+
configuration: { ...listing.configuration, revision: result.revision }
|
|
43120
|
+
};
|
|
43121
|
+
}
|
|
42969
43122
|
setFeedback(
|
|
42970
43123
|
{
|
|
42971
43124
|
tone: "warning",
|
|
@@ -42973,13 +43126,15 @@ ${error62.stderrTail}`] : []
|
|
|
42973
43126
|
},
|
|
42974
43127
|
modalTargetId
|
|
42975
43128
|
);
|
|
42976
|
-
|
|
42977
|
-
activeMutationId = null;
|
|
42978
|
-
activeMutationAction = null;
|
|
42979
|
-
render();
|
|
42980
|
-
await loadInstalled({ silent: true, keepFeedback: true });
|
|
42981
|
-
return;
|
|
43129
|
+
shouldReload = true;
|
|
42982
43130
|
}
|
|
43131
|
+
});
|
|
43132
|
+
toggleQueue = runQueued.then(
|
|
43133
|
+
() => void 0,
|
|
43134
|
+
() => void 0
|
|
43135
|
+
);
|
|
43136
|
+
try {
|
|
43137
|
+
await runQueued;
|
|
42983
43138
|
} catch (error62) {
|
|
42984
43139
|
if (disposed || context.signal.aborted) return;
|
|
42985
43140
|
if (error62 instanceof RendererMethodUnavailableError) {
|
|
@@ -42988,6 +43143,7 @@ ${error62.stderrTail}`] : []
|
|
|
42988
43143
|
setFeedback(null);
|
|
42989
43144
|
return;
|
|
42990
43145
|
}
|
|
43146
|
+
const modalTargetId = detailModal.extensionId === item.id ? item.id : null;
|
|
42991
43147
|
setFeedback(
|
|
42992
43148
|
{
|
|
42993
43149
|
tone: "danger",
|
|
@@ -42996,17 +43152,20 @@ ${error62.stderrTail}`] : []
|
|
|
42996
43152
|
modalTargetId
|
|
42997
43153
|
);
|
|
42998
43154
|
} finally {
|
|
43155
|
+
pendingMutations.delete(item.id);
|
|
42999
43156
|
if (!disposed && !context.signal.aborted) {
|
|
43000
|
-
mutating = false;
|
|
43001
|
-
activeMutationId = null;
|
|
43002
|
-
activeMutationAction = null;
|
|
43003
43157
|
render();
|
|
43004
|
-
|
|
43158
|
+
if (shouldReload) {
|
|
43159
|
+
await loadInstalled({ silent: true, keepFeedback: true });
|
|
43160
|
+
} else if (!hasPendingMutations()) {
|
|
43161
|
+
schedulePoll();
|
|
43162
|
+
}
|
|
43005
43163
|
}
|
|
43006
43164
|
}
|
|
43007
43165
|
};
|
|
43008
43166
|
const openRecoveryDialog = () => {
|
|
43009
|
-
if (disposed || context.signal.aborted ||
|
|
43167
|
+
if (disposed || context.signal.aborted || hasPendingMutations() || activeRecoveryDialog)
|
|
43168
|
+
return;
|
|
43010
43169
|
const client = resolveAvailableClient(getClient);
|
|
43011
43170
|
if (!client?.recoverHostExtensions) return;
|
|
43012
43171
|
detailModal.close();
|
|
@@ -43065,7 +43224,7 @@ ${error62.stderrTail}`] : []
|
|
|
43065
43224
|
context.signal.addEventListener("abort", cleanupDialog, { once: true });
|
|
43066
43225
|
form.addEventListener("submit", (event) => {
|
|
43067
43226
|
event.preventDefault();
|
|
43068
|
-
if (dialogBusy ||
|
|
43227
|
+
if (dialogBusy || hasPendingMutations()) return;
|
|
43069
43228
|
const recover = resolveAvailableClient(getClient)?.recoverHostExtensions;
|
|
43070
43229
|
if (!recover) {
|
|
43071
43230
|
modal.close();
|
|
@@ -43075,9 +43234,9 @@ ${error62.stderrTail}`] : []
|
|
|
43075
43234
|
}
|
|
43076
43235
|
dialogError.textContent = "";
|
|
43077
43236
|
setDialogBusy(true);
|
|
43078
|
-
|
|
43237
|
+
recovering = true;
|
|
43079
43238
|
clearPollTimer();
|
|
43080
|
-
|
|
43239
|
+
render();
|
|
43081
43240
|
const params = listing !== null ? { expectedRevision: listing.configuration.revision } : {};
|
|
43082
43241
|
void recover(params).then(async (result) => {
|
|
43083
43242
|
if (disposed || context.signal.aborted) return;
|
|
@@ -43097,31 +43256,40 @@ ${error62.stderrTail}`] : []
|
|
|
43097
43256
|
tone: "info",
|
|
43098
43257
|
text: copy.recoverySaved
|
|
43099
43258
|
});
|
|
43100
|
-
|
|
43259
|
+
recovering = false;
|
|
43101
43260
|
modal.close();
|
|
43102
43261
|
render();
|
|
43103
43262
|
await loadInstalled({ silent: true, keepFeedback: true });
|
|
43104
43263
|
return;
|
|
43105
43264
|
}
|
|
43106
43265
|
if (result.state === "revision-conflict") {
|
|
43266
|
+
listApplyToken += 1;
|
|
43267
|
+
if (listing) {
|
|
43268
|
+
listing = {
|
|
43269
|
+
...listing,
|
|
43270
|
+
configuration: { ...listing.configuration, revision: result.revision }
|
|
43271
|
+
};
|
|
43272
|
+
}
|
|
43107
43273
|
setFeedback({
|
|
43108
43274
|
tone: "warning",
|
|
43109
43275
|
text: copy.revisionConflictBanner
|
|
43110
43276
|
});
|
|
43111
|
-
|
|
43277
|
+
recovering = false;
|
|
43112
43278
|
modal.close();
|
|
43113
43279
|
render();
|
|
43114
43280
|
await loadInstalled({ silent: true, keepFeedback: true });
|
|
43115
43281
|
return;
|
|
43116
43282
|
}
|
|
43117
|
-
|
|
43283
|
+
recovering = false;
|
|
43118
43284
|
setDialogBusy(false);
|
|
43119
|
-
|
|
43285
|
+
render();
|
|
43286
|
+
schedulePoll();
|
|
43120
43287
|
}).catch((error62) => {
|
|
43121
43288
|
if (disposed || context.signal.aborted) return;
|
|
43122
|
-
|
|
43289
|
+
recovering = false;
|
|
43123
43290
|
setDialogBusy(false);
|
|
43124
|
-
|
|
43291
|
+
render();
|
|
43292
|
+
schedulePoll();
|
|
43125
43293
|
if (error62 instanceof RendererMethodUnavailableError) {
|
|
43126
43294
|
modal.close();
|
|
43127
43295
|
unavailable = true;
|
|
@@ -43152,7 +43320,7 @@ ${error62.stderrTail}`] : []
|
|
|
43152
43320
|
};
|
|
43153
43321
|
const onVisibilityChange = () => {
|
|
43154
43322
|
if (document2.visibilityState === "hidden") clearPollTimer();
|
|
43155
|
-
else if (!disposed && !context.signal.aborted && !
|
|
43323
|
+
else if (!disposed && !context.signal.aborted && !hasPendingMutations() && !loading && !activeRecoveryDialog && !importModal.isOpen) {
|
|
43156
43324
|
void loadInstalled({ silent: true });
|
|
43157
43325
|
}
|
|
43158
43326
|
};
|
|
@@ -43241,14 +43409,14 @@ ${error62.stderrTail}`] : []
|
|
|
43241
43409
|
createModal.open();
|
|
43242
43410
|
});
|
|
43243
43411
|
importButton.addEventListener("click", () => {
|
|
43244
|
-
if (
|
|
43412
|
+
if (importing || recovering || !clientCapabilities().canInstall) return;
|
|
43245
43413
|
closeHeaderMenus();
|
|
43246
43414
|
detailModal.close();
|
|
43247
43415
|
createModal.close();
|
|
43248
43416
|
importModal.open();
|
|
43249
43417
|
});
|
|
43250
43418
|
refreshButton.addEventListener("click", () => {
|
|
43251
|
-
if (
|
|
43419
|
+
if (recovering) return;
|
|
43252
43420
|
closeHeaderMenus();
|
|
43253
43421
|
if (activeTab === "marketplace") {
|
|
43254
43422
|
if (!catalogLoading) void loadCatalog({ forceRefresh: true, silent: false });
|
|
@@ -43258,7 +43426,7 @@ ${error62.stderrTail}`] : []
|
|
|
43258
43426
|
}
|
|
43259
43427
|
});
|
|
43260
43428
|
bannerRetry.addEventListener("click", () => {
|
|
43261
|
-
if (
|
|
43429
|
+
if (recovering) return;
|
|
43262
43430
|
if (activeTab === "marketplace") {
|
|
43263
43431
|
if (!catalogLoading) void loadCatalog({ forceRefresh: true, silent: false });
|
|
43264
43432
|
} else if (!loading) {
|
|
@@ -47078,6 +47246,12 @@ ${error62.stderrTail}`] : []
|
|
|
47078
47246
|
panel.replaceChildren();
|
|
47079
47247
|
panel.append(createPanelHead(document2, viewPhase, message2));
|
|
47080
47248
|
appendServiceStopOutput(status);
|
|
47249
|
+
if (status?.phase === "failed" && status.error) {
|
|
47250
|
+
const error62 = document2.createElement("p");
|
|
47251
|
+
error62.className = "settings-update-error";
|
|
47252
|
+
error62.textContent = status.error;
|
|
47253
|
+
panel.append(error62);
|
|
47254
|
+
}
|
|
47081
47255
|
setManualFallback(viewPhase === "failed");
|
|
47082
47256
|
if (status?.phase === "downloading" && status.totalBytes !== void 0 && status.downloadedBytes !== void 0) {
|
|
47083
47257
|
const progress = document2.createElement("progress");
|