@boxes-dev/dvb-runtime 1.0.1133 → 1.0.1134

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.
@@ -136,6 +136,12 @@ access a repository, tell the user about App access and SSH, then run
136
136
  `dvb agent-init github connect` in the background without waiting for their
137
137
  choice (see Phase 3). `check` verifies access again before launch.
138
138
 
139
+ If `start` reports a Team Template that already includes the project's
140
+ repositories, ask the user whether they'd rather create their project from it
141
+ before you investigate. Their team has already set up that environment, so a
142
+ new Template box is usually unnecessary. If they choose it, give them the
143
+ printed link and stop; the rest of this workflow doesn't apply.
144
+
139
145
  Read any worktree, project-overlap, or skipped-repository explanations printed by `start`.
140
146
  Explain them to the user during review and confirm the intended project scope.
141
147
  `check` repeats these explanations in the setup summary; an overlap does not
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]="effd54fe-a3cb-5529-82cd-e610421b5b0b")}catch(e){}}();
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]="b7c70032-72a2-5070-828d-432609d39865")}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";
@@ -70601,9 +70601,9 @@ var init_sentry = __esm({
70601
70601
  uncaughtExceptionMonitorInstalled = false;
70602
70602
  currentDevboxSentryUser = null;
70603
70603
  readBuildMetadata = () => {
70604
- const rawPackageVersion = "1.0.1133";
70605
- const rawGitSha = "4b086f3dbe8b031b5baa1b3d2cfd087a42789d98";
70606
- const rawSentryRelease = "boxes-dev-dvb@1.0.1133+4b086f3dbe8b031b5baa1b3d2cfd087a42789d98";
70604
+ const rawPackageVersion = "1.0.1134";
70605
+ const rawGitSha = "b62bb54599236f8680321c312e4b6ad6a41ba8ea";
70606
+ const rawSentryRelease = "boxes-dev-dvb@1.0.1134+b62bb54599236f8680321c312e4b6ad6a41ba8ea";
70607
70607
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
70608
70608
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
70609
70609
  const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
@@ -76282,7 +76282,7 @@ var init_packageVersion = __esm({
76282
76282
  return path18.join(process.cwd(), "dvb");
76283
76283
  };
76284
76284
  readEmbeddedPackageVersion = () => {
76285
- const raw = "1.0.1133";
76285
+ const raw = "1.0.1134";
76286
76286
  return trimVersion(raw);
76287
76287
  };
76288
76288
  readNearestPackageMetadata = (basePath) => {
@@ -253037,7 +253037,7 @@ var init_databaseDumpTools2 = __esm({
253037
253037
  });
253038
253038
 
253039
253039
  // src/devbox/agentInit/controlPlane.ts
253040
- var preflightProject, registryUpsert2, registryRemove, startOrResumeJob, createUploadSession, refreshMultipartUploadParts, listMultipartUploadedParts, completeMultipartUpload, abortMultipartUpload, commitUpload, commitDecryptKeyEnvelope, getProgress, destroyStartOver, retryRecoverableFailure, getMarkerRepairState, getGithubConnection, startGithubConnection, setGithubCliAccess, listGithubRepositories, getGithubInstallTarget, findRenamedGithubRepositories, createAgentInitControlPlaneClient;
253040
+ var preflightProject, registryUpsert2, registryRemove, startOrResumeJob, createUploadSession, refreshMultipartUploadParts, listMultipartUploadedParts, completeMultipartUpload, abortMultipartUpload, commitUpload, commitDecryptKeyEnvelope, getProgress, destroyStartOver, retryRecoverableFailure, getMarkerRepairState, getGithubConnection, startGithubConnection, setGithubCliAccess, listGithubRepositories, getGithubInstallTarget, findRenamedGithubRepositories, findTeamTemplatesForGithubRepositories, createAgentInitControlPlaneClient;
253041
253041
  var init_controlPlane2 = __esm({
253042
253042
  "src/devbox/agentInit/controlPlane.ts"() {
253043
253043
  "use strict";
@@ -253075,6 +253075,7 @@ var init_controlPlane2 = __esm({
253075
253075
  listGithubRepositories = makeFunctionReference("githubRepositoryActions:listRepositoriesForViewer");
253076
253076
  getGithubInstallTarget = makeFunctionReference("githubRepositoryActions:getInstallTargetForViewer");
253077
253077
  findRenamedGithubRepositories = makeFunctionReference("githubRepositoryActions:findRenamedRepositoriesForViewer");
253078
+ findTeamTemplatesForGithubRepositories = makeFunctionReference("teamTemplateCollection:findForGithubRepositoriesForViewer");
253078
253079
  createAgentInitControlPlaneClient = ({
253079
253080
  getToken
253080
253081
  }) => {
@@ -253122,6 +253123,10 @@ var init_controlPlane2 = __esm({
253122
253123
  setGithubCliAccess: async (request2) => withConvexClient(
253123
253124
  await getToken(),
253124
253125
  async (client) => client.mutation(setGithubCliAccess, request2)
253126
+ ),
253127
+ findTeamTemplatesForGithubRepositories: async (request2) => withConvexClient(
253128
+ await getToken(),
253129
+ async (client) => client.query(findTeamTemplatesForGithubRepositories, request2)
253125
253130
  )
253126
253131
  };
253127
253132
  };
@@ -268718,6 +268723,73 @@ var init_remoteDefaultBranch = __esm({
268718
268723
  }
268719
268724
  });
268720
268725
 
268726
+ // src/devbox/agentInit/teamTemplateMatches.ts
268727
+ var isRecord19, readNullableString, parseMatch, findAgentInitTeamTemplateMatches, describeCreator, formatAgentInitTeamTemplateMatches;
268728
+ var init_teamTemplateMatches = __esm({
268729
+ "src/devbox/agentInit/teamTemplateMatches.ts"() {
268730
+ "use strict";
268731
+ init_devboxCore();
268732
+ isRecord19 = (value) => typeof value === "object" && value !== null;
268733
+ readNullableString = (value) => typeof value === "string" ? value : null;
268734
+ parseMatch = (value, siteUrl) => {
268735
+ if (!isRecord19(value) || typeof value["id"] !== "string" || typeof value["name"] !== "string" || !Array.isArray(value["repositories"]) || typeof value["createdByViewer"] !== "boolean") {
268736
+ throw new Error("boxes.dev returned an unexpected Team Template match.");
268737
+ }
268738
+ const createdBy = isRecord19(value["createdBy"]) ? {
268739
+ name: readNullableString(value["createdBy"]["name"]),
268740
+ email: readNullableString(value["createdBy"]["email"])
268741
+ } : null;
268742
+ return {
268743
+ id: value["id"],
268744
+ name: value["name"],
268745
+ repositories: value["repositories"].filter(
268746
+ (entry) => typeof entry === "string"
268747
+ ),
268748
+ createdBy,
268749
+ createdByViewer: value["createdByViewer"],
268750
+ setupUrl: `${siteUrl}/app/create/team-template?template=${encodeURIComponent(value["id"])}`
268751
+ };
268752
+ };
268753
+ findAgentInitTeamTemplateMatches = async ({
268754
+ client,
268755
+ projectLayoutRepos,
268756
+ siteUrl
268757
+ }) => {
268758
+ const fullNames = [
268759
+ ...new Set(
268760
+ projectLayoutRepos.flatMap((repo) => {
268761
+ const coordinates = resolveGithubRepositoryFromOrigin(repo.origin);
268762
+ return coordinates ? [`${coordinates.owner}/${coordinates.name}`] : [];
268763
+ })
268764
+ )
268765
+ ];
268766
+ if (fullNames.length === 0) return [];
268767
+ const result = await client.findTeamTemplatesForGithubRepositories({
268768
+ fullNames
268769
+ });
268770
+ if (!isRecord19(result) || !Array.isArray(result["templates"])) {
268771
+ throw new Error("boxes.dev returned an unexpected Team Template lookup.");
268772
+ }
268773
+ return result["templates"].map((value) => parseMatch(value, siteUrl));
268774
+ };
268775
+ describeCreator = (match) => {
268776
+ const { name, email: email5 } = match.createdBy ?? { name: null, email: null };
268777
+ if (name && email5) return `${name} (${email5}), who made it,`;
268778
+ if (name || email5) return `${name ?? email5}, who made it,`;
268779
+ return "a boxes.dev admin on their team";
268780
+ };
268781
+ formatAgentInitTeamTemplateMatches = (matches2) => matches2.flatMap((match) => [
268782
+ "",
268783
+ `Team Template: the user's team already has "${match.name}", which includes ${match.repositories.join(", ")}.`,
268784
+ "Before you investigate, ask the user whether they'd rather create this project from that Team Template and skip setting up a new Template box.",
268785
+ ...match.createdByViewer ? ["The user made this Team Template."] : [
268786
+ `If they're unsure, suggest they ask ${describeCreator(match)}${match.createdBy ? " or another boxes.dev admin on their team" : ""}.`
268787
+ ],
268788
+ `If they choose it, give them this link and stop agent-init: ${match.setupUrl}`
268789
+ ]);
268790
+ }
268791
+ });
268792
+
268721
268793
  // src/devbox/commands/agentInit/start.ts
268722
268794
  import fs56 from "node:fs/promises";
268723
268795
  import path72 from "node:path";
@@ -268740,6 +268812,8 @@ var init_start = __esm({
268740
268812
  init_progressReport();
268741
268813
  init_guidance();
268742
268814
  init_silencedConsole();
268815
+ init_siteUrl();
268816
+ init_teamTemplateMatches();
268743
268817
  parseStartArgs = (args) => {
268744
268818
  const { flags, positionals } = parseCommandArgs({
268745
268819
  args,
@@ -268892,15 +268966,27 @@ var init_start = __esm({
268892
268966
  }
268893
268967
  });
268894
268968
  const parsedManifest = manifestText === null ? null : parseAgentInitManifest(manifestText);
268895
- const githubAccessIssue = parsedManifest?.ok === true && parsedManifest.manifest.version !== 1 && parsedManifest.manifest.githubAccess === "managed" ? await findAgentInitGithubAccessIssue({
268896
- client: context34.controlPlaneClient,
268897
- projectLayoutRepos
268898
- }).catch((error55) => {
268899
- console.warn(
268900
- `Could not check GitHub access yet: ${error55 instanceof Error ? error55.message : String(error55)}`
268901
- );
268902
- return null;
268903
- }) : null;
268969
+ const [githubAccessIssue, teamTemplateMatches] = await Promise.all([
268970
+ parsedManifest?.ok === true && parsedManifest.manifest.version !== 1 && parsedManifest.manifest.githubAccess === "managed" ? findAgentInitGithubAccessIssue({
268971
+ client: context34.controlPlaneClient,
268972
+ projectLayoutRepos
268973
+ }).catch((error55) => {
268974
+ console.warn(
268975
+ `Could not check GitHub access yet: ${error55 instanceof Error ? error55.message : String(error55)}`
268976
+ );
268977
+ return null;
268978
+ }) : null,
268979
+ findAgentInitTeamTemplateMatches({
268980
+ client: context34.controlPlaneClient,
268981
+ projectLayoutRepos,
268982
+ siteUrl: resolveSiteUrl()
268983
+ }).catch((error55) => {
268984
+ console.warn(
268985
+ `Could not check for matching Team Templates: ${error55 instanceof Error ? error55.message : String(error55)}`
268986
+ );
268987
+ return [];
268988
+ })
268989
+ ]);
268904
268990
  if (json3) {
268905
268991
  console.log(
268906
268992
  JSON.stringify(
@@ -268914,7 +269000,8 @@ var init_start = __esm({
268914
269000
  projectRoot: repo.repoRoot,
268915
269001
  stagingDir: statePaths.stagingDir,
268916
269002
  projectGuidance: buildProjectSelectionGuidance(validation.project),
268917
- githubAccessIssue
269003
+ githubAccessIssue,
269004
+ teamTemplateMatches
268918
269005
  },
268919
269006
  null,
268920
269007
  2
@@ -268939,6 +269026,8 @@ var init_start = __esm({
268939
269026
  `Raise this with the user before you investigate, so they can finish any GitHub step while you work. ${githubAccessIssue.fix}`
268940
269027
  );
268941
269028
  }
269029
+ for (const line of formatAgentInitTeamTemplateMatches(teamTemplateMatches))
269030
+ console.log(line);
268942
269031
  console.log("");
268943
269032
  console.log("Next steps:");
268944
269033
  console.log(
@@ -268955,7 +269044,7 @@ var init_start = __esm({
268955
269044
  });
268956
269045
 
268957
269046
  // src/devbox/commands/agentInit/status.ts
268958
- var isRecord19, buildAgentInitStatus, parseStatusArgs, runAgentInitStatus, runAgentInitWatch;
269047
+ var isRecord20, buildAgentInitStatus, parseStatusArgs, runAgentInitStatus, runAgentInitWatch;
268959
269048
  var init_status = __esm({
268960
269049
  "src/devbox/commands/agentInit/status.ts"() {
268961
269050
  "use strict";
@@ -268970,7 +269059,7 @@ var init_status = __esm({
268970
269059
  init_check();
268971
269060
  init_parse6();
268972
269061
  init_guidance();
268973
- isRecord19 = (value) => typeof value === "object" && value !== null;
269062
+ isRecord20 = (value) => typeof value === "object" && value !== null;
268974
269063
  buildAgentInitStatus = async ({
268975
269064
  projectPath
268976
269065
  }) => {
@@ -268984,7 +269073,7 @@ var init_status = __esm({
268984
269073
  const githubAccessMode = parsedManifest?.ok && parsedManifest.manifest.version !== 1 && parsedManifest.manifest.githubAccess !== null ? parsedManifest.manifest.githubAccess : null;
268985
269074
  const localPrep = await context34.service.getSnapshot({ repo, selectedAgents });
268986
269075
  const signingPublicKeys = readSigningPublicKeys(localPrep);
268987
- const managedGithubAccess = isRecord19(localPrep) && isRecord19(localPrep["managedGithubAccess"]) ? localPrep["managedGithubAccess"] : null;
269076
+ const managedGithubAccess = isRecord20(localPrep) && isRecord20(localPrep["managedGithubAccess"]) ? localPrep["managedGithubAccess"] : null;
268988
269077
  const managedRepositories = managedGithubAccess?.["repositories"];
268989
269078
  const githubAccess = githubAccessMode ? {
268990
269079
  mode: githubAccessMode,
@@ -268993,7 +269082,7 @@ var init_status = __esm({
268993
269082
  let job = null;
268994
269083
  try {
268995
269084
  const progress = await fetchJobProgress({ context: context34, jobId: null, repo });
268996
- job = progress && isRecord19(progress["job"]) ? progress["job"] : null;
269085
+ job = progress && isRecord20(progress["job"]) ? progress["job"] : null;
268997
269086
  } catch {
268998
269087
  job = null;
268999
269088
  }
@@ -269003,8 +269092,8 @@ var init_status = __esm({
269003
269092
  const jobPhase = job && typeof job["phase"] === "string" ? job["phase"] : null;
269004
269093
  const jobStatus = job && typeof job["status"] === "string" ? job["status"] : null;
269005
269094
  const remotePreflight = validation["remotePreflight"];
269006
- const registryProject = isRecord19(remotePreflight) ? remotePreflight["project"] : null;
269007
- const registrySetupComplete = isRecord19(registryProject) && registryProject["initStatus"] === "complete" && (registryProject["projectFingerprint"] === repo.fingerprint || registryProject["projectFingerprint"] === null) || isRecord19(remotePreflight) && remotePreflight["jobPhase"] === "complete";
269095
+ const registryProject = isRecord20(remotePreflight) ? remotePreflight["project"] : null;
269096
+ const registrySetupComplete = isRecord20(registryProject) && registryProject["initStatus"] === "complete" && (registryProject["projectFingerprint"] === repo.fingerprint || registryProject["projectFingerprint"] === null) || isRecord20(remotePreflight) && remotePreflight["jobPhase"] === "complete";
269008
269097
  let phase;
269009
269098
  let nextAction;
269010
269099
  if (jobPhase === "complete" || job === null && registrySetupComplete) {
@@ -269040,7 +269129,7 @@ var init_status = __esm({
269040
269129
  phase = "ready_to_run";
269041
269130
  nextAction = "Check passed. Ask the user whether to upload the files and create the Template box on boxes.dev. Once they approve, run `dvb agent-init run`.";
269042
269131
  }
269043
- if (phase === "ready_to_run" && isRecord19(localPrep) && localPrep["phase"] === "packaging_bundle") {
269132
+ if (phase === "ready_to_run" && isRecord20(localPrep) && localPrep["phase"] === "packaging_bundle") {
269044
269133
  phase = "packaging_bundle";
269045
269134
  }
269046
269135
  return {
@@ -271048,18 +271137,18 @@ var init_dist11 = __esm({
271048
271137
  });
271049
271138
 
271050
271139
  // src/devbox/commands/init/codex/config.ts
271051
- var DEVBOX_PROXY_PROVIDER_ID, isRecord20, parseExistingConfig, normalizeTrustedPaths, normalizeRelayBaseUrl, ensureNoticeConfig, ensureTrustedProjects, ensureProxyProviderConfig, removeProxyProviderConfig, mergeCodexInitConfig;
271140
+ var DEVBOX_PROXY_PROVIDER_ID, isRecord21, parseExistingConfig, normalizeTrustedPaths, normalizeRelayBaseUrl, ensureNoticeConfig, ensureTrustedProjects, ensureProxyProviderConfig, removeProxyProviderConfig, mergeCodexInitConfig;
271052
271141
  var init_config2 = __esm({
271053
271142
  "src/devbox/commands/init/codex/config.ts"() {
271054
271143
  "use strict";
271055
271144
  init_dist11();
271056
271145
  DEVBOX_PROXY_PROVIDER_ID = "devbox-proxy";
271057
- isRecord20 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
271146
+ isRecord21 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
271058
271147
  parseExistingConfig = (content) => {
271059
271148
  if (!content) return {};
271060
271149
  try {
271061
271150
  const parsed = parse7(content);
271062
- return isRecord20(parsed) ? { ...parsed } : {};
271151
+ return isRecord21(parsed) ? { ...parsed } : {};
271063
271152
  } catch {
271064
271153
  return {};
271065
271154
  }
@@ -271069,14 +271158,14 @@ var init_config2 = __esm({
271069
271158
  ];
271070
271159
  normalizeRelayBaseUrl = (value) => value.trim().replace(/\/+$/, "");
271071
271160
  ensureNoticeConfig = (config5) => {
271072
- const notice = isRecord20(config5.notice) ? { ...config5.notice } : {};
271161
+ const notice = isRecord21(config5.notice) ? { ...config5.notice } : {};
271073
271162
  notice.hide_full_access_warning = true;
271074
271163
  config5.notice = notice;
271075
271164
  };
271076
271165
  ensureTrustedProjects = (config5, trustedPaths) => {
271077
- const projects = isRecord20(config5.projects) ? { ...config5.projects } : {};
271166
+ const projects = isRecord21(config5.projects) ? { ...config5.projects } : {};
271078
271167
  for (const trustedPath of normalizeTrustedPaths(trustedPaths)) {
271079
- const existingProject = isRecord20(projects[trustedPath]) ? { ...projects[trustedPath] } : {};
271168
+ const existingProject = isRecord21(projects[trustedPath]) ? { ...projects[trustedPath] } : {};
271080
271169
  existingProject.trust_level = "trusted";
271081
271170
  projects[trustedPath] = existingProject;
271082
271171
  }
@@ -271088,7 +271177,7 @@ var init_config2 = __esm({
271088
271177
  throw new Error("Relay base URL is required for Codex proxy mode.");
271089
271178
  }
271090
271179
  config5.model_provider = DEVBOX_PROXY_PROVIDER_ID;
271091
- const modelProviders = isRecord20(config5.model_providers) ? { ...config5.model_providers } : {};
271180
+ const modelProviders = isRecord21(config5.model_providers) ? { ...config5.model_providers } : {};
271092
271181
  modelProviders[DEVBOX_PROXY_PROVIDER_ID] = {
271093
271182
  name: "boxes.dev Proxy",
271094
271183
  base_url: `${normalizedBase}/v1`,
@@ -271101,7 +271190,7 @@ var init_config2 = __esm({
271101
271190
  if (config5.model_provider === DEVBOX_PROXY_PROVIDER_ID) {
271102
271191
  delete config5.model_provider;
271103
271192
  }
271104
- if (!isRecord20(config5.model_providers)) {
271193
+ if (!isRecord21(config5.model_providers)) {
271105
271194
  return;
271106
271195
  }
271107
271196
  const modelProviders = { ...config5.model_providers };
@@ -276080,7 +276169,7 @@ var init_artifacts = __esm({
276080
276169
  import path81 from "node:path";
276081
276170
  import { randomUUID as randomUUID31 } from "node:crypto";
276082
276171
  import fs64 from "node:fs/promises";
276083
- var CODEX_REQUEST_URL_REGEX2, CODEX_STREAM_DISCONNECT_DETAIL_REGEX, CODEX_SESSION_ID_REGEX, REMOTE_RELAY_FORBIDDEN_REGEX, REMOTE_RELAY_MISSING_OPENAI_CONFIG_REGEX, REMOTE_CODEX_AUTH_STRONG_SUBSTRINGS, REMOTE_CODEX_AUTH_AMBIGUOUS_SUBSTRINGS, REMOTE_CODEX_STALE_RESUME_SUBSTRINGS, CODEX_APPLY_ARTIFACT_GRACE_MS, CODEX_APPLY_FINAL_RECOVERY_GRACE_MS, CODEX_APPLY_ARTIFACT_POLL_INTERVAL_MS, CODEX_AUTH_PROBE_TIMEOUT_MS, CODEX_AUTH_PROBE_PROMPT, CODEX_AUTH_PROBE_REASONING_EFFORT, MANAGED_REMOTE_INIT_PROXY_SESSION_KEY, buildRemoteDatabaseDumpPromptPaths, extractRequestUrl2, extractStreamDisconnectDetail, extractCodexSessionId, stripAnsi3, splitNonEmptyOutputLines, summarizeCodexOutputDetail, summarizeCodexFailureDetail, isRelayForbidden2, isRelayMissingOpenAiProxyConfiguration2, isResponsesRequestUrl, lineLooksLikeRemoteCodexAuthFailure, isRemoteCodexAuthFailure, buildRemoteCodexAuthProbeScript, buildRemoteCodexAuthProbeUnexpectedFailureReason, classifyRemoteCodexAuthProbeOutput, probeRemoteCodexAuth, formatCodexRetryProgress2, ManagedCodexControlRequestError, ManagedCodexSetupStateError, isRemoteCodexStaleResumeFailure, classifyRemoteCodexSetupFailure, isLoopbackRelayUrl2, readLocalCodexAuthCache, readRemoteUtf8FileIfExists, trimRemoteTextValue, readRemoteSetupTodoSummary, readRemoteCodexLastMessage, resolveRemoteCodexCompletionMessage, readRemoteCodexCompletionArtifacts, waitForRemoteCodexCompletionArtifacts, hasRemoteExecSession, writeCanonicalSetupTodo, recoverRemoteCodexCompletionArtifacts, isRecord21, readNonEmptyString8, readFiniteNumber, readManagedCodexTurnInterruptOrigin, parseManagedCodexThreadState, waitForCanonicalRemoteSetupSummary, hasManagedCodexActiveTurn, classifyManagedCodexSetupTerminalState, buildManagedCodexSetupInterruptedMessage, throwIfManagedCodexSetupPausedByInterruption, buildManagedCodexSetupResumePrompt, normalizeStatusPreview, findLastNonEmptyString, extractManagedCodexProgressMessage, extractManagedCodexLastAssistantMessage, buildManagedCodexMissingCompletionDetail, classifyManagedCodexSetupError, runManagedCodexControlRequest, prepareManagedRemoteCodexProxySession, runManagedDaemonRemoteCodexSetup, syncLocalCodexAuthCacheToSprite, syncRemoteCodexAuthToManagedLocalCache, defaultRemoteCodexLoginDeps, defaultRemoteCodexHandoffAuthDeps, ensureRemoteCodexLoginForManagedSetup, ensureRemoteCodexAuthForInitHandoff, uploadSetupPlan, runRemoteCodexSetup;
276172
+ var CODEX_REQUEST_URL_REGEX2, CODEX_STREAM_DISCONNECT_DETAIL_REGEX, CODEX_SESSION_ID_REGEX, REMOTE_RELAY_FORBIDDEN_REGEX, REMOTE_RELAY_MISSING_OPENAI_CONFIG_REGEX, REMOTE_CODEX_AUTH_STRONG_SUBSTRINGS, REMOTE_CODEX_AUTH_AMBIGUOUS_SUBSTRINGS, REMOTE_CODEX_STALE_RESUME_SUBSTRINGS, CODEX_APPLY_ARTIFACT_GRACE_MS, CODEX_APPLY_FINAL_RECOVERY_GRACE_MS, CODEX_APPLY_ARTIFACT_POLL_INTERVAL_MS, CODEX_AUTH_PROBE_TIMEOUT_MS, CODEX_AUTH_PROBE_PROMPT, CODEX_AUTH_PROBE_REASONING_EFFORT, MANAGED_REMOTE_INIT_PROXY_SESSION_KEY, buildRemoteDatabaseDumpPromptPaths, extractRequestUrl2, extractStreamDisconnectDetail, extractCodexSessionId, stripAnsi3, splitNonEmptyOutputLines, summarizeCodexOutputDetail, summarizeCodexFailureDetail, isRelayForbidden2, isRelayMissingOpenAiProxyConfiguration2, isResponsesRequestUrl, lineLooksLikeRemoteCodexAuthFailure, isRemoteCodexAuthFailure, buildRemoteCodexAuthProbeScript, buildRemoteCodexAuthProbeUnexpectedFailureReason, classifyRemoteCodexAuthProbeOutput, probeRemoteCodexAuth, formatCodexRetryProgress2, ManagedCodexControlRequestError, ManagedCodexSetupStateError, isRemoteCodexStaleResumeFailure, classifyRemoteCodexSetupFailure, isLoopbackRelayUrl2, readLocalCodexAuthCache, readRemoteUtf8FileIfExists, trimRemoteTextValue, readRemoteSetupTodoSummary, readRemoteCodexLastMessage, resolveRemoteCodexCompletionMessage, readRemoteCodexCompletionArtifacts, waitForRemoteCodexCompletionArtifacts, hasRemoteExecSession, writeCanonicalSetupTodo, recoverRemoteCodexCompletionArtifacts, isRecord22, readNonEmptyString8, readFiniteNumber, readManagedCodexTurnInterruptOrigin, parseManagedCodexThreadState, waitForCanonicalRemoteSetupSummary, hasManagedCodexActiveTurn, classifyManagedCodexSetupTerminalState, buildManagedCodexSetupInterruptedMessage, throwIfManagedCodexSetupPausedByInterruption, buildManagedCodexSetupResumePrompt, normalizeStatusPreview, findLastNonEmptyString, extractManagedCodexProgressMessage, extractManagedCodexLastAssistantMessage, buildManagedCodexMissingCompletionDetail, classifyManagedCodexSetupError, runManagedCodexControlRequest, prepareManagedRemoteCodexProxySession, runManagedDaemonRemoteCodexSetup, syncLocalCodexAuthCacheToSprite, syncRemoteCodexAuthToManagedLocalCache, defaultRemoteCodexLoginDeps, defaultRemoteCodexHandoffAuthDeps, ensureRemoteCodexLoginForManagedSetup, ensureRemoteCodexAuthForInitHandoff, uploadSetupPlan, runRemoteCodexSetup;
276084
276173
  var init_codex2 = __esm({
276085
276174
  "src/devbox/commands/init/codex/index.ts"() {
276086
276175
  "use strict";
@@ -276692,16 +276781,16 @@ ${execResult.stderr}`;
276692
276781
  });
276693
276782
  return artifacts.completionMessage;
276694
276783
  };
276695
- isRecord21 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
276784
+ isRecord22 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
276696
276785
  readNonEmptyString8 = (value) => typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
276697
276786
  readFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
276698
276787
  readManagedCodexTurnInterruptOrigin = (value) => value === "user_stop" || value === "queued_follow_up_send_now" || value === "system_runtime_recovery" || value === "unknown" ? value : null;
276699
276788
  parseManagedCodexThreadState = (response, requestType) => {
276700
- const payload = isRecord21(response.result) ? response.result : null;
276701
- const threadRecord = payload && isRecord21(payload.thread) ? payload.thread : null;
276789
+ const payload = isRecord22(response.result) ? response.result : null;
276790
+ const threadRecord = payload && isRecord22(payload.thread) ? payload.thread : null;
276702
276791
  const threadId2 = readNonEmptyString8(threadRecord?.id);
276703
276792
  const updatedAt = readFiniteNumber(threadRecord?.updatedAt);
276704
- const statusRecord = threadRecord && isRecord21(threadRecord.status) ? threadRecord.status : null;
276793
+ const statusRecord = threadRecord && isRecord22(threadRecord.status) ? threadRecord.status : null;
276705
276794
  const statusType = statusRecord?.type;
276706
276795
  const activeFlags = statusRecord?.type === "active" && Array.isArray(statusRecord.activeFlags) ? statusRecord.activeFlags.filter(
276707
276796
  (flag2) => flag2 === "waitingOnApproval" || flag2 === "waitingOnUserInput"
@@ -276709,7 +276798,7 @@ ${execResult.stderr}`;
276709
276798
  const rawTurns = Array.isArray(threadRecord?.turns) ? threadRecord.turns : [];
276710
276799
  const turns = [];
276711
276800
  for (const value of rawTurns) {
276712
- if (!isRecord21(value)) {
276801
+ if (!isRecord22(value)) {
276713
276802
  throw new Error(
276714
276803
  `Managed Codex ${requestType} returned an invalid turn payload.`
276715
276804
  );
@@ -276724,7 +276813,7 @@ ${execResult.stderr}`;
276724
276813
  }
276725
276814
  const items = [];
276726
276815
  for (const itemValue of rawItems) {
276727
- if (!isRecord21(itemValue)) {
276816
+ if (!isRecord22(itemValue)) {
276728
276817
  throw new Error(
276729
276818
  `Managed Codex ${requestType} returned an invalid thread item payload.`
276730
276819
  );
@@ -290647,7 +290736,7 @@ var init_provider = __esm({
290647
290736
  });
290648
290737
 
290649
290738
  // src/devbox/commands/init/claudeAuthProbe.ts
290650
- var REMOTE_MANAGED_CLAUDE_PATH, CLAUDE_AUTH_PROBE_TIMEOUT_MS, CLAUDE_AUTH_PROBE_PROMPT, isRecord22, normalizeWhitespace, readAssistantMessageText, buildClaudeRemoteProbeUnexpectedFailureReason, classifyClaudeRemoteAuthProbeOutput, buildClaudeRemoteAuthProbeScript, buildWriteManagedClaudeTokenToRemoteScript, runRemoteBash, probeRemoteClaudeAuth, writeManagedClaudeTokenToRemoteCache;
290739
+ var REMOTE_MANAGED_CLAUDE_PATH, CLAUDE_AUTH_PROBE_TIMEOUT_MS, CLAUDE_AUTH_PROBE_PROMPT, isRecord23, normalizeWhitespace, readAssistantMessageText, buildClaudeRemoteProbeUnexpectedFailureReason, classifyClaudeRemoteAuthProbeOutput, buildClaudeRemoteAuthProbeScript, buildWriteManagedClaudeTokenToRemoteScript, runRemoteBash, probeRemoteClaudeAuth, writeManagedClaudeTokenToRemoteCache;
290651
290740
  var init_claudeAuthProbe = __esm({
290652
290741
  "src/devbox/commands/init/claudeAuthProbe.ts"() {
290653
290742
  "use strict";
@@ -290655,13 +290744,13 @@ var init_claudeAuthProbe = __esm({
290655
290744
  REMOTE_MANAGED_CLAUDE_PATH = "/usr/local/bin/claude";
290656
290745
  CLAUDE_AUTH_PROBE_TIMEOUT_MS = 45e3;
290657
290746
  CLAUDE_AUTH_PROBE_PROMPT = "Reply with exactly OK";
290658
- isRecord22 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
290747
+ isRecord23 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
290659
290748
  normalizeWhitespace = (value) => value.trim().replace(/\s+/g, " ");
290660
290749
  readAssistantMessageText = (frame) => {
290661
- const message = isRecord22(frame.message) ? frame.message : null;
290750
+ const message = isRecord23(frame.message) ? frame.message : null;
290662
290751
  const content = Array.isArray(message?.content) ? message.content : [];
290663
290752
  const text = content.map((entry) => {
290664
- if (!isRecord22(entry) || entry.type !== "text") {
290753
+ if (!isRecord23(entry) || entry.type !== "text") {
290665
290754
  return null;
290666
290755
  }
290667
290756
  return typeof entry.text === "string" ? entry.text.trim() : null;
@@ -290695,7 +290784,7 @@ var init_claudeAuthProbe = __esm({
290695
290784
  } catch {
290696
290785
  continue;
290697
290786
  }
290698
- if (!isRecord22(parsed)) {
290787
+ if (!isRecord23(parsed)) {
290699
290788
  continue;
290700
290789
  }
290701
290790
  if (parsed.type === "assistant") {
@@ -302735,4 +302824,4 @@ react/cjs/react-jsx-runtime.development.js:
302735
302824
  *)
302736
302825
  */
302737
302826
 
302738
- //# debugId=effd54fe-a3cb-5529-82cd-e610421b5b0b
302827
+ //# debugId=b7c70032-72a2-5070-828d-432609d39865
package/dist/bin/dvbd.mjs CHANGED
@@ -64833,9 +64833,9 @@ var init_sentry = __esm({
64833
64833
  uncaughtExceptionMonitorInstalled = false;
64834
64834
  currentDevboxSentryUser = null;
64835
64835
  readBuildMetadata = () => {
64836
- const rawPackageVersion = "1.0.1133";
64837
- const rawGitSha = "4b086f3dbe8b031b5baa1b3d2cfd087a42789d98";
64838
- const rawSentryRelease = "boxes-dev-dvb@1.0.1133+4b086f3dbe8b031b5baa1b3d2cfd087a42789d98";
64836
+ const rawPackageVersion = "1.0.1134";
64837
+ const rawGitSha = "b62bb54599236f8680321c312e4b6ad6a41ba8ea";
64838
+ const rawSentryRelease = "boxes-dev-dvb@1.0.1134+b62bb54599236f8680321c312e4b6ad6a41ba8ea";
64839
64839
  const packageVersion = typeof rawPackageVersion === "string" ? rawPackageVersion : void 0;
64840
64840
  const gitSha = typeof rawGitSha === "string" ? rawGitSha : void 0;
64841
64841
  const sentryRelease = typeof rawSentryRelease === "string" ? rawSentryRelease : void 0;
@@ -67387,7 +67387,7 @@ var init_packageVersion = __esm({
67387
67387
  return path8.join(process.cwd(), "dvb");
67388
67388
  };
67389
67389
  readEmbeddedPackageVersion = () => {
67390
- const raw = "1.0.1133";
67390
+ const raw = "1.0.1134";
67391
67391
  return trimVersion(raw);
67392
67392
  };
67393
67393
  readNearestPackageMetadata = (basePath) => {
@@ -489,6 +489,11 @@ archive available.
489
489
  If the devbox has a child draft with unsent text, boxes.dev blocks destruction
490
490
  until that draft is opened and discarded.
491
491
 
492
+ Destroy also waits for queued work: a thread on the devbox that is still
493
+ starting, an automation run that is starting, or a Slack follow-up that hasn't
494
+ reached the agent yet. The app says "This devbox has queued work"; try again
495
+ after it finishes.
496
+
492
497
  ## Devboxes From Automations And Integrations
493
498
 
494
499
  Automations, Slack, and Linear runs also create work on devboxes. Treat those
@@ -1178,8 +1178,9 @@ account.
1178
1178
  **Computer access** in the team's settings. Threads started by automations
1179
1179
  and the project coordinator can't use computer access.
1180
1180
  - **Approving.** While the user is in the desktop app, a request appears as a
1181
- card in the top-right corner of its window, styled like a thread's
1182
- permission card: the command or path, the agent's reason, **Deny**,
1181
+ card just above the message box of the thread on screen, as wide as it (in
1182
+ the window's top-right corner when no thread is open), styled like a
1183
+ thread's permission card: the command or path, the agent's reason, **Deny**,
1183
1184
  **Allow** (this request only), and **Allow for 3 hours**. Allow for 3 hours runs the
1184
1185
  request and sets only the source devbox to run without asking for 3 hours;
1185
1186
  the dropdown shows it as **Allow all until** its end time. **Details** shows
@@ -1187,7 +1188,9 @@ account.
1187
1188
  for this devbox** and **Always allow this devbox…**. Nothing on the card
1188
1189
  changes the project's setting. When the user is in another app, they get a
1189
1190
  notification and a Dock bounce, and the card appears when they switch to
1190
- boxes.dev. The thread also shows the waiting request with **Deny**.
1191
+ boxes.dev. On the user's other devices (phone, browser, another computer)
1192
+ the thread shows the waiting request with **Deny**; on the Mac it went to,
1193
+ only the card shows it.
1191
1194
  - **Always allow.** A project or devbox set to **Always allow** runs commands
1192
1195
  and copies without asking, including while the Mac is locked, after the
1193
1196
  user confirms it once on that computer. Settings lists them with
@@ -57,12 +57,11 @@ which has three steps:
57
57
  only available for Mac and Linux and links to the mobile app instead.
58
58
 
59
59
  When the user's team has a Team Template with a saved version, a computer
60
- browser shows **Start from a Team Template** above these steps. It names the
61
- template when there is only one, explains that the project is created from it
62
- in the desktop app, and offers the desktop app download; Windows browsers see
63
- that the desktop app is only available for Mac and Linux. The three steps
64
- follow under **Or set up a different project with your coding agent**. The
65
- website itself does not create Team Template projects.
60
+ browser shows **Start from a Team Template** above these steps, naming the
61
+ template when there is only one. Its **Choose template** button opens the
62
+ website's Team Template setup page, which creates the project in the browser
63
+ (see `team-template.md`). The three steps follow under **Or set up a different
64
+ project with your coding agent**.
66
65
 
67
66
  On a phone, the second step becomes **Continue on your computer**, with
68
67
  actions to email, copy, or share a link to the page, and the desktop step is
@@ -196,6 +195,16 @@ untracked files, Git access, agent config, and so on) — and reviews it with
196
195
  the user. The manifest lives outside the repo, so setup leaves no changes in
197
196
  the project folder, and the user can read or edit it directly at any time.
198
197
 
198
+ When the user's team has a Team Template that includes the project's GitHub
199
+ repositories, `dvb agent-init start` reports it. The agent then asks the user,
200
+ before investigating, whether they'd rather create the project from that Team
201
+ Template. The report names the Team Template's creator for the user to ask if
202
+ they're unsure. If the user chooses the Team Template, the agent gives them the
203
+ printed link to the website's Team Template setup page and stops agent-init.
204
+ Only Team Templates that can start a project now are reported: active, with a
205
+ saved version that includes one of the repositories, and accepting new
206
+ projects.
207
+
199
208
  The agent should recommend the smallest box size that fits one coding agent,
200
209
  one running instance of the app, and its required services. A marketing site
201
210
  or modest app is a candidate for 4 vCPU / 8 GB; a larger recommendation should
@@ -1238,8 +1247,7 @@ support.
1238
1247
  To upload another local project, use **New project...** in the titlebar project
1239
1248
  selector or **File > New Project...** in the desktop app. On the website,
1240
1249
  **New project** offers the coding-agent prompt and **Create from GitHub**,
1241
- below a Team Template option that points to the desktop app when the team has
1242
- one. For
1250
+ below **Start from a Team Template** when the team has one. For
1243
1251
  a repository that is not on the user's computer, **Create from GitHub** clones
1244
1252
  another GitHub-backed independent project instead, with the same manual
1245
1253
  environment setup afterwards. Each independent project made through
@@ -365,6 +365,11 @@ If the linked devbox is sleeping, boxes.dev may queue the follow-up while the
365
365
  box wakes. If capacity is full, Slack replies with guidance when follow-up
366
366
  confirmations are enabled.
367
367
 
368
+ If the linked thread is archived, for example because its devbox was
369
+ destroyed, Slack replies that the follow-up wasn't queued. Restore the thread
370
+ in boxes.dev, then mention `@boxes.dev` again. After a restore, follow-ups go
371
+ to the thread's new devbox.
372
+
368
373
  ## Slack Files
369
374
 
370
375
  Slack-hosted attachments can be imported for Slack-triggered requests when
@@ -134,8 +134,12 @@ Team members do not see the management submenu. To create a project from a
134
134
  saved template, choose **New project...**, then **Start from a Team Template**.
135
135
  When the team has a saved template, the desktop app's setup choices list that
136
136
  option first, including during first-run setup. The website's **Get started**
137
- and **New project** pages also list it first and point members to the desktop
138
- app to create the project.
137
+ and **New project** pages also list it first. Their **Choose template** button
138
+ opens the same setup in the browser at `/app/create/team-template`; add
139
+ `?template=<id>` to open one template directly. When the project is ready,
140
+ **Open project** on the website opens it in the desktop app, or in the mobile
141
+ app on a phone, and offers the download. If the form needs a GitHub
142
+ connection, **Connect GitHub** signs in to GitHub and returns to the form.
139
143
 
140
144
  Admins create a Team Template from this collection with **New Team
141
145
  Template**, which offers two starting points.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxes-dev/dvb-runtime",
3
- "version": "1.0.1133",
3
+ "version": "1.0.1134",
4
4
  "description": "Runtime for the boxes.dev CLI. Install @boxes-dev/dvb to use the CLI.",
5
5
  "homepage": "https://boxes.dev",
6
6
  "type": "module",
@@ -77,5 +77,5 @@
77
77
  "e2b": "^2.18.0",
78
78
  "ink-testing-library": "^4.0.0"
79
79
  },
80
- "devboxReleasedAt": "2026-11-17T04:30:38Z"
80
+ "devboxReleasedAt": "2026-11-17T21:20:11Z"
81
81
  }