Skip to content

Microkernel architecture evaluation and documentation + Next.js CVE fix#419

Merged
hotlong merged 6 commits intomainfrom
copilot/update-docs-for-microkernel
Jan 31, 2026
Merged

Microkernel architecture evaluation and documentation + Next.js CVE fix#419
hotlong merged 6 commits intomainfrom
copilot/update-docs-for-microkernel

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 31, 2026

Comprehensive evaluation of ObjectStack's microkernel architecture and package distribution. Added architectural documentation for the 12-package, 6-layer system.

Documentation Added

  • ARCHITECTURE.md (661 lines) - Microkernel design, plugin system, dependency graph, design decisions
  • PACKAGE-DEPENDENCIES.md (313 lines) - 6-layer hierarchy, build order, dependency rules, DAG validation
  • QUICK-REFERENCE.md (253 lines) - Developer quick reference with code examples, common tasks, testing patterns

Documentation Updated

  • README.md - Reorganized package structure into 6 categories (Core, Engines, Clients, Plugins, Tools)
  • micro-kernel.mdx - Added ObjectQLPlugin, DriverPlugin, AppPlugin documentation with current API

Architecture Highlights

Package Organization (12 packages):

Layer 0: @objectstack/spec (protocols, zero runtime deps)
Layer 1: @objectstack/types (shared types)
Layer 2: @objectstack/core (220-line kernel: lifecycle, DI, events)
Layer 3: @objectstack/objectql, @objectstack/runtime (engines)
Layer 4: client SDKs
Layer 5: plugins (driver-memory, plugin-hono-server, plugin-msw)
Layer 6: tools (cli, ai-bridge)

Key findings:

  • Zero circular dependencies (strict DAG)
  • Protocol-first design (Zod schemas)
  • Minimal external dependencies (@objectstack/spec: only zod; @objectstack/core: spec, pino, zod)
  • Plugin independence via service registry

Security Fix

Updated Next.js 16.1.316.1.5 to patch DoS vulnerability in React Server Components HTTP request deserialization (CVE). Affects only apps/docs.

Post-merge: Run pnpm install to regenerate lockfile.

Stats

  • 1,360 lines added
  • 3 new architecture guides (36.6KB)
  • 7 files modified
Original prompt

你是顶级的微内核架构师评估目前的微内核架构和软件包分布,更新必要的文档


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 31, 2026

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

Project Deployment Actions Updated (UTC)
spec Error Error Jan 31, 2026 2:06am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review January 31, 2026 02:03
Copilot AI review requested due to automatic review settings January 31, 2026 02:03
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
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

This PR adds comprehensive architecture documentation for ObjectStack's microkernel architecture, including three major new documentation files and updates to existing documentation.

Changes:

  • Created ARCHITECTURE.md (661 lines) - comprehensive microkernel architecture overview with design principles, package structure, and dependency graph
  • Created PACKAGE-DEPENDENCIES.md (313 lines) - detailed dependency analysis with 6-layer hierarchy, dependency matrix, and build order
  • Created QUICK-REFERENCE.md (253 lines) - developer quick reference with common tasks, naming conventions, and import patterns
  • Updated README.md with organized package structure into 6 categories and cross-references to architecture documentation
  • Enhanced micro-kernel.mdx with expanded plugin documentation, lifecycle details, and API information
  • Minor .gitignore update for documentation build artifacts

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ARCHITECTURE.md Comprehensive architecture documentation covering microkernel design, 12-package structure, three-layer protocol stack, plugin system, dependency rules, and design decisions
PACKAGE-DEPENDENCIES.md Detailed dependency graph visualization with 6-layer hierarchy, dependency matrix, build order, and external dependency analysis
QUICK-REFERENCE.md Quick reference guide with package overview, common tasks, plugin templates, standard events, logger usage, and import patterns
README.md Reorganized package structure into 6 categories (Core, Engine, Client, Plugin, Tools, Examples) with enhanced descriptions and architecture documentation links
content/docs/developers/micro-kernel.mdx Enhanced plugin documentation with detailed lifecycle, naming conventions, built-in plugin specifications, and expanded API documentation
.gitignore Added exclusions for documentation build artifacts (docs/ directory)

