Skip to content

Commit 11f945e

Browse files
Copilothotlong
andcommitted
Complete Phase 1: Protocol consolidation with successful tests and build
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent d718d18 commit 11f945e

13 files changed

Lines changed: 300 additions & 246 deletions

content/docs/references/system/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ This section contains all protocol schemas for the system layer of ObjectStack.
2323
<Card href="./events" title="Events" description="Source: packages/spec/src/system/events.zod.ts" />
2424
<Card href="./feature" title="Feature" description="Source: packages/spec/src/system/feature.zod.ts" />
2525
<Card href="./job" title="Job" description="Source: packages/spec/src/system/job.zod.ts" />
26-
<Card href="./logger" title="Logger" description="Source: packages/spec/src/system/logger.zod.ts" />
2726
<Card href="./logging" title="Logging" description="Source: packages/spec/src/system/logging.zod.ts" />
2827
<Card href="./manifest" title="Manifest" description="Source: packages/spec/src/system/manifest.zod.ts" />
2928
<Card href="./masking" title="Masking" description="Source: packages/spec/src/system/masking.zod.ts" />
@@ -33,7 +32,6 @@ This section contains all protocol schemas for the system layer of ObjectStack.
3332
<Card href="./object-storage" title="Object Storage" description="Source: packages/spec/src/system/object-storage.zod.ts" />
3433
<Card href="./plugin" title="Plugin" description="Source: packages/spec/src/system/plugin.zod.ts" />
3534
<Card href="./plugin-capability" title="Plugin Capability" description="Source: packages/spec/src/system/plugin-capability.zod.ts" />
36-
<Card href="./scoped-storage" title="Scoped Storage" description="Source: packages/spec/src/system/scoped-storage.zod.ts" />
3735
<Card href="./search-engine" title="Search Engine" description="Source: packages/spec/src/system/search-engine.zod.ts" />
3836
<Card href="./tracing" title="Tracing" description="Source: packages/spec/src/system/tracing.zod.ts" />
3937
<Card href="./translation" title="Translation" description="Source: packages/spec/src/system/translation.zod.ts" />

content/docs/references/system/logger.mdx

Lines changed: 0 additions & 80 deletions
This file was deleted.

content/docs/references/system/logging.mdx

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ description: Logging protocol schemas
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { ConsoleDestinationConfigSchema, ExtendedLogLevelSchema, ExternalServiceDestinationConfigSchema, FileDestinationConfigSchema, HttpDestinationConfigSchema, LogDestinationSchema, LogDestinationTypeSchema, LogEnrichmentConfigSchema, LoggingConfigSchema, StructuredLogEntrySchema } from '@objectstack/spec/system';
16-
import type { ConsoleDestinationConfig, ExtendedLogLevel, ExternalServiceDestinationConfig, FileDestinationConfig, HttpDestinationConfig, LogDestination, LogDestinationType, LogEnrichmentConfig, LoggingConfig, StructuredLogEntry } from '@objectstack/spec/system';
15+
import { ConsoleDestinationConfigSchema, ExtendedLogLevelSchema, ExternalServiceDestinationConfigSchema, FileDestinationConfigSchema, HttpDestinationConfigSchema, LogDestinationSchema, LogDestinationTypeSchema, LogEnrichmentConfigSchema, LogEntrySchema, LogFormatSchema, LogLevelSchema, LoggerConfigSchema, LoggingConfigSchema, StructuredLogEntrySchema } from '@objectstack/spec/system';
16+
import type { ConsoleDestinationConfig, ExtendedLogLevel, ExternalServiceDestinationConfig, FileDestinationConfig, HttpDestinationConfig, LogDestination, LogDestinationType, LogEnrichmentConfig, LogEntry, LogFormat, LogLevel, LoggerConfig, LoggingConfig, StructuredLogEntry } from '@objectstack/spec/system';
1717

1818
// Validate data
1919
const result = ConsoleDestinationConfigSchema.parse(data);
@@ -164,6 +164,66 @@ Log enrichment configuration
164164

165165
---
166166

