@codexhost/cli-win32-arm64 0.26.1 → 0.28.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 +1010 -592
- package/app/console-web.js +1861 -1498
- package/app/desktop-controller.mjs +488 -245
- package/app/host-runtime.mjs +9177 -4006
- package/app/plugins/antigravity/plugin.mjs +9055 -548
- package/app/plugins/claude-code/plugin.mjs +1117 -423
- package/app/plugins/codebuddy/plugin.mjs +599 -261
- package/app/plugins/codex-usage/plugin.mjs +1808 -1357
- package/app/plugins/copilot/plugin.mjs +491 -235
- package/app/plugins/cursor-cli/plugin.mjs +487 -232
- package/app/plugins/deepseek-harness/plugin.mjs +493 -235
- package/app/plugins/devin/plugin.mjs +467 -232
- package/app/plugins/grok/plugin.mjs +547 -253
- package/app/plugins/hermes/plugin.mjs +468 -232
- package/app/plugins/kimi-code/plugin.mjs +762 -439
- package/app/plugins/kiro-cli/plugin.mjs +466 -232
- package/app/plugins/omp/plugin.mjs +1705 -1356
- package/app/plugins/opencode/manifest.json +1 -1
- package/app/plugins/opencode/plugin.mjs +544 -250
- package/app/plugins/pi/plugin.mjs +761 -364
- package/app/plugins/qoder/plugin.mjs +540 -246
- package/app/plugins/qoder-cn/plugin.mjs +540 -246
- package/app/plugins/qwen-code/plugin.mjs +466 -232
- package/app/plugins/workbuddy/plugin.mjs +594 -273
- package/app/plugins/zcode/plugin.mjs +468 -232
- package/app/renderer-extension.js +2653 -657
- package/app/web/assets/index-DBPgg32z.css +1 -0
- package/app/web/assets/index-DWxiVzuS.js +204 -0
- package/app/web/codexhost-settings.js +101 -66
- package/app/web/index.html +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +65 -65
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +69 -69
- 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 +73 -73
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +19 -19
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- 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 +5 -5
- 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-documentpreview/client.pdf.js +2 -2
- 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 +5065 -1964
- 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
|
@@ -20263,6 +20263,38 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
20263
20263
|
// ../../shared-contracts/dist/harness-route-limit.js
|
|
20264
20264
|
var HARNESS_TRANSPORT_MODEL_ID_MAX_LENGTH = 8192;
|
|
20265
20265
|
|
|
20266
|
+
// ../../shared-contracts/dist/thread-handoff.js
|
|
20267
|
+
var nonBlankTextSchema2 = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
20268
|
+
message: "Value must not be empty or whitespace"
|
|
20269
|
+
});
|
|
20270
|
+
var THREAD_HANDOFF_METHOD = "codexhost/thread/handoff";
|
|
20271
|
+
var threadHandoffParamsSchema = external_exports.object({
|
|
20272
|
+
sourceThreadId: hostThreadIdSchema,
|
|
20273
|
+
lastTurnId: hostTurnIdSchema.optional(),
|
|
20274
|
+
targetHarnessId: harnessIdSchema,
|
|
20275
|
+
targetModel: nonBlankTextSchema2.max(1024).optional(),
|
|
20276
|
+
targetThinkingOptionId: nonBlankTextSchema2.max(128).regex(/^[A-Za-z0-9._~-]+$/u, "Thinking option ID must use transport-safe characters").optional()
|
|
20277
|
+
}).strict();
|
|
20278
|
+
var threadHandoffMetadataSchema = external_exports.object({
|
|
20279
|
+
sourceThreadId: hostThreadIdSchema,
|
|
20280
|
+
sourceHarnessId: harnessIdSchema,
|
|
20281
|
+
sourceHarnessLabel: nonBlankTextSchema2.max(256).optional(),
|
|
20282
|
+
sourceModel: nonBlankTextSchema2.max(1024).optional(),
|
|
20283
|
+
targetHarnessId: harnessIdSchema,
|
|
20284
|
+
targetHarnessLabel: nonBlankTextSchema2.max(256).optional(),
|
|
20285
|
+
targetModel: nonBlankTextSchema2.max(1024).optional(),
|
|
20286
|
+
totalTurns: external_exports.number().int().min(1),
|
|
20287
|
+
boundaryTurnNumber: external_exports.number().int().min(1),
|
|
20288
|
+
includedTurnNumbers: external_exports.array(external_exports.number().int().min(1)),
|
|
20289
|
+
omittedTurns: external_exports.number().int().min(0),
|
|
20290
|
+
preview: external_exports.string().max(32e3),
|
|
20291
|
+
createdAtMs: external_exports.number().int().nonnegative()
|
|
20292
|
+
}).strict();
|
|
20293
|
+
var threadHandoffResultSchema = external_exports.object({
|
|
20294
|
+
threadId: hostThreadIdSchema,
|
|
20295
|
+
handoff: threadHandoffMetadataSchema
|
|
20296
|
+
}).strict();
|
|
20297
|
+
|
|
20266
20298
|
// ../../shared-contracts/dist/thread-usage.js
|
|
20267
20299
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
20268
20300
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
@@ -20446,7 +20478,7 @@ var HARNESS_MODEL_REF_MAX_LENGTH = 512;
|
|
|
20446
20478
|
var HARNESS_MODEL_LABEL_MAX_LENGTH = 256;
|
|
20447
20479
|
var HARNESS_THINKING_OPTION_ID_MAX_LENGTH = 128;
|
|
20448
20480
|
var THREAD_OWNERSHIP_LIST_MAX_LENGTH = 100;
|
|
20449
|
-
var
|
|
20481
|
+
var nonBlankTextSchema3 = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
20450
20482
|
message: "Value must not be empty or whitespace"
|
|
20451
20483
|
});
|
|
20452
20484
|
var harnessModelRefIdSchema = external_exports.string().min(1).max(HARNESS_MODEL_REF_MAX_LENGTH).refine((id2) => !new RegExp("\\p{Cc}", "u").test(id2), "Model Ref must not contain control characters").brand();
|
|
@@ -20458,15 +20490,15 @@ var harnessModelRefSchema = external_exports.object({
|
|
|
20458
20490
|
function sameHarnessModelRef(left, right) {
|
|
20459
20491
|
return left?.id === right?.id && left?.serviceTier === right?.serviceTier;
|
|
20460
20492
|
}
|
|
20461
|
-
var harnessThinkingOptionIdSchema =
|
|
20462
|
-
var harnessResolvedModelLabelSchema =
|
|
20493
|
+
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();
|
|
20494
|
+
var harnessResolvedModelLabelSchema = nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH);
|
|
20463
20495
|
var harnessThinkingOptionSchema = external_exports.object({
|
|
20464
20496
|
id: harnessThinkingOptionIdSchema,
|
|
20465
|
-
label:
|
|
20497
|
+
label: nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH)
|
|
20466
20498
|
}).strict();
|
|
20467
20499
|
var harnessModelSchema = external_exports.object({
|
|
20468
20500
|
ref: harnessModelRefSchema,
|
|
20469
|
-
label:
|
|
20501
|
+
label: nonBlankTextSchema3.max(HARNESS_MODEL_LABEL_MAX_LENGTH),
|
|
20470
20502
|
resolvedModelLabel: harnessResolvedModelLabelSchema.optional(),
|
|
20471
20503
|
/** Optional opaque selection for this same Model with priority processing enabled. */
|
|
20472
20504
|
fastModel: harnessModelRefSchema.optional(),
|
|
@@ -20493,11 +20525,21 @@ var harnessThinkingOptionsSchema = external_exports.array(harnessThinkingOptionS
|
|
|
20493
20525
|
ids.add(option.id);
|
|
20494
20526
|
}
|
|
20495
20527
|
});
|
|
20528
|
+
var harnessThinkingOptionsScopeSchema = external_exports.enum(["catalog", "activeModel"]);
|
|
20496
20529
|
var harnessModelCatalogSchema = external_exports.object({
|
|
20497
20530
|
models: external_exports.array(harnessModelSchema),
|
|
20498
20531
|
defaultModel: harnessModelRefSchema.optional(),
|
|
20499
20532
|
thinkingOptions: harnessThinkingOptionsSchema,
|
|
20500
|
-
defaultThinkingOptionId: harnessThinkingOptionIdSchema.optional()
|
|
20533
|
+
defaultThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
20534
|
+
/**
|
|
20535
|
+
* Scope of per-Model `supportedThinkingOptionIds` in this catalog.
|
|
20536
|
+
* Omitted or `"catalog"` means each Model's `supportedThinkingOptionIds`
|
|
20537
|
+
* reflects its own options (omitted or `[]` means none).
|
|
20538
|
+
* `"activeModel"` means only the active Model's Thinking options were
|
|
20539
|
+
* observed; other Models omit `supportedThinkingOptionIds` and must be
|
|
20540
|
+
* validated by the Adapter after selecting the Model.
|
|
20541
|
+
*/
|
|
20542
|
+
thinkingOptionsScope: harnessThinkingOptionsScopeSchema.optional()
|
|
20501
20543
|
}).strict().superRefine((catalog, context) => {
|
|
20502
20544
|
const refs = [];
|
|
20503
20545
|
const thinkingIds = new Set(catalog.thinkingOptions.map(({ id: id2 }) => id2));
|
|
@@ -20630,7 +20672,7 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
20630
20672
|
]);
|
|
20631
20673
|
var harnessInspectParamsSchema = external_exports.object({
|
|
20632
20674
|
harnessId: harnessIdSchema,
|
|
20633
|
-
cwd:
|
|
20675
|
+
cwd: nonBlankTextSchema3.max(16384).optional(),
|
|
20634
20676
|
refresh: external_exports.boolean().optional(),
|
|
20635
20677
|
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
20636
20678
|
purpose: external_exports.literal("availability").optional(),
|
|
@@ -20660,12 +20702,13 @@ var codexThreadInspectionSchema = external_exports.object({
|
|
|
20660
20702
|
effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
20661
20703
|
effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
20662
20704
|
history: harnessHistoryCapabilitiesSchema.optional(),
|
|
20663
|
-
supportsThreadReferences: external_exports.literal(true).optional()
|
|
20705
|
+
supportsThreadReferences: external_exports.literal(true).optional(),
|
|
20706
|
+
handoff: threadHandoffMetadataSchema.optional()
|
|
20664
20707
|
}).strict();
|
|
20665
20708
|
var externalThreadInspectionSchema = external_exports.object({
|
|
20666
20709
|
owner: external_exports.literal("external"),
|
|
20667
|
-
harnessId:
|
|
20668
|
-
transportModelId:
|
|
20710
|
+
harnessId: nonBlankTextSchema3.max(256),
|
|
20711
|
+
transportModelId: nonBlankTextSchema3.max(HARNESS_TRANSPORT_MODEL_ID_MAX_LENGTH),
|
|
20669
20712
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
20670
20713
|
resolvedModelLabel: harnessResolvedModelLabelSchema.optional(),
|
|
20671
20714
|
effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
@@ -20675,6 +20718,7 @@ var externalThreadInspectionSchema = external_exports.object({
|
|
|
20675
20718
|
catalog: harnessModelCatalogSchema.optional(),
|
|
20676
20719
|
history: harnessHistoryCapabilitiesSchema,
|
|
20677
20720
|
usage: threadUsageSnapshotSchema.optional(),
|
|
20721
|
+
handoff: threadHandoffMetadataSchema.optional(),
|
|
20678
20722
|
locked: external_exports.literal(true)
|
|
20679
20723
|
}).strict();
|
|
20680
20724
|
var threadInspectionSchema = external_exports.discriminatedUnion("owner", [
|
|
@@ -21312,6 +21356,7 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21312
21356
|
"codexhost/harness/preferences/get",
|
|
21313
21357
|
"codexhost/harness/preferences/patch",
|
|
21314
21358
|
"thread/list",
|
|
21359
|
+
"thread/metadata/update",
|
|
21315
21360
|
"codexhost/thread/catalog/read",
|
|
21316
21361
|
"thread/read",
|
|
21317
21362
|
"thread/resume",
|
|
@@ -21336,6 +21381,10 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21336
21381
|
"thread/queue/start",
|
|
21337
21382
|
"codexhost/thread/queue/send-now",
|
|
21338
21383
|
"codexhost/workspace/read",
|
|
21384
|
+
"project/create",
|
|
21385
|
+
"project/update",
|
|
21386
|
+
"project/delete",
|
|
21387
|
+
"project/move",
|
|
21339
21388
|
"codexhost/thread/tree/read",
|
|
21340
21389
|
"codexhost/thread/pins/list",
|
|
21341
21390
|
"codexhost/thread/sections/list",
|
|
@@ -21353,6 +21402,7 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21353
21402
|
"codexhost/harness/commands/inspect",
|
|
21354
21403
|
"codexhost/thread/command/execute",
|
|
21355
21404
|
"codexhost/thread/fork",
|
|
21405
|
+
THREAD_HANDOFF_METHOD,
|
|
21356
21406
|
"codexhost/harness/session-import/sources",
|
|
21357
21407
|
"codexhost/harness/session-import/list",
|
|
21358
21408
|
"codexhost/harness/session-import/import",
|
|
@@ -21403,7 +21453,13 @@ var clientProjectlessWorkspaceSchema = external_exports.object({
|
|
|
21403
21453
|
prompt: external_exports.string().max(16384).optional()
|
|
21404
21454
|
}).strict();
|
|
21405
21455
|
var clientWorkspaceSnapshotSchema = external_exports.object({
|
|
21406
|
-
projects: external_exports.array(external_exports.object({
|
|
21456
|
+
projects: external_exports.array(external_exports.object({
|
|
21457
|
+
id: external_exports.string(),
|
|
21458
|
+
name: external_exports.string(),
|
|
21459
|
+
rootPaths: external_exports.array(external_exports.string()),
|
|
21460
|
+
createdAt: external_exports.number().int().optional()
|
|
21461
|
+
})),
|
|
21462
|
+
nativeProjects: external_exports.literal(true).optional(),
|
|
21407
21463
|
assignments: external_exports.record(external_exports.string(), external_exports.string()),
|
|
21408
21464
|
projectless: external_exports.array(external_exports.string()),
|
|
21409
21465
|
/** Canonical external pin membership; pins/list provides the native merged order. */
|
|
@@ -21418,6 +21474,7 @@ var clientChannelCursorSchema = external_exports.object({
|
|
|
21418
21474
|
sequence: external_exports.number().int().nonnegative()
|
|
21419
21475
|
});
|
|
21420
21476
|
var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
21477
|
+
external_exports.object({ type: external_exports.literal("projects-changed"), cursor: clientChannelCursorSchema }),
|
|
21421
21478
|
external_exports.object({
|
|
21422
21479
|
type: external_exports.literal("skills-changed"),
|
|
21423
21480
|
cursor: clientChannelCursorSchema,
|
|
@@ -21581,7 +21638,8 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
21581
21638
|
items: external_exports.array(clientQueuedSubmissionSchema),
|
|
21582
21639
|
pausedReason: external_exports.enum(["interrupted", "outcome-unknown", "failed"]).nullable()
|
|
21583
21640
|
}).optional(),
|
|
21584
|
-
interactions: external_exports.array(clientInteractionSchema)
|
|
21641
|
+
interactions: external_exports.array(clientInteractionSchema),
|
|
21642
|
+
handoff: threadHandoffMetadataSchema.optional()
|
|
21585
21643
|
});
|
|
21586
21644
|
var clientChannelDescriptorSchema = external_exports.object({
|
|
21587
21645
|
version: external_exports.literal(CLIENT_CHANNEL_VERSION),
|
|
@@ -21590,7 +21648,10 @@ var clientChannelDescriptorSchema = external_exports.object({
|
|
|
21590
21648
|
port: external_exports.number().int().min(1).max(65535),
|
|
21591
21649
|
token: external_exports.string().regex(/^[0-9a-f]{64}$/u),
|
|
21592
21650
|
startedAt: external_exports.number(),
|
|
21593
|
-
epoch: external_exports.string().uuid()
|
|
21651
|
+
epoch: external_exports.string().uuid(),
|
|
21652
|
+
capabilities: external_exports.object({
|
|
21653
|
+
peerDelegation: external_exports.literal(1).optional()
|
|
21654
|
+
}).optional()
|
|
21594
21655
|
});
|
|
21595
21656
|
var clientChannelResponseSchema = external_exports.object({
|
|
21596
21657
|
epoch: external_exports.string().uuid(),
|
|
@@ -21609,10 +21670,18 @@ var threadCatalogReadParamsSchema = external_exports.object({
|
|
|
21609
21670
|
* `excludeCwds` folder, the branch ends, or a page bound is reached. Every row read is
|
|
21610
21671
|
* returned, so the native cursors stay contiguous.
|
|
21611
21672
|
*/
|
|
21612
|
-
scope: external_exports.
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21673
|
+
scope: external_exports.union([
|
|
21674
|
+
external_exports.object({
|
|
21675
|
+
cwd: external_exports.string().min(1).max(4096),
|
|
21676
|
+
excludeCwds: external_exports.array(external_exports.string().min(1).max(4096)).max(1024)
|
|
21677
|
+
}).strict(),
|
|
21678
|
+
external_exports.object({
|
|
21679
|
+
projectId: external_exports.string().min(1).max(1024),
|
|
21680
|
+
legacyThreadIds: external_exports.array(external_exports.string().min(1).max(1024)).max(1024),
|
|
21681
|
+
/** Roots whose Threads without a project ID belong to this project, as on Desktop. */
|
|
21682
|
+
rootPaths: external_exports.array(external_exports.string().min(1).max(4096)).max(1024).optional()
|
|
21683
|
+
}).strict()
|
|
21684
|
+
]).optional()
|
|
21616
21685
|
}).strict();
|
|
21617
21686
|
var threadCatalogReadResultSchema = external_exports.object({
|
|
21618
21687
|
threads: external_exports.array(jsonObjectSchema),
|
|
@@ -21799,1403 +21868,1568 @@ var delegationReadParamsSchema = external_exports.strictObject({
|
|
|
21799
21868
|
to: external_exports.number().int().min(1).max(Number.MAX_SAFE_INTEGER).optional()
|
|
21800
21869
|
});
|
|
21801
21870
|
|
|
21802
|
-
// ../../shared-contracts/dist/
|
|
21803
|
-
var
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
sourceId: external_exports.string().min(1).max(256),
|
|
21826
|
-
name: credentialImportNameSchema,
|
|
21827
|
-
confirmed: external_exports.literal(true)
|
|
21828
|
-
}).strict(),
|
|
21829
|
-
external_exports.object({
|
|
21830
|
-
action: external_exports.literal("remove"),
|
|
21831
|
-
name: credentialImportNameSchema,
|
|
21832
|
-
confirmed: external_exports.literal(true)
|
|
21833
|
-
}).strict()
|
|
21871
|
+
// ../../shared-contracts/dist/remote-peers.js
|
|
21872
|
+
var REMOTE_PEER_ID_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/u;
|
|
21873
|
+
var remotePeerIdSchema = external_exports.string().regex(REMOTE_PEER_ID_PATTERN);
|
|
21874
|
+
var remotePeerNodeIdSchema = external_exports.string().regex(REMOTE_PEER_ID_PATTERN);
|
|
21875
|
+
var remotePeerHostIdSchema = external_exports.string().regex(/^remote-peer:[a-zA-Z0-9_-]{1,64}$/u);
|
|
21876
|
+
var remotePeerTransportKindSchema = external_exports.enum(["relay", "tailscale", "lan", "custom"]);
|
|
21877
|
+
var REMOTE_PEER_COLORS = [
|
|
21878
|
+
"blue",
|
|
21879
|
+
"purple",
|
|
21880
|
+
"cyan",
|
|
21881
|
+
"green",
|
|
21882
|
+
"amber",
|
|
21883
|
+
"rose",
|
|
21884
|
+
"slate"
|
|
21885
|
+
];
|
|
21886
|
+
var remotePeerColorSchema = external_exports.enum(REMOTE_PEER_COLORS);
|
|
21887
|
+
var REMOTE_PEER_COLOR_SET = new Set(REMOTE_PEER_COLORS);
|
|
21888
|
+
var remotePeerStateSchema = external_exports.enum([
|
|
21889
|
+
"connected",
|
|
21890
|
+
"connecting",
|
|
21891
|
+
"auth-error",
|
|
21892
|
+
"offline",
|
|
21893
|
+
"disabled"
|
|
21834
21894
|
]);
|
|
21835
|
-
var
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21844
|
-
sources: external_exports.array(credentialSourceSchema),
|
|
21845
|
-
targets: external_exports.array(external_exports.object({
|
|
21846
|
-
harnessId: external_exports.string(),
|
|
21847
|
-
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
21848
|
-
imports: external_exports.array(credentialImportRecordSchema),
|
|
21849
|
-
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
21850
|
-
}).strict())
|
|
21851
|
-
}).strict();
|
|
21852
|
-
var credentialImportsParamsSchema = external_exports.object({
|
|
21853
|
-
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
21854
|
-
request: credentialImportsRequestSchema
|
|
21855
|
-
}).strict();
|
|
21856
|
-
|
|
21857
|
-
// ../../shared-contracts/dist/harness-display-settings.js
|
|
21858
|
-
var harnessDisplayCapabilitiesSchema = external_exports.object({ events: external_exports.boolean() });
|
|
21859
|
-
var harnessDisplayEntriesSchema = external_exports.array(external_exports.strictObject({
|
|
21860
|
-
agent: external_exports.string().min(1).max(128),
|
|
21861
|
-
section: external_exports.enum(["main", "more", "auto"])
|
|
21862
|
-
})).max(256).refine((entries) => new Set(entries.map((entry) => entry.agent)).size === entries.length, "Duplicate Harness IDs");
|
|
21863
|
-
var harnessDisplaySettingsSchema = external_exports.strictObject({
|
|
21864
|
-
entries: harnessDisplayEntriesSchema.nullable()
|
|
21865
|
-
});
|
|
21866
|
-
var harnessDisplayGetSchema = external_exports.strictObject({});
|
|
21867
|
-
var harnessDisplaySetSchema = external_exports.strictObject({
|
|
21868
|
-
entries: harnessDisplayEntriesSchema,
|
|
21869
|
-
/** Import legacy Desktop preferences only if no shared settings exist yet. */
|
|
21870
|
-
initializeOnly: external_exports.boolean().optional()
|
|
21871
|
-
});
|
|
21872
|
-
|
|
21873
|
-
// ../../shared-contracts/dist/idle-release.js
|
|
21874
|
-
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
21875
|
-
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
21876
|
-
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
21895
|
+
var remotePeerSummarySchema = external_exports.object({
|
|
21896
|
+
peerId: remotePeerIdSchema,
|
|
21897
|
+
hostId: remotePeerHostIdSchema,
|
|
21898
|
+
nodeId: remotePeerNodeIdSchema.optional(),
|
|
21899
|
+
name: external_exports.string().min(1).max(120),
|
|
21900
|
+
color: remotePeerColorSchema.optional(),
|
|
21901
|
+
origin: external_exports.string().min(1).max(2048),
|
|
21902
|
+
transportKind: remotePeerTransportKindSchema,
|
|
21903
|
+
encrypted: external_exports.boolean(),
|
|
21877
21904
|
enabled: external_exports.boolean(),
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
var newThreadDefaultsSchema = external_exports.strictObject({
|
|
21894
|
-
lastHarness: harnessIdSchema.optional(),
|
|
21895
|
-
byHarness: external_exports.record(preferenceHarnessKey, harnessDefaultConfigurationSchema)
|
|
21896
|
-
});
|
|
21897
|
-
var harnessDelegationDefaultSchema = external_exports.strictObject({
|
|
21898
|
-
model: harnessModelRefSchema.optional(),
|
|
21899
|
-
thinkingOptionId: harnessThinkingOptionIdSchema.optional()
|
|
21900
|
-
}).refine((value) => Boolean(value.model || value.thinkingOptionId), "A delegation default must contain a Model or Thinking option");
|
|
21901
|
-
var delegationDefaultsSchema = external_exports.strictObject({
|
|
21902
|
-
byHarness: external_exports.record(preferenceHarnessKey, harnessDelegationDefaultSchema)
|
|
21905
|
+
state: remotePeerStateSchema,
|
|
21906
|
+
supportsPeerPairing: external_exports.boolean().optional(),
|
|
21907
|
+
/** Omitted when either side's node mapping is unknown. */
|
|
21908
|
+
pairedBack: external_exports.boolean().optional(),
|
|
21909
|
+
/** Other configured remote peerIds on this Hub present in this peer's `manifest.peerNodes`. */
|
|
21910
|
+
linkedPeerIds: external_exports.array(remotePeerIdSchema).max(128).optional(),
|
|
21911
|
+
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
21912
|
+
version: external_exports.string().max(128).optional(),
|
|
21913
|
+
platform: external_exports.string().max(64).optional(),
|
|
21914
|
+
hostname: external_exports.string().max(255).optional(),
|
|
21915
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
21916
|
+
lastError: external_exports.string().max(1e3).optional(),
|
|
21917
|
+
projectCount: external_exports.number().int().nonnegative(),
|
|
21918
|
+
createdAt: external_exports.string(),
|
|
21919
|
+
updatedAt: external_exports.string()
|
|
21903
21920
|
});
|
|
21904
|
-
var
|
|
21905
|
-
|
|
21906
|
-
idleRelease: idleReleaseSettingsSchema.optional(),
|
|
21907
|
-
favorites: external_exports.record(preferenceHarnessKey, external_exports.array(modelId).max(2048)).default({}),
|
|
21908
|
-
newThread: newThreadDefaultsSchema.optional(),
|
|
21909
|
-
delegation: delegationDefaultsSchema.optional()
|
|
21921
|
+
var remotePeerListResultSchema = external_exports.object({
|
|
21922
|
+
peers: external_exports.array(remotePeerSummarySchema)
|
|
21910
21923
|
});
|
|
21911
|
-
var
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21924
|
+
var remotePeerAddParamsSchema = external_exports.object({
|
|
21925
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21926
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21927
|
+
token: external_exports.string().min(1).max(2048).optional(),
|
|
21928
|
+
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
21929
|
+
color: remotePeerColorSchema.optional(),
|
|
21930
|
+
pairBack: external_exports.boolean().optional(),
|
|
21931
|
+
meshPeerIds: external_exports.array(remotePeerIdSchema).max(64).optional(),
|
|
21932
|
+
selfOrigin: external_exports.string().min(1).max(2048).optional()
|
|
21933
|
+
}).refine((input3) => Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide either connectionUrl or both origin and token");
|
|
21934
|
+
var remotePeerIntroduceParamsSchema = external_exports.strictObject({
|
|
21935
|
+
origin: external_exports.string().min(1).max(2048),
|
|
21936
|
+
token: external_exports.string().min(1).max(2048),
|
|
21937
|
+
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
21938
|
+
color: remotePeerColorSchema.optional(),
|
|
21939
|
+
expectedNodeId: remotePeerNodeIdSchema.optional()
|
|
21915
21940
|
});
|
|
21916
|
-
var
|
|
21917
|
-
|
|
21941
|
+
var remotePeerIntroduceResultSchema = external_exports.object({
|
|
21942
|
+
status: external_exports.enum(["added", "updated", "existing"]),
|
|
21943
|
+
peerId: remotePeerIdSchema,
|
|
21944
|
+
hostId: remotePeerHostIdSchema,
|
|
21945
|
+
nodeId: remotePeerNodeIdSchema.optional()
|
|
21918
21946
|
});
|
|
21919
|
-
var
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
enabled: external_exports.boolean()
|
|
21926
|
-
}),
|
|
21927
|
-
external_exports.strictObject({
|
|
21928
|
-
kind: external_exports.literal("favorites"),
|
|
21929
|
-
harnessId: harnessIdSchema,
|
|
21930
|
-
modelIds: external_exports.array(modelId).max(2048)
|
|
21931
|
-
}),
|
|
21932
|
-
external_exports.strictObject({
|
|
21933
|
-
kind: external_exports.literal("newThread"),
|
|
21934
|
-
lastHarness: harnessIdSchema.optional(),
|
|
21935
|
-
harnessId: harnessIdSchema.optional(),
|
|
21936
|
-
configuration: harnessDefaultConfigurationSchema.optional()
|
|
21937
|
-
}),
|
|
21938
|
-
external_exports.strictObject({
|
|
21939
|
-
kind: external_exports.literal("delegation"),
|
|
21940
|
-
harnessId: harnessIdSchema,
|
|
21941
|
-
configuration: harnessDelegationDefaultSchema.nullable()
|
|
21942
|
-
})
|
|
21947
|
+
var remotePeerPairingStatusSchema = external_exports.enum([
|
|
21948
|
+
"added",
|
|
21949
|
+
"updated",
|
|
21950
|
+
"existing",
|
|
21951
|
+
"failed",
|
|
21952
|
+
"skipped"
|
|
21943
21953
|
]);
|
|
21944
|
-
var
|
|
21945
|
-
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
|
|
21952
|
-
ctx.addIssue({
|
|
21953
|
-
code: "custom",
|
|
21954
|
-
message: "A default Harness or complete configuration is required"
|
|
21955
|
-
});
|
|
21956
|
-
}
|
|
21954
|
+
var remotePeerPairingStepSchema = external_exports.object({
|
|
21955
|
+
targetPeerId: remotePeerIdSchema,
|
|
21956
|
+
targetName: external_exports.string().min(1).max(120),
|
|
21957
|
+
introducedHost: external_exports.union([external_exports.literal("local"), remotePeerIdSchema]),
|
|
21958
|
+
introducedName: external_exports.string().min(1).max(120),
|
|
21959
|
+
status: remotePeerPairingStatusSchema,
|
|
21960
|
+
error: external_exports.string().max(1e3).optional()
|
|
21957
21961
|
});
|
|
21958
|
-
var
|
|
21959
|
-
|
|
21960
|
-
revision: external_exports.number().int().nonnegative(),
|
|
21961
|
-
scopes: external_exports.record(harnessPreferenceScopeSchema, harnessPreferenceValuesSchema)
|
|
21962
|
+
var remotePeerPairingReportSchema = external_exports.object({
|
|
21963
|
+
results: external_exports.array(remotePeerPairingStepSchema)
|
|
21962
21964
|
});
|
|
21963
|
-
|
|
21964
|
-
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
output: usdPerMillionTokens,
|
|
21969
|
-
cacheRead: usdPerMillionTokens.optional(),
|
|
21970
|
-
cacheWrite: usdPerMillionTokens.optional(),
|
|
21971
|
-
cacheWrite1h: usdPerMillionTokens.optional()
|
|
21965
|
+
var remotePeerSyncMeshParamsSchema = external_exports.object({
|
|
21966
|
+
peerIds: external_exports.array(remotePeerIdSchema).max(64).optional(),
|
|
21967
|
+
includeSelf: external_exports.boolean().optional(),
|
|
21968
|
+
includeMesh: external_exports.boolean().optional(),
|
|
21969
|
+
selfOrigin: external_exports.string().min(1).max(2048).optional()
|
|
21972
21970
|
});
|
|
21973
|
-
var
|
|
21974
|
-
|
|
21975
|
-
|
|
21976
|
-
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21971
|
+
var remotePeerUpdateParamsSchema = external_exports.object({
|
|
21972
|
+
peerId: remotePeerIdSchema,
|
|
21973
|
+
name: external_exports.string().trim().min(1).max(120).optional(),
|
|
21974
|
+
color: remotePeerColorSchema.nullable().optional(),
|
|
21975
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21976
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21977
|
+
token: external_exports.string().min(1).max(2048).optional(),
|
|
21978
|
+
enabled: external_exports.boolean().optional()
|
|
21980
21979
|
});
|
|
21981
|
-
var
|
|
21982
|
-
|
|
21983
|
-
key: modelPriceKeySchema,
|
|
21984
|
-
price: modelPriceOverrideSchema.nullable(),
|
|
21985
|
-
previousKey: modelPriceKeySchema.optional()
|
|
21980
|
+
var remotePeerIdParamsSchema = external_exports.object({
|
|
21981
|
+
peerId: remotePeerIdSchema
|
|
21986
21982
|
});
|
|
21987
|
-
var
|
|
21988
|
-
|
|
21983
|
+
var remotePeerRemoveResultSchema = external_exports.object({
|
|
21984
|
+
removed: external_exports.boolean()
|
|
21989
21985
|
});
|
|
21990
|
-
var
|
|
21991
|
-
|
|
21992
|
-
|
|
21993
|
-
|
|
21994
|
-
|
|
21995
|
-
|
|
21996
|
-
|
|
21986
|
+
var remotePeerTestParamsSchema = external_exports.object({
|
|
21987
|
+
peerId: remotePeerIdSchema.optional(),
|
|
21988
|
+
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
21989
|
+
origin: external_exports.string().min(1).max(2048).optional(),
|
|
21990
|
+
token: external_exports.string().min(1).max(2048).optional()
|
|
21991
|
+
}).refine((input3) => Boolean(input3.peerId) || Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide peerId, connectionUrl, or both origin and token");
|
|
21992
|
+
var remotePeerTestProjectSchema = external_exports.object({
|
|
21993
|
+
id: external_exports.string().min(1).max(1024),
|
|
21994
|
+
name: external_exports.string().min(1).max(512),
|
|
21995
|
+
path: external_exports.string().min(1).max(8192)
|
|
21997
21996
|
});
|
|
21998
|
-
var
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
21997
|
+
var remotePeerTestResultSchema = external_exports.object({
|
|
21998
|
+
ok: external_exports.boolean(),
|
|
21999
|
+
nodeId: remotePeerNodeIdSchema.optional(),
|
|
22000
|
+
supportsPeerPairing: external_exports.boolean().optional(),
|
|
22001
|
+
pairedBack: external_exports.boolean().optional(),
|
|
22002
|
+
latencyMs: external_exports.number().int().nonnegative().optional(),
|
|
22003
|
+
origin: external_exports.string().max(2048).optional(),
|
|
22004
|
+
transportKind: remotePeerTransportKindSchema.optional(),
|
|
22005
|
+
encrypted: external_exports.boolean().optional(),
|
|
22006
|
+
version: external_exports.string().max(128).optional(),
|
|
22007
|
+
platform: external_exports.string().max(64).optional(),
|
|
22008
|
+
hostname: external_exports.string().max(255).optional(),
|
|
22009
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
22010
|
+
projectCount: external_exports.number().int().nonnegative().optional(),
|
|
22011
|
+
projects: external_exports.array(remotePeerTestProjectSchema).optional(),
|
|
22012
|
+
error: external_exports.string().max(1e3).optional()
|
|
22002
22013
|
});
|
|
22003
|
-
|
|
22004
|
-
|
|
22005
|
-
|
|
22006
|
-
|
|
22007
|
-
|
|
22008
|
-
var harness = external_exports.string().min(1).max(128);
|
|
22009
|
-
var model = external_exports.string().min(1).max(512);
|
|
22010
|
-
var project = external_exports.string().min(1).max(4096);
|
|
22011
|
-
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
22012
|
-
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
22013
|
-
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
22014
|
-
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
22015
|
-
try {
|
|
22016
|
-
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
22017
|
-
return true;
|
|
22018
|
-
} catch {
|
|
22019
|
-
return false;
|
|
22020
|
-
}
|
|
22021
|
-
}, "Unsupported usage statistics timezone").optional(),
|
|
22022
|
-
harness: harness.optional(),
|
|
22023
|
-
model: model.nullable().optional(),
|
|
22024
|
-
project: project.nullable().optional(),
|
|
22025
|
-
/** One date in the query timezone inside the range. */
|
|
22026
|
-
date: localDate.optional()
|
|
22014
|
+
var remotePeerManifestProjectSchema = external_exports.object({
|
|
22015
|
+
id: external_exports.string().min(1).max(1024),
|
|
22016
|
+
name: external_exports.string().min(1).max(512),
|
|
22017
|
+
path: external_exports.string().min(1).max(8192),
|
|
22018
|
+
threadIds: external_exports.array(external_exports.string().min(1).max(1024))
|
|
22027
22019
|
});
|
|
22028
|
-
var
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
costUsd: external_exports.number().finite().min(0),
|
|
22040
|
-
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
22041
|
-
unpricedRequests: count,
|
|
22042
|
-
/**
|
|
22043
|
-
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
22044
|
-
* cost, and not as unpriced.
|
|
22045
|
-
*/
|
|
22046
|
-
unmeteredRequests: count
|
|
22020
|
+
var remotePeerCapabilitiesSchema = external_exports.object({
|
|
22021
|
+
/** /api/peer/v1/uploads, /api/peer/v1/prompt, and /api/peer/v1/file are all available. */
|
|
22022
|
+
attachments: external_exports.literal(1).optional(),
|
|
22023
|
+
/** /api/peer/v1/workspace-files/rpc and /api/peer/v1/workspace-files/download are available. */
|
|
22024
|
+
workspaceFiles: external_exports.literal(1).optional(),
|
|
22025
|
+
/** Peer supports officeToPdf/render over /api/peer/v1/workspace-files/rpc. */
|
|
22026
|
+
officePreview: external_exports.literal(1).optional(),
|
|
22027
|
+
/** /api/peer/v1/delegation is available for fixed-whitelist cross-host delegation. */
|
|
22028
|
+
delegation: external_exports.literal(1).optional(),
|
|
22029
|
+
/** POST /api/peer/v1/peers is available. */
|
|
22030
|
+
peerPairing: external_exports.literal(1).optional()
|
|
22047
22031
|
});
|
|
22048
|
-
var
|
|
22049
|
-
|
|
22050
|
-
|
|
22051
|
-
|
|
22052
|
-
|
|
22053
|
-
|
|
22054
|
-
|
|
22055
|
-
|
|
22056
|
-
|
|
22057
|
-
|
|
22058
|
-
lastAtMs: count,
|
|
22059
|
-
...totals
|
|
22032
|
+
var remotePeerManifestSchema = external_exports.object({
|
|
22033
|
+
version: external_exports.string().max(128),
|
|
22034
|
+
platform: external_exports.string().max(64),
|
|
22035
|
+
hostname: external_exports.string().max(255),
|
|
22036
|
+
homeDir: external_exports.string().max(4096).optional(),
|
|
22037
|
+
epoch: external_exports.string().min(1).max(256),
|
|
22038
|
+
nodeId: remotePeerNodeIdSchema.optional(),
|
|
22039
|
+
peerNodes: external_exports.record(remotePeerHostIdSchema, remotePeerNodeIdSchema).refine((v) => Object.keys(v).length <= 128).optional(),
|
|
22040
|
+
projects: external_exports.array(remotePeerManifestProjectSchema),
|
|
22041
|
+
capabilities: remotePeerCapabilitiesSchema.optional()
|
|
22060
22042
|
});
|
|
22061
|
-
var
|
|
22062
|
-
|
|
22063
|
-
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
|
|
22072
|
-
unknownProject: external_exports.boolean(),
|
|
22073
|
-
date: localDate.nullable()
|
|
22074
|
-
}),
|
|
22075
|
-
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
22076
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
|
|
22077
|
-
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
22078
|
-
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
22079
|
-
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
22080
|
-
options: external_exports.strictObject({
|
|
22081
|
-
harnesses: external_exports.array(harness).max(256),
|
|
22082
|
-
models: external_exports.array(model.nullable()).max(4096),
|
|
22083
|
-
projects: external_exports.array(project.nullable()).max(4096)
|
|
22084
|
-
}),
|
|
22085
|
-
/** Current display metadata, scoped by Harness. Never a pricing or filter identity.
|
|
22086
|
-
* Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
|
|
22087
|
-
*/
|
|
22088
|
-
modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
|
|
22089
|
-
/** Native credits, all filters applied, never combined across Harnesses or treated as USD.
|
|
22090
|
-
* Only groups with at least one reported value appear; reportedRequests exposes partial data.
|
|
22091
|
-
*/
|
|
22092
|
-
credits: external_exports.array(external_exports.strictObject({
|
|
22093
|
-
harness,
|
|
22094
|
-
model: model.nullable(),
|
|
22095
|
-
credits: external_exports.number().finite().min(0),
|
|
22096
|
-
reportedRequests: count,
|
|
22097
|
-
requests: count
|
|
22098
|
-
})).max(4096).optional(),
|
|
22099
|
-
/** All filters applied. */
|
|
22100
|
-
totals: usageStatisticsTotalsSchema,
|
|
22101
|
-
/** Each date and Harness of the range: every filter except the day. */
|
|
22102
|
-
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
22103
|
-
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
22104
|
-
hourly: external_exports.array(external_exports.strictObject({
|
|
22105
|
-
weekday: external_exports.number().int().min(0).max(6),
|
|
22106
|
-
hour: external_exports.number().int().min(0).max(23),
|
|
22107
|
-
...totals
|
|
22108
|
-
})).max(168),
|
|
22109
|
-
byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
|
|
22110
|
-
byModel: external_exports.array(external_exports.strictObject({
|
|
22111
|
-
model: model.nullable(),
|
|
22112
|
-
...totals,
|
|
22113
|
-
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
22114
|
-
harnessPricedRequests: count
|
|
22115
|
-
})).max(4096),
|
|
22116
|
-
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
22117
|
-
/**
|
|
22118
|
-
* The sessions that spent the most, by cost and by tokens without cache, all filters applied;
|
|
22119
|
-
* requests without a native session are not listed here but count everywhere else.
|
|
22120
|
-
*/
|
|
22121
|
-
sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
|
|
22122
|
-
/**
|
|
22123
|
-
* The sessions last active in the range, newest first, all filters applied. Optional for older
|
|
22124
|
-
* Hosts; missing is treated as no list rather than no sessions.
|
|
22125
|
-
*/
|
|
22126
|
-
recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
|
|
22043
|
+
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;
|
|
22044
|
+
var remotePeerPromptParamsSchema = external_exports.strictObject({
|
|
22045
|
+
threadId: external_exports.string().min(1).max(1024),
|
|
22046
|
+
scope: external_exports.string().regex(REMOTE_PEER_UPLOAD_SCOPE_PATTERN).optional(),
|
|
22047
|
+
requestId: external_exports.string().min(1).max(256).optional(),
|
|
22048
|
+
mode: external_exports.enum(["queue", "steer"]).optional(),
|
|
22049
|
+
expectedTurnId: external_exports.string().min(1).max(1024).nullable().optional(),
|
|
22050
|
+
content: external_exports.array(external_exports.discriminatedUnion("type", [
|
|
22051
|
+
external_exports.strictObject({ type: external_exports.literal("text"), text: external_exports.string() }),
|
|
22052
|
+
external_exports.strictObject({ type: external_exports.literal("file"), receiptId: external_exports.string().min(1).max(128) })
|
|
22053
|
+
])).min(1).max(64)
|
|
22127
22054
|
});
|
|
22128
|
-
|
|
22129
|
-
|
|
22130
|
-
|
|
22131
|
-
|
|
22132
|
-
|
|
22133
|
-
|
|
22134
|
-
|
|
22055
|
+
var remotePeerErrorEnvelopeSchema = external_exports.object({
|
|
22056
|
+
ok: external_exports.literal(false),
|
|
22057
|
+
error: external_exports.object({
|
|
22058
|
+
code: external_exports.string(),
|
|
22059
|
+
message: external_exports.string(),
|
|
22060
|
+
details: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
|
|
22061
|
+
})
|
|
22062
|
+
});
|
|
22063
|
+
var remotePeerUploadResultSchema = external_exports.union([
|
|
22135
22064
|
external_exports.object({
|
|
22136
|
-
|
|
22137
|
-
|
|
22138
|
-
|
|
22139
|
-
|
|
22140
|
-
|
|
22141
|
-
|
|
22142
|
-
|
|
22143
|
-
|
|
22144
|
-
|
|
22145
|
-
allowOther: external_exports.boolean(),
|
|
22146
|
-
optional: external_exports.boolean()
|
|
22065
|
+
ok: external_exports.literal(true),
|
|
22066
|
+
value: external_exports.object({
|
|
22067
|
+
receiptId: external_exports.string().min(1),
|
|
22068
|
+
file: external_exports.object({
|
|
22069
|
+
attachmentId: external_exports.string(),
|
|
22070
|
+
name: external_exports.string(),
|
|
22071
|
+
bytes: external_exports.number().int().nonnegative()
|
|
22072
|
+
})
|
|
22073
|
+
})
|
|
22147
22074
|
}),
|
|
22075
|
+
remotePeerErrorEnvelopeSchema
|
|
22076
|
+
]);
|
|
22077
|
+
var remotePeerPromptResultSchema = external_exports.union([
|
|
22148
22078
|
external_exports.object({
|
|
22149
|
-
|
|
22150
|
-
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
secret: external_exports.literal(false),
|
|
22154
|
-
optional: external_exports.boolean(),
|
|
22155
|
-
placeholder: external_exports.string().optional(),
|
|
22156
|
-
prefill: external_exports.string().optional()
|
|
22157
|
-
})
|
|
22079
|
+
ok: external_exports.literal(true),
|
|
22080
|
+
value: external_exports.object({ accepted: external_exports.literal(true) })
|
|
22081
|
+
}),
|
|
22082
|
+
remotePeerErrorEnvelopeSchema
|
|
22158
22083
|
]);
|
|
22159
|
-
var
|
|
22160
|
-
|
|
22161
|
-
|
|
22162
|
-
|
|
22163
|
-
questions: external_exports.array(field).min(1)
|
|
22164
|
-
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
22165
|
-
message: "Shared cards require at least one multi-select question"
|
|
22084
|
+
var remotePeerDirectoryEntrySchema = external_exports.object({
|
|
22085
|
+
name: external_exports.string().min(1).max(512),
|
|
22086
|
+
path: external_exports.string().min(1).max(8192),
|
|
22087
|
+
kind: external_exports.literal("directory")
|
|
22166
22088
|
});
|
|
22167
|
-
var
|
|
22168
|
-
|
|
22169
|
-
|
|
22170
|
-
threadId: external_exports.string().min(1),
|
|
22171
|
-
turnId: external_exports.string().min(1),
|
|
22172
|
-
interactionId: external_exports.string().min(1),
|
|
22173
|
-
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
22174
|
-
cancelled: external_exports.boolean().default(false)
|
|
22089
|
+
var remotePeerListDirsParamsSchema = external_exports.object({
|
|
22090
|
+
peerId: remotePeerIdSchema,
|
|
22091
|
+
path: external_exports.string().min(1).max(8192).optional()
|
|
22175
22092
|
});
|
|
22176
|
-
var
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
|
|
22181
|
-
oldText: external_exports.string().nullable(),
|
|
22182
|
-
newText: external_exports.string()
|
|
22093
|
+
var remotePeerListDirsResultSchema = external_exports.object({
|
|
22094
|
+
path: external_exports.string().min(1).max(8192),
|
|
22095
|
+
parentPath: external_exports.string().min(1).max(8192).nullable(),
|
|
22096
|
+
homeDir: external_exports.string().min(1).max(8192).optional(),
|
|
22097
|
+
entries: external_exports.array(remotePeerDirectoryEntrySchema)
|
|
22183
22098
|
});
|
|
22184
|
-
var
|
|
22185
|
-
|
|
22186
|
-
|
|
22187
|
-
|
|
22099
|
+
var remotePeerCreateDirParamsSchema = external_exports.object({
|
|
22100
|
+
peerId: remotePeerIdSchema,
|
|
22101
|
+
parentPath: external_exports.string().min(1).max(8192),
|
|
22102
|
+
name: external_exports.string().min(1).max(255).refine((value) => value.trim().length > 0, "Directory name cannot be blank")
|
|
22188
22103
|
});
|
|
22189
|
-
var
|
|
22190
|
-
|
|
22191
|
-
|
|
22192
|
-
|
|
22193
|
-
// ../../shared-contracts/dist/web-tool-output.js
|
|
22194
|
-
var webToolOutputReferenceSchema = external_exports.object({
|
|
22195
|
-
sessionId: external_exports.string().min(1),
|
|
22196
|
-
epoch: external_exports.string().min(1),
|
|
22197
|
-
turn: external_exports.number().int().nonnegative(),
|
|
22198
|
-
seq: external_exports.number().int().nonnegative(),
|
|
22199
|
-
callId: external_exports.string().min(1),
|
|
22200
|
-
part: external_exports.number().int().nonnegative(),
|
|
22201
|
-
version: external_exports.string().min(1)
|
|
22104
|
+
var remotePeerCreateDirResultSchema = external_exports.object({
|
|
22105
|
+
path: external_exports.string().min(1).max(8192),
|
|
22106
|
+
name: external_exports.string().min(1).max(255)
|
|
22202
22107
|
});
|
|
22203
|
-
var
|
|
22204
|
-
|
|
22205
|
-
|
|
22206
|
-
|
|
22108
|
+
var remotePeerCreateWorkspaceParamsSchema = external_exports.object({
|
|
22109
|
+
peerId: remotePeerIdSchema,
|
|
22110
|
+
path: external_exports.string().min(1).max(8192),
|
|
22111
|
+
title: external_exports.string().trim().min(1).max(255).optional()
|
|
22207
22112
|
});
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
title: external_exports.string().trim().min(1).max(
|
|
22212
|
-
type: external_exports.enum(["info", "warning", "danger"]),
|
|
22213
|
-
body: external_exports.string().trim().min(1).max(16 * 1024)
|
|
22113
|
+
var remotePeerRenameWorkspaceParamsSchema = external_exports.object({
|
|
22114
|
+
peerId: remotePeerIdSchema,
|
|
22115
|
+
workspaceId: external_exports.string().min(1).max(1024),
|
|
22116
|
+
title: external_exports.string().trim().min(1).max(255)
|
|
22214
22117
|
});
|
|
22215
|
-
var
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22118
|
+
var remotePeerDeleteWorkspaceParamsSchema = external_exports.object({
|
|
22119
|
+
peerId: remotePeerIdSchema,
|
|
22120
|
+
workspaceId: external_exports.string().min(1).max(1024)
|
|
22121
|
+
});
|
|
22122
|
+
var remotePeerWorkspaceMutationResultSchema = external_exports.object({
|
|
22123
|
+
workspaceId: external_exports.string().min(1).max(1024).optional(),
|
|
22124
|
+
manifest: remotePeerManifestSchema
|
|
22125
|
+
});
|
|
22126
|
+
var delegationRemoteHostsParamsSchema = external_exports.object({
|
|
22127
|
+
sessionHostId: external_exports.string().min(1).max(128).optional()
|
|
22128
|
+
});
|
|
22129
|
+
var delegationRemoteHostOptionSchema = external_exports.object({
|
|
22130
|
+
hostId: external_exports.union([external_exports.literal("local"), remotePeerHostIdSchema]),
|
|
22131
|
+
name: external_exports.string().min(1).max(120),
|
|
22132
|
+
isLocal: external_exports.boolean().optional(),
|
|
22133
|
+
color: remotePeerColorSchema.optional(),
|
|
22134
|
+
hostname: external_exports.string().max(255).optional()
|
|
22135
|
+
});
|
|
22136
|
+
var delegationRemoteHostsResultSchema = external_exports.object({
|
|
22137
|
+
hosts: external_exports.array(delegationRemoteHostOptionSchema)
|
|
22138
|
+
});
|
|
22139
|
+
var delegationHostHarnessesParamsSchema = external_exports.object({
|
|
22140
|
+
hostId: external_exports.union([external_exports.literal("local"), remotePeerHostIdSchema])
|
|
22141
|
+
});
|
|
22142
|
+
var delegationHostHarnessOptionSchema = external_exports.object({
|
|
22143
|
+
id: external_exports.string().regex(/^[a-z0-9][a-z0-9-]*$/u),
|
|
22144
|
+
name: external_exports.string().min(1).max(120)
|
|
22145
|
+
});
|
|
22146
|
+
var delegationHostHarnessesResultSchema = external_exports.object({
|
|
22147
|
+
harnesses: external_exports.array(delegationHostHarnessOptionSchema)
|
|
22219
22148
|
});
|
|
22220
|
-
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
22221
|
-
"codexhost/console/remote-connections",
|
|
22222
|
-
"codexhost/runtime/status",
|
|
22223
|
-
"codexhost/remote/ssh-setup",
|
|
22224
|
-
"codexhost/harness/plugins/list",
|
|
22225
|
-
"codexhost/harness/display-settings/capabilities",
|
|
22226
|
-
"codexhost/harness/display-settings/get",
|
|
22227
|
-
"codexhost/harness/display-settings/set",
|
|
22228
|
-
"codexhost/harness/inspect",
|
|
22229
|
-
"codexhost/harness/installation",
|
|
22230
|
-
"codexhost/harness/installation/start",
|
|
22231
|
-
"codexhost/harness/installation/status",
|
|
22232
|
-
"codexhost/harness/launch-settings/get",
|
|
22233
|
-
"codexhost/harness/launch-settings/set",
|
|
22234
|
-
"codexhost/harness/web-ui/open",
|
|
22235
|
-
"codexhost/harness/accounts/sources",
|
|
22236
|
-
"codexhost/harness/accounts/list",
|
|
22237
|
-
"codexhost/harness/accounts/inspect",
|
|
22238
|
-
"codexhost/harness/credential-imports",
|
|
22239
|
-
"codexhost/harness/session-import/sources",
|
|
22240
|
-
"codexhost/harness/session-import/list",
|
|
22241
|
-
"codexhost/harness/session-import/import",
|
|
22242
|
-
"codexhost/account/list",
|
|
22243
|
-
"codexhost/account/refresh",
|
|
22244
|
-
"codexhost/account/usage/inspect",
|
|
22245
|
-
"codexhost/usage/model-prices/get",
|
|
22246
|
-
"codexhost/usage/model-prices/set",
|
|
22247
|
-
"codexhost/usage/model-prices/default",
|
|
22248
|
-
"codexhost/usage/statistics/get",
|
|
22249
|
-
"codexhost/update/check",
|
|
22250
|
-
"codexhost/update/start",
|
|
22251
|
-
"codexhost/update/status"
|
|
22252
|
-
]);
|
|
22253
|
-
|
|
22254
|
-
// ../../shared-contracts/dist/version.js
|
|
22255
|
-
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
22256
22149
|
|
|
22257
|
-
// ../../shared-contracts/dist/
|
|
22258
|
-
var
|
|
22259
|
-
|
|
22260
|
-
"
|
|
22261
|
-
"
|
|
22262
|
-
"
|
|
22263
|
-
"
|
|
22264
|
-
"
|
|
22265
|
-
|
|
22266
|
-
|
|
22267
|
-
"
|
|
22268
|
-
|
|
22269
|
-
|
|
22270
|
-
|
|
22271
|
-
|
|
22272
|
-
|
|
22273
|
-
|
|
22274
|
-
|
|
22150
|
+
// ../../shared-contracts/dist/peer-delegation.js
|
|
22151
|
+
var PEER_DELEGATION_BRIDGE_VERSION = 1;
|
|
22152
|
+
var PEER_DELEGATION_OPERATIONS = [
|
|
22153
|
+
"listHarnesses",
|
|
22154
|
+
"inspect",
|
|
22155
|
+
"start",
|
|
22156
|
+
"send",
|
|
22157
|
+
"cancel",
|
|
22158
|
+
"read",
|
|
22159
|
+
"answer",
|
|
22160
|
+
"list"
|
|
22161
|
+
];
|
|
22162
|
+
var peerDelegationOperationSchema = external_exports.enum(PEER_DELEGATION_OPERATIONS);
|
|
22163
|
+
var peerDelegationRequestSchema = external_exports.strictObject({
|
|
22164
|
+
operation: peerDelegationOperationSchema,
|
|
22165
|
+
hopCount: external_exports.number().int().min(0).max(16),
|
|
22166
|
+
/** Opaque A-side peer pairing identifier used by B to scope implicit deduplication per Peer. */
|
|
22167
|
+
sourceId: remotePeerIdSchema.optional(),
|
|
22168
|
+
input: jsonObjectSchema
|
|
22169
|
+
});
|
|
22170
|
+
var peerDelegationErrorSchema = external_exports.strictObject({
|
|
22171
|
+
code: external_exports.string().min(1).max(128),
|
|
22172
|
+
message: external_exports.string().max(4096),
|
|
22173
|
+
details: jsonObjectSchema.optional()
|
|
22174
|
+
});
|
|
22175
|
+
var peerDelegationResponseSchema = external_exports.union([
|
|
22176
|
+
external_exports.strictObject({
|
|
22177
|
+
ok: external_exports.literal(true),
|
|
22178
|
+
value: jsonValueSchema
|
|
22179
|
+
}),
|
|
22180
|
+
external_exports.strictObject({
|
|
22181
|
+
ok: external_exports.literal(false),
|
|
22182
|
+
error: peerDelegationErrorSchema
|
|
22183
|
+
})
|
|
22275
22184
|
]);
|
|
22276
|
-
var
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
22185
|
+
var peerDelegationHostProjectSchema = external_exports.strictObject({
|
|
22186
|
+
id: external_exports.string().min(1).max(1024),
|
|
22187
|
+
name: external_exports.string().min(1).max(512),
|
|
22188
|
+
path: external_exports.string().min(1).max(8192)
|
|
22189
|
+
});
|
|
22190
|
+
var peerDelegationHostSummarySchema = external_exports.strictObject({
|
|
22191
|
+
hostId: remotePeerHostIdSchema,
|
|
22192
|
+
nodeId: remotePeerNodeIdSchema.optional(),
|
|
22193
|
+
displayName: external_exports.string().min(1).max(120),
|
|
22194
|
+
online: external_exports.boolean(),
|
|
22195
|
+
state: remotePeerStateSchema,
|
|
22196
|
+
delegation: external_exports.boolean(),
|
|
22197
|
+
projects: external_exports.array(peerDelegationHostProjectSchema),
|
|
22198
|
+
platform: external_exports.string().max(64).optional(),
|
|
22199
|
+
hostname: external_exports.string().max(255).optional(),
|
|
22200
|
+
homeDir: external_exports.string().max(4096).optional()
|
|
22201
|
+
});
|
|
22202
|
+
var peerDelegationHostsResultSchema = external_exports.strictObject({
|
|
22203
|
+
hosts: external_exports.array(peerDelegationHostSummarySchema)
|
|
22289
22204
|
});
|
|
22205
|
+
var peerDelegationBridgeDescriptorSchema = external_exports.strictObject({
|
|
22206
|
+
version: external_exports.literal(PEER_DELEGATION_BRIDGE_VERSION),
|
|
22207
|
+
instanceId: external_exports.string().min(1).max(128),
|
|
22208
|
+
pid: external_exports.number().int().positive(),
|
|
22209
|
+
endpoint: external_exports.string().min(1).max(256),
|
|
22210
|
+
token: external_exports.string().regex(/^[0-9a-f]{64}$/u),
|
|
22211
|
+
startedAt: external_exports.number().int().nonnegative()
|
|
22212
|
+
});
|
|
22213
|
+
var peerDelegationBridgeRequestSchema = external_exports.union([
|
|
22214
|
+
external_exports.strictObject({
|
|
22215
|
+
operation: external_exports.literal("hosts")
|
|
22216
|
+
}),
|
|
22217
|
+
external_exports.strictObject({
|
|
22218
|
+
operation: peerDelegationOperationSchema,
|
|
22219
|
+
hostId: remotePeerHostIdSchema,
|
|
22220
|
+
hopCount: external_exports.number().int().min(0).max(16),
|
|
22221
|
+
timeoutMs: external_exports.number().int().min(1).max(12e4).optional(),
|
|
22222
|
+
input: jsonObjectSchema
|
|
22223
|
+
})
|
|
22224
|
+
]);
|
|
22290
22225
|
|
|
22291
|
-
// ../../shared-contracts/dist/
|
|
22292
|
-
var
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
balance: accountBalanceSnapshotSchema.optional()
|
|
22226
|
+
// ../../shared-contracts/dist/credential-imports.js
|
|
22227
|
+
var credentialSourceSchema = external_exports.object({
|
|
22228
|
+
id: external_exports.string().min(1).max(256),
|
|
22229
|
+
harnessId: external_exports.string().min(1),
|
|
22230
|
+
label: external_exports.string().min(1).max(512),
|
|
22231
|
+
provider: external_exports.enum(["openai-codex", "xai"])
|
|
22298
22232
|
}).strict();
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22303
|
-
|
|
22304
|
-
}
|
|
22305
|
-
var harnessAccountSnapshotSchema = requireReportedQuota(harnessAccountSnapshotObject);
|
|
22306
|
-
var harnessAccountIdentityShape = {
|
|
22307
|
-
harnessId: harnessIdSchema,
|
|
22308
|
-
harnessName: external_exports.string().trim().min(1).max(128)
|
|
22309
|
-
};
|
|
22310
|
-
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
22311
|
-
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
22312
|
-
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
22313
|
-
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
22314
|
-
var harnessAccountInspectResultSchema = external_exports.object({
|
|
22315
|
-
...harnessAccountIdentityShape,
|
|
22316
|
-
account: harnessAccountSnapshotSchema.nullable(),
|
|
22317
|
-
/** Every Billing Source from one Harness; `account` remains the first for older clients. */
|
|
22318
|
-
accounts: external_exports.array(harnessAccountSnapshotSchema).max(8).optional()
|
|
22233
|
+
var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
|
|
22234
|
+
var credentialImportRecordSchema = external_exports.object({
|
|
22235
|
+
name: credentialImportNameSchema,
|
|
22236
|
+
source: credentialSourceSchema,
|
|
22237
|
+
importedAt: external_exports.string()
|
|
22319
22238
|
}).strict();
|
|
22320
|
-
var
|
|
22321
|
-
|
|
22322
|
-
|
|
22239
|
+
var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
22240
|
+
external_exports.object({ action: external_exports.literal("list") }).strict(),
|
|
22241
|
+
external_exports.object({
|
|
22242
|
+
action: external_exports.literal("import"),
|
|
22243
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
22244
|
+
name: credentialImportNameSchema,
|
|
22245
|
+
confirmed: external_exports.literal(true)
|
|
22246
|
+
}).strict(),
|
|
22247
|
+
external_exports.object({
|
|
22248
|
+
action: external_exports.literal("reimport"),
|
|
22249
|
+
sourceId: external_exports.string().min(1).max(256),
|
|
22250
|
+
name: credentialImportNameSchema,
|
|
22251
|
+
confirmed: external_exports.literal(true)
|
|
22252
|
+
}).strict(),
|
|
22253
|
+
external_exports.object({
|
|
22254
|
+
action: external_exports.literal("remove"),
|
|
22255
|
+
name: credentialImportNameSchema,
|
|
22256
|
+
confirmed: external_exports.literal(true)
|
|
22257
|
+
}).strict()
|
|
22258
|
+
]);
|
|
22259
|
+
var credentialOtherLoginSchema = external_exports.object({
|
|
22260
|
+
provider: external_exports.string().min(1).max(128),
|
|
22261
|
+
type: external_exports.enum(["oauth", "api_key", "unknown"]),
|
|
22262
|
+
/** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
|
|
22263
|
+
label: external_exports.string().min(1).max(512).optional(),
|
|
22264
|
+
/** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
|
|
22265
|
+
vendor: external_exports.enum(["openai-codex", "xai"]).optional()
|
|
22323
22266
|
}).strict();
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
22333
|
-
prewarm: external_exports.literal(true).optional()
|
|
22267
|
+
var credentialImportsResultSchema = external_exports.object({
|
|
22268
|
+
sources: external_exports.array(credentialSourceSchema),
|
|
22269
|
+
targets: external_exports.array(external_exports.object({
|
|
22270
|
+
harnessId: external_exports.string(),
|
|
22271
|
+
providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
|
|
22272
|
+
imports: external_exports.array(credentialImportRecordSchema),
|
|
22273
|
+
others: external_exports.array(credentialOtherLoginSchema).default([])
|
|
22274
|
+
}).strict())
|
|
22334
22275
|
}).strict();
|
|
22335
|
-
|
|
22336
|
-
|
|
22337
|
-
|
|
22338
|
-
var harnessLaunchSettingsGetSchema = external_exports.object({
|
|
22339
|
-
harnessId: harnessPluginIdSchema
|
|
22276
|
+
var credentialImportsParamsSchema = external_exports.object({
|
|
22277
|
+
targetHarnessId: external_exports.string().min(1).max(128).optional(),
|
|
22278
|
+
request: credentialImportsRequestSchema
|
|
22340
22279
|
}).strict();
|
|
22341
|
-
|
|
22342
|
-
|
|
22280
|
+
|
|
22281
|
+
// ../../shared-contracts/dist/harness-display-settings.js
|
|
22282
|
+
var harnessDisplayCapabilitiesSchema = external_exports.object({ events: external_exports.boolean() });
|
|
22283
|
+
var harnessDisplayEntriesSchema = external_exports.array(external_exports.strictObject({
|
|
22284
|
+
agent: external_exports.string().min(1).max(128),
|
|
22285
|
+
section: external_exports.enum(["main", "more", "auto"])
|
|
22286
|
+
})).max(256).refine((entries) => new Set(entries.map((entry) => entry.agent)).size === entries.length, "Duplicate Harness IDs");
|
|
22287
|
+
var harnessDisplaySettingsSchema = external_exports.strictObject({
|
|
22288
|
+
entries: harnessDisplayEntriesSchema.nullable()
|
|
22289
|
+
});
|
|
22290
|
+
var harnessDisplayGetSchema = external_exports.strictObject({});
|
|
22291
|
+
var harnessDisplaySetSchema = external_exports.strictObject({
|
|
22292
|
+
entries: harnessDisplayEntriesSchema,
|
|
22293
|
+
/** Import legacy Desktop preferences only if no shared settings exist yet. */
|
|
22294
|
+
initializeOnly: external_exports.boolean().optional()
|
|
22343
22295
|
});
|
|
22344
|
-
var harnessLaunchSettingsSchema = external_exports.object({
|
|
22345
|
-
path: harnessLaunchPathSchema.nullable(),
|
|
22346
|
-
restartRequired: external_exports.boolean()
|
|
22347
|
-
}).strict();
|
|
22348
22296
|
|
|
22349
|
-
// ../../shared-contracts/dist/
|
|
22350
|
-
var
|
|
22351
|
-
|
|
22352
|
-
|
|
22353
|
-
|
|
22354
|
-
|
|
22355
|
-
|
|
22356
|
-
|
|
22357
|
-
|
|
22358
|
-
|
|
22359
|
-
|
|
22360
|
-
/** Present when the Adapter has a verified list and the available target is outside it. */
|
|
22361
|
-
latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
|
|
22362
|
-
/** Update preflight stopped before running the installer; latestVersion needs confirmation. */
|
|
22363
|
-
confirmationRequired: external_exports.literal(true).optional(),
|
|
22364
|
-
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
22365
|
-
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
22366
|
-
/** Official download opened by the user; does not imply an automatic installation. */
|
|
22367
|
-
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
22368
|
-
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
22369
|
-
message: external_exports.string().max(2048).optional(),
|
|
22370
|
-
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
22371
|
-
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
22372
|
-
notice: harnessLocalizedTextSchema.optional(),
|
|
22373
|
-
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
22374
|
-
}).strict();
|
|
22375
|
-
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
22376
|
-
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
22377
|
-
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
22378
|
-
external_exports.object({
|
|
22379
|
-
taskId: external_exports.string().uuid(),
|
|
22380
|
-
status: external_exports.literal("succeeded"),
|
|
22381
|
-
result: harnessInstallationStateSchema
|
|
22382
|
-
}).strict(),
|
|
22383
|
-
external_exports.object({
|
|
22384
|
-
taskId: external_exports.string().uuid(),
|
|
22385
|
-
status: external_exports.literal("failed"),
|
|
22386
|
-
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
22387
|
-
}).strict()
|
|
22388
|
-
]);
|
|
22297
|
+
// ../../shared-contracts/dist/idle-release.js
|
|
22298
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MIN = 5;
|
|
22299
|
+
var IDLE_RELEASE_TIMEOUT_MINUTES_MAX = 1440;
|
|
22300
|
+
var idleReleaseSettingsSchema = external_exports.strictObject({
|
|
22301
|
+
enabled: external_exports.boolean(),
|
|
22302
|
+
timeoutMinutes: external_exports.number().int().min(IDLE_RELEASE_TIMEOUT_MINUTES_MIN).max(IDLE_RELEASE_TIMEOUT_MINUTES_MAX)
|
|
22303
|
+
});
|
|
22304
|
+
var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
|
|
22305
|
+
enabled: true,
|
|
22306
|
+
timeoutMinutes: 10
|
|
22307
|
+
});
|
|
22389
22308
|
|
|
22390
|
-
// ../../shared-contracts/dist/
|
|
22391
|
-
var
|
|
22392
|
-
var
|
|
22393
|
-
var
|
|
22394
|
-
|
|
22395
|
-
|
|
22396
|
-
|
|
22397
|
-
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22309
|
+
// ../../shared-contracts/dist/harness-preferences.js
|
|
22310
|
+
var harnessPreferenceScopeSchema = external_exports.string().regex(/^external$/u);
|
|
22311
|
+
var preferenceHarnessKey = harnessIdSchema.transform((id2) => String(id2));
|
|
22312
|
+
var harnessDefaultConfigurationSchema = external_exports.strictObject({
|
|
22313
|
+
model: harnessModelRefSchema.optional(),
|
|
22314
|
+
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
22315
|
+
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
22316
|
+
}).refine((value) => Boolean(value.model || value.thinkingOptionId || value.permissionModeId), "A default configuration must contain a preference");
|
|
22317
|
+
var newThreadDefaultsSchema = external_exports.strictObject({
|
|
22318
|
+
lastHarness: harnessIdSchema.optional(),
|
|
22319
|
+
byHarness: external_exports.record(preferenceHarnessKey, harnessDefaultConfigurationSchema)
|
|
22320
|
+
});
|
|
22321
|
+
var harnessDelegationDefaultSchema = external_exports.strictObject({
|
|
22322
|
+
model: harnessModelRefSchema.optional(),
|
|
22323
|
+
thinkingOptionId: harnessThinkingOptionIdSchema.optional()
|
|
22324
|
+
}).refine((value) => Boolean(value.model || value.thinkingOptionId), "A delegation default must contain a Model or Thinking option");
|
|
22325
|
+
var delegationDefaultsSchema = external_exports.strictObject({
|
|
22326
|
+
byHarness: external_exports.record(preferenceHarnessKey, harnessDelegationDefaultSchema)
|
|
22327
|
+
});
|
|
22328
|
+
var modelId = external_exports.string().min(1).max(1024);
|
|
22329
|
+
var harnessPreferenceValuesSchema = external_exports.strictObject({
|
|
22330
|
+
idleRelease: idleReleaseSettingsSchema.optional(),
|
|
22331
|
+
favorites: external_exports.record(preferenceHarnessKey, external_exports.array(modelId).max(2048)).default({}),
|
|
22332
|
+
newThread: newThreadDefaultsSchema.optional(),
|
|
22333
|
+
delegation: delegationDefaultsSchema.optional()
|
|
22334
|
+
});
|
|
22335
|
+
var harnessPreferenceSnapshotSchema = external_exports.strictObject({
|
|
22336
|
+
scope: harnessPreferenceScopeSchema,
|
|
22337
|
+
revision: external_exports.number().int().nonnegative(),
|
|
22338
|
+
values: harnessPreferenceValuesSchema
|
|
22339
|
+
});
|
|
22340
|
+
var harnessPreferenceGetSchema = external_exports.strictObject({
|
|
22341
|
+
scope: harnessPreferenceScopeSchema.default("external")
|
|
22342
|
+
});
|
|
22343
|
+
var harnessPreferenceOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
22344
|
+
external_exports.strictObject({ kind: external_exports.literal("idleRelease"), value: idleReleaseSettingsSchema }),
|
|
22345
|
+
external_exports.strictObject({
|
|
22346
|
+
kind: external_exports.literal("favorite"),
|
|
22347
|
+
harnessId: harnessIdSchema,
|
|
22348
|
+
modelId,
|
|
22349
|
+
enabled: external_exports.boolean()
|
|
22350
|
+
}),
|
|
22351
|
+
external_exports.strictObject({
|
|
22352
|
+
kind: external_exports.literal("favorites"),
|
|
22353
|
+
harnessId: harnessIdSchema,
|
|
22354
|
+
modelIds: external_exports.array(modelId).max(2048)
|
|
22355
|
+
}),
|
|
22356
|
+
external_exports.strictObject({
|
|
22357
|
+
kind: external_exports.literal("newThread"),
|
|
22358
|
+
lastHarness: harnessIdSchema.optional(),
|
|
22359
|
+
harnessId: harnessIdSchema.optional(),
|
|
22360
|
+
configuration: harnessDefaultConfigurationSchema.optional()
|
|
22361
|
+
}),
|
|
22362
|
+
external_exports.strictObject({
|
|
22363
|
+
kind: external_exports.literal("delegation"),
|
|
22364
|
+
harnessId: harnessIdSchema,
|
|
22365
|
+
configuration: harnessDelegationDefaultSchema.nullable()
|
|
22366
|
+
})
|
|
22411
22367
|
]);
|
|
22412
|
-
var
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
|
|
22416
|
-
|
|
22417
|
-
}).
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
|
|
22368
|
+
var harnessPreferencePatchSchema = external_exports.strictObject({
|
|
22369
|
+
scope: harnessPreferenceScopeSchema.default("external"),
|
|
22370
|
+
operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
|
|
22371
|
+
initializeOnly: external_exports.boolean().optional(),
|
|
22372
|
+
expectedRevision: external_exports.number().int().nonnegative().optional()
|
|
22373
|
+
}).superRefine((input3, ctx) => {
|
|
22374
|
+
for (const operation of input3.operations) {
|
|
22375
|
+
if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
|
|
22376
|
+
ctx.addIssue({
|
|
22377
|
+
code: "custom",
|
|
22378
|
+
message: "A default Harness or complete configuration is required"
|
|
22379
|
+
});
|
|
22380
|
+
}
|
|
22381
|
+
});
|
|
22382
|
+
var harnessPreferencesDocumentSchema = external_exports.strictObject({
|
|
22383
|
+
version: external_exports.literal(1),
|
|
22423
22384
|
revision: external_exports.number().int().nonnegative(),
|
|
22424
|
-
|
|
22425
|
-
|
|
22426
|
-
}).strict();
|
|
22427
|
-
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
22428
|
-
var codexAccountUsageResultSchema = external_exports.object({
|
|
22429
|
-
accountId: accountIdSchema,
|
|
22430
|
-
usage: threadUsageSnapshotSchema.nullable(),
|
|
22431
|
-
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
22432
|
-
freshness: external_exports.enum(["live", "cached"]),
|
|
22433
|
-
observedAt: external_exports.string().datetime().nullable()
|
|
22434
|
-
}).strict();
|
|
22435
|
-
|
|
22436
|
-
// ../../shared-contracts/dist/harness-session-import.js
|
|
22437
|
-
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
22438
|
-
var HARNESS_SESSION_IMPORT_CWD_MAX_LENGTH = 16384;
|
|
22439
|
-
var HARNESS_SESSION_IMPORT_TITLE_MAX_LENGTH = 4096;
|
|
22440
|
-
var HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH = 1e3;
|
|
22441
|
-
var HARNESS_SESSION_IMPORT_UPDATED_AT_MAX = 864e13;
|
|
22442
|
-
var nonBlankTextSchema4 = 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");
|
|
22443
|
-
var harnessSessionImportIdSchema = nonBlankTextSchema4.max(HARNESS_SESSION_IMPORT_ID_MAX_LENGTH);
|
|
22444
|
-
var harnessSessionImportCandidateSchema = external_exports.object({
|
|
22445
|
-
nativeSessionId: harnessSessionImportIdSchema,
|
|
22446
|
-
title: nonBlankTextSchema4.max(HARNESS_SESSION_IMPORT_TITLE_MAX_LENGTH).nullable(),
|
|
22447
|
-
updatedAt: external_exports.number().int().nonnegative().max(HARNESS_SESSION_IMPORT_UPDATED_AT_MAX),
|
|
22448
|
-
cwd: nonBlankTextSchema4.max(HARNESS_SESSION_IMPORT_CWD_MAX_LENGTH),
|
|
22449
|
-
// Native file discovery cannot reliably observe another process's activity.
|
|
22450
|
-
running: external_exports.boolean().nullable()
|
|
22451
|
-
}).strict();
|
|
22452
|
-
var harnessSessionImportSourcesParamsSchema = external_exports.object({}).strict();
|
|
22453
|
-
var harnessSessionImportSourcesResultSchema = external_exports.object({
|
|
22454
|
-
harnesses: external_exports.array(external_exports.object({
|
|
22455
|
-
harnessId: harnessPluginIdSchema,
|
|
22456
|
-
name: nonBlankTextSchema4.max(128)
|
|
22457
|
-
}).strict()).max(128)
|
|
22458
|
-
}).strict();
|
|
22459
|
-
var harnessSessionListParamsSchema = external_exports.object({
|
|
22460
|
-
harnessId: harnessPluginIdSchema,
|
|
22461
|
-
query: external_exports.string().trim().max(4096).refine((value) => !value.includes("\0")).optional(),
|
|
22462
|
-
offset: external_exports.number().int().nonnegative().safe().optional(),
|
|
22463
|
-
limit: external_exports.number().int().min(1).max(HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH).optional()
|
|
22464
|
-
}).strict();
|
|
22465
|
-
var harnessSessionListResultSchema = external_exports.object({
|
|
22466
|
-
candidates: external_exports.array(harnessSessionImportCandidateSchema).max(HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH),
|
|
22467
|
-
total: external_exports.number().int().nonnegative().safe()
|
|
22468
|
-
}).strict();
|
|
22469
|
-
var harnessSessionImportParamsSchema = external_exports.object({
|
|
22470
|
-
harnessId: harnessPluginIdSchema,
|
|
22471
|
-
nativeSessionId: harnessSessionImportIdSchema
|
|
22472
|
-
}).strict();
|
|
22473
|
-
var harnessSessionImportResultSchema = external_exports.object({
|
|
22474
|
-
threadId: nonBlankTextSchema4.max(1024).pipe(hostThreadIdSchema)
|
|
22475
|
-
}).strict();
|
|
22476
|
-
|
|
22477
|
-
// ../../shared-contracts/dist/deepseek-modern-sessions.js
|
|
22478
|
-
var DEEPSEEK_MODERN_SESSION_LIST_MAX_LENGTH = HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH;
|
|
22479
|
-
var DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH = 1024;
|
|
22480
|
-
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");
|
|
22481
|
-
var deepSeekModernSessionIdSchema = harnessSessionImportIdSchema;
|
|
22482
|
-
var deepSeekModernSessionCandidateSchema = harnessSessionImportCandidateSchema;
|
|
22483
|
-
var deepSeekModernSessionListParamsSchema = external_exports.object({}).strict();
|
|
22484
|
-
var deepSeekModernSessionListResultSchema = external_exports.object({
|
|
22485
|
-
candidates: external_exports.array(deepSeekModernSessionCandidateSchema).max(DEEPSEEK_MODERN_SESSION_LIST_MAX_LENGTH)
|
|
22486
|
-
}).strict();
|
|
22487
|
-
var deepSeekModernSessionImportParamsSchema = external_exports.object({
|
|
22488
|
-
nativeSessionId: deepSeekModernSessionIdSchema
|
|
22489
|
-
}).strict();
|
|
22490
|
-
var deepSeekModernSessionImportResultSchema = external_exports.object({
|
|
22491
|
-
threadId: nonBlankTextSchema5.max(DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH).pipe(hostThreadIdSchema)
|
|
22492
|
-
}).strict();
|
|
22493
|
-
|
|
22494
|
-
// ../../shared-contracts/dist/external-thread-fork.js
|
|
22495
|
-
var externalThreadForkParamsSchema = external_exports.object({
|
|
22496
|
-
threadId: hostThreadIdSchema,
|
|
22497
|
-
lastTurnId: hostTurnIdSchema
|
|
22498
|
-
}).strict();
|
|
22499
|
-
var externalThreadForkResultSchema = external_exports.object({
|
|
22500
|
-
threadId: hostThreadIdSchema
|
|
22501
|
-
}).strict();
|
|
22385
|
+
scopes: external_exports.record(harnessPreferenceScopeSchema, harnessPreferenceValuesSchema)
|
|
22386
|
+
});
|
|
22502
22387
|
|
|
22503
|
-
// ../../shared-contracts/dist/
|
|
22504
|
-
var
|
|
22505
|
-
var
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
label: commandLabelSchema,
|
|
22512
|
-
description: commandDescriptionSchema.optional(),
|
|
22513
|
-
localizations: harnessLocalizationsSchema.optional(),
|
|
22514
|
-
argumentMode: external_exports.enum(["none", "text"]),
|
|
22515
|
-
/**
|
|
22516
|
-
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
22517
|
-
* not tell skills and commands apart; consumers treat that as "command".
|
|
22518
|
-
*/
|
|
22519
|
-
kind: external_exports.enum(["command", "skill"]).optional()
|
|
22520
|
-
}).strict();
|
|
22521
|
-
var harnessCommandCatalogSchema = external_exports.object({
|
|
22522
|
-
commands: external_exports.array(harnessCommandDescriptorSchema),
|
|
22523
|
-
/** Partial discovery failures; valid commands remain available. */
|
|
22524
|
-
warnings: external_exports.array(external_exports.string().min(1)).optional(),
|
|
22525
|
-
/**
|
|
22526
|
-
* `live` when the catalog includes what a native Session reports for its
|
|
22527
|
-
* workspace (custom commands, skills); `static` for Adapter built-ins only.
|
|
22528
|
-
* Omitted by Adapters; set by the Host on inspection results.
|
|
22529
|
-
*/
|
|
22530
|
-
source: external_exports.enum(["live", "static"]).optional()
|
|
22531
|
-
}).strict().superRefine((catalog, context) => {
|
|
22532
|
-
const ids = /* @__PURE__ */ new Set();
|
|
22533
|
-
for (const [index, command] of catalog.commands.entries()) {
|
|
22534
|
-
if (ids.has(command.id)) {
|
|
22535
|
-
context.addIssue({
|
|
22536
|
-
code: "custom",
|
|
22537
|
-
message: "Harness command IDs must be unique",
|
|
22538
|
-
path: ["commands", index, "id"]
|
|
22539
|
-
});
|
|
22540
|
-
}
|
|
22541
|
-
ids.add(command.id);
|
|
22542
|
-
}
|
|
22543
|
-
});
|
|
22544
|
-
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
22545
|
-
harnessId: harnessIdSchema,
|
|
22546
|
-
/** Workspace of a draft without a Thread, for its live catalog when known. */
|
|
22547
|
-
cwd: external_exports.string().min(1).optional()
|
|
22548
|
-
}).strict();
|
|
22549
|
-
var threadCommandsInspectParamsSchema = external_exports.object({
|
|
22550
|
-
threadId: hostThreadIdSchema
|
|
22551
|
-
}).strict();
|
|
22552
|
-
var threadCommandExecuteParamsSchema = external_exports.object({
|
|
22553
|
-
threadId: hostThreadIdSchema,
|
|
22554
|
-
commandId: commandIdSchema,
|
|
22555
|
-
turnId: hostTurnIdSchema.optional(),
|
|
22556
|
-
arguments: jsonObjectSchema.optional()
|
|
22557
|
-
}).strict();
|
|
22558
|
-
var threadCommandExecuteResultSchema = external_exports.object({
|
|
22559
|
-
accepted: external_exports.literal(true),
|
|
22560
|
-
turnId: hostTurnIdSchema.optional()
|
|
22561
|
-
}).strict();
|
|
22562
|
-
|
|
22563
|
-
// ../../shared-contracts/dist/json-rpc.js
|
|
22564
|
-
var jsonRpcVersionSchema = external_exports.literal("2.0").optional();
|
|
22565
|
-
var absentSchema = external_exports.never().optional();
|
|
22566
|
-
var methodSchema = external_exports.string().min(1);
|
|
22567
|
-
var jsonRpcIdSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
22568
|
-
var jsonRpcErrorSchema = external_exports.object({
|
|
22569
|
-
code: external_exports.number().int(),
|
|
22570
|
-
message: external_exports.string(),
|
|
22571
|
-
data: jsonValueSchema.optional()
|
|
22572
|
-
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["data"]));
|
|
22573
|
-
var jsonRpcRequestSchema = external_exports.object({
|
|
22574
|
-
jsonrpc: jsonRpcVersionSchema,
|
|
22575
|
-
id: jsonRpcIdSchema,
|
|
22576
|
-
method: methodSchema,
|
|
22577
|
-
params: jsonValueSchema.optional(),
|
|
22578
|
-
result: absentSchema,
|
|
22579
|
-
error: absentSchema
|
|
22580
|
-
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "params", "result", "error"]));
|
|
22581
|
-
var jsonRpcNotificationSchema = external_exports.object({
|
|
22582
|
-
jsonrpc: jsonRpcVersionSchema,
|
|
22583
|
-
id: absentSchema,
|
|
22584
|
-
method: methodSchema,
|
|
22585
|
-
params: jsonValueSchema.optional(),
|
|
22586
|
-
result: absentSchema,
|
|
22587
|
-
error: absentSchema
|
|
22588
|
-
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "id", "params", "result", "error"]));
|
|
22589
|
-
var jsonRpcSuccessResponseSchema = external_exports.object({
|
|
22590
|
-
jsonrpc: jsonRpcVersionSchema,
|
|
22591
|
-
id: jsonRpcIdSchema,
|
|
22592
|
-
method: absentSchema,
|
|
22593
|
-
params: absentSchema,
|
|
22594
|
-
result: jsonValueSchema,
|
|
22595
|
-
error: absentSchema
|
|
22596
|
-
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "method", "params", "error"]));
|
|
22597
|
-
var jsonRpcErrorResponseSchema = external_exports.object({
|
|
22598
|
-
jsonrpc: jsonRpcVersionSchema,
|
|
22599
|
-
id: jsonRpcIdSchema,
|
|
22600
|
-
method: absentSchema,
|
|
22601
|
-
params: absentSchema,
|
|
22602
|
-
result: absentSchema,
|
|
22603
|
-
error: jsonRpcErrorSchema
|
|
22604
|
-
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "method", "params", "result"]));
|
|
22605
|
-
var jsonRpcEnvelopeSchema = external_exports.union([
|
|
22606
|
-
jsonRpcRequestSchema,
|
|
22607
|
-
jsonRpcNotificationSchema,
|
|
22608
|
-
jsonRpcSuccessResponseSchema,
|
|
22609
|
-
jsonRpcErrorResponseSchema
|
|
22610
|
-
]);
|
|
22611
|
-
|
|
22612
|
-
// ../../shared-contracts/dist/native-refs.js
|
|
22613
|
-
var nativeIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
22614
|
-
message: "Native identifier must not be empty or whitespace"
|
|
22388
|
+
// ../../shared-contracts/dist/model-price-overrides.js
|
|
22389
|
+
var usdPerMillionTokens = external_exports.number().finite().nonnegative();
|
|
22390
|
+
var modelPriceOverrideSchema = external_exports.strictObject({
|
|
22391
|
+
input: usdPerMillionTokens,
|
|
22392
|
+
output: usdPerMillionTokens,
|
|
22393
|
+
cacheRead: usdPerMillionTokens.optional(),
|
|
22394
|
+
cacheWrite: usdPerMillionTokens.optional(),
|
|
22395
|
+
cacheWrite1h: usdPerMillionTokens.optional()
|
|
22615
22396
|
});
|
|
22616
|
-
var
|
|
22617
|
-
|
|
22618
|
-
|
|
22619
|
-
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
var nativeSessionRefSchema = nativeSessionRefV1Schema;
|
|
22624
|
-
var nativeTurnRefV1Schema = external_exports.strictObject({
|
|
22625
|
-
harnessId: harnessIdSchema,
|
|
22626
|
-
nativeSessionId: nativeIdSchema,
|
|
22627
|
-
nativeTurnKey: nativeIdSchema,
|
|
22628
|
-
formatVersion: external_exports.literal(1)
|
|
22397
|
+
var modelPriceKeySchema = external_exports.string().max(512).refine((key) => key.trim() === key && key.length > 0, "Model ID is required");
|
|
22398
|
+
var modelPriceOverridesSchema = external_exports.strictObject({
|
|
22399
|
+
/** Absolute path of the Host's `pricing.json`. */
|
|
22400
|
+
path: external_exports.string(),
|
|
22401
|
+
entries: external_exports.array(external_exports.strictObject({ key: external_exports.string(), price: modelPriceOverrideSchema })),
|
|
22402
|
+
/** Why the existing file is unusable; the Host then ignores it and refuses to overwrite it. */
|
|
22403
|
+
error: external_exports.string().nullable()
|
|
22629
22404
|
});
|
|
22630
|
-
var
|
|
22631
|
-
var
|
|
22632
|
-
|
|
22633
|
-
|
|
22634
|
-
|
|
22635
|
-
locator: jsonValueSchema.optional(),
|
|
22636
|
-
formatVersion: external_exports.literal(1)
|
|
22637
|
-
}).superRefine(rejectExplicitUndefined(["locator"]));
|
|
22638
|
-
var nativeCheckpointRefV1Schema = nativeCheckpointRefV1RuntimeSchema;
|
|
22639
|
-
var nativeCheckpointRefSchema = nativeCheckpointRefV1Schema;
|
|
22640
|
-
|
|
22641
|
-
// ../../shared-contracts/dist/updates.js
|
|
22642
|
-
var UPDATE_ERROR_MAX_LENGTH = 500;
|
|
22643
|
-
var UPDATE_SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
|
|
22644
|
-
var updateSemanticVersionSchema = external_exports.string().regex(UPDATE_SEMVER_PATTERN);
|
|
22645
|
-
var updateInstallationSchema = external_exports.enum([
|
|
22646
|
-
"npm",
|
|
22647
|
-
"windows-installer",
|
|
22648
|
-
"macos-dmg",
|
|
22649
|
-
"linux-archive"
|
|
22650
|
-
]);
|
|
22651
|
-
var updatePhaseSchema = external_exports.enum([
|
|
22652
|
-
"prepared",
|
|
22653
|
-
"downloading",
|
|
22654
|
-
"waiting-for-exit",
|
|
22655
|
-
"installing",
|
|
22656
|
-
"restarting",
|
|
22657
|
-
"succeeded",
|
|
22658
|
-
"failed"
|
|
22659
|
-
]);
|
|
22660
|
-
var updateStatusSchema = external_exports.strictObject({
|
|
22661
|
-
version: updateSemanticVersionSchema,
|
|
22662
|
-
installation: updateInstallationSchema,
|
|
22663
|
-
phase: updatePhaseSchema,
|
|
22664
|
-
updatedAt: external_exports.number().int().nonnegative(),
|
|
22665
|
-
downloadedBytes: external_exports.number().int().nonnegative().optional(),
|
|
22666
|
-
totalBytes: external_exports.number().int().positive().optional(),
|
|
22667
|
-
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable(),
|
|
22668
|
-
serviceStopOutput: external_exports.string().optional()
|
|
22669
|
-
}).superRefine((status, context) => {
|
|
22670
|
-
if (status.downloadedBytes !== void 0 && status.totalBytes !== void 0 && status.downloadedBytes > status.totalBytes) {
|
|
22671
|
-
context.addIssue({
|
|
22672
|
-
code: "custom",
|
|
22673
|
-
path: ["downloadedBytes"],
|
|
22674
|
-
message: "downloadedBytes must not exceed totalBytes"
|
|
22675
|
-
});
|
|
22676
|
-
}
|
|
22405
|
+
var modelPriceOverridesGetSchema = external_exports.strictObject({});
|
|
22406
|
+
var modelPriceOverridesSetSchema = external_exports.strictObject({
|
|
22407
|
+
key: modelPriceKeySchema,
|
|
22408
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
22409
|
+
previousKey: modelPriceKeySchema.optional()
|
|
22677
22410
|
});
|
|
22678
|
-
var
|
|
22679
|
-
|
|
22680
|
-
var updateCheckResultSchema = external_exports.strictObject({
|
|
22681
|
-
currentVersion: updateSemanticVersionSchema,
|
|
22682
|
-
installation: updateInstallationSchema.nullable(),
|
|
22683
|
-
latestVersion: updateSemanticVersionSchema.nullable(),
|
|
22684
|
-
updateAvailable: external_exports.boolean(),
|
|
22685
|
-
installationAvailable: external_exports.boolean(),
|
|
22686
|
-
releaseNotes: external_exports.string().min(1).max(2e4).nullable(),
|
|
22687
|
-
releaseNotesUrl: githubReleaseNotesUrlSchema.nullable(),
|
|
22688
|
-
status: updateStatusSchema.nullable(),
|
|
22689
|
-
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable()
|
|
22411
|
+
var modelPriceDefaultParamsSchema = external_exports.strictObject({
|
|
22412
|
+
model: modelPriceKeySchema
|
|
22690
22413
|
});
|
|
22691
|
-
var
|
|
22692
|
-
|
|
22414
|
+
var modelPriceSuggestionSchema = external_exports.strictObject({
|
|
22415
|
+
/** Verified from catalog canonical links, not inferred from names or equal prices. */
|
|
22416
|
+
official: external_exports.boolean().optional(),
|
|
22417
|
+
canonicalModelId: external_exports.string().min(1).optional(),
|
|
22418
|
+
provider: external_exports.string().min(1).max(512),
|
|
22419
|
+
model: external_exports.string().min(1).max(512),
|
|
22420
|
+
price: modelPriceOverrideSchema
|
|
22693
22421
|
});
|
|
22694
|
-
var
|
|
22695
|
-
|
|
22422
|
+
var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
22423
|
+
price: modelPriceOverrideSchema.nullable(),
|
|
22424
|
+
/** Local catalog suggestions only; never used automatically for pricing. */
|
|
22425
|
+
suggestions: external_exports.array(modelPriceSuggestionSchema).max(6).optional()
|
|
22696
22426
|
});
|
|
22697
22427
|
|
|
22698
|
-
// ../../shared-contracts/dist/
|
|
22699
|
-
var
|
|
22700
|
-
var
|
|
22701
|
-
|
|
22702
|
-
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
|
|
22706
|
-
|
|
22707
|
-
|
|
22708
|
-
|
|
22428
|
+
// ../../shared-contracts/dist/usage-statistics.js
|
|
22429
|
+
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
22430
|
+
var count = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
22431
|
+
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
22432
|
+
var harness = external_exports.string().min(1).max(128);
|
|
22433
|
+
var model = external_exports.string().min(1).max(512);
|
|
22434
|
+
var project = external_exports.string().min(1).max(4096);
|
|
22435
|
+
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
22436
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
22437
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
22438
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
22439
|
+
try {
|
|
22440
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
22441
|
+
return true;
|
|
22442
|
+
} catch {
|
|
22443
|
+
return false;
|
|
22444
|
+
}
|
|
22445
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
22446
|
+
harness: harness.optional(),
|
|
22447
|
+
model: model.nullable().optional(),
|
|
22448
|
+
project: project.nullable().optional(),
|
|
22449
|
+
/** One date in the query timezone inside the range. */
|
|
22450
|
+
date: localDate.optional()
|
|
22709
22451
|
});
|
|
22710
|
-
var
|
|
22711
|
-
|
|
22712
|
-
|
|
22713
|
-
|
|
22714
|
-
|
|
22715
|
-
|
|
22716
|
-
|
|
22717
|
-
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
|
|
22452
|
+
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
22453
|
+
requests: count,
|
|
22454
|
+
inputTokens: count,
|
|
22455
|
+
cachedInputTokens: count,
|
|
22456
|
+
cacheWriteInputTokens: count,
|
|
22457
|
+
cacheKnownInputTokens: count,
|
|
22458
|
+
cacheHitCachedInputTokens: count,
|
|
22459
|
+
cacheHitInputTokens: count,
|
|
22460
|
+
outputTokens: count,
|
|
22461
|
+
reasoningOutputTokens: count,
|
|
22462
|
+
/** USD at the public price, summed over the priced requests only. */
|
|
22463
|
+
costUsd: external_exports.number().finite().min(0),
|
|
22464
|
+
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
22465
|
+
unpricedRequests: count,
|
|
22466
|
+
/**
|
|
22467
|
+
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
22468
|
+
* cost, and not as unpriced.
|
|
22469
|
+
*/
|
|
22470
|
+
unmeteredRequests: count
|
|
22721
22471
|
});
|
|
22722
|
-
var
|
|
22723
|
-
|
|
22724
|
-
|
|
22472
|
+
var totals = usageStatisticsTotalsSchema.shape;
|
|
22473
|
+
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
22474
|
+
harness,
|
|
22475
|
+
sessionId: external_exports.string().min(1).max(512),
|
|
22476
|
+
project: project.nullable(),
|
|
22477
|
+
/** Persisted Desktop title for a mapped Session, otherwise its native name; may be absent. */
|
|
22478
|
+
title: external_exports.string().min(1).max(200).optional(),
|
|
22479
|
+
/** Models the session used, most requests first. */
|
|
22480
|
+
models: external_exports.array(model).max(16),
|
|
22481
|
+
firstAtMs: count,
|
|
22482
|
+
lastAtMs: count,
|
|
22483
|
+
...totals
|
|
22725
22484
|
});
|
|
22726
|
-
var
|
|
22727
|
-
|
|
22485
|
+
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
22486
|
+
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
22487
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
22488
|
+
from: localDate.nullable(),
|
|
22489
|
+
to: localDate,
|
|
22490
|
+
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
22491
|
+
filters: external_exports.strictObject({
|
|
22492
|
+
harness: harness.nullable(),
|
|
22493
|
+
model: model.nullable(),
|
|
22494
|
+
unknownModel: external_exports.boolean(),
|
|
22495
|
+
project: project.nullable(),
|
|
22496
|
+
unknownProject: external_exports.boolean(),
|
|
22497
|
+
date: localDate.nullable()
|
|
22498
|
+
}),
|
|
22499
|
+
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
22500
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count, read: count }),
|
|
22501
|
+
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
22502
|
+
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
22503
|
+
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
22504
|
+
options: external_exports.strictObject({
|
|
22505
|
+
harnesses: external_exports.array(harness).max(256),
|
|
22506
|
+
models: external_exports.array(model.nullable()).max(4096),
|
|
22507
|
+
projects: external_exports.array(project.nullable()).max(4096)
|
|
22508
|
+
}),
|
|
22509
|
+
/** Current display metadata, scoped by Harness. Never a pricing or filter identity.
|
|
22510
|
+
* Optional for older Hosts; missing/conflicting labels fall back to the native model ID.
|
|
22511
|
+
*/
|
|
22512
|
+
modelLabels: external_exports.array(external_exports.strictObject({ harness, model, label: model })).max(4096).optional(),
|
|
22513
|
+
/** Native credits, all filters applied, never combined across Harnesses or treated as USD.
|
|
22514
|
+
* Only groups with at least one reported value appear; reportedRequests exposes partial data.
|
|
22515
|
+
*/
|
|
22516
|
+
credits: external_exports.array(external_exports.strictObject({
|
|
22517
|
+
harness,
|
|
22518
|
+
model: model.nullable(),
|
|
22519
|
+
credits: external_exports.number().finite().min(0),
|
|
22520
|
+
reportedRequests: count,
|
|
22521
|
+
requests: count
|
|
22522
|
+
})).max(4096).optional(),
|
|
22523
|
+
/** All filters applied. */
|
|
22524
|
+
totals: usageStatisticsTotalsSchema,
|
|
22525
|
+
/** Each date and Harness of the range: every filter except the day. */
|
|
22526
|
+
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
22527
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
22528
|
+
hourly: external_exports.array(external_exports.strictObject({
|
|
22529
|
+
weekday: external_exports.number().int().min(0).max(6),
|
|
22530
|
+
hour: external_exports.number().int().min(0).max(23),
|
|
22531
|
+
...totals
|
|
22532
|
+
})).max(168),
|
|
22533
|
+
byHarness: external_exports.array(external_exports.strictObject({ harness, ...totals })).max(256),
|
|
22534
|
+
byModel: external_exports.array(external_exports.strictObject({
|
|
22535
|
+
model: model.nullable(),
|
|
22536
|
+
...totals,
|
|
22537
|
+
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
22538
|
+
harnessPricedRequests: count
|
|
22539
|
+
})).max(4096),
|
|
22540
|
+
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
22541
|
+
/**
|
|
22542
|
+
* The sessions that spent the most, by cost and by tokens without cache, all filters applied;
|
|
22543
|
+
* requests without a native session are not listed here but count everywhere else.
|
|
22544
|
+
*/
|
|
22545
|
+
sessions: external_exports.array(usageStatisticsSessionSchema).max(100),
|
|
22546
|
+
/**
|
|
22547
|
+
* The sessions last active in the range, newest first, all filters applied. Optional for older
|
|
22548
|
+
* Hosts; missing is treated as no list rather than no sessions.
|
|
22549
|
+
*/
|
|
22550
|
+
recentSessions: external_exports.array(usageStatisticsSessionSchema).max(100).optional()
|
|
22728
22551
|
});
|
|
22729
22552
|
|
|
22730
|
-
// ../../shared-contracts/dist/thread-
|
|
22731
|
-
var
|
|
22732
|
-
|
|
22733
|
-
"failed",
|
|
22734
|
-
"interrupted",
|
|
22735
|
-
"needsInput",
|
|
22736
|
-
"timedOut",
|
|
22737
|
-
"unreadable",
|
|
22738
|
-
"notFound"
|
|
22739
|
-
];
|
|
22740
|
-
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
22741
|
-
|
|
22742
|
-
// ../../shared-contracts/dist/remote-runtime.js
|
|
22743
|
-
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
22744
|
-
"idle",
|
|
22745
|
-
"installing",
|
|
22746
|
-
"restarting",
|
|
22747
|
-
"succeeded",
|
|
22748
|
-
"failed"
|
|
22749
|
-
]);
|
|
22750
|
-
var runtimeStatusSchema = external_exports.object({
|
|
22751
|
-
runningVersion: external_exports.string().nullable(),
|
|
22752
|
-
installedVersion: external_exports.string().nullable(),
|
|
22753
|
-
restartRequired: external_exports.boolean(),
|
|
22754
|
-
remote: external_exports.boolean(),
|
|
22755
|
-
updateSupported: external_exports.boolean(),
|
|
22756
|
-
update: external_exports.object({
|
|
22757
|
-
phase: remoteUpdatePhaseSchema,
|
|
22758
|
-
targetVersion: external_exports.string().nullable(),
|
|
22759
|
-
error: external_exports.string().nullable()
|
|
22760
|
-
})
|
|
22761
|
-
});
|
|
22762
|
-
var remoteUpdateParamsSchema = external_exports.object({
|
|
22763
|
-
version: external_exports.string().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u)
|
|
22764
|
-
}).strict();
|
|
22765
|
-
var remoteSshSetupParamsSchema = external_exports.object({
|
|
22766
|
-
hostname: external_exports.string().min(1).max(1024).refine((value) => !value.startsWith("-") && !/\s/u.test(value)),
|
|
22767
|
-
port: external_exports.number().int().min(1).max(65535).nullable(),
|
|
22768
|
-
identity: external_exports.string().max(4096).nullable(),
|
|
22769
|
-
action: external_exports.enum(["inspect", "install", "update", "repair", "uninstall"]),
|
|
22770
|
-
uninstallPackage: external_exports.boolean().optional(),
|
|
22771
|
-
version: external_exports.string().regex(/^\d+\.\d+\.\d+$/u).nullable()
|
|
22772
|
-
}).strict();
|
|
22773
|
-
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
22553
|
+
// ../../shared-contracts/dist/thread-prewarm.js
|
|
22554
|
+
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
22555
|
+
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
22774
22556
|
|
|
22775
|
-
// ../../shared-contracts/dist/
|
|
22776
|
-
var
|
|
22777
|
-
var REMOTE_IDENTITY_MAX_LENGTH = 1024;
|
|
22778
|
-
var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
|
|
22779
|
-
var target = {
|
|
22780
|
-
hostId: identity.regex(/^(?:remote-(?:ssh(?:-|:)|control:)|remote-peer:[a-zA-Z0-9_-]{1,64}$)/u)
|
|
22781
|
-
};
|
|
22782
|
-
var thread = { ...target, threadId: identity };
|
|
22783
|
-
var text = external_exports.string().min(1).max(8e3);
|
|
22784
|
-
var input2 = { text, requestId: identity };
|
|
22785
|
-
var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
|
|
22786
|
-
external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
|
|
22557
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
22558
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
22787
22559
|
external_exports.object({
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22791
|
-
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
|
|
22801
|
-
external_exports.object({ available: external_exports.literal(false) }),
|
|
22560
|
+
id: external_exports.string().min(1),
|
|
22561
|
+
type: external_exports.literal("choice"),
|
|
22562
|
+
prompt: external_exports.string(),
|
|
22563
|
+
options: external_exports.array(external_exports.object({
|
|
22564
|
+
value: external_exports.string().min(1),
|
|
22565
|
+
label: external_exports.string(),
|
|
22566
|
+
description: external_exports.string().optional()
|
|
22567
|
+
})).min(1),
|
|
22568
|
+
multiple: external_exports.boolean(),
|
|
22569
|
+
allowOther: external_exports.boolean(),
|
|
22570
|
+
optional: external_exports.boolean()
|
|
22571
|
+
}),
|
|
22802
22572
|
external_exports.object({
|
|
22803
|
-
|
|
22804
|
-
|
|
22573
|
+
id: external_exports.string().min(1),
|
|
22574
|
+
type: external_exports.literal("text"),
|
|
22575
|
+
prompt: external_exports.string(),
|
|
22576
|
+
multiline: external_exports.boolean(),
|
|
22577
|
+
secret: external_exports.literal(false),
|
|
22578
|
+
optional: external_exports.boolean(),
|
|
22579
|
+
placeholder: external_exports.string().optional(),
|
|
22580
|
+
prefill: external_exports.string().optional()
|
|
22805
22581
|
})
|
|
22806
22582
|
]);
|
|
22807
|
-
var
|
|
22808
|
-
|
|
22809
|
-
external_exports.
|
|
22810
|
-
|
|
22811
|
-
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
|
|
22817
|
-
|
|
22818
|
-
|
|
22819
|
-
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22830
|
-
|
|
22831
|
-
|
|
22832
|
-
|
|
22833
|
-
|
|
22834
|
-
external_exports.
|
|
22835
|
-
|
|
22836
|
-
|
|
22837
|
-
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
|
|
22841
|
-
|
|
22842
|
-
|
|
22843
|
-
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
external_exports.
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
|
|
22880
|
-
|
|
22881
|
-
|
|
22882
|
-
|
|
22883
|
-
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22887
|
-
|
|
22888
|
-
|
|
22889
|
-
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22897
|
-
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
22901
|
-
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
22902
|
-
})
|
|
22583
|
+
var threadQuestionSchema = external_exports.object({
|
|
22584
|
+
interactionId: external_exports.string().min(1),
|
|
22585
|
+
turnId: external_exports.string().min(1),
|
|
22586
|
+
title: external_exports.string().optional(),
|
|
22587
|
+
questions: external_exports.array(field).min(1)
|
|
22588
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
22589
|
+
message: "Shared cards require at least one multi-select question"
|
|
22590
|
+
});
|
|
22591
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
22592
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
22593
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
22594
|
+
threadId: external_exports.string().min(1),
|
|
22595
|
+
turnId: external_exports.string().min(1),
|
|
22596
|
+
interactionId: external_exports.string().min(1),
|
|
22597
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
22598
|
+
cancelled: external_exports.boolean().default(false)
|
|
22599
|
+
});
|
|
22600
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
22601
|
+
|
|
22602
|
+
// ../../shared-contracts/dist/web.js
|
|
22603
|
+
var webFileDiffSchema = external_exports.object({
|
|
22604
|
+
path: external_exports.string(),
|
|
22605
|
+
oldText: external_exports.string().nullable(),
|
|
22606
|
+
newText: external_exports.string()
|
|
22607
|
+
});
|
|
22608
|
+
var webTurnDiffsRequestSchema = external_exports.object({
|
|
22609
|
+
sessionId: external_exports.string().min(1),
|
|
22610
|
+
turn: external_exports.number().int().nonnegative(),
|
|
22611
|
+
path: external_exports.string().min(1).optional()
|
|
22612
|
+
});
|
|
22613
|
+
var webTurnDiffsResultSchema = external_exports.object({ diffs: external_exports.array(webFileDiffSchema) });
|
|
22614
|
+
var webOpenParamsSchema = external_exports.strictObject({});
|
|
22615
|
+
var webOpenResultSchema = external_exports.strictObject({});
|
|
22616
|
+
|
|
22617
|
+
// ../../shared-contracts/dist/web-tool-output.js
|
|
22618
|
+
var webToolOutputReferenceSchema = external_exports.object({
|
|
22619
|
+
sessionId: external_exports.string().min(1),
|
|
22620
|
+
epoch: external_exports.string().min(1),
|
|
22621
|
+
turn: external_exports.number().int().nonnegative(),
|
|
22622
|
+
seq: external_exports.number().int().nonnegative(),
|
|
22623
|
+
callId: external_exports.string().min(1),
|
|
22624
|
+
part: external_exports.number().int().nonnegative(),
|
|
22625
|
+
version: external_exports.string().min(1)
|
|
22626
|
+
});
|
|
22627
|
+
var webToolOutputPreviewSchema = external_exports.object({
|
|
22628
|
+
reference: webToolOutputReferenceSchema,
|
|
22629
|
+
length: external_exports.number().int().nonnegative(),
|
|
22630
|
+
bytes: external_exports.number().int().nonnegative()
|
|
22631
|
+
});
|
|
22632
|
+
|
|
22633
|
+
// ../../shared-contracts/dist/console.js
|
|
22634
|
+
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
22635
|
+
title: external_exports.string().trim().min(1).max(200),
|
|
22636
|
+
type: external_exports.enum(["info", "warning", "danger"]),
|
|
22637
|
+
body: external_exports.string().trim().min(1).max(16 * 1024)
|
|
22638
|
+
});
|
|
22639
|
+
var consoleOpenParamsSchema = external_exports.strictObject({});
|
|
22640
|
+
var consoleOpenResultSchema = external_exports.strictObject({
|
|
22641
|
+
/** The console address. */
|
|
22642
|
+
url: external_exports.string().max(2048).regex(/^http:\/\/(?:127\.0\.0\.1|localhost):\d{1,5}\/(?:\?.*)?$/u)
|
|
22643
|
+
});
|
|
22644
|
+
var CONSOLE_HOST_METHODS = Object.freeze([
|
|
22645
|
+
"codexhost/console/remote-connections",
|
|
22646
|
+
"codexhost/runtime/status",
|
|
22647
|
+
"codexhost/remote/ssh-setup",
|
|
22648
|
+
"codexhost/harness/plugins/list",
|
|
22649
|
+
"codexhost/harness/display-settings/capabilities",
|
|
22650
|
+
"codexhost/harness/display-settings/get",
|
|
22651
|
+
"codexhost/harness/display-settings/set",
|
|
22652
|
+
"codexhost/harness/inspect",
|
|
22653
|
+
"codexhost/harness/installation",
|
|
22654
|
+
"codexhost/harness/installation/start",
|
|
22655
|
+
"codexhost/harness/installation/status",
|
|
22656
|
+
"codexhost/harness/launch-settings/get",
|
|
22657
|
+
"codexhost/harness/launch-settings/set",
|
|
22658
|
+
"codexhost/harness/web-ui/open",
|
|
22659
|
+
"codexhost/harness/accounts/sources",
|
|
22660
|
+
"codexhost/harness/accounts/list",
|
|
22661
|
+
"codexhost/harness/accounts/inspect",
|
|
22662
|
+
"codexhost/harness/credential-imports",
|
|
22663
|
+
"codexhost/harness/session-import/sources",
|
|
22664
|
+
"codexhost/harness/session-import/list",
|
|
22665
|
+
"codexhost/harness/session-import/import",
|
|
22666
|
+
"codexhost/account/list",
|
|
22667
|
+
"codexhost/account/refresh",
|
|
22668
|
+
"codexhost/account/usage/inspect",
|
|
22669
|
+
"codexhost/usage/model-prices/get",
|
|
22670
|
+
"codexhost/usage/model-prices/set",
|
|
22671
|
+
"codexhost/usage/model-prices/default",
|
|
22672
|
+
"codexhost/usage/statistics/get",
|
|
22673
|
+
"codexhost/update/check",
|
|
22674
|
+
"codexhost/update/start",
|
|
22675
|
+
"codexhost/update/status"
|
|
22903
22676
|
]);
|
|
22904
22677
|
|
|
22905
|
-
// ../../shared-contracts/dist/
|
|
22906
|
-
var
|
|
22907
|
-
|
|
22908
|
-
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22912
|
-
|
|
22913
|
-
|
|
22914
|
-
|
|
22915
|
-
|
|
22916
|
-
|
|
22678
|
+
// ../../shared-contracts/dist/version.js
|
|
22679
|
+
var WORKSPACE_CONTRACT_VERSION = 1;
|
|
22680
|
+
|
|
22681
|
+
// ../../shared-contracts/dist/loaded-sessions.js
|
|
22682
|
+
var loadedSessionStateSchema = external_exports.enum([
|
|
22683
|
+
"idle",
|
|
22684
|
+
"running",
|
|
22685
|
+
"busy",
|
|
22686
|
+
"closing",
|
|
22687
|
+
"failed",
|
|
22688
|
+
"blocked"
|
|
22689
|
+
]);
|
|
22690
|
+
var loadedSessionReasonSchema = external_exports.enum([
|
|
22691
|
+
"none",
|
|
22692
|
+
"disabled",
|
|
22693
|
+
"timeout",
|
|
22694
|
+
"operation",
|
|
22695
|
+
"background",
|
|
22696
|
+
"identity",
|
|
22697
|
+
"persistence",
|
|
22698
|
+
"closeFailed"
|
|
22699
|
+
]);
|
|
22700
|
+
var loadedSessionsSchema = external_exports.array(external_exports.strictObject({
|
|
22701
|
+
threadId: external_exports.string(),
|
|
22702
|
+
title: external_exports.string(),
|
|
22703
|
+
harnessId: external_exports.string(),
|
|
22704
|
+
state: loadedSessionStateSchema,
|
|
22705
|
+
reason: loadedSessionReasonSchema,
|
|
22706
|
+
inactiveMs: external_exports.number().nonnegative()
|
|
22707
|
+
}));
|
|
22708
|
+
|
|
22709
|
+
// ../../shared-contracts/dist/manual-compaction.js
|
|
22710
|
+
var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
22711
|
+
threadId: hostThreadIdSchema,
|
|
22712
|
+
turnId: hostTurnIdSchema
|
|
22917
22713
|
});
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
|
|
22921
|
-
|
|
22922
|
-
|
|
22714
|
+
|
|
22715
|
+
// ../../shared-contracts/dist/harness-accounts.js
|
|
22716
|
+
var harnessAccountSnapshotObject = external_exports.object({
|
|
22717
|
+
email: external_exports.string().trim().min(1).max(320).optional(),
|
|
22718
|
+
label: external_exports.string().trim().min(1).max(256).optional(),
|
|
22719
|
+
plan: external_exports.string().trim().min(1).max(128).optional(),
|
|
22720
|
+
credits: accountCreditsSnapshotSchema.optional(),
|
|
22721
|
+
balance: accountBalanceSnapshotSchema.optional()
|
|
22722
|
+
}).strict();
|
|
22723
|
+
function requireReportedQuota(schema) {
|
|
22724
|
+
return schema.refine((value) => {
|
|
22725
|
+
const reported = value;
|
|
22726
|
+
return reported.credits !== void 0 || reported.balance !== void 0;
|
|
22727
|
+
}, { message: "Account must report either credits or a balance" });
|
|
22728
|
+
}
|
|
22729
|
+
var harnessAccountSnapshotSchema = requireReportedQuota(harnessAccountSnapshotObject);
|
|
22730
|
+
var harnessAccountIdentityShape = {
|
|
22731
|
+
harnessId: harnessIdSchema,
|
|
22732
|
+
harnessName: external_exports.string().trim().min(1).max(128)
|
|
22733
|
+
};
|
|
22734
|
+
var harnessAccountSourceSchema = external_exports.object(harnessAccountIdentityShape).strict();
|
|
22735
|
+
var harnessAccountSourceListParamsSchema = external_exports.object({}).strict();
|
|
22736
|
+
var harnessAccountSourceListResultSchema = external_exports.object({ sources: external_exports.array(harnessAccountSourceSchema).max(128) }).strict();
|
|
22737
|
+
var harnessAccountInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
22738
|
+
var harnessAccountInspectResultSchema = external_exports.object({
|
|
22739
|
+
...harnessAccountIdentityShape,
|
|
22740
|
+
account: harnessAccountSnapshotSchema.nullable(),
|
|
22741
|
+
/** Every Billing Source from one Harness; `account` remains the first for older clients. */
|
|
22742
|
+
accounts: external_exports.array(harnessAccountSnapshotSchema).max(8).optional()
|
|
22743
|
+
}).strict();
|
|
22744
|
+
var harnessAccountListParamsSchema = external_exports.object({ refresh: external_exports.boolean().optional() }).strict();
|
|
22745
|
+
var harnessAccountListResultSchema = external_exports.object({
|
|
22746
|
+
accounts: external_exports.array(requireReportedQuota(harnessAccountSnapshotObject.extend(harnessAccountIdentityShape))).max(128)
|
|
22747
|
+
}).strict();
|
|
22748
|
+
|
|
22749
|
+
// ../../shared-contracts/dist/harness-route.js
|
|
22750
|
+
var harnessPluginRouteSchema = external_exports.object({
|
|
22751
|
+
harnessId: harnessPluginIdSchema,
|
|
22752
|
+
model: harnessModelRefSchema.optional(),
|
|
22753
|
+
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
22754
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
22755
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
22756
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
22757
|
+
prewarm: external_exports.literal(true).optional()
|
|
22758
|
+
}).strict();
|
|
22759
|
+
|
|
22760
|
+
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
22761
|
+
var harnessLaunchPathSchema = external_exports.string().trim().min(1).max(4096).refine((value) => !/[\u0000\r\n]/u.test(value), "Invalid entrypoint path");
|
|
22762
|
+
var harnessLaunchSettingsGetSchema = external_exports.object({
|
|
22763
|
+
harnessId: harnessPluginIdSchema
|
|
22764
|
+
}).strict();
|
|
22765
|
+
var harnessLaunchSettingsSetSchema = harnessLaunchSettingsGetSchema.extend({
|
|
22766
|
+
path: harnessLaunchPathSchema.nullable()
|
|
22923
22767
|
});
|
|
22924
|
-
var
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
22930
|
-
|
|
22931
|
-
|
|
22932
|
-
|
|
22933
|
-
external_exports.
|
|
22934
|
-
|
|
22935
|
-
|
|
22936
|
-
|
|
22937
|
-
|
|
22938
|
-
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22768
|
+
var harnessLaunchSettingsSchema = external_exports.object({
|
|
22769
|
+
path: harnessLaunchPathSchema.nullable(),
|
|
22770
|
+
restartRequired: external_exports.boolean()
|
|
22771
|
+
}).strict();
|
|
22772
|
+
|
|
22773
|
+
// ../../shared-contracts/dist/harness-installation.js
|
|
22774
|
+
var harnessInstallationParamsSchema = external_exports.object({
|
|
22775
|
+
harnessId: harnessIdSchema,
|
|
22776
|
+
action: external_exports.enum(["check", "update", "install"]),
|
|
22777
|
+
confirmedVersion: external_exports.string().min(1).max(128).optional()
|
|
22778
|
+
}).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
|
|
22779
|
+
var harnessInstallationStateSchema = external_exports.object({
|
|
22780
|
+
currentVersion: external_exports.string().min(1).max(128),
|
|
22781
|
+
latestVersion: external_exports.string().min(1).max(128),
|
|
22782
|
+
updateAvailable: external_exports.boolean(),
|
|
22783
|
+
canUpdate: external_exports.boolean(),
|
|
22784
|
+
/** Present when the Adapter has a verified list and the available target is outside it. */
|
|
22785
|
+
latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
|
|
22786
|
+
/** Update preflight stopped before running the installer; latestVersion needs confirmation. */
|
|
22787
|
+
confirmationRequired: external_exports.literal(true).optional(),
|
|
22788
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
22789
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
22790
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
22791
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
22792
|
+
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
22793
|
+
message: external_exports.string().max(2048).optional(),
|
|
22794
|
+
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
22795
|
+
/** Safe plugin-owned explanation, distinct from raw diagnostic message. */
|
|
22796
|
+
notice: harnessLocalizedTextSchema.optional(),
|
|
22797
|
+
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
22798
|
+
}).strict();
|
|
22799
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
22800
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
22801
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
22802
|
+
external_exports.object({
|
|
22803
|
+
taskId: external_exports.string().uuid(),
|
|
22804
|
+
status: external_exports.literal("succeeded"),
|
|
22805
|
+
result: harnessInstallationStateSchema
|
|
22806
|
+
}).strict(),
|
|
22807
|
+
external_exports.object({
|
|
22808
|
+
taskId: external_exports.string().uuid(),
|
|
22809
|
+
status: external_exports.literal("failed"),
|
|
22810
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
22811
|
+
}).strict()
|
|
22947
22812
|
]);
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22813
|
+
|
|
22814
|
+
// ../../shared-contracts/dist/codex-accounts.js
|
|
22815
|
+
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
22816
|
+
var nonBlankTextSchema4 = external_exports.string().trim().min(1);
|
|
22817
|
+
var codexAccountPlanTypeSchema = external_exports.enum([
|
|
22818
|
+
"free",
|
|
22819
|
+
"go",
|
|
22820
|
+
"plus",
|
|
22821
|
+
"pro",
|
|
22822
|
+
"prolite",
|
|
22823
|
+
"team",
|
|
22824
|
+
"self_serve_business_prolite",
|
|
22825
|
+
"self_serve_business_usage_based",
|
|
22826
|
+
"business",
|
|
22827
|
+
"ent26",
|
|
22828
|
+
"enterprise_cbp_automation",
|
|
22829
|
+
"enterprise_cbp_usage_based",
|
|
22830
|
+
"enterprise",
|
|
22831
|
+
"edu",
|
|
22832
|
+
"edu_plus",
|
|
22833
|
+
"edu_pro",
|
|
22834
|
+
"unknown"
|
|
22951
22835
|
]);
|
|
22836
|
+
var codexAccountSchema = external_exports.object({
|
|
22837
|
+
accountId: accountIdSchema,
|
|
22838
|
+
label: nonBlankTextSchema4.max(256),
|
|
22839
|
+
email: external_exports.string().email().max(320).optional(),
|
|
22840
|
+
planType: codexAccountPlanTypeSchema.optional()
|
|
22841
|
+
}).strict();
|
|
22842
|
+
var codexAccountPhaseSchema = external_exports.enum(["ready", "unavailable"]);
|
|
22843
|
+
var codexAccountListResultSchema = external_exports.object({
|
|
22844
|
+
version: external_exports.literal(2),
|
|
22845
|
+
currentAccountId: accountIdSchema.nullable(),
|
|
22846
|
+
phase: codexAccountPhaseSchema,
|
|
22847
|
+
revision: external_exports.number().int().nonnegative(),
|
|
22848
|
+
instanceId: nonBlankTextSchema4.max(1024).optional(),
|
|
22849
|
+
accounts: external_exports.array(codexAccountSchema).max(1)
|
|
22850
|
+
}).strict();
|
|
22851
|
+
var codexAccountUsageParamsSchema = external_exports.object({ accountId: accountIdSchema, refresh: external_exports.boolean().optional() }).strict();
|
|
22852
|
+
var codexAccountUsageResultSchema = external_exports.object({
|
|
22853
|
+
accountId: accountIdSchema,
|
|
22854
|
+
usage: threadUsageSnapshotSchema.nullable(),
|
|
22855
|
+
accountCredits: accountCreditsSnapshotSchema.optional(),
|
|
22856
|
+
freshness: external_exports.enum(["live", "cached"]),
|
|
22857
|
+
observedAt: external_exports.string().datetime().nullable()
|
|
22858
|
+
}).strict();
|
|
22859
|
+
|
|
22860
|
+
// ../../shared-contracts/dist/harness-session-import.js
|
|
22861
|
+
var HARNESS_SESSION_IMPORT_ID_MAX_LENGTH = 1024;
|
|
22862
|
+
var HARNESS_SESSION_IMPORT_CWD_MAX_LENGTH = 16384;
|
|
22863
|
+
var HARNESS_SESSION_IMPORT_TITLE_MAX_LENGTH = 4096;
|
|
22864
|
+
var HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH = 1e3;
|
|
22865
|
+
var HARNESS_SESSION_IMPORT_UPDATED_AT_MAX = 864e13;
|
|
22866
|
+
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");
|
|
22867
|
+
var harnessSessionImportIdSchema = nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_ID_MAX_LENGTH);
|
|
22868
|
+
var harnessSessionImportCandidateSchema = external_exports.object({
|
|
22869
|
+
nativeSessionId: harnessSessionImportIdSchema,
|
|
22870
|
+
title: nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_TITLE_MAX_LENGTH).nullable(),
|
|
22871
|
+
updatedAt: external_exports.number().int().nonnegative().max(HARNESS_SESSION_IMPORT_UPDATED_AT_MAX),
|
|
22872
|
+
cwd: nonBlankTextSchema5.max(HARNESS_SESSION_IMPORT_CWD_MAX_LENGTH),
|
|
22873
|
+
// Native file discovery cannot reliably observe another process's activity.
|
|
22874
|
+
running: external_exports.boolean().nullable()
|
|
22875
|
+
}).strict();
|
|
22876
|
+
var harnessSessionImportSourcesParamsSchema = external_exports.object({}).strict();
|
|
22877
|
+
var harnessSessionImportSourcesResultSchema = external_exports.object({
|
|
22878
|
+
harnesses: external_exports.array(external_exports.object({
|
|
22879
|
+
harnessId: harnessPluginIdSchema,
|
|
22880
|
+
name: nonBlankTextSchema5.max(128)
|
|
22881
|
+
}).strict()).max(128)
|
|
22882
|
+
}).strict();
|
|
22883
|
+
var harnessSessionListParamsSchema = external_exports.object({
|
|
22884
|
+
harnessId: harnessPluginIdSchema,
|
|
22885
|
+
query: external_exports.string().trim().max(4096).refine((value) => !value.includes("\0")).optional(),
|
|
22886
|
+
offset: external_exports.number().int().nonnegative().safe().optional(),
|
|
22887
|
+
limit: external_exports.number().int().min(1).max(HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH).optional()
|
|
22888
|
+
}).strict();
|
|
22889
|
+
var harnessSessionListResultSchema = external_exports.object({
|
|
22890
|
+
candidates: external_exports.array(harnessSessionImportCandidateSchema).max(HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH),
|
|
22891
|
+
total: external_exports.number().int().nonnegative().safe()
|
|
22892
|
+
}).strict();
|
|
22893
|
+
var harnessSessionImportParamsSchema = external_exports.object({
|
|
22894
|
+
harnessId: harnessPluginIdSchema,
|
|
22895
|
+
nativeSessionId: harnessSessionImportIdSchema
|
|
22896
|
+
}).strict();
|
|
22897
|
+
var harnessSessionImportResultSchema = external_exports.object({
|
|
22898
|
+
threadId: nonBlankTextSchema5.max(1024).pipe(hostThreadIdSchema)
|
|
22899
|
+
}).strict();
|
|
22900
|
+
|
|
22901
|
+
// ../../shared-contracts/dist/deepseek-modern-sessions.js
|
|
22902
|
+
var DEEPSEEK_MODERN_SESSION_LIST_MAX_LENGTH = HARNESS_SESSION_IMPORT_LIST_MAX_LENGTH;
|
|
22903
|
+
var DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH = 1024;
|
|
22904
|
+
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");
|
|
22905
|
+
var deepSeekModernSessionIdSchema = harnessSessionImportIdSchema;
|
|
22906
|
+
var deepSeekModernSessionCandidateSchema = harnessSessionImportCandidateSchema;
|
|
22907
|
+
var deepSeekModernSessionListParamsSchema = external_exports.object({}).strict();
|
|
22908
|
+
var deepSeekModernSessionListResultSchema = external_exports.object({
|
|
22909
|
+
candidates: external_exports.array(deepSeekModernSessionCandidateSchema).max(DEEPSEEK_MODERN_SESSION_LIST_MAX_LENGTH)
|
|
22910
|
+
}).strict();
|
|
22911
|
+
var deepSeekModernSessionImportParamsSchema = external_exports.object({
|
|
22912
|
+
nativeSessionId: deepSeekModernSessionIdSchema
|
|
22913
|
+
}).strict();
|
|
22914
|
+
var deepSeekModernSessionImportResultSchema = external_exports.object({
|
|
22915
|
+
threadId: nonBlankTextSchema6.max(DEEPSEEK_MODERN_HOST_THREAD_ID_MAX_LENGTH).pipe(hostThreadIdSchema)
|
|
22916
|
+
}).strict();
|
|
22917
|
+
|
|
22918
|
+
// ../../shared-contracts/dist/external-thread-fork.js
|
|
22919
|
+
var externalThreadForkParamsSchema = external_exports.object({
|
|
22920
|
+
threadId: hostThreadIdSchema,
|
|
22921
|
+
lastTurnId: hostTurnIdSchema
|
|
22922
|
+
}).strict();
|
|
22923
|
+
var externalThreadForkResultSchema = external_exports.object({
|
|
22924
|
+
threadId: hostThreadIdSchema
|
|
22925
|
+
}).strict();
|
|
22952
22926
|
|
|
22953
|
-
// ../../shared-contracts/dist/
|
|
22954
|
-
var
|
|
22955
|
-
|
|
22956
|
-
|
|
22927
|
+
// ../../shared-contracts/dist/harness-commands.js
|
|
22928
|
+
var commandIdSchema = external_exports.string().trim().min(1).max(128).regex(/^[A-Za-z0-9._:-]+$/u).brand();
|
|
22929
|
+
var commandInvocationSchema = external_exports.string().min(1).max(128);
|
|
22930
|
+
var commandLabelSchema = external_exports.string().trim().min(1).max(128);
|
|
22931
|
+
var commandDescriptionSchema = external_exports.string().trim().min(1).max(512);
|
|
22932
|
+
var harnessCommandDescriptorSchema = external_exports.object({
|
|
22933
|
+
id: commandIdSchema,
|
|
22934
|
+
invocation: commandInvocationSchema,
|
|
22935
|
+
label: commandLabelSchema,
|
|
22936
|
+
description: commandDescriptionSchema.optional(),
|
|
22937
|
+
localizations: harnessLocalizationsSchema.optional(),
|
|
22938
|
+
argumentMode: external_exports.enum(["none", "text"]),
|
|
22939
|
+
/**
|
|
22940
|
+
* Native distinction reported by the Harness. Omitted when the Harness does
|
|
22941
|
+
* not tell skills and commands apart; consumers treat that as "command".
|
|
22942
|
+
*/
|
|
22943
|
+
kind: external_exports.enum(["command", "skill"]).optional()
|
|
22944
|
+
}).strict();
|
|
22945
|
+
var harnessCommandCatalogSchema = external_exports.object({
|
|
22946
|
+
commands: external_exports.array(harnessCommandDescriptorSchema),
|
|
22947
|
+
/** Partial discovery failures; valid commands remain available. */
|
|
22948
|
+
warnings: external_exports.array(external_exports.string().min(1)).optional(),
|
|
22949
|
+
/**
|
|
22950
|
+
* `live` when a native Session has reported its live catalog for the
|
|
22951
|
+
* workspace (even when filtering leaves only built-ins); `static` for
|
|
22952
|
+
* Adapter built-ins only before live commands arrive. Adapters may set
|
|
22953
|
+
* `live` once their Session's live catalog has loaded.
|
|
22954
|
+
*/
|
|
22955
|
+
source: external_exports.enum(["live", "static"]).optional()
|
|
22956
|
+
}).strict().superRefine((catalog, context) => {
|
|
22957
|
+
const ids = /* @__PURE__ */ new Set();
|
|
22958
|
+
for (const [index, command] of catalog.commands.entries()) {
|
|
22959
|
+
if (ids.has(command.id)) {
|
|
22960
|
+
context.addIssue({
|
|
22961
|
+
code: "custom",
|
|
22962
|
+
message: "Harness command IDs must be unique",
|
|
22963
|
+
path: ["commands", index, "id"]
|
|
22964
|
+
});
|
|
22965
|
+
}
|
|
22966
|
+
ids.add(command.id);
|
|
22967
|
+
}
|
|
22957
22968
|
});
|
|
22958
|
-
var
|
|
22969
|
+
var harnessCommandsInspectParamsSchema = external_exports.object({
|
|
22970
|
+
harnessId: harnessIdSchema,
|
|
22971
|
+
/** Workspace of a draft without a Thread, for its live catalog when known. */
|
|
22972
|
+
cwd: external_exports.string().min(1).optional()
|
|
22973
|
+
}).strict();
|
|
22974
|
+
var threadCommandsInspectParamsSchema = external_exports.object({
|
|
22975
|
+
threadId: hostThreadIdSchema
|
|
22976
|
+
}).strict();
|
|
22977
|
+
var threadCommandExecuteParamsSchema = external_exports.object({
|
|
22978
|
+
threadId: hostThreadIdSchema,
|
|
22979
|
+
commandId: commandIdSchema,
|
|
22980
|
+
turnId: hostTurnIdSchema.optional(),
|
|
22981
|
+
arguments: jsonObjectSchema.optional()
|
|
22982
|
+
}).strict();
|
|
22983
|
+
var threadCommandExecuteResultSchema = external_exports.object({
|
|
22984
|
+
accepted: external_exports.literal(true),
|
|
22985
|
+
turnId: hostTurnIdSchema.optional()
|
|
22986
|
+
}).strict();
|
|
22959
22987
|
|
|
22960
|
-
// ../../shared-contracts/dist/
|
|
22961
|
-
var
|
|
22962
|
-
var
|
|
22963
|
-
|
|
22964
|
-
|
|
22988
|
+
// ../../shared-contracts/dist/json-rpc.js
|
|
22989
|
+
var jsonRpcVersionSchema = external_exports.literal("2.0").optional();
|
|
22990
|
+
var absentSchema = external_exports.never().optional();
|
|
22991
|
+
var methodSchema = external_exports.string().min(1);
|
|
22992
|
+
var jsonRpcIdSchema = external_exports.union([external_exports.string(), external_exports.number().int()]);
|
|
22993
|
+
var jsonRpcErrorSchema = external_exports.object({
|
|
22994
|
+
code: external_exports.number().int(),
|
|
22995
|
+
message: external_exports.string(),
|
|
22996
|
+
data: jsonValueSchema.optional()
|
|
22997
|
+
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["data"]));
|
|
22998
|
+
var jsonRpcRequestSchema = external_exports.object({
|
|
22999
|
+
jsonrpc: jsonRpcVersionSchema,
|
|
23000
|
+
id: jsonRpcIdSchema,
|
|
23001
|
+
method: methodSchema,
|
|
23002
|
+
params: jsonValueSchema.optional(),
|
|
23003
|
+
result: absentSchema,
|
|
23004
|
+
error: absentSchema
|
|
23005
|
+
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "params", "result", "error"]));
|
|
23006
|
+
var jsonRpcNotificationSchema = external_exports.object({
|
|
23007
|
+
jsonrpc: jsonRpcVersionSchema,
|
|
23008
|
+
id: absentSchema,
|
|
23009
|
+
method: methodSchema,
|
|
23010
|
+
params: jsonValueSchema.optional(),
|
|
23011
|
+
result: absentSchema,
|
|
23012
|
+
error: absentSchema
|
|
23013
|
+
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "id", "params", "result", "error"]));
|
|
23014
|
+
var jsonRpcSuccessResponseSchema = external_exports.object({
|
|
23015
|
+
jsonrpc: jsonRpcVersionSchema,
|
|
23016
|
+
id: jsonRpcIdSchema,
|
|
23017
|
+
method: absentSchema,
|
|
23018
|
+
params: absentSchema,
|
|
23019
|
+
result: jsonValueSchema,
|
|
23020
|
+
error: absentSchema
|
|
23021
|
+
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "method", "params", "error"]));
|
|
23022
|
+
var jsonRpcErrorResponseSchema = external_exports.object({
|
|
23023
|
+
jsonrpc: jsonRpcVersionSchema,
|
|
23024
|
+
id: jsonRpcIdSchema,
|
|
23025
|
+
method: absentSchema,
|
|
23026
|
+
params: absentSchema,
|
|
23027
|
+
result: absentSchema,
|
|
23028
|
+
error: jsonRpcErrorSchema
|
|
23029
|
+
}).catchall(jsonValueSchema).superRefine(rejectExplicitUndefined(["jsonrpc", "method", "params", "result"]));
|
|
23030
|
+
var jsonRpcEnvelopeSchema = external_exports.union([
|
|
23031
|
+
jsonRpcRequestSchema,
|
|
23032
|
+
jsonRpcNotificationSchema,
|
|
23033
|
+
jsonRpcSuccessResponseSchema,
|
|
23034
|
+
jsonRpcErrorResponseSchema
|
|
22965
23035
|
]);
|
|
22966
|
-
|
|
22967
|
-
|
|
22968
|
-
|
|
22969
|
-
|
|
22970
|
-
error: external_exports.string().optional()
|
|
22971
|
-
});
|
|
22972
|
-
var webUiExtensionSchema = external_exports.object({
|
|
22973
|
-
id: webUiExtensionIdSchema,
|
|
22974
|
-
name: external_exports.string().min(1).max(214),
|
|
22975
|
-
version: external_exports.string().min(1).max(128),
|
|
22976
|
-
format: external_exports.literal("dsh"),
|
|
22977
|
-
supportedTargets: external_exports.tuple([external_exports.literal("web")]),
|
|
22978
|
-
enabledTargets: external_exports.array(external_exports.literal("web")).max(1),
|
|
22979
|
-
source: external_exports.string().min(1).max(4096),
|
|
22980
|
-
/** Public project page, derived from installed package metadata and its source. */
|
|
22981
|
-
projectUrl: external_exports.string().max(4096).url({ protocol: /^https?$/u }).optional(),
|
|
22982
|
-
installedAt: external_exports.string(),
|
|
22983
|
-
meta: webUiExtensionMetaSchema.optional(),
|
|
22984
|
-
loadError: external_exports.string().optional()
|
|
23036
|
+
|
|
23037
|
+
// ../../shared-contracts/dist/native-refs.js
|
|
23038
|
+
var nativeIdSchema = external_exports.string().refine((value) => value.trim().length > 0, {
|
|
23039
|
+
message: "Native identifier must not be empty or whitespace"
|
|
22985
23040
|
});
|
|
22986
|
-
var
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
|
|
22990
|
-
|
|
23041
|
+
var nativeSessionRefV1RuntimeSchema = external_exports.strictObject({
|
|
23042
|
+
harnessId: harnessIdSchema,
|
|
23043
|
+
nativeSessionId: nativeIdSchema,
|
|
23044
|
+
locator: jsonValueSchema.optional(),
|
|
23045
|
+
formatVersion: external_exports.literal(1)
|
|
23046
|
+
}).superRefine(rejectExplicitUndefined(["locator"]));
|
|
23047
|
+
var nativeSessionRefV1Schema = nativeSessionRefV1RuntimeSchema;
|
|
23048
|
+
var nativeSessionRefSchema = nativeSessionRefV1Schema;
|
|
23049
|
+
var nativeTurnRefV1Schema = external_exports.strictObject({
|
|
23050
|
+
harnessId: harnessIdSchema,
|
|
23051
|
+
nativeSessionId: nativeIdSchema,
|
|
23052
|
+
nativeTurnKey: nativeIdSchema,
|
|
23053
|
+
formatVersion: external_exports.literal(1)
|
|
22991
23054
|
});
|
|
22992
|
-
var
|
|
22993
|
-
var
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
23055
|
+
var nativeTurnRefSchema = nativeTurnRefV1Schema;
|
|
23056
|
+
var nativeCheckpointRefV1RuntimeSchema = external_exports.strictObject({
|
|
23057
|
+
harnessId: harnessIdSchema,
|
|
23058
|
+
nativeSessionId: nativeIdSchema,
|
|
23059
|
+
checkpointId: nativeIdSchema,
|
|
23060
|
+
locator: jsonValueSchema.optional(),
|
|
23061
|
+
formatVersion: external_exports.literal(1)
|
|
23062
|
+
}).superRefine(rejectExplicitUndefined(["locator"]));
|
|
23063
|
+
var nativeCheckpointRefV1Schema = nativeCheckpointRefV1RuntimeSchema;
|
|
23064
|
+
var nativeCheckpointRefSchema = nativeCheckpointRefV1Schema;
|
|
22999
23065
|
|
|
23000
|
-
// ../../shared-contracts/dist/
|
|
23001
|
-
var
|
|
23002
|
-
var
|
|
23003
|
-
var
|
|
23004
|
-
var
|
|
23005
|
-
|
|
23006
|
-
"
|
|
23007
|
-
"
|
|
23008
|
-
"
|
|
23009
|
-
"green",
|
|
23010
|
-
"amber",
|
|
23011
|
-
"rose",
|
|
23012
|
-
"slate"
|
|
23013
|
-
];
|
|
23014
|
-
var remotePeerColorSchema = external_exports.enum(REMOTE_PEER_COLORS);
|
|
23015
|
-
var REMOTE_PEER_COLOR_SET = new Set(REMOTE_PEER_COLORS);
|
|
23016
|
-
var remotePeerStateSchema = external_exports.enum([
|
|
23017
|
-
"connected",
|
|
23018
|
-
"connecting",
|
|
23019
|
-
"auth-error",
|
|
23020
|
-
"offline",
|
|
23021
|
-
"disabled"
|
|
23066
|
+
// ../../shared-contracts/dist/updates.js
|
|
23067
|
+
var UPDATE_ERROR_MAX_LENGTH = 500;
|
|
23068
|
+
var UPDATE_SEMVER_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
|
|
23069
|
+
var updateSemanticVersionSchema = external_exports.string().regex(UPDATE_SEMVER_PATTERN);
|
|
23070
|
+
var updateInstallationSchema = external_exports.enum([
|
|
23071
|
+
"npm",
|
|
23072
|
+
"windows-installer",
|
|
23073
|
+
"macos-dmg",
|
|
23074
|
+
"linux-archive"
|
|
23022
23075
|
]);
|
|
23023
|
-
var
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
|
|
23032
|
-
|
|
23033
|
-
|
|
23034
|
-
|
|
23035
|
-
|
|
23036
|
-
|
|
23037
|
-
|
|
23038
|
-
lastError: external_exports.string().max(1e3).optional(),
|
|
23039
|
-
projectCount: external_exports.number().int().nonnegative(),
|
|
23040
|
-
createdAt: external_exports.string(),
|
|
23041
|
-
updatedAt: external_exports.string()
|
|
23042
|
-
});
|
|
23043
|
-
var remotePeerListResultSchema = external_exports.object({
|
|
23044
|
-
peers: external_exports.array(remotePeerSummarySchema)
|
|
23076
|
+
var updatePhaseSchema = external_exports.enum([
|
|
23077
|
+
"prepared",
|
|
23078
|
+
"downloading",
|
|
23079
|
+
"waiting-for-exit",
|
|
23080
|
+
"installing",
|
|
23081
|
+
"restarting",
|
|
23082
|
+
"succeeded",
|
|
23083
|
+
"failed"
|
|
23084
|
+
]);
|
|
23085
|
+
var npmDownloadProgressSchema = external_exports.strictObject({
|
|
23086
|
+
completed: external_exports.number().int().nonnegative(),
|
|
23087
|
+
total: external_exports.number().int().positive()
|
|
23088
|
+
}).refine((progress) => progress.completed <= progress.total, {
|
|
23089
|
+
path: ["completed"],
|
|
23090
|
+
message: "completed must not exceed total"
|
|
23045
23091
|
});
|
|
23046
|
-
var
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
23092
|
+
var updateStatusSchema = external_exports.strictObject({
|
|
23093
|
+
version: updateSemanticVersionSchema,
|
|
23094
|
+
installation: updateInstallationSchema,
|
|
23095
|
+
phase: updatePhaseSchema,
|
|
23096
|
+
updatedAt: external_exports.number().int().nonnegative(),
|
|
23097
|
+
downloadedBytes: external_exports.number().int().nonnegative().optional(),
|
|
23098
|
+
totalBytes: external_exports.number().int().positive().optional(),
|
|
23099
|
+
npmDownload: npmDownloadProgressSchema.optional(),
|
|
23100
|
+
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable(),
|
|
23101
|
+
serviceStopOutput: external_exports.string().optional()
|
|
23102
|
+
}).superRefine((status, context) => {
|
|
23103
|
+
if (status.downloadedBytes !== void 0 && status.totalBytes !== void 0 && status.downloadedBytes > status.totalBytes) {
|
|
23104
|
+
context.addIssue({
|
|
23105
|
+
code: "custom",
|
|
23106
|
+
path: ["downloadedBytes"],
|
|
23107
|
+
message: "downloadedBytes must not exceed totalBytes"
|
|
23108
|
+
});
|
|
23109
|
+
}
|
|
23061
23110
|
});
|
|
23062
|
-
var
|
|
23063
|
-
|
|
23111
|
+
var updateEmptyParamsSchema = external_exports.strictObject({});
|
|
23112
|
+
var githubReleaseNotesUrlSchema = external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u, "release notes URL must identify a codexhost GitHub Release");
|
|
23113
|
+
var updateCheckResultSchema = external_exports.strictObject({
|
|
23114
|
+
currentVersion: updateSemanticVersionSchema,
|
|
23115
|
+
installation: updateInstallationSchema.nullable(),
|
|
23116
|
+
latestVersion: updateSemanticVersionSchema.nullable(),
|
|
23117
|
+
updateAvailable: external_exports.boolean(),
|
|
23118
|
+
installationAvailable: external_exports.boolean(),
|
|
23119
|
+
releaseNotes: external_exports.string().min(1).max(2e4).nullable(),
|
|
23120
|
+
releaseNotesUrl: githubReleaseNotesUrlSchema.nullable(),
|
|
23121
|
+
status: updateStatusSchema.nullable(),
|
|
23122
|
+
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable()
|
|
23064
23123
|
});
|
|
23065
|
-
var
|
|
23066
|
-
|
|
23124
|
+
var updateStartResultSchema = external_exports.strictObject({
|
|
23125
|
+
status: updateStatusSchema
|
|
23067
23126
|
});
|
|
23068
|
-
var
|
|
23069
|
-
|
|
23070
|
-
connectionUrl: external_exports.string().min(1).max(4096).optional(),
|
|
23071
|
-
origin: external_exports.string().min(1).max(2048).optional(),
|
|
23072
|
-
token: external_exports.string().min(1).max(2048).optional()
|
|
23073
|
-
}).refine((input3) => Boolean(input3.peerId) || Boolean(input3.connectionUrl) || Boolean(input3.origin) && Boolean(input3.token), "Provide peerId, connectionUrl, or both origin and token");
|
|
23074
|
-
var remotePeerTestProjectSchema = external_exports.object({
|
|
23075
|
-
id: external_exports.string().min(1).max(1024),
|
|
23076
|
-
name: external_exports.string().min(1).max(512),
|
|
23077
|
-
path: external_exports.string().min(1).max(8192)
|
|
23127
|
+
var updateStatusResultSchema = external_exports.strictObject({
|
|
23128
|
+
status: updateStatusSchema.nullable()
|
|
23078
23129
|
});
|
|
23079
|
-
|
|
23080
|
-
|
|
23081
|
-
|
|
23082
|
-
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
hostname: external_exports.string().max(255).optional(),
|
|
23088
|
-
homeDir: external_exports.string().max(4096).optional(),
|
|
23089
|
-
projectCount: external_exports.number().int().nonnegative().optional(),
|
|
23090
|
-
projects: external_exports.array(remotePeerTestProjectSchema).optional(),
|
|
23091
|
-
error: external_exports.string().max(1e3).optional()
|
|
23130
|
+
|
|
23131
|
+
// ../../shared-contracts/dist/release-announcement.js
|
|
23132
|
+
var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
|
|
23133
|
+
var releaseAnnouncementThemeSchema = external_exports.strictObject({
|
|
23134
|
+
icon: external_exports.string().min(1).max(16).optional(),
|
|
23135
|
+
title: external_exports.string().min(1).max(120),
|
|
23136
|
+
body: external_exports.string().min(1).max(1200),
|
|
23137
|
+
contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
|
|
23092
23138
|
});
|
|
23093
|
-
var
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
path: external_exports.string().min(1).max(8192),
|
|
23097
|
-
threadIds: external_exports.array(external_exports.string().min(1).max(1024))
|
|
23139
|
+
var releaseAnnouncementContentSchema = external_exports.strictObject({
|
|
23140
|
+
summary: external_exports.string().min(1).max(600).optional(),
|
|
23141
|
+
themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
|
|
23098
23142
|
});
|
|
23099
|
-
var
|
|
23100
|
-
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23143
|
+
var releaseAnnouncementSchema = external_exports.strictObject({
|
|
23144
|
+
version: updateSemanticVersionSchema,
|
|
23145
|
+
publishedAt: external_exports.iso.datetime(),
|
|
23146
|
+
url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
|
|
23147
|
+
zh: releaseAnnouncementContentSchema.nullable(),
|
|
23148
|
+
en: releaseAnnouncementContentSchema.nullable()
|
|
23149
|
+
}).refine((value) => value.zh !== null || value.en !== null, {
|
|
23150
|
+
message: "an announcement needs at least one language"
|
|
23106
23151
|
});
|
|
23107
|
-
var
|
|
23108
|
-
|
|
23109
|
-
platform: external_exports.string().max(64),
|
|
23110
|
-
hostname: external_exports.string().max(255),
|
|
23111
|
-
homeDir: external_exports.string().max(4096).optional(),
|
|
23112
|
-
epoch: external_exports.string().min(1).max(256),
|
|
23113
|
-
projects: external_exports.array(remotePeerManifestProjectSchema),
|
|
23114
|
-
capabilities: remotePeerCapabilitiesSchema.optional()
|
|
23152
|
+
var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
|
|
23153
|
+
manual: external_exports.boolean().optional()
|
|
23115
23154
|
});
|
|
23116
|
-
var
|
|
23117
|
-
|
|
23118
|
-
|
|
23119
|
-
scope: external_exports.string().regex(REMOTE_PEER_UPLOAD_SCOPE_PATTERN).optional(),
|
|
23120
|
-
requestId: external_exports.string().min(1).max(256).optional(),
|
|
23121
|
-
mode: external_exports.enum(["queue", "steer"]).optional(),
|
|
23122
|
-
expectedTurnId: external_exports.string().min(1).max(1024).nullable().optional(),
|
|
23123
|
-
content: external_exports.array(external_exports.discriminatedUnion("type", [
|
|
23124
|
-
external_exports.strictObject({ type: external_exports.literal("text"), text: external_exports.string() }),
|
|
23125
|
-
external_exports.strictObject({ type: external_exports.literal("file"), receiptId: external_exports.string().min(1).max(128) })
|
|
23126
|
-
])).min(1).max(64)
|
|
23155
|
+
var releaseAnnouncementGetResultSchema = external_exports.strictObject({
|
|
23156
|
+
announcement: releaseAnnouncementSchema.nullable(),
|
|
23157
|
+
unread: external_exports.boolean()
|
|
23127
23158
|
});
|
|
23128
|
-
var
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
|
|
23133
|
-
|
|
23159
|
+
var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
|
|
23160
|
+
version: updateSemanticVersionSchema
|
|
23161
|
+
});
|
|
23162
|
+
|
|
23163
|
+
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
23164
|
+
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
23165
|
+
"completed",
|
|
23166
|
+
"failed",
|
|
23167
|
+
"interrupted",
|
|
23168
|
+
"needsInput",
|
|
23169
|
+
"timedOut",
|
|
23170
|
+
"unreadable",
|
|
23171
|
+
"notFound"
|
|
23172
|
+
];
|
|
23173
|
+
var ENTRY_PATTERN = new RegExp(String.raw`^- \[([^\]\n]+)\]\(thread://([^\s()<>"?#/]+)\): ` + `(${THREAD_WATCH_NOTICE_OUTCOMES.join("|")})(?:. (.+))?$`, "u");
|
|
23174
|
+
|
|
23175
|
+
// ../../shared-contracts/dist/remote-runtime.js
|
|
23176
|
+
var remoteUpdatePhaseSchema = external_exports.enum([
|
|
23177
|
+
"idle",
|
|
23178
|
+
"installing",
|
|
23179
|
+
"restarting",
|
|
23180
|
+
"succeeded",
|
|
23181
|
+
"failed"
|
|
23182
|
+
]);
|
|
23183
|
+
var runtimeStatusSchema = external_exports.object({
|
|
23184
|
+
runningVersion: external_exports.string().nullable(),
|
|
23185
|
+
installedVersion: external_exports.string().nullable(),
|
|
23186
|
+
restartRequired: external_exports.boolean(),
|
|
23187
|
+
remote: external_exports.boolean(),
|
|
23188
|
+
updateSupported: external_exports.boolean(),
|
|
23189
|
+
update: external_exports.object({
|
|
23190
|
+
phase: remoteUpdatePhaseSchema,
|
|
23191
|
+
targetVersion: external_exports.string().nullable(),
|
|
23192
|
+
error: external_exports.string().nullable()
|
|
23134
23193
|
})
|
|
23135
23194
|
});
|
|
23136
|
-
var
|
|
23195
|
+
var remoteUpdateParamsSchema = external_exports.object({
|
|
23196
|
+
version: external_exports.string().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u)
|
|
23197
|
+
}).strict();
|
|
23198
|
+
var remoteSshSetupParamsSchema = external_exports.object({
|
|
23199
|
+
hostname: external_exports.string().min(1).max(1024).refine((value) => !value.startsWith("-") && !/\s/u.test(value)),
|
|
23200
|
+
port: external_exports.number().int().min(1).max(65535).nullable(),
|
|
23201
|
+
identity: external_exports.string().max(4096).nullable(),
|
|
23202
|
+
action: external_exports.enum(["inspect", "install", "update", "repair", "uninstall"]),
|
|
23203
|
+
uninstallPackage: external_exports.boolean().optional(),
|
|
23204
|
+
version: external_exports.string().regex(/^\d+\.\d+\.\d+$/u).nullable()
|
|
23205
|
+
}).strict();
|
|
23206
|
+
var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
|
|
23207
|
+
|
|
23208
|
+
// ../../shared-contracts/dist/remote-sessions.js
|
|
23209
|
+
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
23210
|
+
var REMOTE_IDENTITY_MAX_LENGTH = 1024;
|
|
23211
|
+
var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
|
|
23212
|
+
var target = {
|
|
23213
|
+
hostId: identity.regex(/^(?:remote-(?:ssh(?:-|:)|control:)|remote-peer:[a-zA-Z0-9_-]{1,64}$)/u)
|
|
23214
|
+
};
|
|
23215
|
+
var thread = { ...target, threadId: identity };
|
|
23216
|
+
var text = external_exports.string().min(1).max(8e3);
|
|
23217
|
+
var input2 = { text, requestId: identity };
|
|
23218
|
+
var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
|
|
23219
|
+
external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
|
|
23137
23220
|
external_exports.object({
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23143
|
-
|
|
23144
|
-
|
|
23145
|
-
|
|
23146
|
-
|
|
23221
|
+
accepted: external_exports.literal(false),
|
|
23222
|
+
code: external_exports.enum([
|
|
23223
|
+
"remote/queue-unavailable",
|
|
23224
|
+
"remote/steer-unavailable",
|
|
23225
|
+
"remote/turn-changed",
|
|
23226
|
+
"remote/send-rejected",
|
|
23227
|
+
"session/queue-item-not-found",
|
|
23228
|
+
"session/queue-item-starting"
|
|
23229
|
+
]),
|
|
23230
|
+
message: external_exports.string()
|
|
23231
|
+
})
|
|
23232
|
+
]);
|
|
23233
|
+
var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
|
|
23234
|
+
external_exports.object({ available: external_exports.literal(false) }),
|
|
23235
|
+
external_exports.object({
|
|
23236
|
+
available: external_exports.literal(true),
|
|
23237
|
+
items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
|
|
23238
|
+
})
|
|
23239
|
+
]);
|
|
23240
|
+
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
23241
|
+
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
23242
|
+
external_exports.strictObject({
|
|
23243
|
+
kind: external_exports.literal("create"),
|
|
23244
|
+
...target,
|
|
23245
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
23246
|
+
epoch: identity
|
|
23247
|
+
}),
|
|
23248
|
+
external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
|
|
23249
|
+
external_exports.strictObject({
|
|
23250
|
+
kind: external_exports.literal("inspectHarness"),
|
|
23251
|
+
...target,
|
|
23252
|
+
epoch: identity,
|
|
23253
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
23254
|
+
harnessId: identity
|
|
23255
|
+
}),
|
|
23256
|
+
external_exports.strictObject({
|
|
23257
|
+
kind: external_exports.literal("startSelected"),
|
|
23258
|
+
...target,
|
|
23259
|
+
epoch: identity,
|
|
23260
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
23261
|
+
harnessId: identity,
|
|
23262
|
+
model: external_exports.string().min(1).max(4096),
|
|
23263
|
+
serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
|
|
23264
|
+
reasoningEffort: identity.optional()
|
|
23265
|
+
}),
|
|
23266
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
23267
|
+
external_exports.strictObject({
|
|
23268
|
+
kind: external_exports.literal("list"),
|
|
23269
|
+
...target,
|
|
23270
|
+
cursor: external_exports.string().nullable(),
|
|
23271
|
+
archived: external_exports.boolean(),
|
|
23272
|
+
includeLoaded: external_exports.literal(true).optional()
|
|
23273
|
+
}),
|
|
23274
|
+
external_exports.strictObject({
|
|
23275
|
+
kind: external_exports.literal("read"),
|
|
23276
|
+
...thread,
|
|
23277
|
+
page: external_exports.strictObject({
|
|
23278
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
23279
|
+
epoch: identity.optional(),
|
|
23280
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
23281
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
23282
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
23283
|
+
message: "A history continuation requires its connection epoch"
|
|
23284
|
+
}).optional()
|
|
23285
|
+
}),
|
|
23286
|
+
external_exports.strictObject({ kind: external_exports.literal("usage"), ...thread, epoch: identity }),
|
|
23287
|
+
external_exports.strictObject({
|
|
23288
|
+
kind: external_exports.literal("configure"),
|
|
23289
|
+
...thread,
|
|
23290
|
+
epoch: identity,
|
|
23291
|
+
modelId: identity.optional(),
|
|
23292
|
+
serviceTier: harnessModelServiceTierSchema.optional(),
|
|
23293
|
+
thinkingOptionId: identity.optional(),
|
|
23294
|
+
permissionModeId: identity.optional()
|
|
23295
|
+
}).refine((value) => [value.modelId, value.thinkingOptionId, value.permissionModeId].filter((v) => v !== void 0).length === 1, "Select exactly one remote setting").refine((value) => value.serviceTier === void 0 || value.modelId !== void 0, {
|
|
23296
|
+
message: "A service tier requires a Model ID"
|
|
23297
|
+
}),
|
|
23298
|
+
external_exports.strictObject({
|
|
23299
|
+
kind: external_exports.literal("prompt"),
|
|
23300
|
+
...thread,
|
|
23301
|
+
epoch: identity,
|
|
23302
|
+
text,
|
|
23303
|
+
requestId: identity.optional()
|
|
23147
23304
|
}),
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
|
|
23151
|
-
|
|
23152
|
-
|
|
23153
|
-
|
|
23305
|
+
external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
|
|
23306
|
+
external_exports.strictObject({
|
|
23307
|
+
kind: external_exports.literal("delivery"),
|
|
23308
|
+
...thread,
|
|
23309
|
+
epoch: identity,
|
|
23310
|
+
action: external_exports.discriminatedUnion("kind", [
|
|
23311
|
+
external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input2 }),
|
|
23312
|
+
external_exports.strictObject({ kind: external_exports.literal("steer"), ...input2, turnId: identity }),
|
|
23313
|
+
external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
|
|
23314
|
+
external_exports.strictObject({
|
|
23315
|
+
kind: external_exports.literal("start"),
|
|
23316
|
+
itemId: identity,
|
|
23317
|
+
onlyIfHead: external_exports.literal(true).optional()
|
|
23318
|
+
}),
|
|
23319
|
+
external_exports.strictObject({ kind: external_exports.literal("sendNow"), itemId: identity })
|
|
23320
|
+
])
|
|
23154
23321
|
}),
|
|
23155
|
-
|
|
23322
|
+
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
23323
|
+
external_exports.strictObject({
|
|
23324
|
+
kind: external_exports.literal("rename"),
|
|
23325
|
+
...thread,
|
|
23326
|
+
epoch: identity,
|
|
23327
|
+
name: external_exports.string().min(1).max(512)
|
|
23328
|
+
}),
|
|
23329
|
+
external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
|
|
23330
|
+
external_exports.strictObject({
|
|
23331
|
+
kind: external_exports.literal("respond"),
|
|
23332
|
+
...thread,
|
|
23333
|
+
epoch: identity,
|
|
23334
|
+
requestId: external_exports.union([identity, external_exports.number().int()]),
|
|
23335
|
+
result: external_exports.record(external_exports.string(), external_exports.unknown())
|
|
23336
|
+
})
|
|
23156
23337
|
]);
|
|
23157
|
-
|
|
23158
|
-
|
|
23159
|
-
|
|
23160
|
-
|
|
23161
|
-
|
|
23162
|
-
|
|
23163
|
-
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23167
|
-
|
|
23168
|
-
|
|
23169
|
-
|
|
23170
|
-
entries: external_exports.array(remotePeerDirectoryEntrySchema)
|
|
23171
|
-
});
|
|
23172
|
-
var remotePeerCreateDirParamsSchema = external_exports.object({
|
|
23173
|
-
peerId: remotePeerIdSchema,
|
|
23174
|
-
parentPath: external_exports.string().min(1).max(8192),
|
|
23175
|
-
name: external_exports.string().min(1).max(255).refine((value) => value.trim().length > 0, "Directory name cannot be blank")
|
|
23338
|
+
|
|
23339
|
+
// ../../shared-contracts/dist/remote-connections.js
|
|
23340
|
+
var hostId = external_exports.string().min(1).max(1024);
|
|
23341
|
+
var codexSshConnectionSchema = external_exports.object({
|
|
23342
|
+
hostId,
|
|
23343
|
+
displayName: external_exports.string().min(1).max(1024),
|
|
23344
|
+
source: external_exports.enum(["codex-managed", "discovered"]),
|
|
23345
|
+
sshAlias: external_exports.string().max(1024).nullable(),
|
|
23346
|
+
sshHost: external_exports.string().min(1).max(1024),
|
|
23347
|
+
sshPort: external_exports.number().int().min(1).max(65535).nullable(),
|
|
23348
|
+
identity: external_exports.string().max(4096).nullable(),
|
|
23349
|
+
autoConnect: external_exports.boolean(),
|
|
23350
|
+
connectionAnalyticsId: external_exports.string().max(1024).optional()
|
|
23176
23351
|
});
|
|
23177
|
-
var
|
|
23178
|
-
|
|
23179
|
-
|
|
23352
|
+
var codexSshDraftSchema = external_exports.strictObject({
|
|
23353
|
+
displayName: external_exports.string().min(1).max(1024),
|
|
23354
|
+
hostname: external_exports.string().min(1).max(1024),
|
|
23355
|
+
sshPort: external_exports.number().int().min(1).max(65535).nullable(),
|
|
23356
|
+
identity: external_exports.string().max(4096).nullable()
|
|
23180
23357
|
});
|
|
23181
|
-
var
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
|
|
23358
|
+
var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
|
|
23359
|
+
external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
|
|
23360
|
+
external_exports.strictObject({ action: external_exports.literal("list") }),
|
|
23361
|
+
external_exports.strictObject({ action: external_exports.literal("catalog") }),
|
|
23362
|
+
external_exports.strictObject({
|
|
23363
|
+
action: external_exports.literal("read-thread"),
|
|
23364
|
+
hostId: hostId.refine((id2) => id2 !== "local"),
|
|
23365
|
+
input: delegationReadParamsSchema
|
|
23366
|
+
}),
|
|
23367
|
+
external_exports.strictObject({
|
|
23368
|
+
action: external_exports.literal("save"),
|
|
23369
|
+
draft: codexSshDraftSchema,
|
|
23370
|
+
previous: codexSshConnectionSchema.nullable()
|
|
23371
|
+
}),
|
|
23372
|
+
external_exports.strictObject({ action: external_exports.literal("remove"), previous: codexSshConnectionSchema }),
|
|
23373
|
+
external_exports.strictObject({ action: external_exports.literal("connect"), hostId, enabled: external_exports.boolean() }),
|
|
23374
|
+
external_exports.strictObject({ action: external_exports.literal("state"), hostId }),
|
|
23375
|
+
external_exports.strictObject({ action: external_exports.literal("runtime"), hostId }),
|
|
23376
|
+
external_exports.strictObject({
|
|
23377
|
+
action: external_exports.literal("update"),
|
|
23378
|
+
hostId: hostId.refine((id2) => id2 !== "local"),
|
|
23379
|
+
version: remoteUpdateParamsSchema.shape.version
|
|
23380
|
+
})
|
|
23381
|
+
]);
|
|
23382
|
+
var remoteConnectionsReplySchema = external_exports.union([
|
|
23383
|
+
external_exports.strictObject({ result: jsonValueSchema }),
|
|
23384
|
+
external_exports.strictObject({ error: external_exports.strictObject({ code: external_exports.number().int(), message: external_exports.string() }) })
|
|
23385
|
+
]);
|
|
23386
|
+
|
|
23387
|
+
// ../../shared-contracts/dist/thread-title.js
|
|
23388
|
+
var threadTitleInputSchema = external_exports.strictObject({
|
|
23389
|
+
prompt: external_exports.string().trim().min(1).max(2e3),
|
|
23390
|
+
cwd: external_exports.string().max(4096).nullable()
|
|
23185
23391
|
});
|
|
23186
|
-
var
|
|
23187
|
-
|
|
23188
|
-
|
|
23189
|
-
|
|
23392
|
+
var threadTitleResultSchema = external_exports.string().trim().min(1).max(60).nullable();
|
|
23393
|
+
|
|
23394
|
+
// ../../shared-contracts/dist/web-ui-extensions.js
|
|
23395
|
+
var webUiExtensionIdSchema = external_exports.string().max(214).regex(/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u);
|
|
23396
|
+
var localizedTextSchema2 = external_exports.union([
|
|
23397
|
+
external_exports.string(),
|
|
23398
|
+
external_exports.object({ en: external_exports.string() }).catchall(external_exports.string())
|
|
23399
|
+
]);
|
|
23400
|
+
var webUiExtensionMetaSchema = external_exports.object({
|
|
23401
|
+
title: localizedTextSchema2.optional(),
|
|
23402
|
+
description: localizedTextSchema2.optional(),
|
|
23403
|
+
icon: external_exports.string().max(Math.ceil(256 * 1024 / 3) * 4 + 64).regex(/^data:image\/(?:svg\+xml|png|jpeg|webp);base64,[A-Za-z0-9+/]*={0,2}$/u).optional(),
|
|
23404
|
+
error: external_exports.string().optional()
|
|
23190
23405
|
});
|
|
23191
|
-
var
|
|
23192
|
-
|
|
23193
|
-
|
|
23406
|
+
var webUiExtensionSchema = external_exports.object({
|
|
23407
|
+
id: webUiExtensionIdSchema,
|
|
23408
|
+
name: external_exports.string().min(1).max(214),
|
|
23409
|
+
version: external_exports.string().min(1).max(128),
|
|
23410
|
+
format: external_exports.literal("dsh"),
|
|
23411
|
+
supportedTargets: external_exports.tuple([external_exports.literal("web")]),
|
|
23412
|
+
enabledTargets: external_exports.array(external_exports.literal("web")).max(1),
|
|
23413
|
+
source: external_exports.string().min(1).max(4096),
|
|
23414
|
+
/** Public project page, derived from installed package metadata and its source. */
|
|
23415
|
+
projectUrl: external_exports.string().max(4096).url({ protocol: /^https?$/u }).optional(),
|
|
23416
|
+
installedAt: external_exports.string(),
|
|
23417
|
+
meta: webUiExtensionMetaSchema.optional(),
|
|
23418
|
+
loadError: external_exports.string().optional()
|
|
23194
23419
|
});
|
|
23195
|
-
var
|
|
23196
|
-
|
|
23197
|
-
|
|
23420
|
+
var webUiExtensionsStateSchema = external_exports.object({
|
|
23421
|
+
extensions: external_exports.array(webUiExtensionSchema),
|
|
23422
|
+
loadedIds: external_exports.array(webUiExtensionIdSchema),
|
|
23423
|
+
safeMode: external_exports.boolean(),
|
|
23424
|
+
storeError: external_exports.string().optional()
|
|
23198
23425
|
});
|
|
23426
|
+
var webUiExtensionRegistrySchema = external_exports.string().trim().max(2048).url({ protocol: /^https?$/u, normalize: true }).refine((value) => !/[\s\\?#]/u.test(value) && !value.split("/")[2]?.includes("@"), "Use an HTTP(S) registry URL without credentials, a query, or a fragment.").transform((value) => value.endsWith("/") ? value : `${value}/`);
|
|
23427
|
+
var webUiExtensionInstallSchema = external_exports.object({
|
|
23428
|
+
spec: external_exports.string().trim().min(1).max(4096),
|
|
23429
|
+
registry: webUiExtensionRegistrySchema.optional()
|
|
23430
|
+
}).strict();
|
|
23431
|
+
var webUiExtensionEnabledSchema = external_exports.object({ id: webUiExtensionIdSchema, enabled: external_exports.boolean() }).strict();
|
|
23432
|
+
var webUiExtensionRemoveSchema = external_exports.object({ id: webUiExtensionIdSchema }).strict();
|
|
23199
23433
|
|
|
23200
23434
|
// ../../shared-contracts/dist/index.js
|
|
23201
23435
|
var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
|
|
@@ -23690,9 +23924,8 @@ function configureSubagentSnapshot(snapshot, parent) {
|
|
|
23690
23924
|
|
|
23691
23925
|
// ../../harness-adapter/dist/usage-statistics.js
|
|
23692
23926
|
import { createReadStream } from "node:fs";
|
|
23693
|
-
import { lstat,
|
|
23927
|
+
import { lstat, readdir } from "node:fs/promises";
|
|
23694
23928
|
import path4 from "node:path";
|
|
23695
|
-
import { createInterface } from "node:readline";
|
|
23696
23929
|
var MAX_SESSION_ID_LENGTH = 512;
|
|
23697
23930
|
var MAX_CWD_LENGTH = 4096;
|
|
23698
23931
|
var MAX_SESSION_TITLE_LENGTH = 200;
|
|
@@ -23746,40 +23979,101 @@ function usageEntryFromRequest(request, occurredAtMs) {
|
|
|
23746
23979
|
...request.reasoningOutputTokens !== void 0 ? { reasoningOutputTokens: request.reasoningOutputTokens } : {}
|
|
23747
23980
|
};
|
|
23748
23981
|
}
|
|
23982
|
+
var JSONL_CHUNK_BYTES = 128 * 1024;
|
|
23983
|
+
var JSONL_HEADER_CHUNK_BYTES = 16 * 1024;
|
|
23749
23984
|
async function jsonlUsageSources(root, maxDepth, signal) {
|
|
23750
23985
|
const sources = [];
|
|
23751
23986
|
const visit2 = async (directory, depth) => {
|
|
23752
23987
|
signal.throwIfAborted();
|
|
23753
|
-
const entries = await
|
|
23988
|
+
const entries = await readdir(directory, { withFileTypes: true }).catch((error62) => {
|
|
23754
23989
|
if (error62.code === "ENOENT")
|
|
23755
23990
|
return null;
|
|
23756
23991
|
throw error62;
|
|
23757
23992
|
});
|
|
23758
23993
|
if (!entries)
|
|
23759
23994
|
return;
|
|
23760
|
-
|
|
23761
|
-
|
|
23995
|
+
const subdirectories = [];
|
|
23996
|
+
const files = [];
|
|
23997
|
+
for (const entry of entries) {
|
|
23762
23998
|
const file2 = path4.join(directory, entry.name);
|
|
23763
23999
|
if (entry.isDirectory()) {
|
|
23764
24000
|
if (depth < maxDepth)
|
|
23765
|
-
|
|
24001
|
+
subdirectories.push(file2);
|
|
23766
24002
|
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
24003
|
+
files.push(file2);
|
|
24004
|
+
}
|
|
24005
|
+
}
|
|
24006
|
+
if (files.length > 0) {
|
|
24007
|
+
const stats = await Promise.all(files.map((file2) => lstat(file2).catch(() => null)));
|
|
24008
|
+
signal.throwIfAborted();
|
|
24009
|
+
for (let i = 0; i < files.length; i++) {
|
|
24010
|
+
const file2 = files[i];
|
|
24011
|
+
const info = stats[i];
|
|
24012
|
+
if (file2 && info?.isFile() && info.size > 0) {
|
|
24013
|
+
sources.push({
|
|
24014
|
+
id: file2,
|
|
24015
|
+
fingerprint: `${info.ino}:${info.size}:${info.mtimeMs}`
|
|
24016
|
+
});
|
|
23770
24017
|
}
|
|
23771
24018
|
}
|
|
23772
24019
|
}
|
|
24020
|
+
for (const subdirectory of subdirectories)
|
|
24021
|
+
await visit2(subdirectory, depth + 1);
|
|
23773
24022
|
};
|
|
23774
24023
|
await visit2(root, 0);
|
|
23775
24024
|
return sources;
|
|
23776
24025
|
}
|
|
24026
|
+
function concatParts(parts, total) {
|
|
24027
|
+
const [single] = parts;
|
|
24028
|
+
return single && parts.length === 1 ? single : Buffer.concat(parts, total);
|
|
24029
|
+
}
|
|
24030
|
+
async function* jsonlLineSlices(file2, signal, highWaterMark) {
|
|
24031
|
+
const stream = createReadStream(file2, { highWaterMark, signal });
|
|
24032
|
+
let parts = [];
|
|
24033
|
+
let buffered = 0;
|
|
24034
|
+
try {
|
|
24035
|
+
for await (const raw of stream) {
|
|
24036
|
+
signal.throwIfAborted();
|
|
24037
|
+
const chunk = raw;
|
|
24038
|
+
let start = 0;
|
|
24039
|
+
let end;
|
|
24040
|
+
while ((end = chunk.indexOf(10, start)) >= 0) {
|
|
24041
|
+
const lineEnd = end > start && chunk[end - 1] === 13 ? end - 1 : end;
|
|
24042
|
+
const slice = chunk.subarray(start, lineEnd);
|
|
24043
|
+
if (buffered === 0) {
|
|
24044
|
+
yield slice;
|
|
24045
|
+
} else {
|
|
24046
|
+
if (slice.length > 0) {
|
|
24047
|
+
parts.push(slice);
|
|
24048
|
+
buffered += slice.length;
|
|
24049
|
+
}
|
|
24050
|
+
const combined = concatParts(parts, buffered);
|
|
24051
|
+
parts = [];
|
|
24052
|
+
buffered = 0;
|
|
24053
|
+
yield combined.length > 0 && combined[combined.length - 1] === 13 ? combined.subarray(0, combined.length - 1) : combined;
|
|
24054
|
+
}
|
|
24055
|
+
start = end + 1;
|
|
24056
|
+
}
|
|
24057
|
+
if (start < chunk.length) {
|
|
24058
|
+
const rest = chunk.subarray(start);
|
|
24059
|
+
parts.push(rest);
|
|
24060
|
+
buffered += rest.length;
|
|
24061
|
+
}
|
|
24062
|
+
}
|
|
24063
|
+
if (buffered > 0) {
|
|
24064
|
+
const combined = concatParts(parts, buffered);
|
|
24065
|
+
yield combined.length > 0 && combined[combined.length - 1] === 13 ? combined.subarray(0, combined.length - 1) : combined;
|
|
24066
|
+
}
|
|
24067
|
+
} finally {
|
|
24068
|
+
stream.destroy();
|
|
24069
|
+
}
|
|
24070
|
+
}
|
|
23777
24071
|
async function* jsonlRecords(file2, marker, signal) {
|
|
23778
|
-
const
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
24072
|
+
const markerBytes = marker.length > 0 ? Buffer.from(marker, "utf8") : null;
|
|
24073
|
+
for await (const rawLine of jsonlLineSlices(file2, signal, JSONL_CHUNK_BYTES)) {
|
|
24074
|
+
if (markerBytes && !rawLine.includes(markerBytes))
|
|
24075
|
+
continue;
|
|
24076
|
+
const line = rawLine.toString("utf8");
|
|
23783
24077
|
if (!line.includes(marker))
|
|
23784
24078
|
continue;
|
|
23785
24079
|
let value;
|
|
@@ -23794,30 +24088,23 @@ async function* jsonlRecords(file2, marker, signal) {
|
|
|
23794
24088
|
}
|
|
23795
24089
|
}
|
|
23796
24090
|
async function jsonlHeader(file2, match, signal, maxLines = 4) {
|
|
23797
|
-
const stream = createReadStream(file2, { encoding: "utf8", signal });
|
|
23798
|
-
const lines = createInterface({ input: stream, crlfDelay: Infinity });
|
|
23799
24091
|
let seen = 0;
|
|
23800
|
-
|
|
23801
|
-
|
|
23802
|
-
|
|
23803
|
-
|
|
23804
|
-
|
|
23805
|
-
|
|
23806
|
-
|
|
23807
|
-
|
|
23808
|
-
|
|
23809
|
-
|
|
23810
|
-
|
|
23811
|
-
|
|
23812
|
-
|
|
23813
|
-
return record3;
|
|
23814
|
-
}
|
|
24092
|
+
for await (const rawLine of jsonlLineSlices(file2, signal, JSONL_HEADER_CHUNK_BYTES)) {
|
|
24093
|
+
if (++seen > maxLines)
|
|
24094
|
+
break;
|
|
24095
|
+
let value;
|
|
24096
|
+
try {
|
|
24097
|
+
value = JSON.parse(rawLine.toString("utf8"));
|
|
24098
|
+
} catch {
|
|
24099
|
+
continue;
|
|
24100
|
+
}
|
|
24101
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
24102
|
+
const record3 = value;
|
|
24103
|
+
if (match(record3))
|
|
24104
|
+
return record3;
|
|
23815
24105
|
}
|
|
23816
|
-
return null;
|
|
23817
|
-
} finally {
|
|
23818
|
-
lines.close();
|
|
23819
|
-
stream.destroy();
|
|
23820
24106
|
}
|
|
24107
|
+
return null;
|
|
23821
24108
|
}
|
|
23822
24109
|
function nativeTimeMs(value) {
|
|
23823
24110
|
const time3 = typeof value === "number" ? value : typeof value === "string" ? Date.parse(value) : Number.NaN;
|
|
@@ -23826,10 +24113,10 @@ function nativeTimeMs(value) {
|
|
|
23826
24113
|
|
|
23827
24114
|
// dist/session-import.js
|
|
23828
24115
|
import { createReadStream as createReadStream2 } from "node:fs";
|
|
23829
|
-
import { opendir
|
|
24116
|
+
import { opendir, realpath, stat } from "node:fs/promises";
|
|
23830
24117
|
import os2 from "node:os";
|
|
23831
24118
|
import path5 from "node:path";
|
|
23832
|
-
import { createInterface
|
|
24119
|
+
import { createInterface } from "node:readline";
|
|
23833
24120
|
|
|
23834
24121
|
// ../../harness-adapter/dist/session-import.js
|
|
23835
24122
|
import { lstat as lstat2 } from "node:fs/promises";
|
|
@@ -23973,7 +24260,7 @@ function messageText(content) {
|
|
|
23973
24260
|
}
|
|
23974
24261
|
async function readFacts(file2, signal) {
|
|
23975
24262
|
const stream = createReadStream2(file2, { encoding: "utf8", signal });
|
|
23976
|
-
const lines =
|
|
24263
|
+
const lines = createInterface({ input: stream, crlfDelay: Infinity });
|
|
23977
24264
|
let header = null;
|
|
23978
24265
|
let nativeTitle = null;
|
|
23979
24266
|
let firstPrompt = null;
|
|
@@ -24069,7 +24356,7 @@ var OmpSessionImport = class {
|
|
|
24069
24356
|
throw new Error("Omp Session store is not a directory");
|
|
24070
24357
|
const files = [];
|
|
24071
24358
|
const visit2 = async (current, projectLevel) => {
|
|
24072
|
-
const entries = await
|
|
24359
|
+
const entries = await opendir(current).catch((error62) => {
|
|
24073
24360
|
if (isMissingFileError(error62))
|
|
24074
24361
|
return null;
|
|
24075
24362
|
throw error62;
|
|
@@ -24858,8 +25145,12 @@ async function readOmpSessionHeader(sessionFile) {
|
|
|
24858
25145
|
if (newline < 0 && bytesRead === buffer.length) {
|
|
24859
25146
|
throw new Error("Omp Session header exceeds the supported size");
|
|
24860
25147
|
}
|
|
24861
|
-
|
|
24862
|
-
|
|
25148
|
+
for (let start = 0; start < contents.length; ) {
|
|
25149
|
+
const end = contents.indexOf(10, start);
|
|
25150
|
+
if (end < 0 && bytesRead === buffer.length)
|
|
25151
|
+
break;
|
|
25152
|
+
const line = utf8Decoder.decode(contents.subarray(start, end < 0 ? contents.length : end));
|
|
25153
|
+
start = end < 0 ? contents.length : end + 1;
|
|
24863
25154
|
if (line.length === 0)
|
|
24864
25155
|
continue;
|
|
24865
25156
|
let parsed;
|
|
@@ -29302,6 +29593,64 @@ var OmpAdapter = class {
|
|
|
29302
29593
|
harnessId = ompHarnessId2;
|
|
29303
29594
|
sessionImport;
|
|
29304
29595
|
usageStatistics;
|
|
29596
|
+
async readSnapshot(input3) {
|
|
29597
|
+
if (this.#closePromise) {
|
|
29598
|
+
return { ok: false, error: invalidState("Omp Adapter is closed") };
|
|
29599
|
+
}
|
|
29600
|
+
const parsedRef = nativeSessionRefSchema.safeParse(input3.nativeRef);
|
|
29601
|
+
if (!parsedRef.success || parsedRef.data.harnessId !== this.harnessId) {
|
|
29602
|
+
return {
|
|
29603
|
+
ok: false,
|
|
29604
|
+
error: {
|
|
29605
|
+
code: "invalidRequest",
|
|
29606
|
+
message: "Omp Native Session reference is invalid",
|
|
29607
|
+
retryable: false
|
|
29608
|
+
}
|
|
29609
|
+
};
|
|
29610
|
+
}
|
|
29611
|
+
const sourceRef = parsedRef.data;
|
|
29612
|
+
if (!isRecord10(sourceRef.locator) || typeof sourceRef.locator.sessionFile !== "string" || sourceRef.locator.sessionFile.length === 0) {
|
|
29613
|
+
return {
|
|
29614
|
+
ok: false,
|
|
29615
|
+
error: {
|
|
29616
|
+
code: "unsupported",
|
|
29617
|
+
message: "Omp Native Session Ref has no resumable Session file",
|
|
29618
|
+
retryable: false
|
|
29619
|
+
}
|
|
29620
|
+
};
|
|
29621
|
+
}
|
|
29622
|
+
try {
|
|
29623
|
+
const sessionFile = sourceRef.locator.sessionFile;
|
|
29624
|
+
const header = await readOmpSessionHeader(sessionFile);
|
|
29625
|
+
if (header.id !== sourceRef.nativeSessionId) {
|
|
29626
|
+
throw new OmpAdapterFaultError({
|
|
29627
|
+
code: "sessionNotFound",
|
|
29628
|
+
message: "Omp Session header identity does not match the persisted Native Session Ref",
|
|
29629
|
+
retryable: false
|
|
29630
|
+
});
|
|
29631
|
+
}
|
|
29632
|
+
const history = await readOmpSessionHistory(sessionFile);
|
|
29633
|
+
return {
|
|
29634
|
+
ok: true,
|
|
29635
|
+
value: mapOmpSnapshot(history, {
|
|
29636
|
+
sessionId: sourceRef.nativeSessionId,
|
|
29637
|
+
model: null
|
|
29638
|
+
})
|
|
29639
|
+
};
|
|
29640
|
+
} catch (error62) {
|
|
29641
|
+
if (isRecord10(error62) && error62.code === "ENOENT") {
|
|
29642
|
+
return {
|
|
29643
|
+
ok: false,
|
|
29644
|
+
error: {
|
|
29645
|
+
code: "sessionNotFound",
|
|
29646
|
+
message: "Omp Native Session is unavailable",
|
|
29647
|
+
retryable: false
|
|
29648
|
+
}
|
|
29649
|
+
};
|
|
29650
|
+
}
|
|
29651
|
+
return { ok: false, error: normalizedError(error62, "nativeFailure") };
|
|
29652
|
+
}
|
|
29653
|
+
}
|
|
29305
29654
|
subagents = {
|
|
29306
29655
|
readSnapshot: async (input3) => {
|
|
29307
29656
|
if (input3.parent.harnessId !== this.harnessId || input3.nativeSubagentId.trim().length === 0 || input3.cwd.length === 0) {
|