@ai-primitives-hub/core 0.0.1-alpha.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.
Files changed (199) hide show
  1. package/README.md +18 -0
  2. package/dist/domain/bundle/id.d.ts +60 -0
  3. package/dist/domain/bundle/id.d.ts.map +1 -0
  4. package/dist/domain/bundle/id.js +75 -0
  5. package/dist/domain/bundle/id.js.map +1 -0
  6. package/dist/domain/bundle/identity-matcher.d.ts +48 -0
  7. package/dist/domain/bundle/identity-matcher.d.ts.map +1 -0
  8. package/dist/domain/bundle/identity-matcher.js +57 -0
  9. package/dist/domain/bundle/identity-matcher.js.map +1 -0
  10. package/dist/domain/bundle/types.d.ts +138 -0
  11. package/dist/domain/bundle/types.d.ts.map +1 -0
  12. package/dist/domain/bundle/types.js +17 -0
  13. package/dist/domain/bundle/types.js.map +1 -0
  14. package/dist/domain/bundle/version.d.ts +51 -0
  15. package/dist/domain/bundle/version.d.ts.map +1 -0
  16. package/dist/domain/bundle/version.js +176 -0
  17. package/dist/domain/bundle/version.js.map +1 -0
  18. package/dist/domain/collection/manifest-validator.d.ts +47 -0
  19. package/dist/domain/collection/manifest-validator.d.ts.map +1 -0
  20. package/dist/domain/collection/manifest-validator.js +83 -0
  21. package/dist/domain/collection/manifest-validator.js.map +1 -0
  22. package/dist/domain/collection/types.d.ts +201 -0
  23. package/dist/domain/collection/types.d.ts.map +1 -0
  24. package/dist/domain/collection/types.js +17 -0
  25. package/dist/domain/collection/types.js.map +1 -0
  26. package/dist/domain/collection/validate.d.ts +51 -0
  27. package/dist/domain/collection/validate.d.ts.map +1 -0
  28. package/dist/domain/collection/validate.js +263 -0
  29. package/dist/domain/collection/validate.js.map +1 -0
  30. package/dist/domain/discovery/types.d.ts +95 -0
  31. package/dist/domain/discovery/types.d.ts.map +1 -0
  32. package/dist/domain/discovery/types.js +13 -0
  33. package/dist/domain/discovery/types.js.map +1 -0
  34. package/dist/domain/errors.d.ts +23 -0
  35. package/dist/domain/errors.d.ts.map +1 -0
  36. package/dist/domain/errors.js +41 -0
  37. package/dist/domain/errors.js.map +1 -0
  38. package/dist/domain/hub/types.d.ts +254 -0
  39. package/dist/domain/hub/types.d.ts.map +1 -0
  40. package/dist/domain/hub/types.js +11 -0
  41. package/dist/domain/hub/types.js.map +1 -0
  42. package/dist/domain/hub/validate.d.ts +40 -0
  43. package/dist/domain/hub/validate.d.ts.map +1 -0
  44. package/dist/domain/hub/validate.js +89 -0
  45. package/dist/domain/hub/validate.js.map +1 -0
  46. package/dist/domain/index.d.ts +31 -0
  47. package/dist/domain/index.d.ts.map +1 -0
  48. package/dist/domain/index.js +47 -0
  49. package/dist/domain/index.js.map +1 -0
  50. package/dist/domain/install/copilot-file-type.d.ts +84 -0
  51. package/dist/domain/install/copilot-file-type.d.ts.map +1 -0
  52. package/dist/domain/install/copilot-file-type.js +190 -0
  53. package/dist/domain/install/copilot-file-type.js.map +1 -0
  54. package/dist/domain/install/installable.d.ts +58 -0
  55. package/dist/domain/install/installable.d.ts.map +1 -0
  56. package/dist/domain/install/installable.js +36 -0
  57. package/dist/domain/install/installable.js.map +1 -0
  58. package/dist/domain/install/layout.d.ts +84 -0
  59. package/dist/domain/install/layout.d.ts.map +1 -0
  60. package/dist/domain/install/layout.js +70 -0
  61. package/dist/domain/install/layout.js.map +1 -0
  62. package/dist/domain/install/target.d.ts +70 -0
  63. package/dist/domain/install/target.d.ts.map +1 -0
  64. package/dist/domain/install/target.js +43 -0
  65. package/dist/domain/install/target.js.map +1 -0
  66. package/dist/domain/install/transform.d.ts +47 -0
  67. package/dist/domain/install/transform.d.ts.map +1 -0
  68. package/dist/domain/install/transform.js +24 -0
  69. package/dist/domain/install/transform.js.map +1 -0
  70. package/dist/domain/install/types.d.ts +51 -0
  71. package/dist/domain/install/types.d.ts.map +1 -0
  72. package/dist/domain/install/types.js +3 -0
  73. package/dist/domain/install/types.js.map +1 -0
  74. package/dist/domain/primitive/types.d.ts +59 -0
  75. package/dist/domain/primitive/types.d.ts.map +1 -0
  76. package/dist/domain/primitive/types.js +22 -0
  77. package/dist/domain/primitive/types.js.map +1 -0
  78. package/dist/domain/registry/guards.d.ts +28 -0
  79. package/dist/domain/registry/guards.d.ts.map +1 -0
  80. package/dist/domain/registry/guards.js +33 -0
  81. package/dist/domain/registry/guards.js.map +1 -0
  82. package/dist/domain/registry/settings.d.ts +49 -0
  83. package/dist/domain/registry/settings.d.ts.map +1 -0
  84. package/dist/domain/registry/settings.js +3 -0
  85. package/dist/domain/registry/settings.js.map +1 -0
  86. package/dist/domain/registry/types.d.ts +91 -0
  87. package/dist/domain/registry/types.d.ts.map +1 -0
  88. package/dist/domain/registry/types.js +3 -0
  89. package/dist/domain/registry/types.js.map +1 -0
  90. package/dist/domain/registry-error.d.ts +69 -0
  91. package/dist/domain/registry-error.d.ts.map +1 -0
  92. package/dist/domain/registry-error.js +87 -0
  93. package/dist/domain/registry-error.js.map +1 -0
  94. package/dist/domain/scaffold/index.d.ts +9 -0
  95. package/dist/domain/scaffold/index.d.ts.map +1 -0
  96. package/dist/domain/scaffold/index.js +13 -0
  97. package/dist/domain/scaffold/index.js.map +1 -0
  98. package/dist/domain/scaffold/types.d.ts +135 -0
  99. package/dist/domain/scaffold/types.d.ts.map +1 -0
  100. package/dist/domain/scaffold/types.js +44 -0
  101. package/dist/domain/scaffold/types.js.map +1 -0
  102. package/dist/domain/skill/validate.d.ts +52 -0
  103. package/dist/domain/skill/validate.d.ts.map +1 -0
  104. package/dist/domain/skill/validate.js +108 -0
  105. package/dist/domain/skill/validate.js.map +1 -0
  106. package/dist/domain/source/types.d.ts +72 -0
  107. package/dist/domain/source/types.d.ts.map +1 -0
  108. package/dist/domain/source/types.js +14 -0
  109. package/dist/domain/source/types.js.map +1 -0
  110. package/dist/domain/source-id.d.ts +41 -0
  111. package/dist/domain/source-id.d.ts.map +1 -0
  112. package/dist/domain/source-id.js +90 -0
  113. package/dist/domain/source-id.js.map +1 -0
  114. package/dist/index.d.ts +21 -0
  115. package/dist/index.d.ts.map +1 -0
  116. package/dist/index.js +74 -0
  117. package/dist/index.js.map +1 -0
  118. package/dist/ports/app-storage.d.ts +65 -0
  119. package/dist/ports/app-storage.d.ts.map +1 -0
  120. package/dist/ports/app-storage.js +22 -0
  121. package/dist/ports/app-storage.js.map +1 -0
  122. package/dist/ports/bundle-downloader.d.ts +28 -0
  123. package/dist/ports/bundle-downloader.d.ts.map +1 -0
  124. package/dist/ports/bundle-downloader.js +3 -0
  125. package/dist/ports/bundle-downloader.js.map +1 -0
  126. package/dist/ports/bundle-extractor.d.ts +21 -0
  127. package/dist/ports/bundle-extractor.d.ts.map +1 -0
  128. package/dist/ports/bundle-extractor.js +8 -0
  129. package/dist/ports/bundle-extractor.js.map +1 -0
  130. package/dist/ports/clock.d.ts +29 -0
  131. package/dist/ports/clock.d.ts.map +1 -0
  132. package/dist/ports/clock.js +13 -0
  133. package/dist/ports/clock.js.map +1 -0
  134. package/dist/ports/copilot-sdk.d.ts +80 -0
  135. package/dist/ports/copilot-sdk.d.ts.map +1 -0
  136. package/dist/ports/copilot-sdk.js +16 -0
  137. package/dist/ports/copilot-sdk.js.map +1 -0
  138. package/dist/ports/filesystem.d.ts +53 -0
  139. package/dist/ports/filesystem.d.ts.map +1 -0
  140. package/dist/ports/filesystem.js +14 -0
  141. package/dist/ports/filesystem.js.map +1 -0
  142. package/dist/ports/github-api.d.ts +62 -0
  143. package/dist/ports/github-api.d.ts.map +1 -0
  144. package/dist/ports/github-api.js +19 -0
  145. package/dist/ports/github-api.js.map +1 -0
  146. package/dist/ports/http.d.ts +58 -0
  147. package/dist/ports/http.d.ts.map +1 -0
  148. package/dist/ports/http.js +12 -0
  149. package/dist/ports/http.js.map +1 -0
  150. package/dist/ports/index.d.ts +23 -0
  151. package/dist/ports/index.d.ts.map +1 -0
  152. package/dist/ports/index.js +39 -0
  153. package/dist/ports/index.js.map +1 -0
  154. package/dist/ports/layout-config-loader.d.ts +27 -0
  155. package/dist/ports/layout-config-loader.d.ts.map +1 -0
  156. package/dist/ports/layout-config-loader.js +3 -0
  157. package/dist/ports/layout-config-loader.js.map +1 -0
  158. package/dist/ports/process-runner.d.ts +31 -0
  159. package/dist/ports/process-runner.d.ts.map +1 -0
  160. package/dist/ports/process-runner.js +14 -0
  161. package/dist/ports/process-runner.js.map +1 -0
  162. package/dist/ports/registry-operations.d.ts +157 -0
  163. package/dist/ports/registry-operations.d.ts.map +1 -0
  164. package/dist/ports/registry-operations.js +3 -0
  165. package/dist/ports/registry-operations.js.map +1 -0
  166. package/dist/ports/resource-transformer.d.ts +28 -0
  167. package/dist/ports/resource-transformer.d.ts.map +1 -0
  168. package/dist/ports/resource-transformer.js +3 -0
  169. package/dist/ports/resource-transformer.js.map +1 -0
  170. package/dist/ports/source-adapter.d.ts +43 -0
  171. package/dist/ports/source-adapter.d.ts.map +1 -0
  172. package/dist/ports/source-adapter.js +3 -0
  173. package/dist/ports/source-adapter.js.map +1 -0
  174. package/dist/ports/source-resolver.d.ts +19 -0
  175. package/dist/ports/source-resolver.d.ts.map +1 -0
  176. package/dist/ports/source-resolver.js +3 -0
  177. package/dist/ports/source-resolver.js.map +1 -0
  178. package/dist/ports/target-writer.d.ts +37 -0
  179. package/dist/ports/target-writer.d.ts.map +1 -0
  180. package/dist/ports/target-writer.js +3 -0
  181. package/dist/ports/target-writer.js.map +1 -0
  182. package/dist/ports/telemetry.d.ts +22 -0
  183. package/dist/ports/telemetry.d.ts.map +1 -0
  184. package/dist/ports/telemetry.js +11 -0
  185. package/dist/ports/telemetry.js.map +1 -0
  186. package/dist/ports/update-notifier.d.ts +22 -0
  187. package/dist/ports/update-notifier.d.ts.map +1 -0
  188. package/dist/ports/update-notifier.js +12 -0
  189. package/dist/ports/update-notifier.js.map +1 -0
  190. package/dist/ports/update-store.d.ts +25 -0
  191. package/dist/ports/update-store.d.ts.map +1 -0
  192. package/dist/ports/update-store.js +12 -0
  193. package/dist/ports/update-store.js.map +1 -0
  194. package/dist/public/schemas/apm.schema.json +59 -0
  195. package/dist/public/schemas/collection.schema.json +345 -0
  196. package/dist/public/schemas/default-hubs-config.schema.json +68 -0
  197. package/dist/public/schemas/hub-config.schema.json +389 -0
  198. package/dist/public/schemas/lockfile.schema.json +243 -0
  199. package/package.json +50 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Bundle update-preference persistence — the narrow slice of the
