@hagicode/hagitask 0.1.0

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 +44 -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,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hagicode.local/designs/task-preset-plugin-schemas/store-page-frontmatter.schema.json",
4
+ "title": "Task Preset Store Page Frontmatter",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "locale",
9
+ "slug",
10
+ "title",
11
+ "summary",
12
+ "status"
13
+ ],
14
+ "properties": {
15
+ "locale": {
16
+ "type": "string",
17
+ "pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"
18
+ },
19
+ "slug": {
20
+ "type": "string",
21
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
22
+ },
23
+ "title": {
24
+ "type": "string"
25
+ },
26
+ "summary": {
27
+ "type": "string"
28
+ },
29
+ "eyebrow": {
30
+ "type": "string"
31
+ },
32
+ "status": {
33
+ "type": "string",
34
+ "enum": [
35
+ "active",
36
+ "experimental",
37
+ "disabled"
38
+ ]
39
+ },
40
+ "primaryCtaLabel": {
41
+ "type": "string"
42
+ },
43
+ "secondaryCtaLabel": {
44
+ "type": "string"
45
+ },
46
+ "catalog": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/$defs/filterKey"
50
+ },
51
+ "uniqueItems": true
52
+ },
53
+ "tags": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ },
58
+ "uniqueItems": true
59
+ },
60
+ "badges": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ }
66
+ },
67
+ "$defs": {
68
+ "filterKey": {
69
+ "type": "string",
70
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hagicode.local/designs/task-preset-plugin-schemas/task-preset.schema.json",
4
+ "title": "Task Preset Plugin Backend Definition",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["taskKey", "scriptKey", "defaultTargetType", "targets", "inputBindings"],
8
+ "properties": {
9
+ "$schema": {"type": "string"},
10
+ "taskKey": {"type": "string", "minLength": 1},
11
+ "scriptKey": {"type": "string", "minLength": 1},
12
+ "defaultTargetType": {"enum": ["repository", "vault", "project"]},
13
+ "requirements": {"type": "array", "items": {"$ref": "#/$defs/requirement"}},
14
+ "targets": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["repositories", "vaults", "projects"],
18
+ "properties": {
19
+ "repositories": {"$ref": "#/$defs/targetCollection"},
20
+ "vaults": {"$ref": "#/$defs/targetCollection"},
21
+ "projects": {"$ref": "#/$defs/targetCollection"}
22
+ }
23
+ },
24
+ "inputBindings": {"type": "array", "items": {"$ref": "#/$defs/inputBinding"}},
25
+ "scene": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["provider", "defaultSceneKey", "registrations"],
29
+ "properties": {
30
+ "provider": {"type": "string"},
31
+ "defaultSceneKey": {"type": "string"},
32
+ "registrations": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/sceneRegistration"}}
33
+ }
34
+ },
35
+ "execution": {"$ref": "#/$defs/execution"},
36
+ "compatibility": {"$ref": "#/$defs/compatibility"}
37
+ },
38
+ "$defs": {
39
+ "targetCollection": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["enabled"],
43
+ "properties": {
44
+ "enabled": {"type": "boolean"},
45
+ "selections": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/selection"}}
46
+ },
47
+ "allOf": [{
48
+ "if": {"properties": {"enabled": {"const": true}}},
49
+ "then": {"required": ["selections"]}
50
+ }]
51
+ },
52
+ "selection": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["id", "selectionMode", "output"],
56
+ "properties": {
57
+ "id": {"type": "string", "minLength": 1},
58
+ "selectionMode": {"enum": ["single", "multiple"]},
59
+ "allowedAccessTypes": {
60
+ "type": "array",
61
+ "minItems": 1,
62
+ "uniqueItems": true,
63
+ "items": {"enum": ["read", "write"]}
64
+ },
65
+ "accessType": {"enum": ["read", "write"]},
66
+ "required": {"type": "boolean"},
67
+ "output": {"type": "string", "minLength": 1},
68
+ "mutuallyExclusiveWith": {"type": "array", "items": {"type": "string"}},
69
+ "scope": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["source"],
73
+ "properties": {
74
+ "source": {"enum": ["owner-project-repositories", "vault-registry", "project-registry"]},
75
+ "allowedVaultTypes": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string"}},
76
+ "includeSystemManaged": {"type": "boolean"},
77
+ "allowOwnerProject": {"type": "boolean"}
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "requirement": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["type"],
86
+ "properties": {
87
+ "type": {"enum": ["cli", "skills", "agent"]},
88
+ "name": {"type": "string", "minLength": 1},
89
+ "names": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
90
+ "command": {"type": "string", "minLength": 1},
91
+ "args": {"type": "array", "items": {"type": "string", "minLength": 1}}
92
+ }
93
+ },
94
+ "inputBinding": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": ["input"],
98
+ "properties": {
99
+ "input": {"type": "string", "minLength": 1},
100
+ "promptParameter": {"type": "string", "minLength": 1},
101
+ "metadataKey": {"type": "string", "minLength": 1},
102
+ "valueType": {"enum": ["text", "boolean", "single", "multiple", "url-list"]},
103
+ "transform": {"enum": ["trim", "string-list", "url-list"]},
104
+ "aliases": {"type": "array", "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
105
+ "producer": {"enum": ["field-output", "frontend-computed", "runtime-defaulted"]},
106
+ "required": {"type": "boolean"}
107
+ },
108
+ "anyOf": [{"required": ["promptParameter"]}, {"required": ["metadataKey"]}]
109
+ },
110
+ "sceneRegistration": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["sceneKey"],
114
+ "properties": {
115
+ "sceneKey": {"type": "string", "minLength": 1},
116
+ "titleKey": {"type": "string"},
117
+ "summaryKey": {"type": "string"},
118
+ "descriptionKey": {"type": "string"}
119
+ }
120
+ },
121
+ "execution": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["schemaVersion", "strategy"],
125
+ "properties": {
126
+ "schemaVersion": {"type": "string", "pattern": "^1\\."},
127
+ "strategy": {"enum": ["declarative", "extension"]},
128
+ "extensionPoint": {"type": "string", "pattern": "^[a-z][a-z0-9.-]*$"}
129
+ },
130
+ "allOf": [
131
+ {"if": {"properties": {"strategy": {"const": "extension"}}}, "then": {"required": ["extensionPoint"]}},
132
+ {"if": {"properties": {"strategy": {"const": "declarative"}}}, "then": {"not": {"required": ["extensionPoint"]}}}
133
+ ]
134
+ },
135
+ "compatibility": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "properties": {
139
+ "deprecatedInputs": {"type": "array", "items": {"$ref": "#/$defs/compatibilityInput"}}
140
+ }
141
+ },
142
+ "compatibilityInput": {
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "required": ["legacy", "binding", "diagnosticCode"],
146
+ "properties": {
147
+ "legacy": {"type": "string", "minLength": 1},
148
+ "binding": {"type": "string", "minLength": 1},
149
+ "diagnosticCode": {"type": "string", "minLength": 1}
150
+ }
151
+ }
152
+ }
153
+ }