@nurix/apollo 0.2.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.
@@ -0,0 +1,346 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/nurixlabs/apollo/main/spec/schema.json",
4
+ "title": "apollo.service.json",
5
+ "description": "Manifest grammar v1 for an Apollo repo. Declares repo identity plus one or more service entries.",
6
+ "type": "object",
7
+ "required": ["spec", "name", "description", "repository", "services"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "spec": {
12
+ "type": "string",
13
+ "enum": ["apollo.dev/v1"],
14
+ "description": "Grammar version. Bump on breaking changes."
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "pattern": "^[a-z][a-z0-9-]*$",
19
+ "description": "Repo slug, globally unique."
20
+ },
21
+ "description": { "type": "string", "minLength": 1 },
22
+ "repository": { "type": "string", "format": "uri" },
23
+ "homepage": { "type": "string", "format": "uri" },
24
+ "owner": { "type": "string" },
25
+ "tags": { "type": "array", "items": { "type": "string" } },
26
+ "services": {
27
+ "type": "array",
28
+ "minItems": 1,
29
+ "items": { "$ref": "#/definitions/service" }
30
+ }
31
+ },
32
+
33
+ "definitions": {
34
+ "service": {
35
+ "type": "object",
36
+ "required": ["name", "kind", "type", "description"],
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "name": {
40
+ "type": "string",
41
+ "pattern": "^[a-z][a-z0-9-]*(/[a-z0-9-]+)*$",
42
+ "description": "Service slug, globally unique across Apollo. May be namespaced with '/' when a repo ships a family of sibling services (e.g. acme-suite/billing)."
43
+ },
44
+ "kind": {
45
+ "type": "string",
46
+ "enum": ["library", "service", "worker", "application", "documentation", "infra"],
47
+ "description": "Structural discriminator — selects the required sub-block (npm/http/mcp/worker/application/vault/infra)."
48
+ },
49
+ "type": {
50
+ "type": "string",
51
+ "enum": ["app", "service", "platform-service", "sdk", "library", "tool"],
52
+ "description": "Catalogue taxonomy — how the registry classifies the service, orthogonal to kind."
53
+ },
54
+ "version": { "type": "string" },
55
+ "description": { "type": "string", "minLength": 1 },
56
+ "status": {
57
+ "type": "string",
58
+ "enum": ["active", "experimental", "deprecated", "planned"],
59
+ "default": "active"
60
+ },
61
+ "owner": { "type": "string" },
62
+ "tags": { "type": "array", "items": { "type": "string" } },
63
+ "tier": {
64
+ "type": "string",
65
+ "enum": ["primitive", "composite"],
66
+ "description": "Service-only attribute. Primitives are infra-close; composites wrap primitives."
67
+ },
68
+
69
+ "npm": { "$ref": "#/definitions/npm" },
70
+ "http": { "$ref": "#/definitions/http" },
71
+ "mcp": { "$ref": "#/definitions/mcp" },
72
+ "worker": { "$ref": "#/definitions/worker" },
73
+ "application": { "$ref": "#/definitions/application" },
74
+ "vault": { "$ref": "#/definitions/vault" },
75
+ "infra": { "$ref": "#/definitions/infra" },
76
+
77
+ "consumes": { "$ref": "#/definitions/consumes" },
78
+ "aiSurface": { "$ref": "#/definitions/aiSurface" },
79
+ "auth": { "$ref": "#/definitions/auth" },
80
+ "env": { "$ref": "#/definitions/env" }
81
+ },
82
+
83
+ "allOf": [
84
+ {
85
+ "if": { "properties": { "kind": { "const": "library" } }, "required": ["kind"] },
86
+ "then": { "required": ["npm"] }
87
+ },
88
+ {
89
+ "if": { "properties": { "kind": { "const": "service" } }, "required": ["kind"] },
90
+ "then": {
91
+ "anyOf": [
92
+ { "required": ["http"] },
93
+ { "required": ["mcp"] }
94
+ ]
95
+ }
96
+ },
97
+ {
98
+ "if": { "properties": { "kind": { "const": "worker" } }, "required": ["kind"] },
99
+ "then": { "required": ["worker"] }
100
+ },
101
+ {
102
+ "if": { "properties": { "kind": { "const": "application" } }, "required": ["kind"] },
103
+ "then": { "required": ["application"] }
104
+ },
105
+ {
106
+ "if": { "properties": { "kind": { "const": "documentation" } }, "required": ["kind"] },
107
+ "then": { "required": ["vault"] }
108
+ },
109
+ {
110
+ "if": { "properties": { "kind": { "const": "infra" } }, "required": ["kind"] },
111
+ "then": { "required": ["infra"] }
112
+ },
113
+ {
114
+ "if": {
115
+ "properties": { "kind": { "not": { "const": "service" } } },
116
+ "required": ["kind"]
117
+ },
118
+ "then": { "not": { "required": ["tier"] } }
119
+ }
120
+ ]
121
+ },
122
+
123
+ "npm": {
124
+ "type": "object",
125
+ "required": ["package"],
126
+ "additionalProperties": false,
127
+ "properties": {
128
+ "package": { "type": "string", "pattern": "^(@[a-z0-9-]+/)?[a-z0-9-]+$" },
129
+ "registry": { "type": "string", "format": "uri" },
130
+ "access": { "type": "string", "enum": ["public", "restricted"] },
131
+ "subpaths": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object",
135
+ "required": ["path"],
136
+ "properties": {
137
+ "path": { "type": "string" },
138
+ "summary": { "type": "string" }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ },
144
+
145
+ "http": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "properties": {
149
+ "endpoints": {
150
+ "type": "object",
151
+ "additionalProperties": { "type": "string", "format": "uri" }
152
+ },
153
+ "wellKnown": { "type": "string" },
154
+ "openapi": { "type": "string" },
155
+ "oidc": { "type": "string" },
156
+ "health": { "type": "string" }
157
+ }
158
+ },
159
+
160
+ "mcp": {
161
+ "type": "object",
162
+ "required": ["servers"],
163
+ "additionalProperties": false,
164
+ "properties": {
165
+ "servers": {
166
+ "type": "array",
167
+ "minItems": 1,
168
+ "items": {
169
+ "type": "object",
170
+ "required": ["name", "url"],
171
+ "additionalProperties": false,
172
+ "properties": {
173
+ "name": { "type": "string" },
174
+ "url": { "type": "string", "format": "uri" },
175
+ "transport": { "type": "string", "enum": ["sse", "stdio", "http"] },
176
+ "summary": { "type": "string" }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+
183
+ "worker": {
184
+ "type": "object",
185
+ "required": ["engine"],
186
+ "additionalProperties": false,
187
+ "properties": {
188
+ "engine": { "type": "string", "enum": ["temporal", "restate", "inngest", "custom"] },
189
+ "taskQueue": { "type": "string" },
190
+ "activities": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "object",
194
+ "required": ["name"],
195
+ "additionalProperties": false,
196
+ "properties": {
197
+ "name": { "type": "string" },
198
+ "calls": { "type": "string" },
199
+ "via": { "type": "string", "enum": ["http", "mcp"] },
200
+ "idempotent": { "type": "boolean" },
201
+ "summary": { "type": "string" }
202
+ }
203
+ }
204
+ },
205
+ "workflows": {
206
+ "type": "array",
207
+ "items": {
208
+ "type": "object",
209
+ "required": ["name"],
210
+ "additionalProperties": false,
211
+ "properties": {
212
+ "name": { "type": "string" },
213
+ "summary": { "type": "string" }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+
220
+ "application": {
221
+ "type": "object",
222
+ "required": ["ui"],
223
+ "additionalProperties": false,
224
+ "properties": {
225
+ "ui": { "type": "string", "enum": ["spa", "ssr", "static"] },
226
+ "entryRoute": { "type": "string" }
227
+ }
228
+ },
229
+
230
+ "vault": {
231
+ "type": "object",
232
+ "required": ["type"],
233
+ "additionalProperties": false,
234
+ "properties": {
235
+ "type": { "type": "string", "enum": ["obsidian", "site"] },
236
+ "path": { "type": "string" },
237
+ "entry": { "type": "string" },
238
+ "url": { "type": "string", "format": "uri" }
239
+ }
240
+ },
241
+
242
+ "infra": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "properties": {
246
+ "compose": { "type": "string" },
247
+ "components": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "object",
251
+ "required": ["name"],
252
+ "properties": {
253
+ "name": { "type": "string" },
254
+ "url": { "type": "string", "format": "uri" },
255
+ "summary": { "type": "string" }
256
+ }
257
+ }
258
+ },
259
+ "targets": {
260
+ "type": "array",
261
+ "items": {
262
+ "type": "object",
263
+ "required": ["name"],
264
+ "properties": {
265
+ "name": { "type": "string" },
266
+ "platform": { "type": "string" },
267
+ "namespace": { "type": "string" },
268
+ "summary": { "type": "string" }
269
+ }
270
+ }
271
+ },
272
+ "discoveryUrl": { "type": "string" }
273
+ }
274
+ },
275
+
276
+ "consumes": {
277
+ "type": "array",
278
+ "items": {
279
+ "type": "object",
280
+ "required": ["service", "via"],
281
+ "additionalProperties": false,
282
+ "properties": {
283
+ "service": { "type": "string" },
284
+ "via": { "type": "string", "enum": ["npm", "http", "mcp", "worker"] },
285
+ "subpath": { "type": "string" },
286
+ "endpoint": { "type": "string" }
287
+ }
288
+ }
289
+ },
290
+
291
+ "aiSurface": {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "properties": {
295
+ "promptHints": { "type": "string" },
296
+ "intents": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "object",
300
+ "required": ["id", "summary", "via"],
301
+ "additionalProperties": false,
302
+ "properties": {
303
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
304
+ "summary": { "type": "string" },
305
+ "inputs": { "type": "object" },
306
+ "outputs": { "type": "object" },
307
+ "via": {
308
+ "type": "object",
309
+ "required": ["transport"],
310
+ "properties": {
311
+ "transport": { "type": "string", "enum": ["http", "mcp", "npm", "cli"] },
312
+ "method": { "type": "string" },
313
+ "path": { "type": "string" },
314
+ "tool": { "type": "string" },
315
+ "command": { "type": "string" }
316
+ }
317
+ },
318
+ "auth": { "type": "string" },
319
+ "idempotent": { "type": "boolean" },
320
+ "sideEffects": { "type": "string", "enum": ["none", "read", "write", "external"] }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ },
326
+
327
+ "auth": {
328
+ "type": "object",
329
+ "additionalProperties": false,
330
+ "properties": {
331
+ "type": { "type": "string", "enum": ["none", "jwt", "oauth2", "apiKey"] },
332
+ "issuer": { "type": "string", "format": "uri" },
333
+ "audience": { "type": "string" }
334
+ }
335
+ },
336
+
337
+ "env": {
338
+ "type": "object",
339
+ "additionalProperties": false,
340
+ "properties": {
341
+ "required": { "type": "array", "items": { "type": "string" } },
342
+ "optional": { "type": "array", "items": { "type": "string" } }
343
+ }
344
+ }
345
+ }
346
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@nurix/apollo",
3
+ "version": "0.2.0",
4
+ "description": "The apollo CLI — bootstrap NuStack services into a repo via the Apollo discovery plane.",
5
+ "type": "module",
6
+ "private": false,
7
+ "license": "UNLICENSED",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/nurixlabs/apollo.git",
11
+ "directory": "packages/cli"
12
+ },
13
+ "bin": {
14
+ "apollo": "./dist/index.js"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "engines": {
20
+ "node": ">=22"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc && node scripts/copy_schema.mjs",
24
+ "dev": "tsc --watch",
25
+ "typecheck": "tsc --noEmit",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "dependencies": {
29
+ "@clack/prompts": "^0.11.0",
30
+ "ajv": "^8.17.1",
31
+ "ajv-formats": "^3.0.1",
32
+ "commander": "^14.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^22.10.0",
36
+ "typescript": "^5.7.2"
37
+ },
38
+ "publishConfig": {
39
+ "access": "restricted"
40
+ }
41
+ }