Skip to content

Add examples scaffolding for 9 protocol categories#161

Merged
hotlong merged 2 commits intomainfrom
copilot/create-example-folders
Jan 25, 2026
Merged

Add examples scaffolding for 9 protocol categories#161
hotlong merged 2 commits intomainfrom
copilot/create-example-folders

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 25, 2026

Creates metadata-examples folder 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:

examples/{category}/metadata-examples/
├── README.md              # Protocol documentation and usage
├── package.json           # @objectstack/example-{category}
├── tsconfig.json          # TypeScript config
└── src/
    ├── index.ts           # Exports all examples
    └── *.examples.ts      # Placeholder example files

Categories Added

  • Automation (3 files) - Flow, Workflow, Webhook
  • Auth (5 files) - Config, Identity, Organization, Policy, Role
  • Permission (3 files) - Permission, Sharing, Territory
  • AI (8 files) - Agent, Conversation, Cost, Model Registry, NLQ, Orchestration, Predictive, RAG Pipeline
  • API (5 files) - Contract, Discovery, Endpoint, Realtime, Router
  • Driver (4 files) - Datasource, Driver, Mongo, Postgres
  • Hub (5 files) - Composer, License, Marketplace, Space, Tenant
  • Kernel (5 files) - Context, Logger, Manifest, Plugin, Scoped Storage
  • System (4 files) - Audit, Events, Job, Translation

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

Create Automation category examples folder
Create Auth category examples folder
Create Permission category examples folder
Create AI category examples folder
Create API category examples folder
Create Driver category examples folder
Create Hub category examples folder
Create Kernel category examples folder
Create System category examples folder


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 25, 2026 2:44pm

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add example folders for various categories Add examples scaffolding for 9 protocol categories Jan 25, 2026
Copilot AI requested a review from hotlong January 25, 2026 14:43
@hotlong hotlong marked this pull request as ready for review January 25, 2026 14:48
Copilot AI review requested due to automatic review settings January 25, 2026 14:48
@hotlong hotlong merged commit 77d6169 into main Jan 25, 2026
5 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and src/index.ts barrel exports.
  • Added placeholder *.examples.ts files 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

Comment on lines +31 to +35
import {
SimpleScreenFlow,
RecordTriggeredWorkflow,
OutboundWebhook,
} from '@objectstack/example-automation';
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +69
import {
SalesAssistantAgent,
CustomerConversation,
CostTracker,
OpenAIModel,
NaturalLanguageQuery,
AgentOrchestration,
SalesForecast,
DocumentRAGPipeline,
} from '@objectstack/example-ai';
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +37 to +41
import {
PostgresDataSource,
MongoDataSource,
SqlDriver,
MongoDriver,
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +46
import {
PackageComposition,
EnterpriseLicense,
MarketplaceApp,
DevelopmentSpace,
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +44
import {
AuditTrail,
PlatformEvent,
ScheduledJob,
TranslationSet,
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +49
import {
GoogleOAuthConfig,
SamlIdentityProvider,
EnterpriseOrganization,
StrictPasswordPolicy,
AdminRole,
} from '@objectstack/example-auth';
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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;

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +36
import {
ObjectPermission,
FieldLevelSecurity,
SharingRule,
TerritoryHierarchy,
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +48
```typescript
import {
RestApiContract,
ServiceDiscovery,
CustomEndpoint,
WebSocketConnection,
ApiRouter,
} from '@objectstack/example-api';
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
```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';

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +46
import {
RequestContext,
StructuredLogger,
AppManifest,
CustomPlugin,
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants