@boxes-dev/dvb-runtime 1.0.1062 → 1.0.1064
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/dist/agent-init-guides/git-signing.md +7 -0
- package/dist/bin/dvb.mjs +241 -103
- package/dist/bin/dvbd.mjs +4 -4
- package/dist/product-docs/SKILL.md +8 -3
- package/dist/product-docs/references/agent-tools.md +3 -0
- package/dist/product-docs/references/cli.md +6 -6
- package/dist/product-docs/references/core-concepts.md +5 -3
- package/dist/product-docs/references/desktop-workbench.md +6 -0
- package/dist/product-docs/references/files-git-and-review.md +54 -20
- package/dist/product-docs/references/mobile.md +11 -1
- package/dist/product-docs/references/onbox-agent-tools.md +173 -22
- package/dist/product-docs/references/project-setup.md +87 -44
- package/dist/product-docs/references/security-and-data.md +14 -13
- package/dist/product-docs/references/template-box-environment.md +15 -9
- package/dist/product-docs/references/threads-and-agents.md +36 -12
- package/dist/product-docs/references/troubleshooting.md +11 -11
- package/package.json +2 -2
|
@@ -26,6 +26,13 @@ is hardware-backed.
|
|
|
26
26
|
This is a one-line decision in the manifest; the machinery (key detection,
|
|
27
27
|
staging, warnings) runs during `run` and surfaces problems in its output.
|
|
28
28
|
|
|
29
|
+
For OpenPGP signing, install GnuPG on the local machine before `run`; both
|
|
30
|
+
`gpg` and `gpgconf` must be on PATH. On macOS with Homebrew, run
|
|
31
|
+
`brew install gnupg`. If `run` reports a missing tool, install it and retry
|
|
32
|
+
`run`. An existing SSH signing profile uses SSH tools instead of GnuPG.
|
|
33
|
+
To continue without signing, set `gitSigning.mode: skip`, re-run `check`,
|
|
34
|
+
and get approval for the updated launch summary before running again.
|
|
35
|
+
|
|
29
36
|
`run` prints the public signing key and registration instructions for its Git
|
|
30
37
|
host. Relay those to the user. Retrieve them again with `dvb agent-init status`
|
|
31
38
|
(or `status --json`). Only public keys belong in this handoff; never print
|
package/dist/bin/dvb.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="939eaffd-82e2-5968-8550-2416e4b967e9")}catch(e){}}();
|
|
4
4
|
import { createRequire as __dvbCreateRequire } from "node:module";
|
|
5
5
|
import { dirname as __dvbDirname } from "node:path";
|
|
6
6
|
import { fileURLToPath as __dvbFileURLToPath } from "node:url";
|
|
@@ -69709,9 +69709,9 @@ var init_sentry = __esm({
|
|
|
69709
69709
|
uncaughtExceptionMonitorInstalled = false;
|
|
69710
69710
|
currentDevboxSentryUser = null;
|
|
69711
69711
|
readBuildMetadata = () => {
|
|
69712
|
-
const rawPackageVersion = "1.0.
|
|
69713
|
-
const rawGitSha = "
|
|
69714
|
-
const rawSentryRelease = "boxes-dev-dvb@1.0.
|
|
69712
|
+
const rawPackageVersion = "1.0.1064";
|
|
69713
|
+
const rawGitSha = "29f88cda72014ceed9419cc5b1ce95333682be41";
|
|
69714
|
+
const rawSentryRelease = "boxes-dev-dvb@1.0.1064+29f88cda72014ceed9419cc5b1ce95333682be41";
|
|
69715
69715
|
const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
|
|
69716
69716
|
const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
|
|
69717
69717
|
const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
|
|
@@ -75095,7 +75095,7 @@ var init_packageVersion = __esm({
|
|
|
75095
75095
|
return path18.join(process.cwd(), "dvb");
|
|
75096
75096
|
};
|
|
75097
75097
|
readEmbeddedPackageVersion = () => {
|
|
75098
|
-
const raw = "1.0.
|
|
75098
|
+
const raw = "1.0.1064";
|
|
75099
75099
|
return trimVersion(raw);
|
|
75100
75100
|
};
|
|
75101
75101
|
readNearestPackageMetadata = (basePath) => {
|
|
@@ -90108,7 +90108,7 @@ var init_index_node2 = __esm({
|
|
|
90108
90108
|
// src/devbox/controlPlane.ts
|
|
90109
90109
|
import http7 from "node:http";
|
|
90110
90110
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
90111
|
-
var MANAGED_DAEMON_NOT_READY_CODE, CONVEX_INFLIGHT_ACTION_DISCONNECTED_MESSAGE, CONTROL_PLANE_ACTION_RETRY_MAX_ATTEMPTS, CONTROL_PLANE_ACTION_RETRY_BASE_DELAY_MS, MANAGED_DAEMON_RECOVERY_WAKING_TIMEOUT_MS, CONTROL_PLANE_CHECKPOINT_RECOVERY_MAX_ATTEMPTS, CONTROL_PLANE_CHECKPOINT_RECOVERY_POLL_MS, ManagedDaemonNotReadyError, isManagedDaemonNotReadyError, isManagedDaemonSleepingError, sleep2, isRetryableTransientConvexActionError, buildTransientConvexActionRetryMessage, announceTransientConvexActionRetry, retryTransientConvexAction, normalizeStringRecord, E2B_DEVBOX_ALIAS_EXISTS_CODE, isRecord3, maybeMapE2bProvisionControlPlaneError, mapE2bProvisionControlPlaneError, LOGIN_CODE_REJECTIONS, resolveControlPlaneUrl, resolveConvexUrl, escapeHtml2, CALLBACK_LOGO_MARK, CALLBACK_FULL_LOGO, renderCallbackPage, CONTROL_PLANE_REQUEST_UNAVAILABLE_CODE, ControlPlaneRequestUnavailableError, isControlPlaneRequestUnavailableError, requestJson, ControlPlaneRequestError, isControlPlaneAuthRejectionError, isControlPlaneSessionRefreshRejectionError, startCallbackServer, getControlPlaneUrl, getConvexUrl, createDefaultBrowserSignInDeps, signInWithBrowser, claudeTokenGet, claudeTokenSet, claudeTokenClear, agentAuthCredentialsList, fetchAgentCredentialRows, codexAuthCacheGet, codexAuthCacheSet, codexAuthCacheClear, claudeTokenReportRuntimeAuthFailureForViewer, claudeTokenReportRuntimeValidatedForViewer, e2bTokenResolvedGet, userSettingsGet, userSettingsSet, projectInstanceTypeOptionsGet, e2bDevboxRemove, e2bDevboxGet, e2bDevboxStatusesList, e2bDevboxDestroy, e2bDevboxProvision, e2bDevboxPause, e2bDevboxEnsureActive, e2bDevboxKeepAlive, e2bDevboxReset, e2bDevboxIssueBootstrapConnectInfo, e2bDevboxBootstrapDaemon, managedDevboxIssueDaemonConnectInfo, managedDaemonRecoverForInstance, managedDaemonControlGrantIssueForViewer, managedDevboxCreateCheckpoint, managedDevboxListRemoteStates, clientThreadsListForPrimaryInstance, threadTitleGenerationStatesListForPrimaryInstance, spriteDaemonSessionsList, clientThreadsUpsertRemoteInitCodexThread, clientThreadsDiscardRemoteInitCodexThread, projectInitJobsGetActiveForProject, agentInitProgressReportCliStep, instancesList, helloViewerGet, billingSummaryGet, convexBrowserModulePromise, loadConvexBrowserModule, buildConvexClientOptions, configureAuthenticatedConvexClient, createAuthenticatedConvexClient, withConvexClient, resolveInstanceIdForAlias, resolveManagedDaemonControlTargetWithClient, issueManagedDaemonControlGrantWithClient, resolveSpriteInstanceId, fetchClaudeTokenStatus, fetchResolvedE2bCredentials, fetchViewerIdentity, BILLING_ACTIVATION_STATES, readBillingActivationBoolean, parseBillingActivationDecision, parseBillingActivationSummary, fetchTeamBillingActivationForViewer, fetchActiveDesktopInitJobForProject, reportAgentInitStep, fetchViewerCodingAgentPreference, fetchProjectInstanceTypeOptionsForViewer, storeViewerCodingAgentPreference, storeClaudeCodeOauthToken, clearClaudeCodeOauthToken, reportClaudeRuntimeAuthFailureForViewer, reportClaudeRuntimeValidatedForViewer, fetchCodexAuthCacheStatus, storeCodexAuthCache, clearCodexAuthCache, normalizeE2bDevboxRecord, fetchE2bDevboxLifecycle, listE2bDevboxStatuses, destroyE2bDevbox, provisionE2bDevbox, pauseE2bDevbox, ensureE2bDevboxActive, keepAliveE2bDevbox, resetE2bDevbox, bootstrapE2bDaemon, throwManagedDaemonNotReady, normalizeOptionalString2, normalizeAliasForLookup, validateManagedDaemonRecoveryResponse, normalizeManagedCheckpointResponse, buildRecoveredManagedCheckpointResponse, readManagedCheckpointRecoveryState, recoverManagedCheckpointAfterDisconnect, buildManagedDaemonConnectInfoResponseSummary, buildManagedDaemonConnectInfoUnexpectedMessage, buildManagedDaemonConnectInfoSleepingMessage, buildManagedDaemonConnectInfoWakingMessage, readWakingRetryAfterMs, logManagedDaemonConnectInfoResponse, fetchManagedDaemonConnectInfoWithAction, requestManagedDaemonConnectInfo, fetchManagedDaemonConnectInfo, recoverManagedDaemonForInit, recoverManagedDaemonControlTargetWithClient, fetchE2bBootstrapConnectInfo, createManagedCheckpoint, listManagedRemoteStates, listViewerInstances, listSpriteDaemonSessions, upsertRemoteInitCodexThread, discardRemoteInitCodexThread, signOutControlPlane, refreshControlPlaneSession, readLoginCodeRejection, exchangeLoginCode, createCliInitResponsesRelayTokenForViewer;
|
|
90111
|
+
var MANAGED_DAEMON_NOT_READY_CODE, CONVEX_INFLIGHT_ACTION_DISCONNECTED_MESSAGE, CONTROL_PLANE_ACTION_RETRY_MAX_ATTEMPTS, CONTROL_PLANE_ACTION_RETRY_BASE_DELAY_MS, MANAGED_DAEMON_RECOVERY_WAKING_TIMEOUT_MS, CONTROL_PLANE_CHECKPOINT_RECOVERY_MAX_ATTEMPTS, CONTROL_PLANE_CHECKPOINT_RECOVERY_POLL_MS, ManagedDaemonNotReadyError, isManagedDaemonNotReadyError, isManagedDaemonSleepingError, sleep2, isRetryableTransientConvexActionError, buildTransientConvexActionRetryMessage, announceTransientConvexActionRetry, retryTransientConvexAction, normalizeStringRecord, E2B_DEVBOX_ALIAS_EXISTS_CODE, isRecord3, maybeMapE2bProvisionControlPlaneError, mapE2bProvisionControlPlaneError, LOGIN_CODE_REJECTIONS, resolveControlPlaneUrl, resolveConvexUrl, escapeHtml2, CALLBACK_LOGO_MARK, CALLBACK_FULL_LOGO, renderCallbackPage, CONTROL_PLANE_REQUEST_UNAVAILABLE_CODE, ControlPlaneRequestUnavailableError, isControlPlaneRequestUnavailableError, requestJson, ControlPlaneRequestError, isControlPlaneAuthRejectionError, isControlPlaneSessionRefreshRejectionError, startCallbackServer, getControlPlaneUrl, getConvexUrl, createDefaultBrowserSignInDeps, signInWithBrowser, claudeTokenGet, claudeTokenSet, claudeTokenClear, agentAuthCredentialsList, fetchAgentCredentialRows, codexAuthCacheGet, codexAuthCacheSet, codexAuthCacheClear, claudeTokenReportRuntimeAuthFailureForViewer, claudeTokenReportRuntimeValidatedForViewer, e2bTokenResolvedGet, userSettingsGet, userSettingsSet, projectInstanceTypeOptionsGet, e2bDevboxRemove, e2bDevboxGet, e2bDevboxStatusesList, e2bDevboxDestroy, e2bDevboxProvision, e2bDevboxPause, e2bDevboxEnsureActive, e2bDevboxKeepAlive, e2bDevboxReset, e2bDevboxIssueBootstrapConnectInfo, e2bDevboxBootstrapDaemon, managedDevboxIssueDaemonConnectInfo, managedDaemonRecoverForInstance, managedDaemonControlGrantIssueForViewer, managedDevboxCreateCheckpoint, managedDevboxListRemoteStates, clientThreadsListForPrimaryInstance, threadTitleGenerationStatesListForPrimaryInstance, spriteDaemonSessionsList, clientThreadsUpsertRemoteInitCodexThread, clientThreadsDiscardRemoteInitCodexThread, projectInitJobsGetActiveForProject, agentInitProgressReportCliStep, instancesList, helloViewerGet, billingSummaryGet, convexBrowserModulePromise, loadConvexBrowserModule, buildConvexClientOptions, configureAuthenticatedConvexClient, createAuthenticatedConvexClient, withConvexClient, resolveInstanceIdForAlias, resolveManagedDaemonControlTargetWithClient, issueManagedDaemonControlGrantWithClient, resolveSpriteInstanceId, fetchClaudeTokenStatus, fetchResolvedE2bCredentials, fetchViewerIdentity, BILLING_ACTIVATION_STATES, readBillingActivationBoolean, parseBillingActivationDecision, parseBillingActivationSummary, fetchTeamBillingActivationForViewer, fetchActiveDesktopInitJobForProject, AGENT_INIT_STEP_REPORT_TIMEOUT_MS, reportAgentInitStep, fetchViewerCodingAgentPreference, fetchProjectInstanceTypeOptionsForViewer, storeViewerCodingAgentPreference, storeClaudeCodeOauthToken, clearClaudeCodeOauthToken, reportClaudeRuntimeAuthFailureForViewer, reportClaudeRuntimeValidatedForViewer, fetchCodexAuthCacheStatus, storeCodexAuthCache, clearCodexAuthCache, normalizeE2bDevboxRecord, fetchE2bDevboxLifecycle, listE2bDevboxStatuses, destroyE2bDevbox, provisionE2bDevbox, pauseE2bDevbox, ensureE2bDevboxActive, keepAliveE2bDevbox, resetE2bDevbox, bootstrapE2bDaemon, throwManagedDaemonNotReady, normalizeOptionalString2, normalizeAliasForLookup, validateManagedDaemonRecoveryResponse, normalizeManagedCheckpointResponse, buildRecoveredManagedCheckpointResponse, readManagedCheckpointRecoveryState, recoverManagedCheckpointAfterDisconnect, buildManagedDaemonConnectInfoResponseSummary, buildManagedDaemonConnectInfoUnexpectedMessage, buildManagedDaemonConnectInfoSleepingMessage, buildManagedDaemonConnectInfoWakingMessage, readWakingRetryAfterMs, logManagedDaemonConnectInfoResponse, fetchManagedDaemonConnectInfoWithAction, requestManagedDaemonConnectInfo, fetchManagedDaemonConnectInfo, recoverManagedDaemonForInit, recoverManagedDaemonControlTargetWithClient, fetchE2bBootstrapConnectInfo, createManagedCheckpoint, listManagedRemoteStates, listViewerInstances, listSpriteDaemonSessions, upsertRemoteInitCodexThread, discardRemoteInitCodexThread, signOutControlPlane, refreshControlPlaneSession, readLoginCodeRejection, exchangeLoginCode, createCliInitResponsesRelayTokenForViewer;
|
|
90112
90112
|
var init_controlPlane = __esm({
|
|
90113
90113
|
"src/devbox/controlPlane.ts"() {
|
|
90114
90114
|
"use strict";
|
|
@@ -90931,9 +90931,26 @@ var init_controlPlane = __esm({
|
|
|
90931
90931
|
});
|
|
90932
90932
|
});
|
|
90933
90933
|
};
|
|
90934
|
+
AGENT_INIT_STEP_REPORT_TIMEOUT_MS = 5e3;
|
|
90934
90935
|
reportAgentInitStep = async (token, request2) => {
|
|
90935
90936
|
await withConvexClient(token, async (client) => {
|
|
90936
|
-
|
|
90937
|
+
let timer;
|
|
90938
|
+
try {
|
|
90939
|
+
await Promise.race([
|
|
90940
|
+
client.mutation(agentInitProgressReportCliStep, request2),
|
|
90941
|
+
new Promise((_2, reject) => {
|
|
90942
|
+
timer = setTimeout(() => {
|
|
90943
|
+
reject(
|
|
90944
|
+
new Error(
|
|
90945
|
+
`Progress report timed out after ${String(AGENT_INIT_STEP_REPORT_TIMEOUT_MS)} ms`
|
|
90946
|
+
)
|
|
90947
|
+
);
|
|
90948
|
+
}, AGENT_INIT_STEP_REPORT_TIMEOUT_MS);
|
|
90949
|
+
})
|
|
90950
|
+
]);
|
|
90951
|
+
} finally {
|
|
90952
|
+
clearTimeout(timer);
|
|
90953
|
+
}
|
|
90937
90954
|
});
|
|
90938
90955
|
};
|
|
90939
90956
|
fetchViewerCodingAgentPreference = async (token) => {
|
|
@@ -95612,7 +95629,7 @@ var init_src = __esm({
|
|
|
95612
95629
|
});
|
|
95613
95630
|
|
|
95614
95631
|
// src/devbox/auth.ts
|
|
95615
|
-
var CONTROL_PLANE_INTERACTIVE_SIGNIN_STAGE, CONTROL_PLANE_AUTH_REFRESH_ERROR_CODE, ControlPlaneAuthRefreshError, isControlPlaneAuthRefreshError, TOKEN_REFRESH_BUFFER_MS2, CONTROL_PLANE_AUTH_REFRESH_RETRY_DELAYS_MS, defaultControlPlaneAuthApi, waitForControlPlaneAuthRefreshRetry, createRetryingControlPlaneTokenProvider, decodeJwtPayload4, parseTokenExpiresAt2, isTokenExpired, shouldRefreshToken2, clearControlPlaneAccessToken2, clearControlPlaneSession, updateControlPlaneSession, refreshControlPlaneToken, refreshLongLivedControlPlaneToken, createLongLivedControlPlaneTokenProvider, validateControlPlaneToken, resolveStoredControlPlaneToken, ensureControlPlaneToken, ensureExistingControlPlaneToken;
|
|
95632
|
+
var CONTROL_PLANE_INTERACTIVE_SIGNIN_STAGE, CONTROL_PLANE_AUTH_REFRESH_ERROR_CODE, ControlPlaneAuthRefreshError, isControlPlaneAuthRefreshError, TOKEN_REFRESH_BUFFER_MS2, CONTROL_PLANE_AUTH_REFRESH_RETRY_DELAYS_MS, defaultControlPlaneAuthApi, waitForControlPlaneAuthRefreshRetry, createRetryingControlPlaneTokenProvider, decodeJwtPayload4, parseTokenExpiresAt2, isTokenExpired, shouldRefreshToken2, clearControlPlaneAccessToken2, clearControlPlaneSession, updateControlPlaneSession, refreshControlPlaneToken, refreshLongLivedControlPlaneToken, createLongLivedControlPlaneTokenProvider, validateControlPlaneToken, resolveStoredControlPlaneToken, ensureControlPlaneToken, readUnexpiredControlPlaneToken, ensureExistingControlPlaneToken;
|
|
95616
95633
|
var init_auth = __esm({
|
|
95617
95634
|
"src/devbox/auth.ts"() {
|
|
95618
95635
|
"use strict";
|
|
@@ -95914,6 +95931,10 @@ var init_auth = __esm({
|
|
|
95914
95931
|
logger2.info("control_plane_signed_in");
|
|
95915
95932
|
return tokens.token;
|
|
95916
95933
|
};
|
|
95934
|
+
readUnexpiredControlPlaneToken = async (store) => {
|
|
95935
|
+
const token = await store.getControlPlaneToken();
|
|
95936
|
+
return token && !isTokenExpired(token) ? token : null;
|
|
95937
|
+
};
|
|
95917
95938
|
ensureExistingControlPlaneToken = async (store, stage, authApi = defaultControlPlaneAuthApi) => {
|
|
95918
95939
|
const controlPlaneUrl = getControlPlaneUrl();
|
|
95919
95940
|
const convexUrl = getConvexUrl();
|
|
@@ -101875,7 +101896,7 @@ var init_detachControl = __esm({
|
|
|
101875
101896
|
});
|
|
101876
101897
|
|
|
101877
101898
|
// src/devbox/terminal/kittyCtrlCReleaseSuppressor.ts
|
|
101878
|
-
var ESC, CSI, OPEN_BRACKET, LOWER_U,
|
|
101899
|
+
var ESC, CSI, OPEN_BRACKET, LOWER_U, KITTY_MODE_CHANGE_PATTERN, MAX_MODE_CHANGE_SEQUENCE_LENGTH, MAX_INPUT_SEQUENCE_BYTES, parseKittyCtrlCReleaseSequenceLength, createKittyCtrlCReleaseSuppressor;
|
|
101879
101900
|
var init_kittyCtrlCReleaseSuppressor = __esm({
|
|
101880
101901
|
"src/devbox/terminal/kittyCtrlCReleaseSuppressor.ts"() {
|
|
101881
101902
|
"use strict";
|
|
@@ -101883,15 +101904,10 @@ var init_kittyCtrlCReleaseSuppressor = __esm({
|
|
|
101883
101904
|
CSI = 155;
|
|
101884
101905
|
OPEN_BRACKET = 91;
|
|
101885
101906
|
LOWER_U = 117;
|
|
101886
|
-
|
|
101887
|
-
|
|
101888
|
-
"\x1B[
|
|
101889
|
-
"
|
|
101890
|
-
"\x9B<u"
|
|
101891
|
-
];
|
|
101892
|
-
MAX_DISABLE_SEQUENCE_LENGTH = KITTY_DISABLE_SEQUENCES.reduce(
|
|
101893
|
-
(max, sequence) => Math.max(max, Buffer.byteLength(sequence, "latin1")),
|
|
101894
|
-
0
|
|
101907
|
+
KITTY_MODE_CHANGE_PATTERN = /(?:\u001b\[|\x9b)([<>])\d{0,3}u/g;
|
|
101908
|
+
MAX_MODE_CHANGE_SEQUENCE_LENGTH = Buffer.byteLength(
|
|
101909
|
+
"\x1B[>255u",
|
|
101910
|
+
"latin1"
|
|
101895
101911
|
);
|
|
101896
101912
|
MAX_INPUT_SEQUENCE_BYTES = 64;
|
|
101897
101913
|
parseKittyCtrlCReleaseSequenceLength = (input) => {
|
|
@@ -101955,20 +101971,33 @@ var init_kittyCtrlCReleaseSuppressor = __esm({
|
|
|
101955
101971
|
if (chunk2.length === 0) {
|
|
101956
101972
|
return;
|
|
101957
101973
|
}
|
|
101974
|
+
const seenLength = pendingOutput.length;
|
|
101958
101975
|
const combined = pendingOutput.length > 0 ? Buffer.concat([pendingOutput, chunk2]) : Buffer.from(chunk2);
|
|
101959
|
-
|
|
101960
|
-
|
|
101976
|
+
let lastChange = null;
|
|
101977
|
+
for (const match of combined.toString("latin1").matchAll(KITTY_MODE_CHANGE_PATTERN)) {
|
|
101978
|
+
if (match.index + match[0].length > seenLength) {
|
|
101979
|
+
lastChange = match[1] ?? null;
|
|
101980
|
+
}
|
|
101981
|
+
}
|
|
101982
|
+
if (lastChange === "<") {
|
|
101961
101983
|
armed = true;
|
|
101962
101984
|
pendingInput = Buffer.alloc(0);
|
|
101985
|
+
} else if (lastChange === ">") {
|
|
101986
|
+
armed = false;
|
|
101963
101987
|
}
|
|
101964
101988
|
const keepBytes = Math.min(
|
|
101965
101989
|
combined.length,
|
|
101966
|
-
|
|
101990
|
+
MAX_MODE_CHANGE_SEQUENCE_LENGTH - 1
|
|
101967
101991
|
);
|
|
101968
101992
|
pendingOutput = keepBytes > 0 ? Buffer.from(combined.subarray(-keepBytes)) : Buffer.alloc(0);
|
|
101969
101993
|
},
|
|
101970
101994
|
filterInput(chunk2) {
|
|
101971
|
-
if (!armed
|
|
101995
|
+
if (!armed) {
|
|
101996
|
+
const output = pendingInput.length > 0 ? Buffer.concat([pendingInput, chunk2]) : Buffer.from(chunk2);
|
|
101997
|
+
pendingInput = Buffer.alloc(0);
|
|
101998
|
+
return { output, suppressed: false };
|
|
101999
|
+
}
|
|
102000
|
+
if (chunk2.length === 0) {
|
|
101972
102001
|
return { output: Buffer.from(chunk2), suppressed: false };
|
|
101973
102002
|
}
|
|
101974
102003
|
const combined = pendingInput.length > 0 ? Buffer.concat([pendingInput, chunk2]) : Buffer.from(chunk2);
|
|
@@ -140886,7 +140915,7 @@ var init_threadInventoryBuilder = __esm({
|
|
|
140886
140915
|
const activePlacementId = state.activePlacementIdByClientThreadId.get(
|
|
140887
140916
|
placement.clientThreadId
|
|
140888
140917
|
);
|
|
140889
|
-
const anchorRow = activePlacementId ===
|
|
140918
|
+
const anchorRow = activePlacementId === placement.placementId ? state.rowsByClientThreadId.get(placement.clientThreadId) : void 0;
|
|
140890
140919
|
if (anchorRow && !rows.some((row) => row.key === anchorRow.key)) {
|
|
140891
140920
|
rows.push(anchorRow);
|
|
140892
140921
|
}
|
|
@@ -141178,9 +141207,12 @@ var init_threadInventoryBuilder = __esm({
|
|
|
141178
141207
|
rowsByClientThreadId: /* @__PURE__ */ new Map(),
|
|
141179
141208
|
runtimeKeyToRow: /* @__PURE__ */ new Map(),
|
|
141180
141209
|
activePlacementIdByClientThreadId: new Map(
|
|
141181
|
-
|
|
141182
|
-
|
|
141183
|
-
)
|
|
141210
|
+
// A cleared link is authoritative, including while an older list page
|
|
141211
|
+
// still contains the placement removed by startup cancellation.
|
|
141212
|
+
clientThreads.map((thread) => [
|
|
141213
|
+
thread.clientThreadId,
|
|
141214
|
+
thread.threadPlacementId
|
|
141215
|
+
])
|
|
141184
141216
|
)
|
|
141185
141217
|
};
|
|
141186
141218
|
for (const thread of clientThreads) {
|
|
@@ -165287,7 +165319,7 @@ result || '';
|
|
|
165287
165319
|
// src/devbox/agentView/claudeNativeImageInput.ts
|
|
165288
165320
|
import { randomUUID as randomUUID19 } from "node:crypto";
|
|
165289
165321
|
import { isAbsolute as isAbsolute3, win32 as win322 } from "node:path";
|
|
165290
|
-
var CLAUDE_PASTE_CLASSIFICATION_MAX_BYTES, BRACKETED_PASTE_START, BRACKETED_PASTE_END, OUTSIDE_SEQUENCES, startsWith, isPrefixOf, appendBytesEvent, nextOutsideSequenceOffset, longestPasteEndPrefix, ClaudeNativeRawInputRecognizer, stripPathEscapes, isPlatformAbsolutePath, findPastePathTokens, encodeClaudeRemotePath, createClaudeNativeImageInput, mapClaudeNativeImageInputError;
|
|
165322
|
+
var CLAUDE_PASTE_CLASSIFICATION_MAX_BYTES, BRACKETED_PASTE_START, BRACKETED_PASTE_END, ESCAPE, OUTSIDE_SEQUENCES, startsWith, isPrefixOf, appendBytesEvent, nextOutsideSequenceOffset, longestPasteEndPrefix, ClaudeNativeRawInputRecognizer, stripPathEscapes, isPlatformAbsolutePath, findPastePathTokens, encodeClaudeRemotePath, createClaudeNativeImageInput, mapClaudeNativeImageInputError;
|
|
165291
165323
|
var init_claudeNativeImageInput = __esm({
|
|
165292
165324
|
"src/devbox/agentView/claudeNativeImageInput.ts"() {
|
|
165293
165325
|
"use strict";
|
|
@@ -165298,6 +165330,7 @@ var init_claudeNativeImageInput = __esm({
|
|
|
165298
165330
|
CLAUDE_PASTE_CLASSIFICATION_MAX_BYTES = 256 * 1024;
|
|
165299
165331
|
BRACKETED_PASTE_START = Buffer.from("\x1B[200~", "utf8");
|
|
165300
165332
|
BRACKETED_PASTE_END = Buffer.from("\x1B[201~", "utf8");
|
|
165333
|
+
ESCAPE = Buffer.from([27]);
|
|
165301
165334
|
OUTSIDE_SEQUENCES = [
|
|
165302
165335
|
{ bytes: BRACKETED_PASTE_START, kind: "paste_start", key: null },
|
|
165303
165336
|
{ bytes: Buffer.from([22]), kind: "image_key", key: "ctrl_v" },
|
|
@@ -165448,7 +165481,7 @@ var init_claudeNativeImageInput = __esm({
|
|
|
165448
165481
|
});
|
|
165449
165482
|
continue;
|
|
165450
165483
|
}
|
|
165451
|
-
if (OUTSIDE_SEQUENCES.some(
|
|
165484
|
+
if (!this.pending.equals(ESCAPE) && OUTSIDE_SEQUENCES.some(
|
|
165452
165485
|
(sequence) => isPrefixOf(this.pending, sequence.bytes)
|
|
165453
165486
|
)) {
|
|
165454
165487
|
break;
|
|
@@ -165712,7 +165745,7 @@ var init_claudeNativeImageInput = __esm({
|
|
|
165712
165745
|
});
|
|
165713
165746
|
|
|
165714
165747
|
// ../../../../shared/threadRuntime/dist-inventory/threadRuntime/managedClaudeThreadCommands.js
|
|
165715
|
-
var MANAGED_CLAUDE_THREAD_COMMAND_MESSAGES, MANAGED_CLAUDE_COMMAND_MENU_MESSAGE, normalizeClaudePromptLine, resolveBlockedManagedClaudeThreadCommand, resolveAmbiguousManagedClaudeThreadCommand, CTRL_A, CTRL_C, CTRL_E, BACKSPACE, CTRL_K, ENTER_LF, ENTER_CR, CTRL_U, CTRL_W, CTRL_Z,
|
|
165748
|
+
var MANAGED_CLAUDE_THREAD_COMMAND_MESSAGES, MANAGED_CLAUDE_COMMAND_MENU_MESSAGE, normalizeClaudePromptLine, resolveBlockedManagedClaudeThreadCommand, resolveAmbiguousManagedClaudeThreadCommand, CTRL_A, CTRL_C, CTRL_E, BACKSPACE, CTRL_K, ENTER_LF, ENTER_CR, CTRL_U, CTRL_W, CTRL_Z, ESCAPE2, DELETE, isCsiFinalByte, ManagedClaudeThreadCommandInputGuard;
|
|
165716
165749
|
var init_managedClaudeThreadCommands = __esm({
|
|
165717
165750
|
"../../../../shared/threadRuntime/dist-inventory/threadRuntime/managedClaudeThreadCommands.js"() {
|
|
165718
165751
|
"use strict";
|
|
@@ -165756,7 +165789,7 @@ var init_managedClaudeThreadCommands = __esm({
|
|
|
165756
165789
|
CTRL_U = 21;
|
|
165757
165790
|
CTRL_W = 23;
|
|
165758
165791
|
CTRL_Z = 26;
|
|
165759
|
-
|
|
165792
|
+
ESCAPE2 = 27;
|
|
165760
165793
|
DELETE = 127;
|
|
165761
165794
|
isCsiFinalByte = (value) => value >= 64 && value <= 126;
|
|
165762
165795
|
ManagedClaudeThreadCommandInputGuard = class {
|
|
@@ -165814,7 +165847,7 @@ var init_managedClaudeThreadCommands = __esm({
|
|
|
165814
165847
|
continue;
|
|
165815
165848
|
}
|
|
165816
165849
|
}
|
|
165817
|
-
if (byte ===
|
|
165850
|
+
if (byte === ESCAPE2) {
|
|
165818
165851
|
this.escapeSequence = [byte];
|
|
165819
165852
|
continue;
|
|
165820
165853
|
}
|
|
@@ -166184,7 +166217,7 @@ function getSgrPrefix(code2) {
|
|
|
166184
166217
|
if (code2.startsWith("\x9B")) {
|
|
166185
166218
|
return "\x9B";
|
|
166186
166219
|
}
|
|
166187
|
-
return `${
|
|
166220
|
+
return `${ESCAPE3}${ANSI_CSI}`;
|
|
166188
166221
|
}
|
|
166189
166222
|
function createSgrCode(prefix, values) {
|
|
166190
166223
|
return `${prefix}${values.join(";")}${ANSI_SGR_TERMINATOR}`;
|
|
@@ -166193,7 +166226,7 @@ function getSgrFragments(code2) {
|
|
|
166193
166226
|
const fragments = [];
|
|
166194
166227
|
const sgrPrefix = getSgrPrefix(code2);
|
|
166195
166228
|
let parameterString;
|
|
166196
|
-
if (code2.startsWith(`${
|
|
166229
|
+
if (code2.startsWith(`${ESCAPE3}${ANSI_CSI}`)) {
|
|
166197
166230
|
parameterString = code2.slice(2, -1);
|
|
166198
166231
|
} else if (code2.startsWith("\x9B")) {
|
|
166199
166232
|
parameterString = code2.slice(1, -1);
|
|
@@ -166354,7 +166387,7 @@ function parseHyperlinkCode(string7, index) {
|
|
|
166354
166387
|
endIndex: sequenceIndex + 1
|
|
166355
166388
|
};
|
|
166356
166389
|
}
|
|
166357
|
-
if (character ===
|
|
166390
|
+
if (character === ESCAPE3 && string7[sequenceIndex + 1] === ANSI_OSC_TERMINATOR) {
|
|
166358
166391
|
const code2 = string7.slice(index, sequenceIndex + 2);
|
|
166359
166392
|
const action = sequenceIndex === uriStart + 1 ? "close" : "open";
|
|
166360
166393
|
return {
|
|
@@ -166437,7 +166470,7 @@ function parseControlStringCode(string7, index) {
|
|
|
166437
166470
|
if (supportsBellTerminator && string7[sequenceIndex] === ANSI_BELL) {
|
|
166438
166471
|
return createControlParseResult(string7.slice(index, sequenceIndex + 1), sequenceIndex + 1);
|
|
166439
166472
|
}
|
|
166440
|
-
if (string7[sequenceIndex] ===
|
|
166473
|
+
if (string7[sequenceIndex] === ESCAPE3 && string7[sequenceIndex + 1] === ANSI_OSC_TERMINATOR) {
|
|
166441
166474
|
return createControlParseResult(string7.slice(index, sequenceIndex + 2), sequenceIndex + 2);
|
|
166442
166475
|
}
|
|
166443
166476
|
if (string7[sequenceIndex] === C1_STRING_TERMINATOR) {
|
|
@@ -166663,7 +166696,7 @@ function tokenizeAnsi(string7, { endCharacter = Number.POSITIVE_INFINITY } = {})
|
|
|
166663
166696
|
}
|
|
166664
166697
|
return tokens;
|
|
166665
166698
|
}
|
|
166666
|
-
var ESCAPE_CODE_POINT, C1_DCS_CODE_POINT, C1_SOS_CODE_POINT, C1_CSI_CODE_POINT, C1_ST_CODE_POINT, C1_OSC_CODE_POINT, C1_PM_CODE_POINT, C1_APC_CODE_POINT, ESCAPES,
|
|
166699
|
+
var ESCAPE_CODE_POINT, C1_DCS_CODE_POINT, C1_SOS_CODE_POINT, C1_CSI_CODE_POINT, C1_ST_CODE_POINT, C1_OSC_CODE_POINT, C1_PM_CODE_POINT, C1_APC_CODE_POINT, ESCAPES, ESCAPE3, ANSI_BELL, ANSI_CSI, ANSI_OSC, ANSI_DCS, ANSI_SOS, ANSI_PM, ANSI_APC, ANSI_SGR_TERMINATOR, ANSI_OSC_TERMINATOR, ANSI_STRING_TERMINATOR, C1_OSC, C1_STRING_TERMINATOR, ANSI_HYPERLINK_ESC_PREFIX, ANSI_HYPERLINK_C1_PREFIX, ANSI_HYPERLINK_ESC_CLOSE, ANSI_HYPERLINK_C1_CLOSE, CODE_POINT_0, CODE_POINT_9, CODE_POINT_SEMICOLON, CODE_POINT_COLON, CODE_POINT_CSI_PARAMETER_START, CODE_POINT_CSI_PARAMETER_END, CODE_POINT_CSI_INTERMEDIATE_START, CODE_POINT_CSI_INTERMEDIATE_END, CODE_POINT_CSI_FINAL_START, CODE_POINT_CSI_FINAL_END, REGIONAL_INDICATOR_SYMBOL_LETTER_A, REGIONAL_INDICATOR_SYMBOL_LETTER_Z, SGR_RESET_CODE, SGR_EXTENDED_FOREGROUND_CODE, SGR_DEFAULT_FOREGROUND_CODE, SGR_EXTENDED_BACKGROUND_CODE, SGR_DEFAULT_BACKGROUND_CODE, SGR_COLOR_TYPE_ANSI_256, SGR_COLOR_TYPE_TRUECOLOR, SGR_ANSI_256_FRAGMENT_LENGTH, SGR_TRUECOLOR_FRAGMENT_LENGTH, SGR_ANSI_256_LAST_PARAMETER_OFFSET, SGR_TRUECOLOR_LAST_PARAMETER_OFFSET, VARIATION_SELECTOR_16_CODE_POINT, COMBINING_ENCLOSING_KEYCAP_CODE_POINT, EMOJI_PRESENTATION_GRAPHEME_REGEX, GRAPHEME_SEGMENTER, endCodeNumbers;
|
|
166667
166700
|
var init_tokenize_ansi = __esm({
|
|
166668
166701
|
"../../node_modules/slice-ansi/tokenize-ansi.js"() {
|
|
166669
166702
|
init_ansi_styles2();
|
|
@@ -166686,7 +166719,7 @@ var init_tokenize_ansi = __esm({
|
|
|
166686
166719
|
C1_PM_CODE_POINT,
|
|
166687
166720
|
C1_APC_CODE_POINT
|
|
166688
166721
|
]);
|
|
166689
|
-
|
|
166722
|
+
ESCAPE3 = "\x1B";
|
|
166690
166723
|
ANSI_BELL = "\x07";
|
|
166691
166724
|
ANSI_CSI = "[";
|
|
166692
166725
|
ANSI_OSC = "]";
|
|
@@ -166696,10 +166729,10 @@ var init_tokenize_ansi = __esm({
|
|
|
166696
166729
|
ANSI_APC = "_";
|
|
166697
166730
|
ANSI_SGR_TERMINATOR = "m";
|
|
166698
166731
|
ANSI_OSC_TERMINATOR = "\\";
|
|
166699
|
-
ANSI_STRING_TERMINATOR = `${
|
|
166732
|
+
ANSI_STRING_TERMINATOR = `${ESCAPE3}${ANSI_OSC_TERMINATOR}`;
|
|
166700
166733
|
C1_OSC = "\x9D";
|
|
166701
166734
|
C1_STRING_TERMINATOR = "\x9C";
|
|
166702
|
-
ANSI_HYPERLINK_ESC_PREFIX = `${
|
|
166735
|
+
ANSI_HYPERLINK_ESC_PREFIX = `${ESCAPE3}${ANSI_OSC}8;`;
|
|
166703
166736
|
ANSI_HYPERLINK_C1_PREFIX = `${C1_OSC}8;`;
|
|
166704
166737
|
ANSI_HYPERLINK_ESC_CLOSE = `${ANSI_HYPERLINK_ESC_PREFIX};`;
|
|
166705
166738
|
ANSI_HYPERLINK_C1_CLOSE = `${ANSI_HYPERLINK_C1_PREFIX};`;
|
|
@@ -233605,64 +233638,6 @@ cat ${shellEscape3(filePath)}`
|
|
|
233605
233638
|
}
|
|
233606
233639
|
});
|
|
233607
233640
|
|
|
233608
|
-
// src/devbox/agentInit/progressReport.ts
|
|
233609
|
-
var resolvedProject, recordAgentInitProgressProject, readFolderProjectId, resolveAgentInitReportProject, reportAgentInitStepBestEffort;
|
|
233610
|
-
var init_progressReport = __esm({
|
|
233611
|
-
"src/devbox/agentInit/progressReport.ts"() {
|
|
233612
|
-
"use strict";
|
|
233613
|
-
init_devboxCore();
|
|
233614
|
-
init_controlPlane();
|
|
233615
|
-
init_logger3();
|
|
233616
|
-
resolvedProject = null;
|
|
233617
|
-
recordAgentInitProgressProject = (project) => {
|
|
233618
|
-
resolvedProject = project;
|
|
233619
|
-
};
|
|
233620
|
-
readFolderProjectId = async (folder) => {
|
|
233621
|
-
const marker = await readProjectRootMarker(folder);
|
|
233622
|
-
if (marker) {
|
|
233623
|
-
return marker.projectId;
|
|
233624
|
-
}
|
|
233625
|
-
return await readGitRootProjectId(folder);
|
|
233626
|
-
};
|
|
233627
|
-
resolveAgentInitReportProject = async (folder) => {
|
|
233628
|
-
if (resolvedProject) {
|
|
233629
|
-
return resolvedProject;
|
|
233630
|
-
}
|
|
233631
|
-
return { projectId: await readFolderProjectId(folder), alias: null };
|
|
233632
|
-
};
|
|
233633
|
-
reportAgentInitStepBestEffort = async ({
|
|
233634
|
-
controlPlaneToken,
|
|
233635
|
-
folder = process.cwd(),
|
|
233636
|
-
report = reportAgentInitStep,
|
|
233637
|
-
step,
|
|
233638
|
-
warn: warn3 = (event, fields) => logger2.warn(event, fields)
|
|
233639
|
-
}) => {
|
|
233640
|
-
try {
|
|
233641
|
-
const project = await resolveAgentInitReportProject(folder);
|
|
233642
|
-
await report(controlPlaneToken, {
|
|
233643
|
-
command: step.command,
|
|
233644
|
-
outcome: step.outcome,
|
|
233645
|
-
phase: step.phase,
|
|
233646
|
-
detail: step.detail ?? null,
|
|
233647
|
-
blockedSections: step.blockedSections ?? [],
|
|
233648
|
-
uploadPercent: step.uploadPercent ?? null,
|
|
233649
|
-
projectId: project.projectId,
|
|
233650
|
-
alias: project.alias,
|
|
233651
|
-
cliVersion: readCurrentPackageMetadata().version ?? null
|
|
233652
|
-
});
|
|
233653
|
-
return true;
|
|
233654
|
-
} catch (error55) {
|
|
233655
|
-
warn3("agent_init_progress_report_failed", {
|
|
233656
|
-
command: step.command,
|
|
233657
|
-
outcome: step.outcome,
|
|
233658
|
-
error: error55 instanceof Error ? error55.message : String(error55)
|
|
233659
|
-
});
|
|
233660
|
-
return false;
|
|
233661
|
-
}
|
|
233662
|
-
};
|
|
233663
|
-
}
|
|
233664
|
-
});
|
|
233665
|
-
|
|
233666
233641
|
// ../../../../shared/initPrep/src/agentConfigFiles.mjs
|
|
233667
233642
|
import fs33 from "node:fs/promises";
|
|
233668
233643
|
import path41 from "node:path";
|
|
@@ -237914,7 +237889,7 @@ import { createHash as createHash15, randomUUID as randomUUID23 } from "node:cry
|
|
|
237914
237889
|
import fs41 from "node:fs/promises";
|
|
237915
237890
|
import os22 from "node:os";
|
|
237916
237891
|
import path51 from "node:path";
|
|
237917
|
-
var uniqueStrings2, trim9, buildSpawnEnv2, runLocalCommand2, runCommandOrThrow, isMissingCommandError, readEffectiveGitConfig, normalizeGitSigningFormat, buildIdentityWarnings, buildProfileId, normalizeOpenPgpSelector, openPgpKeyMatchesSelector, openPgpKeyMatchesEmail, parseGpgSecretKeyListing, detectOpenPgpPassphraseProtected, inspectOpenPgpKeys, getOpenPgpCopyAvailability, expandUserPath, resolveSigningKeyPath, readFileIfExists3, isPublicSshKeyLine, parseSshPublicKey, missingSshPrivateKeyCopyAvailability, inspectLiteralSshPublicKey, inspectPublicSshKeyFile, inspectPrivateSshKeyFile, inspectSshSigningKey, buildIncompleteRepoPlan, detectOpenPgpRepoPlan, detectSshRepoPlan, detectGitSigningRepoPlan, profileKey, collectProfiles, computeRemoteConfigScope, deriveSetupStatus, collectCopyUnavailableReasons, collectWarnings, detectDesktopGitSigningSetup, parseGitRemoteHost2, hostsByProfile, dedupePublicKeys, registrationStatusFor, buildProfilePublicKey, buildSigningPublicKeys, createDesktopGitSigningDecisionFromPlan, validateModeSelection, buildSelectedDesktopGitSigningDecision, ensureFreshDir, throwSourceMissing, normalizeArchivePath, shouldExcludeGpgEntry, copyFileStrict, copyGpgHome, hashFile, assertCopyAvailable, prepareOpenPgpProfile, prepareSshProfile, prepareGitSigningPayload, relativeFromStagingRoot, stageDesktopGitSigningPayload;
|
|
237892
|
+
var uniqueStrings2, trim9, buildSpawnEnv2, runLocalCommand2, runCommandOrThrow, isMissingCommandError, readEffectiveGitConfig, normalizeGitSigningFormat, buildIdentityWarnings, buildProfileId, normalizeOpenPgpSelector, openPgpKeyMatchesSelector, openPgpKeyMatchesEmail, parseGpgSecretKeyListing, detectOpenPgpPassphraseProtected, inspectOpenPgpKeys, getOpenPgpCopyAvailability, expandUserPath, resolveSigningKeyPath, readFileIfExists3, isPublicSshKeyLine, parseSshPublicKey, missingSshPrivateKeyCopyAvailability, inspectLiteralSshPublicKey, inspectPublicSshKeyFile, inspectPrivateSshKeyFile, inspectSshSigningKey, buildIncompleteRepoPlan, detectOpenPgpRepoPlan, detectSshRepoPlan, detectGitSigningRepoPlan, profileKey, collectProfiles, computeRemoteConfigScope, deriveSetupStatus, collectCopyUnavailableReasons, collectWarnings, detectDesktopGitSigningSetup, parseGitRemoteHost2, hostsByProfile, dedupePublicKeys, registrationStatusFor, buildProfilePublicKey, buildSigningPublicKeys, createDesktopGitSigningDecisionFromPlan, assertOpenPgpToolsAvailable, validateModeSelection, buildSelectedDesktopGitSigningDecision, ensureFreshDir, throwSourceMissing, normalizeArchivePath, shouldExcludeGpgEntry, copyFileStrict, copyGpgHome, hashFile, assertCopyAvailable, prepareOpenPgpProfile, prepareSshProfile, prepareGitSigningPayload, relativeFromStagingRoot, stageDesktopGitSigningPayload;
|
|
237918
237893
|
var init_gitSigning2 = __esm({
|
|
237919
237894
|
"../../../../shared/initPrep/src/gitSigning.mjs"() {
|
|
237920
237895
|
"use strict";
|
|
@@ -239026,13 +239001,50 @@ var init_gitSigning2 = __esm({
|
|
|
239026
239001
|
payloadArchivePath: null,
|
|
239027
239002
|
updatedAt
|
|
239028
239003
|
});
|
|
239029
|
-
|
|
239004
|
+
assertOpenPgpToolsAvailable = async ({ env: env3, projectLayout }) => {
|
|
239005
|
+
for (const command of ["gpg", "gpgconf"]) {
|
|
239006
|
+
let result;
|
|
239007
|
+
try {
|
|
239008
|
+
result = await runLocalCommand2(
|
|
239009
|
+
projectLayout.projectRoot,
|
|
239010
|
+
command,
|
|
239011
|
+
["--version"],
|
|
239012
|
+
{ env: env3 }
|
|
239013
|
+
);
|
|
239014
|
+
} catch (error55) {
|
|
239015
|
+
if (!isMissingCommandError(error55)) throw error55;
|
|
239016
|
+
throw new Error(
|
|
239017
|
+
`OpenPGP Git signing requires GnuPG, but ${command} was not found. Install GnuPG (on macOS: brew install gnupg), make sure ${command} is on PATH, and retry. Or skip Git signing setup.`
|
|
239018
|
+
);
|
|
239019
|
+
}
|
|
239020
|
+
if (result.exitCode !== 0) {
|
|
239021
|
+
throw new Error(
|
|
239022
|
+
`GnuPG command ${command} --version failed with exit code ${result.exitCode}. Repair your GnuPG installation and retry. Or skip Git signing setup.`
|
|
239023
|
+
);
|
|
239024
|
+
}
|
|
239025
|
+
}
|
|
239026
|
+
};
|
|
239027
|
+
validateModeSelection = async ({
|
|
239028
|
+
copyConfirmed,
|
|
239029
|
+
env: env3,
|
|
239030
|
+
mode,
|
|
239031
|
+
plan,
|
|
239032
|
+
projectLayout
|
|
239033
|
+
}) => {
|
|
239030
239034
|
if (mode !== "create" && mode !== "copy" && mode !== "skip") {
|
|
239031
239035
|
throw new Error("Desktop Git signing setup mode is invalid.");
|
|
239032
239036
|
}
|
|
239033
239037
|
if (mode === "skip") return;
|
|
239038
|
+
const formats = plan ? plan.profiles.length > 0 ? plan.profiles.map((profile) => profile.format) : plan.repos.map(
|
|
239039
|
+
(repo) => normalizeGitSigningFormat(repo.rawFormat).format
|
|
239040
|
+
) : [];
|
|
239041
|
+
if (formats.includes("openpgp")) {
|
|
239042
|
+
await assertOpenPgpToolsAvailable({ env: env3, projectLayout });
|
|
239043
|
+
}
|
|
239034
239044
|
if (!plan || plan.status !== "ready" || plan.profiles.length === 0) {
|
|
239035
|
-
throw new Error(
|
|
239045
|
+
throw new Error(
|
|
239046
|
+
"No complete local Git signing profile was found. Configure local commit signing first, then retry. Or skip Git signing setup."
|
|
239047
|
+
);
|
|
239036
239048
|
}
|
|
239037
239049
|
if (mode === "copy") {
|
|
239038
239050
|
if (copyConfirmed !== true) {
|
|
@@ -239059,8 +239071,21 @@ var init_gitSigning2 = __esm({
|
|
|
239059
239071
|
previousDecision,
|
|
239060
239072
|
projectLayout
|
|
239061
239073
|
}) => {
|
|
239062
|
-
|
|
239063
|
-
|
|
239074
|
+
let plan = previousDecision?.plan ?? null;
|
|
239075
|
+
if (mode !== "skip" && plan && plan.profiles.length === 0) {
|
|
239076
|
+
plan = await detectDesktopGitSigningSetup({
|
|
239077
|
+
env: env3,
|
|
239078
|
+
homeDir: homeDir2,
|
|
239079
|
+
projectLayout
|
|
239080
|
+
});
|
|
239081
|
+
}
|
|
239082
|
+
await validateModeSelection({
|
|
239083
|
+
copyConfirmed,
|
|
239084
|
+
env: env3,
|
|
239085
|
+
mode,
|
|
239086
|
+
plan,
|
|
239087
|
+
projectLayout
|
|
239088
|
+
});
|
|
239064
239089
|
const selectedPlan = plan ? { ...plan, selectedMode: mode } : null;
|
|
239065
239090
|
const publicKeys = await buildSigningPublicKeys({
|
|
239066
239091
|
accountScope,
|
|
@@ -249837,6 +249862,96 @@ var init_service = __esm({
|
|
|
249837
249862
|
}
|
|
249838
249863
|
});
|
|
249839
249864
|
|
|
249865
|
+
// src/devbox/agentInit/progressReport.ts
|
|
249866
|
+
var resolvedProject, recordAgentInitProgressProject, readFolderProjectId, resolveAgentInitReportProject, reportAgentInitStepBestEffort, reportAgentInitActivityBestEffort;
|
|
249867
|
+
var init_progressReport = __esm({
|
|
249868
|
+
"src/devbox/agentInit/progressReport.ts"() {
|
|
249869
|
+
"use strict";
|
|
249870
|
+
init_devboxCore();
|
|
249871
|
+
init_auth();
|
|
249872
|
+
init_controlPlane();
|
|
249873
|
+
init_logger3();
|
|
249874
|
+
init_service();
|
|
249875
|
+
resolvedProject = null;
|
|
249876
|
+
recordAgentInitProgressProject = (project) => {
|
|
249877
|
+
resolvedProject = project;
|
|
249878
|
+
};
|
|
249879
|
+
readFolderProjectId = async (folder) => {
|
|
249880
|
+
const marker = await readProjectRootMarker(folder);
|
|
249881
|
+
if (marker) {
|
|
249882
|
+
return marker.projectId;
|
|
249883
|
+
}
|
|
249884
|
+
return await readGitRootProjectId(folder);
|
|
249885
|
+
};
|
|
249886
|
+
resolveAgentInitReportProject = async (folder) => {
|
|
249887
|
+
if (resolvedProject) {
|
|
249888
|
+
return resolvedProject;
|
|
249889
|
+
}
|
|
249890
|
+
return { projectId: await readFolderProjectId(folder), alias: null };
|
|
249891
|
+
};
|
|
249892
|
+
reportAgentInitStepBestEffort = async ({
|
|
249893
|
+
controlPlaneToken,
|
|
249894
|
+
folder = process.cwd(),
|
|
249895
|
+
report = reportAgentInitStep,
|
|
249896
|
+
step,
|
|
249897
|
+
warn: warn3 = (event, fields) => logger2.warn(event, fields)
|
|
249898
|
+
}) => {
|
|
249899
|
+
try {
|
|
249900
|
+
const project = await resolveAgentInitReportProject(folder);
|
|
249901
|
+
await report(controlPlaneToken, {
|
|
249902
|
+
command: step.command,
|
|
249903
|
+
outcome: step.outcome,
|
|
249904
|
+
phase: step.phase,
|
|
249905
|
+
detail: step.detail ?? null,
|
|
249906
|
+
blockedSections: step.blockedSections ?? [],
|
|
249907
|
+
uploadPercent: step.uploadPercent ?? null,
|
|
249908
|
+
projectId: project.projectId,
|
|
249909
|
+
alias: project.alias,
|
|
249910
|
+
cliVersion: readCurrentPackageMetadata().version ?? null
|
|
249911
|
+
});
|
|
249912
|
+
return true;
|
|
249913
|
+
} catch (error55) {
|
|
249914
|
+
warn3("agent_init_progress_report_failed", {
|
|
249915
|
+
command: step.command,
|
|
249916
|
+
outcome: step.outcome,
|
|
249917
|
+
error: error55 instanceof Error ? error55.message : String(error55)
|
|
249918
|
+
});
|
|
249919
|
+
return false;
|
|
249920
|
+
}
|
|
249921
|
+
};
|
|
249922
|
+
reportAgentInitActivityBestEffort = async ({
|
|
249923
|
+
command,
|
|
249924
|
+
folder
|
|
249925
|
+
}) => {
|
|
249926
|
+
let controlPlaneToken;
|
|
249927
|
+
try {
|
|
249928
|
+
controlPlaneToken = await readUnexpiredControlPlaneToken(
|
|
249929
|
+
await openAgentInitSecretStore()
|
|
249930
|
+
);
|
|
249931
|
+
} catch (error55) {
|
|
249932
|
+
logger2.debug("agent_init_activity_report_skipped", {
|
|
249933
|
+
command,
|
|
249934
|
+
error: error55 instanceof Error ? error55.message : String(error55)
|
|
249935
|
+
});
|
|
249936
|
+
return;
|
|
249937
|
+
}
|
|
249938
|
+
if (controlPlaneToken === null) {
|
|
249939
|
+
logger2.debug("agent_init_activity_report_skipped", {
|
|
249940
|
+
command,
|
|
249941
|
+
error: "no_unexpired_token"
|
|
249942
|
+
});
|
|
249943
|
+
return;
|
|
249944
|
+
}
|
|
249945
|
+
await reportAgentInitStepBestEffort({
|
|
249946
|
+
controlPlaneToken,
|
|
249947
|
+
folder,
|
|
249948
|
+
step: { command, outcome: "ok", phase: null },
|
|
249949
|
+
warn: (event, fields) => logger2.debug(event, fields)
|
|
249950
|
+
});
|
|
249951
|
+
};
|
|
249952
|
+
}
|
|
249953
|
+
});
|
|
249954
|
+
|
|
249840
249955
|
// src/devbox/agentInit/failureReport.ts
|
|
249841
249956
|
var readProgressCommand, readStoredToken, reportAgentInitFailure;
|
|
249842
249957
|
var init_failureReport = __esm({
|
|
@@ -262140,6 +262255,7 @@ var init_detect = __esm({
|
|
|
262140
262255
|
init_args();
|
|
262141
262256
|
init_errors4();
|
|
262142
262257
|
init_commandCore();
|
|
262258
|
+
init_progressReport();
|
|
262143
262259
|
DETECT_USAGE = "Usage: dvb agent-init detect <agent-config|agent-threads|untracked> [--project <path>] [--json] [--all (agent-threads only)]";
|
|
262144
262260
|
withSilencedConsole = async (fn) => {
|
|
262145
262261
|
const original = { info: console.info, log: console.log };
|
|
@@ -262207,6 +262323,10 @@ var init_detect = __esm({
|
|
|
262207
262323
|
);
|
|
262208
262324
|
}
|
|
262209
262325
|
const projectPath = resolveProjectPathFlag(flags);
|
|
262326
|
+
await reportAgentInitActivityBestEffort({
|
|
262327
|
+
command: "detect",
|
|
262328
|
+
folder: projectPath
|
|
262329
|
+
});
|
|
262210
262330
|
if (what === "agent-config") {
|
|
262211
262331
|
const scan = await withSilencedConsole(
|
|
262212
262332
|
async () => await scanDesktopAgentConfig({ localRepoRoot: projectPath })
|
|
@@ -262961,6 +263081,9 @@ var init_github = __esm({
|
|
|
262961
263081
|
print(
|
|
262962
263082
|
"After GitHub is connected, re-run `dvb agent-init check` to verify repository access."
|
|
262963
263083
|
);
|
|
263084
|
+
print(
|
|
263085
|
+
"GitHub App access covers pull, push, pull requests, and limited CLI commands. For more GitHub CLI access, authorize optional personal access on the connection page or run `gh auth login` on a managed box."
|
|
263086
|
+
);
|
|
262964
263087
|
};
|
|
262965
263088
|
runAgentInitGithub = async (args) => {
|
|
262966
263089
|
const action = args[0] === "cli" ? args[1] : null;
|
|
@@ -263144,6 +263267,11 @@ var init_github = __esm({
|
|
|
263144
263267
|
print(
|
|
263145
263268
|
"This account setting controls whether boxes.dev will sign the gh command into your connected GitHub account on your boxes. It applies across projects and is separate from Git pull and push access."
|
|
263146
263269
|
);
|
|
263270
|
+
if (connection.runtimeGhProjectionEnabled === true) {
|
|
263271
|
+
print(
|
|
263272
|
+
"Managed gh will prefer connected personal access. Run `gh auth login` on a managed box to authorize optional personal repository, read-only organization, gist, and workflow access."
|
|
263273
|
+
);
|
|
263274
|
+
}
|
|
263147
263275
|
if ("runtimeGhProjectionStatus" in connection && connection.runtimeGhProjectionStatus === "error") {
|
|
263148
263276
|
print(
|
|
263149
263277
|
"GitHub command-line access needs attention. Review your GitHub connection in account settings."
|
|
@@ -263163,6 +263291,7 @@ var init_guide = __esm({
|
|
|
263163
263291
|
"use strict";
|
|
263164
263292
|
init_args();
|
|
263165
263293
|
init_errors4();
|
|
263294
|
+
init_progressReport();
|
|
263166
263295
|
AGENT_INIT_GUIDE_TOPICS = [
|
|
263167
263296
|
{ topic: "flow", summary: "The whole workflow, phase by phase (start here)" },
|
|
263168
263297
|
{ topic: "manifest", summary: "Manifest format, sections, and rules" },
|
|
@@ -263259,6 +263388,10 @@ var init_guide = __esm({
|
|
|
263259
263388
|
"Usage: dvb agent-init guide [<topic>] [--all]"
|
|
263260
263389
|
);
|
|
263261
263390
|
}
|
|
263391
|
+
await reportAgentInitActivityBestEffort({
|
|
263392
|
+
command: "guide",
|
|
263393
|
+
folder: process.cwd()
|
|
263394
|
+
});
|
|
263262
263395
|
if (readBooleanFlag(flags, "all")) {
|
|
263263
263396
|
for (const entry of AGENT_INIT_GUIDE_TOPICS) {
|
|
263264
263397
|
console.log(`
|
|
@@ -264667,6 +264800,7 @@ var init_status = __esm({
|
|
|
264667
264800
|
init_codingAgents2();
|
|
264668
264801
|
init_desktopHandoff();
|
|
264669
264802
|
init_siteUrl();
|
|
264803
|
+
init_progressReport();
|
|
264670
264804
|
init_jobLoop();
|
|
264671
264805
|
init_check();
|
|
264672
264806
|
init_parse6();
|
|
@@ -264778,6 +264912,10 @@ var init_status = __esm({
|
|
|
264778
264912
|
};
|
|
264779
264913
|
runAgentInitStatus = async (args) => {
|
|
264780
264914
|
const { json: json3, projectPath } = parseStatusArgs(args, "status");
|
|
264915
|
+
await reportAgentInitActivityBestEffort({
|
|
264916
|
+
command: "status",
|
|
264917
|
+
folder: projectPath
|
|
264918
|
+
});
|
|
264781
264919
|
const report = await buildAgentInitStatus({ projectPath });
|
|
264782
264920
|
if (json3) {
|
|
264783
264921
|
console.log(JSON.stringify(report, null, 2));
|
|
@@ -297142,4 +297280,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
297142
297280
|
*)
|
|
297143
297281
|
*/
|
|
297144
297282
|
|
|
297145
|
-
//# debugId=
|
|
297283
|
+
//# debugId=939eaffd-82e2-5968-8550-2416e4b967e9
|