name: string; // Reverse domain notation (e.g., 'com.objectstack.driver.postgres')
version?: string; // Semantic version (e.g., '1.0.0')
dependencies?: string[]; // Plugin names this depends on
init(ctx: PluginContext): Promise<void> | void; // Register services
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The init method is not optional in the actual Plugin interface (see packages/core/src/types.ts:87). The interface requires init to be implemented, while start and destroy are optional. The documentation should reflect this accurately.

Copilot uses AI. Check for mistakes.
Comment on lines +155 to +159
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, metadata?) // Errors
logger.fatal(message, metadata?) // Fatal errors
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The documented logger.error signature shows logger.error(message, metadata?) but the actual Logger interface (packages/core/src/contracts/logger.ts:35) defines it as error(message: string, error?: Error, meta?: Record<string, any>): void. The documentation should reflect the actual signature with the error parameter between message and metadata.

Suggested change
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, metadata?) // Errors
logger.fatal(message, metadata?) // Fatal errors
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, error?, metadata?) // Errors
logger.fatal(message, metadata?) // Fatal errors

Copilot uses AI. Check for mistakes.
Comment on lines +155 to +159
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, metadata?) // Errors
logger.fatal(message, metadata?) // Fatal errors
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The documented logger.fatal signature should also include the error parameter like the Logger interface defines: fatal(message: string, error?: Error, meta?: Record<string, any>): void (see packages/core/src/contracts/logger.ts:43). The documentation shows logger.fatal(message, metadata?) which is missing the error parameter.

Suggested change
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, metadata?) // Errors
logger.fatal(message, metadata?) // Fatal errors
logger.debug(message, metadata?) // Development/troubleshooting
logger.info(message, metadata?) // General information
logger.warn(message, metadata?) // Warnings
logger.error(message, metadata?) // Errors
logger.fatal(message, error?, metadata?) // Fatal errors

Copilot uses AI. Check for mistakes.

### AppPlugin

**Name**: `com.objectstack.app.{name}`
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The documented plugin name format com.objectstack.app.{name} doesn't match the actual implementation in packages/runtime/src/app-plugin.ts:24, which uses plugin.app.${appId}. The documentation should reflect the actual naming convention used in the code.

Suggested change
**Name**: `com.objectstack.app.{name}`
**Name**: `plugin.app.{name}`

Copilot uses AI. Check for mistakes.
```

#### AppPlugin
**Name**: `com.objectstack.app.{name}`
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The documented plugin name format com.objectstack.app.{name} doesn't match the actual implementation in packages/runtime/src/app-plugin.ts:24, which uses plugin.app.${appId}. The documentation should reflect the actual naming convention used in the code.

Suggested change
**Name**: `com.objectstack.app.{name}`
**Name**: `plugin.app.{appId}`

Copilot uses AI. Check for mistakes.

### HonoServerPlugin

**Name**: `com.objectstack.plugin.hono-server`
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The documented plugin name com.objectstack.plugin.hono-server doesn't match the actual implementation in packages/plugins/plugin-hono-server/src/hono-plugin.ts:17, which uses com.objectstack.server.hono. The documentation should reflect the actual plugin name used in the code.

Suggested change
**Name**: `com.objectstack.plugin.hono-server`
**Name**: `com.objectstack.server.hono`

Copilot uses AI. Check for mistakes.
Copilot AI changed the title [WIP] Update documentation for microkernel architecture and packaging Microkernel architecture evaluation and documentation + Next.js CVE fix Jan 31, 2026
Copilot AI requested a review from hotlong January 31, 2026 02:08
@hotlong hotlong merged commit 8ade02d into main Jan 31, 2026
1 of 2 checks passed
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