@hilbras/omninode 2.0.0-alpha.10 → 2.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/dist/cli/index.js +338 -87
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +197 -19
- package/dist/index.js +585 -349
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -552,6 +552,8 @@ interface PipelineStep {
|
|
|
552
552
|
dependsOn?: string[];
|
|
553
553
|
condition?: PipelineStepCondition;
|
|
554
554
|
retries?: number;
|
|
555
|
+
/** Constraints handed to the planner for plan steps (§15). */
|
|
556
|
+
constraints?: string[];
|
|
555
557
|
}
|
|
556
558
|
interface PipelineDefinition {
|
|
557
559
|
id: string;
|
|
@@ -654,6 +656,8 @@ interface PlanStep {
|
|
|
654
656
|
interface Plan {
|
|
655
657
|
id: string;
|
|
656
658
|
objective: string;
|
|
659
|
+
/** Explicit goal statement (§15, Planner Output). */
|
|
660
|
+
goal?: string;
|
|
657
661
|
summary: string;
|
|
658
662
|
steps: PlanStep[];
|
|
659
663
|
risks?: string[];
|
|
@@ -1037,6 +1041,8 @@ declare const pipelineStepConfigSchema: z.ZodObject<{
|
|
|
1037
1041
|
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1038
1042
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
1039
1043
|
condition: z.ZodOptional<z.ZodEnum<["always", "on-success", "on-failure"]>>;
|
|
1044
|
+
/** Constraints passed to the planner for plan steps (§15). */
|
|
1045
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1040
1046
|
}, "strict", z.ZodTypeAny, {
|
|
1041
1047
|
id: string;
|
|
1042
1048
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1046,6 +1052,7 @@ declare const pipelineStepConfigSchema: z.ZodObject<{
|
|
|
1046
1052
|
depends_on?: string[] | undefined;
|
|
1047
1053
|
retries?: number | undefined;
|
|
1048
1054
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1055
|
+
constraints?: string[] | undefined;
|
|
1049
1056
|
}, {
|
|
1050
1057
|
id: string;
|
|
1051
1058
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1055,6 +1062,7 @@ declare const pipelineStepConfigSchema: z.ZodObject<{
|
|
|
1055
1062
|
depends_on?: string[] | undefined;
|
|
1056
1063
|
retries?: number | undefined;
|
|
1057
1064
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1065
|
+
constraints?: string[] | undefined;
|
|
1058
1066
|
}>;
|
|
1059
1067
|
declare const pipelineConfigSchema: z.ZodObject<{
|
|
1060
1068
|
id: z.ZodString;
|
|
@@ -1070,6 +1078,8 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
1070
1078
|
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1071
1079
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
1072
1080
|
condition: z.ZodOptional<z.ZodEnum<["always", "on-success", "on-failure"]>>;
|
|
1081
|
+
/** Constraints passed to the planner for plan steps (§15). */
|
|
1082
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1073
1083
|
}, "strict", z.ZodTypeAny, {
|
|
1074
1084
|
id: string;
|
|
1075
1085
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1079,6 +1089,7 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
1079
1089
|
depends_on?: string[] | undefined;
|
|
1080
1090
|
retries?: number | undefined;
|
|
1081
1091
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1092
|
+
constraints?: string[] | undefined;
|
|
1082
1093
|
}, {
|
|
1083
1094
|
id: string;
|
|
1084
1095
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1088,6 +1099,7 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
1088
1099
|
depends_on?: string[] | undefined;
|
|
1089
1100
|
retries?: number | undefined;
|
|
1090
1101
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1102
|
+
constraints?: string[] | undefined;
|
|
1091
1103
|
}>, "many">;
|
|
1092
1104
|
}, "strict", z.ZodTypeAny, {
|
|
1093
1105
|
id: string;
|
|
@@ -1100,6 +1112,7 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
1100
1112
|
depends_on?: string[] | undefined;
|
|
1101
1113
|
retries?: number | undefined;
|
|
1102
1114
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1115
|
+
constraints?: string[] | undefined;
|
|
1103
1116
|
}[];
|
|
1104
1117
|
name?: string | undefined;
|
|
1105
1118
|
role?: string | undefined;
|
|
@@ -1115,6 +1128,7 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
1115
1128
|
depends_on?: string[] | undefined;
|
|
1116
1129
|
retries?: number | undefined;
|
|
1117
1130
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1131
|
+
constraints?: string[] | undefined;
|
|
1118
1132
|
}[];
|
|
1119
1133
|
name?: string | undefined;
|
|
1120
1134
|
role?: string | undefined;
|
|
@@ -1255,6 +1269,8 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1255
1269
|
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1256
1270
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
1257
1271
|
condition: z.ZodOptional<z.ZodEnum<["always", "on-success", "on-failure"]>>;
|
|
1272
|
+
/** Constraints passed to the planner for plan steps (§15). */
|
|
1273
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1258
1274
|
}, "strict", z.ZodTypeAny, {
|
|
1259
1275
|
id: string;
|
|
1260
1276
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1264,6 +1280,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1264
1280
|
depends_on?: string[] | undefined;
|
|
1265
1281
|
retries?: number | undefined;
|
|
1266
1282
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1283
|
+
constraints?: string[] | undefined;
|
|
1267
1284
|
}, {
|
|
1268
1285
|
id: string;
|
|
1269
1286
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1273,6 +1290,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1273
1290
|
depends_on?: string[] | undefined;
|
|
1274
1291
|
retries?: number | undefined;
|
|
1275
1292
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1293
|
+
constraints?: string[] | undefined;
|
|
1276
1294
|
}>, "many">;
|
|
1277
1295
|
}, "strict", z.ZodTypeAny, {
|
|
1278
1296
|
id: string;
|
|
@@ -1285,6 +1303,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1285
1303
|
depends_on?: string[] | undefined;
|
|
1286
1304
|
retries?: number | undefined;
|
|
1287
1305
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1306
|
+
constraints?: string[] | undefined;
|
|
1288
1307
|
}[];
|
|
1289
1308
|
name?: string | undefined;
|
|
1290
1309
|
role?: string | undefined;
|
|
@@ -1300,6 +1319,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1300
1319
|
depends_on?: string[] | undefined;
|
|
1301
1320
|
retries?: number | undefined;
|
|
1302
1321
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1322
|
+
constraints?: string[] | undefined;
|
|
1303
1323
|
}[];
|
|
1304
1324
|
name?: string | undefined;
|
|
1305
1325
|
role?: string | undefined;
|
|
@@ -1385,6 +1405,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1385
1405
|
depends_on?: string[] | undefined;
|
|
1386
1406
|
retries?: number | undefined;
|
|
1387
1407
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1408
|
+
constraints?: string[] | undefined;
|
|
1388
1409
|
}[];
|
|
1389
1410
|
name?: string | undefined;
|
|
1390
1411
|
role?: string | undefined;
|
|
@@ -1451,6 +1472,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1451
1472
|
depends_on?: string[] | undefined;
|
|
1452
1473
|
retries?: number | undefined;
|
|
1453
1474
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1475
|
+
constraints?: string[] | undefined;
|
|
1454
1476
|
}[];
|
|
1455
1477
|
name?: string | undefined;
|
|
1456
1478
|
role?: string | undefined;
|
|
@@ -1591,6 +1613,8 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1591
1613
|
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1592
1614
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
1593
1615
|
condition: z.ZodOptional<z.ZodEnum<["always", "on-success", "on-failure"]>>;
|
|
1616
|
+
/** Constraints passed to the planner for plan steps (§15). */
|
|
1617
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1594
1618
|
}, "strict", z.ZodTypeAny, {
|
|
1595
1619
|
id: string;
|
|
1596
1620
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1600,6 +1624,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1600
1624
|
depends_on?: string[] | undefined;
|
|
1601
1625
|
retries?: number | undefined;
|
|
1602
1626
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1627
|
+
constraints?: string[] | undefined;
|
|
1603
1628
|
}, {
|
|
1604
1629
|
id: string;
|
|
1605
1630
|
kind: "custom" | "research" | "collect" | "analyze" | "plan" | "execute";
|
|
@@ -1609,6 +1634,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1609
1634
|
depends_on?: string[] | undefined;
|
|
1610
1635
|
retries?: number | undefined;
|
|
1611
1636
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1637
|
+
constraints?: string[] | undefined;
|
|
1612
1638
|
}>, "many">;
|
|
1613
1639
|
}, "strict", z.ZodTypeAny, {
|
|
1614
1640
|
id: string;
|
|
@@ -1621,6 +1647,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1621
1647
|
depends_on?: string[] | undefined;
|
|
1622
1648
|
retries?: number | undefined;
|
|
1623
1649
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1650
|
+
constraints?: string[] | undefined;
|
|
1624
1651
|
}[];
|
|
1625
1652
|
name?: string | undefined;
|
|
1626
1653
|
role?: string | undefined;
|
|
@@ -1636,6 +1663,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1636
1663
|
depends_on?: string[] | undefined;
|
|
1637
1664
|
retries?: number | undefined;
|
|
1638
1665
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1666
|
+
constraints?: string[] | undefined;
|
|
1639
1667
|
}[];
|
|
1640
1668
|
name?: string | undefined;
|
|
1641
1669
|
role?: string | undefined;
|
|
@@ -1721,6 +1749,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1721
1749
|
depends_on?: string[] | undefined;
|
|
1722
1750
|
retries?: number | undefined;
|
|
1723
1751
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1752
|
+
constraints?: string[] | undefined;
|
|
1724
1753
|
}[];
|
|
1725
1754
|
name?: string | undefined;
|
|
1726
1755
|
role?: string | undefined;
|
|
@@ -1787,6 +1816,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1787
1816
|
depends_on?: string[] | undefined;
|
|
1788
1817
|
retries?: number | undefined;
|
|
1789
1818
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1819
|
+
constraints?: string[] | undefined;
|
|
1790
1820
|
}[];
|
|
1791
1821
|
name?: string | undefined;
|
|
1792
1822
|
role?: string | undefined;
|
|
@@ -1862,6 +1892,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1862
1892
|
depends_on?: string[] | undefined;
|
|
1863
1893
|
retries?: number | undefined;
|
|
1864
1894
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1895
|
+
constraints?: string[] | undefined;
|
|
1865
1896
|
}[];
|
|
1866
1897
|
name?: string | undefined;
|
|
1867
1898
|
role?: string | undefined;
|
|
@@ -1933,6 +1964,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1933
1964
|
depends_on?: string[] | undefined;
|
|
1934
1965
|
retries?: number | undefined;
|
|
1935
1966
|
condition?: "always" | "on-success" | "on-failure" | undefined;
|
|
1967
|
+
constraints?: string[] | undefined;
|
|
1936
1968
|
}[];
|
|
1937
1969
|
name?: string | undefined;
|
|
1938
1970
|
role?: string | undefined;
|
|
@@ -2359,27 +2391,55 @@ declare class RoleRegistry {
|
|
|
2359
2391
|
/** Builds a role registry from the project configuration. */
|
|
2360
2392
|
declare function buildRoleRegistry(config: AppConfig): RoleRegistry;
|
|
2361
2393
|
|
|
2394
|
+
/** Current on-disk schema version. */
|
|
2395
|
+
declare const SCHEMA_VERSION = 2;
|
|
2362
2396
|
interface JsonDocument<T> {
|
|
2363
|
-
/** Bumped when the persisted shape changes in a breaking way (v2 Phase 12). */
|
|
2364
2397
|
schemaVersion?: number;
|
|
2365
2398
|
items: T[];
|
|
2366
2399
|
}
|
|
2400
|
+
type DocumentState = {
|
|
2401
|
+
status: "missing";
|
|
2402
|
+
} | {
|
|
2403
|
+
status: "empty";
|
|
2404
|
+
} | {
|
|
2405
|
+
status: "v1-legacy";
|
|
2406
|
+
} | {
|
|
2407
|
+
status: "current";
|
|
2408
|
+
schemaVersion: number;
|
|
2409
|
+
count: number;
|
|
2410
|
+
} | {
|
|
2411
|
+
status: "future";
|
|
2412
|
+
schemaVersion: number;
|
|
2413
|
+
} | {
|
|
2414
|
+
status: "corrupt";
|
|
2415
|
+
detail: string;
|
|
2416
|
+
};
|
|
2367
2417
|
interface JsonFileStoreOptions {
|
|
2368
2418
|
directory?: string;
|
|
2369
2419
|
fileName: string;
|
|
2420
|
+
/** Schema version to write (defaults to the current version). */
|
|
2370
2421
|
schemaVersion?: number;
|
|
2371
|
-
/** Called when a persisted file
|
|
2422
|
+
/** Called when a persisted file is corrupt (after quarantine). */
|
|
2372
2423
|
onCorrupt?: (path: string, error: unknown) => void;
|
|
2373
|
-
|
|
2424
|
+
/** Disable file moves (used by dry runs / tests that inspect in place). */
|
|
2425
|
+
quarantine?: boolean;
|
|
2426
|
+
}
|
|
2427
|
+
/** Durably writes a file: temp → fsync → rename → directory fsync. */
|
|
2428
|
+
declare function writeFileAtomic(target: string, contents: string): Promise<void>;
|
|
2429
|
+
/** Reads and classifies a persisted document without modifying it. */
|
|
2430
|
+
declare function inspectDocument(path: string): Promise<DocumentState>;
|
|
2431
|
+
/** Reads a document, migrating v1 shapes and quarantining corruption. */
|
|
2432
|
+
declare function readDocument<T>(path: string, onCorrupt?: (path: string, error: unknown) => void, quarantine?: boolean): Promise<T[]>;
|
|
2374
2433
|
declare class JsonFileStore<T> {
|
|
2375
2434
|
private readonly filePath;
|
|
2376
2435
|
private readonly schemaVersion;
|
|
2377
2436
|
private readonly onCorrupt?;
|
|
2437
|
+
private readonly quarantine;
|
|
2378
2438
|
private readonly log;
|
|
2379
2439
|
private queue;
|
|
2380
2440
|
constructor(options: JsonFileStoreOptions);
|
|
2381
2441
|
get path(): string;
|
|
2382
|
-
/** All items, or [] when missing/corrupt. */
|
|
2442
|
+
/** All items, or [] when missing/migrated-from-v1/corrupt. */
|
|
2383
2443
|
protected readAll(): Promise<T[]>;
|
|
2384
2444
|
protected writeAll(items: T[]): Promise<void>;
|
|
2385
2445
|
/** Serializes an async operation against this file. */
|
|
@@ -2718,13 +2778,20 @@ declare function normalizeFinding(finding: Finding): Finding;
|
|
|
2718
2778
|
/** Planner interface and request contract (§18). The planner is replaceable. */
|
|
2719
2779
|
|
|
2720
2780
|
interface PlanRequest {
|
|
2781
|
+
/** The original task (§15, Planner Input). */
|
|
2721
2782
|
objective: string;
|
|
2722
|
-
/**
|
|
2783
|
+
/** Project context (repository/workspace background, role-derived context…). */
|
|
2784
|
+
projectContext?: string;
|
|
2785
|
+
/** Agent reports the plan is based on. */
|
|
2723
2786
|
reports: Report[];
|
|
2787
|
+
/** Aggregated findings (combined report) — consensus and conflicts made explicit. */
|
|
2788
|
+
aggregated?: CombinedReport;
|
|
2724
2789
|
/** Combined research context from upstream pipeline steps, if available. */
|
|
2725
2790
|
context?: string;
|
|
2726
2791
|
role?: RoleDefinition;
|
|
2727
2792
|
memory?: MemoryEntry[];
|
|
2793
|
+
/** Constraints the plan must respect. */
|
|
2794
|
+
constraints?: string[];
|
|
2728
2795
|
project?: string;
|
|
2729
2796
|
taskId?: string;
|
|
2730
2797
|
pipelineRunId?: string;
|
|
@@ -2735,10 +2802,9 @@ interface IPlanner {
|
|
|
2735
2802
|
}
|
|
2736
2803
|
|
|
2737
2804
|
/**
|
|
2738
|
-
* Planner context builder (§
|
|
2739
|
-
*
|
|
2740
|
-
*
|
|
2741
|
-
* structured text.
|
|
2805
|
+
* Planner context builder (§15, Planner Input): assembles the original task,
|
|
2806
|
+
* project context, agent reports, aggregated findings, relevant memory and
|
|
2807
|
+
* constraints into one structured input, in that order.
|
|
2742
2808
|
*/
|
|
2743
2809
|
|
|
2744
2810
|
declare function buildPlannerContext(request: PlanRequest): string;
|
|
@@ -2765,13 +2831,108 @@ declare class ModelPlanner implements IPlanner {
|
|
|
2765
2831
|
plan(request: PlanRequest): Promise<Plan>;
|
|
2766
2832
|
private degrade;
|
|
2767
2833
|
}
|
|
2768
|
-
|
|
2769
|
-
|
|
2834
|
+
type PlanJsonResult = {
|
|
2835
|
+
ok: true;
|
|
2836
|
+
goal: string;
|
|
2770
2837
|
summary: string;
|
|
2771
2838
|
steps: PlanStep[];
|
|
2772
2839
|
risks?: string[];
|
|
2773
2840
|
notes?: string[];
|
|
2774
|
-
} |
|
|
2841
|
+
} | {
|
|
2842
|
+
ok: false;
|
|
2843
|
+
reason: string;
|
|
2844
|
+
issues: Array<{
|
|
2845
|
+
path: string;
|
|
2846
|
+
message: string;
|
|
2847
|
+
}>;
|
|
2848
|
+
};
|
|
2849
|
+
/** Extracts and validates plan JSON from arbitrary model output (§15). */
|
|
2850
|
+
declare function parsePlanJson(text: string): PlanJsonResult;
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* Plan validation (roadmap §15, Validation): every generated plan passes
|
|
2854
|
+
* schema validation. Invalid plans are rejected with structured issues and
|
|
2855
|
+
* — where a fallback is configured — fall back to heuristic planning.
|
|
2856
|
+
*/
|
|
2857
|
+
|
|
2858
|
+
declare const planJsonSchema: z.ZodObject<{
|
|
2859
|
+
goal: z.ZodString;
|
|
2860
|
+
summary: z.ZodString;
|
|
2861
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
2862
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2863
|
+
title: z.ZodString;
|
|
2864
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2865
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
2866
|
+
targets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2867
|
+
acceptance_criteria: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2868
|
+
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2869
|
+
source_findings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2870
|
+
}, "strip", z.ZodTypeAny, {
|
|
2871
|
+
title: string;
|
|
2872
|
+
id?: string | undefined;
|
|
2873
|
+
description?: string | undefined;
|
|
2874
|
+
depends_on?: string[] | undefined;
|
|
2875
|
+
order?: number | undefined;
|
|
2876
|
+
targets?: string[] | undefined;
|
|
2877
|
+
acceptance_criteria?: string[] | undefined;
|
|
2878
|
+
source_findings?: string[] | undefined;
|
|
2879
|
+
}, {
|
|
2880
|
+
title: string;
|
|
2881
|
+
id?: string | undefined;
|
|
2882
|
+
description?: string | undefined;
|
|
2883
|
+
depends_on?: string[] | undefined;
|
|
2884
|
+
order?: number | undefined;
|
|
2885
|
+
targets?: string[] | undefined;
|
|
2886
|
+
acceptance_criteria?: string[] | undefined;
|
|
2887
|
+
source_findings?: string[] | undefined;
|
|
2888
|
+
}>, "many">;
|
|
2889
|
+
risks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2890
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2891
|
+
}, "strip", z.ZodTypeAny, {
|
|
2892
|
+
steps: {
|
|
2893
|
+
title: string;
|
|
2894
|
+
id?: string | undefined;
|
|
2895
|
+
description?: string | undefined;
|
|
2896
|
+
depends_on?: string[] | undefined;
|
|
2897
|
+
order?: number | undefined;
|
|
2898
|
+
targets?: string[] | undefined;
|
|
2899
|
+
acceptance_criteria?: string[] | undefined;
|
|
2900
|
+
source_findings?: string[] | undefined;
|
|
2901
|
+
}[];
|
|
2902
|
+
summary: string;
|
|
2903
|
+
goal: string;
|
|
2904
|
+
risks?: string[] | undefined;
|
|
2905
|
+
notes?: string[] | undefined;
|
|
2906
|
+
}, {
|
|
2907
|
+
steps: {
|
|
2908
|
+
title: string;
|
|
2909
|
+
id?: string | undefined;
|
|
2910
|
+
description?: string | undefined;
|
|
2911
|
+
depends_on?: string[] | undefined;
|
|
2912
|
+
order?: number | undefined;
|
|
2913
|
+
targets?: string[] | undefined;
|
|
2914
|
+
acceptance_criteria?: string[] | undefined;
|
|
2915
|
+
source_findings?: string[] | undefined;
|
|
2916
|
+
}[];
|
|
2917
|
+
summary: string;
|
|
2918
|
+
goal: string;
|
|
2919
|
+
risks?: string[] | undefined;
|
|
2920
|
+
notes?: string[] | undefined;
|
|
2921
|
+
}>;
|
|
2922
|
+
interface PlanValidationIssue {
|
|
2923
|
+
path: string;
|
|
2924
|
+
message: string;
|
|
2925
|
+
}
|
|
2926
|
+
type PlanValidationResult = {
|
|
2927
|
+
valid: true;
|
|
2928
|
+
plan: Plan;
|
|
2929
|
+
} | {
|
|
2930
|
+
valid: false;
|
|
2931
|
+
issues: PlanValidationIssue[];
|
|
2932
|
+
reason: string;
|
|
2933
|
+
};
|
|
2934
|
+
/** Validates a plan object (ids/order filled by the caller). */
|
|
2935
|
+
declare function validatePlan(plan: Plan): PlanValidationResult;
|
|
2775
2936
|
|
|
2776
2937
|
/**
|
|
2777
2938
|
* Plan persistence (§27 Phase 8 — planner result storage). Same
|
|
@@ -2884,11 +3045,9 @@ declare function createDefaultChatFn(providers: AppConfig["project"]["providers"
|
|
|
2884
3045
|
declare function buildPipelineEngine(config: AppConfig, log?: Logger): PipelineEngine;
|
|
2885
3046
|
|
|
2886
3047
|
/**
|
|
2887
|
-
* Persistence layer (v2 Phase
|
|
2888
|
-
*
|
|
2889
|
-
*
|
|
2890
|
-
* (TaskStore, PipelineRunStore, ReportStore, PlanStore, IMemoryProvider,
|
|
2891
|
-
* AuditSink) — see docs/API.md for the inventory and stability status.
|
|
3048
|
+
* Persistence layer (v2 Phase 12): one entry point to every local store,
|
|
3049
|
+
* the canonical storage interface names, and the migration path that upgrades
|
|
3050
|
+
* v1 data in place.
|
|
2892
3051
|
*/
|
|
2893
3052
|
|
|
2894
3053
|
/** Bundles every store for a single project directory. */
|
|
@@ -2901,7 +3060,26 @@ declare class ProjectStores {
|
|
|
2901
3060
|
readonly audit: FileAuditLog;
|
|
2902
3061
|
constructor(directory?: string);
|
|
2903
3062
|
}
|
|
3063
|
+
interface MigrationReport {
|
|
3064
|
+
file: string;
|
|
3065
|
+
state: DocumentState["status"];
|
|
3066
|
+
before?: number;
|
|
3067
|
+
after?: number;
|
|
3068
|
+
migrated: boolean;
|
|
3069
|
+
note?: string;
|
|
3070
|
+
}
|
|
3071
|
+
/** Every persisted store file OmniNode manages in a project. */
|
|
3072
|
+
declare const STORE_FILES: readonly ["tasks.json", "pipelines.json", "reports.json", "plans.json", "memory.json"];
|
|
3073
|
+
/**
|
|
3074
|
+
* Migration (roadmap §16): inspects every store file, reports its schema
|
|
3075
|
+
* state, and — unless `checkOnly` — rewrites v1 documents at the current
|
|
3076
|
+
* schema version. Idempotent and safe: unknown/future versions are reported,
|
|
3077
|
+
* never rewritten.
|
|
3078
|
+
*/
|
|
3079
|
+
declare function migrateProjectStores(directory?: string, options?: {
|
|
3080
|
+
checkOnly?: boolean;
|
|
3081
|
+
}): Promise<MigrationReport[]>;
|
|
2904
3082
|
|
|
2905
|
-
declare const OMNINODE_VERSION = "2.0.0-alpha.
|
|
3083
|
+
declare const OMNINODE_VERSION = "2.0.0-alpha.12";
|
|
2906
3084
|
|
|
2907
|
-
export { AgentAdapterRegistry, type AgentConfig, type AgentConfigYaml, type AgentDescriptor, AgentError, type AgentInfo, type AgentInputMode, type AgentIntegrationType, AgentRegistry, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AggregateOptions, type AggregatedFinding, type AggregatedRecommendation, type AppConfig, type AppConfigYaml, type ArtifactKind, type ArtifactPayload, type AskedQuestion, type AuditAction, type AuditEvent, type AuditSink, type ChatFn, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatStreamChunk, type ChatUsage, type CollectionDiagnostics, type CombinedMeta, type CombinedReport, type CombinedReportFilter, type Confidence, ConfigError, type ConflictPosition, ConsoleLogSink, type CreateTaskInput, type CwdValidation, DEFAULT_MAX_OUTPUT_BYTES, type DecodeResult, type DiscoveryResult, type EnvPolicy, type EnvelopeMeta, type Evidence, type EvidenceInput, type EvidenceKind, type ExecutionRecord, type ExtractionMeta, FileAuditLog, FilePipelineRunStore, FilePlanStore, FileReportStore, FileTaskStore, type Finding, type FindingOrigin, type FindingSeverity, type FindingSource, type HelloResult, HeuristicPlanner, type HttpRequestOptions, type HttpResponse, type IAgent, type IAgentAdapter, type IChatProvider, type IMemoryProvider, type IPipelineExecutor, type IPlanner, type IProvider, type JsonDocument, JsonFileStore, type JsonFileStoreOptions, type LoadConfigOptions, LocalMemoryProvider, type LogLevel, type LogSink, Logger, type LoggerOptions, MAX_CONTEXT_CHARS, MAX_MESSAGE_BYTES, type MemoryCategory, type MemoryContextQuery, type MemoryEntry, MemoryError, type MemoryProviderConfig, type MemoryProviderMetadata, type MemoryQuery, type MemoryScope, MemoryService, type MemoryServiceOptions, type MemoryTaskContext, type MessageEnvelope, type Modality, type ModelCapabilities, type ModelFilter, type ModelInfo, ModelPlanner, ModelRegistry, type ModelStatus, type NodeToAgentMessage, OMNINODE_VERSION, OPENAI_COMPATIBLE_TYPES, type OmniHilbrasConnectionResult, OmniHilbrasProvider, OmniNodeError, type OmniNodeErrorCode, type OmniNodeErrorOptions, OpenAICompatibleProvider, PROTOCOL_V2, type PipelineConfigYaml, type PipelineDefinition, PipelineEngine, type PipelineEngineOptions, PipelineError, type PipelineRun, type PipelineRunAttempt, type PipelineRunFilter, type PipelineRunOptions, type PipelineRunStatus, type PipelineRunStore, type PipelineStep, type PipelineStepCondition, type PipelineStepConfigYaml, type PipelineStepKind, type PipelineStepRun, type Plan, type PlanFilter, type PlanRequest, type PlanStep, type PlanStore, type PlannerConfigYaml, PlannerError, ProcessAgent, ProcessAgentAdapter, type Project, type ProjectConfigYaml, ProjectStores, type ProtocolAgentToNodeType, ProtocolDecoder, type ProtocolEnvelope, ProtocolError, type ProtocolMessageType, type ProtocolNodeToAgentType, ProtocolSession, type ProtocolViolation, type ProtocolViolationCode, type ProviderAuthentication, type ProviderCapability, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderErrorKind, type ProviderHealth, type ProviderStatus, type ProviderType, type QuestionPayload, type QuestionResponder, type RememberaConfig, RememberaMemoryProvider, type Report, type ReportArtifact, type ReportConflict, type ReportFilter, type ReportPayload, ReportService, type ReportStore, type ReportValidationIssue, type ReportValidationResult, type RoleConfigYaml, type RoleDefinition, RoleRegistry, type RunPipelineOptions, SUPPORTED_PROTOCOL_VERSIONS, type SessionIds, TERMINAL_TASK_STATUSES, type Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskPayload, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, aggregateReports, appConfigSchema, authHeaders, buildAgentRegistry, buildChildEnv, buildHello, buildHelloAck, buildPipelineEngine, buildPlanner, buildPlannerContext, buildRoleRegistry, composeTaskText, createAgent, createDefaultChatFn, createMemoryProvider, createProvider, createTaskEngine, decodeMessage, decodeStream, defaultMetadata, defaultProjectConfigYaml, defaultSearch, describeExit, detectConflicts, encodeMessage, envelope, expandEnvRefs, extractMessage, extractReportFromText, findConfigFile, isNetworkError, isOmniNodeError, isRetryable, isSupportedProtocol, isTimeoutError, keywords, killTree, kindFromStatus, loadConfig, logger, newMessageId, normalizeEvidence, normalizeFinding, parseHello, parsePlanJson, parseRetryAfter, pipelineConfigSchema, pipelineStepConfigSchema, plannerConfigSchema, projectConfigSchema, providerConfigSchema, providerHttpError, providerTransportError, registryKey, requestJson, requireCompletion, resolveApiKey, resolveEnvPolicy, roleConfigSchema, sanitizeChunk, similar, validateEnvelope, validateReport, validateWorkingDirectory };
|
|
3085
|
+
export { AgentAdapterRegistry, type AgentConfig, type AgentConfigYaml, type AgentDescriptor, AgentError, type AgentInfo, type AgentInputMode, type AgentIntegrationType, AgentRegistry, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AggregateOptions, type AggregatedFinding, type AggregatedRecommendation, type AppConfig, type AppConfigYaml, type ArtifactKind, type ArtifactPayload, type AskedQuestion, type AuditAction, type AuditEvent, type AuditSink, type AuditSink as AuditStore, type ChatFn, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatStreamChunk, type ChatUsage, type CollectionDiagnostics, type CombinedMeta, type CombinedReport, type CombinedReportFilter, type Confidence, ConfigError, type ConflictPosition, ConsoleLogSink, type CreateTaskInput, type CwdValidation, DEFAULT_MAX_OUTPUT_BYTES, type DecodeResult, type DiscoveryResult, type DocumentState, type EnvPolicy, type EnvelopeMeta, type Evidence, type EvidenceInput, type EvidenceKind, type ExecutionRecord, type ExtractionMeta, FileAuditLog, FilePipelineRunStore, FilePlanStore, FileReportStore, FileTaskStore, type Finding, type FindingOrigin, type FindingSeverity, type FindingSource, type HelloResult, HeuristicPlanner, type HttpRequestOptions, type HttpResponse, type IAgent, type IAgentAdapter, type IChatProvider, type IMemoryProvider, type IPipelineExecutor, type IPlanner, type IProvider, type JsonDocument, JsonFileStore, type JsonFileStoreOptions, type LoadConfigOptions, LocalMemoryProvider, type LogLevel, type LogSink, Logger, type LoggerOptions, MAX_CONTEXT_CHARS, MAX_MESSAGE_BYTES, type MemoryCategory, type MemoryContextQuery, type MemoryEntry, MemoryError, type MemoryProviderConfig, type MemoryProviderMetadata, type MemoryQuery, type MemoryScope, MemoryService, type MemoryServiceOptions, LocalMemoryProvider as MemoryStore, type MemoryTaskContext, type MessageEnvelope, type MigrationReport, type Modality, type ModelCapabilities, type ModelFilter, type ModelInfo, ModelPlanner, ModelRegistry, type ModelStatus, type NodeToAgentMessage, OMNINODE_VERSION, OPENAI_COMPATIBLE_TYPES, type OmniHilbrasConnectionResult, OmniHilbrasProvider, OmniNodeError, type OmniNodeErrorCode, type OmniNodeErrorOptions, OpenAICompatibleProvider, PROTOCOL_V2, type PipelineConfigYaml, type PipelineDefinition, PipelineEngine, type PipelineEngineOptions, PipelineError, type PipelineRun, type PipelineRunAttempt, type PipelineRunFilter, type PipelineRunOptions, type PipelineRunStatus, type PipelineRunStore, type PipelineStep, type PipelineStepCondition, type PipelineStepConfigYaml, type PipelineStepKind, type PipelineStepRun, type PipelineRunStore as PipelineStore, type Plan, type PlanFilter, type PlanJsonResult, type PlanRequest, type PlanStep, type PlanStore, type PlanValidationIssue, type PlanValidationResult, type PlannerConfigYaml, PlannerError, ProcessAgent, ProcessAgentAdapter, type Project, type ProjectConfigYaml, ProjectStores, type ProtocolAgentToNodeType, ProtocolDecoder, type ProtocolEnvelope, ProtocolError, type ProtocolMessageType, type ProtocolNodeToAgentType, ProtocolSession, type ProtocolViolation, type ProtocolViolationCode, type ProviderAuthentication, type ProviderCapability, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderErrorKind, type ProviderHealth, type ProviderStatus, type ProviderType, type QuestionPayload, type QuestionResponder, type RememberaConfig, RememberaMemoryProvider, type Report, type ReportArtifact, type ReportConflict, type ReportFilter, type ReportPayload, ReportService, type ReportStore, type ReportValidationIssue, type ReportValidationResult, type RoleConfigYaml, type RoleDefinition, RoleRegistry, type RunPipelineOptions, SCHEMA_VERSION, STORE_FILES, SUPPORTED_PROTOCOL_VERSIONS, type SessionIds, TERMINAL_TASK_STATUSES, type Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskPayload, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, aggregateReports, appConfigSchema, authHeaders, buildAgentRegistry, buildChildEnv, buildHello, buildHelloAck, buildPipelineEngine, buildPlanner, buildPlannerContext, buildRoleRegistry, composeTaskText, createAgent, createDefaultChatFn, createMemoryProvider, createProvider, createTaskEngine, decodeMessage, decodeStream, defaultMetadata, defaultProjectConfigYaml, defaultSearch, describeExit, detectConflicts, encodeMessage, envelope, expandEnvRefs, extractMessage, extractReportFromText, findConfigFile, inspectDocument, isNetworkError, isOmniNodeError, isRetryable, isSupportedProtocol, isTimeoutError, keywords, killTree, kindFromStatus, loadConfig, logger, migrateProjectStores, newMessageId, normalizeEvidence, normalizeFinding, parseHello, parsePlanJson, parseRetryAfter, pipelineConfigSchema, pipelineStepConfigSchema, planJsonSchema, plannerConfigSchema, projectConfigSchema, providerConfigSchema, providerHttpError, providerTransportError, readDocument, registryKey, requestJson, requireCompletion, resolveApiKey, resolveEnvPolicy, roleConfigSchema, sanitizeChunk, similar, validateEnvelope, validatePlan, validateReport, validateWorkingDirectory, writeFileAtomic };
|