Skip to content

[WIP] Fix action step error in CI workflow - #366

Merged
hotlong merged 3 commits into
copilot/update-examples-and-cleanupfrom
copilot/fix-action-step-error-again
Jan 29, 2026
Merged

hotlong merged 3 commits into
copilot/update-examples-and-cleanupfrom
copilot/fix-action-step-error-again

Conversation

Copilot AI commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

Fix TypeScript Build Errors in examples/basic

Problem

The examples/basic package has TypeScript compilation errors due to:

  1. Incorrect imports from @objectstack/spec (namespace structure not followed)
  2. Type mismatches in example code
  3. Missing/incorrect property names in type definitions

Plan

  • Investigate CI build failure logs
  • Identify root cause: imports need to use namespaced structure
  • Update all example files to use correct namespace imports
    • ai-rag-example.ts - Use AI.* namespace
    • api-discovery-example.ts - Use API.* namespace
    • auth-permission-example.ts - Use Auth.* and Permission.* namespace
    • automation-example.ts - Use Automation.* namespace
    • stack-definition-example.ts - Fix type mismatches
  • Fix remaining type errors in examples
    • ai-rag-example.ts - Add missing required properties
    • auth-permission-example.ts - Fix RLS and Territory types
    • automation-example.ts - Fix workflow criteria and action types
    • stack-definition-example.ts - Fix Object, Dashboard, Workflow types
  • Build and verify all fixes locally
  • Ensure CI passes

Changes Made

ai-rag-example.ts

  • ✅ Updated imports to use AI namespace
  • ✅ Added missing vector store properties (batchSize, connectionPoolSize, timeout)
  • ✅ Added missing RAG query request properties (includeMetadata, includeSources)
  • ✅ Fixed agent knowledge configuration (changed from pipeline to indexes/topics)
  • ✅ Fixed tool types (added required type field)

api-discovery-example.ts

  • ✅ Updated imports to use API namespace

auth-permission-example.ts

  • ✅ Updated imports to use Auth and Permission namespaces
  • ✅ Added missing priority field to RLS policies
  • ✅ Fixed Territory schema (removed invalid fields, added required fields)
  • ✅ Fixed User type usage (added roles as extended property)

automation-example.ts

  • ✅ Updated imports to use Automation namespace
  • ✅ Changed all criteria from objects to formula strings
  • ✅ Changed all action types from camelCase to snake_case
  • ✅ Fixed workflow rule structure and properties
  • ✅ Fixed approval process structure
  • ✅ Removed invalid Flow and ETLPipeline examples

stack-definition-example.ts

  • ✅ Added required id and type fields to manifest
  • ✅ Changed fields from arrays to Record (object) format
  • ✅ Fixed reference fields (string instead of object)
  • ✅ Fixed View schema structure
  • ✅ Fixed Dashboard widgets
  • ✅ Fixed workflow actions
  • ✅ Fixed agent configuration

Verification

✅ All examples now compile successfully with TypeScript
✅ Full project build passes

Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21462696282/job/61818343953#step:8:1


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

@vercel

vercel Bot commented Jan 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 29, 2026 2:24am

Request Review

…orrections

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR is very large. Consider breaking it into smaller PRs for easier review.

@hotlong
hotlong marked this pull request as ready for review January 29, 2026 02:23
Copilot AI review requested due to automatic review settings January 29, 2026 02:23
@hotlong
hotlong merged commit dda5213 into copilot/update-examples-and-cleanup Jan 29, 2026
8 of 9 checks passed
Copilot AI requested a review from hotlong January 29, 2026 02:24
Copilot stopped work on behalf of hotlong due to an error January 29, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes TypeScript compilation errors in the examples/basic package by updating example code to align with the current type definitions in @objectstack/spec. The changes are primarily structural updates to match evolved schema definitions.

Changes:

  • Updated all imports to use the namespaced structure (AI.*, API.*, Auth.*, Permission.*, Automation.*) instead of direct type imports
  • Corrected object field definitions from array format to Record/object format
  • Fixed workflow, approval, and agent configurations to match current schema requirements

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
stack-definition-example.ts Updated manifest to include required id and type fields; converted object fields from array to Record format; updated reference fields from object to string format; restructured views, dashboards, workflows, and agents to match current schemas; removed invalid properties like labelPlural, nameField
automation-example.ts Changed imports to Automation namespace; updated workflow rules with flat structure (objectName, triggerType, criteria as formula strings); updated approval process with correct action structure (onApprove, onReject, onFinalApprove, onFinalReject); removed deprecated Flow and ETLPipeline examples
auth-permission-example.ts Changed imports to Auth and Permission namespaces; added required priority field to RLS policies; updated Territory schema with modelId, type, assignmentRule (formula), assignedUsers, and access level fields; fixed method parameter types to handle extended User type
api-discovery-example.ts Updated imports to use API namespace for DiscoveryResponse and ApiCapabilities types
ai-rag-example.ts Changed imports to AI namespace; added required vector store configuration properties (batchSize, connectionPoolSize, timeout); added cache configuration; updated RAG query requests with includeMetadata and includeSources; updated Agent configuration (instructions instead of systemPrompt, knowledge with indexes/topics instead of pipeline, tools require type field); removed non-existent response fields

This was referenced Oct 19, 2026

This branch was successfully deployed

1 active deployment
Preview — 5e98567d Deployed Jan 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants