@darkhorseprojects/circuitry 0.3.10 → 0.4.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/SPEC.md ADDED
@@ -0,0 +1,96 @@
1
+ # Circuitry 0.4
2
+
3
+ Circuitry is a resource-native source format for executable graphs.
4
+
5
+ A Circuitry file describes named resources and the dependencies between them. Running a graph means resolving an entry resource. Runtimes decide how to execute supported resource types.
6
+
7
+ ## Top-level shape
8
+
9
+ ```yaml
10
+ circuitry: "0.4"
11
+ title: string
12
+ description: string
13
+ imports: []
14
+ inputs: {}
15
+ entry: resource_id
16
+ entries: {}
17
+ resources: {}
18
+ outputs: {}
19
+ ```
20
+
21
+ ## Resources
22
+
23
+ Resources are the graph. A resource is identified by its key under `resources`.
24
+
25
+ ```yaml
26
+ resources:
27
+ id:
28
+ type: string
29
+ label: string
30
+ description: string
31
+ inputs: []
32
+ from: string
33
+ value: any
34
+ path: string
35
+ uri: string
36
+ mime: string
37
+ identity: string
38
+ instructions: string
39
+ tools: []
40
+ graph: string
41
+ entry: string
42
+ expect: {}
43
+ ```
44
+
45
+ `inputs` may be a list of resource ids or a map of local input names to resource ids.
46
+
47
+ ## Inputs
48
+
49
+ Top-level `inputs` declare runtime inputs. Resolvers may inject matching `type: input` resources when absent.
50
+
51
+ ```yaml
52
+ inputs:
53
+ user_turn:
54
+ type: text
55
+ required: true
56
+ ```
57
+
58
+ ## Entry points
59
+
60
+ `entry` is the default resource to resolve. `entries` optionally names multiple run surfaces.
61
+
62
+ ```yaml
63
+ entry: assistant
64
+ entries:
65
+ recover: recovered_context
66
+ ```
67
+
68
+ ## Run resources
69
+
70
+ `type: run` represents declarative graph execution as a resource.
71
+
72
+ ```yaml
73
+ resources:
74
+ recovered_context:
75
+ type: run
76
+ graph: ./context.circuitry.yaml
77
+ entry: recovery
78
+ inputs:
79
+ user_turn: user_turn
80
+ ```
81
+
82
+ A runtime tool such as `run_graph` is dynamic capability. A `type: run` resource is declarative topology.
83
+
84
+ ## Outputs
85
+
86
+ ```yaml
87
+ outputs:
88
+ response:
89
+ from: assistant.response
90
+ schema:
91
+ response: str
92
+ ```
93
+
94
+ ## Extensions
95
+
96
+ Fields beginning with `x-` are preserved for runtimes and ecosystems.