@adhdev/daemon-core 0.9.82-rc.522 → 0.9.82-rc.524

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.
@@ -170,6 +170,19 @@ export declare function maybeAutoFastForwardIdleNode(components: DaemonComponent
170
170
  * nodes are the sole continuous target.
171
171
  */
172
172
  export declare function runContinuousAutoFastForwardScan(components: DaemonComponents, mesh: any): Promise<void>;
173
+ /**
174
+ * DS3: drain and act on `coordinator_catchup` markers queued by a remote node's Refinery
175
+ * after it pushed the base branch to origin. The originating coordinator is THIS daemon;
176
+ * its local base checkout is now behind origin. Bring it up to date with a guarded ff-only
177
+ * merge — but ONLY when the coordinator base node has no active mesh work (busy → leave the
178
+ * marker for the next idle tick) and fastForwardMeshNode's own clean/ahead=0/behind>0 gate
179
+ * is satisfied (ahead/diverged/dirty → it returns a structured block, never a rebase).
180
+ *
181
+ * These markers are drained on a DEDICATED event-name filter so they never reach the
182
+ * coordinator chat-injection path (they are actions, not messages). A busy/blocked node
183
+ * re-queues the marker so a later idle tick retries; a successful/no-op ff consumes it.
184
+ */
185
+ export declare function runPendingCoordinatorCatchupScan(components: DaemonComponents, mesh: any): Promise<void>;
173
186
  export declare function runIdleMaintenanceThenAssignQueue(components: DaemonComponents, args: {
174
187
  meshId: string;
175
188
  nodeId: string;
@@ -12,6 +12,7 @@
12
12
  * (erased at compile time — no runtime import cycle).
13
13
  */
14
14
  import type { ChangedPackageClassification } from '../git/git-status.js';
15
+ import type { MeshRefineValidationScope } from '../mesh/refine-config.js';
15
16
  import type { WorktreeBootstrapState } from '../mesh/worktree-bootstrap-config.js';
16
17
  import type { CommandRouterResult } from '../commands/router.js';
17
18
  export type MeshCoordinatorConfigFormat = 'claude_mcp_json' | 'hermes_config_yaml';
@@ -64,8 +65,12 @@ type MeshRefineValidationSummary = {
64
65
  changeImpact?: {
65
66
  isDaemonAffecting: boolean;
66
67
  affectedPackages: string[];
68
+ /** DOCS-ROOT: three-way change area ('none' | 'web' | 'daemon') when known. */
69
+ changeArea?: MeshRefineValidationScope;
67
70
  /** displayCommands skipped because the daemon scope is unaffected. */
68
71
  skippedDaemonCommands?: string[];
72
+ /** DOCS-ROOT: displayCommands skipped because the change-area scope excluded them. */
73
+ skippedScopeCommands?: string[];
69
74
  };
70
75
  };
71
76
  type MeshRefineStageStatus = 'passed' | 'failed' | 'skipped';
@@ -1,5 +1,20 @@
1
1
  export declare const MESH_REFINE_VALIDATION_CATEGORIES: readonly ["typecheck", "test", "lint", "build"];
2
2
  export type MeshRefineValidationCategory = typeof MESH_REFINE_VALIDATION_CATEGORIES[number];
3
+ /**
4
+ * DOCS-ROOT: change-impact scope for a validation command. Mirrors ChangeImpactKind
5
+ * (git-status) so a command can declare WHICH change areas it should run in:
6
+ * 'daemon' — run when a daemon-runtime package changed,
7
+ * 'web' — run when a web package changed,
8
+ * 'none' — run when ONLY docs/markers changed (a docs-only branch).
9
+ * A command with NO `scopes` runs in every area (backward-compatible: the full set
10
+ * runs as before). This lets a repo declare a light docs-only profile — e.g. a
11
+ * `docs:verify` command scoped `['none']` — that runs on a docs-only branch while the
12
+ * heavy typecheck/test commands (implicitly all-areas, or scoped ['web','daemon'])
13
+ * are skipped. The scoping is applied only when the branch's changeArea is known;
14
+ * fail-open (unknown change area → every command runs).
15
+ */
16
+ export declare const MESH_REFINE_VALIDATION_SCOPES: readonly ["none", "web", "daemon"];
17
+ export type MeshRefineValidationScope = typeof MESH_REFINE_VALIDATION_SCOPES[number];
3
18
  export interface RepoMeshRefineValidationCommandConfig {
4
19
  /** Executable name or a whitespace-tokenized command string. Never executed through a shell. */
5
20
  command: string;
@@ -10,6 +25,12 @@ export interface RepoMeshRefineValidationCommandConfig {
10
25
  timeoutMs?: number;
11
26
  outputLimitBytes?: number;
12
27
  env?: Record<string, string>;
28
+ /**
29
+ * DOCS-ROOT: change-impact scopes this command runs in ('none' | 'web' | 'daemon').
30
+ * Omitted → runs in every area (backward-compatible). Empty array is treated the
31
+ * same as omitted (runs everywhere) rather than "runs nowhere".
32
+ */
33
+ scopes?: MeshRefineValidationScope[];
13
34
  }
14
35
  export interface RepoMeshRefineConfig {
15
36
  version: 1;
@@ -50,6 +71,8 @@ export interface MeshRefineValidationCommandPlan {
50
71
  timeoutMs?: number;
51
72
  outputLimitBytes?: number;
52
73
  env?: Record<string, string>;
74
+ /** DOCS-ROOT: normalized change-impact scopes; absent → runs in every area. */
75
+ scopes?: MeshRefineValidationScope[];
53
76
  }
54
77
  export interface MeshRefineConfigLoadResult {
55
78
  config?: RepoMeshRefineConfig;
@@ -142,6 +165,13 @@ export declare const MESH_REFINE_CONFIG_SCHEMA: {
142
165
  readonly type: "string";
143
166
  };
144
167
  };
168
+ readonly scopes: {
169
+ readonly type: "array";
170
+ readonly items: {
171
+ readonly enum: readonly ["none", "web", "daemon"];
172
+ };
173
+ readonly description: "DOCS-ROOT: change-impact scopes this command runs in ('none'=docs-only, 'web', 'daemon'). Omitted/empty → runs in every area.";
174
+ };
145
175
  };
146
176
  };
147
177
  };
@@ -186,6 +216,12 @@ export declare const MESH_REFINE_CONFIG_SCHEMA: {
186
216
  readonly type: "string";
187
217
  };
188
218
  };
219
+ readonly scopes: {
220
+ readonly type: "array";
221
+ readonly items: {
222
+ readonly enum: readonly ["none", "web", "daemon"];
223
+ };
224
+ };
189
225
  };
190
226
  };
191
227
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.522",
3
+ "version": "0.9.82-rc.524",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,8 +47,8 @@
47
47
  "author": "vilmire",
48
48
  "license": "AGPL-3.0-or-later",
49
49
  "dependencies": {
50
- "@adhdev/mesh-shared": "0.9.82-rc.522",
51
- "@adhdev/session-host-core": "0.9.82-rc.522",
50
+ "@adhdev/mesh-shared": "0.9.82-rc.524",
51
+ "@adhdev/session-host-core": "0.9.82-rc.524",
52
52
  "@agentclientprotocol/sdk": "^0.16.1",
53
53
  "ajv": "^8.20.0",
54
54
  "ajv-formats": "^3.0.1",