@harness-engineering/core 0.23.8 → 0.24.0

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.
@@ -2,7 +2,7 @@ import {
2
2
  archMatchers,
3
3
  archModule,
4
4
  architecture
5
- } from "../chunk-CE225WRK.mjs";
5
+ } from "../chunk-NC4RPKD4.mjs";
6
6
  export {
7
7
  archMatchers,
8
8
  archModule,
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // src/architecture/types.ts
2
8
  import { z } from "zod";
3
9
  var ArchMetricCategorySchema = z.enum([
@@ -2848,6 +2854,7 @@ var archMatchers = {
2848
2854
  };
2849
2855
 
2850
2856
  export {
2857
+ __export,
2851
2858
  createError,
2852
2859
  createEntropyError,
2853
2860
  Ok,
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { Result, LoadingLevel, SkillContextBudget, SessionSectionName, SessionEntry, SessionSections, WorkflowStep, WorkflowStepResult, Workflow, WorkflowResult, SkillLifecycleHooks, SkillContext, SkillResult, TurnContext, CICheckName, CIFailOnSeverity, CICheckReport, RoadmapFeature, ExternalTicket, ExternalTicketState, TrackerComment, TrackerSyncConfig, CINotifyOptions, Roadmap, FeatureStatus, SyncResult, ModelPricing, UsageRecord, DailyUsage, SessionUsage, SkillInvocationRecord, SkillAdoptionSummary, StabilityTier, TelemetryIdentity, TelemetryConfig, ConsentState, TelemetryEvent, SolutionCategory, SanitizedResult, PulseConfig, PulseAdapter, PulseWindow } from '@harness-engineering/types';
1
+ import { Result, LoadingLevel, SkillContextBudget, SessionSectionName, SessionEntry, SessionSections, WorkflowStep, WorkflowStepResult, Workflow, WorkflowResult, SkillLifecycleHooks, SkillContext, SkillResult, TurnContext, CICheckName, CIFailOnSeverity, CICheckReport, RoadmapFeature, ExternalTicket, ExternalTicketState, TrackerComment, TrackerSyncConfig, CINotifyOptions, Roadmap, FeatureStatus, SyncResult, Priority, ModelPricing, UsageRecord, DailyUsage, SessionUsage, SkillInvocationRecord, SkillAdoptionSummary, StabilityTier, TelemetryIdentity, TelemetryConfig, ConsentState, TelemetryEvent, SolutionCategory, SanitizedResult, PulseConfig, PulseAdapter, PulseWindow } from '@harness-engineering/types';
2
2
  export * from '@harness-engineering/types';
3
- export { BugTrackCategory, KnowledgeTrackCategory, PulseAdapter, PulseConfig, PulseDbSource, PulseRunStatus, PulseRunStatusType, PulseSources, PulseWindow, SanitizeFn, SanitizedResult, SolutionCategory, SolutionDocFrontmatter, SolutionTrack } from '@harness-engineering/types';
3
+ export { BlockerRef, BugTrackCategory, Issue, IssueTrackerClient, KnowledgeTrackCategory, PulseAdapter, PulseConfig, PulseDbSource, PulseRunStatus, PulseRunStatusType, PulseSources, PulseWindow, SanitizeFn, SanitizedResult, SolutionCategory, SolutionDocFrontmatter, SolutionTrack, TrackerConfig } from '@harness-engineering/types';
4
4
  import { z } from 'zod';
5
5
  import { C as Collector, A as ArchConfig, a as ConstraintRule, M as MetricResult, b as ArchMetricCategory, c as ArchBaseline, d as ArchDiffResult, T as ThresholdConfig, V as ViolationHistory, e as Violation, f as ViolationSnapshot, E as EmergenceResult } from './matchers-DSibUtbV.mjs';
6
6
  export { g as ArchBaselineSchema, h as ArchConfigSchema, i as ArchDiffResultSchema, j as ArchHandle, k as ArchMetricCategorySchema, l as ArchitectureOptions, m as CategoryBaseline, n as CategoryBaselineSchema, o as CategoryRegression, p as CategoryRegressionSchema, q as ConstraintRuleSchema, r as EmergenceConfidence, s as EmergenceConfidenceSchema, t as EmergenceResultSchema, u as EmergentConstraintSuggestion, v as EmergentConstraintSuggestionSchema, w as MetricResultSchema, x as ThresholdConfigSchema, y as ViolationHistorySchema, z as ViolationSchema, B as ViolationSnapshotSchema, D as archMatchers, F as archModule, G as architecture } from './matchers-DSibUtbV.mjs';
@@ -29,7 +29,7 @@ interface BaseError {
29
29
  */
30
30
  interface ValidationError extends BaseError {
31
31
  /** Validation-specific error codes. */
32
- code: 'INVALID_TYPE' | 'MISSING_FIELD' | 'VALIDATION_FAILED' | 'PARSE_ERROR';
32
+ code: 'INVALID_TYPE' | 'MISSING_FIELD' | 'VALIDATION_FAILED' | 'PARSE_ERROR' | 'ROADMAP_MODE_MISSING_TRACKER' | 'ROADMAP_MODE_FILE_PRESENT';
33
33
  }
34
34
  /**
35
35
  * Error type for context-related issues.
@@ -260,7 +260,7 @@ interface StructureValidation {
260
260
  conformance: number;
261
261
  }
262
262
  interface ConfigError extends ValidationError {
263
- code: 'INVALID_TYPE' | 'MISSING_FIELD' | 'VALIDATION_FAILED';
263
+ code: 'INVALID_TYPE' | 'MISSING_FIELD' | 'VALIDATION_FAILED' | 'ROADMAP_MODE_MISSING_TRACKER' | 'ROADMAP_MODE_FILE_PRESENT';
264
264
  details: {
265
265
  zodError?: unknown;
266
266
  path?: string[];
@@ -374,6 +374,82 @@ declare function runFallbackRules(cwd: string): Promise<AgentConfigFinding[]>;
374
374
  */
375
375
  declare function validateAgentConfigs(cwd: string, options?: AgentConfigOptions): Promise<AgentConfigValidation>;
376
376
 
377
+ /**
378
+ * Roadmap storage mode.
379
+ *
380
+ * - `file-backed` — `docs/roadmap.md` is canonical (today's behavior).
381
+ * - `file-less` — the configured external tracker is canonical; `docs/roadmap.md`
382
+ * must not exist. Activated explicitly via `roadmap.mode: "file-less"` in
383
+ * `harness.config.json` and validated by `validateRoadmapMode`.
384
+ *
385
+ * @see docs/changes/roadmap-tracker-only/proposal.md (Decision D5)
386
+ */
387
+ type RoadmapMode = 'file-backed' | 'file-less';
388
+ /**
389
+ * Narrow shape this helper inspects. Accepts any object that may have a
390
+ * `roadmap.mode` field; tolerates `undefined`, `null`, missing fields, and
391
+ * malformed values without throwing. The full Zod schema lives in CLI
392
+ * (`RoadmapConfigSchema` in `packages/cli/src/config/schema.ts`); this
393
+ * helper is intentionally tolerant so it can be called from any layer
394
+ * (orchestrator, dashboard, MCP tools) without re-validating.
395
+ */
396
+ interface RoadmapModeConfig {
397
+ roadmap?: {
398
+ mode?: string | undefined;
399
+ } | null | undefined;
400
+ }
401
+ /**
402
+ * Returns the roadmap storage mode for a given Harness config.
403
+ *
404
+ * The canonical source of the `'file-backed'` default is
405
+ * `RoadmapConfigSchema.mode.default('file-backed')` in
406
+ * `packages/cli/src/config/schema.ts`. After Zod parses a config, the
407
+ * `roadmap.mode` field is always populated, and this helper returns it
408
+ * directly. This helper exists for pre-parse or unvalidated config shapes
409
+ * (e.g. handlers that accept partial configs from external callers) where
410
+ * the field may still be absent.
411
+ *
412
+ * Returns `'file-backed'` (the default) when:
413
+ * - `config` is undefined or null
414
+ * - `config.roadmap` is absent or null
415
+ * - `config.roadmap.mode` is absent
416
+ * - `config.roadmap.mode` is the string `'file-backed'`
417
+ * - `config.roadmap.mode` is any other value (defensive — should never
418
+ * happen if the config has been Zod-validated, but tolerated here)
419
+ *
420
+ * Returns `'file-less'` only when `config.roadmap.mode === 'file-less'`.
421
+ *
422
+ * @param config - A Harness config (or any shape with optional `roadmap.mode`).
423
+ * @returns `'file-backed'` or `'file-less'`.
424
+ */
425
+ declare function getRoadmapMode(config: RoadmapModeConfig | undefined | null): RoadmapMode;
426
+
427
+ /**
428
+ * Shape inspected by validateRoadmapMode. A superset of RoadmapModeConfig
429
+ * because we also need to detect tracker presence.
430
+ */
431
+ interface RoadmapModeValidationConfig extends RoadmapModeConfig {
432
+ roadmap?: {
433
+ mode?: string | undefined;
434
+ tracker?: unknown;
435
+ } | null | undefined;
436
+ }
437
+ /**
438
+ * Validates the cross-cutting roadmap-mode invariants that Zod cannot express:
439
+ *
440
+ * Rule A: when `roadmap.mode === "file-less"`, `roadmap.tracker` MUST be configured.
441
+ * Rule B: when `roadmap.mode === "file-less"`, `docs/roadmap.md` MUST NOT exist.
442
+ *
443
+ * Rule A is checked first (structural error; file presence is recoverable).
444
+ *
445
+ * @param config - The loaded Harness config (post-Zod-parse).
446
+ * @param projectRoot - Absolute path to the project root (for `docs/roadmap.md` lookup).
447
+ * @returns Ok(undefined) if all rules pass; Err(ConfigError) on the first violation.
448
+ *
449
+ * @see docs/changes/roadmap-tracker-only/proposal.md (§Config schema)
450
+ */
451
+ declare function validateRoadmapMode(config: RoadmapModeValidationConfig, projectRoot: string): Result<void, ConfigError>;
452
+
377
453
  interface AgentMapLink {
378
454
  text: string;
379
455
  path: string;
@@ -8081,6 +8157,392 @@ declare function scoreRoadmapCandidates(roadmap: Roadmap, options?: PilotScoring
8081
8157
  * Mutates roadmap in-place.
8082
8158
  */
8083
8159
  declare function assignFeature(roadmap: Roadmap, feature: RoadmapFeature, assignee: string, date: string): void;
8160
+ /**
8161
+ * Mode-aware wrapper around `scoreRoadmapCandidates`. The roadmap-pilot skill
8162
+ * (and any caller that needs to honor `roadmap.mode`) should call this instead
8163
+ * of `scoreRoadmapCandidates` directly.
8164
+ *
8165
+ * Phase 4 behavior:
8166
+ * - `file-backed` (default) — delegates to `scoreRoadmapCandidates` unchanged.
8167
+ * - `file-less` — D4 sort: delegates to `scoreRoadmapCandidatesFileLess` which
8168
+ * orders eligible features by Priority then `createdAt` ascending.
8169
+ * The caller is expected to pass a `Roadmap` whose milestones' features
8170
+ * carry tracker fields (constructed from `RoadmapTrackerClient.fetchAll()`).
8171
+ *
8172
+ * @param roadmap - The roadmap (file-backed: parsed from docs/roadmap.md;
8173
+ * file-less: synthesized from tracker fetchAll output).
8174
+ * @param options - Pilot scoring options (currentUser etc.).
8175
+ * @param config - The Harness config (or any object with optional `roadmap.mode`);
8176
+ * use `getRoadmapMode(config)` to resolve.
8177
+ * @returns Scored candidates. Note: file-less results have zeroed
8178
+ * positionScore/dependentsScore/affinityScore/weightedScore — the
8179
+ * D4 sort is by `priorityTier` then issue creation order.
8180
+ */
8181
+ declare function scoreRoadmapCandidatesForMode(roadmap: Roadmap, options: PilotScoringOptions, config: RoadmapModeConfig | undefined | null): ScoredCandidate[];
8182
+
8183
+ /**
8184
+ * Phase 2 wide tracker interface (file-less roadmap mode).
8185
+ * See docs/changes/roadmap-tracker-only/proposal.md §"IssueTrackerClient interface".
8186
+ *
8187
+ * Named `RoadmapTrackerClient` (not `IssueTrackerClient`) to avoid colliding
8188
+ * with the small interface lifted in Phase 1 (decision D-P2-A).
8189
+ */
8190
+
8191
+ interface TrackedFeature {
8192
+ externalId: string;
8193
+ name: string;
8194
+ status: FeatureStatus;
8195
+ summary: string;
8196
+ spec: string | null;
8197
+ plans: string[];
8198
+ /**
8199
+ * Feature **names** (NOT externalIds) authored in the body-meta `blocked_by:`
8200
+ * field. The body-meta block is the canonical source for blockers per spec
8201
+ * §"Body metadata block" — the adapter reads the names verbatim and writes
8202
+ * them verbatim. Translation to externalIds (when needed) is a caller concern.
8203
+ */
8204
+ blockedBy: string[];
8205
+ assignee: string | null;
8206
+ priority: Priority | null;
8207
+ milestone: string | null;
8208
+ createdAt: string;
8209
+ updatedAt: string | null;
8210
+ }
8211
+ interface NewFeatureInput {
8212
+ name: string;
8213
+ summary: string;
8214
+ status?: FeatureStatus;
8215
+ spec?: string | null;
8216
+ plans?: string[];
8217
+ blockedBy?: string[];
8218
+ priority?: Priority | null;
8219
+ milestone?: string | null;
8220
+ assignee?: string | null;
8221
+ }
8222
+ type FeaturePatch = Partial<Omit<TrackedFeature, 'externalId' | 'createdAt' | 'updatedAt'>>;
8223
+ type HistoryEventType = 'created' | 'claimed' | 'released' | 'completed' | 'updated' | 'reopened';
8224
+ interface HistoryEvent {
8225
+ type: HistoryEventType;
8226
+ actor: string;
8227
+ at: string;
8228
+ details?: Record<string, unknown>;
8229
+ }
8230
+ /**
8231
+ * ConflictError signals that a write would clobber an external change.
8232
+ * Synthesized via refetch-and-compare on writes (D-P2-B); GitHub REST does
8233
+ * not natively return 412 on issue PATCH.
8234
+ *
8235
+ * `serverUpdatedAt` carries the server-side `updatedAt` from the refetched
8236
+ * state when available (null when the server omits it or when the adapter
8237
+ * cannot determine it). Callers can use this to decide merge-vs-abort by
8238
+ * recency (e.g. a recent server change favors abort; a stale one favors
8239
+ * merge after a fresh refetch).
8240
+ */
8241
+ declare class ConflictError extends Error {
8242
+ readonly code: "TRACKER_CONFLICT";
8243
+ readonly externalId: string;
8244
+ readonly diff: Record<string, {
8245
+ ours: unknown;
8246
+ theirs: unknown;
8247
+ }>;
8248
+ readonly serverUpdatedAt: string | null;
8249
+ constructor(externalId: string, diff: Record<string, {
8250
+ ours: unknown;
8251
+ theirs: unknown;
8252
+ }>, serverUpdatedAt?: string | null, message?: string);
8253
+ }
8254
+ interface RoadmapTrackerClient {
8255
+ fetchAll(): Promise<Result<{
8256
+ features: TrackedFeature[];
8257
+ etag: string | null;
8258
+ }, Error>>;
8259
+ fetchById(externalId: string): Promise<Result<{
8260
+ feature: TrackedFeature;
8261
+ etag: string;
8262
+ } | null, Error>>;
8263
+ fetchByStatus(statuses: FeatureStatus[]): Promise<Result<TrackedFeature[], Error>>;
8264
+ create(feature: NewFeatureInput): Promise<Result<TrackedFeature, Error>>;
8265
+ update(externalId: string, patch: FeaturePatch, ifMatch?: string): Promise<Result<TrackedFeature, ConflictError | Error>>;
8266
+ claim(externalId: string, assignee: string, ifMatch?: string): Promise<Result<TrackedFeature, ConflictError | Error>>;
8267
+ release(externalId: string, ifMatch?: string): Promise<Result<TrackedFeature, ConflictError | Error>>;
8268
+ complete(externalId: string, ifMatch?: string): Promise<Result<TrackedFeature, ConflictError | Error>>;
8269
+ appendHistory(externalId: string, event: HistoryEvent): Promise<Result<void, Error>>;
8270
+ fetchHistory(externalId: string, limit?: number): Promise<Result<HistoryEvent[], Error>>;
8271
+ }
8272
+
8273
+ /**
8274
+ * Per-process LRU ETag cache. No cross-process invalidation.
8275
+ * See spec §"ETag store" and decision D-P2-E (no third-party LRU).
8276
+ *
8277
+ * Key shapes used by the current GitHub adapter:
8278
+ * - `feature:<externalId>` — set by fetchById on 200 with ETag (e.g. `feature:github:o/r#42`)
8279
+ * - `list:all` — set by fetchAll on 200 with the last-page ETag
8280
+ *
8281
+ * The `list:` prefix is reserved for future per-status or per-filter list
8282
+ * caches; today only `list:all` is written. invalidatePrefix('list:') wipes
8283
+ * any `list:*` keys so future scoped-list caches will participate without
8284
+ * additional plumbing in the adapter's write paths.
8285
+ */
8286
+ declare class ETagStore {
8287
+ private readonly max;
8288
+ private readonly cache;
8289
+ constructor(max?: number);
8290
+ get(key: string): {
8291
+ etag: string;
8292
+ data: unknown;
8293
+ } | null;
8294
+ set(key: string, etag: string, data: unknown): void;
8295
+ invalidate(key: string): void;
8296
+ invalidateAll(): void;
8297
+ /** Invalidate all keys matching a prefix. Used when writes invalidate `list:*`. */
8298
+ invalidatePrefix(prefix: string): void;
8299
+ get size(): number;
8300
+ }
8301
+
8302
+ interface TrackerClientConfig {
8303
+ kind: 'github-issues';
8304
+ repo: string;
8305
+ token?: string;
8306
+ apiBase?: string;
8307
+ selectorLabel?: string;
8308
+ etagStore?: ETagStore;
8309
+ }
8310
+ declare function createTrackerClient(config: TrackerClientConfig): Result<RoadmapTrackerClient, Error>;
8311
+
8312
+ /**
8313
+ * Shared TRACKER_CONFLICT HTTP 409 body shape.
8314
+ *
8315
+ * Three endpoints emit this body when a `ConflictError` propagates from
8316
+ * `RoadmapTrackerClient` writes (REV-P7-S5):
8317
+ *
8318
+ * - S3 dashboard claim: POST /api/actions/roadmap/claim
8319
+ * - S5 dashboard roadmap-status: POST /api/actions/roadmap-status
8320
+ * - S6 orchestrator append: POST /api/roadmap/append
8321
+ *
8322
+ * Lifting the constructor here keeps the wire shape pinned in one place;
8323
+ * the dashboard's `TrackerConflictBody` type and `isTrackerConflictBody`
8324
+ * guard (in `packages/dashboard/src/shared/types.ts`) form the matching
8325
+ * client-side contract. Drift between server emitters and the guard is
8326
+ * what this helper exists to prevent.
8327
+ */
8328
+
8329
+ /**
8330
+ * Public shape of the body emitted by `makeTrackerConflictBody`. Mirrors
8331
+ * the dashboard's `TrackerConflictBody` type — the two MUST stay in
8332
+ * lock-step. `conflictedWith` is `unknown` at the type level because the
8333
+ * underlying `ConflictError.diff` is intentionally schemaless (the diff
8334
+ * shape varies by adapter and by which field conflicted).
8335
+ */
8336
+ interface TrackerConflictBody {
8337
+ error: string;
8338
+ code: 'TRACKER_CONFLICT';
8339
+ externalId: string;
8340
+ /** Server-side diff payload from ConflictError (shape varies). */
8341
+ conflictedWith?: unknown;
8342
+ refreshHint: 'reload-roadmap';
8343
+ }
8344
+ interface MakeTrackerConflictBodyOptions {
8345
+ /**
8346
+ * Override the value placed at `conflictedWith`. When omitted, the
8347
+ * helper uses `err.diff` (the canonical server-side payload). Callers
8348
+ * that want to surface a user-facing identity ("claimed by Bob") can
8349
+ * pass a string here.
8350
+ */
8351
+ conflictedWith?: unknown;
8352
+ }
8353
+ /**
8354
+ * Build the HTTP 409 TRACKER_CONFLICT response body from a ConflictError.
8355
+ *
8356
+ * @param err - The `ConflictError` thrown by a `RoadmapTrackerClient` write.
8357
+ * @param opts - Optional overrides. By default `conflictedWith` is `err.diff`.
8358
+ * @returns The wire body, ready to be JSON-stringified.
8359
+ */
8360
+ declare function makeTrackerConflictBody(err: ConflictError, opts?: MakeTrackerConflictBodyOptions): TrackerConflictBody;
8361
+
8362
+ interface FileLessScoredCandidate {
8363
+ feature: TrackedFeature;
8364
+ priorityTier: number | null;
8365
+ }
8366
+ /**
8367
+ * Local mirror of `PilotScoringOptions` to avoid an import cycle with
8368
+ * `pilot-scoring.ts` (which imports this module's `scoreRoadmapCandidatesFileLess`).
8369
+ * Keep this shape in sync with the canonical definition.
8370
+ */
8371
+ interface FileLessScoringOptions {
8372
+ currentUser?: string;
8373
+ }
8374
+ /**
8375
+ * D4: Drop positional ordering in file-less mode; sort by Priority then issue
8376
+ * creation order (createdAt ascending). Only `planned` and `backlog` features
8377
+ * are eligible (parity with file-backed `isEligibleCandidate`). `blockedBy`
8378
+ * filtering: a feature is excluded if any blocker name is in the input set
8379
+ * AND that blocker is not 'done'. Caller is responsible for passing the full
8380
+ * feature set so the function can compute this.
8381
+ */
8382
+ declare function scoreRoadmapCandidatesFileLess(features: TrackedFeature[], _options: FileLessScoringOptions): FileLessScoredCandidate[];
8383
+
8384
+ /**
8385
+ * Resolve the project's roadmap mode from `<projectRoot>/harness.config.json`.
8386
+ * Returns 'file-backed' on any error (missing file, invalid JSON, unreadable).
8387
+ *
8388
+ * D-P4-D: consolidates the four near-identical helpers across cli, dashboard,
8389
+ * and orchestrator. Per-request reads are kept (tracker setup cost dwarfs fs I/O).
8390
+ */
8391
+ declare function loadProjectRoadmapMode(projectRoot: string): RoadmapMode;
8392
+
8393
+ /**
8394
+ * Build a `TrackerClientConfig` from `<projectRoot>/harness.config.json`.
8395
+ *
8396
+ * REV-P4-5 consolidation (D-P5-G): single source of truth for the previously
8397
+ * triplicated helper in cli (`mcp/tools/roadmap.ts`), dashboard
8398
+ * (`server/routes/actions.ts`), and orchestrator
8399
+ * (`server/routes/roadmap-actions.ts`).
8400
+ *
8401
+ * Maps `roadmap.tracker.kind === 'github'` (file-backed sync engine
8402
+ * namespace) to the client-side `kind: 'github-issues'`. See
8403
+ * `packages/cli/src/config/schema.ts:265` for the long-form note on the
8404
+ * two namespaces.
8405
+ */
8406
+ declare function loadTrackerClientConfigFromProject(projectRoot: string): Result<TrackerClientConfig, Error>;
8407
+
8408
+ interface MigrationPlan {
8409
+ /** Features to create via client.create(). */
8410
+ toCreate: Array<{
8411
+ name: string;
8412
+ input: NewFeatureInput;
8413
+ }>;
8414
+ /** Features whose body-block differs from canonical; will be updated via client.update(). */
8415
+ toUpdate: Array<{
8416
+ externalId: string;
8417
+ name: string;
8418
+ patch: FeaturePatch;
8419
+ diff: string;
8420
+ }>;
8421
+ /** Features whose body already matches; no-op at step 4. */
8422
+ unchanged: Array<{
8423
+ externalId: string;
8424
+ name: string;
8425
+ }>;
8426
+ /** History events to append, deduplicated by hash against existing comments. */
8427
+ historyToAppend: Array<{
8428
+ externalId: string;
8429
+ event: HistoryEvent;
8430
+ hash: string;
8431
+ }>;
8432
+ /** Features in `roadmap.md` with no External-ID AND a same-titled existing issue (D-P5-E). */
8433
+ ambiguous: Array<{
8434
+ name: string;
8435
+ existingIssueRef: string;
8436
+ }>;
8437
+ }
8438
+ interface MigrationOptions {
8439
+ /** Project root containing harness.config.json + docs/. */
8440
+ projectRoot: string;
8441
+ /** When true, run plan-only (steps 1-4 in-memory; no writes; no archive; no config rewrite). */
8442
+ dryRun: boolean;
8443
+ }
8444
+ interface MigrationReport {
8445
+ created: number;
8446
+ updated: number;
8447
+ unchanged: number;
8448
+ historyAppended: number;
8449
+ archivedFrom: string | null;
8450
+ archivedTo: string | null;
8451
+ configBackup: string | null;
8452
+ mode: 'dry-run' | 'applied' | 'already-migrated' | 'aborted';
8453
+ abortReason?: string;
8454
+ /**
8455
+ * Features that WERE created (with their new externalIds) when an abort
8456
+ * happened during step 3 (create). Empty in the happy path. Operators use
8457
+ * this to hand-record partial state.
8458
+ */
8459
+ createdSoFar?: Array<{
8460
+ name: string;
8461
+ externalId: string;
8462
+ }>;
8463
+ }
8464
+
8465
+ /**
8466
+ * Build a migration plan from a parsed roadmap and the current tracker state.
8467
+ *
8468
+ * Inputs:
8469
+ * - `roadmap` — parsed local `docs/roadmap.md`.
8470
+ * - `existingFeatures` — `client.fetchAll().value.features` from the tracker.
8471
+ * - `fetchHistoryHashes` — given an externalId, returns the set of `harness-history`
8472
+ * comment hashes already on that issue. Used for history-event dedup (D-P5-C).
8473
+ * - `getRawBodyForExternalId` — given an externalId, returns the live raw issue body
8474
+ * (so we can parse the live BodyMeta for diff). Return null when the body is not
8475
+ * available; the feature will be treated as toUpdate to be safe.
8476
+ */
8477
+ declare function buildMigrationPlan(roadmap: Roadmap, existingFeatures: TrackedFeature[], fetchHistoryHashes: (externalId: string) => Promise<Set<string>>, getRawBodyForExternalId: (externalId: string) => Promise<string | null>): Promise<MigrationPlan>;
8478
+
8479
+ interface RunDeps {
8480
+ readonly client: RoadmapTrackerClient;
8481
+ readonly readFile: (p: string) => string;
8482
+ readonly writeFile: (p: string, b: string) => void;
8483
+ readonly renameFile: (from: string, to: string) => void;
8484
+ readonly existsFile: (p: string) => boolean;
8485
+ }
8486
+ /**
8487
+ * Execute a migration plan. Steps 3-7 from the migration spec:
8488
+ *
8489
+ * 3. Create features that lack External-IDs.
8490
+ * 4. Update features whose body-meta diverges from canonical.
8491
+ * 5. Append assignment-history events that lack a hash comment.
8492
+ * 6. Archive `docs/roadmap.md` → `docs/roadmap.md.archived`.
8493
+ * 7. Backup `harness.config.json` → `.pre-migration`, then rewrite
8494
+ * `roadmap.mode = 'file-less'`.
8495
+ *
8496
+ * Invariants:
8497
+ * - Any abort in steps 1-5 short-circuits the run BEFORE archive (6) or config
8498
+ * rewrite (7). The report names which features were already created so the
8499
+ * operator can hand-recover.
8500
+ * - `dryRun: true` runs steps 1-4 against the client but the test fixture wires
8501
+ * them so write methods throw; CLI dry-run uses a different plan-only path.
8502
+ * This core helper interprets `dryRun` as "skip steps 5-7": archive + config
8503
+ * are never touched, and the report is `mode: 'dry-run'`.
8504
+ * In tests we additionally route the client's write methods to fail, but that
8505
+ * is a test-only assertion: this helper simply does not invoke create/update/
8506
+ * appendHistory at all in dry-run.
8507
+ * - Ambiguous entries → instant abort (D-P5-E).
8508
+ * - Archive collision (`roadmap.md.archived` exists) → abort with reason
8509
+ * `archive-collision` (D-P5-D).
8510
+ * - Config rewrite is byte-identical backup + `JSON.stringify(parsed, null, 2) + '\n'`
8511
+ * (D-P5-F).
8512
+ */
8513
+ declare function runMigrationPlan(plan: MigrationPlan, deps: RunDeps, opts: MigrationOptions): Promise<Result<MigrationReport, Error>>;
8514
+
8515
+ /** Short, deterministic, content-addressed hash of a history event. */
8516
+ declare function hashHistoryEvent(event: HistoryEvent): string;
8517
+ /** Returns the 8-hex hash embedded in a harness-history comment body, or null. */
8518
+ declare function parseHashFromCommentBody(commentBody: string): string | null;
8519
+ /** Build the canonical comment envelope for a history event. */
8520
+ declare function buildHistoryCommentBody(event: HistoryEvent): string;
8521
+
8522
+ interface BodyMeta {
8523
+ spec?: string | null;
8524
+ plan?: string | null;
8525
+ blocked_by?: string[];
8526
+ priority?: Priority | null;
8527
+ milestone?: string | null;
8528
+ }
8529
+
8530
+ /** Field-by-field canonical comparison. Treats null/undefined/missing as equivalent. */
8531
+ declare function bodyMetaMatches(a: BodyMeta, b: BodyMeta): boolean;
8532
+
8533
+ type index_MigrationOptions = MigrationOptions;
8534
+ type index_MigrationPlan = MigrationPlan;
8535
+ type index_MigrationReport = MigrationReport;
8536
+ type index_RunDeps = RunDeps;
8537
+ declare const index_bodyMetaMatches: typeof bodyMetaMatches;
8538
+ declare const index_buildHistoryCommentBody: typeof buildHistoryCommentBody;
8539
+ declare const index_buildMigrationPlan: typeof buildMigrationPlan;
8540
+ declare const index_hashHistoryEvent: typeof hashHistoryEvent;
8541
+ declare const index_parseHashFromCommentBody: typeof parseHashFromCommentBody;
8542
+ declare const index_runMigrationPlan: typeof runMigrationPlan;
8543
+ declare namespace index {
8544
+ export { type index_MigrationOptions as MigrationOptions, type index_MigrationPlan as MigrationPlan, type index_MigrationReport as MigrationReport, type index_RunDeps as RunDeps, index_bodyMetaMatches as bodyMetaMatches, index_buildHistoryCommentBody as buildHistoryCommentBody, index_buildMigrationPlan as buildMigrationPlan, index_hashHistoryEvent as hashHistoryEvent, index_parseHashFromCommentBody as parseHashFromCommentBody, index_runMigrationPlan as runMigrationPlan };
8545
+ }
8084
8546
 
8085
8547
  declare const InteractionTypeSchema: z.ZodEnum<["question", "confirmation", "transition"]>;
8086
8548
  declare const QuestionSchema: z.ZodObject<{
@@ -9203,4 +9665,4 @@ declare function assembleCandidateReport(input: AssembleInput): string;
9203
9665
 
9204
9666
  declare const VERSION = "0.23.3";
9205
9667
 
9206
- export { AGENT_DESCRIPTORS, AGREEMENT_LINE_GAP, ALLOWED_FIELD_KEYS, ALL_SOLUTION_CATEGORIES, ARCHITECTURE_DESCRIPTOR, type AST, type AcquireOptions, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AdjustedForecast, AdjustedForecastSchema, type AgentAction, AgentActionEmitter, type AgentConfigFallbackReason, type AgentConfigFinding, type AgentConfigOptions, type AgentConfigSeverity, type AgentConfigValidation, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, type AnnotationIssue, type AnnotationIssueType, AnthropicCacheAdapter, type AppendLearningResult, ArchBaseline, ArchBaselineManager, ArchConfig, ArchDiffResult, ArchMetricCategory, type AssembleInput, BUG_DETECTION_DESCRIPTOR, BUG_TRACK_CATEGORIES, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BlueprintData, BlueprintGenerator, type BlueprintModule, type BlueprintOptions, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, type BudgetedLearningsOptions, type Bundle, type BundleConstraints, BundleConstraintsSchema, BundleSchema, CACHE_TTL_MS, CINotifier, COMPLIANCE_DESCRIPTOR, CORROBORATED_AGREEMENT, type CacheAdapter, type CategoryForecast, CategoryForecastSchema, CategorySnapshotSchema, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, CircularDepsCollector, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodeSymbol, type CodebaseSnapshot, Collector, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, CompactionPipeline, type CompactionStrategy, ComplexityCollector, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type CompoundLockHandle, CompoundLockHeldError, type ConfidenceTier, ConfidenceTierSchema, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, type ConflictReport, ConsoleSink, type ConstraintError, type ConstraintNodeStore, ConstraintRule, type Content, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, ContributingFeatureSchema, type Contributions, ContributionsSchema, type Convention, CouplingCollector, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_LOADER_CONFIG, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STABILITY_THRESHOLDS, DEFAULT_STATE, DEFAULT_STREAM_INDEX, DEFAULT_TOKEN_BUDGET, DESTRUCTIVE_BASH, DOMAIN_BASELINES, type DailyAdoption, type DataPoint, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, DepDepthCollector, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DetectStaleResult, type DiffInfo, type Direction$1 as Direction, DirectionSchema$1 as DirectionSchema, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, EMPTY_SUPPLY_CHAIN, EVIDENCE_SATURATION, EXTENSION_MAP, type EligibilityResult, EmergenceResult, type EmitEventInput, type EmitEventOptions, type EmitEventResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, type EstimatorCoefficients, type EventType, type EvidenceCoverageReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type ExternalSyncOptions, FACTOR_WEIGHTS, type FailureEntry, FailureEntrySchema, type FallbackPricingFile, type FanOutOptions, type FeedbackAgentConfig, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, FileSink, type FindingLifecycle, FindingLifecycleSchema, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, ForbiddenImportCollector, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, GeminiCacheAdapter, type GenerateRubricOptions, type GenerationSection, type GitHubInlineComment, GitHubIssuesSyncAdapter, type GitScanOptions, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type GraphNode, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type Hotspot$1 as Hotspot, type HotspotContext, type Import, type InjectionFinding, type InjectionPattern, type InjectionSeverity, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type IsoWeek, type JSDocComment, KNOWLEDGE_TRACK_CATEGORIES, LITELLM_PRICING_URL, type LanguageParser, type Layer, type LayerConfig, LayerViolationCollector, type LearningPattern, type LearningsFrontmatter, type LearningsIndexEntry, type LiteLLMModelEntry, type LiteLLMPricingData, type LoadEventsOptions, type LoaderConfig, type Lockfile, type LockfilePackage, LockfilePackageSchema, LockfileSchema, type LogEntry, type LogFilter, MOCK_ADAPTER_NAME, type Manifest, ManifestSchema, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type MergeResult, type Metric, MetricResult, type ModelProvider, type ModelTier, type ModelTierConfig, type ModuleDependency, ModuleSizeCollector, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, OpenAICacheAdapter, type OrchestratorResult, type OrphanedDep, type OutlineResult, type OverlapDimensions, type OverlapResult, PII_FIELD_DENYLIST, PII_LINE_RE, PII_TOKENS, type PackedEnvelope, type PaginatedSlice, type PaginationMeta, type ParallelGroups, type ParseError, type ParsedFile, type ParsedSection, type ParserLookup, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PilotScoringOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, PredictionEngine, type PredictionOptions, PredictionOptionsSchema, type RegressionResult as PredictionRegressionResult, RegressionResultSchema as PredictionRegressionResultSchema, type PredictionResult, PredictionResultSchema, type PredictionWarning, PredictionWarningSchema, type PricingCacheFile, type PricingDataset, type PriorReview, ProjectScanner, type PromoteResult, type ProtectedRegion, type ProtectedRegionMap, type ProtectionScope, type ProviderDefaults, type ProviderSystemBlock, type ProviderToolBlock, type PruneResult, PulseAdapterAlreadyRegisteredError, PulseConfigSchema, type PulseConfigValidation, PulseDbSourceSchema, PulseSourcesSchema, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionFit, type RegressionReport, type RegressionResult$1 as RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStage, type ReviewStrength, type Rubric, type RubricItem, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, STALENESS_WARNING_DAYS, STANDALONE_AGREEMENT, STATUS_RANK, type SafetyLevel, type ScanConfigFileResult, type ScanConfigFinding, type ScanConfigResult, type Hotspot as ScanHotspot, type HotspotOptions as ScanHotspotOptions, type ScanResult, type ScannedCommit, type ScoredCandidate, type SearchMatch, type SearchResult, type SecurityCategory, type SecurityCategorySnapshot, SecurityCategorySnapshotSchema, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type Direction as SecurityDirection, DirectionSchema as SecurityDirectionSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SecurityTimelineFile, SecurityTimelineFileSchema, SecurityTimelineManager, type SecurityTimelineSnapshot, SecurityTimelineSnapshotSchema, type SecurityTrendLine, SecurityTrendLineSchema, type SecurityTrendResult, SecurityTrendResultSchema, type SeedOptions, type SelfReviewConfig, type SessionSummaryData, SharableBoundaryConfigSchema, SharableForbiddenImportSchema, SharableLayerSchema, SharableSecurityRulesSchema, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillEvent, SkillEventSchema, type SkillExecutor, type SkillLoadPlan, SolutionDocFrontmatterSchema, type SolutionsDirValidation, type SourceFile, type Span, type SpanEvent, type SpecImpactEstimate, SpecImpactEstimateSchema, SpecImpactEstimator, SpecImpactSignalsSchema, type StabilityForecast, StabilityForecastSchema, type StabilityTaggedBlock, type StaleConstraint, type StalenessEntry, type StalenessReport, type StepExecutor, type StrategySeed, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, StructuralStrategy, type StructureValidation, type Suggestion, type SuggestionReport, type SupplyChainSnapshot, SupplyChainSnapshotSchema, type SupportedLanguage, type SuppressionRecord, type SymbolKind, type SyncChange, type SyncOptions, type TaintCheckResult, type TaintFinding, type TaintState, type TelemetryAdapter, type TelemetryHealth, ThresholdConfig, type TimeRange, type TimeToFixResult, TimeToFixResultSchema, type TimeToFixStats, TimeToFixStatsSchema, type CategorySnapshot as TimelineCategorySnapshot, type TimelineFile, TimelineFileSchema, TimelineManager, type TimelineSnapshot, TimelineSnapshotSchema, type TokenBudget, type TokenBudgetOverrides, type ToolDefinition, type Trace, type TrackerSyncAdapter, type Transition, TransitionSchema, type TrendAttribution, TrendAttributionSchema, type TrendLine, TrendLineSchema, type TrendResult, TrendResultSchema, TruncationStrategy, type TrustScoreOptions, type TurnExecutor, TypeScriptParser, type UnfoldResult, type UnusedImport, type UpdateCheckState, VALIDATION_SCORES, VALID_SCOPES, VERSION, type ValidateFindingsOptions, type ValidationError, Violation, type ViolationCluster, ViolationHistory, ViolationHistoryManager, ViolationSnapshot, type WorkflowPhase, type WritePulseConfigOptions, acquireCompoundLock, addProvenance, agentConfigRules, aggregateByDay as aggregateAdoptionByDay, aggregateByDay$1 as aggregateByDay, aggregateBySession, aggregateBySkill, analyzeDiff, analyzeLearningPatterns, appendFailure, appendLearning, appendSessionEntry, applyFixes, applyHotspotDowngrade, applyRecencyWeights, applySyncChanges, archiveFailures, archiveLearnings, archiveSession, archiveStream, assembleCandidateReport, assembleReport, assertSanitized, assignFeature, buildDependencyGraph, buildExclusionSet, buildSnapshot, calculateCacheSavings, calculateCost, checkDocCoverage, checkEligibility, checkEvidenceCoverage, checkOverlap, checkTaint, classifyConfidence, classifyFinding, clearEventHashCache, clearFailuresCache, clearLearningsCache, clearPulseAdapters, clearTaint, clusterViolations, collectEvents, computeContentHash, computeHotspots, computeLexicalSimilarity, computeLoadPlan, computeOverallSeverity, computeScanExitCode, computeTrustScores, computeWindow, configureFeedback, constraintRuleId, contextBudget, contextFilter, countLearningEntries, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createRegionMap, createSelfReview, createStream, crossReferenceUndocumentedFixes, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, deepMergeConstraints, defaultCollectors, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectEmergentConstraints, detectLanguage, detectPatternViolations, detectSizeBudgetViolations, detectStack, detectStaleConstraints, detectStaleLearnings, determineAssessment, diff, emitEvent, estimateTokens, executeWorkflow, expressRules, extractBundle, extractDirectoryScope, extractFileReferences, extractHeadlines, extractIndexEntry, extractLevel, extractMarkdownLinks, extractSections, fanOutReview, findParallelGroups, formatCIReportAsMarkdown, formatEventTimeline, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatIsoWeek, formatOutline, formatTerminalOutput, fullSync, generateAgentsMap, generateRubric, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getInjectionPatterns, getModelPrice, getOrCreateInstallId, getOutline, getParser, getPhaseCategories, getPulseAdapter, getStreamForBranch, getTaintFilePath, getTrustLevel, getUpdateNotification, gitScan, goRules, injectionRules, insecureDefaultsRules, isDuplicateFinding, isRegression, isSanitizedResult, isSmallSuggestion, isUpdateCheckEnabled, isoWeek, listActiveSessions, listPulseAdapters, listStreams, listTaintedSessions, loadBudgetedLearnings, loadEvents, loadFailures, loadHandoff, loadIndexEntries, loadPricingData, loadRelevantLearnings, loadSessionSummary, loadState, loadStreamIndex, loadTrackerSyncConfig, logAgentAction, mapInjectionFindings, mapSecurityFindings, mapSecuritySeverity, markProtectedFindings, mcpRules, migrateToStreams, networkRules, nodeRules, normalizeLearningContent, normalizeViolationPattern, paginate, parseCCRecords, parseDateFromEntry, parseDiff, parseFile, parseFileRegions, parseFrontmatter, parseHarnessIgnore, parseLiteLLMData, parseLookback, parseManifest, parseProtectedRegions, parseRoadmap, parseSections, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, projectValue, promoteSessionLearnings, pruneLearnings, reactRules, readAdoptionRecords, readCheckState, readCostRecords, readIdentity, readLockfile, readSessionSection, readSessionSections, readTaint, registerMockAdapter, registerPulseAdapter, removeContributions, removeProvenance, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resetParserCache, resolveConsent, resolveFileToLayer, resolveModelTier, resolveReverseStatus, resolveRuleSeverity, resolveSessionDir, resolveStability, resolveStreamPath, resolveThresholds, runFallbackRules as runAgentConfigFallbackRules, runAll, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runPulse, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scanForInjection, scopeContext, scoreRoadmapCandidates, searchSymbols, secretRules, securityFindingId, seedFromStrategy, send, serializeEnvelope, serializeRoadmap, setActiveStream, sharpEdgesRules, shouldRunCheck, spawnBackgroundCheck, splitBundlesByStage, stageDomains, suggestCategory, syncConstraintNodes, syncFromExternal, syncRoadmap, syncToExternal, tagUncitedFindings, topSkills, touchStream, trackAction, unfoldRange, unfoldSymbol, updateSessionEntryStatus, updateSessionIndex, validateAgentConfigs, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, validatePulseConfig, validateSolutionsDir, violationId, weeksUntilThreshold, weightedLinearRegression, writeConfig, writeLockfile, writePulseConfig, writeSessionSummary, writeTaint, xssRules };
9668
+ export { AGENT_DESCRIPTORS, AGREEMENT_LINE_GAP, ALLOWED_FIELD_KEYS, ALL_SOLUTION_CATEGORIES, ARCHITECTURE_DESCRIPTOR, type AST, type AcquireOptions, type ActionContext, type ActionEvent, type ActionEventHandler, type ActionEventType, type ActionResult, type ActionSink, type ActionTracker, type ActionType, type AdjustedForecast, AdjustedForecastSchema, type AgentAction, AgentActionEmitter, type AgentConfigFallbackReason, type AgentConfigFinding, type AgentConfigOptions, type AgentConfigSeverity, type AgentConfigValidation, type AgentExecutor, type AgentMapLink, type AgentMapSection, type AgentMapValidation, type AgentProcess, type AgentReviewResult, type AgentType, type AgentsMapConfig, type AnnotationIssue, type AnnotationIssueType, AnthropicCacheAdapter, type AppendLearningResult, ArchBaseline, ArchBaselineManager, ArchConfig, ArchDiffResult, ArchMetricCategory, type AssembleInput, BUG_DETECTION_DESCRIPTOR, BUG_TRACK_CATEGORIES, type BaseError, type Baseline, BaselineManager, type BaselinesFile, type BenchmarkResult, type BenchmarkRunOptions, BenchmarkRunner, type BlueprintData, BlueprintGenerator, type BlueprintModule, type BlueprintOptions, type BoundaryDefinition, type BoundaryValidation, type BoundaryValidator, type BoundaryViolation, type BrokenLink, type BudgetedLearningsOptions, type Bundle, type BundleConstraints, BundleConstraintsSchema, BundleSchema, CACHE_TTL_MS, CINotifier, COMPLIANCE_DESCRIPTOR, CORROBORATED_AGREEMENT, type CacheAdapter, type CategoryForecast, CategoryForecastSchema, CategorySnapshotSchema, type ChangeType, type ChangedFile, ChecklistBuilder, type CircularDependency, CircularDepsCollector, type CircularDepsResult, type CleanupFinding, type CodeBlock, type CodeChanges, type CodePattern, type CodeReference, type CodeSymbol, type CodebaseSnapshot, Collector, type CommentedCodeBlock, type CommitFormat, type CommitHistoryEntry, type CommitValidation, CompactionPipeline, type CompactionStrategy, ComplexityCollector, type ComplexityConfig, type ComplexityReport, type ComplexityThresholds, type ComplexityViolation, type CompoundLockHandle, CompoundLockHeldError, type ConfidenceTier, ConfidenceTierSchema, type ConfigError, type ConfigPattern, type Confirmation, ConfirmationSchema, ConflictError, type ConflictReport, ConsoleSink, type ConstraintError, type ConstraintNodeStore, ConstraintRule, type Content, type ContextBundle, type ContextError, type ContextFile, type ContextFilterResult, type ContextScopeOptions, ContributingFeatureSchema, type Contributions, ContributionsSchema, type Convention, CouplingCollector, type CouplingConfig, type CouplingReport, type CouplingThresholds, type CouplingViolation, type CoverageOptions, type CoverageReport, type CriticalPathEntry, CriticalPathResolver, type CriticalPathSet, type CustomRule, type CustomRuleResult, DEFAULT_LOADER_CONFIG, DEFAULT_PROVIDER_TIERS, DEFAULT_SECURITY_CONFIG, DEFAULT_STABILITY_THRESHOLDS, DEFAULT_STATE, DEFAULT_STREAM_INDEX, DEFAULT_TOKEN_BUDGET, DESTRUCTIVE_BASH, DOMAIN_BASELINES, type DailyAdoption, type DataPoint, type DeadCodeConfig, type DeadCodeReport, type DeadExport, type DeadFile, type DeadInternal, type DeduplicateFindingsOptions, DepDepthCollector, type DependencyEdge, type DependencyGraph, type DependencyValidation, type DependencyViolation, type DetectStaleResult, type DiffInfo, type Direction$1 as Direction, DirectionSchema$1 as DirectionSchema, type DocumentationDrift, type DocumentationFile, type DocumentationGap, type DriftConfig, type DriftReport, EMPTY_SUPPLY_CHAIN, ETagStore, EVIDENCE_SATURATION, EXTENSION_MAP, type EligibilityResult, EmergenceResult, type EmitEventInput, type EmitEventOptions, type EmitEventResult, type EmitInteractionInput, EmitInteractionInputSchema, EntropyAnalyzer, type EntropyConfig, EntropyConfigSchema, type EntropyError, type EntropyReport, type EstimatorCoefficients, type EventType, type EvidenceCoverageReport, ExclusionSet, type ExecutorHealth, type Export, type ExportMap, type ExternalSyncOptions, FACTOR_WEIGHTS, type FailureEntry, FailureEntrySchema, type FallbackPricingFile, type FanOutOptions, type FeaturePatch, type FeedbackAgentConfig, type FeedbackConfig, type FeedbackError$1 as FeedbackError, type FileCategory, type FileLessScoredCandidate, FileSink, type FindingLifecycle, FindingLifecycleSchema, type FindingSeverity, type Fix, type FixConfig, type FixResult, type FixType, ForbiddenImportCollector, type ForbiddenImportViolation, type ForbiddenPattern, type GateConfig, GateConfigSchema, type GateResult, GateResultSchema, GeminiCacheAdapter, type GenerateRubricOptions, type GenerationSection, type GitHubInlineComment, GitHubIssuesSyncAdapter, type GitScanOptions, type GraphAdapter, type GraphComplexityData, type GraphCouplingData, type GraphCoverageData, type GraphCriticalPathData, type GraphDependencyData, type GraphHarnessCheckData, type GraphImpactData, type GraphNode, type Handoff, HandoffSchema, type HarnessState, HarnessStateSchema, type HealthCheckResult, type HistoryEvent, type HistoryEventType, type Hotspot$1 as Hotspot, type HotspotContext, type Import, type InjectionFinding, type InjectionPattern, type InjectionSeverity, type InlineReference, type IntegrityReport, type InteractionType, InteractionTypeSchema, type InternalSymbol, type IsoWeek, type JSDocComment, KNOWLEDGE_TRACK_CATEGORIES, LITELLM_PRICING_URL, type LanguageParser, type Layer, type LayerConfig, LayerViolationCollector, type LearningPattern, type LearningsFrontmatter, type LearningsIndexEntry, type LiteLLMModelEntry, type LiteLLMPricingData, type LoadEventsOptions, type LoaderConfig, type Lockfile, type LockfilePackage, LockfilePackageSchema, LockfileSchema, type LogEntry, type LogFilter, MOCK_ADAPTER_NAME, type MakeTrackerConflictBodyOptions, type Manifest, ManifestSchema, type MechanicalCheckOptions, type MechanicalCheckResult, type MechanicalCheckStatus, type MechanicalFinding, type MergeResult, type Metric, MetricResult, type ModelProvider, type ModelTier, type ModelTierConfig, type ModuleDependency, ModuleSizeCollector, type NewFeatureInput, NoOpExecutor, NoOpSink, NoOpTelemetryAdapter, OpenAICacheAdapter, type OrchestratorResult, type OrphanedDep, type OutlineResult, type OverlapDimensions, type OverlapResult, PII_FIELD_DENYLIST, PII_LINE_RE, PII_TOKENS, type PackedEnvelope, type PaginatedSlice, type PaginationMeta, type ParallelGroups, type ParseError, type ParsedFile, type ParsedSection, type ParserLookup, type PatternConfig, PatternConfigSchema, type PatternMatch, type PatternReport, type PatternViolation, type PeerReview, type PeerReviewOptions, type PilotScoringOptions, type PipelineContext, type PipelineFlags, type PipelineOptions, type PipelineResult, type PrMetadata, PredictionEngine, type PredictionOptions, PredictionOptionsSchema, type RegressionResult as PredictionRegressionResult, RegressionResultSchema as PredictionRegressionResultSchema, type PredictionResult, PredictionResultSchema, type PredictionWarning, PredictionWarningSchema, type PricingCacheFile, type PricingDataset, type PriorReview, ProjectScanner, type PromoteResult, type ProtectedRegion, type ProtectedRegionMap, type ProtectionScope, type ProviderDefaults, type ProviderSystemBlock, type ProviderToolBlock, type PruneResult, PulseAdapterAlreadyRegisteredError, PulseConfigSchema, type PulseConfigValidation, PulseDbSourceSchema, PulseSourcesSchema, type Question, QuestionSchema, REQUIRED_SECTIONS, type ReachabilityNode, RegressionDetector, type RegressionFit, type RegressionReport, type RegressionResult$1 as RegressionResult, type ReviewAgentDescriptor, type ReviewAssessment, type ReviewChecklist, type ReviewComment, type ReviewContext, type ReviewDomain, type ReviewFinding, type ReviewItem, type ReviewOutputOptions, type ReviewPipelineResult, type ReviewStage, type ReviewStrength, type RoadmapMode, type RoadmapModeConfig, type RoadmapModeValidationConfig, type RoadmapTrackerClient, type Rubric, type RubricItem, type RuleOverride, RuleRegistry, type RunCIChecksInput, type RunPipelineOptions, SECURITY_DESCRIPTOR, STALENESS_WARNING_DAYS, STANDALONE_AGREEMENT, STATUS_RANK, type SafetyLevel, type ScanConfigFileResult, type ScanConfigFinding, type ScanConfigResult, type Hotspot as ScanHotspot, type HotspotOptions as ScanHotspotOptions, type ScanResult, type ScannedCommit, type ScoredCandidate, type SearchMatch, type SearchResult, type SecurityCategory, type SecurityCategorySnapshot, SecurityCategorySnapshotSchema, type SecurityConfidence, type SecurityConfig, SecurityConfigSchema, type Direction as SecurityDirection, DirectionSchema as SecurityDirectionSchema, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type SecurityTimelineFile, SecurityTimelineFileSchema, SecurityTimelineManager, type SecurityTimelineSnapshot, SecurityTimelineSnapshotSchema, type SecurityTrendLine, SecurityTrendLineSchema, type SecurityTrendResult, SecurityTrendResultSchema, type SeedOptions, type SelfReviewConfig, type SessionSummaryData, SharableBoundaryConfigSchema, SharableForbiddenImportSchema, SharableLayerSchema, SharableSecurityRulesSchema, type SizeBudgetConfig, type SizeBudgetReport, type SizeBudgetViolation, type SkillEvent, SkillEventSchema, type SkillExecutor, type SkillLoadPlan, SolutionDocFrontmatterSchema, type SolutionsDirValidation, type SourceFile, type Span, type SpanEvent, type SpecImpactEstimate, SpecImpactEstimateSchema, SpecImpactEstimator, SpecImpactSignalsSchema, type StabilityForecast, StabilityForecastSchema, type StabilityTaggedBlock, type StaleConstraint, type StalenessEntry, type StalenessReport, type StepExecutor, type StrategySeed, type StreamIndex, StreamIndexSchema, type StreamInfo, StreamInfoSchema, StructuralStrategy, type StructureValidation, type Suggestion, type SuggestionReport, type SupplyChainSnapshot, SupplyChainSnapshotSchema, type SupportedLanguage, type SuppressionRecord, type SymbolKind, type SyncChange, type SyncOptions, type TaintCheckResult, type TaintFinding, type TaintState, type TelemetryAdapter, type TelemetryHealth, ThresholdConfig, type TimeRange, type TimeToFixResult, TimeToFixResultSchema, type TimeToFixStats, TimeToFixStatsSchema, type CategorySnapshot as TimelineCategorySnapshot, type TimelineFile, TimelineFileSchema, TimelineManager, type TimelineSnapshot, TimelineSnapshotSchema, type TokenBudget, type TokenBudgetOverrides, type ToolDefinition, type Trace, type TrackedFeature, type TrackerClientConfig, type TrackerConflictBody, type TrackerSyncAdapter, type Transition, TransitionSchema, type TrendAttribution, TrendAttributionSchema, type TrendLine, TrendLineSchema, type TrendResult, TrendResultSchema, TruncationStrategy, type TrustScoreOptions, type TurnExecutor, TypeScriptParser, type UnfoldResult, type UnusedImport, type UpdateCheckState, VALIDATION_SCORES, VALID_SCOPES, VERSION, type ValidateFindingsOptions, type ValidationError, Violation, type ViolationCluster, ViolationHistory, ViolationHistoryManager, ViolationSnapshot, type WorkflowPhase, type WritePulseConfigOptions, acquireCompoundLock, addProvenance, agentConfigRules, aggregateByDay as aggregateAdoptionByDay, aggregateByDay$1 as aggregateByDay, aggregateBySession, aggregateBySkill, analyzeDiff, analyzeLearningPatterns, appendFailure, appendLearning, appendSessionEntry, applyFixes, applyHotspotDowngrade, applyRecencyWeights, applySyncChanges, archiveFailures, archiveLearnings, archiveSession, archiveStream, assembleCandidateReport, assembleReport, assertSanitized, assignFeature, buildDependencyGraph, buildExclusionSet, buildSnapshot, calculateCacheSavings, calculateCost, checkDocCoverage, checkEligibility, checkEvidenceCoverage, checkOverlap, checkTaint, classifyConfidence, classifyFinding, clearEventHashCache, clearFailuresCache, clearLearningsCache, clearPulseAdapters, clearTaint, clusterViolations, collectEvents, computeContentHash, computeHotspots, computeLexicalSimilarity, computeLoadPlan, computeOverallSeverity, computeScanExitCode, computeTrustScores, computeWindow, configureFeedback, constraintRuleId, contextBudget, contextFilter, countLearningEntries, createBoundaryValidator, createCommentedCodeFixes, createError, createFixes, createForbiddenImportFixes, createOrphanedDepFixes, createParseError, createRegionMap, createSelfReview, createStream, createTrackerClient, crossReferenceUndocumentedFixes, cryptoRules, deduplicateCleanupFindings, deduplicateFindings, deepMergeConstraints, defaultCollectors, defineLayer, deserializationRules, detectChangeType, detectCircularDeps, detectCircularDepsInFiles, detectComplexityViolations, detectCouplingViolations, detectDeadCode, detectDocDrift, detectEmergentConstraints, detectLanguage, detectPatternViolations, detectSizeBudgetViolations, detectStack, detectStaleConstraints, detectStaleLearnings, determineAssessment, diff, emitEvent, estimateTokens, executeWorkflow, expressRules, extractBundle, extractDirectoryScope, extractFileReferences, extractHeadlines, extractIndexEntry, extractLevel, extractMarkdownLinks, extractSections, fanOutReview, findParallelGroups, formatCIReportAsMarkdown, formatEventTimeline, formatFindingBlock, formatGitHubComment, formatGitHubSummary, formatIsoWeek, formatOutline, formatTerminalOutput, fullSync, generateAgentsMap, generateRubric, generateSuggestions, getActionEmitter, getExitCode, getFeedbackConfig, getInjectionPatterns, getModelPrice, getOrCreateInstallId, getOutline, getParser, getPhaseCategories, getPulseAdapter, getRoadmapMode, getStreamForBranch, getTaintFilePath, getTrustLevel, getUpdateNotification, gitScan, goRules, injectionRules, insecureDefaultsRules, isDuplicateFinding, isRegression, isSanitizedResult, isSmallSuggestion, isUpdateCheckEnabled, isoWeek, listActiveSessions, listPulseAdapters, listStreams, listTaintedSessions, loadBudgetedLearnings, loadEvents, loadFailures, loadHandoff, loadIndexEntries, loadPricingData, loadProjectRoadmapMode, loadRelevantLearnings, loadSessionSummary, loadState, loadStreamIndex, loadTrackerClientConfigFromProject, loadTrackerSyncConfig, logAgentAction, makeTrackerConflictBody, mapInjectionFindings, mapSecurityFindings, mapSecuritySeverity, markProtectedFindings, mcpRules, index as migrate, migrateToStreams, networkRules, nodeRules, normalizeLearningContent, normalizeViolationPattern, paginate, parseCCRecords, parseDateFromEntry, parseDiff, parseFile, parseFileRegions, parseFrontmatter, parseHarnessIgnore, parseLiteLLMData, parseLookback, parseManifest, parseProtectedRegions, parseRoadmap, parseSections, parseSecurityConfig, parseSize, pathTraversalRules, previewFix, projectValue, promoteSessionLearnings, pruneLearnings, reactRules, readAdoptionRecords, readCheckState, readCostRecords, readIdentity, readLockfile, readSessionSection, readSessionSections, readTaint, registerMockAdapter, registerPulseAdapter, removeContributions, removeProvenance, requestMultiplePeerReviews, requestPeerReview, resetFeedbackConfig, resetParserCache, resolveConsent, resolveFileToLayer, resolveModelTier, resolveReverseStatus, resolveRuleSeverity, resolveSessionDir, resolveStability, resolveStreamPath, resolveThresholds, runFallbackRules as runAgentConfigFallbackRules, runAll, runArchitectureAgent, runBugDetectionAgent, runCIChecks, runComplianceAgent, runMechanicalChecks, runMechanicalGate, runMultiTurnPipeline, runPipeline, runPulse, runReviewPipeline, runSecurityAgent, saveHandoff, saveState, saveStreamIndex, scanForInjection, scopeContext, scoreRoadmapCandidates, scoreRoadmapCandidatesFileLess, scoreRoadmapCandidatesForMode, searchSymbols, secretRules, securityFindingId, seedFromStrategy, send, serializeEnvelope, serializeRoadmap, setActiveStream, sharpEdgesRules, shouldRunCheck, spawnBackgroundCheck, splitBundlesByStage, stageDomains, suggestCategory, syncConstraintNodes, syncFromExternal, syncRoadmap, syncToExternal, tagUncitedFindings, topSkills, touchStream, trackAction, unfoldRange, unfoldSymbol, updateSessionEntryStatus, updateSessionIndex, validateAgentConfigs, validateAgentsMap, validateBoundaries, validateCommitMessage, validateConfig, validateDependencies, validateFileStructure, validateFindings, validateKnowledgeMap, validatePatternConfig, validatePulseConfig, validateRoadmapMode, validateSolutionsDir, violationId, weeksUntilThreshold, weightedLinearRegression, writeConfig, writeLockfile, writePulseConfig, writeSessionSummary, writeTaint, xssRules };