@gobing-ai/spur 0.3.45 → 0.3.47

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.
@@ -6,24 +6,75 @@
6
6
  "additionalProperties": false,
7
7
  "required": ["kind", "name", "initialNode", "nodes", "edges"],
8
8
  "properties": {
9
- "$schema": { "type": "string" },
10
- "kind": { "const": "transition-flow" },
11
- "name": { "type": "string", "minLength": 1 },
12
- "version": { "type": "string" },
13
- "description": { "type": "string" },
14
- "initialNode": { "type": "string", "minLength": 1 },
15
- "terminalNodes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
16
- "iterationBound": { "type": "integer", "exclusiveMinimum": 0 },
9
+ "$schema": {
10
+ "type": "string"
11
+ },
12
+ "kind": {
13
+ "const": "transition-flow"
14
+ },
15
+ "name": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "version": {
20
+ "type": "string"
21
+ },
22
+ "description": {
23
+ "type": "string"
24
+ },
25
+ "initialNode": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "terminalNodes": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ }
35
+ },
36
+ "iterationBound": {
37
+ "type": "integer",
38
+ "exclusiveMinimum": 0
39
+ },
17
40
  "vars": {
18
41
  "type": "object",
19
- "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
20
- "additionalProperties": { "type": "string" }
42
+ "propertyNames": {
43
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
44
+ },
45
+ "additionalProperties": {
46
+ "type": "string"
47
+ }
21
48
  },
22
49
  "env": {
23
50
  "type": "object",
24
51
  "additionalProperties": false,
25
52
  "properties": {
26
- "allow": { "type": "array", "items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" } }
53
+ "allow": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string",
57
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "extensions": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "actions": {
67
+ "type": "array",
68
+ "items": {
69
+ "$ref": "#/$defs/relativeExtensionPath"
70
+ }
71
+ },
72
+ "guards": {
73
+ "type": "array",
74
+ "items": {
75
+ "$ref": "#/$defs/relativeExtensionPath"
76
+ }
77
+ }
27
78
  }
28
79
  },
29
80
  "nodes": {
@@ -33,10 +84,19 @@
33
84
  "additionalProperties": false,
34
85
  "required": ["id"],
35
86
  "properties": {
36
- "id": { "type": "string", "minLength": 1 },
37
- "description": { "type": "string" },
38
- "type": { "enum": ["action", "gate", "parallel", "decision"] },
39
- "action": { "$ref": "#/$defs/action" }
87
+ "id": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "description": {
92
+ "type": "string"
93
+ },
94
+ "type": {
95
+ "enum": ["action", "gate", "parallel", "decision"]
96
+ },
97
+ "action": {
98
+ "$ref": "#/$defs/action"
99
+ }
40
100
  }
41
101
  }
42
102
  },
@@ -47,10 +107,20 @@
47
107
  "additionalProperties": false,
48
108
  "required": ["from", "to"],
49
109
  "properties": {
50
- "from": { "type": "string", "minLength": 1 },
51
- "to": { "type": "string", "minLength": 1 },
52
- "description": { "type": "string" },
53
- "condition": { "$ref": "#/$defs/guard" }
110
+ "from": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "to": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ },
118
+ "description": {
119
+ "type": "string"
120
+ },
121
+ "condition": {
122
+ "$ref": "#/$defs/guard"
123
+ }
54
124
  }
55
125
  }
56
126
  }
@@ -61,8 +131,14 @@
61
131
  "additionalProperties": false,
62
132
  "required": ["kind"],
63
133
  "properties": {
64
- "kind": { "type": "string", "minLength": 1 },
65
- "options": { "type": "object", "additionalProperties": true }
134
+ "kind": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ },
138
+ "options": {
139
+ "type": "object",
140
+ "additionalProperties": true
141
+ }
66
142
  }
67
143
  },
68
144
  "guard": {
@@ -70,8 +146,32 @@
70
146
  "additionalProperties": false,
71
147
  "required": ["kind"],
72
148
  "properties": {
73
- "kind": { "type": "string", "minLength": 1 },
74
- "options": { "type": "object", "additionalProperties": true }
149
+ "kind": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "options": {
154
+ "type": "object",
155
+ "additionalProperties": true
156
+ }
157
+ }
158
+ },
159
+ "relativeExtensionPath": {
160
+ "type": "string",
161
+ "minLength": 1,
162
+ "description": "Relative module path; absolute paths and '..' traversal are forbidden.",
163
+ "not": {
164
+ "anyOf": [
165
+ {
166
+ "pattern": "^[/\\\\]"
167
+ },
168
+ {
169
+ "pattern": "^[A-Za-z]:[/\\\\]"
170
+ },
171
+ {
172
+ "pattern": "(^|[/\\\\])\\.\\.([/\\\\]|$)"
173
+ }
174
+ ]
75
175
  }
76
176
  }
77
177
  }