@hilbras/omninode 0.3.0 → 0.5.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 +38 -3
- package/dist/cli/index.js +699 -33
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +172 -36
- package/dist/index.js +521 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
/** Structured report format so reports can be processed programmatically (§16). */
|
|
4
|
+
type Confidence = "low" | "medium" | "high";
|
|
5
|
+
type FindingSeverity = "info" | "low" | "medium" | "high" | "critical";
|
|
6
|
+
interface Finding {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
detail: string;
|
|
10
|
+
severity?: FindingSeverity;
|
|
11
|
+
evidence?: string[];
|
|
12
|
+
/** File path or conceptual location the finding refers to. */
|
|
13
|
+
location?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
}
|
|
16
|
+
interface Report {
|
|
17
|
+
id: string;
|
|
18
|
+
taskId: string;
|
|
19
|
+
/** Agent name from the agent registry. */
|
|
20
|
+
agent: string;
|
|
21
|
+
/** Model id used, if known. */
|
|
22
|
+
model?: string;
|
|
23
|
+
summary: string;
|
|
24
|
+
findings: Finding[];
|
|
25
|
+
recommendations: string[];
|
|
26
|
+
confidence?: Confidence;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
|
|
3
31
|
/** Role system: what an AI is supposed to do, independent of any provider (§11). */
|
|
4
32
|
interface RoleDefinition {
|
|
5
33
|
/** Slug identifier, e.g. "architecture-reviewer". */
|
|
@@ -19,6 +47,8 @@ interface RoleDefinition {
|
|
|
19
47
|
|
|
20
48
|
type AgentIntegrationType = "native" | "process" | "custom";
|
|
21
49
|
type AgentStatus = "registered" | "ready" | "running" | "busy" | "stopped" | "error";
|
|
50
|
+
/** How the task payload reaches a process agent (§9). */
|
|
51
|
+
type AgentInputMode = "stdin" | "arg" | "protocol";
|
|
22
52
|
interface AgentConfig {
|
|
23
53
|
name: string;
|
|
24
54
|
integration: AgentIntegrationType;
|
|
@@ -27,6 +57,10 @@ interface AgentConfig {
|
|
|
27
57
|
args?: string[];
|
|
28
58
|
cwd?: string;
|
|
29
59
|
env?: Record<string, string>;
|
|
60
|
+
/** How the task is delivered: prompt on stdin, as last argument, or the §21 JSON-lines protocol. */
|
|
61
|
+
inputMode?: AgentInputMode;
|
|
62
|
+
/** Per-task timeout in milliseconds; the process is killed when exceeded. */
|
|
63
|
+
timeoutMs?: number;
|
|
30
64
|
/** Models (as "provider:model-id") this agent may use, if restricted. */
|
|
31
65
|
allowedModels?: string[];
|
|
32
66
|
metadata?: Record<string, unknown>;
|
|
@@ -57,6 +91,8 @@ interface AgentTaskOutput {
|
|
|
57
91
|
rawOutput?: string;
|
|
58
92
|
exitCode?: number;
|
|
59
93
|
logs?: string[];
|
|
94
|
+
/** Structured reports extracted from protocol-mode runs (§16, §21). */
|
|
95
|
+
reports?: Report[];
|
|
60
96
|
error?: string;
|
|
61
97
|
}
|
|
62
98
|
/** Contract every agent adapter implements (Phase 3+). */
|
|
@@ -148,6 +184,7 @@ interface ModelInfo {
|
|
|
148
184
|
}
|
|
149
185
|
|
|
150
186
|
/** Task system: every operation becomes a Task (§13). */
|
|
187
|
+
|
|
151
188
|
type TaskStatus = "created" | "queued" | "running" | "waiting" | "completed" | "failed" | "cancelled";
|
|
152
189
|
interface TaskContext {
|
|
153
190
|
project?: string;
|
|
@@ -162,6 +199,8 @@ interface TaskResult {
|
|
|
162
199
|
summary?: string;
|
|
163
200
|
artifacts?: string[];
|
|
164
201
|
reportId?: string;
|
|
202
|
+
/** Structured reports produced by protocol-mode agents (Phase 6 builds on this). */
|
|
203
|
+
reports?: Report[];
|
|
165
204
|
error?: string;
|
|
166
205
|
finishedAt?: string;
|
|
167
206
|
}
|
|
@@ -215,34 +254,6 @@ interface PipelineRun {
|
|
|
215
254
|
stepRuns: PipelineStepRun[];
|
|
216
255
|
}
|
|
217
256
|
|
|
218
|
-
/** Structured report format so reports can be processed programmatically (§16). */
|
|
219
|
-
type Confidence = "low" | "medium" | "high";
|
|
220
|
-
type FindingSeverity = "info" | "low" | "medium" | "high" | "critical";
|
|
221
|
-
interface Finding {
|
|
222
|
-
id: string;
|
|
223
|
-
title: string;
|
|
224
|
-
detail: string;
|
|
225
|
-
severity?: FindingSeverity;
|
|
226
|
-
evidence?: string[];
|
|
227
|
-
/** File path or conceptual location the finding refers to. */
|
|
228
|
-
location?: string;
|
|
229
|
-
tags?: string[];
|
|
230
|
-
}
|
|
231
|
-
interface Report {
|
|
232
|
-
id: string;
|
|
233
|
-
taskId: string;
|
|
234
|
-
/** Agent name from the agent registry. */
|
|
235
|
-
agent: string;
|
|
236
|
-
/** Model id used, if known. */
|
|
237
|
-
model?: string;
|
|
238
|
-
summary: string;
|
|
239
|
-
findings: Finding[];
|
|
240
|
-
recommendations: string[];
|
|
241
|
-
confidence?: Confidence;
|
|
242
|
-
createdAt: string;
|
|
243
|
-
metadata?: Record<string, unknown>;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
257
|
/** Agent ↔ OmniNode communication protocol (§21). */
|
|
247
258
|
|
|
248
259
|
interface EnvelopeMeta {
|
|
@@ -389,7 +400,7 @@ interface IChatProvider extends IProvider {
|
|
|
389
400
|
}
|
|
390
401
|
|
|
391
402
|
/** Typed error hierarchy shared across the whole codebase (§4.1 — error model). */
|
|
392
|
-
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_FAILED" | "PIPELINE_INVALID" | "PIPELINE_FAILED" | "PROTOCOL_VIOLATION" | "MEMORY_UNAVAILABLE" | "NOT_IMPLEMENTED" | "CLI_USAGE" | "INTERNAL";
|
|
403
|
+
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_INVALID" | "PIPELINE_FAILED" | "PROTOCOL_VIOLATION" | "MEMORY_UNAVAILABLE" | "NOT_IMPLEMENTED" | "CLI_USAGE" | "INTERNAL";
|
|
393
404
|
interface OmniNodeErrorOptions {
|
|
394
405
|
cause?: unknown;
|
|
395
406
|
details?: Record<string, unknown>;
|
|
@@ -409,7 +420,7 @@ declare class AgentError extends OmniNodeError {
|
|
|
409
420
|
constructor(code: "AGENT_NOT_FOUND" | "AGENT_FAILED" | "AGENT_TIMEOUT", message: string, options?: OmniNodeErrorOptions);
|
|
410
421
|
}
|
|
411
422
|
declare class TaskError extends OmniNodeError {
|
|
412
|
-
constructor(code: "TASK_INVALID" | "TASK_FAILED", message: string, options?: OmniNodeErrorOptions);
|
|
423
|
+
constructor(code: "TASK_INVALID" | "TASK_NOT_FOUND" | "TASK_FAILED", message: string, options?: OmniNodeErrorOptions);
|
|
413
424
|
}
|
|
414
425
|
declare class PipelineError extends OmniNodeError {
|
|
415
426
|
constructor(code: "PIPELINE_INVALID" | "PIPELINE_FAILED", message: string, options?: OmniNodeErrorOptions);
|
|
@@ -495,15 +506,19 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
495
506
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
496
507
|
cwd: z.ZodOptional<z.ZodString>;
|
|
497
508
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
509
|
+
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
510
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
498
511
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
499
512
|
}, "strict", z.ZodTypeAny, {
|
|
500
513
|
name: string;
|
|
501
514
|
type: "native" | "process" | "cli";
|
|
515
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
502
516
|
metadata?: Record<string, unknown> | undefined;
|
|
503
517
|
command?: string | undefined;
|
|
504
518
|
args?: string[] | undefined;
|
|
505
519
|
cwd?: string | undefined;
|
|
506
520
|
env?: Record<string, string> | undefined;
|
|
521
|
+
timeout_ms?: number | undefined;
|
|
507
522
|
}, {
|
|
508
523
|
name: string;
|
|
509
524
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -512,6 +527,8 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
512
527
|
args?: string[] | undefined;
|
|
513
528
|
cwd?: string | undefined;
|
|
514
529
|
env?: Record<string, string> | undefined;
|
|
530
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
531
|
+
timeout_ms?: number | undefined;
|
|
515
532
|
}>;
|
|
516
533
|
declare const roleConfigSchema: z.ZodObject<{
|
|
517
534
|
id: z.ZodString;
|
|
@@ -576,15 +593,19 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
576
593
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
577
594
|
cwd: z.ZodOptional<z.ZodString>;
|
|
578
595
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
596
|
+
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
597
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
579
598
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
580
599
|
}, "strict", z.ZodTypeAny, {
|
|
581
600
|
name: string;
|
|
582
601
|
type: "native" | "process" | "cli";
|
|
602
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
583
603
|
metadata?: Record<string, unknown> | undefined;
|
|
584
604
|
command?: string | undefined;
|
|
585
605
|
args?: string[] | undefined;
|
|
586
606
|
cwd?: string | undefined;
|
|
587
607
|
env?: Record<string, string> | undefined;
|
|
608
|
+
timeout_ms?: number | undefined;
|
|
588
609
|
}, {
|
|
589
610
|
name: string;
|
|
590
611
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -593,6 +614,8 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
593
614
|
args?: string[] | undefined;
|
|
594
615
|
cwd?: string | undefined;
|
|
595
616
|
env?: Record<string, string> | undefined;
|
|
617
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
618
|
+
timeout_ms?: number | undefined;
|
|
596
619
|
}>, "many">>;
|
|
597
620
|
roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
598
621
|
id: z.ZodString;
|
|
@@ -643,11 +666,13 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
643
666
|
agents: {
|
|
644
667
|
name: string;
|
|
645
668
|
type: "native" | "process" | "cli";
|
|
669
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
646
670
|
metadata?: Record<string, unknown> | undefined;
|
|
647
671
|
command?: string | undefined;
|
|
648
672
|
args?: string[] | undefined;
|
|
649
673
|
cwd?: string | undefined;
|
|
650
674
|
env?: Record<string, string> | undefined;
|
|
675
|
+
timeout_ms?: number | undefined;
|
|
651
676
|
}[];
|
|
652
677
|
roles: {
|
|
653
678
|
name: string;
|
|
@@ -681,6 +706,8 @@ declare const projectConfigSchema: z.ZodObject<{
|
|
|
681
706
|
args?: string[] | undefined;
|
|
682
707
|
cwd?: string | undefined;
|
|
683
708
|
env?: Record<string, string> | undefined;
|
|
709
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
710
|
+
timeout_ms?: number | undefined;
|
|
684
711
|
}[] | undefined;
|
|
685
712
|
roles?: {
|
|
686
713
|
name: string;
|
|
@@ -732,15 +759,19 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
732
759
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
733
760
|
cwd: z.ZodOptional<z.ZodString>;
|
|
734
761
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
762
|
+
input_mode: z.ZodDefault<z.ZodEnum<["stdin", "arg", "protocol"]>>;
|
|
763
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
735
764
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
736
765
|
}, "strict", z.ZodTypeAny, {
|
|
737
766
|
name: string;
|
|
738
767
|
type: "native" | "process" | "cli";
|
|
768
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
739
769
|
metadata?: Record<string, unknown> | undefined;
|
|
740
770
|
command?: string | undefined;
|
|
741
771
|
args?: string[] | undefined;
|
|
742
772
|
cwd?: string | undefined;
|
|
743
773
|
env?: Record<string, string> | undefined;
|
|
774
|
+
timeout_ms?: number | undefined;
|
|
744
775
|
}, {
|
|
745
776
|
name: string;
|
|
746
777
|
type?: "native" | "process" | "cli" | undefined;
|
|
@@ -749,6 +780,8 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
749
780
|
args?: string[] | undefined;
|
|
750
781
|
cwd?: string | undefined;
|
|
751
782
|
env?: Record<string, string> | undefined;
|
|
783
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
784
|
+
timeout_ms?: number | undefined;
|
|
752
785
|
}>, "many">>;
|
|
753
786
|
roles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
754
787
|
id: z.ZodString;
|
|
@@ -799,11 +832,13 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
799
832
|
agents: {
|
|
800
833
|
name: string;
|
|
801
834
|
type: "native" | "process" | "cli";
|
|
835
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
802
836
|
metadata?: Record<string, unknown> | undefined;
|
|
803
837
|
command?: string | undefined;
|
|
804
838
|
args?: string[] | undefined;
|
|
805
839
|
cwd?: string | undefined;
|
|
806
840
|
env?: Record<string, string> | undefined;
|
|
841
|
+
timeout_ms?: number | undefined;
|
|
807
842
|
}[];
|
|
808
843
|
roles: {
|
|
809
844
|
name: string;
|
|
@@ -837,6 +872,8 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
837
872
|
args?: string[] | undefined;
|
|
838
873
|
cwd?: string | undefined;
|
|
839
874
|
env?: Record<string, string> | undefined;
|
|
875
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
876
|
+
timeout_ms?: number | undefined;
|
|
840
877
|
}[] | undefined;
|
|
841
878
|
roles?: {
|
|
842
879
|
name: string;
|
|
@@ -855,9 +892,9 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
855
892
|
logging: z.ZodOptional<z.ZodObject<{
|
|
856
893
|
level: z.ZodEnum<["debug", "info", "warn", "error"]>;
|
|
857
894
|
}, "strict", z.ZodTypeAny, {
|
|
858
|
-
level: "
|
|
895
|
+
level: "info" | "error" | "debug" | "warn";
|
|
859
896
|
}, {
|
|
860
|
-
level: "
|
|
897
|
+
level: "info" | "error" | "debug" | "warn";
|
|
861
898
|
}>>;
|
|
862
899
|
}, "strict", z.ZodTypeAny, {
|
|
863
900
|
project: {
|
|
@@ -874,11 +911,13 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
874
911
|
agents: {
|
|
875
912
|
name: string;
|
|
876
913
|
type: "native" | "process" | "cli";
|
|
914
|
+
input_mode: "stdin" | "arg" | "protocol";
|
|
877
915
|
metadata?: Record<string, unknown> | undefined;
|
|
878
916
|
command?: string | undefined;
|
|
879
917
|
args?: string[] | undefined;
|
|
880
918
|
cwd?: string | undefined;
|
|
881
919
|
env?: Record<string, string> | undefined;
|
|
920
|
+
timeout_ms?: number | undefined;
|
|
882
921
|
}[];
|
|
883
922
|
roles: {
|
|
884
923
|
name: string;
|
|
@@ -895,7 +934,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
895
934
|
} | undefined;
|
|
896
935
|
};
|
|
897
936
|
logging?: {
|
|
898
|
-
level: "
|
|
937
|
+
level: "info" | "error" | "debug" | "warn";
|
|
899
938
|
} | undefined;
|
|
900
939
|
}, {
|
|
901
940
|
project: {
|
|
@@ -917,6 +956,8 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
917
956
|
args?: string[] | undefined;
|
|
918
957
|
cwd?: string | undefined;
|
|
919
958
|
env?: Record<string, string> | undefined;
|
|
959
|
+
input_mode?: "stdin" | "arg" | "protocol" | undefined;
|
|
960
|
+
timeout_ms?: number | undefined;
|
|
920
961
|
}[] | undefined;
|
|
921
962
|
roles?: {
|
|
922
963
|
name: string;
|
|
@@ -933,7 +974,7 @@ declare const appConfigSchema: z.ZodObject<{
|
|
|
933
974
|
} | undefined;
|
|
934
975
|
};
|
|
935
976
|
logging?: {
|
|
936
|
-
level: "
|
|
977
|
+
level: "info" | "error" | "debug" | "warn";
|
|
937
978
|
} | undefined;
|
|
938
979
|
}>;
|
|
939
980
|
type ProviderConfigYaml = z.infer<typeof providerConfigSchema>;
|
|
@@ -1048,6 +1089,101 @@ declare class OmniHilbrasProvider extends OpenAICompatibleProvider {
|
|
|
1048
1089
|
connect(registry?: ModelRegistry): Promise<OmniHilbrasConnectionResult>;
|
|
1049
1090
|
}
|
|
1050
1091
|
|
|
1051
|
-
declare
|
|
1092
|
+
declare function composeTaskText(input: AgentTaskInput): string;
|
|
1093
|
+
declare class ProcessAgent implements IAgent {
|
|
1094
|
+
readonly config: AgentConfig;
|
|
1095
|
+
readonly info: AgentInfo;
|
|
1096
|
+
private readonly log;
|
|
1097
|
+
private readonly running;
|
|
1098
|
+
constructor(config: AgentConfig, log?: Logger);
|
|
1099
|
+
run(input: AgentTaskInput): Promise<AgentTaskOutput>;
|
|
1100
|
+
/** Ask the agent to stop current work (SIGTERM). */
|
|
1101
|
+
cancel(taskId: string): Promise<void>;
|
|
1102
|
+
runningTaskIds(): string[];
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
/** Agent registry (§10): the set of agents connected to OmniNode. */
|
|
1106
|
+
|
|
1107
|
+
declare class AgentRegistry {
|
|
1108
|
+
private readonly agents;
|
|
1109
|
+
register(agent: IAgent): void;
|
|
1110
|
+
get(name: string): IAgent | undefined;
|
|
1111
|
+
list(): IAgent[];
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Agent factory (§9–§10): builds adapter instances from configuration.
|
|
1116
|
+
* "cli" agent configs are mapped to the process integration by the loader.
|
|
1117
|
+
*/
|
|
1118
|
+
|
|
1119
|
+
declare function createAgent(config: AgentConfig): IAgent;
|
|
1120
|
+
/** Builds an agent registry from the project configuration, skipping agents that fail to construct. */
|
|
1121
|
+
declare function buildAgentRegistry(config: AppConfig, log?: Logger): AgentRegistry;
|
|
1122
|
+
|
|
1123
|
+
/** Role registry (§11): the set of roles available for task assignment. */
|
|
1124
|
+
|
|
1125
|
+
declare class RoleRegistry {
|
|
1126
|
+
private readonly roles;
|
|
1127
|
+
register(role: RoleDefinition): void;
|
|
1128
|
+
registerAll(roles: RoleDefinition[]): void;
|
|
1129
|
+
get(id: string): RoleDefinition | undefined;
|
|
1130
|
+
list(): RoleDefinition[];
|
|
1131
|
+
}
|
|
1132
|
+
/** Builds a role registry from the project configuration. */
|
|
1133
|
+
declare function buildRoleRegistry(config: AppConfig): RoleRegistry;
|
|
1134
|
+
|
|
1135
|
+
interface TaskStoreFilter {
|
|
1136
|
+
status?: TaskStatus;
|
|
1137
|
+
project?: string;
|
|
1138
|
+
}
|
|
1139
|
+
interface TaskStore {
|
|
1140
|
+
save(task: Task): Promise<void>;
|
|
1141
|
+
get(id: string): Promise<Task | undefined>;
|
|
1142
|
+
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1143
|
+
}
|
|
1144
|
+
declare class FileTaskStore implements TaskStore {
|
|
1145
|
+
private readonly filePath;
|
|
1146
|
+
constructor(directory?: string);
|
|
1147
|
+
save(task: Task): Promise<void>;
|
|
1148
|
+
get(id: string): Promise<Task | undefined>;
|
|
1149
|
+
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1150
|
+
private load;
|
|
1151
|
+
private write;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
interface CreateTaskInput {
|
|
1155
|
+
objective: string;
|
|
1156
|
+
project?: string;
|
|
1157
|
+
role?: string;
|
|
1158
|
+
agent?: string;
|
|
1159
|
+
context?: TaskContext;
|
|
1160
|
+
}
|
|
1161
|
+
interface TaskEngineOptions {
|
|
1162
|
+
agents: AgentRegistry;
|
|
1163
|
+
roles: RoleRegistry;
|
|
1164
|
+
store: TaskStore;
|
|
1165
|
+
log?: Logger;
|
|
1166
|
+
}
|
|
1167
|
+
declare class TaskEngine {
|
|
1168
|
+
private readonly options;
|
|
1169
|
+
private readonly log;
|
|
1170
|
+
constructor(options: TaskEngineOptions);
|
|
1171
|
+
get store(): TaskStore;
|
|
1172
|
+
create(input: CreateTaskInput): Promise<Task>;
|
|
1173
|
+
queue(id: string): Promise<Task>;
|
|
1174
|
+
/** Runs the task through its assigned agent and records the result. */
|
|
1175
|
+
run(id: string): Promise<Task>;
|
|
1176
|
+
cancel(id: string): Promise<Task>;
|
|
1177
|
+
get(id: string): Promise<Task | undefined>;
|
|
1178
|
+
list(filter?: TaskStoreFilter): Promise<Task[]>;
|
|
1179
|
+
private mustGet;
|
|
1180
|
+
private transition;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
/** Assembles a TaskEngine from the project configuration (local-first defaults). */
|
|
1184
|
+
|
|
1185
|
+
declare function createTaskEngine(config: AppConfig, log?: Logger, directory?: string): TaskEngine;
|
|
1186
|
+
|
|
1187
|
+
declare const OMNINODE_VERSION = "0.4.0";
|
|
1052
1188
|
|
|
1053
|
-
export { type AgentConfig, type AgentConfigYaml, AgentError, type AgentInfo, type AgentIntegrationType, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AppConfig, type AppConfigYaml, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatUsage, type Confidence, ConfigError, ConsoleLogSink, type DiscoveryResult, type EnvelopeMeta, type Finding, type FindingSeverity, 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 PipelineDefinition, PipelineError, type PipelineRun, type PipelineRunStatus, type PipelineStep, type PipelineStepCondition, type PipelineStepKind, type PipelineStepRun, type Project, type ProjectConfigYaml, ProtocolError, type ProviderConfig, type ProviderConfigYaml, ProviderError, type ProviderHealth, type ProviderStatus, type ProviderType, type Report, type RoleConfigYaml, type RoleDefinition, type Task, type TaskContext, TaskError, type TaskResult, type TaskStatus, type WritableLike, agentConfigSchema, appConfigSchema, authHeaders, createProvider, defaultProjectConfigYaml, expandEnvRefs, findConfigFile, isOmniNodeError, loadConfig, logger, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema };
|
|
1189
|
+
export { type AgentConfig, type AgentConfigYaml, AgentError, type AgentInfo, type AgentInputMode, type AgentIntegrationType, AgentRegistry, type AgentStatus, type AgentTaskInput, type AgentTaskOutput, type AgentToNodeMessage, type AppConfig, type AppConfigYaml, type ChatMessage, type ChatRequest, type ChatResponse, type ChatRole, type ChatUsage, type Confidence, ConfigError, ConsoleLogSink, type CreateTaskInput, type DiscoveryResult, type EnvelopeMeta, FileTaskStore, type Finding, type FindingSeverity, 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 PipelineDefinition, PipelineError, type PipelineRun, type PipelineRunStatus, type PipelineStep, type PipelineStepCondition, 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 Task, type TaskContext, TaskEngine, type TaskEngineOptions, TaskError, type TaskResult, type TaskStatus, type TaskStore, type TaskStoreFilter, type WritableLike, agentConfigSchema, appConfigSchema, authHeaders, buildAgentRegistry, buildRoleRegistry, composeTaskText, createAgent, createProvider, createTaskEngine, defaultProjectConfigYaml, expandEnvRefs, findConfigFile, isOmniNodeError, loadConfig, logger, projectConfigSchema, providerConfigSchema, registryKey, requestJson, resolveApiKey, roleConfigSchema };
|