Add sys_presence system object to service-realtime package#1020
Merged
Add sys_presence system object to service-realtime package#1020
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add PRESENCE constant to SystemObjectName in @objectstack/spec - Create sys-presence.object.ts with fields matching PresenceStateSchema - Register sys_presence in RealtimeServicePlugin via app convention - Export SysPresence from @objectstack/service-realtime - Add tests for object definition and SystemObjectName constant - Update ROADMAP.md system object naming table - Update CHANGELOG.md with architecture change Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/8eb9f944-6c43-4378-b0a8-b84aaf261524 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/8eb9f944-6c43-4378-b0a8-b84aaf261524 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add sys_presence system object to service-realtime package
Add sys_presence system object to service-realtime package
Mar 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the missing sys_presence system object to the realtime domain so the runtime can discover/register it and avoid no such table: sys_presence errors, while also exposing a protocol constant for consistent references.
Changes:
- Added
SystemObjectName.PRESENCE = 'sys_presence'(plus tests) in@objectstack/spec/system. - Introduced
SysPresenceObjectSchema(and tests) in@objectstack/service-realtime. - Registered
SysPresencefor ObjectQL auto-discovery via theapp.com.objectstack.service.realtimeconvention and exported it from the package root; updated ROADMAP/CHANGELOG entries.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ROADMAP.md | Adds SystemObjectName.PRESENCE → sys_presence to the system object naming table. |
| packages/spec/src/system/constants/system-names.ts | Introduces the PRESENCE system object name constant. |
| packages/spec/src/system/constants/system-names.test.ts | Extends constant coverage to include PRESENCE. |
| packages/services/service-realtime/src/realtime-service-plugin.ts | Registers realtime system objects under the app.* service convention for ObjectQL discovery. |
| packages/services/service-realtime/src/objects/sys-presence.object.ts | Defines the SysPresence object schema, fields, and indexes. |
| packages/services/service-realtime/src/objects/sys-presence.object.test.ts | Adds unit tests validating the SysPresence schema shape and defaults. |
| packages/services/service-realtime/src/objects/index.ts | Barrel export for realtime-owned system objects. |
| packages/services/service-realtime/src/index.ts | Exposes SysPresence from @objectstack/service-realtime root. |
| CHANGELOG.md | Documents the addition of sys_presence and the new spec constant. |
packages/services/service-realtime/src/objects/sys-presence.object.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runtime hits
no such table: sys_presencebecause the object was never defined or registered. Per system architecture,sys_-prefixed objects belong to their domain package — presence belongs toservice-realtime.Changes
SystemObjectName.PRESENCE— New'sys_presence'constant in@objectstack/spec/systemSysPresenceobject definition —packages/services/service-realtime/src/objects/sys-presence.object.tswith fields aligned toPresenceStateSchemaprotocol (user_id,session_id,status,last_seen,current_location,device,custom_status,metadata)RealtimeServicePlugin.init()registers viaapp.com.objectstack.service.realtimeconvention (same pattern asMetadataPlugin,AIServicePlugin)SysPresenceexported from@objectstack/service-realtimeroot