Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Integrates latest ObjectStack runtime packages to align platform core with upstream protocol evolution.

Changes

  • Dependencies: Upgraded @objectstack/spec to 0.1.2, added @objectstack/runtime@0.1.1 and @objectstack/objectql@0.1.1
  • Type exports: Re-exported ObjectStackKernel, ObjectStackRuntimeProtocol, ObjectQLEngine, and SchemaRegistry types from runtime packages (type-only to avoid module resolution issues with upstream package configuration)
  • Spec compliance: Added required searchable: false to programmatically-generated FieldConfig objects in introspection utility
  • Documentation: Added RUNTIME_INTEGRATION.md explaining type export strategy and migration path

Type Exports

// Type-only exports avoid runtime dependencies on upstream packages
export type { ObjectStackKernel, ObjectStackRuntimeProtocol } from '@objectstack/runtime';
export type { ObjectQL as ObjectQLEngine, SchemaRegistry } from '@objectstack/objectql';

// Existing ObjectQL implementation unchanged
export * from './app';
export * from './repository';

Existing ObjectQL implementation remains production-ready with full feature set (hooks, actions, validation, formulas). New types available for consumers needing lightweight alternatives or protocol compatibility.

Original prompt

基于最新版本的@objectstack/runtime@0.1.1,@objectstack/spec,重构平台内核代码


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

@vercel
Copy link

vercel bot commented Jan 20, 2026

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

Project Deployment Review Updated (UTC)
objectql-site Ready Ready Preview, Comment Jan 21, 2026 0:15am

Request Review

…objectstack/spec@0.1.2

- Updated @objectstack/spec from 0.1.1 to 0.1.2 in packages/foundation/types
- Updated @objectstack/spec from 0.1.1 to 0.1.2 in packages/foundation/core
- Added @objectstack/runtime@0.1.1 as dependency
- Added @objectstack/objectql@0.1.1 as dependency
- Added type exports for ObjectStackKernel, ObjectStackRuntimeProtocol, ObjectQLEngine, and SchemaRegistry
- Fixed searchable field requirement in util.ts for new spec version
- All 236 tests pass successfully

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor platform kernel code based on latest version updates Integrate @objectstack/runtime@0.1.1 and @objectstack/spec@0.1.2 Jan 20, 2026
Copilot AI requested a review from hotlong January 20, 2026 23:42
@github-actions
Copy link
Contributor

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

Copilot AI and others added 3 commits January 21, 2026 00:02
@github-actions
Copy link
Contributor

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

@hotlong hotlong marked this pull request as ready for review January 21, 2026 00:18
Copilot AI review requested due to automatic review settings January 21, 2026 00:18
@hotlong hotlong merged commit fe6079d into main Jan 21, 2026
19 checks passed
@hotlong hotlong deleted the copilot/refactor-platform-kernel-code branch January 21, 2026 00:19
Copy link
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 updates the ObjectQL core and types packages to align with the latest ObjectStack runtime/spec protocol while exposing upstream engine types without changing the existing runtime implementation.

Changes:

  • Bumped @objectstack/spec to 0.1.2 across relevant packages and added @objectstack/runtime@0.1.1 and @objectstack/objectql@0.1.1 as dependencies for the core package.
  • Extended FieldConfig with a searchable flag and updated introspection utilities to set searchable: false on generated fields to satisfy the updated spec.
  • Re-exported key runtime types (ObjectStackKernel, ObjectStackRuntimeProtocol, ObjectQLEngine, SchemaRegistry) from @objectql/core via type-only exports and added RUNTIME_INTEGRATION.md to document the integration and usage.

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Locks updated versions of @objectstack/spec, and adds entries for @objectstack/runtime, @objectstack/objectql, and related dependencies to match the new dependency graph.
packages/foundation/types/src/field.ts Extends FieldConfig to omit searchable from the protocol Field and re-declares it as an optional runtime flag, enabling explicit control and compatibility with @objectstack/spec@0.1.2.
packages/foundation/types/package.json Bumps @objectstack/spec dependency to ^0.1.2 to consume the updated protocol schema.
packages/foundation/core/src/util.ts Ensures introspection-generated FieldConfig objects always include searchable: false for both lookup and regular fields to satisfy the new spec field requirement.
packages/foundation/core/src/index.ts Adds type-only re-exports of ObjectStackKernel, ObjectStackRuntimeProtocol, ObjectQLEngine, and SchemaRegistry while keeping the existing core implementations as value exports.
packages/foundation/core/package.json Adds @objectstack/runtime and @objectstack/objectql as dependencies and bumps @objectstack/spec to ^0.1.2 to support the new type exports.
packages/foundation/core/RUNTIME_INTEGRATION.md Documents the runtime integration architecture, type-export strategy, usage patterns, compatibility notes (including the searchable requirement), and future evolution plans.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/foundation/core/src/util.ts:9

  • Unused imports IntrospectedColumn, IntrospectedTable.
import { ObjectConfig, FieldConfig, FieldType, IntrospectedSchema, IntrospectedColumn, IntrospectedTable } from '@objectql/types';

Comment on lines +150 to +151
/** Whether the field is searchable (full-text search). Defaults to false. */
searchable?: boolean;
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Now that searchable is re-declared on FieldConfig, the preceding documentation comment's list of boolean flags that are "re-declared here" is slightly out of date because it doesn't include searchable. Please update the comment to mention searchable alongside the other re-declared boolean flags so the docs accurately reflect the interface.

Copilot uses AI. Check for mistakes.
Comment on lines 29 to 31
"dependencies": {
"@objectstack/spec": "^0.1.1"
"@objectstack/spec": "^0.1.2"
},
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

@objectql/types is described as a pure contract/types package, but it still declares a runtime dependency on @objectstack/spec. To keep this package dependency-free as a low-level contract layer, consider removing @objectstack/spec from dependencies (for example by inlining the required spec types here and/or treating @objectstack/spec as a devDependency used only at build time).

Copilot uses AI. Check for mistakes.
Comment on lines 119 to +121
label: toTitleCase(column.name),
required: !column.nullable
required: !column.nullable,
searchable: false
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The new searchable: false assignments for introspected fields are important for aligning with @objectstack/spec@0.1.2, but there are no assertions in the existing convertIntrospectedSchemaToObjects tests to verify this behavior. Please add test coverage (e.g., in introspection.test.ts or util.test.ts) that asserts introspected fields have searchable === false so regressions in spec compliance are caught.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants