@nurix/nustack 0.10.0-dev.10

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 (131) hide show
  1. package/README.md +77 -0
  2. package/dist/commands/add.js +130 -0
  3. package/dist/commands/agent.js +100 -0
  4. package/dist/commands/bootstrap.js +54 -0
  5. package/dist/commands/describe.js +34 -0
  6. package/dist/commands/device.js +159 -0
  7. package/dist/commands/docs.js +119 -0
  8. package/dist/commands/doctor.js +284 -0
  9. package/dist/commands/graph.js +34 -0
  10. package/dist/commands/handoff.js +108 -0
  11. package/dist/commands/init.js +280 -0
  12. package/dist/commands/lane.js +12 -0
  13. package/dist/commands/list.js +20 -0
  14. package/dist/commands/login.js +134 -0
  15. package/dist/commands/logout.js +44 -0
  16. package/dist/commands/open.js +54 -0
  17. package/dist/commands/organization.js +114 -0
  18. package/dist/commands/review.js +152 -0
  19. package/dist/commands/search.js +57 -0
  20. package/dist/commands/sessions.js +62 -0
  21. package/dist/commands/sync.js +85 -0
  22. package/dist/commands/telemetry.js +112 -0
  23. package/dist/commands/toolkit.js +167 -0
  24. package/dist/commands/validate.js +67 -0
  25. package/dist/commands/workspace-sync.js +645 -0
  26. package/dist/commands/workspace.js +479 -0
  27. package/dist/index.js +357 -0
  28. package/dist/lib/agent/claudeHooks.js +77 -0
  29. package/dist/lib/auth_grant.js +398 -0
  30. package/dist/lib/auth_recovery.js +49 -0
  31. package/dist/lib/browser_opener.js +24 -0
  32. package/dist/lib/device_identity.js +28 -0
  33. package/dist/lib/device_keychain.js +101 -0
  34. package/dist/lib/env_file.js +75 -0
  35. package/dist/lib/etna/manager.js +43 -0
  36. package/dist/lib/etna/profile.js +41 -0
  37. package/dist/lib/etna/reconcile.js +77 -0
  38. package/dist/lib/filebeat_installer.js +246 -0
  39. package/dist/lib/git-sync/core/commit_range.js +37 -0
  40. package/dist/lib/git-sync/core/engine.js +263 -0
  41. package/dist/lib/git-sync/core/git_runner.js +137 -0
  42. package/dist/lib/git-sync/core/operation_state.js +22 -0
  43. package/dist/lib/git-sync/core/path_normalizer.js +98 -0
  44. package/dist/lib/git-sync/core/reconciliation_lock.js +103 -0
  45. package/dist/lib/git-sync/core/repository.js +49 -0
  46. package/dist/lib/git-sync/core/watch_stream.js +86 -0
  47. package/dist/lib/git-sync/core/watcher.js +61 -0
  48. package/dist/lib/git-sync/inbound/applier.js +131 -0
  49. package/dist/lib/git-sync/inbound/apply_commit.js +225 -0
  50. package/dist/lib/git-sync/inbound/approval.js +117 -0
  51. package/dist/lib/git-sync/inbound/content_decision.js +148 -0
  52. package/dist/lib/git-sync/inbound/download.js +223 -0
  53. package/dist/lib/git-sync/inbound/event_sync.js +133 -0
  54. package/dist/lib/git-sync/inbound/index.js +10 -0
  55. package/dist/lib/git-sync/inbound/notification.js +39 -0
  56. package/dist/lib/git-sync/inbound/state_fingerprint.js +32 -0
  57. package/dist/lib/git-sync/inbound/technical_wait.js +39 -0
  58. package/dist/lib/git-sync/inbound/undo.js +198 -0
  59. package/dist/lib/git-sync/outbound/extraction.js +107 -0
  60. package/dist/lib/git-sync/outbound/history_decision.js +112 -0
  61. package/dist/lib/git-sync/outbound/index.js +26 -0
  62. package/dist/lib/git-sync/outbound/manifest_builder.js +58 -0
  63. package/dist/lib/git-sync/outbound/publisher.js +51 -0
  64. package/dist/lib/git-sync/outbound/queue.js +123 -0
  65. package/dist/lib/git-sync/outbound/state.js +12 -0
  66. package/dist/lib/git-sync/outbound/upload_client.js +141 -0
  67. package/dist/lib/git-sync/recovery/bundle.js +56 -0
  68. package/dist/lib/git-sync/recovery/crypto.js +114 -0
  69. package/dist/lib/git-sync/recovery/index.js +3 -0
  70. package/dist/lib/git-sync/recovery/store.js +55 -0
  71. package/dist/lib/git-sync/whitelist/index.js +4 -0
  72. package/dist/lib/git-sync/whitelist/matcher.js +62 -0
  73. package/dist/lib/git-sync/whitelist/store.js +99 -0
  74. package/dist/lib/git-sync/whitelist/types.js +46 -0
  75. package/dist/lib/git-sync/whitelist/validation.js +60 -0
  76. package/dist/lib/graph/answer.js +171 -0
  77. package/dist/lib/graph/freshness.js +29 -0
  78. package/dist/lib/graph/library.js +19 -0
  79. package/dist/lib/guards.js +106 -0
  80. package/dist/lib/interactive.js +12 -0
  81. package/dist/lib/json_output.js +8 -0
  82. package/dist/lib/lanes/claudeAdapter.js +135 -0
  83. package/dist/lib/lanes/frames.js +73 -0
  84. package/dist/lib/lanes/supervisor.js +247 -0
  85. package/dist/lib/lanes/worktree.js +33 -0
  86. package/dist/lib/local_store/accepted_uploads.js +49 -0
  87. package/dist/lib/local_store/bindings.js +163 -0
  88. package/dist/lib/local_store/commit_origins.js +25 -0
  89. package/dist/lib/local_store/database.js +71 -0
  90. package/dist/lib/local_store/device_state.js +72 -0
  91. package/dist/lib/local_store/filebeat_state.js +133 -0
  92. package/dist/lib/local_store/handoff_applications.js +166 -0
  93. package/dist/lib/local_store/history_decisions.js +48 -0
  94. package/dist/lib/local_store/index.js +14 -0
  95. package/dist/lib/local_store/migrations.js +240 -0
  96. package/dist/lib/local_store/paths.js +24 -0
  97. package/dist/lib/local_store/pending_uploads.js +76 -0
  98. package/dist/lib/local_store/recovery_bundles.js +66 -0
  99. package/dist/lib/local_store/sync_vocabulary.js +33 -0
  100. package/dist/lib/local_store/workspace_events_cache.js +54 -0
  101. package/dist/lib/loopback.js +78 -0
  102. package/dist/lib/manifest.js +83 -0
  103. package/dist/lib/nustack_client.js +547 -0
  104. package/dist/lib/nustack_store.js +17 -0
  105. package/dist/lib/onboarding/attach_existing_git.js +65 -0
  106. package/dist/lib/onboarding/binding.js +91 -0
  107. package/dist/lib/onboarding/folder_state.js +99 -0
  108. package/dist/lib/onboarding/git_init.js +10 -0
  109. package/dist/lib/onboarding/handoff_apply.js +68 -0
  110. package/dist/lib/onboarding/init_fresh_folder.js +100 -0
  111. package/dist/lib/onboarding/manifest_writer.js +161 -0
  112. package/dist/lib/onboarding/web_first_attach.js +133 -0
  113. package/dist/lib/package_manager.js +23 -0
  114. package/dist/lib/review/client.js +66 -0
  115. package/dist/lib/schema_validator.js +24 -0
  116. package/dist/lib/secure_file.js +10 -0
  117. package/dist/lib/session_telemetry.js +263 -0
  118. package/dist/lib/sessions/client.js +48 -0
  119. package/dist/lib/sessions/outsideSessions.js +54 -0
  120. package/dist/lib/sse_framing.js +48 -0
  121. package/dist/lib/telemetry/config_renderer.js +175 -0
  122. package/dist/lib/telemetry/health_report.js +173 -0
  123. package/dist/lib/telemetry/provider_paths.js +38 -0
  124. package/dist/lib/telemetry/redaction_policy.js +90 -0
  125. package/dist/lib/telemetry/reload.js +84 -0
  126. package/dist/lib/workspace_context.js +121 -0
  127. package/dist/spec_schema.json +422 -0
  128. package/dist/wire/auth.js +1 -0
  129. package/dist/wire/sync-paths.js +25 -0
  130. package/dist/wire/telemetry.js +1 -0
  131. package/package.json +49 -0
