@bsb/registry 1.1.1 → 1.1.5

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.
@@ -3,326 +3,324 @@
3
3
  * DO NOT EDIT - Regenerated on every build
4
4
  * @version 1.0.0
5
5
  */
6
- import { ServiceClient, bsb, optional } from "@bsb/base";
7
- import { createReturnableEvent, createEventSchemas } from "@bsb/base";
6
+ import { ServiceClient, bsb, optional, createReturnableEvent, createEventSchemas } from "@bsb/base";
8
7
  const _registryPluginPublishSchema = bsb.object({
9
- org: bsb.string({ min: 1, max: 100, description: "Organization name" }),
10
- name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
11
- version: bsb.string({ min: 1, max: 50, description: "Semantic version" }),
12
- language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
13
- metadata: bsb.object({
14
- displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
15
- description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
16
- category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
17
- tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
18
- author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
19
- name: bsb.string({ max: 200, description: "Author name" }),
20
- email: optional(bsb.string({ max: 200, description: "Author email" })),
21
- url: optional(bsb.uri("Author homepage"))
22
- }, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
23
- license: optional(bsb.string({ max: 50 })),
24
- homepage: optional(bsb.uri()),
25
- repository: optional(bsb.uri())
26
- }, "Plugin metadata"),
27
- eventSchema: bsb.unknown("EventSchemaExport object (parsed at HTTP boundary, transported as object)"),
28
- capabilities: optional(bsb.unknown("Plugin capabilities object (parsed at HTTP boundary, optional top-level override)")),
29
- configSchema: optional(bsb.unknown("Configuration JSON Schema object (parsed at HTTP boundary)")),
30
- typeDefinitions: optional(bsb.object({
31
- nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
32
- csharp: optional(bsb.string({ description: "C# interface definitions" })),
33
- go: optional(bsb.string({ description: "Go type definitions" })),
34
- java: optional(bsb.string({ description: "Java interface definitions" }))
35
- }, "Language-specific type definitions")),
36
- documentation: bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" }),
37
- dependencies: optional(bsb.array(bsb.object({
38
- id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
39
- version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
40
- }, "Plugin dependency declaration"), { description: "Plugin dependencies" })),
41
- package: optional(bsb.object({
42
- nodejs: optional(bsb.string({ description: "NPM package name" })),
43
- csharp: optional(bsb.string({ description: "NuGet package name" })),
44
- go: optional(bsb.string({ description: "Go module path" })),
45
- java: optional(bsb.string({ description: "Maven coordinates" })),
46
- python: optional(bsb.string({ description: "PyPI package name" }))
47
- }, "Language-specific package information")),
48
- runtime: optional(bsb.object({
49
- nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
50
- dotnet: optional(bsb.string({ description: ".NET version requirement" })),
51
- go: optional(bsb.string({ description: "Go version requirement" })),
52
- java: optional(bsb.string({ description: "Java version requirement" })),
53
- python: optional(bsb.string({ description: "Python version requirement" }))
54
- }, "Runtime version requirements")),
55
- visibility: optional(bsb.enum(["public", "private"], "Visibility level (default: public)")),
56
- publishedBy: optional(bsb.string({ max: 200, description: "User ID of the publisher (set by HTTP layer)" }))
57
- }, "Request body for publishing a plugin");
8
+ "org": bsb.string({ min: 1, max: 100 }),
9
+ "name": bsb.string({ min: 1, max: 100 }),
10
+ "version": bsb.string({ min: 1, max: 50 }),
11
+ "language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
12
+ "metadata": bsb.object({
13
+ "displayName": bsb.string({ min: 1, max: 200 }),
14
+ "description": bsb.string({ min: 1, max: 1000 }),
15
+ "category": bsb.enum(["service", "observable", "events", "config"]),
16
+ "tags": bsb.array(bsb.string({ max: 50 })),
17
+ "author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
18
+ "name": bsb.string({ max: 200 }),
19
+ "email": optional(bsb.string({ max: 200 })),
20
+ "url": optional(bsb.uri())
21
+ })])),
22
+ "license": optional(bsb.string({ max: 50 })),
23
+ "homepage": optional(bsb.uri()),
24
+ "repository": optional(bsb.string())
25
+ }),
26
+ "eventSchema": bsb.unknown(),
27
+ "capabilities": optional(bsb.unknown()),
28
+ "configSchema": optional(bsb.unknown()),
29
+ "typeDefinitions": optional(bsb.object({
30
+ "nodejs": optional(bsb.string()),
31
+ "csharp": optional(bsb.string()),
32
+ "go": optional(bsb.string()),
33
+ "java": optional(bsb.string())
34
+ })),
35
+ "documentation": bsb.array(bsb.string(), { min: 1 }),
36
+ "dependencies": optional(bsb.array(bsb.object({
37
+ "id": bsb.string({ min: 1, max: 200 }),
38
+ "version": bsb.string({ min: 1, max: 50 })
39
+ }))),
40
+ "package": optional(bsb.object({
41
+ "nodejs": optional(bsb.string()),
42
+ "csharp": optional(bsb.string()),
43
+ "go": optional(bsb.string()),
44
+ "java": optional(bsb.string()),
45
+ "python": optional(bsb.string())
46
+ })),
47
+ "runtime": optional(bsb.object({
48
+ "nodejs": optional(bsb.string()),
49
+ "dotnet": optional(bsb.string()),
50
+ "go": optional(bsb.string()),
51
+ "java": optional(bsb.string()),
52
+ "python": optional(bsb.string())
53
+ })),
54
+ "visibility": optional(bsb.enum(["public", "private"])),
55
+ "publishedBy": optional(bsb.string({ max: 200 }))
56
+ });
58
57
  const _registryPluginPublishOutputSchema = bsb.object({
59
- success: bsb.boolean("Operation success status"),
60
- pluginId: bsb.string({ description: "Full plugin ID (org/name)" }),
61
- version: bsb.string({ description: "Published version" }),
62
- message: optional(bsb.string({ description: "Success or error message" }))
63
- }, "Response for publish operation");
58
+ "success": bsb.boolean(),
59
+ "pluginId": bsb.string(),
60
+ "version": bsb.string(),
61
+ "message": optional(bsb.string())
62
+ });
64
63
  const _registryPluginGetSchema = bsb.object({
65
- org: bsb.string({ description: "Organization name" }),
66
- name: bsb.string({ description: "Plugin name" }),
67
- version: optional(bsb.string({ description: "Version (defaults to latest)" }))
64
+ "org": bsb.string(),
65
+ "name": bsb.string(),
66
+ "version": optional(bsb.string())
68
67
  });