167+
## LogEntry
168+
169+
### Properties
170+
171+
| Property | Type | Required | Description |
172+
| :--- | :--- | :--- | :--- |
173+
| **timestamp** | `string` || ISO 8601 timestamp |
174+
| **level** | `Enum<'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'>` || Log severity level |
175+
| **message** | `string` || Log message |
176+
| **context** | `Record<string, any>` | optional | Structured context data |
177+
| **error** | `Record<string, any>` | optional | Error object if present |
178+
| **traceId** | `string` | optional | Distributed trace ID |
179+
| **spanId** | `string` | optional | Span ID |
180+
| **service** | `string` | optional | Service name |
181+
| **component** | `string` | optional | Component name (e.g. plugin id) |
182+
183+
---
184+
185+
## LogFormat
186+
187+
Log output format
188+
189+
### Allowed Values
190+
191+
* `json`
192+
* `text`
193+
* `pretty`
194+
195+
---
196+
197+
## LogLevel
198+
199+
Log severity level
200+
201+
### Allowed Values
202+
203+
* `debug`
204+
* `info`
205+
* `warn`
206+
* `error`
207+
* `fatal`
208+
209+
---
210+
211+
## LoggerConfig
212+
213+
### Properties
214+
215+
| Property | Type | Required | Description |
216+
| :--- | :--- | :--- | :--- |
217+
| **name** | `string` | optional | Logger name identifier |
218+
| **level** | `Enum<'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'>` | optional | Log severity level |
219+
| **format** | `Enum<'json' \| 'text' \| 'pretty'>` | optional | Log output format |
220+
| **redact** | `string[]` | optional | Keys to redact from log context |
221+
| **sourceLocation** | `boolean` | optional | Include file and line number |
222+
| **file** | `string` | optional | Path to log file |
223+
| **rotation** | `object` | optional | |
224+
225+
---
226+
167227
## LoggingConfig
168228

169229
Logging configuration
@@ -176,6 +236,8 @@ Logging configuration
176236
| **label** | `string` || Display label |
177237
| **enabled** | `boolean` | optional | |
178238
| **level** | `Enum<'trace' \| 'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'>` | optional | Extended log severity level |
239+
| **default** | `object` | optional | Default logger configuration |
240+
| **loggers** | `Record<string, object>` | optional | Named logger configurations |
179241
| **destinations** | `object[]` || Log destinations |
180242
| **enrichment** | `object` | optional | Log enrichment configuration |
181243
| **redact** | `string[]` | optional | Fields to redact |

content/docs/references/system/meta.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"events",
1717
"feature",
1818
"job",
19-
"logger",
2019
"logging",
2120
"manifest",
2221
"masking",
@@ -26,7 +25,6 @@
2625
"object-storage",
2726
"plugin",
2827
"plugin-capability",
29-
"scoped-storage",
3028
"search-engine",
3129
"tracing",
3230
"translation"

content/docs/references/system/object-storage.mdx

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ description: Object Storage protocol schemas
1212
## TypeScript Usage
1313

