@darkhorseprojects/circuitry 0.2.6 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/dist/bundle.d.ts +0 -31
- package/dist/graph.d.ts +0 -221
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -1063
- package/dist/presets.d.ts +0 -4
- package/dist/runtime.d.ts +0 -16
- package/dist/scheduler.d.ts +0 -30
- package/dist/simulation.d.ts +0 -90
- package/dist/types.d.ts +0 -42
- package/dist/yaml.d.ts +0 -9
package/dist/presets.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { CircuitryAgentPreset, CircuitryGraph } from "./graph";
|
|
2
|
-
export declare const CIRCUITRY_AGENT_PRESET_DIRS: readonly [".agents/agents", ".circuitry/agents", "~/.agents/agents", "~/.circuitry/agents"];
|
|
3
|
-
export declare const parseAgentPresetMarkdown: (text: string, fallbackName: string) => CircuitryAgentPreset;
|
|
4
|
-
export declare const applyAgentPresets: (graph: CircuitryGraph, presets: Record<string, CircuitryAgentPreset>) => CircuitryGraph;
|
package/dist/runtime.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CircuitryGraph, CircuitryRuntimeProvider } from "./graph";
|
|
2
|
-
import type { NodeExecutionRequest, NodeExecutionResult, SimulationRunItem } from "./simulation";
|
|
3
|
-
export type CircuitryRuntimeModel = {
|
|
4
|
-
id: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
};
|
|
7
|
-
export type CircuitryRuntimeAdapter = {
|
|
8
|
-
id: CircuitryRuntimeProvider;
|
|
9
|
-
label: string;
|
|
10
|
-
listModels?: () => Promise<CircuitryRuntimeModel[]> | CircuitryRuntimeModel[];
|
|
11
|
-
runNode: (request: NodeExecutionRequest) => Promise<NodeExecutionResult>;
|
|
12
|
-
runGraph?: (graph: CircuitryGraph) => Promise<{
|
|
13
|
-
runItems: SimulationRunItem[];
|
|
14
|
-
}>;
|
|
15
|
-
};
|
|
16
|
-
export declare const createUnsupportedRuntimeAdapter: (id: CircuitryRuntimeProvider) => CircuitryRuntimeAdapter;
|
package/dist/scheduler.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type CircuitryGraph, type CircuitryNode } from "./graph";
|
|
2
|
-
import type { NodeContextInput, NodeExecutionRequest, NodeExecutionResult, SimulationRunItem } from "./simulation";
|
|
3
|
-
export type CircuitryExecutionNode = {
|
|
4
|
-
id: string;
|
|
5
|
-
node: CircuitryNode;
|
|
6
|
-
inputNodeIds: string[];
|
|
7
|
-
outputNodeIds: string[];
|
|
8
|
-
output?: string;
|
|
9
|
-
completed?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type CircuitryExecutionGraph = {
|
|
12
|
-
nodes: Map<string, CircuitryExecutionNode>;
|
|
13
|
-
};
|
|
14
|
-
export declare const buildCircuitryExecutionGraph: (graph: CircuitryGraph) => CircuitryExecutionGraph;
|
|
15
|
-
export declare const runCircuitryGraphExecution: ({ graph, selectedNodeId, executeNode, resolveContextInputs, onNodeStart, onNodeComplete, maxParallelRuns, }: {
|
|
16
|
-
graph: CircuitryGraph;
|
|
17
|
-
selectedNodeId?: string;
|
|
18
|
-
executeNode: (request: NodeExecutionRequest) => Promise<NodeExecutionResult>;
|
|
19
|
-
resolveContextInputs?: (args: {
|
|
20
|
-
nodeId: string;
|
|
21
|
-
inputNodeIds: Set<string>;
|
|
22
|
-
graph: CircuitryGraph;
|
|
23
|
-
}) => Promise<NodeContextInput[]> | NodeContextInput[];
|
|
24
|
-
onNodeStart?: (nodeId: string, fallbackCycle: boolean) => void;
|
|
25
|
-
onNodeComplete?: (nodeId: string, result: {
|
|
26
|
-
output?: string;
|
|
27
|
-
error?: string;
|
|
28
|
-
}) => void;
|
|
29
|
-
maxParallelRuns?: number;
|
|
30
|
-
}) => Promise<SimulationRunItem[]>;
|
package/dist/simulation.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { type CircuitryNodeData } from "./types";
|
|
2
|
-
type SceneElement = {
|
|
3
|
-
id: string;
|
|
4
|
-
type: string;
|
|
5
|
-
customData?: Record<string, unknown> | {
|
|
6
|
-
circuitry?: CircuitryNodeData;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export type SimulationNode = {
|
|
10
|
-
id: string;
|
|
11
|
-
element: SceneElement;
|
|
12
|
-
data: CircuitryNodeData;
|
|
13
|
-
inputNodeIds: string[];
|
|
14
|
-
outputNodeIds: string[];
|
|
15
|
-
incomingSourceIds: string[];
|
|
16
|
-
};
|
|
17
|
-
export type SimulationRunItem = {
|
|
18
|
-
nodeId: string;
|
|
19
|
-
fallbackCycle: boolean;
|
|
20
|
-
inputNodeIds: string[];
|
|
21
|
-
output: string;
|
|
22
|
-
error?: string;
|
|
23
|
-
};
|
|
24
|
-
export type NodeContextInput = {
|
|
25
|
-
sourceId: string;
|
|
26
|
-
kind: "text" | "image" | "element";
|
|
27
|
-
text?: string;
|
|
28
|
-
elementType?: string;
|
|
29
|
-
image?: {
|
|
30
|
-
mediaType: string;
|
|
31
|
-
data: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export type NodeExecutionRequest = {
|
|
35
|
-
nodeId: string;
|
|
36
|
-
model: string;
|
|
37
|
-
tools: string[];
|
|
38
|
-
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
39
|
-
prompt: string;
|
|
40
|
-
personality: string;
|
|
41
|
-
instructions: string;
|
|
42
|
-
context: string;
|
|
43
|
-
inputs: Array<{
|
|
44
|
-
nodeId: string;
|
|
45
|
-
output: string;
|
|
46
|
-
}>;
|
|
47
|
-
contextInputs: NodeContextInput[];
|
|
48
|
-
images: Array<{
|
|
49
|
-
mediaType: string;
|
|
50
|
-
data: string;
|
|
51
|
-
}>;
|
|
52
|
-
};
|
|
53
|
-
export type NodeExecutionResult = {
|
|
54
|
-
output: string;
|
|
55
|
-
};
|
|
56
|
-
export type SimulationGraph = {
|
|
57
|
-
nodes: Map<string, SimulationNode>;
|
|
58
|
-
};
|
|
59
|
-
export type GraphRunMode = "dependency" | "single";
|
|
60
|
-
export declare const DEFAULT_MAX_PARALLEL_RUNS = 4;
|
|
61
|
-
export declare const buildSimulationGraph: (elements: readonly SceneElement[]) => SimulationGraph;
|
|
62
|
-
export declare const runGraphExecution: ({ elements, mode, selectedNodeId, executeNode, resolveContextInputs, onNodeStart, onNodeComplete, maxParallelRuns, }: {
|
|
63
|
-
elements: readonly SceneElement[];
|
|
64
|
-
mode: GraphRunMode;
|
|
65
|
-
selectedNodeId?: string;
|
|
66
|
-
executeNode: (request: NodeExecutionRequest) => Promise<NodeExecutionResult>;
|
|
67
|
-
resolveContextInputs?: (args: {
|
|
68
|
-
nodeId: string;
|
|
69
|
-
inputNodeIds: Set<string>;
|
|
70
|
-
incomingSourceIds: string[];
|
|
71
|
-
elements: readonly SceneElement[];
|
|
72
|
-
}) => Promise<NodeContextInput[]> | NodeContextInput[];
|
|
73
|
-
onNodeStart?: (nodeId: string, fallbackCycle: boolean) => void;
|
|
74
|
-
onNodeComplete?: (nodeId: string, result: {
|
|
75
|
-
output?: string;
|
|
76
|
-
error?: string;
|
|
77
|
-
}) => void;
|
|
78
|
-
maxParallelRuns?: number;
|
|
79
|
-
}) => Promise<SimulationRunItem[]>;
|
|
80
|
-
export declare const runDependencySimulation: ({ elements, executeNode, onNodeStart, onNodeComplete, maxParallelRuns, }: {
|
|
81
|
-
elements: readonly SceneElement[];
|
|
82
|
-
executeNode: (request: NodeExecutionRequest) => Promise<NodeExecutionResult>;
|
|
83
|
-
onNodeStart?: (nodeId: string, fallbackCycle: boolean) => void;
|
|
84
|
-
onNodeComplete?: (nodeId: string, result: {
|
|
85
|
-
output?: string;
|
|
86
|
-
error?: string;
|
|
87
|
-
}) => void;
|
|
88
|
-
maxParallelRuns?: number;
|
|
89
|
-
}) => Promise<SimulationRunItem[]>;
|
|
90
|
-
export {};
|
package/dist/types.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const CIRCUITRY_NODE_CUSTOM_TYPE: "circuitry-node-person";
|
|
2
|
-
export declare const CIRCUITRY_NODE_KIND: "circuitry-node";
|
|
3
|
-
export type NodeRuntimeStatus = "idle" | "queued" | "running" | "done" | "error";
|
|
4
|
-
export type CircuitryNodeData = {
|
|
5
|
-
kind: typeof CIRCUITRY_NODE_KIND;
|
|
6
|
-
identity: string;
|
|
7
|
-
label: string;
|
|
8
|
-
model: string;
|
|
9
|
-
tools: string[];
|
|
10
|
-
thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
11
|
-
personality: string;
|
|
12
|
-
instructions: string;
|
|
13
|
-
context: string;
|
|
14
|
-
output: string;
|
|
15
|
-
status: NodeRuntimeStatus;
|
|
16
|
-
lastError: string | null;
|
|
17
|
-
lastRunAt: string | null;
|
|
18
|
-
};
|
|
19
|
-
export type CircuitryNodeCustomData = {
|
|
20
|
-
circuitry?: CircuitryNodeData;
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
};
|
|
23
|
-
export type HasCircuitryNodeData = {
|
|
24
|
-
customData?: CircuitryNodeCustomData;
|
|
25
|
-
};
|
|
26
|
-
export declare const createDefaultNodeData: (label?: string) => CircuitryNodeData;
|
|
27
|
-
export declare const hasCircuitryNodeData: (element: HasCircuitryNodeData) => element is HasCircuitryNodeData & {
|
|
28
|
-
customData: {
|
|
29
|
-
circuitry: CircuitryNodeData;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type SceneElement = {
|
|
33
|
-
id: string;
|
|
34
|
-
type: string;
|
|
35
|
-
customData?: CircuitryNodeCustomData;
|
|
36
|
-
};
|
|
37
|
-
export declare const isNodeElement: (element: SceneElement) => element is SceneElement & {
|
|
38
|
-
customData: {
|
|
39
|
-
circuitry: CircuitryNodeData;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export {};
|
package/dist/yaml.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type CircuitryGraph, type CircuitryValidationStandard } from "./graph";
|
|
2
|
-
export declare const parseCircuitryYaml: (text: string, standard?: CircuitryValidationStandard, options?: {
|
|
3
|
-
validate?: boolean;
|
|
4
|
-
}) => CircuitryGraph;
|
|
5
|
-
export declare const stringifyCircuitryYaml: (graph: CircuitryGraph) => string;
|
|
6
|
-
export declare const parseCircuitryText: (text: string, filename?: string, standard?: CircuitryValidationStandard, options?: {
|
|
7
|
-
validate?: boolean;
|
|
8
|
-
}) => CircuitryGraph;
|
|
9
|
-
export declare const stringifyCircuitryText: (graph: CircuitryGraph, filename?: string) => string;
|