3
+ * extension's `RegistryStorage` (`src/storage/registry-storage.ts`)
4
+ * that the update-checking/auto-update use cases need. `RegistryStorage`
5
+ * already exposes exactly this shape (`getUpdatePreference`/
6
+ * `setUpdatePreference`/`getUpdatePreferences`), so it satisfies this
7
+ * port with zero changes.
8
+ * @module ports/update-store
9
+ */
10
+ /**
11
+ * Per-bundle auto-update preference record.
12
+ */
13
+ export interface UpdatePreferenceRecord {
14
+ autoUpdate: boolean;
15
+ lastChecked?: string;
16
+ }
17
+ /**
18
+ * Read/write access to per-bundle auto-update preferences.
19
+ */
20
+ export interface UpdatePreferenceStore {
21
+ getUpdatePreference(bundleId: string): Promise<boolean>;
22
+ setUpdatePreference(bundleId: string, autoUpdate: boolean): Promise<void>;
23
+ getUpdatePreferences(): Promise<Record<string, UpdatePreferenceRecord>>;
24
+ }
25
+ //# sourceMappingURL=update-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-store.d.ts","sourceRoot":"","sources":["../../src/ports/update-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;CACzE"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Bundle update-preference persistence — the narrow slice of the
4
+ * extension's `RegistryStorage` (`src/storage/registry-storage.ts`)
5
+ * that the update-checking/auto-update use cases need. `RegistryStorage`
6
+ * already exposes exactly this shape (`getUpdatePreference`/
7
+ * `setUpdatePreference`/`getUpdatePreferences`), so it satisfies this
8
+ * port with zero changes.
9
+ * @module ports/update-store
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ //# sourceMappingURL=update-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-store.js","sourceRoot":"","sources":["../../src/ports/update-store.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "APM Package Manifest",
4
+ "type": "object",
5
+ "required": ["name", "version", "description", "author"],
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "pattern": "^[a-z0-9._-]+$"
10
+ },
11
+ "version": {
12
+ "type": "string",
13
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?$"
14
+ },
15
+ "description": {
16
+ "type": "string",
17
+ "maxLength": 500
18
+ },
19
+ "author": {
20
+ "type": "string"
21
+ },
22
+ "license": {
23
+ "type": "string"
24
+ },
25
+ "tags": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "maxLength": 30
30
+ },
31
+ "maxItems": 20
32
+ },
33
+ "dependencies": {
34
+ "type": "object",
35
+ "properties": {
36
+ "apm": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "mcp": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ }
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "scripts": {
52
+ "type": "object",
53
+ "additionalProperties": {
54
+ "type": "string"
55
+ }
56
+ }
57
+ },
58
+ "additionalProperties": true
59
+ }
@@ -0,0 +1,345 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/AmadeusITGroup/prompt-registry/schemas/collection.schema.json",
4
+ "title": "Awesome Copilot Collection",
5
+ "description": "Schema for Copilot prompt collection files",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "name",
10
+ "description",
11
+ "items"
12
+ ],
13
+ "properties": {
14
+ "id": {
15
+ "type": "string",
16
+ "description": "Unique identifier for the collection (lowercase letters, numbers, and hyphens only)",
17
+ "pattern": "^[a-z0-9-]+$",
18
+ "minLength": 1,
19
+ "examples": [
20
+ "my-prompts",
21
+ "python-helpers",
22
+ "git-workflows"
23
+ ]
24
+ },
25
+ "name": {
26
+ "type": "string",
27
+ "description": "Human-readable name of the collection",
28
+ "minLength": 1,
29
+ "maxLength": 100,
30
+ "examples": [
31
+ "My Awesome Prompts",
32
+ "Python Development Helpers"
33
+ ]
34
+ },
35
+ "description": {
36
+ "type": "string",
37
+ "description": "Detailed description of the collection's purpose and contents",
38
+ "minLength": 1,
39
+ "maxLength": 500
40
+ },
41
+ "items": {
42
+ "type": "array",
43
+ "description": "List of resources in this collection",
44
+ "minItems": 0,
45
+ "maxItems": 50,
46
+ "items": {
47
+ "type": "object",
48
+ "required": [
49
+ "path",
50
+ "kind"
51
+ ],
52
+ "properties": {
53
+ "path": {
54
+ "type": "string",
55
+ "description": "Relative path to the resource file",
56
+ "minLength": 1,
57
+ "examples": [
58
+ "prompts/my-prompt.prompt.md",
59
+ "instructions/code-style.instructions.md",
60
+ "skills/my-skill/SKILL.md"
61
+ ]
62
+ },
63
+ "kind": {
64
+ "type": "string",
65
+ "description": "Type of resource",
66
+ "enum": [
67
+ "prompt",
68
+ "instruction",
69
+ "chat-mode",
70
+ "agent",
71
+ "skill",
72
+ "plugin",
73
+ "hook"
74
+ ]
75
+ },
76
+ "title": {
77
+ "type": "string",
78
+ "description": "Optional display title for the resource"
79
+ },
80
+ "description": {
81
+ "type": "string",
82
+ "description": "Optional description of the resource"
83
+ },
84
+ "tags": {
85
+ "type": "array",
86
+ "description": "Optional tags for categorization",
87
+ "items": {
88
+ "type": "string"
89
+ }
90
+ }
91
+ },
92
+ "additionalProperties": false
93
+ }
94
+ },
95
+ "mcp": {
96
+ "type": "object",
97
+ "description": "Model Context Protocol (MCP) server configurations to be installed with this collection",
98
+ "properties": {
99
+ "items": {
100
+ "type": "object",
101
+ "description": "MCP servers to install (follows mcp.json spec)",
102
+ "patternProperties": {
103
+ "^[a-zA-Z0-9_-]+$": {
104
+ "type": "object",
105
+ "description": "MCP server configuration",
106
+ "properties": {
107
+ "type": {
108
+ "type": "string",
109
+ "description": "Transport type for the MCP server",
110
+ "enum": ["stdio", "http", "sse"],
111
+ "default": "stdio",
112
+ "examples": ["stdio", "http", "sse"]
113
+ },
114
+ "command": {
115
+ "type": "string",
116
+ "description": "Command to start the MCP server (required for stdio type)",
117
+ "examples": [
118
+ "node",
119
+ "python",
120
+ "npx"
121
+ ]
122
+ },
123
+ "args": {
124
+ "type": "array",
125
+ "description": "Arguments for the server command (stdio only)",
126
+ "items": {
127
+ "type": "string"
128
+ },
129
+ "examples": [
130
+ [
131
+ "${bundlePath}/server.js"
132
+ ],
133
+ [
134
+ "${bundlePath}/mcp_server.py"
135
+ ],
136
+ [
137
+ "${env:HOME}/.local/bin/my-mcp-server"
138
+ ]
139
+ ]
140
+ },
141
+ "env": {
142
+ "type": "object",
143
+ "description": "Environment variables for the server (stdio only)",
144
+ "additionalProperties": {
145
+ "type": "string"
146
+ }
147
+ },
148
+ "envFile": {
149
+ "type": "string",
150
+ "description": "Path to an environment file to load variables from (stdio only)",
151
+ "examples": [
152
+ "${workspaceFolder}/.env",
153
+ "${bundlePath}/.env"
154
+ ]
155
+ },
156
+ "url": {
157
+ "type": "string",
158
+ "description": "URL for the remote MCP server (required for http/sse types). Supports HTTP/HTTPS URLs, Unix sockets (unix:///path), and Windows named pipes (pipe:///pipe/name)",
159
+ "examples": [
160
+ "http://localhost:3000/mcp",
161
+ "https://api.example.com/mcp",
162
+ "unix:///tmp/mcp.sock",
163
+ "pipe:///pipe/mcp-server"
164
+ ]
165
+ },
166
+ "headers": {
167
+ "type": "object",
168
+ "description": "HTTP headers for authentication or configuration (http/sse only)",
169
+ "additionalProperties": {
170
+ "type": "string"
171
+ },
172
+ "examples": [
173
+ {
174
+ "Authorization": "Bearer ${input:api-token}"
175
+ }
176
+ ]
177
+ },
178
+ "disabled": {
179
+ "type": "boolean",
180
+ "description": "Whether the server is disabled",
181
+ "default": false
182
+ }
183
+ },
184
+ "allOf": [
185
+ {
186
+ "if": {
187
+ "properties": {
188
+ "type": {
189
+ "const": "stdio"
190
+ }
191
+ }
192
+ },
193
+ "then": {
194
+ "required": ["command"]
195
+ }
196
+ },
197
+ {
198
+ "if": {
199
+ "not": {
200
+ "properties": {
201
+ "type": {
202
+ "const": "stdio"
203
+ }
204
+ }
205
+ },
206
+ "required": ["type"]
207
+ },
208
+ "then": {
209
+ "required": ["url"]
210
+ }
211
+ },
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "type": {
216
+ "enum": ["http", "sse"]
217
+ }
218
+ },
219
+ "required": ["type"]
220
+ },
221
+ "then": {
222
+ "required": ["url"]
223
+ }
224
+ },
225
+ {
226
+ "if": {
227
+ "not": {
228
+ "required": ["type"]
229
+ }
230
+ },
231
+ "then": {
232
+ "required": ["command"]
233
+ }
234
+ }
235
+ ],
236
+ "additionalProperties": false
237
+ }
238
+ },
239
+ "additionalProperties": false
240
+ },
241
+ "inputs": {
242
+ "type": "array",
243
+ "description": "Input definitions for MCP server secrets or configurable values (follows VS Code mcp.json inputs spec)",
244
+ "items": {
245
+ "type": "object",
246
+ "required": ["id", "type"],
247
+ "properties": {
248
+ "id": {
249
+ "type": "string",
250
+ "description": "Unique identifier for this input, referenced in args/env as ${input:id}",
251
+ "pattern": "^[a-zA-Z0-9_-]+$",
252
+ "examples": ["apiToken", "bbUser", "ocToken"]
253
+ },
254
+ "type": {
255
+ "type": "string",
256
+ "description": "Input type",
257
+ "enum": ["promptString", "pickString", "command"]
258
+ },
259
+ "description": {
260
+ "type": "string",
261
+ "description": "Human-readable description shown to the user"
262
+ },
263
+ "password": {
264
+ "type": "boolean",
265
+ "description": "If true, the input is masked (for secrets). Only applies to promptString.",
266
+ "default": false
267
+ },
268
+ "default": {
269
+ "type": "string",
270
+ "description": "Default value pre-filled in the prompt"
271
+ },
272
+ "options": {
273
+ "type": "array",
274
+ "description": "List of options for pickString type",
275
+ "items": { "type": "string" }
276
+ }
277
+ },
278
+ "additionalProperties": false
279
+ }
280
+ }
281
+ },
282
+ "additionalProperties": false
283
+ },
284
+ "readme": {
285
+ "properties": {
286
+ "path": {
287
+ "type": "string",
288
+ "description": "Optional path to a README file for the collection",
289
+ "examples": [
290
+ "README.md",
291
+ "docs/collection-overview.md"
292
+ ]
293
+ }
294
+ }
295
+ },
296
+ "version": {
297
+ "type": "string",
298
+ "description": "Version of the collection",
299
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
300
+ "examples": [
301
+ "1.0.0",
302
+ "2.1.3"
303
+ ]
304
+ },
305
+ "author": {
306
+ "type": "string",
307
+ "description": "Author of the collection"
308
+ },
309
+ "tags": {
310
+ "type": "array",
311
+ "description": "Tags for the entire collection",
312
+ "items": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "display": {
317
+ "type": "object",
318
+ "description": "Display preferences for the collection",
319
+ "properties": {
320
+ "color": {
321
+ "type": "string",
322
+ "description": "Color theme for the collection"
323
+ },
324
+ "icon": {
325
+ "type": "string",
326
+ "description": "Icon identifier for the collection"
327
+ },
328
+ "ordering": {
329
+ "type": "string",
330
+ "description": "How to order items in the collection",
331
+ "enum": [
332
+ "manual",
333
+ "alphabetical"
334
+ ]
335
+ },
336
+ "show_badge": {
337
+ "type": "boolean",
338
+ "description": "Whether to show a badge for the collection"
339
+ }
340
+ },
341
+ "additionalProperties": false
342
+ }
343
+ },
344
+ "additionalProperties": false
345
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Default Hubs Configuration",
4
+ "description": "Configuration for default hubs offered during extension installation",
5
+ "type": "object",
6
+ "properties": {
7
+ "defaultHubs": {
8
+ "type": "array",
9
+ "description": "List of default hub configurations",
10
+ "items": {
11
+ "type": "object",
12
+ "required": ["name", "description", "icon", "reference"],
13
+ "properties": {
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Display name for the hub"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "Description shown in the selector"
21
+ },
22
+ "icon": {
23
+ "type": "string",
24
+ "description": "VS Code codicon name (without $() wrapper)",
25
+ "examples": ["cloud", "organization", "repo", "globe"]
26
+ },
27
+ "reference": {
28
+ "type": "object",
29
+ "description": "Hub reference configuration",
30
+ "required": ["type", "location"],
31
+ "properties": {
32
+ "type": {
33
+ "type": "string",
34
+ "enum": ["github", "local", "url"],
35
+ "description": "Type of hub source"
36
+ },
37
+ "location": {
38
+ "type": "string",
39
+ "description": "Location of the hub (repo path, local path, or URL)"
40
+ },
41
+ "ref": {
42
+ "type": "string",
43
+ "description": "Git ref for GitHub sources (branch, tag, or commit)",
44
+ "default": "main"
45
+ },
46
+ "autoSync": {
47
+ "type": "boolean",
48
+ "description": "Whether to automatically sync this hub",
49
+ "default": false
50
+ }
51
+ }
52
+ },
53
+ "recommended": {
54
+ "type": "boolean",
55
+ "description": "Whether this is the recommended default hub",
56
+ "default": false
57
+ },
58
+ "enabled": {
59
+ "type": "boolean",
60
+ "description": "Whether to show this hub in first-run selector",
61
+ "default": true
62
+ }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "required": ["defaultHubs"]
68
+ }