1414
```typescript
15-
import { AccessControlConfigSchema, BucketConfigSchema, LifecycleActionSchema, LifecyclePolicyConfigSchema, LifecyclePolicyRuleSchema, MultipartUploadConfigSchema, ObjectMetadataSchema, ObjectStorageConfigSchema, PresignedUrlConfigSchema, StorageAclSchema, StorageClassSchema, StorageConnectionSchema, StorageProviderSchema } from '@objectstack/spec/system';
16-
import type { AccessControlConfig, BucketConfig, LifecycleAction, LifecyclePolicyConfig, LifecyclePolicyRule, MultipartUploadConfig, ObjectMetadata, ObjectStorageConfig, PresignedUrlConfig, StorageAcl, StorageClass, StorageConnection, StorageProvider } from '@objectstack/spec/system';
15+
import { AccessControlConfigSchema, BucketConfigSchema, FileMetadataSchema, LifecycleActionSchema, LifecyclePolicyConfigSchema, LifecyclePolicyRuleSchema, MultipartUploadConfigSchema, ObjectMetadataSchema, ObjectStorageConfigSchema, PresignedUrlConfigSchema, StorageAclSchema, StorageClassSchema, StorageConnectionSchema, StorageProviderSchema, StorageScopeSchema } from '@objectstack/spec/system';
16+
import type { AccessControlConfig, BucketConfig, FileMetadata, LifecycleAction, LifecyclePolicyConfig, LifecyclePolicyRule, MultipartUploadConfig, ObjectMetadata, ObjectStorageConfig, PresignedUrlConfig, StorageAcl, StorageClass, StorageConnection, StorageProvider, StorageScope } from '@objectstack/spec/system';
1717

1818
// Validate data
1919
const result = AccessControlConfigSchema.parse(data);
@@ -64,6 +64,22 @@ const result = AccessControlConfigSchema.parse(data);
6464

6565
---
6666

67+
## FileMetadata
68+
69+
### Properties
70+
71+
| Property | Type | Required | Description |
72+
| :--- | :--- | :--- | :--- |
73+
| **path** | `string` || File path |
74+
| **name** | `string` || File name |
75+
| **size** | `integer` || File size in bytes |
76+
| **mimeType** | `string` || MIME type |
77+
| **lastModified** | `string` || Last modified timestamp |
78+
| **created** | `string` || Creation timestamp |
79+
| **etag** | `string` | optional | Entity tag |
80+
81+
---
82+
6783
## LifecycleAction
6884

6985
Lifecycle policy action type
@@ -149,9 +165,13 @@ Lifecycle policy action type
149165
| **name** | `string` || Storage configuration identifier |
150166
| **label** | `string` || Display label |
151167
| **provider** | `Enum<'s3' \| 'azure_blob' \| 'gcs' \| 'minio' \| 'r2' \| 'spaces' \| 'wasabi' \| 'backblaze' \| 'local'>` || Primary storage provider |
168+
| **scope** | `Enum<'global' \| 'tenant' \| 'user' \| 'session' \| 'temp' \| 'cache' \| 'data' \| 'logs' \| 'config' \| 'public'>` | optional | Storage scope |
152169
| **connection** | `object` || Connection credentials |
153170
| **buckets** | `object[]` | optional | Configured buckets |
154171
| **defaultBucket** | `string` | optional | Default bucket name for operations |
172+
| **location** | `string` | optional | Root path (local) or base location |
173+
| **quota** | `integer` | optional | Max size in bytes |
174+
| **options** | `Record<string, any>` | optional | Provider-specific configuration options |
155175
| **enabled** | `boolean` | optional | Enable this storage configuration |
156176
| **description** | `string` | optional | Configuration description |
157177

@@ -238,3 +258,22 @@ Storage provider type
238258
* `backblaze`
239259
* `local`
240260

261+
---
262+
263+
## StorageScope
264+
265+
Storage scope classification
266+
267+
### Allowed Values
268+
269+
* `global`
270+
* `tenant`
271+
* `user`
272+
* `session`
273+
* `temp`
274+
* `cache`
275+
* `data`
276+
* `logs`
277+
* `config`
278+
* `public`
279+

content/docs/references/system/scoped-storage.mdx

Lines changed: 0 additions & 79 deletions
This file was deleted.

packages/spec/json-schema/system/FileMetadata.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,34 @@
55
"type": "object",
66
"properties": {
77
"path": {
8-
"type": "string"
8+
"type": "string",
9+
"description": "File path"
910
},
1011
"name": {
11-
"type": "string"
12+
"type": "string",
13+
"description": "File name"
1214
},
1315
"size": {
14-
"type": "integer"
16+
"type": "integer",
17+
"description": "File size in bytes"
1518
},
1619
"mimeType": {
17-
"type": "string"
20+
"type": "string",
21+
"description": "MIME type"
1822
},
1923
"lastModified": {
2024
"type": "string",
21-
"format": "date-time"
25+
"format": "date-time",
26+
"description": "Last modified timestamp"
2227
},
2328
"created": {
2429
"type": "string",
25-
"format": "date-time"
30+
"format": "date-time",
31+
"description": "Creation timestamp"
2632
},
2733
"etag": {
28-
"type": "string"
34+
"type": "string",
35+
"description": "Entity tag"
2936
}
3037
},
3138
"required": [

0 commit comments

Comments
 (0)