Skip to content

Commit abc8a6d

Browse files
Copilothotlong
andcommitted
Add plugin capability and registry protocol specifications
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 9f950bd commit abc8a6d

30 files changed

Lines changed: 4295 additions & 0 deletions

content/docs/references/hub/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This section contains all protocol schemas for the hub layer of ObjectStack.
1111
<Card href="./composer" title="Composer" description="Source: packages/spec/src/hub/composer.zod.ts" />
1212
<Card href="./license" title="License" description="Source: packages/spec/src/hub/license.zod.ts" />
1313
<Card href="./marketplace" title="Marketplace" description="Source: packages/spec/src/hub/marketplace.zod.ts" />
14+
<Card href="./plugin-registry" title="Plugin Registry" description="Source: packages/spec/src/hub/plugin-registry.zod.ts" />
1415
<Card href="./space" title="Space" description="Source: packages/spec/src/hub/space.zod.ts" />
1516
<Card href="./tenant" title="Tenant" description="Source: packages/spec/src/hub/tenant.zod.ts" />
1617
</Cards>

content/docs/references/hub/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"composer",
55
"license",
66
"marketplace",
7+
"plugin-registry",
78
"space",
89
"tenant"
910
]
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: Plugin Registry
3+
description: Plugin Registry protocol schemas
4+
---
5+
6+
# Plugin Registry
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/hub/plugin-registry.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { PluginInstallConfigSchema, PluginQualityMetricsSchema, PluginRegistryEntrySchema, PluginSearchFiltersSchema, PluginStatisticsSchema, PluginVendorSchema } from '@objectstack/spec/hub';
16+
import type { PluginInstallConfig, PluginQualityMetrics, PluginRegistryEntry, PluginSearchFilters, PluginStatistics, PluginVendor } from '@objectstack/spec/hub';
17+
18+
// Validate data
19+
const result = PluginInstallConfigSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## PluginInstallConfig
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **pluginId** | `string` || |
31+
| **version** | `string` | optional | Defaults to latest |
32+
| **config** | `Record<string, any>` | optional | |
33+
| **autoUpdate** | `boolean` | optional | |
34+
| **options** | `object` | optional | |
35+
36+
---
37+
38+
## PluginQualityMetrics
39+
40+
### Properties
41+
42+
| Property | Type | Required | Description |
43+
| :--- | :--- | :--- | :--- |
44+
| **testCoverage** | `number` | optional | |
45+
| **documentationScore** | `number` | optional | |
46+
| **codeQuality** | `number` | optional | |
47+
| **securityScan** | `object` | optional | |
48+
| **conformanceTests** | `object[]` | optional | |
49+
50+
---
51+
52+
## PluginRegistryEntry
53+
54+
### Properties
55+
56+
| Property | Type | Required | Description |
57+
| :--- | :--- | :--- | :--- |
58+
| **id** | `string` || Plugin identifier (reverse domain notation) |
59+
| **version** | `string` || |
60+
| **name** | `string` || |
61+
| **description** | `string` | optional | |
62+
| **readme** | `string` | optional | |
63+
| **category** | `Enum<'data' \| 'integration' \| 'ui' \| 'analytics' \| 'security' \| 'automation' \| 'ai' \| 'utility' \| 'driver' \| 'gateway' \| 'adapter'>` | optional | |
64+
| **tags** | `string[]` | optional | |
65+
| **vendor** | `object` || |
66+
| **capabilities** | `object` | optional | |
67+
| **compatibility** | `object` | optional | |
68+
| **links** | `object` | optional | |
69+
| **media** | `object` | optional | |
70+
| **quality** | `object` | optional | |
71+
| **statistics** | `object` | optional | |
72+
| **license** | `string` | optional | SPDX license identifier |
73+
| **pricing** | `object` | optional | |
74+
| **publishedAt** | `string` | optional | |
75+
| **updatedAt** | `string` | optional | |
76+
| **deprecated** | `boolean` | optional | |
77+
| **deprecationMessage** | `string` | optional | |
78+
| **replacedBy** | `string` | optional | Plugin ID that replaces this one |
79+
| **flags** | `object` | optional | |
80+
81+
---
82+
83+
## PluginSearchFilters
84+
85+
### Properties
86+
87+
| Property | Type | Required | Description |
88+
| :--- | :--- | :--- | :--- |
89+
| **query** | `string` | optional | |
90+
| **category** | `string[]` | optional | |
91+
| **tags** | `string[]` | optional | |
92+
| **trustLevel** | `Enum<'official' \| 'verified' \| 'community' \| 'unverified'>[]` | optional | |
93+
| **implementsProtocols** | `string[]` | optional | |
94+
| **pricingModel** | `Enum<'free' \| 'freemium' \| 'paid' \| 'enterprise'>[]` | optional | |
95+
| **minRating** | `number` | optional | |
96+
| **sortBy** | `Enum<'relevance' \| 'downloads' \| 'rating' \| 'updated' \| 'name'>` | optional | |
97+
| **sortOrder** | `Enum<'asc' \| 'desc'>` | optional | |
98+
| **page** | `integer` | optional | |
99+
| **limit** | `integer` | optional | |
100+
101+
---
102+
103+
## PluginStatistics
104+
105+
### Properties
106+
107+
| Property | Type | Required | Description |
108+
| :--- | :--- | :--- | :--- |
109+
| **downloads** | `integer` | optional | |
110+
| **downloadsLastMonth** | `integer` | optional | |
111+
| **activeInstallations** | `integer` | optional | |
112+
| **ratings** | `object` | optional | |
113+
| **stars** | `integer` | optional | |
114+
| **dependents** | `integer` | optional | |
115+
116+
---
117+
118+
## PluginVendor
119+
120+
### Properties
121+
122+
| Property | Type | Required | Description |
123+
| :--- | :--- | :--- | :--- |
124+
| **id** | `string` || Vendor identifier (reverse domain) |
125+
| **name** | `string` || |
126+
| **website** | `string` | optional | |
127+
| **email** | `string` | optional | |
128+
| **verified** | `boolean` | optional | Whether vendor is verified by ObjectStack |
129+
| **trustLevel** | `Enum<'official' \| 'verified' \| 'community' \| 'unverified'>` | optional | |
130+

