@hilbras/omninode 0.7.0 → 0.8.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/dist/index.d.ts CHANGED
@@ -854,11 +854,17 @@ declare const projectConfigSchema: z.ZodObject<{
854
854
  objective?: string | undefined;
855
855
  }>, "many">>;
856
856
  memory: z.ZodOptional<z.ZodObject<{
857
- provider: z.ZodString;
857
+ provider: z.ZodDefault<z.ZodString>;
858
+ base_url: z.ZodOptional<z.ZodString>;
859
+ api_key_env_var: z.ZodOptional<z.ZodString>;
858
860
  }, "strict", z.ZodTypeAny, {
859
861
  provider: string;
862
+ base_url?: string | undefined;
863
+ api_key_env_var?: string | undefined;
860
864
  }, {
861
- provider: string;
865
+ base_url?: string | undefined;
866
+ api_key_env_var?: string | undefined;
867
+ provider?: string | undefined;
862
868
  }>>;
863
869
  }, "strict", z.ZodTypeAny, {
864
870
  name: string;
@@ -910,6 +916,8 @@ declare const projectConfigSchema: z.ZodObject<{
910
916
  }[];
911
917
  memory?: {
912
918
  provider: string;
919
+ base_url?: string | undefined;
920
+ api_key_env_var?: string | undefined;
913
921
  } | undefined;
914
922
  }, {
915
923
  name: string;
@@ -960,7 +968,9 @@ declare const projectConfigSchema: z.ZodObject<{
960
968
  objective?: string | undefined;
961
969
  }[] | undefined;
962
970
  memory?: {
963
- provider: string;
971
+ base_url?: string | undefined;
972
+ api_key_env_var?: string | undefined;
973
+ provider?: string | undefined;
964
974
  } | undefined;
965
975
  }>;
966
976
  declare const appConfigSchema: z.ZodObject<{
@@ -1116,11 +1126,17 @@ declare const appConfigSchema: z.ZodObject<{
1116
1126
  objective?: string | undefined;
1117
1127
  }>, "many">>;
1118
1128
  memory: z.ZodOptional<z.ZodObject<{
1119
- provider: z.ZodString;
1129
+ provider: z.ZodDefault<z.ZodString>;
1130
+ base_url: z.ZodOptional<z.ZodString>;
1131
+ api_key_env_var: z.ZodOptional<z.ZodString>;
1120
1132
  }, "strict", z.ZodTypeAny, {
1121
1133
  provider: string;
1134
+ base_url?: string | undefined;
1135
+ api_key_env_var?: string | undefined;
1122
1136
  }, {
1123
- provider: string;
1137
+ base_url?: string | undefined;
1138
+ api_key_env_var?: string | undefined;
1139
+ provider?: string | undefined;
1124
1140
  }>>;
1125
1141
  }, "strict", z.ZodTypeAny, {
1126
1142
  name: string;
@@ -1172,6 +1188,8 @@ declare const appConfigSchema: z.ZodObject<{
1172
1188
  }[];
1173
1189
  memory?: {
1174
1190
  provider: string;
1191
+ base_url?: string | undefined;
1192
+ api_key_env_var?: string | undefined;
1175
1193
  } | undefined;
1176
1194
  }, {
1177
1195
  name: string;
@@ -1222,7 +1240,9 @@ declare const appConfigSchema: z.ZodObject<{
1222
1240
  objective?: string | undefined;
1223
1241
  }[] | undefined;
1224
1242
  memory?: {
1225
- provider: string;
1243
+ base_url?: string | undefined;
1244
+ api_key_env_var?: string | undefined;
1245
+ provider?: string | undefined;
1226
1246
  } | undefined;
1227
1247
  }>;
1228
1248
  logging: z.ZodOptional<z.ZodObject<{
@@ -1283,6 +1303,8 @@ declare const appConfigSchema: z.ZodObject<{
1283
1303
  }[];
1284
1304
  memory?: {
1285
1305
  provider: string;
1306
+ base_url?: string | undefined;
1307
+ api_key_env_var?: string | undefined;
1286
1308
  } | undefined;
1287
1309
  };
