@objectstack/spec 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -10
- package/dist/ai/agent.zod.d.ts +12 -12
- package/dist/ai/conversation.zod.d.ts +65 -65
- package/dist/ai/cost.zod.d.ts +125 -125
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/model-registry.zod.d.ts +94 -94
- package/dist/ai/nlq.zod.d.ts +70 -70
- package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +50 -49
- package/dist/ai/orchestration.zod.d.ts.map +1 -0
- package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
- package/dist/ai/predictive.zod.d.ts +31 -31
- package/dist/ai/rag-pipeline.zod.d.ts +86 -86
- package/dist/api/contract.zod.d.ts +125 -109
- package/dist/api/contract.zod.d.ts.map +1 -1
- package/dist/{system → api}/discovery.zod.d.ts +26 -26
- package/dist/api/discovery.zod.d.ts.map +1 -0
- package/dist/{system → api}/discovery.zod.js +9 -9
- package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
- package/dist/api/endpoint.zod.d.ts.map +1 -0
- package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -0
- package/dist/{system → api}/realtime.zod.d.ts +4 -4
- package/dist/api/realtime.zod.d.ts.map +1 -0
- package/dist/api/router.zod.d.ts +182 -0
- package/dist/api/router.zod.d.ts.map +1 -0
- package/dist/api/router.zod.js +103 -0
- package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +191 -191
- package/dist/auth/config.zod.d.ts.map +1 -0
- package/dist/{system → auth}/identity.zod.d.ts +8 -8
- package/dist/auth/identity.zod.d.ts.map +1 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +22 -0
- package/dist/{system → auth}/organization.zod.d.ts +5 -5
- package/dist/auth/organization.zod.d.ts.map +1 -0
- package/dist/{system → auth}/policy.zod.d.ts +3 -3
- package/dist/auth/policy.zod.d.ts.map +1 -0
- package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
- package/dist/auth/protocol.d.ts.map +1 -0
- package/dist/auth/role.zod.d.ts.map +1 -0
- package/dist/{data → automation}/flow.zod.d.ts +34 -16
- package/dist/automation/flow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/flow.zod.js +6 -1
- package/dist/automation/index.d.ts +4 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +19 -0
- package/dist/{system → automation}/webhook.zod.d.ts +2 -2
- package/dist/automation/webhook.zod.d.ts.map +1 -0
- package/dist/automation/workflow.zod.d.ts +2045 -0
- package/dist/automation/workflow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/workflow.zod.js +24 -1
- package/dist/data/dataset.zod.d.ts +2 -2
- package/dist/data/field.zod.d.ts +443 -213
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +29 -1
- package/dist/data/filter.zod.d.ts +167 -30
- package/dist/data/filter.zod.d.ts.map +1 -1
- package/dist/data/filter.zod.js +25 -13
- package/dist/data/hook.zod.d.ts +191 -0
- package/dist/data/hook.zod.d.ts.map +1 -0
- package/dist/data/hook.zod.js +144 -0
- package/dist/data/index.d.ts +4 -17
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +4 -17
- package/dist/data/mapping.zod.d.ts +103 -91
- package/dist/data/mapping.zod.d.ts.map +1 -1
- package/dist/data/object.zod.d.ts +387 -127
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/object.zod.js +87 -42
- package/dist/data/query.zod.d.ts +98 -169
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +42 -130
- package/dist/data/validation.zod.d.ts +166 -26
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +38 -16
- package/dist/{system → driver}/datasource.zod.d.ts +42 -8
- package/dist/driver/datasource.zod.d.ts.map +1 -0
- package/dist/{system → driver}/datasource.zod.js +17 -13
- package/dist/driver/driver.zod.d.ts +3392 -0
- package/dist/driver/driver.zod.d.ts.map +1 -0
- package/dist/{system → driver}/driver.zod.js +99 -0
- package/dist/driver/index.d.ts +5 -0
- package/dist/driver/index.d.ts.map +1 -0
- package/dist/driver/index.js +20 -0
- package/dist/driver/mongo.zod.d.ts +107 -0
- package/dist/driver/mongo.zod.d.ts.map +1 -0
- package/dist/driver/mongo.zod.js +80 -0
- package/dist/driver/postgres.zod.d.ts +134 -0
- package/dist/driver/postgres.zod.d.ts.map +1 -0
- package/dist/driver/postgres.zod.js +88 -0
- package/dist/hub/composer.zod.d.ts +2768 -0
- package/dist/hub/composer.zod.d.ts.map +1 -0
- package/dist/hub/composer.zod.js +111 -0
- package/dist/hub/index.d.ts +6 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +22 -0
- package/dist/{system → hub}/license.zod.d.ts +11 -7
- package/dist/hub/license.zod.d.ts.map +1 -0
- package/dist/{system → hub}/license.zod.js +5 -3
- package/dist/hub/marketplace.zod.d.ts +191 -0
- package/dist/hub/marketplace.zod.d.ts.map +1 -0
- package/dist/hub/marketplace.zod.js +85 -0
- package/dist/hub/space.zod.d.ts +383 -0
- package/dist/hub/space.zod.d.ts.map +1 -0
- package/dist/hub/space.zod.js +103 -0
- package/dist/{system → hub}/tenant.zod.d.ts +73 -47
- package/dist/hub/tenant.zod.d.ts.map +1 -0
- package/dist/{system → hub}/tenant.zod.js +36 -10
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/kernel/context.zod.d.ts +56 -0
- package/dist/kernel/context.zod.d.ts.map +1 -0
- package/dist/kernel/context.zod.js +43 -0
- package/dist/kernel/index.d.ts +12 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +27 -0
- package/dist/kernel/logger.zod.d.ts +111 -0
- package/dist/kernel/logger.zod.d.ts.map +1 -0
- package/dist/kernel/logger.zod.js +75 -0
- package/dist/kernel/manifest.zod.d.ts +2153 -0
- package/dist/kernel/manifest.zod.d.ts.map +1 -0
- package/dist/{system → kernel}/manifest.zod.js +40 -0
- package/dist/{system → kernel}/plugin.zod.d.ts +598 -318
- package/dist/kernel/plugin.zod.d.ts.map +1 -0
- package/dist/{system → kernel}/plugin.zod.js +13 -0
- package/dist/kernel/scoped-storage.zod.d.ts +81 -0
- package/dist/kernel/scoped-storage.zod.d.ts.map +1 -0
- package/dist/kernel/scoped-storage.zod.js +66 -0
- package/dist/permission/index.d.ts +12 -0
- package/dist/permission/index.d.ts.map +1 -0
- package/dist/permission/index.js +27 -0
- package/dist/{data → permission}/permission.zod.d.ts +34 -3
- package/dist/permission/permission.zod.d.ts.map +1 -0
- package/dist/{data → permission}/permission.zod.js +10 -1
- package/dist/permission/sharing.zod.d.ts +146 -0
- package/dist/permission/sharing.zod.d.ts.map +1 -0
- package/dist/permission/sharing.zod.js +88 -0
- package/dist/permission/territory.zod.d.ts.map +1 -0
- package/dist/system/audit.zod.d.ts +52 -52
- package/dist/system/events.zod.d.ts +17 -17
- package/dist/system/index.d.ts +1 -20
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +3 -20
- package/dist/system/job.zod.d.ts +13 -13
- package/dist/ui/action.zod.d.ts +13 -13
- package/dist/ui/app.zod.d.ts +11 -11
- package/dist/ui/dashboard.zod.d.ts +12 -12
- package/dist/ui/page.zod.d.ts +2 -2
- package/dist/ui/report.zod.d.ts +7 -7
- package/dist/ui/theme.zod.d.ts +42 -42
- package/dist/ui/view.zod.d.ts +2320 -59
- package/dist/ui/view.zod.d.ts.map +1 -1
- package/dist/ui/view.zod.js +102 -3
- package/dist/ui/widget.zod.d.ts +61 -28
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
- package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
- package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
- package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
- package/json-schema/{system → api}/ApiEndpoint.json +3 -1
- package/json-schema/{system → api}/ApiRoutes.json +7 -7
- package/json-schema/{system → api}/Discovery.json +7 -7
- package/json-schema/api/ExportRequest.json +402 -438
- package/json-schema/api/HttpMethod.json +18 -0
- package/json-schema/api/RouteCategory.json +17 -0
- package/json-schema/api/RouteDefinition.json +77 -0
- package/json-schema/api/RouterConfig.json +117 -0
- package/json-schema/{data → automation}/Flow.json +31 -1
- package/json-schema/{data → automation}/FlowEdge.json +9 -0
- package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
- package/json-schema/automation/WorkflowRule.json +1031 -0
- package/json-schema/data/AggregationNode.json +23 -0
- package/json-schema/data/AsyncValidation.json +49 -2
- package/json-schema/data/ComparisonOperator.json +52 -0
- package/json-schema/data/ConditionalValidation.json +693 -46
- package/json-schema/data/CrossFieldValidation.json +33 -2
- package/json-schema/data/CurrencyConfig.json +35 -0
- package/json-schema/data/CurrencyValue.json +26 -0
- package/json-schema/data/CustomValidator.json +37 -10
- package/json-schema/data/Field.json +30 -0
- package/json-schema/data/FieldOperators.json +78 -0
- package/json-schema/data/FieldReference.json +19 -0
- package/json-schema/data/FormatValidation.json +33 -2
- package/json-schema/data/Hook.json +95 -0
- package/json-schema/data/HookContext.json +88 -0
- package/json-schema/data/HookEvent.json +29 -0
- package/json-schema/data/Index.json +10 -0
- package/json-schema/data/JSONValidation.json +85 -0
- package/json-schema/data/JoinNode.json +197 -213
- package/json-schema/data/{TriggerAction.json → JoinStrategy.json} +6 -5
- package/json-schema/data/NormalizedFilter.json +234 -0
- package/json-schema/data/Object.json +1580 -28
- package/json-schema/data/ObjectCapabilities.json +30 -12
- package/json-schema/data/Query.json +246 -262
- package/json-schema/data/RangeOperator.json +26 -0
- package/json-schema/data/ScriptValidation.json +33 -2
- package/json-schema/data/SearchConfig.json +36 -0
- package/json-schema/data/StateMachineValidation.json +33 -2
- package/json-schema/data/UniquenessValidation.json +33 -2
- package/json-schema/data/ValidationRule.json +693 -46
- package/json-schema/{system → driver}/Datasource.json +35 -0
- package/json-schema/{system → driver}/DriverCapabilities.json +10 -0
- package/json-schema/{system → driver}/DriverInterface.json +10 -0
- package/json-schema/{system → driver}/DriverOptions.json +11 -0
- package/json-schema/driver/MongoConfig.json +82 -0
- package/json-schema/driver/PostgresConfig.json +98 -0
- package/json-schema/hub/BillOfMaterials.json +70 -0
- package/json-schema/hub/ComposerRequest.json +86 -0
- package/json-schema/hub/ComposerResponse.json +2645 -0
- package/json-schema/hub/ConflictReport.json +53 -0
- package/json-schema/hub/DependencyRequirement.json +36 -0
- package/json-schema/hub/DeploymentTarget.json +38 -0
- package/json-schema/hub/HubSpace.json +279 -0
- package/json-schema/{system → hub}/License.json +11 -3
- package/json-schema/hub/MarketplacePlugin.json +141 -0
- package/json-schema/hub/PluginAuthor.json +26 -0
- package/json-schema/hub/PluginPricing.json +43 -0
- package/json-schema/hub/SpaceSubscription.json +77 -0
- package/json-schema/hub/SubscriptionStatus.json +16 -0
- package/json-schema/{system → hub}/Tenant.json +3 -5
- package/json-schema/kernel/FileMetadata.json +43 -0
- package/json-schema/kernel/KernelContext.json +62 -0
- package/json-schema/kernel/LogEntry.json +63 -0
- package/json-schema/kernel/LogFormat.json +15 -0
- package/json-schema/kernel/LogLevel.json +17 -0
- package/json-schema/kernel/LoggerConfig.json +70 -0
- package/json-schema/kernel/Manifest.json +2557 -0
- package/json-schema/{system → kernel}/PluginContext.json +8 -1
- package/json-schema/kernel/RuntimeMode.json +16 -0
- package/json-schema/kernel/ScopedStorageConfig.json +54 -0
- package/json-schema/kernel/StorageAdapterType.json +17 -0
- package/json-schema/kernel/StorageScope.json +18 -0
- package/json-schema/permission/CriteriaSharingRule.json +82 -0
- package/json-schema/{data → permission}/OWDModel.json +2 -1
- package/json-schema/{data → permission}/ObjectPermission.json +15 -0
- package/json-schema/permission/OwnerSharingRule.json +102 -0
- package/json-schema/{data → permission}/PermissionSet.json +15 -0
- package/json-schema/permission/ShareRecipientType.json +16 -0
- package/json-schema/{data → permission}/SharingLevel.json +2 -1
- package/json-schema/permission/SharingRule.json +182 -0
- package/json-schema/{data → permission}/SharingRuleType.json +1 -3
- package/json-schema/ui/FieldWidgetProps.json +30 -0
- package/json-schema/ui/FormField.json +61 -0
- package/json-schema/ui/FormSection.json +60 -1
- package/json-schema/ui/FormView.json +257 -2
- package/json-schema/{system → ui}/HttpMethod.json +2 -2
- package/json-schema/ui/HttpRequest.json +46 -0
- package/json-schema/ui/ListColumn.json +57 -0
- package/json-schema/ui/ListView.json +249 -4
- package/json-schema/ui/PaginationConfig.json +26 -0
- package/json-schema/ui/SelectionConfig.json +22 -0
- package/json-schema/ui/View.json +1012 -12
- package/json-schema/ui/ViewData.json +142 -0
- package/llms.txt +182 -0
- package/package.json +38 -16
- package/prompts/README.md +18 -0
- package/prompts/architecture.md +81 -0
- package/prompts/implement-objectai.md +39 -0
- package/prompts/implement-objectos.md +48 -0
- package/prompts/implement-objectql.md +39 -0
- package/prompts/implement-objectui.md +46 -0
- package/prompts/instructions.md +91 -0
- package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
- package/dist/data/flow.zod.d.ts.map +0 -1
- package/dist/data/permission.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.d.ts +0 -63
- package/dist/data/sharing.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.js +0 -57
- package/dist/data/trigger.zod.d.ts +0 -354
- package/dist/data/trigger.zod.d.ts.map +0 -1
- package/dist/data/trigger.zod.js +0 -195
- package/dist/data/workflow.zod.d.ts +0 -986
- package/dist/data/workflow.zod.d.ts.map +0 -1
- package/dist/system/api.zod.d.ts.map +0 -1
- package/dist/system/auth-protocol.d.ts.map +0 -1
- package/dist/system/auth.zod.d.ts.map +0 -1
- package/dist/system/datasource.zod.d.ts.map +0 -1
- package/dist/system/discovery.zod.d.ts.map +0 -1
- package/dist/system/driver.zod.d.ts +0 -1631
- package/dist/system/driver.zod.d.ts.map +0 -1
- package/dist/system/identity.zod.d.ts.map +0 -1
- package/dist/system/license.zod.d.ts.map +0 -1
- package/dist/system/manifest.zod.d.ts +0 -397
- package/dist/system/manifest.zod.d.ts.map +0 -1
- package/dist/system/organization.zod.d.ts.map +0 -1
- package/dist/system/plugin.zod.d.ts.map +0 -1
- package/dist/system/policy.zod.d.ts.map +0 -1
- package/dist/system/realtime.zod.d.ts.map +0 -1
- package/dist/system/role.zod.d.ts.map +0 -1
- package/dist/system/tenant.zod.d.ts.map +0 -1
- package/dist/system/territory.zod.d.ts.map +0 -1
- package/dist/system/webhook.zod.d.ts.map +0 -1
- package/json-schema/README.md +0 -127
- package/json-schema/data/FieldMapping.json +0 -83
- package/json-schema/data/FilterNode.json +0 -52
- package/json-schema/data/FilterOperator.json +0 -26
- package/json-schema/data/LogicOperator.json +0 -14
- package/json-schema/data/Mapping.json +0 -598
- package/json-schema/data/SharingRule.json +0 -58
- package/json-schema/data/TransformType.json +0 -18
- package/json-schema/data/Trigger.json +0 -73
- package/json-schema/data/TriggerContext.json +0 -61
- package/json-schema/data/TriggerTiming.json +0 -13
- package/json-schema/system/Manifest.json +0 -315
- /package/dist/{system → api}/realtime.zod.js +0 -0
- /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
- /package/dist/{system → auth}/identity.zod.js +0 -0
- /package/dist/{system → auth}/organization.zod.js +0 -0
- /package/dist/{system → auth}/policy.zod.js +0 -0
- /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
- /package/dist/{system → auth}/role.zod.d.ts +0 -0
- /package/dist/{system → auth}/role.zod.js +0 -0
- /package/dist/{system → automation}/webhook.zod.js +0 -0
- /package/dist/{system → permission}/territory.zod.d.ts +0 -0
- /package/dist/{system → permission}/territory.zod.js +0 -0
- /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
- /package/json-schema/{system → api}/ApiMapping.json +0 -0
- /package/json-schema/{system → api}/Presence.json +0 -0
- /package/json-schema/{system → api}/PresenceStatus.json +0 -0
- /package/json-schema/{system → api}/RateLimit.json +0 -0
- /package/json-schema/{system → api}/RealtimeAction.json +0 -0
- /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
- /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
- /package/json-schema/{system → api}/Subscription.json +0 -0
- /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
- /package/json-schema/{system → api}/TransportProtocol.json +0 -0
- /package/json-schema/{system → auth}/Account.json +0 -0
- /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
- /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
- /package/json-schema/{system → auth}/AuthConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
- /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
- /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
- /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
- /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
- /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
- /package/json-schema/{system → auth}/Invitation.json +0 -0
- /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
- /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
- /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
- /package/json-schema/{system → auth}/Member.json +0 -0
- /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
- /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
- /package/json-schema/{system → auth}/Organization.json +0 -0
- /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
- /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
- /package/json-schema/{system → auth}/Policy.json +0 -0
- /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
- /package/json-schema/{system → auth}/Role.json +0 -0
- /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
- /package/json-schema/{system → auth}/Session.json +0 -0
- /package/json-schema/{system → auth}/SessionConfig.json +0 -0
- /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
- /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
- /package/json-schema/{system → auth}/User.json +0 -0
- /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
- /package/json-schema/{system → auth}/VerificationToken.json +0 -0
- /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
- /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
- /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
- /package/json-schema/{data → automation}/FlowNode.json +0 -0
- /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
- /package/json-schema/{data → automation}/FlowVariable.json +0 -0
- /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
- /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
- /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
- /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
- /package/json-schema/{system → automation}/Webhook.json +0 -0
- /package/json-schema/{system → automation}/WebhookReceiver.json +0 -0
- /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
- /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
- /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
- /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
- /package/json-schema/{system → driver}/DatasourceCapabilities.json +0 -0
- /package/json-schema/{system → driver}/DriverDefinition.json +0 -0
- /package/json-schema/{system → driver}/DriverType.json +0 -0
- /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/Feature.json +0 -0
- /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
- /package/json-schema/{system → hub}/MetricType.json +0 -0
- /package/json-schema/{system → hub}/Plan.json +0 -0
- /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
- /package/json-schema/{system → hub}/TenantQuota.json +0 -0
- /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
- /package/json-schema/{system → kernel}/I18nContext.json +0 -0
- /package/json-schema/{system → kernel}/Logger.json +0 -0
- /package/json-schema/{system → kernel}/ObjectQLClient.json +0 -0
- /package/json-schema/{system → kernel}/Plugin.json +0 -0
- /package/json-schema/{system → kernel}/PluginLifecycle.json +0 -0
- /package/json-schema/{system → kernel}/Router.json +0 -0
- /package/json-schema/{system → kernel}/Scheduler.json +0 -0
- /package/json-schema/{system → kernel}/ScopedStorage.json +0 -0
- /package/json-schema/{system → kernel}/SystemAPI.json +0 -0
- /package/json-schema/{data → permission}/FieldPermission.json +0 -0
- /package/json-schema/{system → permission}/Territory.json +0 -0
- /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
- /package/json-schema/{system → permission}/TerritoryType.json +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ViewData",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ViewData": {
|
|
5
|
+
"anyOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"provider": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "object"
|
|
12
|
+
},
|
|
13
|
+
"object": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Target object name"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"provider",
|
|
20
|
+
"object"
|
|
21
|
+
],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"provider": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"const": "api"
|
|
30
|
+
},
|
|
31
|
+
"read": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"url": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "API endpoint URL"
|
|
37
|
+
},
|
|
38
|
+
"method": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"GET",
|
|
42
|
+
"POST",
|
|
43
|
+
"PUT",
|
|
44
|
+
"PATCH",
|
|
45
|
+
"DELETE"
|
|
46
|
+
],
|
|
47
|
+
"default": "GET",
|
|
48
|
+
"description": "HTTP method"
|
|
49
|
+
},
|
|
50
|
+
"headers": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"description": "Custom HTTP headers"
|
|
56
|
+
},
|
|
57
|
+
"params": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": {},
|
|
60
|
+
"description": "Query parameters"
|
|
61
|
+
},
|
|
62
|
+
"body": {
|
|
63
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"url"
|
|
68
|
+
],
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"description": "Configuration for fetching data"
|
|
71
|
+
},
|
|
72
|
+
"write": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"url": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "API endpoint URL"
|
|
78
|
+
},
|
|
79
|
+
"method": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"enum": [
|
|
82
|
+
"GET",
|
|
83
|
+
"POST",
|
|
84
|
+
"PUT",
|
|
85
|
+
"PATCH",
|
|
86
|
+
"DELETE"
|
|
87
|
+
],
|
|
88
|
+
"default": "GET",
|
|
89
|
+
"description": "HTTP method"
|
|
90
|
+
},
|
|
91
|
+
"headers": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"description": "Custom HTTP headers"
|
|
97
|
+
},
|
|
98
|
+
"params": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": {},
|
|
101
|
+
"description": "Query parameters"
|
|
102
|
+
},
|
|
103
|
+
"body": {
|
|
104
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"url"
|
|
109
|
+
],
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"description": "Configuration for submitting data (for forms/editable tables)"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": [
|
|
115
|
+
"provider"
|
|
116
|
+
],
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"provider": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"const": "value"
|
|
125
|
+
},
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {},
|
|
129
|
+
"description": "Static data array"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": [
|
|
133
|
+
"provider",
|
|
134
|
+
"items"
|
|
135
|
+
],
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
142
|
+
}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# @objectstack/spec Context for AI Agents
|
|
2
|
+
|
|
3
|
+
> **SYSTEM NOTE**: This file provides a high-level summary of the ObjectStack Protocol to help LLMs understand the codebase structure and intent.
|
|
4
|
+
|
|
5
|
+
## 1. Architecture Overview (The "Three-Layer Model")
|
|
6
|
+
|
|
7
|
+
ObjectStack is a metadata-driven "Post-SaaS Operating System".
|
|
8
|
+
It is divided into three layers, reflected in the import paths:
|
|
9
|
+
|
|
10
|
+
### Layer 1: ObjectQL (`@objectstack/spec/data`)
|
|
11
|
+
**The Business Kernel**. Defines "What Data Exists".
|
|
12
|
+
- **`ObjectSchema`**: Defines database tables (postgres/mongo agnostic).
|
|
13
|
+
- **`FieldSchema`**: Defines columns with types (`text`, `number`, `lookup`, `formula`).
|
|
14
|
+
- **`QuerySchema`**: A JSON-based AST for querying data (replaces SQL).
|
|
15
|
+
- **`DriverInterface`**: The contract for database adapters.
|
|
16
|
+
|
|
17
|
+
### Layer 2: ObjectOS (`@objectstack/spec/system` & `@objectstack/spec/api`)
|
|
18
|
+
**The Runtime Kernel**. Defines "How System Operates".
|
|
19
|
+
- **`ManifestSchema`**: `objectstack.config.ts` configuration.
|
|
20
|
+
- **`IdentitySchema`**: Users, Roles, and Authentication.
|
|
21
|
+
- **`EventSchema`**: System bus and Webhooks.
|
|
22
|
+
- **`EndpointSchema`**: API Gateway configuration.
|
|
23
|
+
|
|
24
|
+
### Layer 3: ObjectUI (`@objectstack/spec/ui`)
|
|
25
|
+
**The Presentation Layer**. Defines "How Users Interact".
|
|
26
|
+
- **`AppSchema`**: Navigation menus and branding.
|
|
27
|
+
- **`ViewSchema`**: Layouts for data (Grid, Kanban, Calendar).
|
|
28
|
+
- **`ActionSchema`**: Buttons and triggers.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 2. Coding Patterns (Zod First)
|
|
33
|
+
|
|
34
|
+
All definitions are virtually **Zod Schemas**.
|
|
35
|
+
- **Configuration Keys**: `camelCase` (e.g., `maxLength`, `referenceFilters`).
|
|
36
|
+
- **Data Values**: `snake_case` (e.g., `object: 'project_task'`, `type: 'lookup'`).
|
|
37
|
+
|
|
38
|
+
### Example: Defining an Object
|
|
39
|
+
```typescript
|
|
40
|
+
import { ObjectSchema } from '@objectstack/spec/data';
|
|
41
|
+
|
|
42
|
+
// Describes a "Task" object
|
|
43
|
+
const taskObject = {
|
|
44
|
+
name: 'project_task', // snake_case table name
|
|
45
|
+
label: 'Project Task',
|
|
46
|
+
fields: {
|
|
47
|
+
status: { type: 'select', options: ['todo', 'done'] },
|
|
48
|
+
priority: { type: 'number', defaultValue: 0 }
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Example: Building a Query
|
|
54
|
+
```typescript
|
|
55
|
+
import { QuerySchema } from '@objectstack/spec/data';
|
|
56
|
+
|
|
57
|
+
// JSON-based SQL alternative
|
|
58
|
+
const query = {
|
|
59
|
+
object: 'project_task',
|
|
60
|
+
filters: [
|
|
61
|
+
['status', '=', 'todo'],
|
|
62
|
+
'and',
|
|
63
|
+
['priority', '>', 1]
|
|
64
|
+
],
|
|
65
|
+
sort: [{ field: 'created_at', order: 'desc' }],
|
|
66
|
+
top: 10
|
|
67
|
+
};
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. Key exports by Namespace
|
|
73
|
+
|
|
74
|
+
### `import * as Data from '@objectstack/spec/data'`
|
|
75
|
+
- `ObjectSchema`, `FieldSchema`: Logic & Storage definition.
|
|
76
|
+
- `QuerySchema`, `FilterSchema`: Data retrieval AST.
|
|
77
|
+
- `DriverInterface`, `DatasourceSchema`: Database connectivity.
|
|
78
|
+
- `WorkflowSchema`, `FlowSchema`: Automation logic.
|
|
79
|
+
|
|
80
|
+
### `import * as UI from '@objectstack/spec/ui'`
|
|
81
|
+
- `ViewSchema`: `type: 'grid' | 'kanban' | 'calendar'`.
|
|
82
|
+
- `FormSchema`: `layout: 'simple' | 'tabbed'`.
|
|
83
|
+
- `DashboardSchema`: Widget composition.
|
|
84
|
+
|
|
85
|
+
### `import * as System from '@objectstack/spec/system'`
|
|
86
|
+
- `PluginSchema`: Module lifecycle.
|
|
87
|
+
- `EventSchema`: Pub/Sub definitions.
|
|
88
|
+
- `PolicySchema`: Security rules.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 4. Implementing the Protocol (Engine Devs)
|
|
93
|
+
|
|
94
|
+
If you are building an ObjectQL engine or Driver in another repository:
|
|
95
|
+
|
|
96
|
+
### ObjectQL Implementation (Data Layer)
|
|
97
|
+
*Reference: `node_modules/@objectstack/spec/prompts/implement-objectql.md`*
|
|
98
|
+
|
|
99
|
+
Use `z.infer` to derive types directly from the protocol. Do not manually re-declare interfaces.
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { DriverInterfaceSchema, type DriverInterface } from '@objectstack/spec/data';
|
|
103
|
+
// ...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### ObjectOS Implementation (System Layer)
|
|
107
|
+
*Reference: `node_modules/@objectstack/spec/prompts/implement-objectos.md`*
|
|
108
|
+
|
|
109
|
+
The Runtime Kernel must be bootstrapped from the Manifest.
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import { ManifestSchema, IdentitySchema } from '@objectstack/spec/system';
|
|
113
|
+
import { type RequestEnvelope } from '@objectstack/spec/api';
|
|
114
|
+
|
|
115
|
+
// 1. Boot: Validate Config
|
|
116
|
+
const config = ManifestSchema.parse(rawConfig);
|
|
117
|
+
|
|
118
|
+
// 2. Runtime: Validate Identity
|
|
119
|
+
function handleRequest(user: z.infer<typeof IdentitySchema>) { ... }
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### ObjectUI Implementation (View Layer)
|
|
123
|
+
*Reference: `node_modules/@objectstack/spec/prompts/implement-objectui.md`*
|
|
124
|
+
|
|
125
|
+
The UI must be Server-Driven (SDUI), rendering structures defined by the protocol.
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { ViewSchema, ActionSchema } from '@objectstack/spec/ui';
|
|
129
|
+
|
|
130
|
+
// ✅ Valid: Components accept Schema Props
|
|
131
|
+
function GridView({ config }: { config: z.infer<typeof ViewSchema> }) {
|
|
132
|
+
// Render based on config.columns, config.filters...
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### ObjectAI Implementation (Intelligence Layer)
|
|
137
|
+
*Reference: `node_modules/@objectstack/spec/prompts/implement-objectai.md`*
|
|
138
|
+
|
|
139
|
+
AI Agents and RAG pipelines must be schema-aware and permission-safe.
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import { AgentSchema, RAGPipelineSchema } from '@objectstack/spec/ai';
|
|
143
|
+
|
|
144
|
+
// Agents are configured via Protocol, not arbitrary prompts
|
|
145
|
+
const supportAgent = AgentSchema.parse({
|
|
146
|
+
role: 'support',
|
|
147
|
+
tools: ['search_knowledge_base', 'create_ticket']
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 1. Strict Type Compliance
|
|
152
|
+
Use `z.infer` to derive types directly from the protocol. Do not manually re-declare interfaces.
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { DriverInterfaceSchema, type DriverInterface } from '@objectstack/spec/data';
|
|
156
|
+
import { z } from 'zod';
|
|
157
|
+
|
|
158
|
+
// ✅ CORRECT: Implementing the interface strictly
|
|
159
|
+
export class PostgresDriver implements DriverInterface {
|
|
160
|
+
name = 'postgres';
|
|
161
|
+
version = '1.0.0';
|
|
162
|
+
supports = { transactions: true, ... };
|
|
163
|
+
|
|
164
|
+
// Implementation matches the Zod schema exactly
|
|
165
|
+
async find(object: string, query: z.infer<typeof QuerySchema>) {
|
|
166
|
+
// ...
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 2. Runtime Validation
|
|
172
|
+
The engine **MUST** validate inputs against the Zod schemas before processing.
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { ObjectSchema } from '@objectstack/spec/data';
|
|
176
|
+
|
|
177
|
+
function registerObject(rawConfig: unknown) {
|
|
178
|
+
// CRITICAL: Parse strictly throws if protocol is violated
|
|
179
|
+
const config = ObjectSchema.parse(rawConfig);
|
|
180
|
+
// ... proceed
|
|
181
|
+
}
|
|
182
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/spec",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "ObjectStack Protocol & Specification - TypeScript Interfaces, JSON Schemas, and Convention Configurations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,42 +9,54 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"default": "./dist/index.js"
|
|
11
11
|
},
|
|
12
|
+
"./driver": {
|
|
13
|
+
"types": "./dist/driver/index.d.ts",
|
|
14
|
+
"default": "./dist/driver/index.js"
|
|
15
|
+
},
|
|
12
16
|
"./data": {
|
|
13
17
|
"types": "./dist/data/index.d.ts",
|
|
14
18
|
"default": "./dist/data/index.js"
|
|
15
19
|
},
|
|
16
|
-
"./ui": {
|
|
17
|
-
"types": "./dist/ui/index.d.ts",
|
|
18
|
-
"default": "./dist/ui/index.js"
|
|
19
|
-
},
|
|
20
20
|
"./system": {
|
|
21
21
|
"types": "./dist/system/index.d.ts",
|
|
22
22
|
"default": "./dist/system/index.js"
|
|
23
23
|
},
|
|
24
|
+
"./auth": {
|
|
25
|
+
"types": "./dist/auth/index.d.ts",
|
|
26
|
+
"default": "./dist/auth/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./kernel": {
|
|
29
|
+
"types": "./dist/kernel/index.d.ts",
|
|
30
|
+
"default": "./dist/kernel/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./hub": {
|
|
33
|
+
"types": "./dist/hub/index.d.ts",
|
|
34
|
+
"default": "./dist/hub/index.js"
|
|
35
|
+
},
|
|
24
36
|
"./ai": {
|
|
25
37
|
"types": "./dist/ai/index.d.ts",
|
|
26
38
|
"default": "./dist/ai/index.js"
|
|
27
39
|
},
|
|
40
|
+
"./automation": {
|
|
41
|
+
"types": "./dist/automation/index.d.ts",
|
|
42
|
+
"default": "./dist/automation/index.js"
|
|
43
|
+
},
|
|
28
44
|
"./api": {
|
|
29
45
|
"types": "./dist/api/index.d.ts",
|
|
30
46
|
"default": "./dist/api/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./ui": {
|
|
49
|
+
"types": "./dist/ui/index.d.ts",
|
|
50
|
+
"default": "./dist/ui/index.js"
|
|
31
51
|
}
|
|
32
52
|
},
|
|
33
53
|
"files": [
|
|
34
54
|
"dist",
|
|
35
55
|
"json-schema",
|
|
56
|
+
"prompts",
|
|
57
|
+
"llms.txt",
|
|
36
58
|
"README.md"
|
|
37
59
|
],
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "pnpm gen:schema && pnpm gen:docs && tsc",
|
|
40
|
-
"dev": "tsc --watch",
|
|
41
|
-
"clean": "rm -rf dist",
|
|
42
|
-
"gen:schema": "tsx scripts/build-schemas.ts",
|
|
43
|
-
"gen:docs": "tsx scripts/build-docs.ts",
|
|
44
|
-
"test": "vitest run",
|
|
45
|
-
"test:watch": "vitest",
|
|
46
|
-
"test:coverage": "vitest run --coverage"
|
|
47
|
-
},
|
|
48
60
|
"keywords": [
|
|
49
61
|
"objectstack",
|
|
50
62
|
"protocol",
|
|
@@ -70,5 +82,15 @@
|
|
|
70
82
|
},
|
|
71
83
|
"publishConfig": {
|
|
72
84
|
"access": "public"
|
|
85
|
+
},
|
|
86
|
+
"scripts": {
|
|
87
|
+
"build": "pnpm gen:schema && pnpm gen:docs && tsc",
|
|
88
|
+
"dev": "tsc --watch",
|
|
89
|
+
"clean": "rm -rf dist",
|
|
90
|
+
"gen:schema": "tsx scripts/build-schemas.ts",
|
|
91
|
+
"gen:docs": "tsx scripts/build-docs.ts",
|
|
92
|
+
"test": "vitest run",
|
|
93
|
+
"test:watch": "vitest",
|
|
94
|
+
"test:coverage": "vitest run --coverage"
|
|
73
95
|
}
|
|
74
|
-
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AI Context & Prompts
|
|
2
|
+
|
|
3
|
+
This directory contains architectural context and system prompts designed to help AI Agents (Copilot, Cursor, OpenAI) understand the ObjectStack protocol.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
If you are building an AI-assisted tool or just want your IDE AI to be smarter about ObjectStack, you can feed these files into the context window.
|
|
8
|
+
|
|
9
|
+
* **`architecture.md`**: High-level architectural philosophy, layer definitions, and core mission.
|
|
10
|
+
* **`instructions.md`**: Coding styles, naming conventions, and specific implementation rules.
|
|
11
|
+
|
|
12
|
+
## Example (System Prompt)
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
You are an expert ObjectStack developer.
|
|
16
|
+
Use the context provided in @objectstack/spec/prompts/architecture.md to understand the system design.
|
|
17
|
+
Follow the rules in @objectstack/spec/prompts/instructions.md when writing code.
|
|
18
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
🌌 ObjectStack Master Architecture Context
|
|
2
|
+
|
|
3
|
+
Role: You are the Chief Architect and CPO of ObjectStack Inc.
|
|
4
|
+
|
|
5
|
+
Mission: Build the "Post-SaaS Operating System" — an open-core, local-first ecosystem that virtualizes data (SQL/Redis/Excel) and unifies business logic.
|
|
6
|
+
1. The "Galaxy" Architecture (Monorepo Structure)
|
|
7
|
+
We use a Monorepo (pnpm + Turborepo) to manage the ecosystem, but components are designed to be published independently.
|
|
8
|
+
Directory Structure & Responsibilities
|
|
9
|
+
* packages/protocol (The Constitution) [Apache 2.0]
|
|
10
|
+
* CRITICAL: Contains the shared manifest.schema.json, TypeScript interfaces, and plugin lifecycle hooks (onInstall, onEnable).
|
|
11
|
+
* Rule: All other packages depend on this. No circular dependencies.
|
|
12
|
+
* packages/objectql (Data Engine) [Apache 2.0]
|
|
13
|
+
* Universal Data Protocol. Compiles GraphQL-like queries into SQL/Redis commands.
|
|
14
|
+
* packages/objectos (Business Kernel) [AGPL v3]
|
|
15
|
+
* The Crown Jewel. Identity, RBAC, Workflow, and Audit Logging.
|
|
16
|
+
* License Note: Strict AGPL to prevent SaaS wrapping by competitors.
|
|
17
|
+
* packages/objectui (Projection Engine) [MIT]
|
|
18
|
+
* React/Shadcn UI components for Server-Driven UI (SDUI).
|
|
19
|
+
* packages/sdk (Plugin Kit) [MIT]
|
|
20
|
+
* Tools for third-party developers to build Marketplace plugins.
|
|
21
|
+
* drivers/* [Apache 2.0]
|
|
22
|
+
* driver-postgres, driver-redis, driver-excel.
|
|
23
|
+
* Must implement interfaces defined in packages/protocol.
|
|
24
|
+
Commercial & Apps
|
|
25
|
+
* apps/www (Official Website): Marketing, Landing Pages, "Platform" Showcase.
|
|
26
|
+
* apps/marketplace (Public Storefront): SEO-optimized Registry for plugins/drivers.
|
|
27
|
+
* apps/cloud (SaaS Console): Multi-tenant management dashboard (Private).
|
|
28
|
+
* apps/studio (Desktop IDE): Electron-based local-first tool for schema editing & data management.
|
|
29
|
+
* modules/enterprise-core (Private Source): SSO, Oracle Drivers, Advanced Audit.
|
|
30
|
+
|
|
31
|
+
2. Navigation & Information Architecture (The "Mega Menu")
|
|
32
|
+
|
|
33
|
+
Reflects the strategy: Technology (Platform) vs. Service (Enterprise).
|
|
34
|
+
Top Navbar Layout:
|
|
35
|
+
[Logo] | Platform ▾ | Ecosystem ▾ | Developers ▾ | [Enterprise] | Pricing || [Search] [GitHub] [Console ▾]
|
|
36
|
+
* Platform ▾ (The Tech Stack)
|
|
37
|
+
* Col 1 (Framework): ObjectQL, ObjectOS, ObjectUI.
|
|
38
|
+
* Col 2 (Tools): Object Studio (Highlight: Local-First IDE), ObjectCloud, CLI.
|
|
39
|
+
* Footer: "Community vs. Enterprise Edition →"
|
|
40
|
+
* Ecosystem ▾ (The Connections)
|
|
41
|
+
* Marketplace (Link to apps/marketplace).
|
|
42
|
+
* Drivers: Icons for Postgres, Redis, Excel, Salesforce.
|
|
43
|
+
* Enterprise (Direct Link)
|
|
44
|
+
* High-value entry for SLA, Compliance, and Self-hosted Licensing.
|
|
45
|
+
* Console ▾ (Auth Entry)
|
|
46
|
+
* ObjectCloud (SaaS Login).
|
|
47
|
+
* Enterprise Portal (License Management).
|
|
48
|
+
*
|
|
49
|
+
3. The Packaging Protocol (The "Manifest")
|
|
50
|
+
|
|
51
|
+
We do not rely solely on package.json. We use a strict ObjectStack Manifest standard.
|
|
52
|
+
File: objectstack.config.ts (or strict JSON inside package.json)
|
|
53
|
+
Schema Location: packages/protocol/schemas/manifest.schema.json
|
|
54
|
+
Key Fields:
|
|
55
|
+
* type: app | plugin | driver
|
|
56
|
+
* navigation: Structured navigation menu tree.
|
|
57
|
+
* contributes: Register platform extensions (e.g., custom kinds).
|
|
58
|
+
* permissions: Array of requested capabilities (e.g., finance.read).
|
|
59
|
+
* entities: Path patterns to auto-load Schema files (e.g., ./src/schemas/*.gql).
|
|
60
|
+
* lifecycle: Hooks for onInstall, onEnable.
|
|
61
|
+
4. Strategic Rules for AI Generation
|
|
62
|
+
A. Licensing & Headers
|
|
63
|
+
* When generating code for packages/objectos, ALWAYS add the AGPL v3 header.
|
|
64
|
+
* When generating code for packages/objectql, use Apache 2.0.
|
|
65
|
+
* When generating code for apps/studio or apps/www, use MIT.
|
|
66
|
+
B. Terminology
|
|
67
|
+
* NEVER say "SaaS Product" when referring to the open source core. Call it the "Framework" or "Engine".
|
|
68
|
+
* ALWAYS emphasize "Polyglot Data". We are not just a SQL wrapper; we handle Redis and Excel native files.
|
|
69
|
+
* Studio vs. Cloud: Studio is for "Local Data & Development". Cloud is for "Deployment & Collaboration".
|
|
70
|
+
C. Coding Style
|
|
71
|
+
* Monorepo: Use generic imports (e.g., import { User } from '@objectstack/protocol') instead of relative paths like ../../packages/protocol.
|
|
72
|
+
* UI: Use Shadcn UI + Tailwind CSS. Dark mode default for developer tools (Studio/Console).
|
|
73
|
+
* Data Fetching: All UI components must be Server-Driven or strongly typed against the Schema.
|
|
74
|
+
5. Execution Context
|
|
75
|
+
When I ask you to build a feature, first determine:
|
|
76
|
+
* Which layer does it belong to? (Protocol? Engine? UI?)
|
|
77
|
+
* Is it Open Source or Commercial?
|
|
78
|
+
* Does it require updating the Protocol Manifest?
|
|
79
|
+
Example:
|
|
80
|
+
User: "Add a CRM plugin."
|
|
81
|
+
AI: "I will define the CRM data structure in packages/protocol, create a crm-plugin package implementing the manifest.json standard, and register the 'Customer' menu item."
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ObjectAI Implementation Agent
|
|
2
|
+
|
|
3
|
+
**Role:** You are the Lead AI Engineer building the `objectai` intelligent layer.
|
|
4
|
+
**Constraint:** Your implementation must strictly adhere to the `@objectstack/spec` protocol.
|
|
5
|
+
|
|
6
|
+
## 1. Setup
|
|
7
|
+
|
|
8
|
+
You are working in a repository that depends on `@objectstack/spec`.
|
|
9
|
+
Your source of truth is `node_modules/@objectstack/spec`.
|
|
10
|
+
|
|
11
|
+
## 2. Implementation Rules
|
|
12
|
+
|
|
13
|
+
### Rule #1: Protocol-Driven Intelligence
|
|
14
|
+
AI Agents must be defined using `ai/agent.zod.ts`.
|
|
15
|
+
- Do not create ad-hoc agent configurations.
|
|
16
|
+
- Agents must expose their capabilities via standard `tools` definitions.
|
|
17
|
+
|
|
18
|
+
### Rule #2: Schema-Aware RAG
|
|
19
|
+
The RAG pipeline (`ai/rag-pipeline.zod.ts`) must obey ObjectQL security rules.
|
|
20
|
+
- When retrieving documents, the AI **MUST** enforce `PermissionSchema`.
|
|
21
|
+
- Do not allow the LLM to access data the user cannot see (RLS Enforcement).
|
|
22
|
+
|
|
23
|
+
### Rule #3: Orchestration & chaining
|
|
24
|
+
Complex workflows are orchestrated using `ai/orchestration.zod.ts`.
|
|
25
|
+
- Steps must be strongly typed (input/output validated by Zod).
|
|
26
|
+
- Use `ModelRegistrySchema` to select LLM providers (OpenAI, Anthropic, Local).
|
|
27
|
+
|
|
28
|
+
## 3. Workflow
|
|
29
|
+
|
|
30
|
+
1. **Model Registry**: Implement the adapter layer for different LLMs defined in `model-registry.zod.ts`.
|
|
31
|
+
2. **Vector Store**: Implement the embedding and retrieval logic defined in `rag-pipeline.zod.ts`.
|
|
32
|
+
3. **Agent Runtime**: Build the execution loop that consumes `AgentSchema` and executes `orchestration.zod.ts` plans.
|
|
33
|
+
|
|
34
|
+
## 4. Key Files to Watch
|
|
35
|
+
|
|
36
|
+
- `ai/agent.zod.ts`: The Agent definition.
|
|
37
|
+
- `ai/model-registry.zod.ts`: LLM provider configuration.
|
|
38
|
+
- `ai/rag-pipeline.zod.ts`: Vector search and retrieval.
|
|
39
|
+
- `ai/orchestration.zod.ts`: Tool execution and planning.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ObjectOS Implementation Agent
|
|
2
|
+
|
|
3
|
+
**Role:** You are the System Architect building the `objectos` runtime kernel.
|
|
4
|
+
**Constraint:** Your implementation must strictly adhere to the `@objectstack/spec` protocol.
|
|
5
|
+
|
|
6
|
+
## 1. Setup
|
|
7
|
+
|
|
8
|
+
You are working in a repository that depends on `@objectstack/spec`.
|
|
9
|
+
Your source of truth is `node_modules/@objectstack/spec`.
|
|
10
|
+
|
|
11
|
+
## 2. Implementation Rules
|
|
12
|
+
|
|
13
|
+
### Rule #1: Manifest Driven Boot
|
|
14
|
+
The system MUST boot by loading and validating the `objectstack.config.ts`.
|
|
15
|
+
```typescript
|
|
16
|
+
import { ManifestSchema } from '@objectstack/spec/system';
|
|
17
|
+
// The kernel starts here
|
|
18
|
+
const config = ManifestSchema.parse(loadedConfig);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Rule #2: Security First (Identity & Policy)
|
|
22
|
+
All request handlers must validate against `IdentitySchema`.
|
|
23
|
+
No operation proceeds without checking `PolicySchema`.
|
|
24
|
+
```typescript
|
|
25
|
+
import { IdentitySchema, PolicySchema } from '@objectstack/spec/system';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Rule #3: API Gateway Contract
|
|
29
|
+
The HTTP/Gateway layer must perform strict request/response validation using `api/contract.zod.ts` and `api/endpoint.zod.ts`.
|
|
30
|
+
- Incoming requests -> Validate `RequestEnvelope`
|
|
31
|
+
- Outgoing responses -> Wrap in `ResponseEnvelope`
|
|
32
|
+
|
|
33
|
+
### Rule #4: Event Driven Architecture
|
|
34
|
+
System state changes (User created, Schema changed) MUST emit events defined in `EventSchema`.
|
|
35
|
+
Do not invent event formats. Use the standard CloudEvents-compatible structure.
|
|
36
|
+
|
|
37
|
+
## 3. Workflow
|
|
38
|
+
|
|
39
|
+
1. **Define Configuration**: Start by mapping `ManifestSchema` to your runtime config.
|
|
40
|
+
2. **Initialize Identity**: Implement the Auth Provider using `IdentitySchema`.
|
|
41
|
+
3. **Setup Gateway**: Configure routes based on `ApiRoutesSchema` (from `api/discovery.zod.ts`).
|
|
42
|
+
|
|
43
|
+
## 4. Key Files to Watch
|
|
44
|
+
|
|
45
|
+
- `system/manifest.zod.ts`: The "Kernel Configuration".
|
|
46
|
+
- `system/identity.zod.ts`: The "Security Context".
|
|
47
|
+
- `system/events.zod.ts`: The "System Bus".
|
|
48
|
+
- `api/contract.zod.ts`: The "Wire Protocol".
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ObjectQL Implementation Agent
|
|
2
|
+
|
|
3
|
+
**Role:** You are the Lead Engineer building the `objectql` engine.
|
|
4
|
+
**Constraint:** Your implementation must strictly adhere to the `@objectstack/spec` protocol.
|
|
5
|
+
|
|
6
|
+
## 1. Setup
|
|
7
|
+
|
|
8
|
+
You are working in a repository that depends on `@objectstack/spec`.
|
|
9
|
+
Your source of truth is `node_modules/@objectstack/spec`.
|
|
10
|
+
|
|
11
|
+
## 2. Implementation Rules
|
|
12
|
+
|
|
13
|
+
### Rule #1: Never Redefine Types
|
|
14
|
+
Do not create your own interfaces for `Object`, `Field`, or `Query`.
|
|
15
|
+
ALWAYS import them:
|
|
16
|
+
```typescript
|
|
17
|
+
import { type Object, ObjectSchema } from '@objectstack/spec/data';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Rule #2: Schema-First Validation
|
|
21
|
+
Every public method in the Engine must invoke the corresponding Zod parser.
|
|
22
|
+
If the Input does not match `QuerySchema`, the engine must throw a ZodError.
|
|
23
|
+
|
|
24
|
+
### Rule #3: Driver Compliance
|
|
25
|
+
Drivers must implement `DriverInterface` exactly.
|
|
26
|
+
- Do not add public methods to drivers that are not in the spec.
|
|
27
|
+
- If a feature (like `vectorSearch`) is defined in `DriverCapabilities`, you must check that flag before executing logic.
|
|
28
|
+
|
|
29
|
+
## 3. Workflow
|
|
30
|
+
|
|
31
|
+
1. **Read the Spec**: Before writing logic, read the relevant `.zod.ts` file in `@objectstack/spec`.
|
|
32
|
+
2. **Scaffold Types**: Create classes that `implements` the imported types.
|
|
33
|
+
3. **Implement Logic**: Write the code to satisfy the interface.
|
|
34
|
+
|
|
35
|
+
## 4. Key Files to Watch
|
|
36
|
+
|
|
37
|
+
- `data/query.zod.ts`: The AST you need to parse.
|
|
38
|
+
- `data/driver.zod.ts`: The interface you need to call.
|
|
39
|
+
- `data/object.zod.ts`: The metadata structure you need to store.
|