content/docs/references/system/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This section contains all protocol schemas for the system layer of ObjectStack.
1919
<Card href="./logger" title="Logger" description="Source: packages/spec/src/system/logger.zod.ts" />
2020
<Card href="./manifest" title="Manifest" description="Source: packages/spec/src/system/manifest.zod.ts" />
2121
<Card href="./plugin" title="Plugin" description="Source: packages/spec/src/system/plugin.zod.ts" />
22+
<Card href="./plugin-capability" title="Plugin Capability" description="Source: packages/spec/src/system/plugin-capability.zod.ts" />
2223
<Card href="./scoped-storage" title="Scoped Storage" description="Source: packages/spec/src/system/scoped-storage.zod.ts" />
2324
<Card href="./translation" title="Translation" description="Source: packages/spec/src/system/translation.zod.ts" />
2425
</Cards>

content/docs/references/system/manifest.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ const result = ManifestSchema.parse(data);
3939
| **configuration** | `object` | optional | Plugin configuration settings |
4040
| **contributes** | `object` | optional | Platform contributions |
4141
| **data** | `object[]` | optional | Initial seed data |
42+
| **capabilities** | `object` | optional | Plugin capability declarations for interoperability |
4243
| **extensions** | `Record<string, any>` | optional | Extension points and contributions |
4344