69
68
  const _registryPluginGetOutputSchema = bsb.object({
70
- id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
71
- org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
72
- name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
73
- displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
74
- description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
75
- version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
76
- majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
77
- language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
78
- package: optional(bsb.object({
79
- nodejs: optional(bsb.string({ description: "NPM package name" })),
80
- csharp: optional(bsb.string({ description: "NuGet package name" })),
81
- go: optional(bsb.string({ description: "Go module path" })),
82
- java: optional(bsb.string({ description: "Maven coordinates" })),
83
- python: optional(bsb.string({ description: "PyPI package name" }))
84
- }, "Language-specific package information")),
85
- category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
86
- tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
87
- author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
88
- name: bsb.string({ max: 200, description: "Author name" }),
89
- email: optional(bsb.string({ max: 200, description: "Author email" })),
90
- url: optional(bsb.uri("Author homepage"))
91
- }, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
92
- license: optional(bsb.string({ max: 50, description: "License identifier" })),
93
- homepage: optional(bsb.uri("Documentation URL")),
94
- repository: optional(bsb.uri("Source repository URL")),
95
- visibility: bsb.enum(["public", "private"], "Visibility level"),
96
- eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
97
- capabilities: optional(bsb.unknown("Plugin capabilities object")),
98
- configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
99
- typeDefinitions: optional(bsb.object({
100
- nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
101
- csharp: optional(bsb.string({ description: "C# interface definitions" })),
102
- go: optional(bsb.string({ description: "Go type definitions" })),
103
- java: optional(bsb.string({ description: "Java interface definitions" }))
104
- }, "Language-specific type definitions")),
105
- documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
106
- dependencies: optional(bsb.array(bsb.object({
107
- id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
108
- version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
109
- }, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
110
- permissions: optional(bsb.array(bsb.object({
111
- userId: bsb.uuid("User ID"),
112
- permission: bsb.enum(["read", "write"], "Resource-level permission")
113
- }, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
114
- eventCount: bsb.int32({ description: "Total event count" }),
115
- emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
116
- onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
117
- returnableEventCount: bsb.int32({ description: "Returnable events" }),
118
- broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
119
- publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
120
- publishedAt: bsb.datetime("First publish timestamp"),
121
- updatedAt: bsb.datetime("Last update timestamp"),
122
- downloads: optional(bsb.int32({ description: "Download count" })),
123
- runtime: optional(bsb.object({
124
- nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
125
- dotnet: optional(bsb.string({ description: ".NET version requirement" })),
126
- go: optional(bsb.string({ description: "Go version requirement" })),
127
- java: optional(bsb.string({ description: "Java version requirement" })),
128
- python: optional(bsb.string({ description: "Python version requirement" }))
129
- }, "Runtime version requirements"))
130
- }, "Registry entry for a plugin");
69
+ "id": bsb.string({ min: 1, max: 200 }),
70
+ "org": bsb.string({ min: 1, max: 100 }),
71
+ "name": bsb.string({ min: 1, max: 100 }),
72
+ "displayName": bsb.string({ min: 1, max: 200 }),
73
+ "description": bsb.string({ min: 1, max: 1000 }),
74
+ "version": bsb.string({ min: 1, max: 50 }),
75
+ "majorMinor": bsb.string({ min: 1, max: 20 }),
76
+ "language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
77
+ "package": optional(bsb.object({
78
+ "nodejs": optional(bsb.string()),
79
+ "csharp": optional(bsb.string()),
80
+ "go": optional(bsb.string()),
81
+ "java": optional(bsb.string()),
82
+ "python": optional(bsb.string())
83
+ })),
84
+ "category": bsb.enum(["service", "observable", "events", "config"]),
85
+ "tags": bsb.array(bsb.string({ max: 50 })),
86
+ "author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
87
+ "name": bsb.string({ max: 200 }),
88
+ "email": optional(bsb.string({ max: 200 })),
89
+ "url": optional(bsb.uri())
90
+ })])),
91
+ "license": optional(bsb.string({ max: 50 })),
92
+ "homepage": optional(bsb.uri()),
93
+ "repository": optional(bsb.string()),
94
+ "visibility": bsb.enum(["public", "private"]),
95
+ "eventSchema": bsb.unknown(),
96
+ "capabilities": optional(bsb.unknown()),
97
+ "configSchema": optional(bsb.unknown()),
98
+ "typeDefinitions": optional(bsb.object({
99
+ "nodejs": optional(bsb.string()),
100
+ "csharp": optional(bsb.string()),
101
+ "go": optional(bsb.string()),
102
+ "java": optional(bsb.string())
103
+ })),
104
+ "documentation": optional(bsb.array(bsb.string(), { min: 1 })),
105
+ "dependencies": optional(bsb.array(bsb.object({
106
+ "id": bsb.string({ min: 1, max: 200 }),
107
+ "version": bsb.string({ min: 1, max: 50 })
108
+ }))),
109
+ "permissions": optional(bsb.array(bsb.object({
110
+ "userId": bsb.uuid(),
111
+ "permission": bsb.enum(["read", "write"])
112
+ }))),
113
+ "eventCount": bsb.int32({ min: 0 }),
114
+ "emitEventCount": bsb.int32({ min: 0 }),
115
+ "onEventCount": bsb.int32({ min: 0 }),
116
+ "returnableEventCount": bsb.int32({ min: 0 }),
117
+ "broadcastEventCount": bsb.int32({ min: 0 }),
118
+ "publishedBy": bsb.string({ max: 200 }),
119
+ "publishedAt": bsb.datetime(),
120
+ "updatedAt": bsb.datetime(),
121
+ "downloads": optional(bsb.int32({ min: 0 })),
122
+ "runtime": optional(bsb.object({
123
+ "nodejs": optional(bsb.string()),
124
+ "dotnet": optional(bsb.string()),
125
+ "go": optional(bsb.string()),
126
+ "java": optional(bsb.string()),
127
+ "python": optional(bsb.string())
128
+ }))
129
+ });
131
130
  const _registryPluginListSchema = bsb.object({
132
- org: optional(bsb.string({ max: 100, description: "Filter by organization" })),
133
- language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Filter by language")),
134
- category: optional(bsb.enum(["service", "observable", "events", "config"], "Filter by category")),
135
- limit: optional(bsb.int32({ description: "Results per page (default: 50)" })),
136
- offset: optional(bsb.int32({ description: "Pagination offset (default: 0)" }))
137
- }, "Query parameters for listing plugins");
131
+ "org": optional(bsb.string({ max: 100 })),
132
+ "language": optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"])),
133
+ "category": optional(bsb.enum(["service", "observable", "events", "config"])),
134
+ "limit": optional(bsb.int32({ min: 1, max: 100 })),
135
+ "offset": optional(bsb.int32({ min: 0 }))
136
+ });
138
137
  const _registryPluginListOutputSchema = bsb.object({
139
- results: bsb.array(bsb.object({
140
- id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
141
- org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
142
- name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
143
- displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
144
- description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
145
- version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
146
- majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
147
- language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
148
- package: optional(bsb.object({
149
- nodejs: optional(bsb.string({ description: "NPM package name" })),
150
- csharp: optional(bsb.string({ description: "NuGet package name" })),
151
- go: optional(bsb.string({ description: "Go module path" })),
152
- java: optional(bsb.string({ description: "Maven coordinates" })),
153
- python: optional(bsb.string({ description: "PyPI package name" }))
154
- }, "Language-specific package information")),
155
- category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
156
- tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
157
- author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
158
- name: bsb.string({ max: 200, description: "Author name" }),
159
- email: optional(bsb.string({ max: 200, description: "Author email" })),
160
- url: optional(bsb.uri("Author homepage"))
161
- }, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
162
- license: optional(bsb.string({ max: 50, description: "License identifier" })),
163
- homepage: optional(bsb.uri("Documentation URL")),
164
- repository: optional(bsb.uri("Source repository URL")),
165
- visibility: bsb.enum(["public", "private"], "Visibility level"),
166
- eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
167
- capabilities: optional(bsb.unknown("Plugin capabilities object")),
168
- configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
169
- typeDefinitions: optional(bsb.object({
170
- nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
171
- csharp: optional(bsb.string({ description: "C# interface definitions" })),
172
- go: optional(bsb.string({ description: "Go type definitions" })),
173
- java: optional(bsb.string({ description: "Java interface definitions" }))
174
- }, "Language-specific type definitions")),
175
- documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
176
- dependencies: optional(bsb.array(bsb.object({
177
- id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
178
- version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
179
- }, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
180
- permissions: optional(bsb.array(bsb.object({
181
- userId: bsb.uuid("User ID"),
182
- permission: bsb.enum(["read", "write"], "Resource-level permission")
183
- }, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
184
- eventCount: bsb.int32({ description: "Total event count" }),
185
- emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
186
- onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
187
- returnableEventCount: bsb.int32({ description: "Returnable events" }),
188
- broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
189
- publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
190
- publishedAt: bsb.datetime("First publish timestamp"),
191
- updatedAt: bsb.datetime("Last update timestamp"),
192
- downloads: optional(bsb.int32({ description: "Download count" })),
193
- runtime: optional(bsb.object({
194
- nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
195
- dotnet: optional(bsb.string({ description: ".NET version requirement" })),
196
- go: optional(bsb.string({ description: "Go version requirement" })),
197
- java: optional(bsb.string({ description: "Java version requirement" })),
198
- python: optional(bsb.string({ description: "Python version requirement" }))
199
- }, "Runtime version requirements"))
200
- }, "Registry entry for a plugin"), { description: "Plugin list" }),
201
- total: bsb.int32({ description: "Total count" }),
202
- page: bsb.int32({ description: "Current page number" })
203
- }, "List results response");
138
+ "results": bsb.array(bsb.object({
139
+ "id": bsb.string({ min: 1, max: 200 }),
140
+ "org": bsb.string({ min: 1, max: 100 }),
141
+ "name": bsb.string({ min: 1, max: 100 }),
142
+ "displayName": bsb.string({ min: 1, max: 200 }),
143
+ "description": bsb.string({ min: 1, max: 1000 }),
144
+ "version": bsb.string({ min: 1, max: 50 }),
145
+ "majorMinor": bsb.string({ min: 1, max: 20 }),
146
+ "language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
147
+ "package": optional(bsb.object({
148
+ "nodejs": optional(bsb.string()),
149
+ "csharp": optional(bsb.string()),
150
+ "go": optional(bsb.string()),
151
+ "java": optional(bsb.string()),
152
+ "python": optional(bsb.string())
153
+ })),
154
+ "category": bsb.enum(["service", "observable", "events", "config"]),
155
+ "tags": bsb.array(bsb.string({ max: 50 })),
156
+ "author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
157
+ "name": bsb.string({ max: 200 }),
158
+ "email": optional(bsb.string({ max: 200 })),
159
+ "url": optional(bsb.uri())
160
+ })])),
161
+ "license": optional(bsb.string({ max: 50 })),
162
+ "homepage": optional(bsb.uri()),
163
+ "repository": optional(bsb.string()),
164
+ "visibility": bsb.enum(["public", "private"]),
165
+ "eventSchema": bsb.unknown(),
166
+ "capabilities": optional(bsb.unknown()),
167
+ "configSchema": optional(bsb.unknown()),
168
+ "typeDefinitions": optional(bsb.object({
169
+ "nodejs": optional(bsb.string()),
170
+ "csharp": optional(bsb.string()),
171
+ "go": optional(bsb.string()),
172
+ "java": optional(bsb.string())
173
+ })),
174
+ "documentation": optional(bsb.array(bsb.string(), { min: 1 })),
175
+ "dependencies": optional(bsb.array(bsb.object({
176
+ "id": bsb.string({ min: 1, max: 200 }),
177
+ "version": bsb.string({ min: 1, max: 50 })
178
+ }))),
179
+ "permissions": optional(bsb.array(bsb.object({
180
+ "userId": bsb.uuid(),
181
+ "permission": bsb.enum(["read", "write"])
182
+ }))),
183
+ "eventCount": bsb.int32({ min: 0 }),
184
+ "emitEventCount": bsb.int32({ min: 0 }),
185
+ "onEventCount": bsb.int32({ min: 0 }),
186
+ "returnableEventCount": bsb.int32({ min: 0 }),
187
+ "broadcastEventCount": bsb.int32({ min: 0 }),
188
+ "publishedBy": bsb.string({ max: 200 }),
189
+ "publishedAt": bsb.datetime(),
190
+ "updatedAt": bsb.datetime(),
191
+ "downloads": optional(bsb.int32({ min: 0 })),
192
+ "runtime": optional(bsb.object({
193
+ "nodejs": optional(bsb.string()),
194
+ "dotnet": optional(bsb.string()),
195
+ "go": optional(bsb.string()),
196
+ "java": optional(bsb.string()),
197
+ "python": optional(bsb.string())
198
+ }))
199
+ })),
200
+ "total": bsb.int32({ min: 0 }),
201
+ "page": bsb.int32({ min: 1 })
202
+ });
204
203
  const _registryPluginSearchSchema = bsb.object({
205
- query: bsb.string({ min: 1, max: 200, description: "Search query string" }),
206
- language: optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Filter by language")),
207
- category: optional(bsb.enum(["service", "observable", "events", "config"], "Filter by category")),
208
- limit: optional(bsb.int32({ description: "Results per page (default: 20)" })),
209
- offset: optional(bsb.int32({ description: "Pagination offset (default: 0)" }))
210
- }, "Query parameters for searching plugins");
204
+ "query": bsb.string({ min: 1, max: 200 }),
205
+ "language": optional(bsb.enum(["nodejs", "csharp", "go", "java", "python"])),
206
+ "category": optional(bsb.enum(["service", "observable", "events", "config"])),
207
+ "limit": optional(bsb.int32({ min: 1, max: 100 })),
208
+ "offset": optional(bsb.int32({ min: 0 }))
209
+ });
211
210
  const _registryPluginSearchOutputSchema = bsb.object({
212
- results: bsb.array(bsb.object({
213
- id: bsb.string({ min: 1, max: 200, description: "Full ID: org/plugin-name" }),
214
- org: bsb.string({ min: 1, max: 100, description: "Organization or user name" }),
215
- name: bsb.string({ min: 1, max: 100, description: "Plugin name" }),
216
- displayName: bsb.string({ min: 1, max: 200, description: "Human-readable name" }),
217
- description: bsb.string({ min: 1, max: 1000, description: "Short description" }),
218
- version: bsb.string({ min: 1, max: 50, description: "Semantic version (1.0.0)" }),
219
- majorMinor: bsb.string({ min: 1, max: 20, description: "Major.minor only (1.0)" }),
220
- language: bsb.enum(["nodejs", "csharp", "go", "java", "python"], "Programming language"),
221
- package: optional(bsb.object({
222
- nodejs: optional(bsb.string({ description: "NPM package name" })),
223
- csharp: optional(bsb.string({ description: "NuGet package name" })),
224
- go: optional(bsb.string({ description: "Go module path" })),
225
- java: optional(bsb.string({ description: "Maven coordinates" })),
226
- python: optional(bsb.string({ description: "PyPI package name" }))
227
- }, "Language-specific package information")),
228
- category: bsb.enum(["service", "observable", "events", "config"], "Plugin category"),
229
- tags: bsb.array(bsb.string({ max: 50 }), { description: "Searchable keywords" }),
230
- author: optional(bsb.union([bsb.string({ max: 200, description: "Author name as a string" }), bsb.object({
231
- name: bsb.string({ max: 200, description: "Author name" }),
232
- email: optional(bsb.string({ max: 200, description: "Author email" })),
233
- url: optional(bsb.uri("Author homepage"))
234
- }, "Author as an object (npm-style)")], "Author - either a string or { name, email?, url? }")),
235
- license: optional(bsb.string({ max: 50, description: "License identifier" })),
236
- homepage: optional(bsb.uri("Documentation URL")),
237
- repository: optional(bsb.uri("Source repository URL")),
238
- visibility: bsb.enum(["public", "private"], "Visibility level"),
239
- eventSchema: bsb.unknown("Events map (Record<eventName, EventExportEntry>)"),
240
- capabilities: optional(bsb.unknown("Plugin capabilities object")),
241
- configSchema: optional(bsb.unknown("Configuration JSON Schema object")),
242
- typeDefinitions: optional(bsb.object({
243
- nodejs: optional(bsb.string({ description: "TypeScript .d.ts definitions" })),
244
- csharp: optional(bsb.string({ description: "C# interface definitions" })),
245
- go: optional(bsb.string({ description: "Go type definitions" })),
246
- java: optional(bsb.string({ description: "Java interface definitions" }))
247
- }, "Language-specific type definitions")),
248
- documentation: optional(bsb.array(bsb.string({ description: "Markdown file content (title extracted from first # heading)" }), { min: 1, description: "Array of markdown documentation files (at least 1 required)" })),
249
- dependencies: optional(bsb.array(bsb.object({
250
- id: bsb.string({ min: 1, max: 200, description: "Plugin ID (org/name or just name for _ org)" }),
251
- version: bsb.string({ min: 1, max: 50, description: "Semver range constraint (e.g. ^1.0.0, ~2.1, >=3.0.0)" })
252
- }, "Plugin dependency declaration"), { description: "Plugins this plugin depends on" })),
253
- permissions: optional(bsb.array(bsb.object({
254
- userId: bsb.uuid("User ID"),
255
- permission: bsb.enum(["read", "write"], "Resource-level permission")
256
- }, "Per-package permission entry (overrides org-level)"), { description: "Per-package user permissions" })),
257
- eventCount: bsb.int32({ description: "Total event count" }),
258
- emitEventCount: bsb.int32({ description: "Fire-and-forget emit events" }),
259
- onEventCount: bsb.int32({ description: "Fire-and-forget on events" }),
260
- returnableEventCount: bsb.int32({ description: "Returnable events" }),
261
- broadcastEventCount: bsb.int32({ description: "Broadcast events" }),
262
- publishedBy: bsb.string({ max: 200, description: "User ID who published" }),
263
- publishedAt: bsb.datetime("First publish timestamp"),
264
- updatedAt: bsb.datetime("Last update timestamp"),
265
- downloads: optional(bsb.int32({ description: "Download count" })),
266
- runtime: optional(bsb.object({
267
- nodejs: optional(bsb.string({ description: "Node.js version requirement" })),
268
- dotnet: optional(bsb.string({ description: ".NET version requirement" })),
269
- go: optional(bsb.string({ description: "Go version requirement" })),
270
- java: optional(bsb.string({ description: "Java version requirement" })),
271
- python: optional(bsb.string({ description: "Python version requirement" }))
272
- }, "Runtime version requirements"))
273
- }, "Registry entry for a plugin"), { description: "Matching plugins" }),
274
- total: bsb.int32({ description: "Total result count" }),
275
- query: bsb.string({ description: "Search query used" })
276
- }, "Search results response");
211
+ "results": bsb.array(bsb.object({
212
+ "id": bsb.string({ min: 1, max: 200 }),
213
+ "org": bsb.string({ min: 1, max: 100 }),
214
+ "name": bsb.string({ min: 1, max: 100 }),
215
+ "displayName": bsb.string({ min: 1, max: 200 }),
216
+ "description": bsb.string({ min: 1, max: 1000 }),
217
+ "version": bsb.string({ min: 1, max: 50 }),
218
+ "majorMinor": bsb.string({ min: 1, max: 20 }),
219
+ "language": bsb.enum(["nodejs", "csharp", "go", "java", "python"]),
220
+ "package": optional(bsb.object({
221
+ "nodejs": optional(bsb.string()),
222
+ "csharp": optional(bsb.string()),
223
+ "go": optional(bsb.string()),
224
+ "java": optional(bsb.string()),
225
+ "python": optional(bsb.string())
226
+ })),
227
+ "category": bsb.enum(["service", "observable", "events", "config"]),
228
+ "tags": bsb.array(bsb.string({ max: 50 })),
229
+ "author": optional(bsb.union([bsb.string({ max: 200 }), bsb.object({
230
+ "name": bsb.string({ max: 200 }),
231
+ "email": optional(bsb.string({ max: 200 })),
232
+ "url": optional(bsb.uri())
233
+ })])),
234
+ "license": optional(bsb.string({ max: 50 })),
235
+ "homepage": optional(bsb.uri()),
236
+ "repository": optional(bsb.string()),
237
+ "visibility": bsb.enum(["public", "private"]),
238
+ "eventSchema": bsb.unknown(),
239
+ "capabilities": optional(bsb.unknown()),
240
+ "configSchema": optional(bsb.unknown()),
241
+ "typeDefinitions": optional(bsb.object({
242
+ "nodejs": optional(bsb.string()),
243
+ "csharp": optional(bsb.string()),
244
+ "go": optional(bsb.string()),
245
+ "java": optional(bsb.string())
246
+ })),
247
+ "documentation": optional(bsb.array(bsb.string(), { min: 1 })),
248
+ "dependencies": optional(bsb.array(bsb.object({
249
+ "id": bsb.string({ min: 1, max: 200 }),
250
+ "version": bsb.string({ min: 1, max: 50 })
251
+ }))),
252
+ "permissions": optional(bsb.array(bsb.object({
253
+ "userId": bsb.uuid(),
254
+ "permission": bsb.enum(["read", "write"])
255
+ }))),
256
+ "eventCount": bsb.int32({ min: 0 }),
257
+ "emitEventCount": bsb.int32({ min: 0 }),
258
+ "onEventCount": bsb.int32({ min: 0 }),
259
+ "returnableEventCount": bsb.int32({ min: 0 }),
260
+ "broadcastEventCount": bsb.int32({ min: 0 }),
261
+ "publishedBy": bsb.string({ max: 200 }),
262
+ "publishedAt": bsb.datetime(),
263
+ "updatedAt": bsb.datetime(),
264
+ "downloads": optional(bsb.int32({ min: 0 })),
265
+ "runtime": optional(bsb.object({
266
+ "nodejs": optional(bsb.string()),
267
+ "dotnet": optional(bsb.string()),
268
+ "go": optional(bsb.string()),
269
+ "java": optional(bsb.string()),
270
+ "python": optional(bsb.string())
271
+ }))
272
+ })),
273
+ "total": bsb.int32({ min: 0 }),
274
+ "query": bsb.string()
275
+ });
277
276
  const _registryPluginDeleteSchema = bsb.object({
278
- org: bsb.string({ description: "Organization name" }),
279
- name: bsb.string({ description: "Plugin name" }),
280
- version: optional(bsb.string({ description: "Version (or all if not provided)" }))
277
+ "org": bsb.string(),
278
+ "name": bsb.string(),
279
+ "version": optional(bsb.string())
281
280
  });
