oreshnik-cli 0.1.0-alpha

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.
@@ -0,0 +1,2338 @@
1
+ import { z } from 'zod';
2
+
3
+ type Result<T, E = OreshnikError> = {
4
+ ok: true;
5
+ value: T;
6
+ } | {
7
+ ok: false;
8
+ error: E;
9
+ };
10
+ interface OreshnikError {
11
+ code: string;
12
+ message: string;
13
+ exitCode: number;
14
+ suggestion?: string;
15
+ }
16
+ declare function ok<T>(value: T): Result<T, never>;
17
+ declare function err<E extends OreshnikError>(error: E): Result<never, E>;
18
+ interface PorcelainEntry {
19
+ status: string;
20
+ path: string;
21
+ }
22
+ interface MergeOptions {
23
+ noCommit?: boolean;
24
+ noFF?: boolean;
25
+ strategy?: "union" | "ort" | "recursive";
26
+ message?: string;
27
+ }
28
+ interface MotherRef {
29
+ name: string;
30
+ version: number;
31
+ remote: boolean;
32
+ }
33
+ interface GitError extends OreshnikError {
34
+ code: "GIT_ERROR";
35
+ gitCommand?: string;
36
+ gitStderr?: string;
37
+ }
38
+ type TaskStatus = "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
39
+ interface Task {
40
+ id: string;
41
+ title: string;
42
+ owner: string;
43
+ backupOwner?: string;
44
+ status: TaskStatus;
45
+ track?: string;
46
+ zone?: string[];
47
+ dependsOn?: string[];
48
+ acceptance?: string[];
49
+ handoff?: string;
50
+ history?: TaskHistoryEntry[];
51
+ }
52
+ interface TaskHistoryEntry {
53
+ at: string;
54
+ action: string;
55
+ operator?: string;
56
+ from?: string;
57
+ to?: string;
58
+ reason?: string;
59
+ branch?: string;
60
+ description?: string;
61
+ }
62
+ interface Reassignment {
63
+ at: string;
64
+ task: string;
65
+ from: string;
66
+ to: string;
67
+ reason: string;
68
+ }
69
+ interface TaskBoard {
70
+ project: string;
71
+ updatedAt: string;
72
+ resiliencePolicy?: string;
73
+ closurePolicy?: string;
74
+ baseTestMatrix?: string[];
75
+ currentExecutionOrder: string[];
76
+ tasks: Task[];
77
+ reassignments?: Reassignment[];
78
+ }
79
+ interface MotherBranchEntry {
80
+ version: number;
81
+ name: string;
82
+ sprint: string;
83
+ operator: string;
84
+ date: string;
85
+ at: string;
86
+ previous: string;
87
+ description: string;
88
+ }
89
+ interface MotherVersion {
90
+ version: number;
91
+ current: string;
92
+ branches: MotherBranchEntry[];
93
+ }
94
+ type LockType = "operator_exclusive" | "operator_double" | "shared" | "forbidden" | "owner_per_sprint";
95
+ interface ZoneEntry {
96
+ owner: string;
97
+ lock: LockType;
98
+ sprints: string[];
99
+ criticality?: "low" | "medium" | "high" | "critical";
100
+ }
101
+ interface ZoneMap {
102
+ zones: Record<string, ZoneEntry>;
103
+ }
104
+ interface ZoneViolation {
105
+ file: string;
106
+ zone: string;
107
+ reason: string;
108
+ }
109
+ interface ZoneWarning {
110
+ file: string;
111
+ reason: string;
112
+ }
113
+ interface ZoneCheckResult {
114
+ violations: ZoneViolation[];
115
+ warnings: ZoneWarning[];
116
+ filesChecked: number;
117
+ }
118
+ interface Checkpoint {
119
+ id: string;
120
+ tag: string;
121
+ timestamp: string;
122
+ operator: string;
123
+ sprint?: string;
124
+ type: "auto" | "manual" | "pre-rollback";
125
+ git: {
126
+ tag: string;
127
+ commit: string;
128
+ branch: string;
129
+ motherBranch?: string;
130
+ motherVersion?: number;
131
+ };
132
+ state: {
133
+ taskBoard: TaskBoard;
134
+ motherVersion: MotherVersion;
135
+ workingTreeDirty: boolean;
136
+ stashRef: string | null;
137
+ };
138
+ validation?: {
139
+ typecheck?: "passed" | "failed" | "skipped";
140
+ build?: "passed" | "failed" | "skipped";
141
+ tests?: string;
142
+ zoneCheck?: "clean" | "violations";
143
+ canonicalCheck?: "aligned" | "drift";
144
+ };
145
+ }
146
+ interface DistributedLock {
147
+ zone: string;
148
+ owner: string;
149
+ acquiredAt: string;
150
+ expiresAt: string;
151
+ ttlMinutes: number;
152
+ sprint?: string;
153
+ reason: string;
154
+ }
155
+ interface GateDefinition {
156
+ name: string;
157
+ command: string;
158
+ args?: string[];
159
+ timeoutSeconds: number;
160
+ }
161
+ interface OreshnikConfig {
162
+ version: 1;
163
+ project: {
164
+ name: string;
165
+ mainBranch: string;
166
+ };
167
+ operators: Array<{
168
+ id: string;
169
+ name: string;
170
+ email?: string;
171
+ }>;
172
+ branching: {
173
+ motherPrefix: string;
174
+ childFormat: string;
175
+ integrationPrefix: string;
176
+ };
177
+ validation: {
178
+ gates: GateDefinition[];
179
+ };
180
+ hardStops: {
181
+ forbiddenPatterns: string[];
182
+ doubleLockPatterns: string[];
183
+ };
184
+ vault: {
185
+ enabled: boolean;
186
+ path: string;
187
+ centralDoc: string;
188
+ };
189
+ canonical?: {
190
+ derivedDocs?: DerivedDocConfig[];
191
+ knownLegacyTasks?: string[];
192
+ knownAssignmentTasks?: string[];
193
+ };
194
+ sync?: {
195
+ canonicalAutoConflicts?: string[];
196
+ };
197
+ checkpoints: {
198
+ autoOnClose: boolean;
199
+ autoPreRollback: boolean;
200
+ snapshotDir: string;
201
+ };
202
+ security: {
203
+ requireCleanTree: boolean;
204
+ secretScanning: boolean;
205
+ blockEnvDiffs: boolean;
206
+ };
207
+ }
208
+ type InjectionPolicy = "proposal_only" | "direct_with_approval";
209
+ interface PortfolioProject {
210
+ projectId: string;
211
+ displayName: string;
212
+ repoPath: string;
213
+ defaultBranch: string;
214
+ operators: string[];
215
+ taskBoardPath: string;
216
+ zoneMapPath: string;
217
+ validationGates: GateDefinition[];
218
+ injectionPolicy: InjectionPolicy;
219
+ priority: "low" | "medium" | "high" | "critical";
220
+ }
221
+ interface PortfolioConfig {
222
+ version: 1;
223
+ portfolio: {
224
+ id: string;
225
+ name: string;
226
+ sourceNote?: string;
227
+ continuityDocPath?: string;
228
+ };
229
+ projects: PortfolioProject[];
230
+ }
231
+ interface PortfolioProjectStatus {
232
+ projectId: string;
233
+ displayName: string;
234
+ repoPath: string;
235
+ repoExists: boolean;
236
+ taskBoardExists: boolean;
237
+ zoneMapExists: boolean;
238
+ validationGateCount: number;
239
+ injectionPolicy: InjectionPolicy;
240
+ warnings: string[];
241
+ }
242
+ interface PortfolioInspection {
243
+ configPath: string;
244
+ portfolioId: string;
245
+ portfolioName: string;
246
+ projectCount: number;
247
+ continuityDocPath?: string;
248
+ projects: PortfolioProjectStatus[];
249
+ }
250
+ interface PreflightResult {
251
+ sprint: string | null;
252
+ operator: string;
253
+ branch: string;
254
+ mother: string;
255
+ effectiveMother: string;
256
+ dirtyCount: number;
257
+ blockers: number;
258
+ warnings: number;
259
+ checks: PreflightCheck[];
260
+ at: string;
261
+ }
262
+ interface PreflightCheck {
263
+ step: number;
264
+ name: string;
265
+ status: "ok" | "fail" | "warn" | "skip";
266
+ message: string;
267
+ }
268
+ type EventType = "created" | "started" | "checkpoint" | "gate_passed" | "gate_failed" | "closed" | "rolled_back" | "reassigned";
269
+ interface SprintEvent {
270
+ sprint: string;
271
+ operator: string;
272
+ type: EventType;
273
+ date: string;
274
+ at: string;
275
+ branch?: string;
276
+ previousMother?: string;
277
+ nextMother?: string;
278
+ description?: string;
279
+ changedFiles?: string[];
280
+ gateResults?: Record<string, "passed" | "failed">;
281
+ }
282
+ interface MergeResult {
283
+ resolved: boolean;
284
+ content: string | null;
285
+ conflicts: string[];
286
+ }
287
+ interface LockHandle {
288
+ path: string;
289
+ fd: number;
290
+ }
291
+ interface StateError extends OreshnikError {
292
+ code: "STATE_ERROR";
293
+ }
294
+ interface OperationalMetrics {
295
+ sprintsClosed: number;
296
+ sprintsRolledBack: number;
297
+ conflictsAvoided: number;
298
+ zoneFalsePositives: number;
299
+ zoneFalseNegatives: number;
300
+ avgTimePreflightToClose: number;
301
+ filesOutOfZone: number;
302
+ gatesFailedByCategory: Record<string, number>;
303
+ parallelSprintsNoConflict: number;
304
+ incompleteHandoffs: number;
305
+ recoveryTimeAfterBlock: number;
306
+ updatedAt: string;
307
+ }
308
+ interface DerivedDocConfig {
309
+ path: string;
310
+ type: "central" | "collaborator" | "status-board";
311
+ source: "task-board";
312
+ filter?: {
313
+ owner?: string;
314
+ };
315
+ extra?: Record<string, string>;
316
+ }
317
+ interface CanonicalIssue {
318
+ file: string;
319
+ severity: "blocker" | "warn";
320
+ reason: string;
321
+ }
322
+ interface CanonicalCheckResult {
323
+ aligned: boolean;
324
+ issues: CanonicalIssue[];
325
+ boardUpdatedAt: string;
326
+ }
327
+ interface SyncResult {
328
+ success: boolean;
329
+ merged: boolean;
330
+ latestMother: string;
331
+ conflicts: string[];
332
+ autoResolved: string[];
333
+ manualRequired: string[];
334
+ }
335
+ interface VaultGuardResult {
336
+ clean: boolean;
337
+ configDirty: string[];
338
+ configRestored: boolean;
339
+ contentDirty: string[];
340
+ unstagedStagedOverlap: string[];
341
+ untracked: string[];
342
+ errors: string[];
343
+ }
344
+ interface CanonicalConfig {
345
+ autoFix: boolean;
346
+ derivedDocs: DerivedDocConfig[];
347
+ knownLegacyTasks: string[];
348
+ knownAssignmentTasks: string[];
349
+ }
350
+ interface SyncConfig {
351
+ canonicalAutoConflicts: string[];
352
+ derivedDocPaths: string[];
353
+ }
354
+ type TaskType = "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
355
+ type EvidenceType = "code" | "ui" | "docs" | "integration" | "prod";
356
+ interface NoteTask {
357
+ rawLine: string;
358
+ lineNumber: number;
359
+ checked: boolean;
360
+ projectIds: string[];
361
+ proposedType: TaskType;
362
+ proposedOwner: string;
363
+ proposedPriority: "low" | "medium" | "high" | "critical";
364
+ proposedSprintPrefix: string;
365
+ evidenceType: EvidenceType;
366
+ evidenceExpectation: string;
367
+ }
368
+ interface NotesIngestionResult {
369
+ sourcePath: string;
370
+ portfolioId: string;
371
+ parsedAt: string;
372
+ dryRun: boolean;
373
+ totalLines: number;
374
+ taskLines: number;
375
+ pendingCount: number;
376
+ doneCount: number;
377
+ tasksByProject: Record<string, NoteTask[]>;
378
+ unclassifiedTasks: NoteTask[];
379
+ warnings: string[];
380
+ }
381
+ interface ProjectInjectionResult {
382
+ projectId: string;
383
+ displayName: string;
384
+ injectionPolicy: InjectionPolicy;
385
+ repoPath: string;
386
+ tasksInjected: number;
387
+ tasksSkipped: number;
388
+ checkpointTag?: string;
389
+ handoffPath?: string;
390
+ proposalPath?: string;
391
+ blocked: boolean;
392
+ blockReason?: string;
393
+ warnings: string[];
394
+ }
395
+ interface InjectionResult {
396
+ portfolioId: string;
397
+ injectedAt: string;
398
+ dryRun: boolean;
399
+ confirmed: boolean;
400
+ projects: ProjectInjectionResult[];
401
+ summary: {
402
+ totalProjects: number;
403
+ projectsBlocked: number;
404
+ projectsInjected: number;
405
+ proposalsGenerated: number;
406
+ totalTasksInjected: number;
407
+ totalTasksSkipped: number;
408
+ };
409
+ errors: string[];
410
+ }
411
+ interface EvidenceRecord {
412
+ taskId: string;
413
+ evidenceType: EvidenceType;
414
+ validatedAt: string;
415
+ validator: string;
416
+ result: "passed" | "failed" | "pending";
417
+ details: string;
418
+ artifacts?: string[];
419
+ }
420
+ interface TaskEvidenceCheck {
421
+ taskId: string;
422
+ taskTitle: string;
423
+ evidenceType: EvidenceType;
424
+ hasEvidence: boolean;
425
+ requiredEvidence: string;
426
+ currentStatus: TaskStatus;
427
+ missing: string[];
428
+ }
429
+ interface EvidenceGateResult {
430
+ checkedAt: string;
431
+ sprint?: string;
432
+ operator: string;
433
+ totalTasks: number;
434
+ doneTasks: number;
435
+ tasksWithEvidence: number;
436
+ tasksWithoutEvidence: number;
437
+ tasks: TaskEvidenceCheck[];
438
+ passed: boolean;
439
+ blockers: string[];
440
+ }
441
+ interface ZoneLock {
442
+ zone: string;
443
+ operator: string;
444
+ sprint: string;
445
+ acquiredAt: string;
446
+ ttl: number;
447
+ expiresAt: string;
448
+ }
449
+ interface LockResult {
450
+ zone: string;
451
+ acquired: boolean;
452
+ existingLock?: ZoneLock;
453
+ error?: string;
454
+ }
455
+ interface LockList {
456
+ fetchedAt: string;
457
+ locks: ZoneLock[];
458
+ active: ZoneLock[];
459
+ expired: ZoneLock[];
460
+ }
461
+
462
+ declare class GitService {
463
+ private readonly cwd;
464
+ constructor(cwd: string);
465
+ exec(args: string[]): {
466
+ ok: boolean;
467
+ output: string;
468
+ error: string;
469
+ status: number;
470
+ };
471
+ private fail;
472
+ currentBranch(): Result<string, GitError>;
473
+ refExists(ref: string): boolean;
474
+ resolveRef(ref: string): Result<string, GitError>;
475
+ statusPorcelain(): Result<PorcelainEntry[], GitError>;
476
+ fetch(remote?: string): Result<void, GitError>;
477
+ getMergeBase(a: string, b: string): Result<string, GitError>;
478
+ discoverLatestMother(prefix?: string): Result<MotherRef | null, GitError>;
479
+ diffNames(base: string, target: string, paths?: string[]): Result<string[], GitError>;
480
+ unmergedFiles(): Result<string[], GitError>;
481
+ showRef(ref: string, file: string): Result<string | null, GitError>;
482
+ createBranch(name: string, from?: string): Result<void, GitError>;
483
+ checkout(branch: string): Result<void, GitError>;
484
+ merge(ref: string, options?: MergeOptions): Result<void, GitError>;
485
+ push(remote: string, branch: string, force?: boolean): Result<void, GitError>;
486
+ pushTag(remote: string, tag: string): Result<void, GitError>;
487
+ stage(files: string[]): Result<void, GitError>;
488
+ commit(message: string): Result<void, GitError>;
489
+ createTag(name: string, message: string): Result<void, GitError>;
490
+ deleteTag(name: string): Result<void, GitError>;
491
+ resetHard(ref: string): Result<void, GitError>;
492
+ deleteBranch(branch: string, force?: boolean): Result<void, GitError>;
493
+ stashPush(message?: string): Result<string | null, GitError>;
494
+ stashPop(): Result<void, GitError>;
495
+ pushLockRef(zone: string, _lockContent: string): Result<void, GitError>;
496
+ deleteLockRef(zone: string): Result<void, GitError>;
497
+ fetchLockRefs(): Result<string[], GitError>;
498
+ getLockContent(ref: string): Result<string | null, GitError>;
499
+ cherryPick(commit: string): Result<void, GitError>;
500
+ restoreFromHead(pattern: string): Result<void, GitError>;
501
+ userConfig(key: string): Result<string, GitError>;
502
+ mergeFileUnion(currentFile: string, baseFile: string, sourceFile: string): Result<string, GitError>;
503
+ }
504
+ declare function createGitService(cwd: string): GitService;
505
+
506
+ declare class ZoneEngine {
507
+ private globToRegex;
508
+ findMatchingZone(file: string, zoneMap: ZoneMap): {
509
+ pattern: string;
510
+ zone: ZoneMap["zones"][string];
511
+ } | null;
512
+ check(files: string[], operator: string, sprint: string, zoneMap: ZoneMap): ZoneCheckResult;
513
+ private checkLock;
514
+ getModifiedZones(files: string[], zoneMap: ZoneMap): Set<string>;
515
+ }
516
+ declare function createZoneEngine(): ZoneEngine;
517
+
518
+ declare class StateManager {
519
+ private readonly root;
520
+ private readonly runsDir;
521
+ constructor(root: string);
522
+ readJson<T>(filePath: string): Result<T, StateError>;
523
+ writeJson<T>(filePath: string, value: T): Result<void, StateError>;
524
+ readText(filePath: string): Result<string, StateError>;
525
+ writeText(filePath: string, content: string): Result<void, StateError>;
526
+ mergeTextUnion(file: string, base: string, current: string, source: string): Result<string, StateError>;
527
+ mergeJsonSmart(base: unknown, current: unknown, source: unknown): Result<unknown, StateError>;
528
+ private mergeValue;
529
+ acquireLocalLock(lockName: string, timeoutMs?: number): Result<LockHandle, StateError>;
530
+ private openExclusive;
531
+ releaseLocalLock(handle: LockHandle): Result<void, StateError>;
532
+ }
533
+ declare function createStateManager(root: string): StateManager;
534
+
535
+ declare class CanonicalService {
536
+ private readonly state;
537
+ private readonly root;
538
+ constructor(state: StateManager, root: string);
539
+ checkCanonicalAlignment(taskBoard: TaskBoard, derivedDocs: DerivedDocConfig[], mother: MotherVersion, relicTaskIds?: string[], assignmentTaskIds?: string[]): CanonicalCheckResult;
540
+ regenerateAllDerivedDocs(taskBoard: TaskBoard, derivedDocs: DerivedDocConfig[], mother: MotherVersion, projectName: string): Result<void, OreshnikError>;
541
+ generateCentral(taskBoard: TaskBoard, mother: MotherVersion, projectName: string, extra?: Record<string, string>): string;
542
+ generateCollaborator(taskBoard: TaskBoard, owner: string, projectName: string): string;
543
+ generateStatusBoard(taskBoard: TaskBoard, projectName: string): string;
544
+ private hasLegacyClosureConflict;
545
+ private hasAssignmentConflict;
546
+ private nowISO;
547
+ }
548
+ declare function createCanonicalService(state: StateManager, root: string): CanonicalService;
549
+
550
+ declare class SyncService {
551
+ private readonly git;
552
+ private readonly state;
553
+ private readonly canonical;
554
+ private readonly root;
555
+ constructor(git: GitService, state: StateManager, canonical: CanonicalService, root: string);
556
+ syncLatestMother(args: {
557
+ motherPrefix: string;
558
+ derivedDocPaths: string[];
559
+ canonicalAutoConflicts?: string[];
560
+ projectName: string;
561
+ derivedDocs: Array<{
562
+ path: string;
563
+ type: "central" | "collaborator" | "status-board";
564
+ filter?: {
565
+ owner?: string;
566
+ };
567
+ extra?: Record<string, string>;
568
+ }>;
569
+ operator: string;
570
+ }): SyncResult;
571
+ private mergeTaskBoardById;
572
+ private mergeUniqueReassignments;
573
+ private readMother;
574
+ private runsDir;
575
+ private toGitPath;
576
+ }
577
+ declare function createSyncService(git: GitService, state: StateManager, canonical: CanonicalService, root: string): SyncService;
578
+
579
+ declare class VaultGuard {
580
+ private readonly git;
581
+ constructor(git: GitService);
582
+ check(vaultPath: string, obsidianConfigDir: string, force?: boolean): VaultGuardResult;
583
+ restoreConfig(obsidianConfigDir: string): Result<void, OreshnikError>;
584
+ private gitDirtyFiles;
585
+ private gitDiffFiles;
586
+ private gitUntrackedFiles;
587
+ }
588
+ declare function createVaultGuard(git: GitService): VaultGuard;
589
+
590
+ declare class PortfolioService {
591
+ private readonly root;
592
+ constructor(root: string);
593
+ load(configPath?: string): Result<PortfolioConfig, StateError>;
594
+ inspect(configPath?: string): Result<PortfolioInspection, StateError>;
595
+ private inspectProject;
596
+ private resolvePath;
597
+ private fail;
598
+ }
599
+ declare function createPortfolioService(root: string): PortfolioService;
600
+
601
+ declare class NotesIngestionService {
602
+ private readonly root;
603
+ constructor(root: string);
604
+ ingest(options: {
605
+ sourcePath: string;
606
+ configPath?: string;
607
+ dryRun?: boolean;
608
+ }): Result<NotesIngestionResult, StateError>;
609
+ private loadPortfolio;
610
+ private classifyProject;
611
+ private classifyOwner;
612
+ private classifyTaskType;
613
+ private classifyPriority;
614
+ private resolveSprintPrefix;
615
+ private classifyEvidence;
616
+ private resolvePath;
617
+ private fail;
618
+ }
619
+ declare function createNotesIngestionService(root: string): NotesIngestionService;
620
+
621
+ declare class InjectionService {
622
+ private readonly root;
623
+ constructor(root: string);
624
+ inject(options: {
625
+ ingestion: NotesIngestionResult;
626
+ configPath?: string;
627
+ dryRun?: boolean;
628
+ confirm?: boolean;
629
+ projectFilter?: string[];
630
+ }): Result<InjectionResult, StateError>;
631
+ private injectIntoProject;
632
+ private generateProposal;
633
+ private generateHandoff;
634
+ private createPreInjectionCheckpoint;
635
+ private generateTaskId;
636
+ private loadPortfolio;
637
+ private resolveProjectPath;
638
+ private resolveLocalPath;
639
+ private fail;
640
+ }
641
+ declare function createInjectionService(root: string): InjectionService;
642
+
643
+ declare class EvidenceGateService {
644
+ check(taskBoard: TaskBoard, operator: string, sprint?: string): Result<EvidenceGateResult, StateError>;
645
+ generateChecklist(taskBoard: TaskBoard, operator: string): string;
646
+ private evaluateTaskEvidence;
647
+ private inferEvidenceType;
648
+ private fail;
649
+ }
650
+ declare function createEvidenceGateService(): EvidenceGateService;
651
+
652
+ interface BootstrapProjectResult {
653
+ projectId: string;
654
+ displayName: string;
655
+ repoPath: string;
656
+ repoExists: boolean;
657
+ taskBoardCreated: boolean;
658
+ zoneMapCreated: boolean;
659
+ gatesDocCreated: boolean;
660
+ errors: string[];
661
+ }
662
+ interface BootstrapResult {
663
+ portfolioId: string;
664
+ bootstrappedAt: string;
665
+ projects: BootstrapProjectResult[];
666
+ }
667
+ declare class BootstrapService {
668
+ private readonly root;
669
+ constructor(root: string);
670
+ bootstrap(configPath?: string, projectFilter?: string[]): Result<BootstrapResult, StateError>;
671
+ private bootstrapProject;
672
+ private loadPortfolio;
673
+ private resolveProjectPath;
674
+ private resolveLocalPath;
675
+ private fail;
676
+ }
677
+ declare function createBootstrapService(root: string): BootstrapService;
678
+
679
+ interface OperatorBreakdown {
680
+ operator: string;
681
+ ready: number;
682
+ active: number;
683
+ done: number;
684
+ blocked: number;
685
+ pending: number;
686
+ total: number;
687
+ }
688
+ interface TaskEntry {
689
+ id: string;
690
+ title: string;
691
+ owner: string;
692
+ status: string;
693
+ dependsOn: string[];
694
+ }
695
+ interface LockSummary {
696
+ zone: string;
697
+ operator: string;
698
+ sprint: string;
699
+ expiresAt: string;
700
+ remainingMinutes: number;
701
+ }
702
+ interface ProjectDashboard {
703
+ projectId: string;
704
+ displayName: string;
705
+ repoPath: string;
706
+ repoExists: boolean;
707
+ taskBoardExists: boolean;
708
+ zoneMapExists: boolean;
709
+ injectionPolicy: string;
710
+ priority: string;
711
+ taskCounts: {
712
+ total: number;
713
+ ready: number;
714
+ active: number;
715
+ done: number;
716
+ blocked: number;
717
+ pending: number;
718
+ };
719
+ operatorBreakdown: OperatorBreakdown[];
720
+ tasks: TaskEntry[];
721
+ locks: LockSummary[];
722
+ lastUpdated?: string;
723
+ warnings: string[];
724
+ }
725
+ interface PortfolioDashboard {
726
+ portfolioId: string;
727
+ portfolioName: string;
728
+ generatedAt: string;
729
+ projectCount: number;
730
+ projectsWithRepo: number;
731
+ projectsReady: number;
732
+ projectsBlocked: number;
733
+ totalTasks: number;
734
+ totalDone: number;
735
+ totalPending: number;
736
+ projects: ProjectDashboard[];
737
+ }
738
+ declare class DashboardService {
739
+ private readonly root;
740
+ private lockService;
741
+ constructor(root: string);
742
+ generate(configPath?: string): Result<PortfolioDashboard, StateError>;
743
+ toMarkdown(dashboard: PortfolioDashboard): string;
744
+ private inspectProject;
745
+ private loadPortfolio;
746
+ private resolvePath;
747
+ private fail;
748
+ }
749
+ declare function createDashboardService(root: string): DashboardService;
750
+
751
+ interface ProjectZoneCheck {
752
+ projectId: string;
753
+ displayName: string;
754
+ repoPath: string;
755
+ zoneMapExists: boolean;
756
+ zoneMapValid: boolean;
757
+ branch: string;
758
+ filesChecked: number;
759
+ violations: ZoneViolation[];
760
+ warnings: ZoneWarning[];
761
+ passed: boolean;
762
+ errors: string[];
763
+ }
764
+ interface PortfolioZoneCheck {
765
+ portfolioId: string;
766
+ checkedAt: string;
767
+ operator: string;
768
+ sprint?: string;
769
+ projects: ProjectZoneCheck[];
770
+ summary: {
771
+ totalProjects: number;
772
+ projectsWithZoneMap: number;
773
+ projectsWithViolations: number;
774
+ projectsPassed: number;
775
+ totalViolations: number;
776
+ totalWarnings: number;
777
+ };
778
+ }
779
+ declare class ZoneCheckService {
780
+ private readonly root;
781
+ constructor(root: string);
782
+ checkAll(configPath: string, operator: string, sprint?: string, projectFilter?: string[]): Result<PortfolioZoneCheck, StateError>;
783
+ private checkProject;
784
+ private loadPortfolio;
785
+ private resolvePath;
786
+ private fail;
787
+ }
788
+ declare function createZoneCheckService(root: string): ZoneCheckService;
789
+
790
+ interface ProjectAudit {
791
+ projectId: string;
792
+ displayName: string;
793
+ repoPath: string;
794
+ repoExists: boolean;
795
+ branch: string;
796
+ lastCommit?: {
797
+ hash: string;
798
+ message: string;
799
+ date: string;
800
+ author: string;
801
+ };
802
+ checkpointTags: string[];
803
+ taskBoardExists: boolean;
804
+ taskCount: number;
805
+ zoneMapExists: boolean;
806
+ zoneMapValid: boolean;
807
+ modifiedFiles: number;
808
+ errors: string[];
809
+ }
810
+ interface PortfolioAudit {
811
+ portfolioId: string;
812
+ auditedAt: string;
813
+ projects: ProjectAudit[];
814
+ summary: {
815
+ totalProjects: number;
816
+ projectsWithRepo: number;
817
+ projectsDirty: number;
818
+ projectsClean: number;
819
+ totalTasks: number;
820
+ totalCheckpoints: number;
821
+ };
822
+ }
823
+ declare class AuditService {
824
+ private readonly root;
825
+ constructor(root: string);
826
+ audit(configPath?: string, projectFilter?: string[]): Result<PortfolioAudit, StateError>;
827
+ secretScan(configPath?: string): Result<string[], StateError>;
828
+ private auditProject;
829
+ private loadPortfolio;
830
+ private resolvePath;
831
+ private fail;
832
+ }
833
+ declare function createAuditService(root: string): AuditService;
834
+
835
+ declare class LockService {
836
+ private git;
837
+ constructor(repoPath: string);
838
+ acquire(zone: string, operator: string, sprint: string, ttl?: number): Result<LockResult, StateError>;
839
+ release(zone: string): Result<LockResult, StateError>;
840
+ check(zone?: string): Result<LockList, StateError>;
841
+ private sanitizeRef;
842
+ private fail;
843
+ }
844
+ declare function createLockService(repoPath: string): LockService;
845
+
846
+ type LogLevel = "OK" | "FAIL" | "WARN" | "INFO";
847
+ declare function log(level: LogLevel, message: string): void;
848
+ declare function header(title: string, subtitle?: string): void;
849
+ declare function statusBox(lines: Array<[string, string]>): void;
850
+ declare function resultSummary(blockers: number, warnings: number, operator: string, sprint: string, branch: string, mother: string): void;
851
+
852
+ declare function sanitize(value: string, maxLength?: number): string;
853
+ declare function today(): string;
854
+ declare function nowISO(): string;
855
+ declare function nowDisplay(timeZone?: string): {
856
+ display: string;
857
+ iso: string;
858
+ date: string;
859
+ };
860
+ declare function formatBranchName(template: string, vars: Record<string, string>): string;
861
+ declare function nonIgnoredDirtyFiles(porcelain: Array<{
862
+ status: string;
863
+ path: string;
864
+ }>): string[];
865
+ declare function isMotherBranch(branch: string): boolean;
866
+ declare function isChildBranch(branch: string, operator: string): boolean;
867
+
868
+ declare function execCommand(command: string, args: string[], options?: {
869
+ cwd?: string;
870
+ timeout?: number;
871
+ }): Result<{
872
+ output: string;
873
+ exitCode: number;
874
+ }, GitError>;
875
+ declare function execCommandInherit(command: string, args: string[], options?: {
876
+ cwd?: string;
877
+ timeout?: number;
878
+ }): Result<{
879
+ exitCode: number;
880
+ }, GitError>;
881
+
882
+ declare const TaskBoardSchema: z.ZodObject<{
883
+ project: z.ZodString;
884
+ updatedAt: z.ZodString;
885
+ resiliencePolicy: z.ZodOptional<z.ZodString>;
886
+ closurePolicy: z.ZodOptional<z.ZodString>;
887
+ baseTestMatrix: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
888
+ currentExecutionOrder: z.ZodArray<z.ZodString, "many">;
889
+ tasks: z.ZodArray<z.ZodObject<{
890
+ id: z.ZodString;
891
+ title: z.ZodString;
892
+ owner: z.ZodString;
893
+ backupOwner: z.ZodOptional<z.ZodString>;
894
+ status: z.ZodEnum<["ready", "active", "pending", "blocked", "done", "rolled_back"]>;
895
+ track: z.ZodOptional<z.ZodString>;
896
+ zone: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
897
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
898
+ acceptance: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
899
+ handoff: z.ZodOptional<z.ZodString>;
900
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
901
+ at: z.ZodString;
902
+ action: z.ZodString;
903
+ operator: z.ZodOptional<z.ZodString>;
904
+ from: z.ZodOptional<z.ZodString>;
905
+ to: z.ZodOptional<z.ZodString>;
906
+ reason: z.ZodOptional<z.ZodString>;
907
+ branch: z.ZodOptional<z.ZodString>;
908
+ description: z.ZodOptional<z.ZodString>;
909
+ }, "strip", z.ZodTypeAny, {
910
+ at: string;
911
+ action: string;
912
+ branch?: string | undefined;
913
+ reason?: string | undefined;
914
+ operator?: string | undefined;
915
+ from?: string | undefined;
916
+ to?: string | undefined;
917
+ description?: string | undefined;
918
+ }, {
919
+ at: string;
920
+ action: string;
921
+ branch?: string | undefined;
922
+ reason?: string | undefined;
923
+ operator?: string | undefined;
924
+ from?: string | undefined;
925
+ to?: string | undefined;
926
+ description?: string | undefined;
927
+ }>, "many">>;
928
+ }, "strip", z.ZodTypeAny, {
929
+ status: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
930
+ owner: string;
931
+ id: string;
932
+ title: string;
933
+ zone?: string[] | undefined;
934
+ backupOwner?: string | undefined;
935
+ track?: string | undefined;
936
+ dependsOn?: string[] | undefined;
937
+ acceptance?: string[] | undefined;
938
+ handoff?: string | undefined;
939
+ history?: {
940
+ at: string;
941
+ action: string;
942
+ branch?: string | undefined;
943
+ reason?: string | undefined;
944
+ operator?: string | undefined;
945
+ from?: string | undefined;
946
+ to?: string | undefined;
947
+ description?: string | undefined;
948
+ }[] | undefined;
949
+ }, {
950
+ status: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
951
+ owner: string;
952
+ id: string;
953
+ title: string;
954
+ zone?: string[] | undefined;
955
+ backupOwner?: string | undefined;
956
+ track?: string | undefined;
957
+ dependsOn?: string[] | undefined;
958
+ acceptance?: string[] | undefined;
959
+ handoff?: string | undefined;
960
+ history?: {
961
+ at: string;
962
+ action: string;
963
+ branch?: string | undefined;
964
+ reason?: string | undefined;
965
+ operator?: string | undefined;
966
+ from?: string | undefined;
967
+ to?: string | undefined;
968
+ description?: string | undefined;
969
+ }[] | undefined;
970
+ }>, "many">;
971
+ reassignments: z.ZodOptional<z.ZodArray<z.ZodObject<{
972
+ at: z.ZodString;
973
+ task: z.ZodString;
974
+ from: z.ZodString;
975
+ to: z.ZodString;
976
+ reason: z.ZodString;
977
+ }, "strip", z.ZodTypeAny, {
978
+ at: string;
979
+ reason: string;
980
+ from: string;
981
+ to: string;
982
+ task: string;
983
+ }, {
984
+ at: string;
985
+ reason: string;
986
+ from: string;
987
+ to: string;
988
+ task: string;
989
+ }>, "many">>;
990
+ }, "strip", z.ZodTypeAny, {
991
+ project: string;
992
+ updatedAt: string;
993
+ currentExecutionOrder: string[];
994
+ tasks: {
995
+ status: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
996
+ owner: string;
997
+ id: string;
998
+ title: string;
999
+ zone?: string[] | undefined;
1000
+ backupOwner?: string | undefined;
1001
+ track?: string | undefined;
1002
+ dependsOn?: string[] | undefined;
1003
+ acceptance?: string[] | undefined;
1004
+ handoff?: string | undefined;
1005
+ history?: {
1006
+ at: string;
1007
+ action: string;
1008
+ branch?: string | undefined;
1009
+ reason?: string | undefined;
1010
+ operator?: string | undefined;
1011
+ from?: string | undefined;
1012
+ to?: string | undefined;
1013
+ description?: string | undefined;
1014
+ }[] | undefined;
1015
+ }[];
1016
+ resiliencePolicy?: string | undefined;
1017
+ closurePolicy?: string | undefined;
1018
+ baseTestMatrix?: string[] | undefined;
1019
+ reassignments?: {
1020
+ at: string;
1021
+ reason: string;
1022
+ from: string;
1023
+ to: string;
1024
+ task: string;
1025
+ }[] | undefined;
1026
+ }, {
1027
+ project: string;
1028
+ updatedAt: string;
1029
+ currentExecutionOrder: string[];
1030
+ tasks: {
1031
+ status: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
1032
+ owner: string;
1033
+ id: string;
1034
+ title: string;
1035
+ zone?: string[] | undefined;
1036
+ backupOwner?: string | undefined;
1037
+ track?: string | undefined;
1038
+ dependsOn?: string[] | undefined;
1039
+ acceptance?: string[] | undefined;
1040
+ handoff?: string | undefined;
1041
+ history?: {
1042
+ at: string;
1043
+ action: string;
1044
+ branch?: string | undefined;
1045
+ reason?: string | undefined;
1046
+ operator?: string | undefined;
1047
+ from?: string | undefined;
1048
+ to?: string | undefined;
1049
+ description?: string | undefined;
1050
+ }[] | undefined;
1051
+ }[];
1052
+ resiliencePolicy?: string | undefined;
1053
+ closurePolicy?: string | undefined;
1054
+ baseTestMatrix?: string[] | undefined;
1055
+ reassignments?: {
1056
+ at: string;
1057
+ reason: string;
1058
+ from: string;
1059
+ to: string;
1060
+ task: string;
1061
+ }[] | undefined;
1062
+ }>;
1063
+ declare const MotherVersionSchema: z.ZodObject<{
1064
+ version: z.ZodNumber;
1065
+ current: z.ZodString;
1066
+ branches: z.ZodArray<z.ZodObject<{
1067
+ version: z.ZodNumber;
1068
+ name: z.ZodString;
1069
+ sprint: z.ZodString;
1070
+ operator: z.ZodString;
1071
+ date: z.ZodString;
1072
+ at: z.ZodString;
1073
+ previous: z.ZodString;
1074
+ description: z.ZodString;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ name: string;
1077
+ version: number;
1078
+ at: string;
1079
+ operator: string;
1080
+ description: string;
1081
+ date: string;
1082
+ sprint: string;
1083
+ previous: string;
1084
+ }, {
1085
+ name: string;
1086
+ version: number;
1087
+ at: string;
1088
+ operator: string;
1089
+ description: string;
1090
+ date: string;
1091
+ sprint: string;
1092
+ previous: string;
1093
+ }>, "many">;
1094
+ }, "strip", z.ZodTypeAny, {
1095
+ version: number;
1096
+ current: string;
1097
+ branches: {
1098
+ name: string;
1099
+ version: number;
1100
+ at: string;
1101
+ operator: string;
1102
+ description: string;
1103
+ date: string;
1104
+ sprint: string;
1105
+ previous: string;
1106
+ }[];
1107
+ }, {
1108
+ version: number;
1109
+ current: string;
1110
+ branches: {
1111
+ name: string;
1112
+ version: number;
1113
+ at: string;
1114
+ operator: string;
1115
+ description: string;
1116
+ date: string;
1117
+ sprint: string;
1118
+ previous: string;
1119
+ }[];
1120
+ }>;
1121
+ declare const ZoneMapSchema: z.ZodObject<{
1122
+ zones: z.ZodRecord<z.ZodString, z.ZodObject<{
1123
+ owner: z.ZodString;
1124
+ lock: z.ZodEnum<["operator_exclusive", "operator_double", "shared", "forbidden", "owner_per_sprint"]>;
1125
+ sprints: z.ZodArray<z.ZodString, "many">;
1126
+ criticality: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
1127
+ }, "strip", z.ZodTypeAny, {
1128
+ owner: string;
1129
+ lock: "operator_exclusive" | "operator_double" | "shared" | "forbidden" | "owner_per_sprint";
1130
+ sprints: string[];
1131
+ criticality?: "low" | "medium" | "high" | "critical" | undefined;
1132
+ }, {
1133
+ owner: string;
1134
+ lock: "operator_exclusive" | "operator_double" | "shared" | "forbidden" | "owner_per_sprint";
1135
+ sprints: string[];
1136
+ criticality?: "low" | "medium" | "high" | "critical" | undefined;
1137
+ }>>;
1138
+ }, "strip", z.ZodTypeAny, {
1139
+ zones: Record<string, {
1140
+ owner: string;
1141
+ lock: "operator_exclusive" | "operator_double" | "shared" | "forbidden" | "owner_per_sprint";
1142
+ sprints: string[];
1143
+ criticality?: "low" | "medium" | "high" | "critical" | undefined;
1144
+ }>;
1145
+ }, {
1146
+ zones: Record<string, {
1147
+ owner: string;
1148
+ lock: "operator_exclusive" | "operator_double" | "shared" | "forbidden" | "owner_per_sprint";
1149
+ sprints: string[];
1150
+ criticality?: "low" | "medium" | "high" | "critical" | undefined;
1151
+ }>;
1152
+ }>;
1153
+ declare const DerivedDocConfigSchema: z.ZodObject<{
1154
+ path: z.ZodString;
1155
+ type: z.ZodEnum<["central", "collaborator", "status-board"]>;
1156
+ source: z.ZodLiteral<"task-board">;
1157
+ filter: z.ZodOptional<z.ZodObject<{
1158
+ owner: z.ZodString;
1159
+ }, "strip", z.ZodTypeAny, {
1160
+ owner: string;
1161
+ }, {
1162
+ owner: string;
1163
+ }>>;
1164
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1165
+ }, "strip", z.ZodTypeAny, {
1166
+ path: string;
1167
+ type: "central" | "collaborator" | "status-board";
1168
+ source: "task-board";
1169
+ filter?: {
1170
+ owner: string;
1171
+ } | undefined;
1172
+ extra?: Record<string, string> | undefined;
1173
+ }, {
1174
+ path: string;
1175
+ type: "central" | "collaborator" | "status-board";
1176
+ source: "task-board";
1177
+ filter?: {
1178
+ owner: string;
1179
+ } | undefined;
1180
+ extra?: Record<string, string> | undefined;
1181
+ }>;
1182
+ declare const OreshnikConfigSchema: z.ZodObject<{
1183
+ version: z.ZodLiteral<1>;
1184
+ project: z.ZodObject<{
1185
+ name: z.ZodString;
1186
+ mainBranch: z.ZodDefault<z.ZodString>;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ name: string;
1189
+ mainBranch: string;
1190
+ }, {
1191
+ name: string;
1192
+ mainBranch?: string | undefined;
1193
+ }>;
1194
+ operators: z.ZodArray<z.ZodObject<{
1195
+ id: z.ZodString;
1196
+ name: z.ZodString;
1197
+ email: z.ZodOptional<z.ZodString>;
1198
+ }, "strip", z.ZodTypeAny, {
1199
+ name: string;
1200
+ id: string;
1201
+ email?: string | undefined;
1202
+ }, {
1203
+ name: string;
1204
+ id: string;
1205
+ email?: string | undefined;
1206
+ }>, "many">;
1207
+ branching: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1208
+ motherPrefix: z.ZodDefault<z.ZodString>;
1209
+ childFormat: z.ZodDefault<z.ZodString>;
1210
+ integrationPrefix: z.ZodDefault<z.ZodString>;
1211
+ }, "strip", z.ZodTypeAny, {
1212
+ motherPrefix: string;
1213
+ childFormat: string;
1214
+ integrationPrefix: string;
1215
+ }, {
1216
+ motherPrefix?: string | undefined;
1217
+ childFormat?: string | undefined;
1218
+ integrationPrefix?: string | undefined;
1219
+ }>>>;
1220
+ validation: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1221
+ gates: z.ZodDefault<z.ZodArray<z.ZodObject<{
1222
+ name: z.ZodString;
1223
+ command: z.ZodString;
1224
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1225
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ name: string;
1228
+ command: string;
1229
+ timeoutSeconds: number;
1230
+ args?: string[] | undefined;
1231
+ }, {
1232
+ name: string;
1233
+ command: string;
1234
+ args?: string[] | undefined;
1235
+ timeoutSeconds?: number | undefined;
1236
+ }>, "many">>;
1237
+ }, "strip", z.ZodTypeAny, {
1238
+ gates: {
1239
+ name: string;
1240
+ command: string;
1241
+ timeoutSeconds: number;
1242
+ args?: string[] | undefined;
1243
+ }[];
1244
+ }, {
1245
+ gates?: {
1246
+ name: string;
1247
+ command: string;
1248
+ args?: string[] | undefined;
1249
+ timeoutSeconds?: number | undefined;
1250
+ }[] | undefined;
1251
+ }>>>;
1252
+ hardStops: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1253
+ forbiddenPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1254
+ doubleLockPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1255
+ }, "strip", z.ZodTypeAny, {
1256
+ forbiddenPatterns: string[];
1257
+ doubleLockPatterns: string[];
1258
+ }, {
1259
+ forbiddenPatterns?: string[] | undefined;
1260
+ doubleLockPatterns?: string[] | undefined;
1261
+ }>>>;
1262
+ vault: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1263
+ enabled: z.ZodDefault<z.ZodBoolean>;
1264
+ path: z.ZodDefault<z.ZodString>;
1265
+ centralDoc: z.ZodDefault<z.ZodString>;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ path: string;
1268
+ enabled: boolean;
1269
+ centralDoc: string;
1270
+ }, {
1271
+ path?: string | undefined;
1272
+ enabled?: boolean | undefined;
1273
+ centralDoc?: string | undefined;
1274
+ }>>>;
1275
+ canonical: z.ZodOptional<z.ZodObject<{
1276
+ derivedDocs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1277
+ path: z.ZodString;
1278
+ type: z.ZodEnum<["central", "collaborator", "status-board"]>;
1279
+ source: z.ZodLiteral<"task-board">;
1280
+ filter: z.ZodOptional<z.ZodObject<{
1281
+ owner: z.ZodString;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ owner: string;
1284
+ }, {
1285
+ owner: string;
1286
+ }>>;
1287
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1288
+ }, "strip", z.ZodTypeAny, {
1289
+ path: string;
1290
+ type: "central" | "collaborator" | "status-board";
1291
+ source: "task-board";
1292
+ filter?: {
1293
+ owner: string;
1294
+ } | undefined;
1295
+ extra?: Record<string, string> | undefined;
1296
+ }, {
1297
+ path: string;
1298
+ type: "central" | "collaborator" | "status-board";
1299
+ source: "task-board";
1300
+ filter?: {
1301
+ owner: string;
1302
+ } | undefined;
1303
+ extra?: Record<string, string> | undefined;
1304
+ }>, "many">>;
1305
+ knownLegacyTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1306
+ knownAssignmentTasks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ derivedDocs?: {
1309
+ path: string;
1310
+ type: "central" | "collaborator" | "status-board";
1311
+ source: "task-board";
1312
+ filter?: {
1313
+ owner: string;
1314
+ } | undefined;
1315
+ extra?: Record<string, string> | undefined;
1316
+ }[] | undefined;
1317
+ knownLegacyTasks?: string[] | undefined;
1318
+ knownAssignmentTasks?: string[] | undefined;
1319
+ }, {
1320
+ derivedDocs?: {
1321
+ path: string;
1322
+ type: "central" | "collaborator" | "status-board";
1323
+ source: "task-board";
1324
+ filter?: {
1325
+ owner: string;
1326
+ } | undefined;
1327
+ extra?: Record<string, string> | undefined;
1328
+ }[] | undefined;
1329
+ knownLegacyTasks?: string[] | undefined;
1330
+ knownAssignmentTasks?: string[] | undefined;
1331
+ }>>;
1332
+ sync: z.ZodOptional<z.ZodObject<{
1333
+ canonicalAutoConflicts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ canonicalAutoConflicts?: string[] | undefined;
1336
+ }, {
1337
+ canonicalAutoConflicts?: string[] | undefined;
1338
+ }>>;
1339
+ checkpoints: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1340
+ autoOnClose: z.ZodDefault<z.ZodBoolean>;
1341
+ autoPreRollback: z.ZodDefault<z.ZodBoolean>;
1342
+ snapshotDir: z.ZodDefault<z.ZodString>;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ autoOnClose: boolean;
1345
+ autoPreRollback: boolean;
1346
+ snapshotDir: string;
1347
+ }, {
1348
+ autoOnClose?: boolean | undefined;
1349
+ autoPreRollback?: boolean | undefined;
1350
+ snapshotDir?: string | undefined;
1351
+ }>>>;
1352
+ security: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1353
+ requireCleanTree: z.ZodDefault<z.ZodBoolean>;
1354
+ secretScanning: z.ZodDefault<z.ZodBoolean>;
1355
+ blockEnvDiffs: z.ZodDefault<z.ZodBoolean>;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ requireCleanTree: boolean;
1358
+ secretScanning: boolean;
1359
+ blockEnvDiffs: boolean;
1360
+ }, {
1361
+ requireCleanTree?: boolean | undefined;
1362
+ secretScanning?: boolean | undefined;
1363
+ blockEnvDiffs?: boolean | undefined;
1364
+ }>>>;
1365
+ }, "strip", z.ZodTypeAny, {
1366
+ version: 1;
1367
+ validation: {
1368
+ gates: {
1369
+ name: string;
1370
+ command: string;
1371
+ timeoutSeconds: number;
1372
+ args?: string[] | undefined;
1373
+ }[];
1374
+ };
1375
+ project: {
1376
+ name: string;
1377
+ mainBranch: string;
1378
+ };
1379
+ operators: {
1380
+ name: string;
1381
+ id: string;
1382
+ email?: string | undefined;
1383
+ }[];
1384
+ branching: {
1385
+ motherPrefix: string;
1386
+ childFormat: string;
1387
+ integrationPrefix: string;
1388
+ };
1389
+ hardStops: {
1390
+ forbiddenPatterns: string[];
1391
+ doubleLockPatterns: string[];
1392
+ };
1393
+ vault: {
1394
+ path: string;
1395
+ enabled: boolean;
1396
+ centralDoc: string;
1397
+ };
1398
+ checkpoints: {
1399
+ autoOnClose: boolean;
1400
+ autoPreRollback: boolean;
1401
+ snapshotDir: string;
1402
+ };
1403
+ security: {
1404
+ requireCleanTree: boolean;
1405
+ secretScanning: boolean;
1406
+ blockEnvDiffs: boolean;
1407
+ };
1408
+ canonical?: {
1409
+ derivedDocs?: {
1410
+ path: string;
1411
+ type: "central" | "collaborator" | "status-board";
1412
+ source: "task-board";
1413
+ filter?: {
1414
+ owner: string;
1415
+ } | undefined;
1416
+ extra?: Record<string, string> | undefined;
1417
+ }[] | undefined;
1418
+ knownLegacyTasks?: string[] | undefined;
1419
+ knownAssignmentTasks?: string[] | undefined;
1420
+ } | undefined;
1421
+ sync?: {
1422
+ canonicalAutoConflicts?: string[] | undefined;
1423
+ } | undefined;
1424
+ }, {
1425
+ version: 1;
1426
+ project: {
1427
+ name: string;
1428
+ mainBranch?: string | undefined;
1429
+ };
1430
+ operators: {
1431
+ name: string;
1432
+ id: string;
1433
+ email?: string | undefined;
1434
+ }[];
1435
+ validation?: {
1436
+ gates?: {
1437
+ name: string;
1438
+ command: string;
1439
+ args?: string[] | undefined;
1440
+ timeoutSeconds?: number | undefined;
1441
+ }[] | undefined;
1442
+ } | undefined;
1443
+ branching?: {
1444
+ motherPrefix?: string | undefined;
1445
+ childFormat?: string | undefined;
1446
+ integrationPrefix?: string | undefined;
1447
+ } | undefined;
1448
+ hardStops?: {
1449
+ forbiddenPatterns?: string[] | undefined;
1450
+ doubleLockPatterns?: string[] | undefined;
1451
+ } | undefined;
1452
+ vault?: {
1453
+ path?: string | undefined;
1454
+ enabled?: boolean | undefined;
1455
+ centralDoc?: string | undefined;
1456
+ } | undefined;
1457
+ canonical?: {
1458
+ derivedDocs?: {
1459
+ path: string;
1460
+ type: "central" | "collaborator" | "status-board";
1461
+ source: "task-board";
1462
+ filter?: {
1463
+ owner: string;
1464
+ } | undefined;
1465
+ extra?: Record<string, string> | undefined;
1466
+ }[] | undefined;
1467
+ knownLegacyTasks?: string[] | undefined;
1468
+ knownAssignmentTasks?: string[] | undefined;
1469
+ } | undefined;
1470
+ sync?: {
1471
+ canonicalAutoConflicts?: string[] | undefined;
1472
+ } | undefined;
1473
+ checkpoints?: {
1474
+ autoOnClose?: boolean | undefined;
1475
+ autoPreRollback?: boolean | undefined;
1476
+ snapshotDir?: string | undefined;
1477
+ } | undefined;
1478
+ security?: {
1479
+ requireCleanTree?: boolean | undefined;
1480
+ secretScanning?: boolean | undefined;
1481
+ blockEnvDiffs?: boolean | undefined;
1482
+ } | undefined;
1483
+ }>;
1484
+ declare const PortfolioProjectSchema: z.ZodObject<{
1485
+ projectId: z.ZodString;
1486
+ displayName: z.ZodString;
1487
+ repoPath: z.ZodString;
1488
+ defaultBranch: z.ZodString;
1489
+ operators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1490
+ taskBoardPath: z.ZodDefault<z.ZodString>;
1491
+ zoneMapPath: z.ZodDefault<z.ZodString>;
1492
+ validationGates: z.ZodDefault<z.ZodArray<z.ZodObject<{
1493
+ name: z.ZodString;
1494
+ command: z.ZodString;
1495
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1496
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1497
+ }, "strip", z.ZodTypeAny, {
1498
+ name: string;
1499
+ command: string;
1500
+ timeoutSeconds: number;
1501
+ args?: string[] | undefined;
1502
+ }, {
1503
+ name: string;
1504
+ command: string;
1505
+ args?: string[] | undefined;
1506
+ timeoutSeconds?: number | undefined;
1507
+ }>, "many">>;
1508
+ injectionPolicy: z.ZodDefault<z.ZodEnum<["proposal_only", "direct_with_approval"]>>;
1509
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ operators: string[];
1512
+ projectId: string;
1513
+ displayName: string;
1514
+ repoPath: string;
1515
+ defaultBranch: string;
1516
+ taskBoardPath: string;
1517
+ zoneMapPath: string;
1518
+ validationGates: {
1519
+ name: string;
1520
+ command: string;
1521
+ timeoutSeconds: number;
1522
+ args?: string[] | undefined;
1523
+ }[];
1524
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1525
+ priority: "low" | "medium" | "high" | "critical";
1526
+ }, {
1527
+ projectId: string;
1528
+ displayName: string;
1529
+ repoPath: string;
1530
+ defaultBranch: string;
1531
+ operators?: string[] | undefined;
1532
+ taskBoardPath?: string | undefined;
1533
+ zoneMapPath?: string | undefined;
1534
+ validationGates?: {
1535
+ name: string;
1536
+ command: string;
1537
+ args?: string[] | undefined;
1538
+ timeoutSeconds?: number | undefined;
1539
+ }[] | undefined;
1540
+ injectionPolicy?: "proposal_only" | "direct_with_approval" | undefined;
1541
+ priority?: "low" | "medium" | "high" | "critical" | undefined;
1542
+ }>;
1543
+ declare const PortfolioConfigSchema: z.ZodObject<{
1544
+ version: z.ZodLiteral<1>;
1545
+ portfolio: z.ZodObject<{
1546
+ id: z.ZodString;
1547
+ name: z.ZodString;
1548
+ sourceNote: z.ZodOptional<z.ZodString>;
1549
+ continuityDocPath: z.ZodOptional<z.ZodString>;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ name: string;
1552
+ id: string;
1553
+ sourceNote?: string | undefined;
1554
+ continuityDocPath?: string | undefined;
1555
+ }, {
1556
+ name: string;
1557
+ id: string;
1558
+ sourceNote?: string | undefined;
1559
+ continuityDocPath?: string | undefined;
1560
+ }>;
1561
+ projects: z.ZodArray<z.ZodObject<{
1562
+ projectId: z.ZodString;
1563
+ displayName: z.ZodString;
1564
+ repoPath: z.ZodString;
1565
+ defaultBranch: z.ZodString;
1566
+ operators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1567
+ taskBoardPath: z.ZodDefault<z.ZodString>;
1568
+ zoneMapPath: z.ZodDefault<z.ZodString>;
1569
+ validationGates: z.ZodDefault<z.ZodArray<z.ZodObject<{
1570
+ name: z.ZodString;
1571
+ command: z.ZodString;
1572
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1573
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1574
+ }, "strip", z.ZodTypeAny, {
1575
+ name: string;
1576
+ command: string;
1577
+ timeoutSeconds: number;
1578
+ args?: string[] | undefined;
1579
+ }, {
1580
+ name: string;
1581
+ command: string;
1582
+ args?: string[] | undefined;
1583
+ timeoutSeconds?: number | undefined;
1584
+ }>, "many">>;
1585
+ injectionPolicy: z.ZodDefault<z.ZodEnum<["proposal_only", "direct_with_approval"]>>;
1586
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
1587
+ }, "strip", z.ZodTypeAny, {
1588
+ operators: string[];
1589
+ projectId: string;
1590
+ displayName: string;
1591
+ repoPath: string;
1592
+ defaultBranch: string;
1593
+ taskBoardPath: string;
1594
+ zoneMapPath: string;
1595
+ validationGates: {
1596
+ name: string;
1597
+ command: string;
1598
+ timeoutSeconds: number;
1599
+ args?: string[] | undefined;
1600
+ }[];
1601
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1602
+ priority: "low" | "medium" | "high" | "critical";
1603
+ }, {
1604
+ projectId: string;
1605
+ displayName: string;
1606
+ repoPath: string;
1607
+ defaultBranch: string;
1608
+ operators?: string[] | undefined;
1609
+ taskBoardPath?: string | undefined;
1610
+ zoneMapPath?: string | undefined;
1611
+ validationGates?: {
1612
+ name: string;
1613
+ command: string;
1614
+ args?: string[] | undefined;
1615
+ timeoutSeconds?: number | undefined;
1616
+ }[] | undefined;
1617
+ injectionPolicy?: "proposal_only" | "direct_with_approval" | undefined;
1618
+ priority?: "low" | "medium" | "high" | "critical" | undefined;
1619
+ }>, "many">;
1620
+ }, "strip", z.ZodTypeAny, {
1621
+ version: 1;
1622
+ portfolio: {
1623
+ name: string;
1624
+ id: string;
1625
+ sourceNote?: string | undefined;
1626
+ continuityDocPath?: string | undefined;
1627
+ };
1628
+ projects: {
1629
+ operators: string[];
1630
+ projectId: string;
1631
+ displayName: string;
1632
+ repoPath: string;
1633
+ defaultBranch: string;
1634
+ taskBoardPath: string;
1635
+ zoneMapPath: string;
1636
+ validationGates: {
1637
+ name: string;
1638
+ command: string;
1639
+ timeoutSeconds: number;
1640
+ args?: string[] | undefined;
1641
+ }[];
1642
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1643
+ priority: "low" | "medium" | "high" | "critical";
1644
+ }[];
1645
+ }, {
1646
+ version: 1;
1647
+ portfolio: {
1648
+ name: string;
1649
+ id: string;
1650
+ sourceNote?: string | undefined;
1651
+ continuityDocPath?: string | undefined;
1652
+ };
1653
+ projects: {
1654
+ projectId: string;
1655
+ displayName: string;
1656
+ repoPath: string;
1657
+ defaultBranch: string;
1658
+ operators?: string[] | undefined;
1659
+ taskBoardPath?: string | undefined;
1660
+ zoneMapPath?: string | undefined;
1661
+ validationGates?: {
1662
+ name: string;
1663
+ command: string;
1664
+ args?: string[] | undefined;
1665
+ timeoutSeconds?: number | undefined;
1666
+ }[] | undefined;
1667
+ injectionPolicy?: "proposal_only" | "direct_with_approval" | undefined;
1668
+ priority?: "low" | "medium" | "high" | "critical" | undefined;
1669
+ }[];
1670
+ }>;
1671
+ declare const SprintIdSchema: z.ZodString;
1672
+ declare const OperatorIdSchema: z.ZodString;
1673
+ declare const NoteTaskSchema: z.ZodObject<{
1674
+ rawLine: z.ZodString;
1675
+ lineNumber: z.ZodNumber;
1676
+ checked: z.ZodBoolean;
1677
+ projectIds: z.ZodArray<z.ZodString, "many">;
1678
+ proposedType: z.ZodEnum<["feature", "bug", "qa", "docs", "architecture", "migration", "ops"]>;
1679
+ proposedOwner: z.ZodString;
1680
+ proposedPriority: z.ZodEnum<["low", "medium", "high", "critical"]>;
1681
+ proposedSprintPrefix: z.ZodString;
1682
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
1683
+ evidenceExpectation: z.ZodString;
1684
+ }, "strip", z.ZodTypeAny, {
1685
+ rawLine: string;
1686
+ lineNumber: number;
1687
+ checked: boolean;
1688
+ projectIds: string[];
1689
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1690
+ proposedOwner: string;
1691
+ proposedPriority: "low" | "medium" | "high" | "critical";
1692
+ proposedSprintPrefix: string;
1693
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1694
+ evidenceExpectation: string;
1695
+ }, {
1696
+ rawLine: string;
1697
+ lineNumber: number;
1698
+ checked: boolean;
1699
+ projectIds: string[];
1700
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1701
+ proposedOwner: string;
1702
+ proposedPriority: "low" | "medium" | "high" | "critical";
1703
+ proposedSprintPrefix: string;
1704
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1705
+ evidenceExpectation: string;
1706
+ }>;
1707
+ declare const NotesIngestionResultSchema: z.ZodObject<{
1708
+ sourcePath: z.ZodString;
1709
+ portfolioId: z.ZodString;
1710
+ parsedAt: z.ZodString;
1711
+ dryRun: z.ZodBoolean;
1712
+ totalLines: z.ZodNumber;
1713
+ taskLines: z.ZodNumber;
1714
+ pendingCount: z.ZodNumber;
1715
+ doneCount: z.ZodNumber;
1716
+ tasksByProject: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1717
+ rawLine: z.ZodString;
1718
+ lineNumber: z.ZodNumber;
1719
+ checked: z.ZodBoolean;
1720
+ projectIds: z.ZodArray<z.ZodString, "many">;
1721
+ proposedType: z.ZodEnum<["feature", "bug", "qa", "docs", "architecture", "migration", "ops"]>;
1722
+ proposedOwner: z.ZodString;
1723
+ proposedPriority: z.ZodEnum<["low", "medium", "high", "critical"]>;
1724
+ proposedSprintPrefix: z.ZodString;
1725
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
1726
+ evidenceExpectation: z.ZodString;
1727
+ }, "strip", z.ZodTypeAny, {
1728
+ rawLine: string;
1729
+ lineNumber: number;
1730
+ checked: boolean;
1731
+ projectIds: string[];
1732
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1733
+ proposedOwner: string;
1734
+ proposedPriority: "low" | "medium" | "high" | "critical";
1735
+ proposedSprintPrefix: string;
1736
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1737
+ evidenceExpectation: string;
1738
+ }, {
1739
+ rawLine: string;
1740
+ lineNumber: number;
1741
+ checked: boolean;
1742
+ projectIds: string[];
1743
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1744
+ proposedOwner: string;
1745
+ proposedPriority: "low" | "medium" | "high" | "critical";
1746
+ proposedSprintPrefix: string;
1747
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1748
+ evidenceExpectation: string;
1749
+ }>, "many">>;
1750
+ unclassifiedTasks: z.ZodArray<z.ZodObject<{
1751
+ rawLine: z.ZodString;
1752
+ lineNumber: z.ZodNumber;
1753
+ checked: z.ZodBoolean;
1754
+ projectIds: z.ZodArray<z.ZodString, "many">;
1755
+ proposedType: z.ZodEnum<["feature", "bug", "qa", "docs", "architecture", "migration", "ops"]>;
1756
+ proposedOwner: z.ZodString;
1757
+ proposedPriority: z.ZodEnum<["low", "medium", "high", "critical"]>;
1758
+ proposedSprintPrefix: z.ZodString;
1759
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
1760
+ evidenceExpectation: z.ZodString;
1761
+ }, "strip", z.ZodTypeAny, {
1762
+ rawLine: string;
1763
+ lineNumber: number;
1764
+ checked: boolean;
1765
+ projectIds: string[];
1766
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1767
+ proposedOwner: string;
1768
+ proposedPriority: "low" | "medium" | "high" | "critical";
1769
+ proposedSprintPrefix: string;
1770
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1771
+ evidenceExpectation: string;
1772
+ }, {
1773
+ rawLine: string;
1774
+ lineNumber: number;
1775
+ checked: boolean;
1776
+ projectIds: string[];
1777
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1778
+ proposedOwner: string;
1779
+ proposedPriority: "low" | "medium" | "high" | "critical";
1780
+ proposedSprintPrefix: string;
1781
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1782
+ evidenceExpectation: string;
1783
+ }>, "many">;
1784
+ warnings: z.ZodArray<z.ZodString, "many">;
1785
+ }, "strip", z.ZodTypeAny, {
1786
+ sourcePath: string;
1787
+ portfolioId: string;
1788
+ parsedAt: string;
1789
+ dryRun: boolean;
1790
+ totalLines: number;
1791
+ taskLines: number;
1792
+ pendingCount: number;
1793
+ doneCount: number;
1794
+ tasksByProject: Record<string, {
1795
+ rawLine: string;
1796
+ lineNumber: number;
1797
+ checked: boolean;
1798
+ projectIds: string[];
1799
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1800
+ proposedOwner: string;
1801
+ proposedPriority: "low" | "medium" | "high" | "critical";
1802
+ proposedSprintPrefix: string;
1803
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1804
+ evidenceExpectation: string;
1805
+ }[]>;
1806
+ unclassifiedTasks: {
1807
+ rawLine: string;
1808
+ lineNumber: number;
1809
+ checked: boolean;
1810
+ projectIds: string[];
1811
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1812
+ proposedOwner: string;
1813
+ proposedPriority: "low" | "medium" | "high" | "critical";
1814
+ proposedSprintPrefix: string;
1815
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1816
+ evidenceExpectation: string;
1817
+ }[];
1818
+ warnings: string[];
1819
+ }, {
1820
+ sourcePath: string;
1821
+ portfolioId: string;
1822
+ parsedAt: string;
1823
+ dryRun: boolean;
1824
+ totalLines: number;
1825
+ taskLines: number;
1826
+ pendingCount: number;
1827
+ doneCount: number;
1828
+ tasksByProject: Record<string, {
1829
+ rawLine: string;
1830
+ lineNumber: number;
1831
+ checked: boolean;
1832
+ projectIds: string[];
1833
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1834
+ proposedOwner: string;
1835
+ proposedPriority: "low" | "medium" | "high" | "critical";
1836
+ proposedSprintPrefix: string;
1837
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1838
+ evidenceExpectation: string;
1839
+ }[]>;
1840
+ unclassifiedTasks: {
1841
+ rawLine: string;
1842
+ lineNumber: number;
1843
+ checked: boolean;
1844
+ projectIds: string[];
1845
+ proposedType: "feature" | "bug" | "qa" | "docs" | "architecture" | "migration" | "ops";
1846
+ proposedOwner: string;
1847
+ proposedPriority: "low" | "medium" | "high" | "critical";
1848
+ proposedSprintPrefix: string;
1849
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
1850
+ evidenceExpectation: string;
1851
+ }[];
1852
+ warnings: string[];
1853
+ }>;
1854
+ declare const ProjectInjectionResultSchema: z.ZodObject<{
1855
+ projectId: z.ZodString;
1856
+ displayName: z.ZodString;
1857
+ injectionPolicy: z.ZodEnum<["proposal_only", "direct_with_approval"]>;
1858
+ repoPath: z.ZodString;
1859
+ tasksInjected: z.ZodNumber;
1860
+ tasksSkipped: z.ZodNumber;
1861
+ checkpointTag: z.ZodOptional<z.ZodString>;
1862
+ handoffPath: z.ZodOptional<z.ZodString>;
1863
+ proposalPath: z.ZodOptional<z.ZodString>;
1864
+ blocked: z.ZodBoolean;
1865
+ blockReason: z.ZodOptional<z.ZodString>;
1866
+ warnings: z.ZodArray<z.ZodString, "many">;
1867
+ }, "strip", z.ZodTypeAny, {
1868
+ blocked: boolean;
1869
+ projectId: string;
1870
+ displayName: string;
1871
+ repoPath: string;
1872
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1873
+ warnings: string[];
1874
+ tasksInjected: number;
1875
+ tasksSkipped: number;
1876
+ checkpointTag?: string | undefined;
1877
+ handoffPath?: string | undefined;
1878
+ proposalPath?: string | undefined;
1879
+ blockReason?: string | undefined;
1880
+ }, {
1881
+ blocked: boolean;
1882
+ projectId: string;
1883
+ displayName: string;
1884
+ repoPath: string;
1885
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1886
+ warnings: string[];
1887
+ tasksInjected: number;
1888
+ tasksSkipped: number;
1889
+ checkpointTag?: string | undefined;
1890
+ handoffPath?: string | undefined;
1891
+ proposalPath?: string | undefined;
1892
+ blockReason?: string | undefined;
1893
+ }>;
1894
+ declare const InjectionResultSchema: z.ZodObject<{
1895
+ portfolioId: z.ZodString;
1896
+ injectedAt: z.ZodString;
1897
+ dryRun: z.ZodBoolean;
1898
+ confirmed: z.ZodBoolean;
1899
+ projects: z.ZodArray<z.ZodObject<{
1900
+ projectId: z.ZodString;
1901
+ displayName: z.ZodString;
1902
+ injectionPolicy: z.ZodEnum<["proposal_only", "direct_with_approval"]>;
1903
+ repoPath: z.ZodString;
1904
+ tasksInjected: z.ZodNumber;
1905
+ tasksSkipped: z.ZodNumber;
1906
+ checkpointTag: z.ZodOptional<z.ZodString>;
1907
+ handoffPath: z.ZodOptional<z.ZodString>;
1908
+ proposalPath: z.ZodOptional<z.ZodString>;
1909
+ blocked: z.ZodBoolean;
1910
+ blockReason: z.ZodOptional<z.ZodString>;
1911
+ warnings: z.ZodArray<z.ZodString, "many">;
1912
+ }, "strip", z.ZodTypeAny, {
1913
+ blocked: boolean;
1914
+ projectId: string;
1915
+ displayName: string;
1916
+ repoPath: string;
1917
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1918
+ warnings: string[];
1919
+ tasksInjected: number;
1920
+ tasksSkipped: number;
1921
+ checkpointTag?: string | undefined;
1922
+ handoffPath?: string | undefined;
1923
+ proposalPath?: string | undefined;
1924
+ blockReason?: string | undefined;
1925
+ }, {
1926
+ blocked: boolean;
1927
+ projectId: string;
1928
+ displayName: string;
1929
+ repoPath: string;
1930
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1931
+ warnings: string[];
1932
+ tasksInjected: number;
1933
+ tasksSkipped: number;
1934
+ checkpointTag?: string | undefined;
1935
+ handoffPath?: string | undefined;
1936
+ proposalPath?: string | undefined;
1937
+ blockReason?: string | undefined;
1938
+ }>, "many">;
1939
+ summary: z.ZodObject<{
1940
+ totalProjects: z.ZodNumber;
1941
+ projectsBlocked: z.ZodNumber;
1942
+ projectsInjected: z.ZodNumber;
1943
+ proposalsGenerated: z.ZodNumber;
1944
+ totalTasksInjected: z.ZodNumber;
1945
+ totalTasksSkipped: z.ZodNumber;
1946
+ }, "strip", z.ZodTypeAny, {
1947
+ totalProjects: number;
1948
+ projectsBlocked: number;
1949
+ projectsInjected: number;
1950
+ proposalsGenerated: number;
1951
+ totalTasksInjected: number;
1952
+ totalTasksSkipped: number;
1953
+ }, {
1954
+ totalProjects: number;
1955
+ projectsBlocked: number;
1956
+ projectsInjected: number;
1957
+ proposalsGenerated: number;
1958
+ totalTasksInjected: number;
1959
+ totalTasksSkipped: number;
1960
+ }>;
1961
+ errors: z.ZodArray<z.ZodString, "many">;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ projects: {
1964
+ blocked: boolean;
1965
+ projectId: string;
1966
+ displayName: string;
1967
+ repoPath: string;
1968
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1969
+ warnings: string[];
1970
+ tasksInjected: number;
1971
+ tasksSkipped: number;
1972
+ checkpointTag?: string | undefined;
1973
+ handoffPath?: string | undefined;
1974
+ proposalPath?: string | undefined;
1975
+ blockReason?: string | undefined;
1976
+ }[];
1977
+ errors: string[];
1978
+ portfolioId: string;
1979
+ dryRun: boolean;
1980
+ injectedAt: string;
1981
+ confirmed: boolean;
1982
+ summary: {
1983
+ totalProjects: number;
1984
+ projectsBlocked: number;
1985
+ projectsInjected: number;
1986
+ proposalsGenerated: number;
1987
+ totalTasksInjected: number;
1988
+ totalTasksSkipped: number;
1989
+ };
1990
+ }, {
1991
+ projects: {
1992
+ blocked: boolean;
1993
+ projectId: string;
1994
+ displayName: string;
1995
+ repoPath: string;
1996
+ injectionPolicy: "proposal_only" | "direct_with_approval";
1997
+ warnings: string[];
1998
+ tasksInjected: number;
1999
+ tasksSkipped: number;
2000
+ checkpointTag?: string | undefined;
2001
+ handoffPath?: string | undefined;
2002
+ proposalPath?: string | undefined;
2003
+ blockReason?: string | undefined;
2004
+ }[];
2005
+ errors: string[];
2006
+ portfolioId: string;
2007
+ dryRun: boolean;
2008
+ injectedAt: string;
2009
+ confirmed: boolean;
2010
+ summary: {
2011
+ totalProjects: number;
2012
+ projectsBlocked: number;
2013
+ projectsInjected: number;
2014
+ proposalsGenerated: number;
2015
+ totalTasksInjected: number;
2016
+ totalTasksSkipped: number;
2017
+ };
2018
+ }>;
2019
+ declare const EvidenceRecordSchema: z.ZodObject<{
2020
+ taskId: z.ZodString;
2021
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
2022
+ validatedAt: z.ZodString;
2023
+ validator: z.ZodString;
2024
+ result: z.ZodEnum<["passed", "failed", "pending"]>;
2025
+ details: z.ZodString;
2026
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2027
+ }, "strip", z.ZodTypeAny, {
2028
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2029
+ taskId: string;
2030
+ validatedAt: string;
2031
+ validator: string;
2032
+ result: "pending" | "passed" | "failed";
2033
+ details: string;
2034
+ artifacts?: string[] | undefined;
2035
+ }, {
2036
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2037
+ taskId: string;
2038
+ validatedAt: string;
2039
+ validator: string;
2040
+ result: "pending" | "passed" | "failed";
2041
+ details: string;
2042
+ artifacts?: string[] | undefined;
2043
+ }>;
2044
+ declare const TaskEvidenceCheckSchema: z.ZodObject<{
2045
+ taskId: z.ZodString;
2046
+ taskTitle: z.ZodString;
2047
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
2048
+ hasEvidence: z.ZodBoolean;
2049
+ requiredEvidence: z.ZodString;
2050
+ currentStatus: z.ZodEnum<["ready", "active", "pending", "blocked", "done", "rolled_back"]>;
2051
+ missing: z.ZodArray<z.ZodString, "many">;
2052
+ }, "strip", z.ZodTypeAny, {
2053
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2054
+ taskId: string;
2055
+ taskTitle: string;
2056
+ hasEvidence: boolean;
2057
+ requiredEvidence: string;
2058
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2059
+ missing: string[];
2060
+ }, {
2061
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2062
+ taskId: string;
2063
+ taskTitle: string;
2064
+ hasEvidence: boolean;
2065
+ requiredEvidence: string;
2066
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2067
+ missing: string[];
2068
+ }>;
2069
+ declare const EvidenceGateResultSchema: z.ZodObject<{
2070
+ checkedAt: z.ZodString;
2071
+ sprint: z.ZodOptional<z.ZodString>;
2072
+ operator: z.ZodString;
2073
+ totalTasks: z.ZodNumber;
2074
+ doneTasks: z.ZodNumber;
2075
+ tasksWithEvidence: z.ZodNumber;
2076
+ tasksWithoutEvidence: z.ZodNumber;
2077
+ tasks: z.ZodArray<z.ZodObject<{
2078
+ taskId: z.ZodString;
2079
+ taskTitle: z.ZodString;
2080
+ evidenceType: z.ZodEnum<["code", "ui", "docs", "integration", "prod"]>;
2081
+ hasEvidence: z.ZodBoolean;
2082
+ requiredEvidence: z.ZodString;
2083
+ currentStatus: z.ZodEnum<["ready", "active", "pending", "blocked", "done", "rolled_back"]>;
2084
+ missing: z.ZodArray<z.ZodString, "many">;
2085
+ }, "strip", z.ZodTypeAny, {
2086
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2087
+ taskId: string;
2088
+ taskTitle: string;
2089
+ hasEvidence: boolean;
2090
+ requiredEvidence: string;
2091
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2092
+ missing: string[];
2093
+ }, {
2094
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2095
+ taskId: string;
2096
+ taskTitle: string;
2097
+ hasEvidence: boolean;
2098
+ requiredEvidence: string;
2099
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2100
+ missing: string[];
2101
+ }>, "many">;
2102
+ passed: z.ZodBoolean;
2103
+ blockers: z.ZodArray<z.ZodString, "many">;
2104
+ }, "strip", z.ZodTypeAny, {
2105
+ passed: boolean;
2106
+ operator: string;
2107
+ tasks: {
2108
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2109
+ taskId: string;
2110
+ taskTitle: string;
2111
+ hasEvidence: boolean;
2112
+ requiredEvidence: string;
2113
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2114
+ missing: string[];
2115
+ }[];
2116
+ checkedAt: string;
2117
+ totalTasks: number;
2118
+ doneTasks: number;
2119
+ tasksWithEvidence: number;
2120
+ tasksWithoutEvidence: number;
2121
+ blockers: string[];
2122
+ sprint?: string | undefined;
2123
+ }, {
2124
+ passed: boolean;
2125
+ operator: string;
2126
+ tasks: {
2127
+ evidenceType: "docs" | "code" | "ui" | "integration" | "prod";
2128
+ taskId: string;
2129
+ taskTitle: string;
2130
+ hasEvidence: boolean;
2131
+ requiredEvidence: string;
2132
+ currentStatus: "ready" | "active" | "pending" | "blocked" | "done" | "rolled_back";
2133
+ missing: string[];
2134
+ }[];
2135
+ checkedAt: string;
2136
+ totalTasks: number;
2137
+ doneTasks: number;
2138
+ tasksWithEvidence: number;
2139
+ tasksWithoutEvidence: number;
2140
+ blockers: string[];
2141
+ sprint?: string | undefined;
2142
+ }>;
2143
+ declare const ZoneLockSchema: z.ZodObject<{
2144
+ zone: z.ZodString;
2145
+ operator: z.ZodString;
2146
+ sprint: z.ZodString;
2147
+ acquiredAt: z.ZodString;
2148
+ ttl: z.ZodNumber;
2149
+ expiresAt: z.ZodString;
2150
+ }, "strip", z.ZodTypeAny, {
2151
+ zone: string;
2152
+ operator: string;
2153
+ sprint: string;
2154
+ acquiredAt: string;
2155
+ expiresAt: string;
2156
+ ttl: number;
2157
+ }, {
2158
+ zone: string;
2159
+ operator: string;
2160
+ sprint: string;
2161
+ acquiredAt: string;
2162
+ expiresAt: string;
2163
+ ttl: number;
2164
+ }>;
2165
+ declare const LockResultSchema: z.ZodObject<{
2166
+ zone: z.ZodString;
2167
+ acquired: z.ZodBoolean;
2168
+ existingLock: z.ZodOptional<z.ZodObject<{
2169
+ zone: z.ZodString;
2170
+ operator: z.ZodString;
2171
+ sprint: z.ZodString;
2172
+ acquiredAt: z.ZodString;
2173
+ ttl: z.ZodNumber;
2174
+ expiresAt: z.ZodString;
2175
+ }, "strip", z.ZodTypeAny, {
2176
+ zone: string;
2177
+ operator: string;
2178
+ sprint: string;
2179
+ acquiredAt: string;
2180
+ expiresAt: string;
2181
+ ttl: number;
2182
+ }, {
2183
+ zone: string;
2184
+ operator: string;
2185
+ sprint: string;
2186
+ acquiredAt: string;
2187
+ expiresAt: string;
2188
+ ttl: number;
2189
+ }>>;
2190
+ error: z.ZodOptional<z.ZodString>;
2191
+ }, "strip", z.ZodTypeAny, {
2192
+ zone: string;
2193
+ acquired: boolean;
2194
+ error?: string | undefined;
2195
+ existingLock?: {
2196
+ zone: string;
2197
+ operator: string;
2198
+ sprint: string;
2199
+ acquiredAt: string;
2200
+ expiresAt: string;
2201
+ ttl: number;
2202
+ } | undefined;
2203
+ }, {
2204
+ zone: string;
2205
+ acquired: boolean;
2206
+ error?: string | undefined;
2207
+ existingLock?: {
2208
+ zone: string;
2209
+ operator: string;
2210
+ sprint: string;
2211
+ acquiredAt: string;
2212
+ expiresAt: string;
2213
+ ttl: number;
2214
+ } | undefined;
2215
+ }>;
2216
+ declare const LockListSchema: z.ZodObject<{
2217
+ fetchedAt: z.ZodString;
2218
+ locks: z.ZodArray<z.ZodObject<{
2219
+ zone: z.ZodString;
2220
+ operator: z.ZodString;
2221
+ sprint: z.ZodString;
2222
+ acquiredAt: z.ZodString;
2223
+ ttl: z.ZodNumber;
2224
+ expiresAt: z.ZodString;
2225
+ }, "strip", z.ZodTypeAny, {
2226
+ zone: string;
2227
+ operator: string;
2228
+ sprint: string;
2229
+ acquiredAt: string;
2230
+ expiresAt: string;
2231
+ ttl: number;
2232
+ }, {
2233
+ zone: string;
2234
+ operator: string;
2235
+ sprint: string;
2236
+ acquiredAt: string;
2237
+ expiresAt: string;
2238
+ ttl: number;
2239
+ }>, "many">;
2240
+ active: z.ZodArray<z.ZodObject<{
2241
+ zone: z.ZodString;
2242
+ operator: z.ZodString;
2243
+ sprint: z.ZodString;
2244
+ acquiredAt: z.ZodString;
2245
+ ttl: z.ZodNumber;
2246
+ expiresAt: z.ZodString;
2247
+ }, "strip", z.ZodTypeAny, {
2248
+ zone: string;
2249
+ operator: string;
2250
+ sprint: string;
2251
+ acquiredAt: string;
2252
+ expiresAt: string;
2253
+ ttl: number;
2254
+ }, {
2255
+ zone: string;
2256
+ operator: string;
2257
+ sprint: string;
2258
+ acquiredAt: string;
2259
+ expiresAt: string;
2260
+ ttl: number;
2261
+ }>, "many">;
2262
+ expired: z.ZodArray<z.ZodObject<{
2263
+ zone: z.ZodString;
2264
+ operator: z.ZodString;
2265
+ sprint: z.ZodString;
2266
+ acquiredAt: z.ZodString;
2267
+ ttl: z.ZodNumber;
2268
+ expiresAt: z.ZodString;
2269
+ }, "strip", z.ZodTypeAny, {
2270
+ zone: string;
2271
+ operator: string;
2272
+ sprint: string;
2273
+ acquiredAt: string;
2274
+ expiresAt: string;
2275
+ ttl: number;
2276
+ }, {
2277
+ zone: string;
2278
+ operator: string;
2279
+ sprint: string;
2280
+ acquiredAt: string;
2281
+ expiresAt: string;
2282
+ ttl: number;
2283
+ }>, "many">;
2284
+ }, "strip", z.ZodTypeAny, {
2285
+ active: {
2286
+ zone: string;
2287
+ operator: string;
2288
+ sprint: string;
2289
+ acquiredAt: string;
2290
+ expiresAt: string;
2291
+ ttl: number;
2292
+ }[];
2293
+ fetchedAt: string;
2294
+ locks: {
2295
+ zone: string;
2296
+ operator: string;
2297
+ sprint: string;
2298
+ acquiredAt: string;
2299
+ expiresAt: string;
2300
+ ttl: number;
2301
+ }[];
2302
+ expired: {
2303
+ zone: string;
2304
+ operator: string;
2305
+ sprint: string;
2306
+ acquiredAt: string;
2307
+ expiresAt: string;
2308
+ ttl: number;
2309
+ }[];
2310
+ }, {
2311
+ active: {
2312
+ zone: string;
2313
+ operator: string;
2314
+ sprint: string;
2315
+ acquiredAt: string;
2316
+ expiresAt: string;
2317
+ ttl: number;
2318
+ }[];
2319
+ fetchedAt: string;
2320
+ locks: {
2321
+ zone: string;
2322
+ operator: string;
2323
+ sprint: string;
2324
+ acquiredAt: string;
2325
+ expiresAt: string;
2326
+ ttl: number;
2327
+ }[];
2328
+ expired: {
2329
+ zone: string;
2330
+ operator: string;
2331
+ sprint: string;
2332
+ acquiredAt: string;
2333
+ expiresAt: string;
2334
+ ttl: number;
2335
+ }[];
2336
+ }>;
2337
+
2338
+ export { AuditService, BootstrapService, type CanonicalCheckResult, type CanonicalConfig, type CanonicalIssue, CanonicalService, type Checkpoint, DashboardService, type DerivedDocConfig, DerivedDocConfigSchema, type DistributedLock, type EvidenceGateResult, EvidenceGateResultSchema, EvidenceGateService, type EvidenceRecord, EvidenceRecordSchema, type EvidenceType, type GitError, GitService, type InjectionResult, InjectionResultSchema, InjectionService, type LockList, LockListSchema, type LockResult, LockResultSchema, LockService, type MergeResult, type MotherVersion, MotherVersionSchema, type NoteTask, NoteTaskSchema, type NotesIngestionResult, NotesIngestionResultSchema, NotesIngestionService, type OperationalMetrics, OperatorIdSchema, type OreshnikConfig, OreshnikConfigSchema, type OreshnikError, type PortfolioConfig, PortfolioConfigSchema, type PortfolioInspection, type PortfolioProject, PortfolioProjectSchema, type PortfolioProjectStatus, PortfolioService, type PreflightResult, type ProjectInjectionResult, ProjectInjectionResultSchema, type Result, type SprintEvent, SprintIdSchema, type StateError, StateManager, type SyncConfig, type SyncResult, SyncService, type Task, type TaskBoard, TaskBoardSchema, type TaskEvidenceCheck, TaskEvidenceCheckSchema, type TaskType, VaultGuard, type VaultGuardResult, type ZoneCheckResult, ZoneCheckService, ZoneEngine, type ZoneLock, ZoneLockSchema, type ZoneMap, ZoneMapSchema, type ZoneViolation, createAuditService, createBootstrapService, createCanonicalService, createDashboardService, createEvidenceGateService, createGitService, createInjectionService, createLockService, createNotesIngestionService, createPortfolioService, createStateManager, createSyncService, createVaultGuard, createZoneCheckService, createZoneEngine, err, execCommand, execCommandInherit, formatBranchName, header, isChildBranch, isMotherBranch, log, nonIgnoredDirtyFiles, nowDisplay, nowISO, ok, resultSummary, sanitize, statusBox, today };