content/docs/references/system/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"logger",
1313
"manifest",
1414
"plugin",
15+
"plugin-capability",
1516
"scoped-storage",
1617
"translation"
1718
]
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
title: Plugin Capability
3+
description: Plugin Capability protocol schemas
4+
---
5+
6+
# Plugin Capability
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/system/plugin-capability.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { CapabilityConformanceLevelSchema, ExtensionPointSchema, PluginCapabilitySchema, PluginCapabilityManifestSchema, PluginDependencySchema, PluginInterfaceSchema, ProtocolFeatureSchema, ProtocolReferenceSchema, ProtocolVersionSchema } from '@objectstack/spec/system';
16+
import type { CapabilityConformanceLevel, ExtensionPoint, PluginCapability, PluginCapabilityManifest, PluginDependency, PluginInterface, ProtocolFeature, ProtocolReference, ProtocolVersion } from '@objectstack/spec/system';
17+
18+
// Validate data
19+
const result = CapabilityConformanceLevelSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## CapabilityConformanceLevel
25+
26+
Level of protocol conformance
27+
28+
### Allowed Values
29+
30+
* `full`
31+
* `partial`
32+
* `experimental`
33+
* `deprecated`
34+
35+
---
36+
37+
## ExtensionPoint
38+
39+
### Properties
40+
41+
| Property | Type | Required | Description |
42+
| :--- | :--- | :--- | :--- |
43+
| **id** | `string` || Unique extension point identifier |
44+
| **name** | `string` || |
45+
| **description** | `string` | optional | |
46+
| **type** | `Enum<'action' \| 'hook' \| 'widget' \| 'provider' \| 'transformer' \| 'validator' \| 'decorator'>` || |
47+
| **contract** | `object` | optional | |
48+
| **cardinality** | `Enum<'single' \| 'multiple'>` | optional | Whether multiple extensions can register to this point |
49+
50+
---
51+
52+
## PluginCapability
53+
54+
### Properties
55+
56+
| Property | Type | Required | Description |
57+
| :--- | :--- | :--- | :--- |
58+
| **protocol** | `object` || |
59+
| **conformance** | `Enum<'full' \| 'partial' \| 'experimental' \| 'deprecated'>` | optional | Level of protocol conformance |
60+
| **implementedFeatures** | `string[]` | optional | List of implemented feature names |
61+
| **features** | `object[]` | optional | |
62+
| **metadata** | `Record<string, any>` | optional | |
63+
| **certified** | `boolean` | optional | Has passed official conformance tests |
64+
| **certificationDate** | `string` | optional | |
65+
66+
---
67+
68+
## PluginCapabilityManifest
69+
70+
### Properties
71+
72+
| Property | Type | Required | Description |
73+
| :--- | :--- | :--- | :--- |
74+
| **implements** | `object[]` | optional | List of protocols this plugin conforms to |
75+
| **provides** | `object[]` | optional | Services/APIs this plugin offers to others |
76+
| **requires** | `object[]` | optional | Required plugins and their capabilities |
77+
| **extensionPoints** | `object[]` | optional | Points where other plugins can extend this plugin |
78+
| **extensions** | `object[]` | optional | Extensions contributed to other plugins |
79+
80+
---
81+
82+
## PluginDependency
83+
84+
### Properties
85+
86+
| Property | Type | Required | Description |
87+
| :--- | :--- | :--- | :--- |
88+
| **pluginId** | `string` || Required plugin identifier |
89+
| **version** | `string` || Semantic version constraint |
90+
| **optional** | `boolean` | optional | |
91+
| **reason** | `string` | optional | |
92+
| **requiredCapabilities** | `string[]` | optional | Protocol IDs the dependency must support |
93+
94+
---
95+
96+
## PluginInterface
97+
98+
### Properties
99+
100+
| Property | Type | Required | Description |
101+
| :--- | :--- | :--- | :--- |
102+
| **id** | `string` || Unique interface identifier |
103+
| **name** | `string` || |
104+
| **description** | `string` | optional | |
105+
| **version** | `object` || Semantic version of the protocol |
106+
| **methods** | `object[]` || |
107+
| **events** | `object[]` | optional | |
108+
| **stability** | `Enum<'stable' \| 'beta' \| 'alpha' \| 'experimental'>` | optional | |
109+
110+
---
111+
112+
## ProtocolFeature
113+
114+
### Properties
115+
116+
| Property | Type | Required | Description |
117+
| :--- | :--- | :--- | :--- |
118+
| **name** | `string` || Feature identifier within the protocol |
119+
| **enabled** | `boolean` | optional | |
120+
| **description** | `string` | optional | |
121+
| **sinceVersion** | `string` | optional | Version when this feature was added |
122+
| **deprecatedSince** | `string` | optional | Version when deprecated |
123+
124+
---
125+
126+
## ProtocolReference
127+
128+
### Properties
129+
130+
| Property | Type | Required | Description |
131+
| :--- | :--- | :--- | :--- |
132+
| **id** | `string` || Unique protocol identifier (e.g., com.objectstack.protocol.storage.v1) |
133+
| **label** | `string` || |
134+
| **version** | `object` || Semantic version of the protocol |
135+
| **specification** | `string` | optional | URL or path to protocol specification |
136+
| **description** | `string` | optional | |
137+
138+
---
139+
140+
## ProtocolVersion
141+
142+
Semantic version of the protocol
143+
144+
### Properties
145+
146+
| Property | Type | Required | Description |
147+
| :--- | :--- | :--- | :--- |
148+
| **major** | `integer` || |
149+
| **minor** | `integer` || |
150+
| **patch** | `integer` || |
151+

0 commit comments

Comments
 (0)