282
281
  const _registryPluginDeleteOutputSchema = bsb.object({
283
- success: bsb.boolean("Success status"),
284
- deleted: bsb.int32({ description: "Number of versions deleted" })
282
+ "success": bsb.boolean(),
283
+ "deleted": bsb.int32({ min: 0 })
285
284
  });
286
285
  const _registryPluginVersionsSchema = bsb.object({
287
- org: bsb.string({ description: "Organization name" }),
288
- name: bsb.string({ description: "Plugin name" }),
289
- majorMinor: optional(bsb.string({ description: "Filter by major.minor" }))
286
+ "org": bsb.string(),
287
+ "name": bsb.string(),
288
+ "majorMinor": optional(bsb.string())
290
289
  });
291
290
  const _registryPluginVersionsOutputSchema = bsb.object({
292
- versions: bsb.array(bsb.object({
293
- version: bsb.string({ description: "Full semantic version" }),
294
- majorMinor: bsb.string({ description: "Major.minor version" }),
295
- publishedAt: bsb.datetime("Publication timestamp")
296
- }, "Version information"), { description: "All available versions" }),
297
- latest: bsb.string({ description: "Latest version" }),
298
- latestForMajorMinor: bsb.string({ description: "JSON map of major.minor to latest patch" })
299
- }, "Version list response");
300
- const _registryStatsGetSchema = bsb.object({}, '');
291
+ "versions": bsb.array(bsb.object({
292
+ "version": bsb.string(),
293
+ "majorMinor": bsb.string(),
294
+ "publishedAt": bsb.datetime()
295
+ })),
296
+ "latest": bsb.string(),
297
+ "latestForMajorMinor": bsb.string()
298
+ });
299
+ const _registryStatsGetSchema = bsb.object({});
301
300
  const _registryStatsGetOutputSchema = bsb.object({
302
- totalPlugins: bsb.int32({ description: "Total plugin count" }),
303
- byLanguage: bsb.string({ description: "JSON map of language to count" }),
304
- byCategory: bsb.string({ description: "JSON map of category to count" }),
305
- totalDownloads: bsb.int32({ description: "Total downloads across all plugins" })
306
- }, "Registry statistics");
301
+ "totalPlugins": bsb.int32({ min: 0 }),
302
+ "byLanguage": bsb.string(),
303
+ "byCategory": bsb.string(),
304
+ "totalDownloads": bsb.int32({ min: 0 })
305
+ });
307
306
  const _registryAuthLoginSchema = bsb.object({
308
- username: bsb.string({ description: "Username" }),
309
- password: bsb.string({ description: "Encrypted password" })
307
+ "username": bsb.string(),
308
+ "password": bsb.string()
310
309
  });