1288
1310
  logging?: {
@@ -1338,7 +1360,9 @@ declare const appConfigSchema: z.ZodObject<{
1338
1360
  objective?: string | undefined;
1339
1361
  }[] | undefined;
1340
1362
  memory?: {
1341
- provider: string;
1363
+ base_url?: string | undefined;
1364
+ api_key_env_var?: string | undefined;
1365
+ provider?: string | undefined;
1342
1366
  } | undefined;
1343
1367
  };
1344
1368
  logging?: {
@@ -1362,6 +1386,8 @@ interface AppConfig {
1362
1386
  pipelines: PipelineDefinition[];
1363
1387
  memory?: {
1364
1388
  provider: string;
1389
+ baseUrl?: string;
1390
+ apiKeyEnvVar?: string;
1365
1391
  };
1366
1392
  };
1367
1393
  logging?: {
@@ -1387,8 +1413,14 @@ declare function loadConfig(options?: LoadConfigOptions): AppConfig;
1387
1413
  /** Template written by `omninode init` (§22, §23). */
1388
1414
  declare function defaultProjectConfigYaml(projectName?: string): string;
1389
1415
 
1390
- declare function resolveApiKey(config: ProviderConfig, env?: Record<string, string | undefined>): string | undefined;
1391
- declare function authHeaders(config: ProviderConfig, env?: Record<string, string | undefined>): Record<string, string>;
1416
+ /** Minimal provider identity — any config object with a name and optional env var reference. */
1417
+ interface AuthRef {
1418
+ name: string;
1419
+ apiKeyEnvVar?: string;
1420
+ headers?: Record<string, string>;
1421
+ }
1422
+ declare function resolveApiKey(config: AuthRef, env?: Record<string, string | undefined>): string | undefined;
1423
+ declare function authHeaders(config: AuthRef, env?: Record<string, string | undefined>): Record<string, string>;
1392
1424
 
1393
1425
  interface HttpRequestOptions {
1394
1426
  method?: "GET" | "POST";
@@ -1528,6 +1560,67 @@ declare class FileTaskStore implements TaskStore {
1528
1560
  private write;
1529
1561
  }
1530
1562
 
1563
+ declare function keywords(text: string): Set<string>;
1564
+ declare class LocalMemoryProvider implements IMemoryProvider {
1565
+ readonly name = "local";
1566
+ private readonly filePath;
1567
+ private queue;
1568
+ constructor(directory?: string);
1569
+ query(query: MemoryQuery): Promise<MemoryEntry[]>;
1570
+ write(entry: MemoryEntry): Promise<void>;
1571
+ count(): Promise<number>;
1572
+ private synchronized;
1573
+ private load;
1574
+ private saveAll;
1575
+ }
1576
+
1577
+ interface RememberaConfig {
1578
+ baseUrl: string;
1579
+ apiKeyEnvVar?: string;
1580
+ env?: Record<string, string | undefined>;
1581
+ }
1582
+ declare class RememberaMemoryProvider implements IMemoryProvider {
1583
+ readonly name = "remembera";
1584
+ private readonly baseUrl;
1585
+ private readonly apiKeyEnvVar?;
1586
+ private readonly env;
1587
+ private readonly log;
1588
+ constructor(config: RememberaConfig, log?: Logger);
1589
+ private headers;
1590
+ query(query: MemoryQuery): Promise<MemoryEntry[]>;
1591
+ write(entry: MemoryEntry): Promise<void>;
1592
+ private request;
1593
+ private toEntry;
1594
+ }
1595
+
1596
+ type MemoryProviderConfig = NonNullable<AppConfig["project"]["memory"]>;
1597
+ declare function createMemoryProvider(config?: MemoryProviderConfig): IMemoryProvider;
1598
+
1599
+ /**
1600
+ * Memory service (§19–§20): gathers relevant memory before a task runs and
1601
+ * records outcomes afterwards — the Task → memory → relevant context →
1602
+ * agents → reports → memory loop. Memory failures are best-effort: they log
1603
+ * a warning and never fail a task, because memory is an enhancement, not a
1604
+ * dependency (§2).
1605
+ */
1606
+
1607
+ interface MemoryContextQuery {
1608
+ objective: string;
1609
+ role?: string;
1610
+ project?: string;
1611
+ }
1612
+ declare class MemoryService {
1613
+ private readonly provider;
1614
+ private readonly log;
1615
+ constructor(provider: IMemoryProvider, log?: Logger);
1616
+ get providerRef(): IMemoryProvider;
1617
+ get providerName(): string;
1618
+ /** Relevant context for a task objective; empty string when nothing matches. */
1619
+ gatherContext(query: MemoryContextQuery): Promise<string>;
1620
+ /** Records a finished task's outcome — best-effort. */
1621
+ recordTaskOutcome(task: Task): Promise<void>;
1622
+ }
1623
+
1531
1624
  interface CreateTaskInput {
1532
1625
  objective: string;
1533
1626
  project?: string;
@@ -1539,6 +1632,8 @@ interface TaskEngineOptions {
1539
1632
  agents: AgentRegistry;
1540
1633
  roles: RoleRegistry;
1541
1634
  store: TaskStore;
1635
+ /** When present, tasks gather relevant memory before running and record outcomes after (§20). */
1636
+ memory?: MemoryService;
1542
1637
  log?: Logger;
1543
1638
  }
1544
1639
  declare class TaskEngine {
@@ -1575,6 +1670,19 @@ interface ReportStore {
1575
1670
  getCombined(id: string): Promise<CombinedReport | undefined>;
1576
1671
  listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
1577
1672
  }
1673
+ declare class FileReportStore implements ReportStore {
1674
+ private readonly filePath;
1675
+ private queue;
1676
+ constructor(directory?: string);
1677
+ saveReports(reports: Report[]): Promise<void>;
1678
+ listReports(filter?: ReportFilter): Promise<Report[]>;
1679
+ saveCombined(combined: CombinedReport): Promise<void>;
1680
+ getCombined(id: string): Promise<CombinedReport | undefined>;
1681
+ listCombined(filter?: CombinedReportFilter): Promise<CombinedReport[]>;
1682
+ private synchronized;
1683
+ private load;
1684
+ private write;
1685
+ }
1578
1686
 
1579
1687
  /**
1580
1688
  * Report service (§16–§17): collects reports from finished tasks (structured
@@ -1598,6 +1706,30 @@ declare class ReportService {
1598
1706
  generateCombined(reports: Report[], meta?: CombinedMeta): Promise<CombinedReport | undefined>;
1599
1707
  }
1600
1708
 
1709
+ /**
1710
+ * Report normalization (§17): turns an agent's text output into a structured
1711
+ * Report by extracting findings, recommendations and evidence from
1712
+ * markdown-style sections. Deterministic heuristics; AI-assisted extraction
1713
+ * can layer on top later via the planner.
1714
+ */
1715
+
1716
+ interface ExtractionMeta {
1717
+ taskId: string;
1718
+ agent: string;
1719
+ model?: string;
1720
+ }
1721
+ declare function extractReportFromText(raw: string, meta: ExtractionMeta): Report;
1722
+
1723
+ interface AggregateOptions {
1724
+ objective?: string;
1725
+ pipelineRunId?: string;
1726
+ taskIds?: string[];
1727
+ /** Token-set Jaccard similarity above which findings are merged. */
1728
+ similarityThreshold?: number;
1729
+ }
1730
+ declare function aggregateReports(reports: Report[], options?: AggregateOptions): CombinedReport;
1731
+ declare function similar(a: string, b: string, threshold: number): boolean;
1732
+
1601
1733
  interface PipelineRunFilter {
1602
1734
  pipelineId?: string;
1603
1735
  status?: PipelineRunStatus;
@@ -1669,6 +1801,6 @@ declare function createDefaultChatFn(providers: AppConfig["project"]["providers"
1669
1801
 
1670
1802
  declare function buildPipelineEngine(config: AppConfig, log?: Logger): PipelineEngine;
1671
1803
 
1672
- declare const OMNINODE_VERSION = "0.7.0";
1804
+ declare const OMNINODE_VERSION = "0.8.0";
1673
1805
 
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 };
1806
+ 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, 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, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema, similar };