@adhdev/daemon-core 0.9.82-rc.411 → 0.9.82-rc.412
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/commands/med-family/mesh-crud.d.ts +27 -0
- package/dist/config/mesh-json-config.d.ts +31 -131
- package/dist/config/repo-settings.d.ts +77 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +372 -419
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +360 -408
- package/dist/index.mjs.map +1 -1
- package/dist/mesh/mesh-ledger.d.ts +1 -1
- package/package.json +2 -2
- package/src/commands/high-family/mesh-coordinator-launch.ts +9 -4
- package/src/commands/med-family/mesh-crud.ts +85 -8
- package/src/config/mesh-json-config.ts +40 -281
- package/src/config/repo-settings.ts +111 -0
- package/src/index.ts +5 -0
- package/src/mesh/mesh-ledger.ts +10 -0
- package/src/mesh/mesh-missions.ts +86 -1
- package/src/mesh/mesh-queue-assignment.ts +15 -51
|
@@ -1,2 +1,29 @@
|
|
|
1
|
+
import type { GitRepoIdentity } from '../../git/git-types.js';
|
|
1
2
|
import type { MedFamilyHandler } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Decision for syncing a freshly-cloned worktree's `oss` submodule to its clone
|
|
5
|
+
* source node, applying resolveWorktreeBaseStartPoint's origin-tip-priority
|
|
6
|
+
* policy to the submodule.
|
|
7
|
+
*
|
|
8
|
+
* On clone, `submodule update --init` checks the worktree's `oss` out at the
|
|
9
|
+
* gitlink recorded in the FRESH root base — which the root base-stale fix
|
|
10
|
+
* branches from origin/main, so it is the up-to-date origin tip. The clone
|
|
11
|
+
* source node's *working* `oss` SHA can lag that tip. The original sync blindly
|
|
12
|
+
* checked out the source SHA whenever it merely differed, which REWINDS the
|
|
13
|
+
* submodule back onto the stale source and re-introduces staleness.
|
|
14
|
+
*
|
|
15
|
+
* Guard policy (never rewind, mirror the base-start-point resolver):
|
|
16
|
+
* - source SHA == worktree SHA → `noop`
|
|
17
|
+
* - source SHA is an ancestor of worktree → `skip_rewind` (source is behind; keep fresh tip)
|
|
18
|
+
* - worktree SHA is an ancestor of source → `advance` (source strictly newer; safe fast-forward)
|
|
19
|
+
* - neither is an ancestor (diverged) → `skip_diverged` (keep fresh tip; coordinator reconciles)
|
|
20
|
+
*
|
|
21
|
+
* Both SHAs must already be resolvable in `ossCtx` (the caller fetches the
|
|
22
|
+
* source SHA first). A non-1 git exit (unresolvable SHA / real failure) is
|
|
23
|
+
* rethrown so the caller can fall back to keeping the fresh worktree HEAD.
|
|
24
|
+
*/
|
|
25
|
+
export type OssCloneSyncAction = 'noop' | 'advance' | 'skip_rewind' | 'skip_diverged';
|
|
26
|
+
export declare function decideOssCloneSync(ossCtx: GitRepoIdentity, worktreeOssSha: string, sourceSha: string, rg: (ctx: GitRepoIdentity, argv: string[], opts?: {
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
}) => Promise<unknown>): Promise<OssCloneSyncAction>;
|
|
2
29
|
export declare const meshCrudHandlers: Record<string, MedFamilyHandler>;
|
|
@@ -1,63 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Repo-shared declarative mesh config — `.adhdev/mesh.json`
|
|
3
3
|
*
|
|
4
|
-
* A repo-committed, machine-independent
|
|
5
|
-
*
|
|
6
|
-
* lowest layer of a LOCAL-WINS merge chain:
|
|
4
|
+
* A repo-committed, machine-independent file carrying ONLY the repo-shared
|
|
5
|
+
* coordinator-prompt config and operating notes:
|
|
7
6
|
*
|
|
8
|
-
* DEFAULT_MESH_POLICY → .adhdev/mesh.json (repo base) → machine-local
|
|
9
|
-
* meshes.json / coordinator-prompt files (always win)
|
|
10
|
-
*
|
|
11
|
-
* The merge is **in-memory only**. The on-disk machine-local `meshes.json` is
|
|
12
|
-
* NEVER mutated by this module — local config keeps winning and the merge is
|
|
13
|
-
* applied transiently on the coordinator launch + display paths. This keeps the
|
|
14
|
-
* repo file a shared default that a machine can always override without the
|
|
15
|
-
* override being silently rewritten back to the repo shape.
|
|
16
|
-
*
|
|
17
|
-
* Three zones (scope = mesh-global in v1; per-node scope is not introduced):
|
|
18
|
-
* - policy — RepoMeshPolicy fields; local fields that differ from
|
|
19
|
-
* DEFAULT_MESH_POLICY win, otherwise the repo base shows
|
|
20
|
-
* through (true per-field LOCAL-WINS).
|
|
21
7
|
* - coordinator — systemPromptOverride (local wins, else repo) and
|
|
22
8
|
* systemPromptAppend (repo append + local append BOTH
|
|
23
9
|
* stack, repo first).
|
|
24
10
|
* - operatingNotes — repo-declared baseline notes merged with the runtime
|
|
25
11
|
* ledger notes; on duplicate text the ledger note wins.
|
|
12
|
+
* - limits — advisory-only (`maxNoteChars`, `maxNotes`,
|
|
13
|
+
* `coordinator.maxPromptChars`); recorded, never enforced in v1.
|
|
26
14
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* `schedulingStrategy` / `maxParallelTasks` knobs (each with its own default +
|
|
34
|
-
* clamp), an operator declares one `policy.scheduling` block checked into the
|
|
35
|
-
* repo. It layers ON TOP of the stored meshes.json policy with LOCAL-WINS — a
|
|
36
|
-
* value present in the repo file overrides the persisted mesh policy, so the
|
|
37
|
-
* repo is the source of truth for how its own work distributes. Absent keys
|
|
38
|
-
* leave the stored policy untouched (a partial overlay, not a replacement).
|
|
39
|
-
*
|
|
40
|
-
* .adhdev/mesh.json
|
|
41
|
-
* { "policy": { "scheduling": {
|
|
42
|
-
* "distribution": "spread" | "in_order", // → schedulingStrategy
|
|
43
|
-
* "maxParallel": 1..8, // → maxParallelTasks (clamped)
|
|
44
|
-
* "readonlyMultiplier": 2 // read-only cap multiplier (default 2)
|
|
45
|
-
* } } }
|
|
15
|
+
* POLICY IS NOT HERE. RepoMeshPolicy (the 15 scheduling/approval fields) is
|
|
16
|
+
* MACHINE-LOCAL only — it lives in meshes.json and is never sourced from, merged
|
|
17
|
+
* with, or overlaid by a repo file. There is no `policy` zone and no
|
|
18
|
+
* `policy.scheduling` overlay in mesh.json; the scheduler reads the stored
|
|
19
|
+
* machine-local policy directly. The repo file shapes the coordinator prompt and
|
|
20
|
+
* operating notes, nothing else.
|
|
46
21
|
*
|
|
47
|
-
* The
|
|
48
|
-
*
|
|
49
|
-
* scheduler honors it. The scheduling overlay exposes only the 2-mode
|
|
50
|
-
* `distribution` façade, mapped through distributionToStrategy.
|
|
22
|
+
* The coordinator/operatingNotes merge is **in-memory only**: the on-disk
|
|
23
|
+
* machine-local `meshes.json` is never mutated by this module.
|
|
51
24
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
25
|
+
* FILE SEPARATION: refine / worktree-bootstrap / change-impact configs live in
|
|
26
|
+
* their OWN `.adhdev/*` files with their own loaders — they are NOT inlined into
|
|
27
|
+
* mesh.json. `loadRepoSettings` (config/repo-settings.ts) assembles all of them
|
|
28
|
+
* into one object for consumers.
|
|
56
29
|
*
|
|
57
30
|
* SECURITY: declarative only. JSON/YAML is parsed; arbitrary JS (.js) is NOT
|
|
58
31
|
* supported, so loading a config can never execute code.
|
|
59
32
|
*/
|
|
60
|
-
import
|
|
33
|
+
import type { RepoMeshCoordinatorConfig, LocalMeshEntry } from '../repo-mesh-types.js';
|
|
61
34
|
import type { CoordinatorOperatingNote } from '../mesh/coordinator-prompt.js';
|
|
62
35
|
export interface RepoMeshDeclarativeCoordinatorConfig {
|
|
63
36
|
/** Full mesh-level system prompt override. Same semantics as
|
|
@@ -77,11 +50,11 @@ export interface RepoMeshDeclarativeLimits {
|
|
|
77
50
|
}
|
|
78
51
|
/**
|
|
79
52
|
* Parsed + normalized `.adhdev/mesh.json` shape. Every field is optional except
|
|
80
|
-
* version so a repo can declare only the zone(s) it cares about.
|
|
53
|
+
* version so a repo can declare only the zone(s) it cares about. Policy is NOT a
|
|
54
|
+
* zone here — it is machine-local (meshes.json) only.
|
|
81
55
|
*/
|
|
82
56
|
export interface RepoMeshDeclarativeConfig {
|
|
83
57
|
version: 1;
|
|
84
|
-
policy?: Partial<RepoMeshPolicy>;
|
|
85
58
|
coordinator?: RepoMeshDeclarativeCoordinatorConfig;
|
|
86
59
|
operatingNotes?: CoordinatorOperatingNote[];
|
|
87
60
|
limits?: RepoMeshDeclarativeLimits;
|
|
@@ -95,26 +68,6 @@ export interface RepoMeshJsonConfigLoadResult {
|
|
|
95
68
|
path?: string;
|
|
96
69
|
error?: string;
|
|
97
70
|
}
|
|
98
|
-
export interface MeshJsonSchedulingConfig {
|
|
99
|
-
/** User-facing distribution mode; mapped to schedulingStrategy on apply. */
|
|
100
|
-
distribution?: RepoMeshDistribution;
|
|
101
|
-
/** Global write-task parallel cap (clamped to [1, 8] on apply). */
|
|
102
|
-
maxParallel?: number;
|
|
103
|
-
/** Read-only diagnosis cap multiplier. Missing → 2. */
|
|
104
|
-
readonlyMultiplier?: number;
|
|
105
|
-
}
|
|
106
|
-
export interface MeshJsonConfig {
|
|
107
|
-
scheduling?: MeshJsonSchedulingConfig;
|
|
108
|
-
}
|
|
109
|
-
export interface MeshJsonConfigLoadResult {
|
|
110
|
-
config?: MeshJsonConfig;
|
|
111
|
-
source: string;
|
|
112
|
-
sourceType: 'repo_file' | 'unavailable' | 'invalid';
|
|
113
|
-
path?: string;
|
|
114
|
-
error?: string;
|
|
115
|
-
/** Cache key: path + mtime, or a sentinel for the missing/invalid case. */
|
|
116
|
-
sourceKey: string;
|
|
117
|
-
}
|
|
118
71
|
export declare const MESH_JSON_CONFIG_LOCATIONS: string[];
|
|
119
72
|
export declare const MESH_JSON_CONFIG_SCHEMA: {
|
|
120
73
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
@@ -126,9 +79,6 @@ export declare const MESH_JSON_CONFIG_SCHEMA: {
|
|
|
126
79
|
readonly version: {
|
|
127
80
|
readonly const: 1;
|
|
128
81
|
};
|
|
129
|
-
readonly policy: {
|
|
130
|
-
readonly type: "object";
|
|
131
|
-
};
|
|
132
82
|
readonly coordinator: {
|
|
133
83
|
readonly type: "object";
|
|
134
84
|
readonly additionalProperties: false;
|
|
@@ -211,24 +161,6 @@ export declare function normalizeRepoMeshDeclarativeConfig(parsed: unknown): {
|
|
|
211
161
|
* coordinator launch.
|
|
212
162
|
*/
|
|
213
163
|
export declare function loadRepoMeshJsonConfig(workspace?: string): RepoMeshJsonConfigLoadResult;
|
|
214
|
-
/**
|
|
215
|
-
* Reduce a (fully-normalized) machine-local policy to ONLY the fields that
|
|
216
|
-
* genuinely differ from DEFAULT_MESH_POLICY. A meshes.json policy is always
|
|
217
|
-
* stored fully-defaulted, so a naive merge would let it shadow every repo-base
|
|
218
|
-
* field — defeating the repo default. By keeping only the truly-overridden
|
|
219
|
-
* fields, an untouched local field falls through to the repo base while a local
|
|
220
|
-
* field the operator actually changed still wins. Optional fields absent from
|
|
221
|
-
* DEFAULT_MESH_POLICY (e.g. allowedProviders, schedulingStrategy) count as an
|
|
222
|
-
* override whenever present.
|
|
223
|
-
*/
|
|
224
|
-
export declare function diffPolicyFromDefault(local: Partial<RepoMeshPolicy> | undefined): Partial<RepoMeshPolicy>;
|
|
225
|
-
/**
|
|
226
|
-
* Effective mesh policy = DEFAULT → repo base → local overrides (per-field
|
|
227
|
-
* LOCAL-WINS). When `local` is all-default the repo base shows through entirely
|
|
228
|
-
* (case i); when `local` overrides a field that field wins (case ii). Nested
|
|
229
|
-
* objects (autoFastForward) are still merged per-field by mergeAndNormalizePolicy.
|
|
230
|
-
*/
|
|
231
|
-
export declare function mergeEffectiveMeshPolicy(repoPolicy: Partial<RepoMeshPolicy> | undefined, localPolicy: RepoMeshPolicy | Partial<RepoMeshPolicy> | undefined): RepoMeshPolicy;
|
|
232
164
|
/**
|
|
233
165
|
* Effective coordinator config. systemPromptOverride: local wins, else repo.
|
|
234
166
|
* systemPromptAppend: repo append + local append BOTH stack (repo first). Other
|
|
@@ -246,54 +178,22 @@ export declare function mergeEffectiveCoordinatorConfig(repoCoord: RepoMeshDecla
|
|
|
246
178
|
export declare function mergeEffectiveOperatingNotes(repoNotes: CoordinatorOperatingNote[] | undefined, ledgerNotes: CoordinatorOperatingNote[] | undefined): CoordinatorOperatingNote[] | undefined;
|
|
247
179
|
/**
|
|
248
180
|
* Produce an in-memory effective mesh by layering the repo declarative config
|
|
249
|
-
* UNDER the machine-local mesh entry
|
|
250
|
-
*
|
|
251
|
-
*
|
|
181
|
+
* UNDER the machine-local mesh entry — coordinator zone ONLY. Policy is
|
|
182
|
+
* machine-local and is left exactly as the stored mesh carries it (never sourced
|
|
183
|
+
* from the repo file). Returns a new object; the input mesh and on-disk
|
|
184
|
+
* meshes.json are never mutated. operatingNotes are merged separately at launch
|
|
185
|
+
* (they ride the prompt context, not the mesh).
|
|
252
186
|
*/
|
|
253
|
-
export declare function applyRepoMeshConfig<T extends Pick<LocalMeshEntry, '
|
|
187
|
+
export declare function applyRepoMeshConfig<T extends Pick<LocalMeshEntry, 'coordinator'>>(mesh: T, repoConfig: RepoMeshDeclarativeConfig | null | undefined): T;
|
|
254
188
|
/**
|
|
255
189
|
* Build a `.adhdev/mesh.json` DRAFT from a machine-local mesh entry. This is a
|
|
256
190
|
* scaffold for the operator to review and commit — NOT an automatic migration.
|
|
257
|
-
* It captures the
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
191
|
+
* It captures the coordinator prompt override/append so a repo can adopt the
|
|
192
|
+
* current machine's prompt customization as the shared base. Policy is NOT
|
|
193
|
+
* exported — it is machine-local only and has no place in mesh.json. Operating
|
|
194
|
+
* notes are intentionally NOT exported either: those are runtime ledger lessons,
|
|
195
|
+
* and a repo should declare baseline notes deliberately.
|
|
261
196
|
*/
|
|
262
|
-
export declare function buildMeshJsonConfigScaffold(mesh: Pick<LocalMeshEntry, '
|
|
197
|
+
export declare function buildMeshJsonConfigScaffold(mesh: Pick<LocalMeshEntry, 'coordinator'>): RepoMeshDeclarativeConfig;
|
|
263
198
|
/** Serialize a scaffold to the canonical 2-space JSON draft text. */
|
|
264
199
|
export declare function serializeMeshJsonConfigScaffold(config: RepoMeshDeclarativeConfig): string;
|
|
265
|
-
/**
|
|
266
|
-
* Validate a parsed `.adhdev/mesh.*` document into a MeshJsonConfig (scheduling
|
|
267
|
-
* overlay). Tolerant of an empty/partial file (an empty object is valid and
|
|
268
|
-
* yields no overlay); strict about malformed values so a typo surfaces as
|
|
269
|
-
* `invalid` rather than silently no-op'ing.
|
|
270
|
-
*/
|
|
271
|
-
export declare function validateMeshJsonConfig(raw: unknown, source?: string): {
|
|
272
|
-
valid: boolean;
|
|
273
|
-
errors: string[];
|
|
274
|
-
config?: MeshJsonConfig;
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* Locate and load the `.adhdev/mesh.json` scheduling overlay for a repo root.
|
|
278
|
-
* Declarative only — never executes config. Cached by path + mtime so repeated
|
|
279
|
-
* scheduler reads are cheap.
|
|
280
|
-
*/
|
|
281
|
-
export declare function loadMeshJsonConfig(repoRoot: string): MeshJsonConfigLoadResult;
|
|
282
|
-
/** Test-only: drop the mtime cache so a per-run temp file is re-read. */
|
|
283
|
-
export declare function __resetMeshJsonConfigCacheForTests(): void;
|
|
284
|
-
/**
|
|
285
|
-
* The effective scheduling knobs after layering the repo-local `.adhdev/mesh.json`
|
|
286
|
-
* overlay on top of a stored mesh policy (LOCAL-WINS). This is the single resolution
|
|
287
|
-
* point the scheduler reads, so the strategy/caps it acts on always reflect the
|
|
288
|
-
* in-tree override when present and fall back to the persisted policy otherwise.
|
|
289
|
-
*/
|
|
290
|
-
export interface EffectiveMeshScheduling {
|
|
291
|
-
/** Resolved raw strategy (override distribution → strategy, else stored policy). */
|
|
292
|
-
strategy: ReturnType<typeof distributionToStrategy> | RepoMeshPolicy['schedulingStrategy'];
|
|
293
|
-
/** Effective, clamped global write cap. */
|
|
294
|
-
maxParallelTasks: number;
|
|
295
|
-
/** Read-only cap multiplier (override, else default 2). */
|
|
296
|
-
readonlyMultiplier?: number;
|
|
297
|
-
/** True when an `.adhdev/mesh.json` overlay actually contributed a value. */
|
|
298
|
-
overrideApplied: boolean;
|
|
299
|
-
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repo Settings — one unified loader over the repo-committed `.adhdev/*` config
|
|
3
|
+
* files (the "single source" assembly point).
|
|
4
|
+
*
|
|
5
|
+
* DESIGN (option B — file separation preserved): the repo keeps its declarative
|
|
6
|
+
* config in SEPARATE files, each with its own dedicated loader:
|
|
7
|
+
*
|
|
8
|
+
* .adhdev/mesh.json → loadRepoMeshJsonConfig (coordinator + operatingNotes)
|
|
9
|
+
* .adhdev/refine.json → loadMeshRefineConfig (Refinery validation)
|
|
10
|
+
* .adhdev/worktree_bootstrap.json → loadMeshWorktreeBootstrapConfig
|
|
11
|
+
* .adhdev/change-impact.json → loadChangeImpactConfig
|
|
12
|
+
*
|
|
13
|
+
* Nothing is inlined into mesh.json. `loadRepoSettings` simply CALLS each
|
|
14
|
+
* dedicated loader and assembles the results into one `RepoSettings` object so a
|
|
15
|
+
* consumer can read every repo-shared setting through a single call instead of
|
|
16
|
+
* threading four loaders. The per-file loaders remain the source of truth (and
|
|
17
|
+
* stay independently usable); this is a convenience aggregator, not a new schema.
|
|
18
|
+
*
|
|
19
|
+
* IMPORTANT — policy is NOT here. RepoMeshPolicy (the 15 scheduling/approval
|
|
20
|
+
* fields) is MACHINE-LOCAL only: it lives in meshes.json and is never sourced
|
|
21
|
+
* from or merged with a repo file. mesh.json carries only coordinator prompt
|
|
22
|
+
* config + operating notes (+ advisory limits).
|
|
23
|
+
*
|
|
24
|
+
* The refine/worktree-bootstrap loaders also honor a machine-local INLINE seam
|
|
25
|
+
* (mesh.refineConfig / mesh.policy.worktreeBootstrap, etc.) — that seam is for
|
|
26
|
+
* machine-local config and is unchanged here; mesh.json gains no such zone.
|
|
27
|
+
*/
|
|
28
|
+
import { type RepoMeshDeclarativeCoordinatorConfig, type RepoMeshDeclarativeLimits, type RepoMeshJsonConfigLoadResult } from './mesh-json-config.js';
|
|
29
|
+
import { type MeshRefineConfigLoadResult } from '../mesh/refine-config.js';
|
|
30
|
+
import { type WorktreeBootstrapConfigLoadResult } from '../mesh/worktree-bootstrap-config.js';
|
|
31
|
+
import { type ChangeImpactConfigLoadResult } from '../git/change-impact-config.js';
|
|
32
|
+
import type { CoordinatorOperatingNote } from '../mesh/coordinator-prompt.js';
|
|
33
|
+
export interface LoadRepoSettingsOptions {
|
|
34
|
+
/** Workspace path whose `.adhdev/*` files are resolved (mesh.json / refine / bootstrap). */
|
|
35
|
+
workspace: string;
|
|
36
|
+
/**
|
|
37
|
+
* Machine-local mesh entry, consulted ONLY for the INLINE seam of the
|
|
38
|
+
* refine / worktree-bootstrap loaders (mesh.refineConfig etc.). Optional —
|
|
39
|
+
* omit it and only the repo files are considered. NEVER used to source policy.
|
|
40
|
+
*/
|
|
41
|
+
mesh?: any;
|
|
42
|
+
/**
|
|
43
|
+
* Repo root for change-impact resolution. Defaults to `workspace` when omitted
|
|
44
|
+
* (change-impact compares the daemon build commit against the workspace HEAD).
|
|
45
|
+
*/
|
|
46
|
+
repoRoot?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The assembled repo-shared settings. Each sub-config carries its own load
|
|
50
|
+
* result (source / sourceType / error) so a consumer can tell "absent" from
|
|
51
|
+
* "invalid" per file. `coordinator` / `operatingNotes` / `limits` are lifted out
|
|
52
|
+
* of the mesh.json load result for convenience; `meshJson` keeps the full result
|
|
53
|
+
* (e.g. for the `sourceType === 'invalid'` warning on coordinator launch).
|
|
54
|
+
*/
|
|
55
|
+
export interface RepoSettings {
|
|
56
|
+
/** Repo-shared coordinator prompt config (override/append) from `.adhdev/mesh.json`. */
|
|
57
|
+
coordinator?: RepoMeshDeclarativeCoordinatorConfig;
|
|
58
|
+
/** Repo-declared baseline operating notes from `.adhdev/mesh.json`. */
|
|
59
|
+
operatingNotes?: CoordinatorOperatingNote[];
|
|
60
|
+
/** Advisory-only limits from `.adhdev/mesh.json` (recorded, not enforced in v1). */
|
|
61
|
+
limits?: RepoMeshDeclarativeLimits;
|
|
62
|
+
/** Full `.adhdev/mesh.json` declarative load result (coordinator/operatingNotes source). */
|
|
63
|
+
meshJson: RepoMeshJsonConfigLoadResult;
|
|
64
|
+
/** `.adhdev/refine.json` Refinery validation config load result. */
|
|
65
|
+
refine: MeshRefineConfigLoadResult;
|
|
66
|
+
/** `.adhdev/worktree_bootstrap.json` bootstrap config load result. */
|
|
67
|
+
worktreeBootstrap: WorktreeBootstrapConfigLoadResult;
|
|
68
|
+
/** `.adhdev/change-impact.json` change-impact config load result. */
|
|
69
|
+
changeImpact: ChangeImpactConfigLoadResult;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Load every repo-committed `.adhdev/*` setting for a workspace and assemble them
|
|
73
|
+
* into one object. Each dedicated loader degrades to an `unavailable`/`invalid`
|
|
74
|
+
* load result rather than throwing, so this never throws on a missing or broken
|
|
75
|
+
* file — a consumer inspects the per-sub-config `sourceType`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function loadRepoSettings(opts: LoadRepoSettingsOptions): RepoSettings;
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export type { CoordinatorRegistryEntry } from './mesh/coordinator-registry.js';
|
|
|
45
45
|
export { MESH_REFINE_CONFIG_LOCATIONS, MESH_REFINE_CONFIG_SCHEMA, loadMeshRefineConfig, resolveMeshRefineValidationPlan, suggestMeshRefineConfig, validateMeshRefineConfig, } from './mesh/refine-config.js';
|
|
46
46
|
export { MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS, MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA, loadMeshWorktreeBootstrapConfig, runMeshWorktreeBootstrap, validateMeshWorktreeBootstrapConfig, type RepoMeshWorktreeBootstrapConfig, type WorktreeBootstrapState, } from './mesh/worktree-bootstrap-config.js';
|
|
47
47
|
export type { MeshRefineValidationCategory, MeshRefineValidationCommandPlan, MeshRefineValidationPlan, RepoMeshRefineConfig, RepoMeshRefineValidationCommandConfig, } from './mesh/refine-config.js';
|
|
48
|
+
export { loadRepoSettings } from './config/repo-settings.js';
|
|
49
|
+
export type { RepoSettings, LoadRepoSettingsOptions } from './config/repo-settings.js';
|
|
48
50
|
export { appendLedgerEntry, appendRemoteLedgerEntries, buildTaskCompletionEvidence, normalizeMeshWorkerResult, readLedgerEntries, readLedgerSlice, readLedgerSliceFromStore, getLedgerSummary, getLedgerDir, getSessionRecoveryContext, MAX_LEDGER_SLICE_LIMIT } from './mesh/mesh-ledger.js';
|
|
49
51
|
export type { AppendRemoteLedgerResult, MeshLedgerEntry, MeshLedgerKind, MeshLedgerSlice, MeshLedgerSummary, ReadLedgerOptions, ReadLedgerSliceOptions, SessionRecoveryContext, MeshTaskCompletionEvidence, MeshWorkerResultArtifact, MeshProcessArtifact, MeshValidationResultArtifact } from './mesh/mesh-ledger.js';
|
|
50
52
|
export { fastForwardMeshNode } from './mesh/mesh-fast-forward.js';
|