Add examples scaffolding for 9 protocol categories#161
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds missing metadata-examples scaffolding packages for nine protocol categories so each follows the same examples layout already used by Data/UI.
Changes:
- Created
examples/{category}/metadata-examples/packages for Automation, Auth, Permission, AI, API, Driver, Hub, Kernel, and System. - Added per-package
README.md,package.json,tsconfig.json, andsrc/index.tsbarrel exports. - Added placeholder
*.examples.tsfiles per protocol sub-area (TODO stubs).
Reviewed changes
Copilot reviewed 78 out of 78 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/automation/metadata-examples/README.md | Automation examples package documentation scaffold |
| examples/automation/metadata-examples/package.json | Automation examples package metadata |
| examples/automation/metadata-examples/tsconfig.json | Automation examples TS build config |
| examples/automation/metadata-examples/src/index.ts | Automation examples barrel exports |
| examples/automation/metadata-examples/src/flow.examples.ts | Placeholder Flow example stub |
| examples/automation/metadata-examples/src/workflow.examples.ts | Placeholder Workflow example stub |
| examples/automation/metadata-examples/src/webhook.examples.ts | Placeholder Webhook example stub |
| examples/auth/metadata-examples/README.md | Auth examples package documentation scaffold |
| examples/auth/metadata-examples/package.json | Auth examples package metadata |
| examples/auth/metadata-examples/tsconfig.json | Auth examples TS build config |
| examples/auth/metadata-examples/src/index.ts | Auth examples barrel exports |
| examples/auth/metadata-examples/src/config.examples.ts | Placeholder Auth Config example stub |
| examples/auth/metadata-examples/src/identity.examples.ts | Placeholder Identity example stub |
| examples/auth/metadata-examples/src/organization.examples.ts | Placeholder Organization example stub |
| examples/auth/metadata-examples/src/policy.examples.ts | Placeholder Policy example stub |
| examples/auth/metadata-examples/src/role.examples.ts | Placeholder Role example stub |
| examples/permission/metadata-examples/README.md | Permission examples package documentation scaffold |
| examples/permission/metadata-examples/package.json | Permission examples package metadata |
| examples/permission/metadata-examples/tsconfig.json | Permission examples TS build config |
| examples/permission/metadata-examples/src/index.ts | Permission examples barrel exports |
| examples/permission/metadata-examples/src/permission.examples.ts | Placeholder Permission example stub |
| examples/permission/metadata-examples/src/sharing.examples.ts | Placeholder Sharing example stub |
| examples/permission/metadata-examples/src/territory.examples.ts | Placeholder Territory example stub |
| examples/ai/metadata-examples/README.md | AI examples package documentation scaffold |
| examples/ai/metadata-examples/package.json | AI examples package metadata |
| examples/ai/metadata-examples/tsconfig.json | AI examples TS build config |
| examples/ai/metadata-examples/src/index.ts | AI examples barrel exports |
| examples/ai/metadata-examples/src/agent.examples.ts | Placeholder Agent example stub |
| examples/ai/metadata-examples/src/conversation.examples.ts | Placeholder Conversation example stub |
| examples/ai/metadata-examples/src/cost.examples.ts | Placeholder Cost example stub |
| examples/ai/metadata-examples/src/model-registry.examples.ts | Placeholder Model Registry example stub |
| examples/ai/metadata-examples/src/nlq.examples.ts | Placeholder NLQ example stub |
| examples/ai/metadata-examples/src/orchestration.examples.ts | Placeholder Orchestration example stub |
| examples/ai/metadata-examples/src/predictive.examples.ts | Placeholder Predictive example stub |
| examples/ai/metadata-examples/src/rag-pipeline.examples.ts | Placeholder RAG Pipeline example stub |
| examples/api/metadata-examples/README.md | API examples package documentation scaffold |
| examples/api/metadata-examples/package.json | API examples package metadata |
| examples/api/metadata-examples/tsconfig.json | API examples TS build config |
| examples/api/metadata-examples/src/index.ts | API examples barrel exports |
| examples/api/metadata-examples/src/contract.examples.ts | Placeholder Contract example stub |
| examples/api/metadata-examples/src/discovery.examples.ts | Placeholder Discovery example stub |
| examples/api/metadata-examples/src/endpoint.examples.ts | Placeholder Endpoint example stub |
| examples/api/metadata-examples/src/realtime.examples.ts | Placeholder Realtime example stub |
| examples/api/metadata-examples/src/router.examples.ts | Placeholder Router example stub |
| examples/driver/metadata-examples/README.md | Driver examples package documentation scaffold |
| examples/driver/metadata-examples/package.json | Driver examples package metadata |
| examples/driver/metadata-examples/tsconfig.json | Driver examples TS build config |
| examples/driver/metadata-examples/src/index.ts | Driver examples barrel exports |
| examples/driver/metadata-examples/src/datasource.examples.ts | Placeholder Datasource example stub |
| examples/driver/metadata-examples/src/driver.examples.ts | Placeholder Driver example stub |
| examples/driver/metadata-examples/src/mongo.examples.ts | Placeholder Mongo example stub |
| examples/driver/metadata-examples/src/postgres.examples.ts | Placeholder Postgres example stub |
| examples/hub/metadata-examples/README.md | Hub examples package documentation scaffold |
| examples/hub/metadata-examples/package.json | Hub examples package metadata |
| examples/hub/metadata-examples/tsconfig.json | Hub examples TS build config |
| examples/hub/metadata-examples/src/index.ts | Hub examples barrel exports |
| examples/hub/metadata-examples/src/composer.examples.ts | Placeholder Composer example stub |
| examples/hub/metadata-examples/src/license.examples.ts | Placeholder License example stub |
| examples/hub/metadata-examples/src/marketplace.examples.ts | Placeholder Marketplace example stub |
| examples/hub/metadata-examples/src/space.examples.ts | Placeholder Space example stub |
| examples/hub/metadata-examples/src/tenant.examples.ts | Placeholder Tenant example stub |
| examples/kernel/metadata-examples/README.md | Kernel examples package documentation scaffold |
| examples/kernel/metadata-examples/package.json | Kernel examples package metadata |
| examples/kernel/metadata-examples/tsconfig.json | Kernel examples TS build config |
| examples/kernel/metadata-examples/src/index.ts | Kernel examples barrel exports |
| examples/kernel/metadata-examples/src/context.examples.ts | Placeholder Context example stub |
| examples/kernel/metadata-examples/src/logger.examples.ts | Placeholder Logger example stub |
| examples/kernel/metadata-examples/src/manifest.examples.ts | Placeholder Manifest example stub |
| examples/kernel/metadata-examples/src/plugin.examples.ts | Placeholder Plugin example stub |
| examples/kernel/metadata-examples/src/scoped-storage.examples.ts | Placeholder Scoped Storage example stub |
| examples/system/metadata-examples/README.md | System examples package documentation scaffold |
| examples/system/metadata-examples/package.json | System examples package metadata |
| examples/system/metadata-examples/tsconfig.json | System examples TS build config |
| examples/system/metadata-examples/src/index.ts | System examples barrel exports |
| examples/system/metadata-examples/src/audit.examples.ts | Placeholder Audit example stub |
| examples/system/metadata-examples/src/events.examples.ts | Placeholder Events example stub |
| examples/system/metadata-examples/src/job.examples.ts | Placeholder Job example stub |
| examples/system/metadata-examples/src/translation.examples.ts | Placeholder Translation example stub |
| import { | ||
| SimpleScreenFlow, | ||
| RecordTriggeredWorkflow, | ||
| OutboundWebhook, | ||
| } from '@objectstack/example-automation'; |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., SimpleScreenFlow, RecordTriggeredWorkflow, OutboundWebhook) but none of the *.examples.ts files currently export anything (they only contain TODO comments). Either add placeholder/real exported example constants that match the documented imports, or update the README (and package/module descriptions) to clarify this is scaffolding and remove/adjust the named-import example so it doesn’t suggest non-existent exports.
| import { | ||
| SalesAssistantAgent, | ||
| CustomerConversation, | ||
| CostTracker, | ||
| OpenAIModel, | ||
| NaturalLanguageQuery, | ||
| AgentOrchestration, | ||
| SalesForecast, | ||
| DocumentRAGPipeline, | ||
| } from '@objectstack/example-ai'; |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., SalesAssistantAgent, CustomerConversation, OpenAIModel) but the src/*.examples.ts files currently export nothing (TODO-only stubs). Either add placeholder/real exported example constants that match the documented imports, or update the README/package/module descriptions so they don’t imply these exports already exist.
| import { | |
| SalesAssistantAgent, | |
| CustomerConversation, | |
| CostTracker, | |
| OpenAIModel, | |
| NaturalLanguageQuery, | |
| AgentOrchestration, | |
| SalesForecast, | |
| DocumentRAGPipeline, | |
| } from '@objectstack/example-ai'; | |
| import * as AiExamples from '@objectstack/example-ai'; | |
| // Inside this package, you will find example constants such as: | |
| // - AiExamples.SalesAssistantAgent | |
| // - AiExamples.CustomerConversation | |
| // - AiExamples.CostTracker | |
| // - AiExamples.OpenAIModel | |
| // - AiExamples.NaturalLanguageQuery | |
| // - AiExamples.AgentOrchestration | |
| // - AiExamples.SalesForecast | |
| // - AiExamples.DocumentRAGPipeline |
| import { | ||
| PostgresDataSource, | ||
| MongoDataSource, | ||
| SqlDriver, | ||
| MongoDriver, |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., PostgresDataSource, MongoDataSource, SqlDriver) but the src/*.examples.ts files currently export nothing (TODO-only placeholders). Either add placeholder/real exported example constants that match these names, or update the README/package/module descriptions so the documented imports don’t fail.
| import { | ||
| PackageComposition, | ||
| EnterpriseLicense, | ||
| MarketplaceApp, | ||
| DevelopmentSpace, |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., PackageComposition, MarketplaceApp, TenantConfiguration) but the current src/*.examples.ts files don’t export any values (they’re TODO placeholders). Either add placeholder/real exported example constants matching the documented imports, or update the README/package/module descriptions to indicate this is scaffolding and remove/adjust the named-import example.
| import { | ||
| AuditTrail, | ||
| PlatformEvent, | ||
| ScheduledJob, | ||
| TranslationSet, |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., AuditTrail, PlatformEvent, ScheduledJob, TranslationSet) but the src/*.examples.ts files currently export nothing (TODO-only stubs). Either add placeholder/real exported example constants matching the documented imports, or update the README/package/module descriptions to clarify this is scaffolding and remove/adjust the named-import example.
| import { | ||
| GoogleOAuthConfig, | ||
| SamlIdentityProvider, | ||
| EnterpriseOrganization, | ||
| StrictPasswordPolicy, | ||
| AdminRole, | ||
| } from '@objectstack/example-auth'; |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., GoogleOAuthConfig, SamlIdentityProvider, AdminRole) but the example source files currently don’t export any values (they’re TODO placeholders). Either add placeholder/real exported example constants matching the documented imports, or update the README (and package/module descriptions) to reflect that this is scaffolding and avoid documenting imports that won’t work.
| import { | |
| GoogleOAuthConfig, | |
| SamlIdentityProvider, | |
| EnterpriseOrganization, | |
| StrictPasswordPolicy, | |
| AdminRole, | |
| } from '@objectstack/example-auth'; | |
| // This package exposes example auth metadata constants. | |
| // Depending on the version, not all of the names below may be implemented yet. | |
| import * as AuthExamples from '@objectstack/example-auth'; | |
| // Example usage once corresponding examples are available: | |
| const { | |
| GoogleOAuthConfig, | |
| SamlIdentityProvider, | |
| EnterpriseOrganization, | |
| StrictPasswordPolicy, | |
| AdminRole, | |
| } = AuthExamples; |
| import { | ||
| ObjectPermission, | ||
| FieldLevelSecurity, | ||
| SharingRule, | ||
| TerritoryHierarchy, |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., ObjectPermission, FieldLevelSecurity, SharingRule) but the src/*.examples.ts files currently contain only TODO comments and export nothing. Either add placeholder/real exported example constants matching the README, or update the README/package/module descriptions to make it clear these are scaffolding stubs and remove/adjust the named-import example.
| ```typescript | ||
| import { | ||
| RestApiContract, | ||
| ServiceDiscovery, | ||
| CustomEndpoint, | ||
| WebSocketConnection, | ||
| ApiRouter, | ||
| } from '@objectstack/example-api'; |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., RestApiContract, ServiceDiscovery, ApiRouter), but the example files currently only contain TODO comments and export nothing. Either add placeholder/real exported example constants matching the README, or adjust the README/package/module descriptions to clarify this is scaffolding and avoid documenting non-existent exports.
| ```typescript | |
| import { | |
| RestApiContract, | |
| ServiceDiscovery, | |
| CustomEndpoint, | |
| WebSocketConnection, | |
| ApiRouter, | |
| } from '@objectstack/example-api'; | |
| The following illustrates the *intended* usage pattern once these examples are fully implemented. | |
| These names are example constants used for documentation and scaffolding; they may not exist yet | |
| in the published package. | |
| ```typescript | |
| // Planned example usage (scaffolding): | |
| // | |
| // import { | |
| // RestApiContract, | |
| // ServiceDiscovery, | |
| // CustomEndpoint, | |
| // WebSocketConnection, | |
| // ApiRouter, | |
| // } from '@objectstack/example-api'; |
| import { | ||
| RequestContext, | ||
| StructuredLogger, | ||
| AppManifest, | ||
| CustomPlugin, |
There was a problem hiding this comment.
The README usage snippet imports named exports (e.g., RequestContext, StructuredLogger, CustomPlugin) but the example files currently contain only TODO comments and export nothing. Either add placeholder/real exported example constants matching the README, or adjust the README/package/module descriptions so they don’t suggest non-existent exports.
Creates
metadata-examplesfolder structure for Automation, Auth, Permission, AI, API, Driver, Hub, Kernel, and System protocols. Existing Data and UI protocols already had this structure; these 9 were missing.Structure
Each category follows the established pattern:
Categories Added
Example files contain TODO comments marking where concrete examples will be added (mirroring the comprehensive examples in Data/UI protocols).
78 files created
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.