@codexhost/cli-win32-x64 0.28.2 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +1894 -575
- package/app/console-web.js +2814 -729
- package/app/desktop-controller.mjs +251 -36
- package/app/host-runtime.mjs +36528 -32793
- package/app/plugins/antigravity/assets/icon.svg +34 -1
- package/app/plugins/antigravity/plugin.mjs +1628 -657
- package/app/plugins/claude-code/assets/icon.svg +1 -1
- package/app/plugins/claude-code/manifest.json +1 -1
- package/app/plugins/claude-code/plugin.mjs +256 -31
- package/app/plugins/codebuddy/assets/icon.svg +1 -1
- package/app/plugins/codebuddy/plugin.mjs +230 -28
- package/app/plugins/codex-usage/plugin.mjs +230 -28
- package/app/plugins/copilot/assets/icon.svg +3 -0
- package/app/plugins/copilot/manifest.json +13 -1
- package/app/plugins/copilot/plugin.mjs +230 -28
- package/app/plugins/cursor-cli/assets/icon.svg +1 -1
- package/app/plugins/cursor-cli/plugin.mjs +304 -44
- package/app/plugins/deepseek-harness/assets/icon.svg +1 -1
- package/app/plugins/deepseek-harness/manifest.json +1 -1
- package/app/plugins/deepseek-harness/plugin.mjs +230 -28
- package/app/plugins/devin/assets/icon.svg +1 -1
- package/app/plugins/devin/manifest.json +20 -0
- package/app/plugins/devin/plugin.mjs +354 -67
- package/app/plugins/grok/assets/icon.svg +4 -0
- package/app/plugins/grok/manifest.json +16 -2
- package/app/plugins/grok/plugin.mjs +230 -28
- package/app/plugins/hermes/assets/icon.png +0 -0
- package/app/plugins/hermes/manifest.json +0 -5
- package/app/plugins/hermes/plugin.mjs +230 -28
- package/app/plugins/kimi-code/assets/icon.svg +1 -1
- package/app/plugins/kimi-code/manifest.json +20 -0
- package/app/plugins/kimi-code/plugin.mjs +230 -28
- package/app/plugins/kiro-cli/assets/kiro-agent.svg +1 -6
- package/app/plugins/kiro-cli/manifest.json +24 -0
- package/app/plugins/kiro-cli/plugin.mjs +230 -28
- package/app/plugins/omp/assets/icon.svg +1 -1
- package/app/plugins/omp/manifest.json +0 -3
- package/app/plugins/omp/plugin.mjs +231 -29
- package/app/plugins/opencode/assets/icon.svg +5 -0
- package/app/plugins/opencode/manifest.json +22 -1
- package/app/plugins/opencode/plugin.mjs +246 -40
- package/app/plugins/pi/assets/icon.svg +3 -3
- package/app/plugins/pi/plugin.mjs +272 -30
- package/app/plugins/qoder/assets/icon.svg +1 -1
- package/app/plugins/qoder/plugin.mjs +230 -28
- package/app/plugins/qoder-cn/assets/icon.svg +1 -1
- package/app/plugins/qoder-cn/plugin.mjs +230 -28
- package/app/plugins/qwen-code/assets/icon.svg +1 -1
- package/app/plugins/qwen-code/plugin.mjs +230 -28
- package/app/plugins/workbuddy/assets/icon.svg +7 -9
- package/app/plugins/workbuddy/plugin.mjs +230 -28
- package/app/plugins/zcode/assets/icon.svg +1 -1
- package/app/plugins/zcode/plugin.mjs +230 -28
- package/app/renderer-extension.js +4230 -783
- package/app/web/apple-touch-icon.png +0 -0
- package/app/web/assets/index-0TnaYwHS.js +205 -0
- package/app/web/assets/index-aSHN2MIG.css +1 -0
- package/app/web/codex-agent.png +0 -0
- package/app/web/codex.png +0 -0
- package/app/web/codexhost-settings.js +1225 -305
- package/app/web/favicon-dark.svg +37 -4
- package/app/web/favicon.svg +37 -3
- package/app/web/icon-192.png +0 -0
- package/app/web/icon-512.png +0 -0
- 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 +8 -8
- package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-file-upload/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +69 -69
- 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 +102 -98
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-shortcuts/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-subagent/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-theme/client.js +1 -1
- 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 +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +75 -81
- package/app/web/plugins.json +1 -0
- package/app/web-modules/server.mjs +1718 -573
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-screenshot.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/plugins/copilot/assets/icon.png +0 -0
- package/app/plugins/grok/assets/icon.png +0 -0
- package/app/plugins/opencode/assets/icon.png +0 -0
- package/app/web/assets/index-BJq8mT6r.js +0 -204
- package/app/web/assets/index-CMDliP5b.css +0 -1
|
@@ -20719,6 +20719,35 @@ function targetsForCapabilities({ hasPage, hasWidget, hasDesktop, hasWeb, hasBac
|
|
|
20719
20719
|
}
|
|
20720
20720
|
var hostExtensionBackendMethodSchema = desktopExtensionBackendMethodSchema;
|
|
20721
20721
|
|
|
20722
|
+
// ../../shared-contracts/dist/thread-tree-watch.js
|
|
20723
|
+
var THREAD_TREE_MAX_NODES = 5e3;
|
|
20724
|
+
var threadTreeStatusSchema = external_exports.enum(["running", "waiting", "idle", "unknown"]);
|
|
20725
|
+
var threadTreeHandoffSchema = external_exports.strictObject({
|
|
20726
|
+
sourceThreadId: hostThreadIdSchema,
|
|
20727
|
+
createdAtMs: external_exports.number().int().nonnegative()
|
|
20728
|
+
});
|
|
20729
|
+
var threadTreeNodeSchema = external_exports.strictObject({
|
|
20730
|
+
harnessId: harnessIdSchema,
|
|
20731
|
+
title: external_exports.string().optional(),
|
|
20732
|
+
status: threadTreeStatusSchema,
|
|
20733
|
+
archived: external_exports.boolean(),
|
|
20734
|
+
updatedAtMs: external_exports.number().int().nonnegative().optional()
|
|
20735
|
+
});
|
|
20736
|
+
var threadTreeSnapshotSchema = external_exports.strictObject({
|
|
20737
|
+
revision: external_exports.int().nonnegative(),
|
|
20738
|
+
parents: external_exports.record(hostThreadIdSchema, hostThreadIdSchema),
|
|
20739
|
+
handoffs: external_exports.record(hostThreadIdSchema, threadTreeHandoffSchema).optional(),
|
|
20740
|
+
nodes: external_exports.record(hostThreadIdSchema, threadTreeNodeSchema),
|
|
20741
|
+
truncated: external_exports.boolean()
|
|
20742
|
+
}).refine((snapshot) => Object.keys(snapshot.nodes).length <= THREAD_TREE_MAX_NODES, "Too many Thread tree nodes").refine(({ parents, handoffs, nodes }) => Object.entries(parents).every(([child, parent]) => Object.hasOwn(nodes, child) && Object.hasOwn(nodes, parent)) && Object.entries(handoffs ?? {}).every(([target2, { sourceThreadId }]) => Object.hasOwn(nodes, target2) && Object.hasOwn(nodes, sourceThreadId)), "Missing Thread tree node");
|
|
20743
|
+
var subscriptionId = external_exports.string().min(1).max(128);
|
|
20744
|
+
var threadTreeWatchParamsSchema = external_exports.strictObject({});
|
|
20745
|
+
var threadTreeUnwatchParamsSchema = external_exports.strictObject({ subscriptionId });
|
|
20746
|
+
var threadTreeUnwatchResultSchema = external_exports.strictObject({});
|
|
20747
|
+
var threadTreeWatchResultSchema = threadTreeUnwatchParamsSchema.extend({
|
|
20748
|
+
snapshot: threadTreeSnapshotSchema
|
|
20749
|
+
});
|
|
20750
|
+
|
|
20722
20751
|
// ../../shared-contracts/dist/host-extension-management.js
|
|
20723
20752
|
var HOST_EXTENSION_ZIP_MAX_BYTES = DESKTOP_EXTENSION_ZIP_MAX_BYTES;
|
|
20724
20753
|
var hostExtensionRevisionSchema = external_exports.int().nonnegative();
|
|
@@ -20726,6 +20755,16 @@ var hostExtensionConfigurationSchema = external_exports.strictObject({
|
|
|
20726
20755
|
revision: hostExtensionRevisionSchema,
|
|
20727
20756
|
enabled: external_exports.array(hostExtensionIdSchema).max(DESKTOP_EXTENSION_LIMIT).refine((ids) => new Set(ids).size === ids.length, "Duplicate extension IDs")
|
|
20728
20757
|
});
|
|
20758
|
+
var hostExtensionDefaultSeedsSchema = external_exports.strictObject({
|
|
20759
|
+
version: external_exports.literal(1),
|
|
20760
|
+
seeded: external_exports.array(hostExtensionIdSchema).max(DESKTOP_EXTENSION_LIMIT).refine((ids) => new Set(ids).size === ids.length, "Duplicate extension IDs")
|
|
20761
|
+
});
|
|
20762
|
+
var hostExtensionChangelogEntrySchema = external_exports.object({
|
|
20763
|
+
version: external_exports.string().trim().min(1).max(128),
|
|
20764
|
+
publishedAt: external_exports.string().trim().min(1).max(64).optional(),
|
|
20765
|
+
notes: external_exports.string().trim().min(1).max(8192),
|
|
20766
|
+
url: desktopExtensionHttpUrlSchema.optional()
|
|
20767
|
+
});
|
|
20729
20768
|
var { downloadUrl, ...catalogMetadata } = desktopExtensionCatalogEntrySchema.shape;
|
|
20730
20769
|
var hostExtensionCatalogEntrySchema = external_exports.object({
|
|
20731
20770
|
...catalogMetadata,
|
|
@@ -20739,7 +20778,10 @@ var hostExtensionCatalogEntrySchema = external_exports.object({
|
|
|
20739
20778
|
web: external_exports.int().positive().optional(),
|
|
20740
20779
|
backend: external_exports.int().positive().optional()
|
|
20741
20780
|
}),
|
|
20742
|
-
downloadUrl: downloadUrl.refine((url2) => url2.startsWith("https://"), "Expected HTTPS")
|
|
20781
|
+
downloadUrl: downloadUrl.refine((url2) => url2.startsWith("https://"), "Expected HTTPS"),
|
|
20782
|
+
featured: external_exports.boolean().optional(),
|
|
20783
|
+
featuredOrder: external_exports.int().nonnegative().optional(),
|
|
20784
|
+
changelog: external_exports.array(hostExtensionChangelogEntrySchema).max(20).optional()
|
|
20743
20785
|
}).refine(({ targets, apis }) => {
|
|
20744
20786
|
const derived2 = targetsForCapabilities({
|
|
20745
20787
|
hasPage: Boolean(apis.page),
|
|
@@ -20758,7 +20800,8 @@ var hostExtensionCatalogSchema = external_exports.object({
|
|
|
20758
20800
|
var hostExtensionsCatalogResultSchema = hostExtensionCatalogSchema.extend({
|
|
20759
20801
|
catalogUrl: desktopExtensionHttpUrlSchema,
|
|
20760
20802
|
fetchedAt: external_exports.iso.datetime(),
|
|
20761
|
-
cached: external_exports.boolean()
|
|
20803
|
+
cached: external_exports.boolean(),
|
|
20804
|
+
stale: external_exports.boolean().optional()
|
|
20762
20805
|
});
|
|
20763
20806
|
var id = { id: hostExtensionIdSchema };
|
|
20764
20807
|
var active = {
|
|
@@ -20842,6 +20885,7 @@ var HOST_EXTENSIONS_RPC = {
|
|
|
20842
20885
|
list: "codexhost/extensions/list",
|
|
20843
20886
|
snapshot: "codexhost/extensions/snapshot",
|
|
20844
20887
|
catalog: "codexhost/extensions/catalog",
|
|
20888
|
+
catalogIcon: "codexhost/extensions/catalogIcon",
|
|
20845
20889
|
install: "codexhost/extensions/install",
|
|
20846
20890
|
update: "codexhost/extensions/update",
|
|
20847
20891
|
enable: "codexhost/extensions/enable",
|
|
@@ -20851,7 +20895,8 @@ var HOST_EXTENSIONS_RPC = {
|
|
|
20851
20895
|
asset: "codexhost/extensions/asset",
|
|
20852
20896
|
settingsGet: "codexhost/extensions/settings/get",
|
|
20853
20897
|
settingsSet: "codexhost/extensions/settings/set",
|
|
20854
|
-
backendInvoke: "codexhost/extensions/backend/invoke"
|
|
20898
|
+
backendInvoke: "codexhost/extensions/backend/invoke",
|
|
20899
|
+
threadTree: "codexhost/extensions/threadTree"
|
|
20855
20900
|
};
|
|
20856
20901
|
var HOST_EXTENSION_MANAGEMENT_METHODS = Object.freeze(Object.values(HOST_EXTENSIONS_RPC));
|
|
20857
20902
|
var methods = new Set(HOST_EXTENSION_MANAGEMENT_METHODS);
|
|
@@ -20873,6 +20918,10 @@ var hostExtensionsAssetResultSchema = external_exports.strictObject({
|
|
|
20873
20918
|
base64: base643(DESKTOP_EXTENSION_ASSET_MAX_BYTES),
|
|
20874
20919
|
digest: active.digest
|
|
20875
20920
|
});
|
|
20921
|
+
var hostExtensionsCatalogIconResultSchema = external_exports.strictObject({
|
|
20922
|
+
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
20923
|
+
base64: base643(DESKTOP_EXTENSION_ICON_MAX_BYTES)
|
|
20924
|
+
});
|
|
20876
20925
|
var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
20877
20926
|
settingsRevision: hostExtensionRevisionSchema,
|
|
20878
20927
|
values: jsonObjectSchema
|
|
@@ -20881,9 +20930,16 @@ var hostExtensionsRpcSchemas = {
|
|
|
20881
20930
|
[HOST_EXTENSIONS_RPC.list]: { params: noParams, result: hostExtensionsListResultSchema },
|
|
20882
20931
|
[HOST_EXTENSIONS_RPC.snapshot]: { params: noParams, result: hostExtensionsSnapshotResultSchema },
|
|
20883
20932
|
[HOST_EXTENSIONS_RPC.catalog]: {
|
|
20884
|
-
params: external_exports.strictObject({
|
|
20933
|
+
params: external_exports.strictObject({
|
|
20934
|
+
forceRefresh: external_exports.boolean().optional(),
|
|
20935
|
+
staleWhileRevalidate: external_exports.boolean().optional()
|
|
20936
|
+
}),
|
|
20885
20937
|
result: hostExtensionsCatalogResultSchema
|
|
20886
20938
|
},
|
|
20939
|
+
[HOST_EXTENSIONS_RPC.catalogIcon]: {
|
|
20940
|
+
params: external_exports.strictObject({ ...id }),
|
|
20941
|
+
result: hostExtensionsCatalogIconResultSchema
|
|
20942
|
+
},
|
|
20887
20943
|
[HOST_EXTENSIONS_RPC.install]: {
|
|
20888
20944
|
params: external_exports.strictObject({ source: hostExtensionInstallSourceSchema }),
|
|
20889
20945
|
result: installationResult
|
|
@@ -20934,6 +20990,10 @@ var hostExtensionsRpcSchemas = {
|
|
|
20934
20990
|
params: jsonValueSchema.optional()
|
|
20935
20991
|
}),
|
|
20936
20992
|
result: external_exports.strictObject({ result: jsonValueSchema })
|
|
20993
|
+
},
|
|
20994
|
+
[HOST_EXTENSIONS_RPC.threadTree]: {
|
|
20995
|
+
params: noParams,
|
|
20996
|
+
result: threadTreeSnapshotSchema
|
|
20937
20997
|
}
|
|
20938
20998
|
};
|
|
20939
20999
|
|
|
@@ -20942,6 +21002,104 @@ var THREAD_ARCHIVE_CONFIRM_METHOD = "codexhost/thread/archive/confirm";
|
|
|
20942
21002
|
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
20943
21003
|
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
20944
21004
|
|
|
21005
|
+
// ../../shared-contracts/dist/telemetry.js
|
|
21006
|
+
var PRODUCT_TELEMETRY_GET_METHOD = "codexhost/telemetry/get";
|
|
21007
|
+
var PRODUCT_TELEMETRY_SET_METHOD = "codexhost/telemetry/set";
|
|
21008
|
+
var PRODUCT_TELEMETRY_SIGNAL_METHOD = "codexhost/telemetry/signal";
|
|
21009
|
+
var TELEMETRY_SURFACES = [
|
|
21010
|
+
"codex-desktop",
|
|
21011
|
+
"web",
|
|
21012
|
+
"web-desktop-shell",
|
|
21013
|
+
"web-mobile",
|
|
21014
|
+
"ssh-remote",
|
|
21015
|
+
"cli"
|
|
21016
|
+
];
|
|
21017
|
+
var TELEMETRY_OS_LIST = ["darwin", "win32", "linux"];
|
|
21018
|
+
var TELEMETRY_ARCH_LIST = ["arm64", "x64", "ia32", "arm"];
|
|
21019
|
+
var TELEMETRY_UI_LANGUAGES = [
|
|
21020
|
+
"zh",
|
|
21021
|
+
"en",
|
|
21022
|
+
"ja",
|
|
21023
|
+
"ko",
|
|
21024
|
+
"de",
|
|
21025
|
+
"fr",
|
|
21026
|
+
"es",
|
|
21027
|
+
"pt",
|
|
21028
|
+
"ru",
|
|
21029
|
+
"other"
|
|
21030
|
+
];
|
|
21031
|
+
var TELEMETRY_OFFICIAL_HARNESSES = [
|
|
21032
|
+
"codex",
|
|
21033
|
+
"claude-code",
|
|
21034
|
+
"antigravity",
|
|
21035
|
+
"pi",
|
|
21036
|
+
"opencode",
|
|
21037
|
+
"cursor-cli",
|
|
21038
|
+
"deepseek-harness",
|
|
21039
|
+
"grok",
|
|
21040
|
+
"omp",
|
|
21041
|
+
"qwen-code",
|
|
21042
|
+
"kiro-cli",
|
|
21043
|
+
"codebuddy",
|
|
21044
|
+
"workbuddy",
|
|
21045
|
+
"devin",
|
|
21046
|
+
"hermes",
|
|
21047
|
+
"qoder",
|
|
21048
|
+
"qoder-cn",
|
|
21049
|
+
"kimi-code",
|
|
21050
|
+
"zcode",
|
|
21051
|
+
"copilot",
|
|
21052
|
+
"custom"
|
|
21053
|
+
];
|
|
21054
|
+
var TELEMETRY_REMOTE_ACCESS_CHANNELS = [
|
|
21055
|
+
"official-relay",
|
|
21056
|
+
"self-hosted-relay",
|
|
21057
|
+
"tailscale-serve",
|
|
21058
|
+
"tailscale-funnel",
|
|
21059
|
+
"tailscale-ip",
|
|
21060
|
+
"lan",
|
|
21061
|
+
"custom-proxy",
|
|
21062
|
+
"remote-peer"
|
|
21063
|
+
];
|
|
21064
|
+
var telemetryVersionSchema = external_exports.string().min(1).max(40).regex(/^[0-9A-Za-z._+-]+$/u);
|
|
21065
|
+
var telemetrySurfaceSchema = external_exports.enum(TELEMETRY_SURFACES);
|
|
21066
|
+
var telemetryUiLanguageSchema = external_exports.enum(TELEMETRY_UI_LANGUAGES);
|
|
21067
|
+
var telemetryHarnessSchema = external_exports.enum(TELEMETRY_OFFICIAL_HARNESSES);
|
|
21068
|
+
var telemetryRemoteAccessChannelSchema = external_exports.enum(TELEMETRY_REMOTE_ACCESS_CHANNELS);
|
|
21069
|
+
var officialHarnessSet = new Set(TELEMETRY_OFFICIAL_HARNESSES);
|
|
21070
|
+
var uiLanguageSet = new Set(TELEMETRY_UI_LANGUAGES);
|
|
21071
|
+
var productTelemetrySettingsSchema = external_exports.object({
|
|
21072
|
+
enabled: external_exports.boolean(),
|
|
21073
|
+
forcedOffByEnv: external_exports.boolean()
|
|
21074
|
+
}).strict();
|
|
21075
|
+
var productTelemetrySetParamsSchema = external_exports.object({
|
|
21076
|
+
enabled: external_exports.boolean()
|
|
21077
|
+
}).strict();
|
|
21078
|
+
var productTelemetrySignalParamsSchema = external_exports.object({
|
|
21079
|
+
surfaces: external_exports.array(telemetrySurfaceSchema).max(12).optional(),
|
|
21080
|
+
harnesses: external_exports.array(telemetryHarnessSchema).max(32).optional(),
|
|
21081
|
+
remoteAccess: external_exports.array(telemetryRemoteAccessChannelSchema).max(12).optional()
|
|
21082
|
+
}).strict();
|
|
21083
|
+
var productTelemetryHeartbeatSchema = external_exports.object({
|
|
21084
|
+
dailyActive: external_exports.literal(true).optional(),
|
|
21085
|
+
weeklyActive: external_exports.literal(true).optional(),
|
|
21086
|
+
monthlyActive: external_exports.literal(true).optional(),
|
|
21087
|
+
newInstall: external_exports.literal(true).optional(),
|
|
21088
|
+
retainedD1: external_exports.literal(true).optional(),
|
|
21089
|
+
retainedD7: external_exports.literal(true).optional(),
|
|
21090
|
+
remoteAny: external_exports.literal(true).optional(),
|
|
21091
|
+
appVersion: telemetryVersionSchema.optional(),
|
|
21092
|
+
codexDesktopVersion: telemetryVersionSchema.optional(),
|
|
21093
|
+
os: external_exports.enum(TELEMETRY_OS_LIST).optional(),
|
|
21094
|
+
arch: external_exports.enum(TELEMETRY_ARCH_LIST).optional(),
|
|
21095
|
+
uiLanguage: telemetryUiLanguageSchema.optional(),
|
|
21096
|
+
surfaces: external_exports.array(telemetrySurfaceSchema).min(1).max(12).optional(),
|
|
21097
|
+
harnesses: external_exports.array(telemetryHarnessSchema).min(1).max(32).optional(),
|
|
21098
|
+
remoteAccess: external_exports.array(telemetryRemoteAccessChannelSchema).min(1).max(12).optional()
|
|
21099
|
+
}).strict().refine((value) => Object.keys(value).length > 0, {
|
|
21100
|
+
message: "Telemetry heartbeat must contain at least one countable field"
|
|
21101
|
+
});
|
|
21102
|
+
|
|
20945
21103
|
// ../../shared-contracts/dist/client-channel.js
|
|
20946
21104
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
20947
21105
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -20969,6 +21127,7 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
20969
21127
|
"thread/archive",
|
|
20970
21128
|
THREAD_ARCHIVE_CONFIRM_METHOD,
|
|
20971
21129
|
"thread/unarchive",
|
|
21130
|
+
"thread/delete",
|
|
20972
21131
|
"turn/start",
|
|
20973
21132
|
"turn/interrupt",
|
|
20974
21133
|
"turn/steer",
|
|
@@ -21027,8 +21186,14 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
21027
21186
|
"codexhost/update/check",
|
|
21028
21187
|
"codexhost/update/start",
|
|
21029
21188
|
"codexhost/update/status",
|
|
21189
|
+
"codexhost/update/macos-signing/status",
|
|
21190
|
+
"codexhost/update/macos-signing/setup",
|
|
21191
|
+
"codexhost/update/macos-signing/remove",
|
|
21030
21192
|
"codexhost/announcement/get",
|
|
21031
21193
|
"codexhost/announcement/acknowledge",
|
|
21194
|
+
PRODUCT_TELEMETRY_GET_METHOD,
|
|
21195
|
+
PRODUCT_TELEMETRY_SET_METHOD,
|
|
21196
|
+
PRODUCT_TELEMETRY_SIGNAL_METHOD,
|
|
21032
21197
|
"codexhost/sessions/loaded/list"
|
|
21033
21198
|
];
|
|
21034
21199
|
var clientThreadSectionsSchema = external_exports.object({
|
|
@@ -21065,7 +21230,10 @@ var clientWorkspaceSnapshotSchema = external_exports.object({
|
|
|
21065
21230
|
pinned: external_exports.array(external_exports.string()),
|
|
21066
21231
|
/** Projects Desktop placed in each custom section, keyed by the official section ID, in
|
|
21067
21232
|
* Desktop's section order. Omitted when no section holds a project. */
|
|
21068
|
-
sectionProjects: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())).optional()
|
|
21233
|
+
sectionProjects: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())).optional(),
|
|
21234
|
+
/** Projects pinned in Codex Desktop (`pinned-project-ids`), in Desktop order.
|
|
21235
|
+
* Omitted when Desktop global state has no `pinned-project-ids` array. */
|
|
21236
|
+
pinnedProjects: external_exports.array(external_exports.string()).optional()
|
|
21069
21237
|
});
|
|
21070
21238
|
var record2 = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
21071
21239
|
var clientChannelCursorSchema = external_exports.object({
|
|
@@ -21213,6 +21381,8 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
21213
21381
|
modelProvider: external_exports.string().min(1),
|
|
21214
21382
|
createdAt: external_exports.number(),
|
|
21215
21383
|
updatedAt: external_exports.number(),
|
|
21384
|
+
/** Last conversation activity in Unix seconds, distinct from metadata writes. */
|
|
21385
|
+
recencyAt: external_exports.number().nullable().optional(),
|
|
21216
21386
|
status: external_exports.object({ type: external_exports.string() }).passthrough(),
|
|
21217
21387
|
name: external_exports.string().nullable().optional(),
|
|
21218
21388
|
preview: external_exports.string().optional(),
|
|
@@ -21291,27 +21461,33 @@ var threadCatalogReadResultSchema = external_exports.object({
|
|
|
21291
21461
|
officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
|
|
21292
21462
|
}).strict();
|
|
21293
21463
|
|
|
21294
|
-
// ../../shared-contracts/dist/
|
|
21295
|
-
var
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21464
|
+
// ../../shared-contracts/dist/extension-services.js
|
|
21465
|
+
var extensionHarnessPresentationSchema = harnessPluginDescriptorSchema.pick({
|
|
21466
|
+
id: true,
|
|
21467
|
+
name: true,
|
|
21468
|
+
icon: true,
|
|
21469
|
+
iconStyle: true
|
|
21470
|
+
});
|
|
21471
|
+
var extensionActivitySessionSchema = external_exports.strictObject({
|
|
21472
|
+
threadId: external_exports.string().max(1024),
|
|
21473
|
+
title: external_exports.string().max(240),
|
|
21474
|
+
project: external_exports.string().max(240),
|
|
21475
|
+
harness: external_exports.strictObject({ id: external_exports.string().min(1).max(128), name: external_exports.string().min(1).max(128) }).optional(),
|
|
21476
|
+
state: external_exports.enum(["idle", "running", "waiting", "completed", "failed"]),
|
|
21477
|
+
updatedAt: external_exports.number().nonnegative()
|
|
21478
|
+
});
|
|
21479
|
+
var extensionActivitySchema = external_exports.strictObject({
|
|
21480
|
+
epoch: external_exports.string().max(128),
|
|
21304
21481
|
revision: external_exports.int().nonnegative(),
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
snapshot: threadTreeSnapshotSchema
|
|
21482
|
+
running: external_exports.int().nonnegative(),
|
|
21483
|
+
waiting: external_exports.int().nonnegative(),
|
|
21484
|
+
sessions: external_exports.array(extensionActivitySessionSchema).max(32).default([]),
|
|
21485
|
+
notifications: external_exports.array(external_exports.strictObject({
|
|
21486
|
+
threadId: external_exports.string().max(1024),
|
|
21487
|
+
key: external_exports.string().max(4096),
|
|
21488
|
+
kind: external_exports.enum(["completed", "failed", "approval", "question"]),
|
|
21489
|
+
revision: external_exports.int().nonnegative()
|
|
21490
|
+
})).max(256)
|
|
21315
21491
|
});
|
|
21316
21492
|
|
|
21317
21493
|
// ../../shared-contracts/dist/voice.js
|
|
@@ -21518,6 +21694,7 @@ var remotePeerSummarySchema = external_exports.object({
|
|
|
21518
21694
|
updatedAt: external_exports.string()
|
|
21519
21695
|
});
|
|
21520
21696
|
var remotePeerListResultSchema = external_exports.object({
|
|
21697
|
+
localPlatform: external_exports.string().max(64).optional(),
|
|
21521
21698
|
peers: external_exports.array(remotePeerSummarySchema)
|
|
21522
21699
|
});
|
|
21523
21700
|
var remotePeerAddParamsSchema = external_exports.object({
|
|
@@ -22271,7 +22448,10 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
22271
22448
|
"codexhost/usage/statistics/get",
|
|
22272
22449
|
"codexhost/update/check",
|
|
22273
22450
|
"codexhost/update/start",
|
|
22274
|
-
"codexhost/update/status"
|
|
22451
|
+
"codexhost/update/status",
|
|
22452
|
+
"codexhost/update/macos-signing/status",
|
|
22453
|
+
"codexhost/update/macos-signing/setup",
|
|
22454
|
+
"codexhost/update/macos-signing/remove"
|
|
22275
22455
|
]);
|
|
22276
22456
|
|
|
22277
22457
|
// ../../shared-contracts/dist/version.js
|
|
@@ -22709,7 +22889,15 @@ var updateStatusSchema = external_exports.strictObject({
|
|
|
22709
22889
|
});
|
|
22710
22890
|
var updateEmptyParamsSchema = external_exports.strictObject({});
|
|
22711
22891
|
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");
|
|
22712
|
-
var
|
|
22892
|
+
var updateBackgroundPhaseSchema = external_exports.enum(["idle", "downloading", "ready", "failed"]);
|
|
22893
|
+
var updateBackgroundDownloadSchema = external_exports.strictObject({
|
|
22894
|
+
downloadedBytes: external_exports.number().int().nonnegative(),
|
|
22895
|
+
totalBytes: external_exports.number().int().positive()
|
|
22896
|
+
}).refine((progress) => progress.downloadedBytes <= progress.totalBytes, {
|
|
22897
|
+
path: ["downloadedBytes"],
|
|
22898
|
+
message: "downloadedBytes must not exceed totalBytes"
|
|
22899
|
+
});
|
|
22900
|
+
var updateCheckResultSchema = external_exports.object({
|
|
22713
22901
|
currentVersion: updateSemanticVersionSchema,
|
|
22714
22902
|
installation: updateInstallationSchema.nullable(),
|
|
22715
22903
|
latestVersion: updateSemanticVersionSchema.nullable(),
|
|
@@ -22718,7 +22906,12 @@ var updateCheckResultSchema = external_exports.strictObject({
|
|
|
22718
22906
|
releaseNotes: external_exports.string().min(1).max(2e4).nullable(),
|
|
22719
22907
|
releaseNotesUrl: githubReleaseNotesUrlSchema.nullable(),
|
|
22720
22908
|
status: updateStatusSchema.nullable(),
|
|
22721
|
-
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable()
|
|
22909
|
+
error: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable(),
|
|
22910
|
+
stagedVersion: updateSemanticVersionSchema.nullable().optional(),
|
|
22911
|
+
backgroundPhase: updateBackgroundPhaseSchema.optional(),
|
|
22912
|
+
backgroundDownload: updateBackgroundDownloadSchema.nullable().optional(),
|
|
22913
|
+
backgroundError: external_exports.string().min(1).max(UPDATE_ERROR_MAX_LENGTH).nullable().optional(),
|
|
22914
|
+
runningTaskCount: external_exports.number().int().nonnegative().optional()
|
|
22722
22915
|
});
|
|
22723
22916
|
var updateStartResultSchema = external_exports.strictObject({
|
|
22724
22917
|
status: updateStatusSchema
|
|
@@ -22726,6 +22919,15 @@ var updateStartResultSchema = external_exports.strictObject({
|
|
|
22726
22919
|
var updateStatusResultSchema = external_exports.strictObject({
|
|
22727
22920
|
status: updateStatusSchema.nullable()
|
|
22728
22921
|
});
|
|
22922
|
+
var macosLocalSigningStatusSchema = external_exports.strictObject({
|
|
22923
|
+
supported: external_exports.boolean(),
|
|
22924
|
+
enabled: external_exports.boolean(),
|
|
22925
|
+
certificatePresent: external_exports.boolean(),
|
|
22926
|
+
appSignedWithLocalCert: external_exports.boolean(),
|
|
22927
|
+
appPath: external_exports.string().min(1).nullable(),
|
|
22928
|
+
certificateName: external_exports.string().min(1),
|
|
22929
|
+
certificateSha1: external_exports.string().regex(/^[0-9A-Fa-f]{40}$/u).nullable()
|
|
22930
|
+
});
|
|
22729
22931
|
|
|
22730
22932
|
// ../../shared-contracts/dist/release-announcement.js
|
|
22731
22933
|
var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
|
|
@@ -28671,6 +28873,8 @@ async function listDevinSessions(connection) {
|
|
|
28671
28873
|
// dist/transport.js
|
|
28672
28874
|
var DEVIN_API_KEY_AUTH_METHOD = "devin-browser";
|
|
28673
28875
|
var REPLAY_LIMIT = 1e5;
|
|
28876
|
+
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
28877
|
+
var OPTIONAL_LIST_STEPS_TIMEOUT_MS = 2e3;
|
|
28674
28878
|
var DevinTransport = class {
|
|
28675
28879
|
options;
|
|
28676
28880
|
sessionId = "";
|
|
@@ -28682,6 +28886,7 @@ var DevinTransport = class {
|
|
|
28682
28886
|
#callbacks;
|
|
28683
28887
|
#collecting = false;
|
|
28684
28888
|
#replayOverflow = false;
|
|
28889
|
+
#optionalListStepsPending = false;
|
|
28685
28890
|
#closed = false;
|
|
28686
28891
|
#closePromise;
|
|
28687
28892
|
#fault;
|
|
@@ -28696,7 +28901,7 @@ var DevinTransport = class {
|
|
|
28696
28901
|
get isClosedOrFaulted() {
|
|
28697
28902
|
return this.#closed || this.#fault !== void 0 || this.#connection?.signal.aborted === true;
|
|
28698
28903
|
}
|
|
28699
|
-
async #bounded(work, timeout = this.options.timeoutMs ??
|
|
28904
|
+
async #bounded(work, timeout = this.options.timeoutMs ?? DEFAULT_TIMEOUT_MS, closeOnTimeout = true) {
|
|
28700
28905
|
if (this.#fault)
|
|
28701
28906
|
throw this.#fault;
|
|
28702
28907
|
let timer;
|
|
@@ -28707,7 +28912,8 @@ var DevinTransport = class {
|
|
|
28707
28912
|
new Promise((_, reject) => {
|
|
28708
28913
|
timer = setTimeout(() => {
|
|
28709
28914
|
reject(new Error("Devin ACP request timed out"));
|
|
28710
|
-
|
|
28915
|
+
if (closeOnTimeout)
|
|
28916
|
+
void this.close();
|
|
28711
28917
|
}, timeout);
|
|
28712
28918
|
})
|
|
28713
28919
|
]);
|
|
@@ -28845,6 +29051,28 @@ var DevinTransport = class {
|
|
|
28845
29051
|
sessionId: this.sessionId
|
|
28846
29052
|
}));
|
|
28847
29053
|
}
|
|
29054
|
+
/**
|
|
29055
|
+
* Optional `listSteps` read with a short timeout budget and at most one unsettled request per
|
|
29056
|
+
* connection. Timeouts leave a healthy connection open; subsequent calls return `undefined`
|
|
29057
|
+
* until the unsettled request settles or the connection closes.
|
|
29058
|
+
*/
|
|
29059
|
+
async optionalListSteps() {
|
|
29060
|
+
if (!this.nativeHistory || !this.#connection || this.#closed || !this.sessionId)
|
|
29061
|
+
throw new Error("Devin native history extension is unavailable");
|
|
29062
|
+
if (this.#fault)
|
|
29063
|
+
throw this.#fault;
|
|
29064
|
+
if (this.#optionalListStepsPending)
|
|
29065
|
+
return void 0;
|
|
29066
|
+
const work = this.#connection.request("_cognition.ai/revert/listSteps", {
|
|
29067
|
+
sessionId: this.sessionId
|
|
29068
|
+
});
|
|
29069
|
+
this.#optionalListStepsPending = true;
|
|
29070
|
+
const clear = () => {
|
|
29071
|
+
this.#optionalListStepsPending = false;
|
|
29072
|
+
};
|
|
29073
|
+
void work.then(clear, clear);
|
|
29074
|
+
return this.#bounded(work, Math.min(this.options.timeoutMs ?? DEFAULT_TIMEOUT_MS, OPTIONAL_LIST_STEPS_TIMEOUT_MS), false);
|
|
29075
|
+
}
|
|
28848
29076
|
async listSessions(params = {}) {
|
|
28849
29077
|
if (!this.#connection || this.#closed)
|
|
28850
29078
|
throw new Error("Devin connection is not open");
|
|
@@ -29734,6 +29962,12 @@ function devinCheckpoint(sessionId, userMessageId, steps) {
|
|
|
29734
29962
|
formatVersion: 1
|
|
29735
29963
|
}) : void 0;
|
|
29736
29964
|
}
|
|
29965
|
+
function devinAddedPromptKey(before, after) {
|
|
29966
|
+
const prompts = after.filter((step) => step.kind === "prompt");
|
|
29967
|
+
const added = prompts.filter((step) => !before.some(({ stepId }) => stepId === step.stepId));
|
|
29968
|
+
const key = added.length === 1 ? added[0]?.userMessageId : void 0;
|
|
29969
|
+
return key?.trim() && !before.some((step) => step.userMessageId === key) && prompts.filter((step) => step.userMessageId === key).length === 1 ? key : void 0;
|
|
29970
|
+
}
|
|
29737
29971
|
async function readHistory(transport) {
|
|
29738
29972
|
const replay = await transport.reload();
|
|
29739
29973
|
const snapshot = devinSnapshot(transport.sessionId, replay);
|
|
@@ -29853,6 +30087,7 @@ function devinError(error62) {
|
|
|
29853
30087
|
function rejected(code, message) {
|
|
29854
30088
|
return { ok: false, error: { code, message, retryable: false } };
|
|
29855
30089
|
}
|
|
30090
|
+
var openingSessions = /* @__PURE__ */ new WeakSet();
|
|
29856
30091
|
var DevinAdapter = class {
|
|
29857
30092
|
options;
|
|
29858
30093
|
normalizeStoredModelRef = normalizeStoredDevinModelRef;
|
|
@@ -29973,6 +30208,7 @@ var DevinAdapter = class {
|
|
|
29973
30208
|
const openedSession = new DevinSession(transport, info, () => {
|
|
29974
30209
|
this.#sessions.delete(openedSession);
|
|
29975
30210
|
}, input3.kind === "create");
|
|
30211
|
+
openingSessions.add(openedSession);
|
|
29976
30212
|
session = openedSession;
|
|
29977
30213
|
if ("model" in input3 && input3.model) {
|
|
29978
30214
|
const selected = await session.execute({ type: "model.select", model: input3.model });
|
|
@@ -30003,6 +30239,7 @@ var DevinAdapter = class {
|
|
|
30003
30239
|
}
|
|
30004
30240
|
if (this.#closed)
|
|
30005
30241
|
throw new DevinHistoryError("invalidState", "Devin adapter closed during session startup");
|
|
30242
|
+
openingSessions.delete(openedSession);
|
|
30006
30243
|
this.#sessions.add(session);
|
|
30007
30244
|
return { ok: true, value: session };
|
|
30008
30245
|
} catch (error62) {
|
|
@@ -30178,7 +30415,7 @@ var DevinSession = class {
|
|
|
30178
30415
|
delete this.initialState.effectiveModel;
|
|
30179
30416
|
delete this.initialState.effectiveThinkingOptionId;
|
|
30180
30417
|
Object.assign(this.initialState, state);
|
|
30181
|
-
if (isDeepStrictEqual2(this.initialState, previous))
|
|
30418
|
+
if (isDeepStrictEqual2(this.initialState, previous) || openingSessions.has(this))
|
|
30182
30419
|
return;
|
|
30183
30420
|
this.#channel.emit({
|
|
30184
30421
|
kind: "event",
|
|
@@ -30235,16 +30472,23 @@ var DevinSession = class {
|
|
|
30235
30472
|
const active2 = this.#active;
|
|
30236
30473
|
active2.cancelled = true;
|
|
30237
30474
|
this.#interactions.cancel();
|
|
30475
|
+
if (active2.phase !== "prompting") {
|
|
30476
|
+
if (active2.phase === "beforePrompt")
|
|
30477
|
+
active2.settleBeforePrompt();
|
|
30478
|
+
return { ok: true, value: { cancellationRequested: true } };
|
|
30479
|
+
}
|
|
30238
30480
|
try {
|
|
30239
30481
|
await this.transport.cancel();
|
|
30240
30482
|
} catch {
|
|
30241
30483
|
await this.transport.close();
|
|
30242
30484
|
}
|
|
30243
|
-
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
|
|
30247
|
-
|
|
30485
|
+
if (active2.phase === "prompting") {
|
|
30486
|
+
const timer = setTimeout(() => {
|
|
30487
|
+
if (this.#active === active2 && active2.phase === "prompting")
|
|
30488
|
+
void this.transport.close();
|
|
30489
|
+
}, 5e3);
|
|
30490
|
+
void active2.task.finally(() => clearTimeout(timer));
|
|
30491
|
+
}
|
|
30248
30492
|
return { ok: true, value: { cancellationRequested: true } };
|
|
30249
30493
|
}
|
|
30250
30494
|
if (this.#configuring || this.#active && command.type !== "model.select" && command.type !== "thinking.select")
|
|
@@ -30255,7 +30499,19 @@ var DevinSession = class {
|
|
|
30255
30499
|
if (!command.input.length || command.input.some((part) => part.type !== "text") || !command.input.some((part) => part.text.trim()))
|
|
30256
30500
|
return rejected("invalidRequest", "Devin requires nonempty text input");
|
|
30257
30501
|
this.#submitted.add(command.turnId);
|
|
30258
|
-
|
|
30502
|
+
let settleBeforePrompt = () => {
|
|
30503
|
+
};
|
|
30504
|
+
const beforePromptCancelled = new Promise((resolve) => {
|
|
30505
|
+
settleBeforePrompt = () => resolve(void 0);
|
|
30506
|
+
});
|
|
30507
|
+
const active2 = {
|
|
30508
|
+
command,
|
|
30509
|
+
cancelled: false,
|
|
30510
|
+
phase: "beforePrompt",
|
|
30511
|
+
beforePromptCancelled,
|
|
30512
|
+
settleBeforePrompt,
|
|
30513
|
+
task: Promise.resolve()
|
|
30514
|
+
};
|
|
30259
30515
|
this.#active = active2;
|
|
30260
30516
|
active2.task = this.#run(command);
|
|
30261
30517
|
return { ok: true, value: { turnId: command.turnId } };
|
|
@@ -30305,25 +30561,40 @@ var DevinSession = class {
|
|
|
30305
30561
|
};
|
|
30306
30562
|
let nativeTurnRef;
|
|
30307
30563
|
try {
|
|
30308
|
-
const
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
30312
|
-
|
|
30313
|
-
|
|
30314
|
-
|
|
30315
|
-
|
|
30316
|
-
|
|
30317
|
-
|
|
30318
|
-
|
|
30564
|
+
const active2 = this.#active;
|
|
30565
|
+
const before = this.transport.nativeHistory && active2 ? await Promise.race([this.#stepsBeforePrompt(), active2.beforePromptCancelled]) : void 0;
|
|
30566
|
+
const prompted = !active2?.cancelled;
|
|
30567
|
+
let result;
|
|
30568
|
+
if (!prompted) {
|
|
30569
|
+
result = { stopReason: "cancelled" };
|
|
30570
|
+
} else {
|
|
30571
|
+
if (active2)
|
|
30572
|
+
active2.phase = "prompting";
|
|
30573
|
+
try {
|
|
30574
|
+
result = await this.transport.prompt(command.input.map((part) => part.text).join("\n"), {
|
|
30575
|
+
update: (event) => {
|
|
30576
|
+
if (event.update.sessionUpdate === "current_mode_update") {
|
|
30577
|
+
this.initialState.effectivePermissionModeId = harnessPermissionModeIdSchema.parse(event.update.currentModeId);
|
|
30578
|
+
if (this.info.modes)
|
|
30579
|
+
this.info.modes.currentModeId = this.initialState.effectivePermissionModeId;
|
|
30580
|
+
this.#channel.emit({
|
|
30581
|
+
kind: "event",
|
|
30582
|
+
event: {
|
|
30583
|
+
type: "session.state.changed",
|
|
30584
|
+
state: { ...this.initialState }
|
|
30585
|
+
}
|
|
30586
|
+
});
|
|
30319
30587
|
}
|
|
30320
|
-
|
|
30321
|
-
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
|
|
30325
|
-
|
|
30326
|
-
|
|
30588
|
+
output2.update(event);
|
|
30589
|
+
},
|
|
30590
|
+
permission: (request) => this.#interactions.permission(command.turnId, request),
|
|
30591
|
+
extension: () => this.#interactions.extension()
|
|
30592
|
+
});
|
|
30593
|
+
} finally {
|
|
30594
|
+
if (active2)
|
|
30595
|
+
active2.phase = "afterPrompt";
|
|
30596
|
+
}
|
|
30597
|
+
}
|
|
30327
30598
|
outcome = this.#active?.cancelled || result.stopReason === "cancelled" ? { status: "cancelled" } : result.stopReason === "end_turn" ? { status: "succeeded" } : {
|
|
30328
30599
|
status: "failed",
|
|
30329
30600
|
error: {
|
|
@@ -30332,7 +30603,22 @@ var DevinSession = class {
|
|
|
30332
30603
|
retryable: false
|
|
30333
30604
|
}
|
|
30334
30605
|
};
|
|
30335
|
-
|
|
30606
|
+
let key = devinPromptTurnKey(result);
|
|
30607
|
+
if (prompted && this.transport.nativeHistory && (key || before)) {
|
|
30608
|
+
try {
|
|
30609
|
+
const response = key ? await this.transport.historyRequest("listSteps") : await this.transport.optionalListSteps();
|
|
30610
|
+
if (response !== void 0) {
|
|
30611
|
+
const steps = devinHistorySteps(response);
|
|
30612
|
+
key ??= before ? devinAddedPromptKey(before, steps) : void 0;
|
|
30613
|
+
const checkpoint = key && devinCheckpoint(this.transport.sessionId, key, steps);
|
|
30614
|
+
if (checkpoint)
|
|
30615
|
+
outcome = { ...outcome, checkpoint };
|
|
30616
|
+
}
|
|
30617
|
+
} catch (error62) {
|
|
30618
|
+
if (this.transport.isClosedOrFaulted)
|
|
30619
|
+
fault = devinError(error62);
|
|
30620
|
+
}
|
|
30621
|
+
}
|
|
30336
30622
|
if (key) {
|
|
30337
30623
|
nativeTurnRef = nativeTurnRefSchema.parse({
|
|
30338
30624
|
harnessId: "devin",
|
|
@@ -30342,16 +30628,6 @@ var DevinSession = class {
|
|
|
30342
30628
|
});
|
|
30343
30629
|
this.#turns += 1;
|
|
30344
30630
|
this.#fresh = false;
|
|
30345
|
-
if (this.transport.nativeHistory) {
|
|
30346
|
-
try {
|
|
30347
|
-
const checkpoint = devinCheckpoint(this.transport.sessionId, key, devinHistorySteps(await this.transport.historyRequest("listSteps")));
|
|
30348
|
-
if (checkpoint)
|
|
30349
|
-
outcome = { ...outcome, checkpoint };
|
|
30350
|
-
} catch (error62) {
|
|
30351
|
-
if (this.transport.isClosedOrFaulted)
|
|
30352
|
-
fault = devinError(error62);
|
|
30353
|
-
}
|
|
30354
|
-
}
|
|
30355
30631
|
} else if (outcome.status === "succeeded") {
|
|
30356
30632
|
outcome = {
|
|
30357
30633
|
status: "failed",
|
|
@@ -30384,13 +30660,24 @@ var DevinSession = class {
|
|
|
30384
30660
|
});
|
|
30385
30661
|
}
|
|
30386
30662
|
}
|
|
30663
|
+
/** Steps before a Turn, so a result without its user message ID can be matched exactly. */
|
|
30664
|
+
async #stepsBeforePrompt() {
|
|
30665
|
+
try {
|
|
30666
|
+
const response = await this.transport.optionalListSteps();
|
|
30667
|
+
return response === void 0 ? void 0 : devinHistorySteps(response);
|
|
30668
|
+
} catch {
|
|
30669
|
+
return void 0;
|
|
30670
|
+
}
|
|
30671
|
+
}
|
|
30387
30672
|
async close() {
|
|
30388
30673
|
if (this.#closed)
|
|
30389
30674
|
return;
|
|
30390
30675
|
this.#closed = true;
|
|
30391
30676
|
const active2 = this.#active;
|
|
30392
|
-
if (active2)
|
|
30677
|
+
if (active2) {
|
|
30393
30678
|
active2.cancelled = true;
|
|
30679
|
+
active2.settleBeforePrompt();
|
|
30680
|
+
}
|
|
30394
30681
|
this.#interactions.cancel();
|
|
30395
30682
|
this.transport.onConfigOptions = void 0;
|
|
30396
30683
|
try {
|