@hagicode/hagitask 0.1.0-dev.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.
Files changed (32) hide show
  1. package/README.md +241 -0
  2. package/dist/cli.d.ts +4 -0
  3. package/dist/cli.js +36 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/validate-command.d.ts +4 -0
  6. package/dist/commands/validate-command.js +14 -0
  7. package/dist/commands/validate-command.js.map +1 -0
  8. package/dist/index.d.ts +15 -0
  9. package/dist/index.js +31 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/validation/diagnostics.d.ts +13 -0
  12. package/dist/validation/diagnostics.js +16 -0
  13. package/dist/validation/diagnostics.js.map +1 -0
  14. package/dist/validation/package-discovery.d.ts +10 -0
  15. package/dist/validation/package-discovery.js +45 -0
  16. package/dist/validation/package-discovery.js.map +1 -0
  17. package/dist/validation/package-validator.d.ts +4 -0
  18. package/dist/validation/package-validator.js +374 -0
  19. package/dist/validation/package-validator.js.map +1 -0
  20. package/dist/validation/schema-loader.d.ts +8 -0
  21. package/dist/validation/schema-loader.js +50 -0
  22. package/dist/validation/schema-loader.js.map +1 -0
  23. package/package.json +52 -0
  24. package/schemas/community-index-v1.schema.json +159 -0
  25. package/schemas/community-task-detail-v1.schema.json +182 -0
  26. package/schemas/task-preset-plugin/commands.schema.json +122 -0
  27. package/schemas/task-preset-plugin/locales.schema.json +24 -0
  28. package/schemas/task-preset-plugin/manifest.schema.json +225 -0
  29. package/schemas/task-preset-plugin/panel.schema.json +190 -0
  30. package/schemas/task-preset-plugin/prompt-package.schema.json +262 -0
  31. package/schemas/task-preset-plugin/store-page-frontmatter.schema.json +73 -0
  32. package/schemas/task-preset-plugin/task-preset.schema.json +153 -0