@@ -0,0 +1,422 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/nurixlabs/NuStack/dev/packages/contracts/spec/schema.json",
4
+ "title": "nustack.service.json",
5
+ "description": "Manifest grammar v1 for an NuStack repo. Declares repo identity plus one or more service entries.",
6
+ "type": "object",
7
+ "required": ["spec", "name", "description", "repository", "services"],
8
+ "not": { "required": ["nustackApp", "nustackWorkspace"] },
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "$schema": { "type": "string" },
12
+ "spec": {
13
+ "type": "string",
14
+ "enum": ["nustack.dev/v1"],
15
+ "description": "Grammar version. Bump on breaking changes."
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "pattern": "^[a-z][a-z0-9-]*$",
20
+ "description": "Repo slug, globally unique."
21
+ },
22
+ "description": { "type": "string", "minLength": 1 },
23
+ "repository": { "type": "string", "format": "uri" },
24
+ "homepage": { "type": "string", "format": "uri" },
25
+ "owner": { "type": "string" },
26
+ "tags": { "type": "array", "items": { "type": "string" } },
27
+ "services": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": { "$ref": "#/definitions/service" }
31
+ },
32
+ "nustackApp": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["appId", "workspaceId"],
36
+ "description": "The v1 App binding, still accepted from a manifest written before AD-025. `workspaceId` here is the TENANT. Additive — services[]/consumes[] are never replaced by it.",
37
+ "properties": {
38
+ "appId": { "type": "string", "minLength": 1 },
39
+ "workspaceId": { "type": "string", "minLength": 1 }
40
+ }
41
+ },
42
+ "nustackWorkspace": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["v", "workspaceId", "organizationId"],
46
+ "description": "The v2 Workspace binding the CLI writes (AD-025). `workspaceId` here is the WORKSPACE, not the tenant — `v` is what tells the two apart from nustackApp's identically named key. A manifest carrying both blocks is refused.",
47
+ "properties": {
48
+ "v": { "const": 2 },
49
+ "workspaceId": { "type": "string", "minLength": 1 },
50
+ "organizationId": { "type": "string", "minLength": 1 }
51
+ }
52
+ },
53
+ "toolkit": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["name", "version"],
57
+ "description": "Toolkit identity, pairing with .nustack/app.json's toolkit name/version (F-026).",
58
+ "properties": {
59
+ "name": { "type": "string", "minLength": 1 },
60
+ "version": { "type": "string", "minLength": 1 }
61
+ }
62
+ }
63
+ },
64
+
65
+ "definitions": {
66
+ "service": {
67
+ "type": "object",
68
+ "required": ["name", "kind", "type", "description"],
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "name": {
72
+ "type": "string",
73
+ "pattern": "^[a-z][a-z0-9-]*(/[a-z0-9-]+)*$",
74
+ "description": "Service slug, globally unique across NuStack. May be namespaced with '/' when a repo ships a family of sibling services (e.g. acme-suite/billing)."
75
+ },
76
+ "kind": {
77
+ "type": "string",
78
+ "enum": ["library", "service", "worker", "application", "documentation", "infra"],
79
+ "description": "Structural discriminator — selects the required sub-block (npm/http/mcp/worker/application/vault/infra)."
80
+ },
81
+ "type": {
82
+ "type": "string",
83
+ "enum": ["app", "service", "platform-service", "sdk", "library", "tool"],
84
+ "description": "Catalogue taxonomy — how the registry classifies the service, orthogonal to kind."
85
+ },
86
+ "version": { "type": "string" },
87
+ "description": { "type": "string", "minLength": 1 },
88
+ "status": {
89
+ "type": "string",
90
+ "enum": ["active", "experimental", "deprecated", "planned"],
91
+ "default": "active"
92
+ },
93
+ "owner": { "type": "string" },
94
+ "tags": { "type": "array", "items": { "type": "string" } },
95
+ "tier": {
96
+ "type": "string",
97
+ "enum": ["primitive", "composite"],
98
+ "description": "Service-only attribute. Primitives are infra-close; composites wrap primitives."
99
+ },
100
+ "environmentKey": {
101
+ "type": "string",
102
+ "enum": ["dev", "production"],
103
+ "description": "The dev/production value axis (F-034). Omitted means dev semantics at seed time."
104
+ },
105
+ "hosting": {
106
+ "type": "string",
107
+ "enum": ["cloudflare", "remote", "external"],
108
+ "description": "Where the service runs. Required on kind: service. cloudflare = a Worker on the platform account that reads the shared api-keys registry directly; remote = ours, hosted elsewhere, verifying keys through the auth service; external = a third-party vendor the platform brokers a credential for."
109
+ },
110
+ "tenancy": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["bucket"],
114
+ "description": "Declares that the service holds a top-level container per consumer and implements the fixed bucket contract (POST/DELETE /nustack/buckets). Never on hosting: external.",
115
+ "properties": {
116
+ "bucket": { "type": "string", "minLength": 1, "description": "The service's own noun for its container: application, knowledge-base, tenant, app." }
117
+ }
118
+ },
119
+
120
+ "npm": { "$ref": "#/definitions/npm" },
121
+ "http": { "$ref": "#/definitions/http" },
122
+ "mcp": { "$ref": "#/definitions/mcp" },
123
+ "worker": { "$ref": "#/definitions/worker" },
124
+ "application": { "$ref": "#/definitions/application" },
125
+ "vault": { "$ref": "#/definitions/vault" },
126
+ "infra": { "$ref": "#/definitions/infra" },
127
+
128
+ "consumes": { "$ref": "#/definitions/consumes" },
129
+ "aiSurface": { "$ref": "#/definitions/aiSurface" },
130
+ "auth": { "$ref": "#/definitions/auth" },
131
+ "env": { "$ref": "#/definitions/env" }
132
+ },
133
+
134
+ "allOf": [
135
+ {
136
+ "if": { "properties": { "kind": { "const": "library" } }, "required": ["kind"] },
137
+ "then": { "required": ["npm"] }
138
+ },
139
+ {
140
+ "if": { "properties": { "kind": { "const": "service" } }, "required": ["kind"] },
141
+ "then": {
142
+ "anyOf": [
143
+ { "required": ["http"] },
144
+ { "required": ["mcp"] }
145
+ ]
146
+ }
147
+ },
148
+ {
149
+ "if": { "properties": { "kind": { "const": "worker" } }, "required": ["kind"] },
150
+ "then": { "required": ["worker"] }
151
+ },
152
+ {
153
+ "if": { "properties": { "kind": { "const": "application" } }, "required": ["kind"] },
154
+ "then": { "required": ["application"] }
155
+ },
156
+ {
157
+ "if": { "properties": { "kind": { "const": "documentation" } }, "required": ["kind"] },
158
+ "then": { "required": ["vault"] }
159
+ },
160
+ {
161
+ "if": { "properties": { "kind": { "const": "infra" } }, "required": ["kind"] },
162
+ "then": { "required": ["infra"] }
163
+ },
164
+ {
165
+ "if": {
166
+ "properties": { "kind": { "not": { "const": "service" } } },
167
+ "required": ["kind"]
168
+ },
169
+ "then": { "not": { "required": ["tier"] } }
170
+ },
171
+ {
172
+ "if": { "properties": { "kind": { "const": "service" } }, "required": ["kind"] },
173
+ "then": { "required": ["hosting"] }
174
+ },
175
+ {
176
+ "if": { "properties": { "hosting": { "const": "external" } }, "required": ["hosting"] },
177
+ "then": { "not": { "required": ["tenancy"] } }
178
+ }
179
+ ]
180
+ },
181
+
182
+ "npm": {
183
+ "type": "object",
184
+ "required": ["package"],
185
+ "additionalProperties": false,
186
+ "properties": {
187
+ "package": { "type": "string", "pattern": "^(@[a-z0-9-]+/)?[a-z0-9-]+$" },
188
+ "registry": { "type": "string", "format": "uri" },
189
+ "access": { "type": "string", "enum": ["public", "restricted"] },
190
+ "subpaths": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "object",
194
+ "required": ["path"],
195
+ "properties": {
196
+ "path": { "type": "string" },
197
+ "summary": { "type": "string" }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
+
204
+ "http": {
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "dependencies": { "instances": ["endpoints"] },
208
+ "properties": {
209
+ "endpoints": {
210
+ "type": "object",
211
+ "additionalProperties": { "type": "string", "format": "uri" }
212
+ },
213
+ "instances": {
214
+ "type": "array",
215
+ "minItems": 1,
216
+ "description": "Every deployment of this service the platform may bind a workspace to, one entry per deployment per plane. Omitted, the service has one deployment at endpoints.production on both planes. Requires endpoints beside it.",
217
+ "items": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "required": ["slug", "environment", "url"],
221
+ "properties": {
222
+ "slug": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
223
+ "environment": { "type": "string", "enum": ["dev", "production"] },
224
+ "url": { "type": "string", "format": "uri" },
225
+ "default": { "type": "boolean", "description": "The deployment a new workspace binds to on this plane. Exactly one per plane." }
226
+ }
227
+ }
228
+ },
229
+ "wellKnown": { "type": "string" },
230
+ "openapi": { "type": "string" },
231
+ "oidc": { "type": "string" },
232
+ "health": { "type": "string" }
233
+ }
234
+ },
235
+
236
+ "mcp": {
237
+ "type": "object",
238
+ "required": ["servers"],
239
+ "additionalProperties": false,
240
+ "properties": {
241
+ "servers": {
242
+ "type": "array",
243
+ "minItems": 1,
244
+ "items": {
245
+ "type": "object",
246
+ "required": ["name", "url"],
247
+ "additionalProperties": false,
248
+ "properties": {
249
+ "name": { "type": "string" },
250
+ "url": { "type": "string", "format": "uri" },
251
+ "transport": { "type": "string", "enum": ["sse", "stdio", "http"] },
252
+ "summary": { "type": "string" }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ },
258
+
259
+ "worker": {
260
+ "type": "object",
261
+ "required": ["engine"],
262
+ "additionalProperties": false,
263
+ "properties": {
264
+ "engine": { "type": "string", "enum": ["temporal", "restate", "inngest", "custom"] },
265
+ "taskQueue": { "type": "string" },
266
+ "activities": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "required": ["name"],
271
+ "additionalProperties": false,
272
+ "properties": {
273
+ "name": { "type": "string" },
274
+ "calls": { "type": "string" },
275
+ "via": { "type": "string", "enum": ["http", "mcp"] },
276
+ "idempotent": { "type": "boolean" },
277
+ "summary": { "type": "string" }
278
+ }
279
+ }
280
+ },
281
+ "workflows": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "object",
285
+ "required": ["name"],
286
+ "additionalProperties": false,
287
+ "properties": {
288
+ "name": { "type": "string" },
289
+ "summary": { "type": "string" }
290
+ }
291
+ }
292
+ }
293
+ }
294
+ },
295
+
296
+ "application": {
297
+ "type": "object",
298
+ "required": ["ui"],
299
+ "additionalProperties": false,
300
+ "properties": {
301
+ "ui": { "type": "string", "enum": ["spa", "ssr", "static"] },
302
+ "entryRoute": { "type": "string" }
303
+ }
304
+ },
305
+
306
+ "vault": {
307
+ "type": "object",
308
+ "required": ["type"],
309
+ "additionalProperties": false,
310
+ "properties": {
311
+ "type": { "type": "string", "enum": ["obsidian", "site"] },
312
+ "path": { "type": "string" },
313
+ "entry": { "type": "string" },
314
+ "url": { "type": "string", "format": "uri" }
315
+ }
316
+ },
317
+
318
+ "infra": {
319
+ "type": "object",
320
+ "additionalProperties": false,
321
+ "properties": {
322
+ "compose": { "type": "string" },
323
+ "components": {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "object",
327
+ "required": ["name"],
328
+ "properties": {
329
+ "name": { "type": "string" },
330
+ "url": { "type": "string", "format": "uri" },
331
+ "summary": { "type": "string" }
332
+ }
333
+ }
334
+ },
335
+ "targets": {
336
+ "type": "array",
337
+ "items": {
338
+ "type": "object",
339
+ "required": ["name"],
340
+ "properties": {
341
+ "name": { "type": "string" },
342
+ "platform": { "type": "string" },
343
+ "namespace": { "type": "string" },
344
+ "summary": { "type": "string" }
345
+ }
346
+ }
347
+ },
348
+ "discoveryUrl": { "type": "string" }
349
+ }
350
+ },
351
+
352
+ "consumes": {
353
+ "type": "array",
354
+ "items": {
355
+ "type": "object",
356
+ "required": ["service", "via"],
357
+ "additionalProperties": false,
358
+ "properties": {
359
+ "service": { "type": "string" },
360
+ "via": { "type": "string", "enum": ["npm", "http", "mcp", "worker"] },
361
+ "subpath": { "type": "string" },
362
+ "endpoint": { "type": "string" }
363
+ }
364
+ }
365
+ },
366
+
367
+ "aiSurface": {
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "properties": {
371
+ "promptHints": { "type": "string" },
372
+ "intents": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "object",
376
+ "required": ["id", "summary", "via"],
377
+ "additionalProperties": false,
378
+ "properties": {
379
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
380
+ "summary": { "type": "string" },
381
+ "inputs": { "type": "object" },
382
+ "outputs": { "type": "object" },
383
+ "via": {
384
+ "type": "object",
385
+ "required": ["transport"],
386
+ "properties": {
387
+ "transport": { "type": "string", "enum": ["http", "mcp", "npm", "cli"] },
388
+ "method": { "type": "string" },
389
+ "path": { "type": "string" },
390
+ "tool": { "type": "string" },
391
+ "command": { "type": "string" }
392
+ }
393
+ },
394
+ "auth": { "type": "string" },
395
+ "idempotent": { "type": "boolean" },
396
+ "sideEffects": { "type": "string", "enum": ["none", "read", "write", "external"] }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ },
402
+
403
+ "auth": {
404
+ "type": "object",
405
+ "additionalProperties": false,
406
+ "properties": {
407
+ "type": { "type": "string", "enum": ["none", "jwt", "oauth2", "apiKey", "platformKey"], "description": "platformKey = an opaque key minted by the auth service into the shared api-keys registry." },
408
+ "issuer": { "type": "string", "format": "uri" },
409
+ "audience": { "type": "string" }
410
+ }
411
+ },
412
+
413
+ "env": {
414
+ "type": "object",
415
+ "additionalProperties": false,
416
+ "properties": {
417
+ "required": { "type": "array", "items": { "type": "string" } },
418
+ "optional": { "type": "array", "items": { "type": "string" } }
419
+ }
420
+ }
421
+ }
422
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ export const FIXTURE_ENTRIES = [
2
+ { pattern: "docs/architecture/domain-model.md", kind: "exact", direction: "bidirectional" },
3
+ { pattern: "docs/memory/**", kind: "glob", direction: "bidirectional" },
4
+ { pattern: "docs/features/*.md", kind: "glob", direction: "bidirectional" },
5
+ ];
6
+ export const PATH_FIXTURE_CORPUS = [
7
+ { path: "docs/architecture/domain-model.md", outcome: "allow", note: "exact entry" },
8
+ { path: "docs/memory/session-1.md", outcome: "allow", note: "glob ** one level" },
9
+ { path: "docs/memory/a/b/c.md", outcome: "allow", note: "glob ** deep" },
10
+ { path: "docs/features/auth.md", outcome: "allow", note: "single-segment * glob" },
11
+ { path: "docs/features/nested/auth.md", outcome: "deny_unlisted", note: "* does not cross a segment" },
12
+ { path: "docs/architecture/other.md", outcome: "deny_unlisted", note: "unlisted sibling of an exact entry" },
13
+ { path: "README.md", outcome: "deny_unlisted", note: "top-level unlisted" },
14
+ { path: ".env", outcome: "protected", note: "protected env file" },
15
+ { path: ".env.local", outcome: "protected", note: "protected env variant" },
16
+ { path: "config/.env", outcome: "protected", note: "protected env file in a subdirectory" },
17
+ { path: ".git/config", outcome: "protected", note: "protected .git tree" },
18
+ { path: ".nustack/recovery/bundle.json", outcome: "protected", note: "protected recovery bundle" },
19
+ { path: "../escape.md", outcome: "invalid", note: "traversal segment" },
20
+ { path: "/etc/passwd", outcome: "invalid", note: "absolute path" },
21
+ { path: "C:/win.md", outcome: "invalid", note: "drive-qualified" },
22
+ { path: "docs\\memory\\x.md", outcome: "invalid", note: "backslash separator" },
23
+ { path: "docs//memory.md", outcome: "invalid", note: "empty segment" },
24
+ { path: "docs/memory/\u0000.md", outcome: "invalid", note: "NUL byte" },
25
+ ];
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@nurix/nustack",
3
+ "version": "0.10.0-dev.10",
4
+ "description": "The nustack CLI — bootstrap NuStack services into a repo via the NuStack discovery plane.",
5
+ "type": "module",
6
+ "private": false,
7
+ "license": "UNLICENSED",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/nurixlabs/NuStack.git",
11
+ "directory": "packages/cli"
12
+ },
13
+ "bin": {
14
+ "nustack": "dist/index.js"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "engines": {
20
+ "node": ">=22.13.0"
21
+ },
22
+ "dependencies": {
23
+ "@clack/prompts": "^0.11.0",
24
+ "ajv": "^8.17.1",
25
+ "ajv-formats": "^3.0.1",
26
+ "commander": "^14.0.0"
27
+ },
28
+ "optionalDependencies": {
29
+ "@nurix/codegraph": "0.2.1"
30
+ },
31
+ "devDependencies": {
32
+ "@ngneat/falso": "^8.0.2",
33
+ "@types/node": "^22.19.20",
34
+ "typescript": "^5.7.2",
35
+ "vitest": "^4.1.11",
36
+ "@nurix/nustack.studio": "0.0.0",
37
+ "@nurix/nustack.ui": "0.0.0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "scripts": {
43
+ "build": "tsc && node scripts/copy_schema.mjs",
44
+ "dev": "tsc --watch",
45
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.tests.json",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest"
48
+ }
49
+ }