@hilbras/omninode 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -4
- package/dist/cli/index.js +826 -45
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +289 -14
- package/dist/index.js +741 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -291,6 +291,8 @@ interface PipelineStepRun {
|
|
|
291
291
|
status: TaskStatus;
|
|
292
292
|
/** Tasks created for this step (research fans out to several). */
|
|
293
293
|
taskIds?: string[];
|
|
294
|
+
/** Set on plan steps that produced a stored plan (§18). */
|
|
295
|
+
planId?: string;
|
|
294
296
|
error?: string;
|
|
295
297
|
}
|
|
296
298
|
interface PipelineRun {
|
|
@@ -304,6 +306,38 @@ interface PipelineRun {
|
|
|
304
306
|
reports?: Report[];
|
|
305
307
|
/** Set when the report system generated a combined report for this run. */
|
|
306
308
|
combinedReportId?: string;
|
|
309
|
+
/** Set when a plan step produced an implementation plan (§18). */
|
|
310
|
+
planId?: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** Plan types: the final implementation plan produced by the planner layer (§18). */
|
|
314
|
+
interface PlanStep {
|
|
315
|
+
id: string;
|
|
316
|
+
title: string;
|
|
317
|
+
description?: string;
|
|
318
|
+
order: number;
|
|
319
|
+
/** Files/modules the step touches, if stated. */
|
|
320
|
+
targets?: string[];
|
|
321
|
+
acceptanceCriteria?: string[];
|
|
322
|
+
/** Plan-internal dependencies between steps. */
|
|
323
|
+
dependsOn?: string[];
|
|
324
|
+
/** Finding ids that motivated this step (traceability to reports). */
|
|
325
|
+
sourceFindings?: string[];
|
|
326
|
+
}
|
|
327
|
+
interface Plan {
|
|
328
|
+
id: string;
|
|
329
|
+
objective: string;
|
|
330
|
+
summary: string;
|
|
331
|
+
steps: PlanStep[];
|
|
332
|
+
risks?: string[];
|
|
333
|
+
notes?: string[];
|
|
334
|
+
/** What produced the plan, e.g. "model:my-gateway:chatgpt" or "heuristic". */
|
|
335
|
+
generatedBy: string;
|
|
336
|
+
model?: string;
|
|
337
|
+
taskId?: string;
|
|
338
|
+
pipelineRunId?: string;
|
|
339
|
+
createdAt: string;
|
|
340
|
+
metadata?: Record<string, unknown>;
|
|
307
341
|
}
|
|
308
342
|
|
|
309
343
|
/** Agent ↔ OmniNode communication protocol (§21). */
|
|
@@ -452,7 +486,7 @@ interface IChatProvider extends IProvider {
|
|
|
452
486
|
}
|
|
453
487
|
|
|
454
488
|
/** Typed error hierarchy shared across the whole codebase (§4.1 — error model). */
|
|
455
|
-
type OmniNodeErrorCode = "CONFIG_NOT_FOUND" | "CONFIG_INVALID" | "PROVIDER_NOT_FOUND" | "PROVIDER_UNAVAILABLE" | "PROVIDER_AUTH_FAILED" | "MODEL_NOT_FOUND" | "AGENT_NOT_FOUND" | "AGENT_FAILED" | "AGENT_TIMEOUT" | "TASK_INVALID" | "TASK_NOT_FOUND" | "TASK_FAILED" | "PIPELINE_NOT_FOUND" | "PIPELINE_INVALID" | "PIPELINE_FAILED" | "PROTOCOL_VIOLATION" | "MEMORY_UNAVAILABLE" | "REPORT_NOT_FOUND" | "NOT_IMPLEMENTED" | "CLI_USAGE" | "INTERNAL";
|
|
489
|
+
type OmniNodeErrorCode = "CONFIG_NOT_FOUND" | "CONFIG_INVALID" | "PROVIDER_NOT_FOUND" | "PROVIDER_UNAVAILABLE" | "PROVIDER_AUTH_FAILED" | "MODEL_NOT_FOUND" | "AGENT_NOT_FOUND" | "AGENT_FAILED" | "AGENT_TIMEOUT" | "TASK_INVALID" | "TASK_NOT_FOUND" | "TASK_FAILED" | "PIPELINE_NOT_FOUND" | "PIPELINE_INVALID" | "PIPELINE_FAILED" | "PLANNER_FAILED" | "PLAN_INVALID" | "PROTOCOL_VIOLATION" | "MEMORY_UNAVAILABLE" | "REPORT_NOT_FOUND" | "NOT_IMPLEMENTED" | "CLI_USAGE" | "INTERNAL";
|
|
456
490
|
interface OmniNodeErrorOptions {
|
|
457
491
|
cause?: unknown;
|
|
458
492
|
details?: Record<string, unknown>;
|
|
@@ -480,6 +514,9 @@ declare class PipelineError extends OmniNodeError {
|
|
|
480
514
|
declare class ProtocolError extends OmniNodeError {
|
|
481
515
|
constructor(message: string, options?: OmniNodeErrorOptions);
|
|
482
516
|
}
|
|
517
|
+
declare class PlannerError extends OmniNodeError {
|
|
518
|
+
constructor(code: "PLANNER_FAILED" | "PLAN_INVALID", message: string, options?: OmniNodeErrorOptions);
|
|
519
|
+
}
|
|
483
520
|
declare class MemoryError extends OmniNodeError {
|
|
484
521
|
constructor(message: string, options?: OmniNodeErrorOptions);
|
|
485
522
|
}
|
|
@@ -702,6 +739,19 @@ declare const pipelineConfigSchema: z.ZodObject<{
|
|
|
702
739
|
name?: string | undefined;
|
|
703
740
|
objective?: string | undefined;
|
|
704
741
|
}>;
|
|
742
|
+
declare const plannerConfigSchema: z.ZodObject<{
|
|
743
|
+
kind: z.ZodDefault<z.ZodEnum<["model", "heuristic"]>>;
|
|
744
|
+
model: z.ZodOptional<z.ZodString>;
|
|
745
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
746
|
+
}, "strict", z.ZodTypeAny, {
|
|
747
|
+
kind: "model" | "heuristic";
|
|
748
|
+
model?: string | undefined;
|
|
749
|
+
instruction?: string | undefined;
|
|
750
|
+
}, {
|
|
751
|
+
kind?: "model" | "heuristic" | undefined;
|
|
752
|
+
model?: string | undefined;
|
|
753
|
+
instruction?: string | undefined;
|
|
754
|
+
}>;
|
|
705
755
|
declare const projectConfigSchema: z.ZodObject<{
|
|
706
756
|
name: z.ZodString;
|
|
707
757
|
providers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -853,12 +903,31 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
853
903
|
name?: string | undefined;
|
|
854
904
|
objective?: string | undefined;
|
|
855
905
|
}>, "many">>;
|
|
906
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
907
|
+
kind: z.ZodDefault<z.ZodEnum<["model", "heuristic"]>>;
|
|
908
|
+
model: z.ZodOptional<z.ZodString>;
|
|
909
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
910
|
+
}, "strict", z.ZodTypeAny, {
|
|
911
|
+
kind: "model" | "heuristic";
|
|
912
|
+
model?: string | undefined;
|
|
913
|
+
instruction?: string | undefined;
|
|
914
|
+
}, {
|
|
915
|
+
kind?: "model" | "heuristic" | undefined;
|
|
916
|
+
model?: string | undefined;
|
|
917
|
+
instruction?: string | undefined;
|
|
918
|
+
}>>;
|
|
856
919
|
memory: z.ZodOptional<z.ZodObject<{
|
|
857
|
-
provider: z.ZodString
|
|
920
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
921
|
+
base_url: z.ZodOptional<z.ZodString>;
|
|
922
|
+
api_key_env_var: z.ZodOptional<z.ZodString>;
|
|
858
923
|
}, "strict", z.ZodTypeAny, {
|
|
859
924
|
provider: string;
|
|
925
|
+
base_url?: string | undefined;
|
|
926
|
+
api_key_env_var?: string | undefined;
|
|
860
927
|
}, {
|
|
861
|
-
|
|
928
|
+
base_url?: string | undefined;
|
|
929
|
+
api_key_env_var?: string | undefined;
|
|
930
|
+
provider?: string | undefined;
|
|
862
931
|
}>>;
|
|
863
932
|
}, "strict", z.ZodTypeAny, {
|
|
864
933
|
name: string;
|
|
@@ -908,8 +977,15 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
908
977
|
name?: string | undefined;
|
|
909
978
|
objective?: string | undefined;
|
|
910
979
|
}[];
|
|
980
|
+
planner?: {
|
|
981
|
+
kind: "model" | "heuristic";
|
|
982
|
+
model?: string | undefined;
|
|
983
|
+
instruction?: string | undefined;
|
|
984
|
+
} | undefined;
|
|
911
985
|
memory?: {
|
|
912
986
|
provider: string;
|
|
987
|
+
base_url?: string | undefined;
|
|
988
|
+
api_key_env_var?: string | undefined;
|
|
913
989
|
} | undefined;
|
|
914
990
|
}, {
|
|
915
991
|
name: string;
|
|
@@ -959,8 +1035,15 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
959
1035
|
name?: string | undefined;
|
|
960
1036
|
objective?: string | undefined;
|
|
961
1037
|
}[] | undefined;
|
|
1038
|
+
planner?: {
|
|
1039
|
+
kind?: "model" | "heuristic" | undefined;
|
|
1040
|
+
model?: string | undefined;
|
|
1041
|
+
instruction?: string | undefined;
|
|
1042
|
+
} | undefined;
|
|
962
1043
|
memory?: {
|
|
963
|
-
|
|
1044
|
+
base_url?: string | undefined;
|
|
1045
|
+
api_key_env_var?: string | undefined;
|
|
1046
|
+
provider?: string | undefined;
|
|
964
1047
|
} | undefined;
|
|
965
1048
|
}>;
|
|
966
1049
|
declare const appConfigSchema: z.ZodObject<{
|
|
@@ -1115,12 +1198,31 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1115
1198
|
name?: string | undefined;
|
|
1116
1199
|
objective?: string | undefined;
|
|
1117
1200
|
}>, "many">>;
|
|
1201
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
1202
|
+
kind: z.ZodDefault<z.ZodEnum<["model", "heuristic"]>>;
|
|
1203
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1204
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
}, "strict", z.ZodTypeAny, {
|
|
1206
|
+
kind: "model" | "heuristic";
|
|
1207
|
+
model?: string | undefined;
|
|
1208
|
+
instruction?: string | undefined;
|
|
1209
|
+
}, {
|
|
1210
|
+
kind?: "model" | "heuristic" | undefined;
|
|
1211
|
+
model?: string | undefined;
|
|
1212
|
+
instruction?: string | undefined;
|
|
1213
|
+
}>>;
|
|
1118
1214
|
memory: z.ZodOptional<z.ZodObject<{
|
|
1119
|
-
provider: z.ZodString
|
|
1215
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
1216
|
+
base_url: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
api_key_env_var: z.ZodOptional<z.ZodString>;
|
|
1120
1218
|
}, "strict", z.ZodTypeAny, {
|
|
1121
1219
|
provider: string;
|
|
1220
|
+
base_url?: string | undefined;
|
|
1221
|
+
api_key_env_var?: string | undefined;
|
|
1122
1222
|
}, {
|
|
1123
|
-
|
|
1223
|
+
base_url?: string | undefined;
|
|
1224
|
+
api_key_env_var?: string | undefined;
|
|
1225
|
+
provider?: string | undefined;
|
|
1124
1226
|
}>>;
|
|
1125
1227
|
}, "strict", z.ZodTypeAny, {
|
|
1126
1228
|
name: string;
|
|
@@ -1170,8 +1272,15 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1170
1272
|
name?: string | undefined;
|
|
1171
1273
|
objective?: string | undefined;
|
|
1172
1274
|
}[];
|
|
1275
|
+
planner?: {
|
|
1276
|
+
kind: "model" | "heuristic";
|
|
1277
|
+
model?: string | undefined;
|
|
1278
|
+
instruction?: string | undefined;
|
|
1279
|
+
} | undefined;
|
|
1173
1280
|
memory?: {
|
|
1174
1281
|
provider: string;
|
|
1282
|
+
base_url?: string | undefined;
|
|
1283
|
+
api_key_env_var?: string | undefined;
|
|
1175
1284
|
} | undefined;
|
|
1176
1285
|
}, {
|
|
1177
1286
|
name: string;
|
|
@@ -1221,8 +1330,15 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1221
1330
|
name?: string | undefined;
|
|
1222
1331
|
objective?: string | undefined;
|
|
1223
1332
|
}[] | undefined;
|
|
1333
|
+
planner?: {
|
|
1334
|
+
kind?: "model" | "heuristic" | undefined;
|
|
1335
|
+
model?: string | undefined;
|
|
1336
|
+
instruction?: string | undefined;
|
|
1337
|
+
} | undefined;
|
|
1224
1338
|
memory?: {
|
|
1225
|
-
|
|
1339
|
+
base_url?: string | undefined;
|
|
1340
|
+
api_key_env_var?: string | undefined;
|
|
1341
|
+
provider?: string | undefined;
|
|
1226
1342
|
} | undefined;
|
|
1227
1343
|
}>;
|
|
1228
1344
|
logging: z.ZodOptional<z.ZodObject<{
|
|
@@ -1281,8 +1397,15 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1281
1397
|
name?: string | undefined;
|
|
1282
1398
|
objective?: string | undefined;
|
|
1283
1399
|
}[];
|
|
1400
|
+
planner?: {
|
|
1401
|
+
kind: "model" | "heuristic";
|
|
1402
|
+
model?: string | undefined;
|
|
1403
|
+
instruction?: string | undefined;
|
|
1404
|
+
} | undefined;
|
|
1284
1405
|
memory?: {
|
|
1285
1406
|
provider: string;
|
|
1407
|
+
base_url?: string | undefined;
|
|
1408
|
+
api_key_env_var?: string | undefined;
|
|
1286
1409
|
} | undefined;
|
|
1287
1410
|
};
|
|
1288
1411
|
logging?: {
|
|
@@ -1337,8 +1460,15 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1337
1460
|
name?: string | undefined;
|
|
1338
1461
|
objective?: string | undefined;
|
|
1339
1462
|
}[] | undefined;
|
|
1463
|
+
planner?: {
|
|
1464
|
+
kind?: "model" | "heuristic" | undefined;
|
|
1465
|
+
model?: string | undefined;
|
|
1466
|
+
instruction?: string | undefined;
|
|
1467
|
+
} | undefined;
|
|
1340
1468
|
memory?: {
|
|
1341
|
-
|
|
1469
|
+
base_url?: string | undefined;
|
|
1470
|
+
api_key_env_var?: string | undefined;
|
|
1471
|
+
provider?: string | undefined;
|
|
1342
1472
|
} | undefined;
|
|
1343
1473
|
};
|
|
1344
1474
|
logging?: {
|
|
@@ -1350,6 +1480,7 @@ type AgentConfigYaml = z.infer<typeof agentConfigSchema>;
|
|
|
1350
1480
|
type RoleConfigYaml = z.infer<typeof roleConfigSchema>;
|
|
1351
1481
|
type PipelineConfigYaml = z.infer<typeof pipelineConfigSchema>;
|
|
1352
1482
|
type PipelineStepConfigYaml = z.infer<typeof pipelineStepConfigSchema>;
|
|
1483
|
+
type PlannerConfigYaml = z.infer<typeof plannerConfigSchema>;
|
|
1353
1484
|
type ProjectConfigYaml = z.infer<typeof projectConfigSchema>;
|
|
1354
1485
|
type AppConfigYaml = z.infer<typeof appConfigSchema>;
|
|
1355
1486
|
|
|
@@ -1360,8 +1491,15 @@ interface AppConfig {
|
|
|
1360
1491
|
agents: AgentConfig[];
|
|
1361
1492
|
roles: RoleDefinition[];
|
|
1362
1493
|
pipelines: PipelineDefinition[];
|
|
1494
|
+
planner?: {
|
|
1495
|
+
kind: "model" | "heuristic";
|
|
1496
|
+
model?: string;
|
|
1497
|
+
instruction?: string;
|
|
1498
|
+
};
|
|
1363
1499
|
memory?: {
|
|
1364
1500
|
provider: string;
|
|
1501
|
+
baseUrl?: string;
|
|
1502
|
+
apiKeyEnvVar?: string;
|
|
1365
1503
|
};
|
|
1366
1504
|
};
|
|
1367
1505
|
logging?: {
|
|
@@ -1387,8 +1525,14 @@ declare function loadConfig(options?: LoadConfigOptions): AppConfig;
|
|
|
1387
1525
|
/** Template written by `omninode init` (§22, §23). */
|
|
1388
1526
|
declare function defaultProjectConfigYaml(projectName?: string): string;
|
|
1389
1527
|
|
|
1390
|
-
|
|
1391
|
-
|
|
1528
|
+
/** Minimal provider identity — any config object with a name and optional env var reference. */
|
|
1529
|
+
interface AuthRef {
|
|
1530
|
+
name: string;
|
|
1531
|
+
apiKeyEnvVar?: string;
|
|
1532
|
+
headers?: Record<string, string>;
|
|
1533
|
+
}
|
|
1534
|
+
declare function resolveApiKey(config: AuthRef, env?: Record<string, string | undefined>): string | undefined;
|
|
1535
|
+
declare function authHeaders(config: AuthRef, env?: Record<string, string | undefined>): Record<string, string>;
|
|
1392
1536
|
|
|
1393
1537
|
interface HttpRequestOptions {
|
|
1394
1538
|
method?: "GET" | "POST";
|
|
@@ -1528,6 +1672,67 @@ declare class FileTaskStore implements TaskStore {
|
|
|
1528
1672
|
private write;
|
|
1529
1673
|
}
|
|
1530
1674
|
|
|
1675
|
+
declare function keywords(text: string): Set<string>;
|
|
1676
|
+
declare class LocalMemoryProvider implements IMemoryProvider {
|
|
1677
|
+
readonly name = "local";
|
|
1678
|
+
private readonly filePath;
|
|
1679
|
+
private queue;
|
|
1680
|
+
constructor(directory?: string);
|
|
1681
|
+
query(query: MemoryQuery): Promise<MemoryEntry[]>;
|
|
1682
|
+
write(entry: MemoryEntry): Promise<void>;
|
|
1683
|
+
count(): Promise<number>;
|
|
1684
|
+
private synchronized;
|
|
1685
|
+
private load;
|
|
1686
|
+
private saveAll;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
interface RememberaConfig {
|
|
1690
|
+
baseUrl: string;
|
|
1691
|
+
apiKeyEnvVar?: string;
|
|
1692
|
+
env?: Record<string, string | undefined>;
|
|
1693
|
+
}
|
|
1694
|
+
declare class RememberaMemoryProvider implements IMemoryProvider {
|
|
1695
|
+
readonly name = "remembera";
|
|
1696
|
+
private readonly baseUrl;
|
|
1697
|
+
private readonly apiKeyEnvVar?;
|
|
1698
|
+
private readonly env;
|
|
1699
|
+
private readonly log;
|
|
1700
|
+
constructor(config: RememberaConfig, log?: Logger);
|
|
1701
|
+
private headers;
|
|
1702
|
+
query(query: MemoryQuery): Promise<MemoryEntry[]>;
|
|
1703
|
+
write(entry: MemoryEntry): Promise<void>;
|
|
1704
|
+
private request;
|
|
1705
|
+
private toEntry;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
type MemoryProviderConfig = NonNullable<AppConfig["project"]["memory"]>;
|
|
1709
|
+
declare function createMemoryProvider(config?: MemoryProviderConfig): IMemoryProvider;
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* Memory service (§19–§20): gathers relevant memory before a task runs and
|
|
1713
|
+
* records outcomes afterwards — the Task → memory → relevant context →
|
|
1714
|
+
* agents → reports → memory loop. Memory failures are best-effort: they log
|
|
1715
|
+
* a warning and never fail a task, because memory is an enhancement, not a
|
|
1716
|
+
* dependency (§2).
|
|
1717
|
+
*/
|
|
1718
|
+
|
|
1719
|
+
interface MemoryContextQuery {
|
|
1720
|
+
objective: string;
|
|
1721
|
+
role?: string;
|
|
1722
|
+
project?: string;
|
|
1723
|
+
}
|
|
1724
|
+
declare class MemoryService {
|
|
1725
|
+
private readonly provider;
|
|
1726
|
+
private readonly log;
|
|
1727
|
+
constructor(provider: IMemoryProvider, log?: Logger);
|
|
1728
|
+
get providerRef(): IMemoryProvider;
|
|
1729
|
+
get providerName(): string;
|
|
1730
|
+
/** Relevant context for a task objective; empty string when nothing matches. */
|
|
1731
|
+
gatherContext(query: MemoryContextQuery): Promise<string>;
|
|
1732
|
+
/** Records a finished task's outcome — best-effort. */
|
|
1733
|
+
recordTaskOutcome(task: Task): Promise<void>;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1531
1736
|
interface CreateTaskInput {
|
|
1532
1737
|
objective: string;
|
|
1533
1738
|
project?: string;
|
|
@@ -1539,6 +1744,8 @@ interface TaskEngineOptions {
|
|
|
1539
1744
|
agents: AgentRegistry;
|
|
1540
1745
|
roles: RoleRegistry;
|
|
1541
1746
|
store: TaskStore;
|
|
1747
|
+
/** When present, tasks gather relevant memory before running and record outcomes after (§20). */
|
|
1748
|
+
memory?: MemoryService;
|
|
1542
1749
|
log?: Logger;
|
|
1543
1750
|
}
|
|
1544
1751
|
declare class TaskEngine {
|
|
@@ -1575,6 +1782,19 @@ interface ReportStore {
|
|
|
1575
1782
|
getCombined(id: string): Promise<CombinedReport | undefined>;
|
|
1576
1783
|
listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
|
|
1577
1784
|
}
|
|
1785
|
+
declare class FileReportStore implements ReportStore {
|
|
1786
|
+
private readonly filePath;
|
|
1787
|
+
private queue;
|
|
1788
|
+
constructor(directory?: string);
|
|
1789
|
+
saveReports(reports: Report[]): Promise<void>;
|
|
1790
|
+
listReports(filter?: ReportFilter): Promise<Report[]>;
|
|
1791
|
+
saveCombined(combined: CombinedReport): Promise<void>;
|
|
1792
|
+
getCombined(id: string): Promise<CombinedReport | undefined>;
|
|
1793
|
+
listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
|
|
1794
|
+
private synchronized;
|
|
1795
|
+
private load;
|
|
1796
|
+
private write;
|
|
1797
|
+
}
|
|
1578
1798
|
|
|
1579
1799
|
/**
|
|
1580
1800
|
* Report service (§16–§17): collects reports from finished tasks (structured
|
|
@@ -1598,6 +1818,59 @@ declare class ReportService {
|
|
|
1598
1818
|
generateCombined(reports: Report[], meta?: CombinedMeta): Promise<CombinedReport | undefined>;
|
|
1599
1819
|
}
|
|
1600
1820
|
|
|
1821
|
+
/**
|
|
1822
|
+
* Report normalization (§17): turns an agent's text output into a structured
|
|
1823
|
+
* Report by extracting findings, recommendations and evidence from
|
|
1824
|
+
* markdown-style sections. Deterministic heuristics; AI-assisted extraction
|
|
1825
|
+
* can layer on top later via the planner.
|
|
1826
|
+
*/
|
|
1827
|
+
|
|
1828
|
+
interface ExtractionMeta {
|
|
1829
|
+
taskId: string;
|
|
1830
|
+
agent: string;
|
|
1831
|
+
model?: string;
|
|
1832
|
+
}
|
|
1833
|
+
declare function extractReportFromText(raw: string, meta: ExtractionMeta): Report;
|
|
1834
|
+
|
|
1835
|
+
interface AggregateOptions {
|
|
1836
|
+
objective?: string;
|
|
1837
|
+
pipelineRunId?: string;
|
|
1838
|
+
taskIds?: string[];
|
|
1839
|
+
/** Token-set Jaccard similarity above which findings are merged. */
|
|
1840
|
+
similarityThreshold?: number;
|
|
1841
|
+
}
|
|
1842
|
+
declare function aggregateReports(reports: Report[], options?: AggregateOptions): CombinedReport;
|
|
1843
|
+
declare function similar(a: string, b: string, threshold: number): boolean;
|
|
1844
|
+
|
|
1845
|
+
/** Planner interface and request contract (§18). The planner is replaceable. */
|
|
1846
|
+
|
|
1847
|
+
interface PlanRequest {
|
|
1848
|
+
objective: string;
|
|
1849
|
+
/** Raw reports (already normalized) the plan is based on. */
|
|
1850
|
+
reports: Report[];
|
|
1851
|
+
/** Combined research context from upstream pipeline steps, if available. */
|
|
1852
|
+
context?: string;
|
|
1853
|
+
role?: RoleDefinition;
|
|
1854
|
+
memory?: MemoryEntry[];
|
|
1855
|
+
project?: string;
|
|
1856
|
+
taskId?: string;
|
|
1857
|
+
pipelineRunId?: string;
|
|
1858
|
+
}
|
|
1859
|
+
interface IPlanner {
|
|
1860
|
+
readonly name: string;
|
|
1861
|
+
plan(request: PlanRequest): Promise<Plan>;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
interface PlanFilter {
|
|
1865
|
+
pipelineRunId?: string;
|
|
1866
|
+
taskId?: string;
|
|
1867
|
+
}
|
|
1868
|
+
interface PlanStore {
|
|
1869
|
+
save(plan: Plan): Promise<void>;
|
|
1870
|
+
get(id: string): Promise<Plan | undefined>;
|
|
1871
|
+
list(filter?: PlanFilter): Promise<Plan[]>;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1601
1874
|
interface PipelineRunFilter {
|
|
1602
1875
|
pipelineId?: string;
|
|
1603
1876
|
status?: PipelineRunStatus;
|
|
@@ -1627,6 +1900,10 @@ interface PipelineEngineOptions {
|
|
|
1627
1900
|
providers: AppConfig["project"]["providers"];
|
|
1628
1901
|
store: PipelineRunStore;
|
|
1629
1902
|
chat?: ChatFn;
|
|
1903
|
+
/** Default planner used by plan steps without their own model (§18). */
|
|
1904
|
+
planner?: IPlanner;
|
|
1905
|
+
/** When present, plans produced by plan steps are persisted. */
|
|
1906
|
+
plans?: PlanStore;
|
|
1630
1907
|
/** When present, finished runs have their reports collected, stored and combined (§16–§17). */
|
|
1631
1908
|
reports?: ReportService;
|
|
1632
1909
|
log?: Logger;
|
|
@@ -1665,10 +1942,8 @@ declare class PipelineEngine {
|
|
|
1665
1942
|
/** Default chat function: resolves "provider:model" against the configured providers. */
|
|
1666
1943
|
declare function createDefaultChatFn(providers: AppConfig["project"]["providers"]): ChatFn;
|
|
1667
1944
|
|
|
1668
|
-
/** Assembles a PipelineEngine from the project configuration (local-first defaults). */
|
|
1669
|
-
|
|
1670
1945
|
declare function buildPipelineEngine(config: AppConfig, log?: Logger): PipelineEngine;
|
|
1671
1946
|
|
|
1672
|
-
declare const OMNINODE_VERSION = "0.
|
|
1947
|
+
declare const OMNINODE_VERSION = "0.9.0";
|
|
1673
1948
|
|
|
1674
|
-
export { type AgentConfig, type AgentConfigYaml, AgentError, type AgentInfo, type AgentInputMode, type AgentIntegrationType, AgentRegistry, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AggregatedFinding, type AggregatedRecommendation, type AppConfig, type AppConfigYaml, type ChatFn, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatUsage, type CombinedReport, type Confidence, ConfigError, ConsoleLogSink, type CreateTaskInput, type DiscoveryResult, type EnvelopeMeta, FilePipelineRunStore, FileTaskStore, type Finding, type FindingSeverity, type FindingSource, type HttpRequestOptions, type HttpResponse, type IAgent, type IChatProvider, type IMemoryProvider, type IProvider, type LoadConfigOptions, type LogLevel, type LogSink, Logger, type LoggerOptions, type MemoryEntry, MemoryError, type MemoryQuery, type MemoryScope, type MessageEnvelope, type ModelCapabilities, type ModelFilter, type ModelInfo, ModelRegistry, type ModelStatus, type NodeToAgentMessage, OMNINODE_VERSION, OPENAI_COMPATIBLE_TYPES, type OmniHilbrasConnectionResult, OmniHilbrasProvider, OmniNodeError, type OmniNodeErrorCode, type OmniNodeErrorOptions, OpenAICompatibleProvider, type PipelineConfigYaml, type PipelineDefinition, PipelineEngine, type PipelineEngineOptions, PipelineError, type PipelineRun, type PipelineRunFilter, type PipelineRunStatus, type PipelineRunStore, type PipelineStep, type PipelineStepCondition, type PipelineStepConfigYaml, type PipelineStepKind, type PipelineStepRun, ProcessAgent, type Project, type ProjectConfigYaml, ProtocolError, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderHealth, type ProviderStatus, type ProviderType, type Report, type RoleConfigYaml, type RoleDefinition, RoleRegistry, type RunPipelineOptions, type Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, appConfigSchema, authHeaders, buildAgentRegistry, buildPipelineEngine, buildRoleRegistry, composeTaskText, createAgent, createDefaultChatFn, createProvider, createTaskEngine, defaultProjectConfigYaml, expandEnvRefs, findConfigFile, isOmniNodeError, loadConfig, logger, pipelineConfigSchema, pipelineStepConfigSchema, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema };
|
|
1949
|
+
export { type AgentConfig, type AgentConfigYaml, 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 ChatFn, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatUsage, type CombinedMeta, type CombinedReport, type CombinedReportFilter, type Confidence, ConfigError, ConsoleLogSink, type CreateTaskInput, type DiscoveryResult, type EnvelopeMeta, type ExtractionMeta, FilePipelineRunStore, FileReportStore, FileTaskStore, type Finding, type FindingSeverity, type FindingSource, type HttpRequestOptions, type HttpResponse, type IAgent, type IChatProvider, type IMemoryProvider, type IProvider, type LoadConfigOptions, LocalMemoryProvider, type LogLevel, type LogSink, Logger, type LoggerOptions, type MemoryContextQuery, type MemoryEntry, MemoryError, type MemoryProviderConfig, type MemoryQuery, type MemoryScope, MemoryService, type MessageEnvelope, type ModelCapabilities, type ModelFilter, type ModelInfo, ModelRegistry, type ModelStatus, type NodeToAgentMessage, OMNINODE_VERSION, OPENAI_COMPATIBLE_TYPES, type OmniHilbrasConnectionResult, OmniHilbrasProvider, OmniNodeError, type OmniNodeErrorCode, type OmniNodeErrorOptions, OpenAICompatibleProvider, type PipelineConfigYaml, type PipelineDefinition, PipelineEngine, type PipelineEngineOptions, PipelineError, type PipelineRun, type PipelineRunFilter, type PipelineRunStatus, type PipelineRunStore, type PipelineStep, type PipelineStepCondition, type PipelineStepConfigYaml, type PipelineStepKind, type PipelineStepRun, type Plan, type PlanStep, type PlannerConfigYaml, PlannerError, ProcessAgent, type Project, type ProjectConfigYaml, ProtocolError, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderHealth, type ProviderStatus, type ProviderType, type RememberaConfig, RememberaMemoryProvider, type Report, type ReportFilter, ReportService, type ReportStore, type RoleConfigYaml, type RoleDefinition, RoleRegistry, type RunPipelineOptions, type Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, aggregateReports, appConfigSchema, authHeaders, buildAgentRegistry, buildPipelineEngine, buildRoleRegistry, composeTaskText, createAgent, createDefaultChatFn, createMemoryProvider, createProvider, createTaskEngine, defaultProjectConfigYaml, expandEnvRefs, extractReportFromText, findConfigFile, isOmniNodeError, keywords, loadConfig, logger, pipelineConfigSchema, pipelineStepConfigSchema, plannerConfigSchema, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema, similar };
|