311
310
  const _registryAuthLoginOutputSchema = bsb.object({
312
- success: bsb.boolean("Login success"),
313
- token: optional(bsb.string({ description: "Auth token" })),
314
- expiresAt: optional(bsb.datetime("Expiration")),
315
- message: optional(bsb.string({ description: "Error message" }))
311
+ "success": bsb.boolean(),
312
+ "token": optional(bsb.string()),
313
+ "expiresAt": optional(bsb.datetime()),
314
+ "message": optional(bsb.string())
316
315
  });
317
316
  const _registryAuthVerifySchema = bsb.object({
318
- token: bsb.string({ description: "Token to verify" })
317
+ "token": bsb.string()
319
318
  });
320
319
  const _registryAuthVerifyOutputSchema = bsb.object({
321
- valid: bsb.boolean("Token validity"),
322
- userId: optional(bsb.string({ description: "User ID" })),
323
- permissions: optional(bsb.array(bsb.string()))
320
+ "valid": bsb.boolean(),
321
+ "userId": optional(bsb.string()),
322
+ "permissions": optional(bsb.array(bsb.string()))
324
323
  });
325
- // --- Event Schemas (typed, follows ServiceClientEventSchemas flip) ---
326
324
  const _EventSchemas = createEventSchemas({
327
325
  onReturnableEvents: {
328
326
  'registry.plugin.publish': createReturnableEvent(_registryPluginPublishSchema, _registryPluginPublishOutputSchema, "Publish a new plugin or version"),
@@ -336,14 +334,12 @@ const _EventSchemas = createEventSchemas({
336
334
  'registry.auth.verify': createReturnableEvent(_registryAuthVerifySchema, _registryAuthVerifyOutputSchema, "Verify authentication token"),
337
335
  },
338
336
  });
339
- // --- Internal: Plugin reference for ServiceClient wiring ---
340
337
  const _PLUGIN_CLIENT = {
341
338
  name: "service-bsb-registry",
342
339
  };
343
340
  class _PluginRef {
344
341
  static PLUGIN_CLIENT = _PLUGIN_CLIENT;
345
342
  }
346
- // --- Exported Client ---
347
343
  export default class BsbRegistryClient extends ServiceClient {
348
344
  constructor(context) {
349
345
  super(_PluginRef, context);