@@ -0,0 +1,225 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hagicode.local/designs/task-preset-plugin-schemas/manifest.schema.json",
4
+ "title": "Task Preset Plugin Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "taskPresetId",
10
+ "version",
11
+ "displayName",
12
+ "description",
13
+ "kind",
14
+ "status",
15
+ "localization",
16
+ "ui",
17
+ "site",
18
+ "backend"
19
+ ],
20
+ "properties": {
21
+ "$schema": {
22
+ "type": "string"
23
+ },
24
+ "schemaVersion": {
25
+ "type": "string"
26
+ },
27
+ "taskPresetId": {
28
+ "type": "string",
29
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
30
+ },
31
+ "version": {
32
+ "type": "string"
33
+ },
34
+ "icon": {
35
+ "type": "string"
36
+ },
37
+ "displayName": {
38
+ "$ref": "#/$defs/localizedKey"
39
+ },
40
+ "description": {
41
+ "$ref": "#/$defs/localizedKey"
42
+ },
43
+ "kind": {
44
+ "type": "string",
45
+ "enum": [
46
+ "custom-executor",
47
+ "session-automation",
48
+ "proposal-stage"
49
+ ]
50
+ },
51
+ "status": {
52
+ "type": "string",
53
+ "enum": [
54
+ "active",
55
+ "experimental",
56
+ "disabled"
57
+ ]
58
+ },
59
+ "owner": {
60
+ "type": "string"
61
+ },
62
+ "entrypoints": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "menuSurface": {
67
+ "type": "string"
68
+ },
69
+ "drawerId": {
70
+ "type": "string"
71
+ }
72
+ }
73
+ },
74
+ "activation": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "defaultState"
79
+ ],
80
+ "properties": {
81
+ "defaultState": {
82
+ "type": "string",
83
+ "enum": [
84
+ "passive",
85
+ "enabled"
86
+ ]
87
+ }
88
+ }
89
+ },
90
+ "localization": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "strategy",
95
+ "namespace",
96
+ "defaultLocale",
97
+ "supportedLocales"
98
+ ],
99
+ "properties": {
100
+ "strategy": {
101
+ "type": "string",
102
+ "enum": [
103
+ "plugin-bundles",
104
+ "host-i18n-bridge"
105
+ ]
106
+ },
107
+ "namespace": {
108
+ "type": "string"
109
+ },
110
+ "defaultLocale": {
111
+ "type": "string"
112
+ },
113
+ "supportedLocales": {
114
+ "type": "array",
115
+ "minItems": 1,
116
+ "uniqueItems": true,
117
+ "items": {
118
+ "type": "string"
119
+ }
120
+ },
121
+ "bundles": {
122
+ "type": "object",
123
+ "minProperties": 1,
124
+ "additionalProperties": {
125
+ "type": "string"
126
+ }
127
+ },
128
+ "fallbackLocaleMap": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "string"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "allOf": [
139
+ {
140
+ "if": {
141
+ "properties": {
142
+ "strategy": {
143
+ "const": "plugin-bundles"
144
+ }
145
+ }
146
+ },
147
+ "then": {
148
+ "required": [
149
+ "bundles"
150
+ ]
151
+ }
152
+ }
153
+ ]
154
+ },
155
+ "capabilities": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "supportsSceneBinding": {
160
+ "type": "boolean"
161
+ },
162
+ "supportsCommandCatalog": {
163
+ "type": "boolean"
164
+ }
165
+ }
166
+ },
167
+ "ui": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "panel"
172
+ ],
173
+ "properties": {
174
+ "panel": {
175
+ "type": "string"
176
+ },
177
+ "commands": {
178
+ "type": "string"
179
+ }
180
+ }
181
+ },
182
+ "site": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "storePage"
187
+ ],
188
+ "properties": {
189
+ "storePage": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ },
194
+ "backend": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "required": [
198
+ "taskPreset",
199
+ "prompts"
200
+ ],
201
+ "properties": {
202
+ "taskPreset": {
203
+ "type": "string"
204
+ },
205
+ "prompts": {
206
+ "type": "string"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "$defs": {
212
+ "localizedKey": {
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "required": [
216
+ "key"
217
+ ],
218
+ "properties": {
219
+ "key": {
220
+ "type": "string"
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
@@ -0,0 +1,190 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hagicode.local/designs/task-preset-plugin-schemas/panel.schema.json",
4
+ "title": "Task Preset Plugin Panel Definition",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "surface",
9
+ "title",
10
+ "description",
11
+ "defaultTitle",
12
+ "submitLabel",
13
+ "sections"
14
+ ],
15
+ "properties": {
16
+ "$schema": {
17
+ "type": "string"
18
+ },
19
+ "surface": {
20
+ "type": "string",
21
+ "enum": [
22
+ "drawer",
23
+ "dialog",
24
+ "page"
25
+ ]
26
+ },
27
+ "title": {
28
+ "$ref": "#/$defs/localizedKey"
29
+ },
30
+ "description": {
31
+ "$ref": "#/$defs/localizedKey"
32
+ },
33
+ "defaultTitle": {
34
+ "$ref": "#/$defs/localizedKey"
35
+ },
36
+ "submitLabel": {
37
+ "$ref": "#/$defs/localizedKey"
38
+ },
39
+ "submittingLabel": {
40
+ "$ref": "#/$defs/localizedKey"
41
+ },
42
+ "sections": {
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "items": {
46
+ "$ref": "#/$defs/section"
47
+ }
48
+ }
49
+ },
50
+ "$defs": {
51
+ "section": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": [
55
+ "id",
56
+ "layout",
57
+ "fields"
58
+ ],
59
+ "properties": {
60
+ "id": {
61
+ "type": "string"
62
+ },
63
+ "title": {
64
+ "$ref": "#/$defs/localizedKey"
65
+ },
66
+ "description": {
67
+ "$ref": "#/$defs/localizedKey"
68
+ },
69
+ "layout": {
70
+ "type": "string",
71
+ "enum": [
72
+ "stack",
73
+ "split",
74
+ "sidebar"
75
+ ]
76
+ },
77
+ "fields": {
78
+ "type": "array",
79
+ "minItems": 1,
80
+ "items": {
81
+ "$ref": "#/$defs/field"
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "field": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "id",
91
+ "renderer",
92
+ "output"
93
+ ],
94
+ "properties": {
95
+ "id": {
96
+ "type": "string"
97
+ },
98
+ "renderer": {
99
+ "type": "string"
100
+ },
101
+ "inputType": {
102
+ "type": "string"
103
+ },
104
+ "valueType": {
105
+ "type": "string",
106
+ "enum": [
107
+ "text",
108
+ "boolean",
109
+ "single",
110
+ "multiple"
111
+ ]
112
+ },
113
+ "label": {
114
+ "$ref": "#/$defs/localizedKey"
115
+ },
116
+ "hint": {
117
+ "$ref": "#/$defs/localizedKey"
118
+ },
119
+ "placeholder": {
120
+ "$ref": "#/$defs/localizedKey"
121
+ },
122
+ "required": {
123
+ "type": "boolean"
124
+ },
125
+ "output": {
126
+ "type": "string"
127
+ },
128
+ "selectionMode": {
129
+ "type": "string",
130
+ "enum": [
131
+ "single",
132
+ "multiple"
133
+ ]
134
+ },
135
+ "dataSource": {
136
+ "type": "string"
137
+ },
138
+ "componentProps": {
139
+ "type": "object",
140
+ "properties": {
141
+ "targetSelectionId": {
142
+ "type": "string"
143
+ },
144
+ "emptyTextKey": {
145
+ "type": "string"
146
+ },
147
+ "role": {
148
+ "type": "string"
149
+ },
150
+ "vaultType": {
151
+ "type": "string"
152
+ },
153
+ "options": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "value",
160
+ "label"
161
+ ],
162
+ "properties": {
163
+ "value": {
164
+ "type": "string"
165
+ },
166
+ "label": {
167
+ "$ref": "#/$defs/localizedKey"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "additionalProperties": true
174
+ }
175
+ }
176
+ },
177
+ "localizedKey": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "key"
182
+ ],
183
+ "properties": {
184
+ "key": {
185
+ "type": "string"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,262 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hagicode.local/designs/task-preset-plugin-schemas/prompt-package.schema.json",
4
+ "title": "Task Preset Plugin Prompt Package",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "version",
9
+ "templateEngine",
10
+ "defaultLocale",
11
+ "supportedLocales",
12
+ "inputs"
13
+ ],
14
+ "allOf": [
15
+ {
16
+ "anyOf": [
17
+ {
18
+ "required": [
19
+ "locales"
20
+ ]
21
+ },
22
+ {
23
+ "required": [
24
+ "variants"
25
+ ]
26
+ }
27
+ ]
28
+ }
29
+ ],
30
+ "properties": {
31
+ "$schema": {
32
+ "type": "string"
33
+ },
34
+ "version": {
35
+ "type": "string"
36
+ },
37
+ "templateEngine": {
38
+ "type": "string",
39
+ "enum": [
40
+ "handlebars"
41
+ ]
42
+ },
43
+ "defaultLocale": {
44
+ "type": "string"
45
+ },
46
+ "supportedLocales": {
47
+ "type": "array",
48
+ "minItems": 1,
49
+ "uniqueItems": true,
50
+ "items": {
51
+ "type": "string"
52
+ }
53
+ },
54
+ "inputs": {
55
+ "type": "array",
56
+ "items": {
57
+ "$ref": "#/$defs/input"
58
+ }
59
+ },
60
+ "partials": {
61
+ "type": "object",
62
+ "additionalProperties": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "rendering": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "strictVariables": {
71
+ "type": "boolean"
72
+ },
73
+ "trimBlocks": {
74
+ "type": "boolean"
75
+ }
76
+ }
77
+ },
78
+ "locales": {
79
+ "type": "object",
80
+ "minProperties": 1,
81
+ "additionalProperties": {
82
+ "$ref": "#/$defs/localePrompt"
83
+ }
84
+ },
85
+ "variants": {
86
+ "$ref": "#/$defs/variants"
87
+ },
88
+ "commandSystemPrompts": {
89
+ "type": "object",
90
+ "description": "Optional mapping from command ids to locale-specific system prompt template resources.",
91
+ "propertyNames": {
92
+ "type": "string",
93
+ "pattern": "\\S"
94
+ },
95
+ "additionalProperties": {
96
+ "type": "object",
97
+ "minProperties": 1,
98
+ "propertyNames": {
99
+ "type": "string",
100
+ "pattern": "\\S"
101
+ },
102
+ "additionalProperties": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "$defs": {
110
+ "input": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "name",
115
+ "source"
116
+ ],
117
+ "properties": {
118
+ "name": {
119
+ "type": "string"
120
+ },
121
+ "source": {
122
+ "type": "string",
123
+ "enum": [
124
+ "task-preset-input",
125
+ "session-metadata",
126
+ "computed-context",
127
+ "system"
128
+ ]
129
+ },
130
+ "required": {
131
+ "type": "boolean"
132
+ },
133
+ "description": {
134
+ "type": "string"
135
+ }
136
+ }
137
+ },
138
+ "localePrompt": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": [
142
+ "systemTemplate",
143
+ "userTemplate"
144
+ ],
145
+ "properties": {
146
+ "systemTemplate": {
147
+ "type": "string"
148
+ },
149
+ "developerTemplate": {
150
+ "type": "string"
151
+ },
152
+ "userTemplate": {
153
+ "type": "string"
154
+ },
155
+ "outputSchema": {
156
+ "type": "string"
157
+ }
158
+ }
159
+ },
160
+ "selectorName": {
161
+ "type": "string",
162
+ "enum": [
163
+ "agent",
164
+ "language"
165
+ ]
166
+ },
167
+ "selectorValues": {
168
+ "type": "array",
169
+ "minItems": 1,
170
+ "uniqueItems": true,
171
+ "items": {
172
+ "type": "string"
173
+ }
174
+ },
175
+ "variantMatch": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "minProperties": 1,
179
+ "properties": {
180
+ "agent": {
181
+ "$ref": "#/$defs/selectorValues"
182
+ },
183
+ "language": {
184
+ "$ref": "#/$defs/selectorValues"
185
+ }
186
+ }
187
+ },
188
+ "variantTemplate": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": [
192
+ "id",
193
+ "systemTemplate",
194
+ "userTemplate"
195
+ ],
196
+ "properties": {
197
+ "id": {
198
+ "type": "string"
199
+ },
200
+ "systemTemplate": {
201
+ "type": "string"
202
+ },
203
+ "userTemplate": {
204
+ "type": "string"
205
+ }
206
+ }
207
+ },
208
+ "variantEntry": {
209
+ "type": "object",
210
+ "additionalProperties": false,
211
+ "required": [
212
+ "id",
213
+ "systemTemplate",
214
+ "userTemplate",
215
+ "match"
216
+ ],
217
+ "properties": {
218
+ "id": {
219
+ "type": "string"
220
+ },
221
+ "systemTemplate": {
222
+ "type": "string"
223
+ },
224
+ "userTemplate": {
225
+ "type": "string"
226
+ },
227
+ "match": {
228
+ "$ref": "#/$defs/variantMatch"
229
+ }
230
+ }
231
+ },
232
+ "variants": {
233
+ "type": "object",
234
+ "additionalProperties": false,
235
+ "required": [
236
+ "selectors",
237
+ "entries",
238
+ "fallback"
239
+ ],
240
+ "properties": {
241
+ "selectors": {
242
+ "type": "array",
243
+ "minItems": 1,
244
+ "uniqueItems": true,
245
+ "items": {
246
+ "$ref": "#/$defs/selectorName"
247
+ }
248
+ },
249
+ "entries": {
250
+ "type": "array",
251
+ "minItems": 1,
252
+ "items": {
253
+ "$ref": "#/$defs/variantEntry"
254
+ }
255
+ },
256
+ "fallback": {
257
+ "$ref": "#/$defs/variantTemplate"
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }