@hilbras/omninode 0.10.0 → 2.0.0-alpha.1
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 +46 -7
- package/dist/cli/index.js +271 -254
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +192 -31
- package/dist/index.js +233 -233
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ interface AgentConfig {
|
|
|
98
98
|
inputMode?: AgentInputMode;
|
|
99
99
|
/** Per-task timeout in milliseconds; the process is killed when exceeded. */
|
|
100
100
|
timeoutMs?: number;
|
|
101
|
+
/** When false, the agent process starts with a minimal environment (PATH + env). */
|
|
102
|
+
inheritEnv?: boolean;
|
|
101
103
|
/** Models (as "provider:model-id") this agent may use, if restricted. */
|
|
102
104
|
allowedModels?: string[];
|
|
103
105
|
metadata?: Record<string, unknown>;
|
|
@@ -170,6 +172,11 @@ interface ChatResponse {
|
|
|
170
172
|
/** Verbatim provider response body for advanced consumers. */
|
|
171
173
|
raw?: unknown;
|
|
172
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Model-backed chat used by the planner layer. Lives in the neutral types
|
|
177
|
+
* layer so adapters (e.g. planner) never depend on engine modules.
|
|
178
|
+
*/
|
|
179
|
+
type ChatFn = (model: string, messages: ChatMessage[]) => Promise<string>;
|
|
173
180
|
|
|
174
181
|
/**
|
|
175
182
|
* Memory abstraction. Remembera is the preferred Hilbras integration, but the
|
|
@@ -601,6 +608,7 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
601
608
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
602
609
|
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
603
610
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
611
|
+
inherit_env: z.ZodOptional<z.ZodBoolean>;
|
|
604
612
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
605
613
|
}, "strict", z.ZodTypeAny, {
|
|
606
614
|
name: string;
|
|
@@ -612,6 +620,7 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
612
620
|
cwd?: string | undefined;
|
|
613
621
|
env?: Record<string, string> | undefined;
|
|
614
622
|
timeout_ms?: number | undefined;
|
|
623
|
+
inherit_env?: boolean | undefined;
|
|
615
624
|
}, {
|
|
616
625
|
name: string;
|
|
617
626
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -622,6 +631,7 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
622
631
|
env?: Record<string, string> | undefined;
|
|
623
632
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
624
633
|
timeout_ms?: number | undefined;
|
|
634
|
+
inherit_env?: boolean | undefined;
|
|
625
635
|
}>;
|
|
626
636
|
declare const roleConfigSchema: z.ZodObject<{
|
|
627
637
|
id: z.ZodString;
|
|
@@ -793,6 +803,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
793
803
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
794
804
|
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
795
805
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
806
|
+
inherit_env: z.ZodOptional<z.ZodBoolean>;
|
|
796
807
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
797
808
|
}, "strict", z.ZodTypeAny, {
|
|
798
809
|
name: string;
|
|
@@ -804,6 +815,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
804
815
|
cwd?: string | undefined;
|
|
805
816
|
env?: Record<string, string> | undefined;
|
|
806
817
|
timeout_ms?: number | undefined;
|
|
818
|
+
inherit_env?: boolean | undefined;
|
|
807
819
|
}, {
|
|
808
820
|
name: string;
|
|
809
821
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -814,6 +826,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
814
826
|
env?: Record<string, string> | undefined;
|
|
815
827
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
816
828
|
timeout_ms?: number | undefined;
|
|
829
|
+
inherit_env?: boolean | undefined;
|
|
817
830
|
}>, "many">>;
|
|
818
831
|
roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
819
832
|
id: z.ZodString;
|
|
@@ -945,6 +958,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
945
958
|
cwd?: string | undefined;
|
|
946
959
|
env?: Record<string, string> | undefined;
|
|
947
960
|
timeout_ms?: number | undefined;
|
|
961
|
+
inherit_env?: boolean | undefined;
|
|
948
962
|
}[];
|
|
949
963
|
providers: {
|
|
950
964
|
name: string;
|
|
@@ -1003,6 +1017,7 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
1003
1017
|
env?: Record<string, string> | undefined;
|
|
1004
1018
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
1005
1019
|
timeout_ms?: number | undefined;
|
|
1020
|
+
inherit_env?: boolean | undefined;
|
|
1006
1021
|
}[] | undefined;
|
|
1007
1022
|
providers?: {
|
|
1008
1023
|
name: string;
|
|
@@ -1088,6 +1103,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1088
1103
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1089
1104
|
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
1090
1105
|
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
1106
|
+
inherit_env: z.ZodOptional<z.ZodBoolean>;
|
|
1091
1107
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1092
1108
|
}, "strict", z.ZodTypeAny, {
|
|
1093
1109
|
name: string;
|
|
@@ -1099,6 +1115,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1099
1115
|
cwd?: string | undefined;
|
|
1100
1116
|
env?: Record<string, string> | undefined;
|
|
1101
1117
|
timeout_ms?: number | undefined;
|
|
1118
|
+
inherit_env?: boolean | undefined;
|
|
1102
1119
|
}, {
|
|
1103
1120
|
name: string;
|
|
1104
1121
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -1109,6 +1126,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1109
1126
|
env?: Record<string, string> | undefined;
|
|
1110
1127
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
1111
1128
|
timeout_ms?: number | undefined;
|
|
1129
|
+
inherit_env?: boolean | undefined;
|
|
1112
1130
|
}>, "many">>;
|
|
1113
1131
|
roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1114
1132
|
id: z.ZodString;
|
|
@@ -1240,6 +1258,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1240
1258
|
cwd?: string | undefined;
|
|
1241
1259
|
env?: Record<string, string> | undefined;
|
|
1242
1260
|
timeout_ms?: number | undefined;
|
|
1261
|
+
inherit_env?: boolean | undefined;
|
|
1243
1262
|
}[];
|
|
1244
1263
|
providers: {
|
|
1245
1264
|
name: string;
|
|
@@ -1298,6 +1317,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1298
1317
|
env?: Record<string, string> | undefined;
|
|
1299
1318
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
1300
1319
|
timeout_ms?: number | undefined;
|
|
1320
|
+
inherit_env?: boolean | undefined;
|
|
1301
1321
|
}[] | undefined;
|
|
1302
1322
|
providers?: {
|
|
1303
1323
|
name: string;
|
|
@@ -1365,6 +1385,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1365
1385
|
cwd?: string | undefined;
|
|
1366
1386
|
env?: Record<string, string> | undefined;
|
|
1367
1387
|
timeout_ms?: number | undefined;
|
|
1388
|
+
inherit_env?: boolean | undefined;
|
|
1368
1389
|
}[];
|
|
1369
1390
|
providers: {
|
|
1370
1391
|
name: string;
|
|
@@ -1428,6 +1449,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
1428
1449
|
env?: Record<string, string> | undefined;
|
|
1429
1450
|
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
1430
1451
|
timeout_ms?: number | undefined;
|
|
1452
|
+
inherit_env?: boolean | undefined;
|
|
1431
1453
|
}[] | undefined;
|
|
1432
1454
|
providers?: {
|
|
1433
1455
|
name: string;
|
|
@@ -1608,6 +1630,13 @@ declare class OmniHilbrasProvider extends OpenAICompatibleProvider {
|
|
|
1608
1630
|
connect(registry?: ModelRegistry): Promise<OmniHilbrasConnectionResult>;
|
|
1609
1631
|
}
|
|
1610
1632
|
|
|
1633
|
+
/**
|
|
1634
|
+
* Builds the child environment. By default the agent inherits the full
|
|
1635
|
+
* environment; with `inheritEnv: false` it receives only PATH plus the
|
|
1636
|
+
* explicitly configured variables — useful to avoid leaking OmniNode's
|
|
1637
|
+
* own secrets (e.g. provider API keys) into third-party agents.
|
|
1638
|
+
*/
|
|
1639
|
+
declare function buildChildEnv(config: AgentConfig): NodeJS.ProcessEnv;
|
|
1611
1640
|
declare function composeTaskText(input: AgentTaskInput): string;
|
|
1612
1641
|
declare class ProcessAgent implements IAgent {
|
|
1613
1642
|
readonly config: AgentConfig;
|
|
@@ -1651,6 +1680,41 @@ declare class RoleRegistry {
|
|
|
1651
1680
|
/** Builds a role registry from the project configuration. */
|
|
1652
1681
|
declare function buildRoleRegistry(config: AppConfig): RoleRegistry;
|
|
1653
1682
|
|
|
1683
|
+
interface JsonDocument<T> {
|
|
1684
|
+
/** Bumped when the persisted shape changes in a breaking way (v2 Phase 12). */
|
|
1685
|
+
schemaVersion?: number;
|
|
1686
|
+
items: T[];
|
|
1687
|
+
}
|
|
1688
|
+
interface JsonFileStoreOptions {
|
|
1689
|
+
directory?: string;
|
|
1690
|
+
fileName: string;
|
|
1691
|
+
schemaVersion?: number;
|
|
1692
|
+
/** Called when a persisted file cannot be parsed. */
|
|
1693
|
+
onCorrupt?: (path: string, error: unknown) => void;
|
|
1694
|
+
}
|
|
1695
|
+
declare class JsonFileStore<T> {
|
|
1696
|
+
private readonly filePath;
|
|
1697
|
+
private readonly schemaVersion;
|
|
1698
|
+
private readonly onCorrupt?;
|
|
1699
|
+
private readonly log;
|
|
1700
|
+
private queue;
|
|
1701
|
+
constructor(options: JsonFileStoreOptions);
|
|
1702
|
+
get path(): string;
|
|
1703
|
+
/** All items, or [] when missing/corrupt. */
|
|
1704
|
+
protected readAll(): Promise<T[]>;
|
|
1705
|
+
protected writeAll(items: T[]): Promise<void>;
|
|
1706
|
+
/** Serializes an async operation against this file. */
|
|
1707
|
+
protected synchronized<R>(operation: () => Promise<R>): Promise<R>;
|
|
1708
|
+
/** Read-modify-write helper: applies `mutate` to the current items. */
|
|
1709
|
+
protected mutate<R>(mutate: (items: T[]) => Promise<[T[], R]> | [T[], R]): Promise<R>;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* Task persistence (§4.1 — execution state). The store is replaceable
|
|
1714
|
+
* (§2 — Modular); the default implementation is a local JSON file so
|
|
1715
|
+
* OmniNode stays local-first (§25).
|
|
1716
|
+
*/
|
|
1717
|
+
|
|
1654
1718
|
interface TaskStoreFilter {
|
|
1655
1719
|
status?: TaskStatus;
|
|
1656
1720
|
project?: string;
|
|
@@ -1660,34 +1724,49 @@ interface TaskStore {
|
|
|
1660
1724
|
get(id: string): Promise<Task | undefined>;
|
|
1661
1725
|
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1662
1726
|
}
|
|
1663
|
-
declare class FileTaskStore implements TaskStore {
|
|
1664
|
-
private readonly filePath;
|
|
1665
|
-
/**
|
|
1666
|
-
* Read-modify-write operations are serialized: parallel pipeline tasks
|
|
1667
|
-
* would otherwise race on the JSON file (last writer wins).
|
|
1668
|
-
*/
|
|
1669
|
-
private queue;
|
|
1727
|
+
declare class FileTaskStore extends JsonFileStore<Task> implements TaskStore {
|
|
1670
1728
|
constructor(directory?: string);
|
|
1671
1729
|
save(task: Task): Promise<void>;
|
|
1672
1730
|
get(id: string): Promise<Task | undefined>;
|
|
1673
1731
|
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1674
|
-
private synchronized;
|
|
1675
|
-
private load;
|
|
1676
|
-
private write;
|
|
1677
1732
|
}
|
|
1678
1733
|
|
|
1734
|
+
type AuditAction = "task.created" | "task.queued" | "task.running" | "task.completed" | "task.failed" | "task.cancelled" | "task.retry" | "pipeline.run.started" | "pipeline.run.finished" | "plan.generated" | "memory.context.gathered" | "memory.outcome.recorded";
|
|
1735
|
+
interface AuditEvent {
|
|
1736
|
+
at: string;
|
|
1737
|
+
action: AuditAction;
|
|
1738
|
+
project?: string;
|
|
1739
|
+
id?: string;
|
|
1740
|
+
actor?: string;
|
|
1741
|
+
detail?: Record<string, unknown>;
|
|
1742
|
+
}
|
|
1743
|
+
interface AuditSink {
|
|
1744
|
+
record(event: AuditEvent): Promise<void>;
|
|
1745
|
+
}
|
|
1746
|
+
/** Append-only JSONL sink. Failures are logged, never propagated. */
|
|
1747
|
+
declare class FileAuditLog implements AuditSink {
|
|
1748
|
+
private readonly filePath;
|
|
1749
|
+
private readonly log;
|
|
1750
|
+
constructor(directory?: string, log?: Logger);
|
|
1751
|
+
record(event: AuditEvent): Promise<void>;
|
|
1752
|
+
/** Recent events, oldest first; used by the CLI. */
|
|
1753
|
+
recent(limit?: number): Promise<AuditEvent[]>;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* Local file-based memory provider: the default implementation so persistent
|
|
1758
|
+
* memory works out of the box, locally (§25), with no external service.
|
|
1759
|
+
* Relevance is scored by keyword overlap and tag matches — deterministic and
|
|
1760
|
+
* dependency-free.
|
|
1761
|
+
*/
|
|
1762
|
+
|
|
1679
1763
|
declare function keywords(text: string): Set<string>;
|
|
1680
|
-
declare class LocalMemoryProvider implements IMemoryProvider {
|
|
1764
|
+
declare class LocalMemoryProvider extends JsonFileStore<MemoryEntry> implements IMemoryProvider {
|
|
1681
1765
|
readonly name = "local";
|
|
1682
|
-
private readonly filePath;
|
|
1683
|
-
private queue;
|
|
1684
1766
|
constructor(directory?: string);
|
|
1685
1767
|
query(query: MemoryQuery): Promise<MemoryEntry[]>;
|
|
1686
1768
|
write(entry: MemoryEntry): Promise<void>;
|
|
1687
1769
|
count(): Promise<number>;
|
|
1688
|
-
private synchronized;
|
|
1689
|
-
private load;
|
|
1690
|
-
private saveAll;
|
|
1691
1770
|
}
|
|
1692
1771
|
|
|
1693
1772
|
interface RememberaConfig {
|
|
@@ -1750,6 +1829,8 @@ interface TaskEngineOptions {
|
|
|
1750
1829
|
store: TaskStore;
|
|
1751
1830
|
/** When present, tasks gather relevant memory before running and record outcomes after (§20). */
|
|
1752
1831
|
memory?: MemoryService;
|
|
1832
|
+
/** When present, task lifecycle transitions are appended to the audit log (§24). */
|
|
1833
|
+
audit?: AuditSink;
|
|
1753
1834
|
log?: Logger;
|
|
1754
1835
|
}
|
|
1755
1836
|
declare class TaskEngine {
|
|
@@ -1768,12 +1849,18 @@ declare class TaskEngine {
|
|
|
1768
1849
|
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1769
1850
|
private mustGet;
|
|
1770
1851
|
private transition;
|
|
1852
|
+
private audit;
|
|
1771
1853
|
}
|
|
1772
1854
|
|
|
1773
1855
|
/** Assembles a TaskEngine from the project configuration (local-first defaults). */
|
|
1774
1856
|
|
|
1775
1857
|
declare function createTaskEngine(config: AppConfig, log?: Logger, directory?: string): TaskEngine;
|
|
1776
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* Report persistence (§16 — report storage). Same replaceable-store and
|
|
1861
|
+
* serialized-write patterns as the other local stores.
|
|
1862
|
+
*/
|
|
1863
|
+
|
|
1777
1864
|
interface ReportFilter {
|
|
1778
1865
|
taskId?: string;
|
|
1779
1866
|
agent?: string;
|
|
@@ -1788,18 +1875,20 @@ interface ReportStore {
|
|
|
1788
1875
|
getCombined(id: string): Promise<CombinedReport | undefined>;
|
|
1789
1876
|
listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
|
|
1790
1877
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1878
|
+
type StoreEntry = {
|
|
1879
|
+
kind: "report";
|
|
1880
|
+
report: Report;
|
|
1881
|
+
} | {
|
|
1882
|
+
kind: "combined";
|
|
1883
|
+
combined: CombinedReport;
|
|
1884
|
+
};
|
|
1885
|
+
declare class FileReportStore extends JsonFileStore<StoreEntry> implements ReportStore {
|
|
1794
1886
|
constructor(directory?: string);
|
|
1795
1887
|
saveReports(reports: Report[]): Promise<void>;
|
|
1796
1888
|
listReports(filter?: ReportFilter): Promise<Report[]>;
|
|
1797
1889
|
saveCombined(combined: CombinedReport): Promise<void>;
|
|
1798
1890
|
getCombined(id: string): Promise<CombinedReport | undefined>;
|
|
1799
1891
|
listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
|
|
1800
|
-
private synchronized;
|
|
1801
|
-
private load;
|
|
1802
|
-
private write;
|
|
1803
1892
|
}
|
|
1804
1893
|
|
|
1805
1894
|
/**
|
|
@@ -1867,6 +1956,50 @@ interface IPlanner {
|
|
|
1867
1956
|
plan(request: PlanRequest): Promise<Plan>;
|
|
1868
1957
|
}
|
|
1869
1958
|
|
|
1959
|
+
/**
|
|
1960
|
+
* Planner context builder (§18): assembles everything the planner needs —
|
|
1961
|
+
* the objective, the combined findings from the AI reports (with source
|
|
1962
|
+
* attribution), relevant memory and the role definition — into one
|
|
1963
|
+
* structured text.
|
|
1964
|
+
*/
|
|
1965
|
+
|
|
1966
|
+
declare function buildPlannerContext(request: PlanRequest): string;
|
|
1967
|
+
|
|
1968
|
+
declare class HeuristicPlanner implements IPlanner {
|
|
1969
|
+
readonly name = "heuristic";
|
|
1970
|
+
plan(request: PlanRequest): Promise<Plan>;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
interface ModelPlannerOptions {
|
|
1974
|
+
model: string;
|
|
1975
|
+
chat: ChatFn;
|
|
1976
|
+
/** Extra instruction appended to the system prompt. */
|
|
1977
|
+
instruction?: string;
|
|
1978
|
+
/** Used when the model output is unparseable (or the call fails, if tolerateErrors). */
|
|
1979
|
+
fallback?: IPlanner;
|
|
1980
|
+
log?: Logger;
|
|
1981
|
+
}
|
|
1982
|
+
declare class ModelPlanner implements IPlanner {
|
|
1983
|
+
private readonly options;
|
|
1984
|
+
readonly name = "model";
|
|
1985
|
+
private readonly log;
|
|
1986
|
+
constructor(options: ModelPlannerOptions);
|
|
1987
|
+
plan(request: PlanRequest): Promise<Plan>;
|
|
1988
|
+
private degrade;
|
|
1989
|
+
}
|
|
1990
|
+
/** Extracts and validates the plan JSON from arbitrary model output. */
|
|
1991
|
+
declare function parsePlanJson(text: string): {
|
|
1992
|
+
summary: string;
|
|
1993
|
+
steps: PlanStep[];
|
|
1994
|
+
risks?: string[];
|
|
1995
|
+
notes?: string[];
|
|
1996
|
+
} | undefined;
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Plan persistence (§27 Phase 8 — planner result storage). Same
|
|
2000
|
+
* replaceable-store pattern as the other local stores.
|
|
2001
|
+
*/
|
|
2002
|
+
|
|
1870
2003
|
interface PlanFilter {
|
|
1871
2004
|
pipelineRunId?: string;
|
|
1872
2005
|
taskId?: string;
|
|
@@ -1876,6 +2009,19 @@ interface PlanStore {
|
|
|
1876
2009
|
get(id: string): Promise<Plan | undefined>;
|
|
1877
2010
|
list(filter?: PlanFilter): Promise<Plan[]>;
|
|
1878
2011
|
}
|
|
2012
|
+
declare class FilePlanStore extends JsonFileStore<Plan> implements PlanStore {
|
|
2013
|
+
constructor(directory?: string);
|
|
2014
|
+
save(plan: Plan): Promise<void>;
|
|
2015
|
+
get(id: string): Promise<Plan | undefined>;
|
|
2016
|
+
list(filter?: PlanFilter): Promise<Plan[]>;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
declare function buildPlanner(plannerConfig: AppConfig["project"]["planner"], chat: ChatFn, log?: Logger): IPlanner | undefined;
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* Pipeline run persistence (§27 Phase 5 — pipeline state). Same
|
|
2023
|
+
* replaceable-store pattern as the task store, local-first JSON file.
|
|
2024
|
+
*/
|
|
1879
2025
|
|
|
1880
2026
|
interface PipelineRunFilter {
|
|
1881
2027
|
pipelineId?: string;
|
|
@@ -1886,19 +2032,13 @@ interface PipelineRunStore {
|
|
|
1886
2032
|
get(id: string): Promise<PipelineRun | undefined>;
|
|
1887
2033
|
list(filter?: PipelineRunFilter): Promise<PipelineRun[]>;
|
|
1888
2034
|
}
|
|
1889
|
-
declare class FilePipelineRunStore implements PipelineRunStore {
|
|
1890
|
-
private readonly filePath;
|
|
1891
|
-
private queue;
|
|
2035
|
+
declare class FilePipelineRunStore extends JsonFileStore<PipelineRun> implements PipelineRunStore {
|
|
1892
2036
|
constructor(directory?: string);
|
|
1893
2037
|
save(run: PipelineRun): Promise<void>;
|
|
1894
2038
|
get(id: string): Promise<PipelineRun | undefined>;
|
|
1895
2039
|
list(filter?: PipelineRunFilter): Promise<PipelineRun[]>;
|
|
1896
|
-
private synchronized;
|
|
1897
|
-
private load;
|
|
1898
|
-
private write;
|
|
1899
2040
|
}
|
|
1900
2041
|
|
|
1901
|
-
type ChatFn = (modelRef: string, messages: ChatMessage[]) => Promise<string>;
|
|
1902
2042
|
interface PipelineEngineOptions {
|
|
1903
2043
|
tasks: TaskEngine;
|
|
1904
2044
|
agents: AgentRegistry;
|
|
@@ -1910,6 +2050,8 @@ interface PipelineEngineOptions {
|
|
|
1910
2050
|
planner?: IPlanner;
|
|
1911
2051
|
/** When present, plans produced by plan steps are persisted. */
|
|
1912
2052
|
plans?: PlanStore;
|
|
2053
|
+
/** When present, pipeline lifecycle events are appended to the audit log (§24). */
|
|
2054
|
+
audit?: AuditSink;
|
|
1913
2055
|
/** When present, finished runs have their reports collected, stored and combined (§16–§17). */
|
|
1914
2056
|
reports?: ReportService;
|
|
1915
2057
|
log?: Logger;
|
|
@@ -1950,6 +2092,25 @@ declare function createDefaultChatFn(providers: AppConfig["project"]["providers"
|
|
|
1950
2092
|
|
|
1951
2093
|
declare function buildPipelineEngine(config: AppConfig, log?: Logger): PipelineEngine;
|
|
1952
2094
|
|
|
1953
|
-
|
|
2095
|
+
/**
|
|
2096
|
+
* Persistence layer (v2 Phase 1): one entry point to every local store.
|
|
2097
|
+
*
|
|
2098
|
+
* All stores are interfaces with a local JSON default
|
|
2099
|
+
* (TaskStore, PipelineRunStore, ReportStore, PlanStore, IMemoryProvider,
|
|
2100
|
+
* AuditSink) — see docs/API.md for the inventory and stability status.
|
|
2101
|
+
*/
|
|
2102
|
+
|
|
2103
|
+
/** Bundles every store for a single project directory. */
|
|
2104
|
+
declare class ProjectStores {
|
|
2105
|
+
readonly tasks: FileTaskStore;
|
|
2106
|
+
readonly pipelineRuns: FilePipelineRunStore;
|
|
2107
|
+
readonly reports: FileReportStore;
|
|
2108
|
+
readonly plans: FilePlanStore;
|
|
2109
|
+
readonly memory: LocalMemoryProvider;
|
|
2110
|
+
readonly audit: FileAuditLog;
|
|
2111
|
+
constructor(directory?: string);
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
declare const OMNINODE_VERSION = "2.0.0-alpha.1";
|
|
1954
2115
|
|
|
1955
|
-
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 };
|
|
2116
|
+
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 AuditAction, type AuditEvent, type AuditSink, 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, FileAuditLog, FilePipelineRunStore, FilePlanStore, FileReportStore, FileTaskStore, type Finding, type FindingSeverity, type FindingSource, HeuristicPlanner, type HttpRequestOptions, type HttpResponse, type IAgent, type IChatProvider, type IMemoryProvider, type IPlanner, type IProvider, type JsonDocument, JsonFileStore, type JsonFileStoreOptions, 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, ModelPlanner, 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 PlanFilter, type PlanRequest, type PlanStep, type PlanStore, type PlannerConfigYaml, PlannerError, ProcessAgent, type Project, type ProjectConfigYaml, ProjectStores, 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, buildChildEnv, buildPipelineEngine, buildPlanner, buildPlannerContext, buildRoleRegistry, composeTaskText, createAgent, createDefaultChatFn, createMemoryProvider, createProvider, createTaskEngine, defaultProjectConfigYaml, expandEnvRefs, extractReportFromText, findConfigFile, isOmniNodeError, keywords, loadConfig, logger, parsePlanJson, pipelineConfigSchema, pipelineStepConfigSchema, plannerConfigSchema, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema, similar };
|