@adhdev/daemon-core 0.9.82-rc.457 → 0.9.82-rc.458
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/index.d.ts +1 -1
- package/dist/index.js +126 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -22
- package/dist/index.mjs.map +1 -1
- package/dist/logging/debug-config.d.ts +16 -0
- package/dist/mesh/worktree-bootstrap-config.d.ts +45 -0
- package/package.json +3 -3
- package/src/index.ts +2 -0
- package/src/logging/debug-config.ts +25 -0
- package/src/logging/debug-trace.ts +7 -2
- package/src/mesh/coordinator-prompt.ts +1 -1
- package/src/mesh/mesh-fast-forward.ts +22 -9
- package/src/mesh/mesh-refine-gates.ts +22 -9
- package/src/mesh/worktree-bootstrap-config.ts +130 -0
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ export type { ManagedStatus } from './status/normalize.js';
|
|
|
106
106
|
export type { StatusSnapshotOptions, StatusSnapshot } from './status/snapshot.js';
|
|
107
107
|
export { LOG, installGlobalInterceptor, setLogLevel, getLogLevel, getRecentLogs, getDaemonLogDir, getCurrentDaemonLogPath, } from './logging/logger.js';
|
|
108
108
|
export type { ScopedLogger, LogLevel, LogEntry } from './logging/logger.js';
|
|
109
|
-
export { resolveDebugRuntimeConfig, setDebugRuntimeConfig, getDebugRuntimeConfig, resetDebugRuntimeConfig, shouldCollectTraceCategory, } from './logging/debug-config.js';
|
|
109
|
+
export { resolveDebugRuntimeConfig, setDebugRuntimeConfig, getDebugRuntimeConfig, resetDebugRuntimeConfig, shouldCollectTraceCategory, isAlwaysOnTraceCategory, ALWAYS_ON_TRACE_CATEGORIES, } from './logging/debug-config.js';
|
|
110
110
|
export type { DebugRuntimeOptions, DebugRuntimeConfig } from './logging/debug-config.js';
|
|
111
111
|
export { createDebugTraceStore, configureDebugTraceStore, recordDebugTrace, getRecentDebugTrace, clearDebugTrace, createInteractionId, } from './logging/debug-trace.js';
|
|
112
112
|
export type { DebugTraceEvent, DebugTraceEntry, DebugTraceQuery, DebugTraceStore, DebugTraceLevel } from './logging/debug-trace.js';
|
package/dist/index.js
CHANGED
|
@@ -409,10 +409,10 @@ function readInjected(value) {
|
|
|
409
409
|
}
|
|
410
410
|
function getDaemonBuildInfo() {
|
|
411
411
|
if (cached) return cached;
|
|
412
|
-
const commit = readInjected(true ? "
|
|
413
|
-
const commitShort = readInjected(true ? "
|
|
414
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
415
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
412
|
+
const commit = readInjected(true ? "690e14cc1bdb099a0c52d7fffef41329cc5b15b5" : void 0) ?? "unknown";
|
|
413
|
+
const commitShort = readInjected(true ? "690e14cc" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
414
|
+
const version = readInjected(true ? "0.9.82-rc.458" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
415
|
+
const builtAt = readInjected(true ? "2026-07-04T09:53:14.279Z" : void 0);
|
|
416
416
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
417
417
|
return cached;
|
|
418
418
|
}
|
|
@@ -3704,7 +3704,7 @@ function buildRulesSection(coordinatorCliType) {
|
|
|
3704
3704
|
- **Verify via git, not source.** Use \`mesh_git_status\` to confirm side effects. Treat agent summaries as self-reports, not verification.
|
|
3705
3705
|
- **Limit parallelism.** Start with 1\u20132 tasks; scale only on success. Never duplicate a session because \`mesh_read_chat\` shows no final message while tool/terminal activity is ongoing. This caps *concurrent* load \u2014 it does not mean serialize independent work: when a new, independent request arrives and there is headroom under \`maxParallelTasks\`, dispatch it right away rather than waiting for an in-flight task or a user nudge (read-only diagnosis especially, since it has no merge cost).
|
|
3706
3706
|
- **Check history first.** Call \`mesh_task_history\` at session start to avoid duplicate work and inform recovery. On failure, read task history before retrying.
|
|
3707
|
-
- **Sequence shared-base-moving merges.** Parallel dispatch is encouraged, but merging one worktree can advance another in-flight worktree's base \u2014 especially
|
|
3707
|
+
- **Sequence shared-base-moving merges.** Parallel dispatch is encouraged, but merging one worktree can advance another in-flight worktree's base \u2014 especially a shared submodule pointer \u2014 turning a clean fast-forward into a diverged rebase (patch-equivalence correctly blocks this). Before merging an in-flight worktree while siblings are also in flight, land in an intentional order, re-clone long-running worktrees from the advanced base, or expect to manually rebase + ff-only the laggards; merging an independent fix mid-flight can strand siblings into a rebase.
|
|
3708
3708
|
- **Converge branches.** After worktree tasks: refine/fast-forward, or classify as \`pushed_feature_branch_needs_merge\` / \`blocked_review\` / \`cleanup_candidate\` / \`not_mergeable\`. Clean up with \`mesh_remove_node\`.
|
|
3709
3709
|
- **Refinery is config-driven.** \`mesh_refine_node\` must run validation from \`.adhdev/refine.{json,yaml,yml}\` or \`repo-mesh.refine.*\`. Heuristics are scaffolding only.
|
|
3710
3710
|
- **Submodule reachability = publish-needed.** \`submodule_reachability_failed\` \u2192 classify as \`blocked_review\`, request user approval to push to submodule main, then rerun \`mesh_refine_node\`.
|
|
@@ -8931,12 +8931,15 @@ var worktree_bootstrap_config_exports = {};
|
|
|
8931
8931
|
__export(worktree_bootstrap_config_exports, {
|
|
8932
8932
|
MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS: () => MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS,
|
|
8933
8933
|
MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA: () => MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA,
|
|
8934
|
+
SUBMODULE_DEFAULT_BRANCH_FALLBACK: () => SUBMODULE_DEFAULT_BRANCH_FALLBACK,
|
|
8934
8935
|
WORKTREE_BOOTSTRAP_STALE_RUNNING_MS: () => WORKTREE_BOOTSTRAP_STALE_RUNNING_MS,
|
|
8935
8936
|
computeStaleInputsDigest: () => computeStaleInputsDigest,
|
|
8936
8937
|
evaluateWorktreeBootstrapState: () => evaluateWorktreeBootstrapState,
|
|
8937
8938
|
getRegisteredSubmodulePaths: () => getRegisteredSubmodulePaths,
|
|
8939
|
+
getSubmoduleConfiguredBranches: () => getSubmoduleConfiguredBranches,
|
|
8938
8940
|
isWorktreeBootstrapStaleRunning: () => isWorktreeBootstrapStaleRunning,
|
|
8939
8941
|
loadMeshWorktreeBootstrapConfig: () => loadMeshWorktreeBootstrapConfig,
|
|
8942
|
+
resolveSubmoduleDefaultBranch: () => resolveSubmoduleDefaultBranch,
|
|
8940
8943
|
runMeshWorktreeBootstrap: () => runMeshWorktreeBootstrap,
|
|
8941
8944
|
shouldDeferDispatchForBootstrap: () => shouldDeferDispatchForBootstrap,
|
|
8942
8945
|
validateMeshWorktreeBootstrapConfig: () => validateMeshWorktreeBootstrapConfig
|
|
@@ -8961,6 +8964,81 @@ function getRegisteredSubmodulePaths(workspace) {
|
|
|
8961
8964
|
}
|
|
8962
8965
|
return paths;
|
|
8963
8966
|
}
|
|
8967
|
+
function getSubmoduleConfiguredBranches(workspace) {
|
|
8968
|
+
const branchesByPath = /* @__PURE__ */ new Map();
|
|
8969
|
+
try {
|
|
8970
|
+
const out = (0, import_node_child_process3.execFileSync)(
|
|
8971
|
+
resolveWin32Executable("git"),
|
|
8972
|
+
["config", "--file", ".gitmodules", "--list"],
|
|
8973
|
+
{ cwd: workspace, encoding: "utf8", timeout: 1e4, windowsHide: true }
|
|
8974
|
+
);
|
|
8975
|
+
const pathByName = /* @__PURE__ */ new Map();
|
|
8976
|
+
const branchByName = /* @__PURE__ */ new Map();
|
|
8977
|
+
for (const line of String(out).split(/\r?\n/)) {
|
|
8978
|
+
const trimmed = line.trim();
|
|
8979
|
+
if (!trimmed) continue;
|
|
8980
|
+
const eq = trimmed.indexOf("=");
|
|
8981
|
+
if (eq < 0) continue;
|
|
8982
|
+
const key2 = trimmed.slice(0, eq);
|
|
8983
|
+
const value = trimmed.slice(eq + 1).trim();
|
|
8984
|
+
const match = /^submodule\.(.+)\.(path|branch)$/.exec(key2);
|
|
8985
|
+
if (!match) continue;
|
|
8986
|
+
const name = match[1];
|
|
8987
|
+
if (match[2] === "path") {
|
|
8988
|
+
const norm = value.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
8989
|
+
if (norm) pathByName.set(name, norm);
|
|
8990
|
+
} else if (value) {
|
|
8991
|
+
branchByName.set(name, value);
|
|
8992
|
+
}
|
|
8993
|
+
}
|
|
8994
|
+
for (const [name, submodulePath] of pathByName) {
|
|
8995
|
+
const branch = branchByName.get(name);
|
|
8996
|
+
if (branch && branch !== ".") branchesByPath.set(submodulePath, branch);
|
|
8997
|
+
}
|
|
8998
|
+
} catch {
|
|
8999
|
+
}
|
|
9000
|
+
return branchesByPath;
|
|
9001
|
+
}
|
|
9002
|
+
function isPlausibleBranchName(name) {
|
|
9003
|
+
return typeof name === "string" && name.length > 0 && !/\s/.test(name) && name !== "HEAD";
|
|
9004
|
+
}
|
|
9005
|
+
async function resolveSubmoduleDefaultBranch(opts) {
|
|
9006
|
+
const remote = opts.remote?.trim() || "origin";
|
|
9007
|
+
const localTimeout = opts.timeoutMs ?? 1e4;
|
|
9008
|
+
const git = resolveWin32Executable("git");
|
|
9009
|
+
const execFileAsync4 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);
|
|
9010
|
+
if (opts.superprojectWorkspace && opts.submodulePath) {
|
|
9011
|
+
try {
|
|
9012
|
+
const normalized = opts.submodulePath.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
9013
|
+
const configured = getSubmoduleConfiguredBranches(opts.superprojectWorkspace).get(normalized);
|
|
9014
|
+
if (isPlausibleBranchName(configured)) return configured;
|
|
9015
|
+
} catch {
|
|
9016
|
+
}
|
|
9017
|
+
}
|
|
9018
|
+
try {
|
|
9019
|
+
const { stdout } = await execFileAsync4(
|
|
9020
|
+
git,
|
|
9021
|
+
["symbolic-ref", "--short", `refs/remotes/${remote}/HEAD`],
|
|
9022
|
+
{ cwd: opts.submoduleRepoPath, encoding: "utf8", timeout: localTimeout, windowsHide: true }
|
|
9023
|
+
);
|
|
9024
|
+
const short = String(stdout || "").trim();
|
|
9025
|
+
const prefix = `${remote}/`;
|
|
9026
|
+
const branch = short.startsWith(prefix) ? short.slice(prefix.length) : short;
|
|
9027
|
+
if (isPlausibleBranchName(branch)) return branch;
|
|
9028
|
+
} catch {
|
|
9029
|
+
}
|
|
9030
|
+
try {
|
|
9031
|
+
const { stdout } = await execFileAsync4(
|
|
9032
|
+
git,
|
|
9033
|
+
["ls-remote", "--symref", remote, "HEAD"],
|
|
9034
|
+
{ cwd: opts.submoduleRepoPath, encoding: "utf8", timeout: Math.max(localTimeout, 3e4), windowsHide: true }
|
|
9035
|
+
);
|
|
9036
|
+
const match = /^ref:\s+refs\/heads\/(\S+)\s+HEAD/m.exec(String(stdout || ""));
|
|
9037
|
+
if (match && isPlausibleBranchName(match[1])) return match[1];
|
|
9038
|
+
} catch {
|
|
9039
|
+
}
|
|
9040
|
+
return SUBMODULE_DEFAULT_BRANCH_FALLBACK;
|
|
9041
|
+
}
|
|
8964
9042
|
function isCleanIgnoringSubmoduleGitlinks(porcelain, submodulePaths) {
|
|
8965
9043
|
const lines = porcelain.split(/\r?\n/).filter((line) => line.length > 0);
|
|
8966
9044
|
for (const line of lines) {
|
|
@@ -9203,7 +9281,7 @@ async function runMeshWorktreeBootstrap(mesh, workspace) {
|
|
|
9203
9281
|
}
|
|
9204
9282
|
return state;
|
|
9205
9283
|
}
|
|
9206
|
-
var import_fs9, import_path8, import_node_child_process3, import_node_crypto2, import_node_util3, yaml3, WORKTREE_BOOTSTRAP_STALE_RUNNING_MS, MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS, MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA, DEFAULT_TIMEOUT_MS2, DEFAULT_OUTPUT_LIMIT_BYTES, OUTPUT_SUMMARY_CHARS;
|
|
9284
|
+
var import_fs9, import_path8, import_node_child_process3, import_node_crypto2, import_node_util3, yaml3, WORKTREE_BOOTSTRAP_STALE_RUNNING_MS, SUBMODULE_DEFAULT_BRANCH_FALLBACK, MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS, MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA, DEFAULT_TIMEOUT_MS2, DEFAULT_OUTPUT_LIMIT_BYTES, OUTPUT_SUMMARY_CHARS;
|
|
9207
9285
|
var init_worktree_bootstrap_config = __esm({
|
|
9208
9286
|
"src/mesh/worktree-bootstrap-config.ts"() {
|
|
9209
9287
|
"use strict";
|
|
@@ -9216,6 +9294,7 @@ var init_worktree_bootstrap_config = __esm({
|
|
|
9216
9294
|
init_resolve_executable();
|
|
9217
9295
|
init_refine_config();
|
|
9218
9296
|
WORKTREE_BOOTSTRAP_STALE_RUNNING_MS = 10 * 60 * 1e3;
|
|
9297
|
+
SUBMODULE_DEFAULT_BRANCH_FALLBACK = "main";
|
|
9219
9298
|
MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS = [
|
|
9220
9299
|
".adhdev/worktree_bootstrap.json",
|
|
9221
9300
|
".adhdev/worktree_bootstrap.yaml",
|
|
@@ -9832,15 +9911,24 @@ async function resolveSubmodulePushes(status, options, execute, timeoutMs) {
|
|
|
9832
9911
|
results.push({ ...base, code: "submodule_status_incomplete" });
|
|
9833
9912
|
continue;
|
|
9834
9913
|
}
|
|
9914
|
+
const remoteBranch = await resolveSubmoduleDefaultBranch({
|
|
9915
|
+
submoduleRepoPath: repoPath,
|
|
9916
|
+
superprojectWorkspace: status.repoRoot ?? status.workspace,
|
|
9917
|
+
submodulePath: submodule.path,
|
|
9918
|
+
timeoutMs
|
|
9919
|
+
});
|
|
9920
|
+
base.remoteBranch = remoteBranch;
|
|
9921
|
+
const remoteRef = `refs/remotes/origin/${remoteBranch}`;
|
|
9922
|
+
const fetchRefspec = `refs/heads/${remoteBranch}:${remoteRef}`;
|
|
9835
9923
|
try {
|
|
9836
|
-
await runGit(repoPath, ["-c", "protocol.file.allow=always", "fetch", "origin",
|
|
9924
|
+
await runGit(repoPath, ["-c", "protocol.file.allow=always", "fetch", "origin", fetchRefspec], { timeoutMs: timeoutMs ?? 3e4 });
|
|
9837
9925
|
} catch (error) {
|
|
9838
9926
|
results.push({ ...base, code: "submodule_fetch_failed", error: formatGitError2(error) });
|
|
9839
9927
|
continue;
|
|
9840
9928
|
}
|
|
9841
9929
|
let alreadyReachable = false;
|
|
9842
9930
|
try {
|
|
9843
|
-
await runGit(repoPath, ["merge-base", "--is-ancestor", submodule.commit,
|
|
9931
|
+
await runGit(repoPath, ["merge-base", "--is-ancestor", submodule.commit, remoteRef], { timeoutMs: timeoutMs ?? 15e3 });
|
|
9844
9932
|
alreadyReachable = true;
|
|
9845
9933
|
} catch {
|
|
9846
9934
|
}
|
|
@@ -9849,20 +9937,20 @@ async function resolveSubmodulePushes(status, options, execute, timeoutMs) {
|
|
|
9849
9937
|
continue;
|
|
9850
9938
|
}
|
|
9851
9939
|
try {
|
|
9852
|
-
await runGit(repoPath, ["merge-base", "--is-ancestor",
|
|
9940
|
+
await runGit(repoPath, ["merge-base", "--is-ancestor", remoteRef, submodule.commit], { timeoutMs: timeoutMs ?? 15e3 });
|
|
9853
9941
|
} catch (error) {
|
|
9854
9942
|
results.push({ ...base, pushed: false, skipped: false, code: "submodule_non_fast_forward", error: formatGitError2(error) });
|
|
9855
9943
|
continue;
|
|
9856
9944
|
}
|
|
9857
|
-
const refspec = `${submodule.commit}:refs/heads
|
|
9945
|
+
const refspec = `${submodule.commit}:refs/heads/${remoteBranch}`;
|
|
9858
9946
|
if (!execute) {
|
|
9859
9947
|
results.push({ ...base, pushed: false, skipped: false, code: "submodule_push_available", refspec });
|
|
9860
9948
|
continue;
|
|
9861
9949
|
}
|
|
9862
9950
|
try {
|
|
9863
9951
|
await runGit(repoPath, ["push", "origin", refspec], { timeoutMs: timeoutMs ?? 3e4 });
|
|
9864
|
-
await runGit(repoPath, ["-c", "protocol.file.allow=always", "fetch", "origin",
|
|
9865
|
-
await runGit(repoPath, ["merge-base", "--is-ancestor", submodule.commit,
|
|
9952
|
+
await runGit(repoPath, ["-c", "protocol.file.allow=always", "fetch", "origin", fetchRefspec], { timeoutMs: timeoutMs ?? 3e4 });
|
|
9953
|
+
await runGit(repoPath, ["merge-base", "--is-ancestor", submodule.commit, remoteRef], { timeoutMs: timeoutMs ?? 15e3 });
|
|
9866
9954
|
results.push({ ...base, pushed: true, skipped: false, code: "submodule_pushed", refspec });
|
|
9867
9955
|
} catch (error) {
|
|
9868
9956
|
results.push({ ...base, pushed: false, skipped: false, code: "submodule_push_failed", refspec, error: formatGitError2(error) });
|
|
@@ -10130,6 +10218,7 @@ var init_mesh_fast_forward = __esm({
|
|
|
10130
10218
|
"use strict";
|
|
10131
10219
|
init_git_status();
|
|
10132
10220
|
init_git_executor();
|
|
10221
|
+
init_worktree_bootstrap_config();
|
|
10133
10222
|
STATUS_OPTIONS = { refreshUpstream: true, includeSubmodules: true, timeoutMs: 15e3, forceFresh: true };
|
|
10134
10223
|
}
|
|
10135
10224
|
});
|
|
@@ -18503,6 +18592,9 @@ var init_approval_utils = __esm({
|
|
|
18503
18592
|
});
|
|
18504
18593
|
|
|
18505
18594
|
// src/logging/debug-config.ts
|
|
18595
|
+
function isAlwaysOnTraceCategory(category) {
|
|
18596
|
+
return !!category && ALWAYS_ON_TRACE_CATEGORIES.includes(category);
|
|
18597
|
+
}
|
|
18506
18598
|
function normalizeCategories(categories) {
|
|
18507
18599
|
if (!Array.isArray(categories)) return [];
|
|
18508
18600
|
return categories.map((category) => String(category || "").trim()).filter(Boolean);
|
|
@@ -18532,17 +18624,19 @@ function resetDebugRuntimeConfig() {
|
|
|
18532
18624
|
}
|
|
18533
18625
|
function shouldCollectTraceCategory(category) {
|
|
18534
18626
|
const config = currentConfig;
|
|
18627
|
+
if (isAlwaysOnTraceCategory(category)) return true;
|
|
18535
18628
|
if (!config.collectDebugTrace) return false;
|
|
18536
18629
|
if (!category) return true;
|
|
18537
18630
|
if (config.traceCategories.length === 0) return true;
|
|
18538
18631
|
return config.traceCategories.includes(category);
|
|
18539
18632
|
}
|
|
18540
|
-
var NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, DEFAULT_CONFIG2, currentConfig;
|
|
18633
|
+
var NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, ALWAYS_ON_TRACE_CATEGORIES, DEFAULT_CONFIG2, currentConfig;
|
|
18541
18634
|
var init_debug_config = __esm({
|
|
18542
18635
|
"src/logging/debug-config.ts"() {
|
|
18543
18636
|
"use strict";
|
|
18544
18637
|
NORMAL_TRACE_BUFFER_SIZE = 200;
|
|
18545
18638
|
DEV_TRACE_BUFFER_SIZE = 1e3;
|
|
18639
|
+
ALWAYS_ON_TRACE_CATEGORIES = ["completion-gate", "fsm-transition"];
|
|
18546
18640
|
DEFAULT_CONFIG2 = {
|
|
18547
18641
|
logLevel: "info",
|
|
18548
18642
|
collectDebugTrace: false,
|
|
@@ -24063,6 +24157,7 @@ var init_require_whitelist = __esm({
|
|
|
24063
24157
|
// src/index.ts
|
|
24064
24158
|
var index_exports = {};
|
|
24065
24159
|
__export(index_exports, {
|
|
24160
|
+
ALWAYS_ON_TRACE_CATEGORIES: () => ALWAYS_ON_TRACE_CATEGORIES,
|
|
24066
24161
|
AcpProviderInstance: () => AcpProviderInstance,
|
|
24067
24162
|
AgentStreamPoller: () => AgentStreamPoller,
|
|
24068
24163
|
BUILTIN_CHAT_MESSAGE_KINDS: () => BUILTIN_CHAT_MESSAGE_KINDS,
|
|
@@ -24294,6 +24389,7 @@ __export(index_exports, {
|
|
|
24294
24389
|
installGlobalInterceptor: () => installGlobalInterceptor,
|
|
24295
24390
|
interactivePromptFromClaudeAskUserQuestion: () => interactivePromptFromClaudeAskUserQuestion,
|
|
24296
24391
|
isActivityChatMessage: () => isActivityChatMessage,
|
|
24392
|
+
isAlwaysOnTraceCategory: () => isAlwaysOnTraceCategory,
|
|
24297
24393
|
isBuiltinChatMessageKind: () => isBuiltinChatMessageKind,
|
|
24298
24394
|
isCdpConnected: () => isCdpConnected,
|
|
24299
24395
|
isExtensionInstalled: () => isExtensionInstalled,
|
|
@@ -31036,7 +31132,7 @@ function createDebugTraceStore(options) {
|
|
|
31036
31132
|
const capacity = Math.max(1, Math.floor(options.capacity || 100));
|
|
31037
31133
|
return {
|
|
31038
31134
|
record(event) {
|
|
31039
|
-
if (!options.enabled) return null;
|
|
31135
|
+
if (!options.enabled && !isAlwaysOnTraceCategory(event.category)) return null;
|
|
31040
31136
|
const entry = createEntry(event);
|
|
31041
31137
|
entries.push(entry);
|
|
31042
31138
|
if (entries.length > capacity) {
|
|
@@ -55664,6 +55760,7 @@ async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree, opti
|
|
|
55664
55760
|
commit: gitlink.commit,
|
|
55665
55761
|
reachable: false
|
|
55666
55762
|
};
|
|
55763
|
+
let submoduleDefaultBranch = "main";
|
|
55667
55764
|
try {
|
|
55668
55765
|
if (!fs30.existsSync(submodulePath)) {
|
|
55669
55766
|
entry.error = `Submodule checkout missing at ${gitlink.path}`;
|
|
@@ -55716,9 +55813,14 @@ async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree, opti
|
|
|
55716
55813
|
entries.push(entry);
|
|
55717
55814
|
continue;
|
|
55718
55815
|
}
|
|
55719
|
-
|
|
55816
|
+
submoduleDefaultBranch = await resolveSubmoduleDefaultBranch({
|
|
55817
|
+
submoduleRepoPath: submodulePath,
|
|
55818
|
+
superprojectWorkspace: repoRoot,
|
|
55819
|
+
submodulePath: gitlink.path
|
|
55820
|
+
});
|
|
55821
|
+
entry.remoteMainBranch = submoduleDefaultBranch;
|
|
55720
55822
|
try {
|
|
55721
|
-
await verifyRemoteMainContainsCommit(submodulePath, gitlink.commit,
|
|
55823
|
+
await verifyRemoteMainContainsCommit(submodulePath, gitlink.commit, submoduleDefaultBranch);
|
|
55722
55824
|
entry.fetchedFromOrigin = true;
|
|
55723
55825
|
entry.remoteReachable = true;
|
|
55724
55826
|
entry.remoteMainReachable = true;
|
|
@@ -55728,17 +55830,17 @@ async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree, opti
|
|
|
55728
55830
|
entry.remoteMainReachable = false;
|
|
55729
55831
|
entry.publishRequired = true;
|
|
55730
55832
|
const details = truncateValidationOutput(e?.stderr || e?.message || String(e));
|
|
55731
|
-
entry.error = `Submodule remote main reachability check failed for origin
|
|
55833
|
+
entry.error = `Submodule remote main reachability check failed for origin/${submoduleDefaultBranch}: ${details}`;
|
|
55732
55834
|
if (options.allowAutoPublishSubmoduleMainCommits === true && entry.localReachable === true) {
|
|
55733
55835
|
entry.autoPublishAllowed = true;
|
|
55734
55836
|
entry.autoPublishAttempted = true;
|
|
55735
55837
|
try {
|
|
55736
|
-
const publish = await publishCommitToRemoteMain(submodulePath, gitlink.commit,
|
|
55838
|
+
const publish = await publishCommitToRemoteMain(submodulePath, gitlink.commit, submoduleDefaultBranch);
|
|
55737
55839
|
entry.autoPublishRefspec = publish.refspec;
|
|
55738
55840
|
entry.publishStdout = truncateValidationOutput(publish.stdout);
|
|
55739
55841
|
entry.publishStderr = truncateValidationOutput(publish.stderr);
|
|
55740
55842
|
entry.autoPublishSucceeded = true;
|
|
55741
|
-
await verifyRemoteMainContainsCommit(submodulePath, gitlink.commit,
|
|
55843
|
+
await verifyRemoteMainContainsCommit(submodulePath, gitlink.commit, submoduleDefaultBranch);
|
|
55742
55844
|
entry.fetchedFromOrigin = true;
|
|
55743
55845
|
entry.remoteReachable = true;
|
|
55744
55846
|
entry.remoteMainReachable = true;
|
|
@@ -55750,12 +55852,12 @@ async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree, opti
|
|
|
55750
55852
|
entry.autoPublishSucceeded = false;
|
|
55751
55853
|
entry.autoPublishVerified = false;
|
|
55752
55854
|
const publishDetails = truncateValidationOutput(publishError?.stderr || publishError?.message || String(publishError));
|
|
55753
|
-
entry.error = `Submodule auto-publish to origin
|
|
55855
|
+
entry.error = `Submodule auto-publish to origin/${submoduleDefaultBranch} failed or could not be verified: ${publishDetails}`;
|
|
55754
55856
|
}
|
|
55755
55857
|
} else if (options.allowAutoPublishSubmoduleMainCommits === true) {
|
|
55756
55858
|
entry.autoPublishAllowed = true;
|
|
55757
55859
|
entry.autoPublishAttempted = false;
|
|
55758
|
-
entry.autoPublishSkippedReason = entry.autoPublishSkippedReason ||
|
|
55860
|
+
entry.autoPublishSkippedReason = entry.autoPublishSkippedReason || `candidate commit is not reachable in the source checkout or worktree submodule, so Refinery cannot push it to origin/${submoduleDefaultBranch}`;
|
|
55759
55861
|
}
|
|
55760
55862
|
}
|
|
55761
55863
|
} catch (e) {
|
|
@@ -55763,7 +55865,7 @@ async function runMeshRefineSubmoduleReachabilityGate(repoRoot, mergedTree, opti
|
|
|
55763
55865
|
entry.remoteMainReachable = false;
|
|
55764
55866
|
entry.publishRequired = true;
|
|
55765
55867
|
const details = truncateValidationOutput(e?.stderr || e?.message || String(e));
|
|
55766
|
-
entry.error = `Submodule remote main reachability check failed for origin
|
|
55868
|
+
entry.error = `Submodule remote main reachability check failed for origin/${submoduleDefaultBranch}: ${details}`;
|
|
55767
55869
|
}
|
|
55768
55870
|
} catch (e) {
|
|
55769
55871
|
entry.error = truncateValidationOutput(e?.message || String(e));
|
|
@@ -67053,6 +67155,7 @@ var V1_ALL_PRIMITIVES = Object.freeze(
|
|
|
67053
67155
|
var V1_CONTRACT_VERSION = "1.0.0";
|
|
67054
67156
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67055
67157
|
0 && (module.exports = {
|
|
67158
|
+
ALWAYS_ON_TRACE_CATEGORIES,
|
|
67056
67159
|
AcpProviderInstance,
|
|
67057
67160
|
AgentStreamPoller,
|
|
67058
67161
|
BUILTIN_CHAT_MESSAGE_KINDS,
|
|
@@ -67284,6 +67387,7 @@ var V1_CONTRACT_VERSION = "1.0.0";
|
|
|
67284
67387
|
installGlobalInterceptor,
|
|
67285
67388
|
interactivePromptFromClaudeAskUserQuestion,
|
|
67286
67389
|
isActivityChatMessage,
|
|
67390
|
+
isAlwaysOnTraceCategory,
|
|
67287
67391
|
isBuiltinChatMessageKind,
|
|
67288
67392
|
isCdpConnected,
|
|
67289
67393
|
isExtensionInstalled,
|