@agentplaneorg/core 0.1.5 → 0.1.6

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.
@@ -10,7 +10,7 @@ export function defaultConfig() {
10
10
  function isRecord(value) {
11
11
  return !!value && typeof value === "object" && !Array.isArray(value);
12
12
  }
13
- const CONFIG_SCHEMA_URL = new URL("../../../spec/schemas/config.schema.json", import.meta.url);
13
+ const CONFIG_SCHEMA_URL = new URL("../../schemas/config.schema.json", import.meta.url);
14
14
  const CONFIG_SCHEMA = JSON.parse(readFileSync(fileURLToPath(CONFIG_SCHEMA_URL), "utf8"));
15
15
  const Ajv = AjvModule.default ??
16
16
  AjvModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentplaneorg/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Core utilities and models for the Agent Plane CLI.",
5
5
  "keywords": [
6
6
  "agentplane",
@@ -30,6 +30,7 @@
30
30
  "types": "./dist/index.d.ts",
31
31
  "files": [
32
32
  "dist",
33
+ "schemas",
33
34
  "README.md",
34
35
  "LICENSE"
35
36
  ],
@@ -0,0 +1,278 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://agentplane.dev/schemas/config.schema.json",
4
+ "title": "agentplane config.json (v1)",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schema_version", "workflow_mode", "paths", "tasks", "commit", "tasks_backend"],
8
+ "properties": {
9
+ "schema_version": { "type": "integer", "const": 1, "default": 1 },
10
+ "workflow_mode": {
11
+ "type": "string",
12
+ "enum": ["direct", "branch_pr"],
13
+ "default": "direct"
14
+ },
15
+ "status_commit_policy": {
16
+ "type": "string",
17
+ "enum": ["off", "warn", "confirm"],
18
+ "default": "warn"
19
+ },
20
+ "finish_auto_status_commit": { "type": "boolean", "default": true },
21
+ "base_branch": { "type": "string", "minLength": 1, "default": "main" },
22
+ "agents": {
23
+ "type": "object",
24
+ "additionalProperties": true,
25
+ "required": ["approvals"],
26
+ "default": {
27
+ "approvals": { "require_plan": true, "require_network": true, "require_verify": true }
28
+ },
29
+ "properties": {
30
+ "approvals": {
31
+ "type": "object",
32
+ "additionalProperties": true,
33
+ "required": ["require_plan", "require_network", "require_verify"],
34
+ "default": { "require_plan": true, "require_network": true, "require_verify": true },
35
+ "properties": {
36
+ "require_plan": { "type": "boolean", "default": true },
37
+ "require_network": { "type": "boolean", "default": true },
38
+ "require_verify": { "type": "boolean", "default": true }
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "recipes": {
44
+ "type": "object",
45
+ "additionalProperties": true,
46
+ "required": ["storage_default"],
47
+ "default": { "storage_default": "link" },
48
+ "properties": {
49
+ "storage_default": {
50
+ "type": "string",
51
+ "enum": ["link", "copy", "global"],
52
+ "default": "link"
53
+ }
54
+ }
55
+ },
56
+ "paths": {
57
+ "type": "object",
58
+ "additionalProperties": true,
59
+ "required": ["agents_dir", "tasks_path", "workflow_dir", "worktrees_dir"],
60
+ "default": {
61
+ "agents_dir": ".agentplane/agents",
62
+ "tasks_path": ".agentplane/tasks.json",
63
+ "workflow_dir": ".agentplane/tasks",
64
+ "worktrees_dir": ".agentplane/worktrees"
65
+ },
66
+ "properties": {
67
+ "agents_dir": { "type": "string", "minLength": 1, "default": ".agentplane/agents" },
68
+ "tasks_path": { "type": "string", "minLength": 1, "default": ".agentplane/tasks.json" },
69
+ "workflow_dir": { "type": "string", "minLength": 1, "default": ".agentplane/tasks" },
70
+ "worktrees_dir": { "type": "string", "minLength": 1, "default": ".agentplane/worktrees" }
71
+ }
72
+ },
73
+ "branch": {
74
+ "type": "object",
75
+ "additionalProperties": true,
76
+ "required": ["task_prefix"],
77
+ "default": { "task_prefix": "task" },
78
+ "properties": {
79
+ "task_prefix": { "type": "string", "minLength": 1, "default": "task" }
80
+ }
81
+ },
82
+ "framework": {
83
+ "type": "object",
84
+ "additionalProperties": true,
85
+ "required": ["source", "last_update"],
86
+ "default": {
87
+ "source": "https://github.com/basilisk-labs/agent-plane",
88
+ "last_update": null
89
+ },
90
+ "properties": {
91
+ "source": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "default": "https://github.com/basilisk-labs/agent-plane"
95
+ },
96
+ "last_update": {
97
+ "type": ["string", "null"],
98
+ "format": "date-time",
99
+ "default": null
100
+ }
101
+ }
102
+ },
103
+ "tasks": {
104
+ "type": "object",
105
+ "additionalProperties": true,
106
+ "required": ["id_suffix_length_default", "verify", "doc", "comments"],
107
+ "default": {
108
+ "id_suffix_length_default": 6,
109
+ "verify": { "required_tags": ["code", "backend", "frontend"] },
110
+ "doc": {
111
+ "sections": [
112
+ "Summary",
113
+ "Context",
114
+ "Scope",
115
+ "Risks",
116
+ "Verify Steps",
117
+ "Verification",
118
+ "Rollback Plan",
119
+ "Notes"
120
+ ],
121
+ "required_sections": [
122
+ "Summary",
123
+ "Scope",
124
+ "Risks",
125
+ "Verify Steps",
126
+ "Verification",
127
+ "Rollback Plan"
128
+ ]
129
+ },
130
+ "comments": {
131
+ "start": { "prefix": "Start:", "min_chars": 40 },
132
+ "blocked": { "prefix": "Blocked:", "min_chars": 40 },
133
+ "verified": { "prefix": "Verified:", "min_chars": 60 }
134
+ }
135
+ },
136
+ "properties": {
137
+ "id_suffix_length_default": {
138
+ "type": "integer",
139
+ "minimum": 3,
140
+ "maximum": 16,
141
+ "default": 6
142
+ },
143
+ "verify": {
144
+ "type": "object",
145
+ "additionalProperties": true,
146
+ "required": ["required_tags"],
147
+ "default": { "required_tags": ["code", "backend", "frontend"] },
148
+ "properties": {
149
+ "required_tags": {
150
+ "type": "array",
151
+ "items": { "type": "string", "minLength": 1 },
152
+ "uniqueItems": true,
153
+ "default": ["code", "backend", "frontend"]
154
+ }
155
+ }
156
+ },
157
+ "doc": {
158
+ "type": "object",
159
+ "additionalProperties": true,
160
+ "required": ["sections", "required_sections"],
161
+ "default": {
162
+ "sections": [
163
+ "Summary",
164
+ "Context",
165
+ "Scope",
166
+ "Risks",
167
+ "Verify Steps",
168
+ "Verification",
169
+ "Rollback Plan",
170
+ "Notes"
171
+ ],
172
+ "required_sections": [
173
+ "Summary",
174
+ "Scope",
175
+ "Risks",
176
+ "Verify Steps",
177
+ "Verification",
178
+ "Rollback Plan"
179
+ ]
180
+ },
181
+ "properties": {
182
+ "sections": {
183
+ "type": "array",
184
+ "items": { "type": "string", "minLength": 1 },
185
+ "default": [
186
+ "Summary",
187
+ "Context",
188
+ "Scope",
189
+ "Risks",
190
+ "Verify Steps",
191
+ "Verification",
192
+ "Rollback Plan",
193
+ "Notes"
194
+ ]
195
+ },
196
+ "required_sections": {
197
+ "type": "array",
198
+ "items": { "type": "string", "minLength": 1 },
199
+ "default": [
200
+ "Summary",
201
+ "Scope",
202
+ "Risks",
203
+ "Verify Steps",
204
+ "Verification",
205
+ "Rollback Plan"
206
+ ]
207
+ }
208
+ }
209
+ },
210
+ "comments": {
211
+ "type": "object",
212
+ "additionalProperties": true,
213
+ "required": ["start", "blocked", "verified"],
214
+ "default": {
215
+ "start": { "prefix": "Start:", "min_chars": 40 },
216
+ "blocked": { "prefix": "Blocked:", "min_chars": 40 },
217
+ "verified": { "prefix": "Verified:", "min_chars": 60 }
218
+ },
219
+ "properties": {
220
+ "start": {
221
+ "$ref": "#/$defs/comment_policy",
222
+ "default": { "prefix": "Start:", "min_chars": 40 }
223
+ },
224
+ "blocked": {
225
+ "$ref": "#/$defs/comment_policy",
226
+ "default": { "prefix": "Blocked:", "min_chars": 40 }
227
+ },
228
+ "verified": {
229
+ "$ref": "#/$defs/comment_policy",
230
+ "default": { "prefix": "Verified:", "min_chars": 60 }
231
+ }
232
+ }
233
+ }
234
+ }
235
+ },
236
+ "commit": {
237
+ "type": "object",
238
+ "additionalProperties": true,
239
+ "required": ["generic_tokens"],
240
+ "default": {
241
+ "generic_tokens": ["start", "status", "mark", "done", "wip", "update", "tasks", "task"]
242
+ },
243
+ "properties": {
244
+ "generic_tokens": {
245
+ "type": "array",
246
+ "items": { "type": "string", "minLength": 1 },
247
+ "uniqueItems": true,
248
+ "default": ["start", "status", "mark", "done", "wip", "update", "tasks", "task"]
249
+ }
250
+ }
251
+ },
252
+ "tasks_backend": {
253
+ "type": "object",
254
+ "additionalProperties": true,
255
+ "required": ["config_path"],
256
+ "default": { "config_path": ".agentplane/backends/local/backend.json" },
257
+ "properties": {
258
+ "config_path": {
259
+ "type": "string",
260
+ "minLength": 1,
261
+ "default": ".agentplane/backends/local/backend.json"
262
+ }
263
+ }
264
+ },
265
+ "closure_commit_requires_approval": { "type": "boolean", "default": false }
266
+ },
267
+ "$defs": {
268
+ "comment_policy": {
269
+ "type": "object",
270
+ "additionalProperties": true,
271
+ "required": ["prefix", "min_chars"],
272
+ "properties": {
273
+ "prefix": { "type": "string", "minLength": 1 },
274
+ "min_chars": { "type": "integer", "minimum": 0 }
275
+ }
276
+ }
277
+ }
278
+ }