You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
## [Unreleased]
9
9
10
10
### Added
11
+
-**`os auth login` — browser-based device flow (Vercel CLI style)** — Running `os auth login` in an interactive TTY no longer requires typing a password into the terminal. The CLI now calls `POST /api/v1/auth/device/request` to obtain a one-time device code, prints the verification URL, auto-opens the browser, and polls `GET /api/v1/auth/device/token` every 2 s until the user approves. A new Studio page at `/_studio/auth/device?code=…` lets authenticated users (or users who sign in inline) approve the request with one click. The old `--email`/`--password` path is preserved for non-interactive / CI use; `--no-browser` skips auto-open. Server-side: two new endpoints (`/device/request`, `/device/token`) and an approval endpoint (`/device/approve`) added to `plugin-auth`; device codes expire after 5 min and are stored in-memory.
12
+
-**`os auth register` CLI command** — New `os auth register` command creates an account and stores credentials in one step, with interactive prompts (email, name, password) and `--email`/`--name`/`--password`/`--url` flags for non-interactive use.
13
+
-**`os auth login` — already-logged-in guard** — If a valid token already exists in `~/.objectstack/credentials.json`, `os auth login` now prints "Already logged in as \<email\>" and exits 0. Use `os auth logout` first to switch accounts, or pass `--force` to bypass the check.
14
+
-**`os auth logout` — server-side session revocation** — `os auth logout` now calls `POST /api/v1/auth/sign-out` before deleting the local credentials file, so the session is invalidated server-side. The logout completes successfully even if the API call fails (expired/invalid token).
15
+
-**Studio device auth page** — New Studio route `/_studio/auth/device` provides the browser approval UI for the CLI device flow. The page matches the login page visual style (centered card, `bg-muted`, `max-w-sm`, ObjectStack logo). Unauthenticated users see an inline sign-in form; authenticated users see a one-click "Approve CLI Access" button. The `/auth/device` route is added to `PUBLIC_ROUTES` so the auth guard does not redirect before the form renders.
11
16
-**`os auth login` / `register` / `me` now work against multi-project servers** — `@objectstack/client` was sending requests to better-auth's `/sign-in/email`, `/sign-up/email`, `/sign-out`, `/get-session` without an `Origin` header, which better-auth rejected with `MISSING_OR_NULL_ORIGIN: Missing or null Origin` against the default `trustedOrigins: ['http://localhost:*']`. Auth methods now send `Origin: <baseUrl>` automatically. Additionally, the `login()` and `register()` response normalizer now accepts both the wrapped `{ data: { token, user } }` shape and better-auth's flat `{ token, user }` shape so the CLI's `auth login` flow stores the token correctly.
12
17
-**`os projects bind` + `os projects create --artifact` CLI commands** — Third-party developers can now bind a locally-compiled bundle to a multi-project server without raw `curl`. `os projects create --org <id> --name <name> --artifact ./dist/objectstack.json` provisions a new project and seeds the bundle in one call (also supports `--template <id>` for the parity with built-in templates). The new `os projects bind <projectId> --artifact <path>` updates an existing project's `metadata.artifact_path`, with `--build` to run `objectstack compile` first and `--reseed` as a placeholder for the future server-side reseed endpoint. Both flags resolve relative paths to absolute and validate the file exists before issuing the API call. Verified end-to-end: project created via CLI, `/api/v1/projects/{id}/data/account` returns the seeded CRM accounts.
13
18
-**Third-party project binding via `metadata.artifact_path`** — Multi-project `POST /api/v1/cloud/projects` now accepts `metadata.artifact_path` to bind a locally-compiled bundle (e.g. `examples/app-crm/dist/objectstack.json`) into a fresh project. Provisioning loads the JSON, registers schemas in the per-project ObjectQL engine, and seeds the bundle's `data` arrays — same pipeline that built-in templates use. New `TemplateSeeder.seedBundle({ projectId, bundle })` method exposes the seeder for arbitrary bundles. Bind errors (read failure, malformed JSON) are recorded as non-fatal `metadata.artifactBindError` so the project still flips to `active`. Verified end-to-end: query `/api/v1/projects/{id}/data/account` returns the seeded CRM accounts.
Honest state of the platform as of 2026-04-25, **re-classified under the Phase
446
+
Honest state of the platform as of 2026-04-26, **re-classified under the Phase
447
447
1 code-first model**. Every future architectural decision should preserve Built,
448
448
reduce Drift, and advance Missing.
449
449
@@ -460,6 +460,12 @@ reduce Drift, and advance Missing.
460
460
-**Scaffolded TS file tree.**`create-objectstack` emits a `defineStack()` entry point plus split-out `src/objects/*.ts`, `src/views/*.ts` etc. - [packages/create-objectstack/src/index.ts](packages/create-objectstack/src/index.ts).
461
461
-**ObjectOS metadata DB bridge removed.**`MetadataPlugin` no longer registers `sys_metadata` / `sys_metadata_history` into the ObjectOS manifest and no longer auto-connects ObjectQL to a `DatabaseLoader`; runtime metadata is hydrated from files or artifacts only - [packages/metadata/src/plugin.ts](packages/metadata/src/plugin.ts).
462
462
-**JSON-payload metadata storage.**`sys_metadata.metadata` column is already a textarea-shaped JSON payload column - [packages/metadata/src/objects/sys-metadata.object.ts](packages/metadata/src/objects/sys-metadata.object.ts). (The *location* of the table still needs to move to the control plane - see Drift.)
463
+
-**Project artifact envelope schema (M1).**`ProjectArtifactSchema` v0 exists with `schemaVersion`, `projectId`, `commitId`, `checksum`, `metadata`, `functions`, `manifest`, and reserved `payloadRef` - [packages/spec/src/cloud/project-artifact.zod.ts](packages/spec/src/cloud/project-artifact.zod.ts).
464
+
-**Project artifact path binding.** Multi-project provisioning accepts `metadata.artifact_path`, and `os projects create --artifact` / `os projects bind --artifact` wire local compiled bundles into existing projects - [packages/cli/src/commands/projects/create.ts](packages/cli/src/commands/projects/create.ts), [packages/cli/src/commands/projects/bind.ts](packages/cli/src/commands/projects/bind.ts).
465
+
-**Live kernel bundle resolver.** Project kernels read `sys_project.metadata.artifact_path` / `artifact_paths[]`, with `OBJECTSTACK_PROJECT_ARTIFACTS` and `OBJECTSTACK_PROJECT_ARTIFACT_ROOT` overrides for local development - [apps/server/server/fs-app-bundle-resolver.ts](apps/server/server/fs-app-bundle-resolver.ts).
466
+
-**Object identity is single-sourced on `name`.**`ObjectSchemaBase.namespace` has been removed; package namespace remains internal registry metadata, not an object identity field - [packages/spec/src/data/object.zod.ts](packages/spec/src/data/object.zod.ts).
467
+
-**Manifest scope enum trimmed.**`ManifestSchema.scope` accepts only `cloud`, `system`, and `project` - [packages/spec/src/kernel/manifest.zod.ts](packages/spec/src/kernel/manifest.zod.ts).
468
+
-**Canonical package manifest files.** Plugin/service packages now share a single `src/manifest.ts` between compile-time config and runtime registration, reducing object-list drift.
463
469
-**CLI `publish` link.** The end-to-end "local JSON -> remote server" wire is alive, even though the endpoint shape is wrong - [packages/cli/src/commands/publish.ts](packages/cli/src/commands/publish.ts).
-**Metadata migration to control plane** - move user metadata out of project DBs into the control-plane DB, scoped by `organization_id` + `project_id`.
496
-
-**Project Artifact API** - `GET /api/v1/apps/:projectId/artifact` assembles the current project metadata + inlined function code into a single consumable blob, with content hash/ETag for cache validation.
493
+
-**Project Artifact API** - `GET /api/v1/cloud/projects/:projectId/artifact` assembles the current project metadata + inlined function code into a single consumable blob, with content hash/ETag for cache validation.
497
494
-**ObjectOS Artifact API loader** - add the production HTTP fetch source for `MetadataPlugin` and local artifact cache durability across control-plane outages.
498
495
-**Project publish endpoint** - `POST /api/v1/apps/:projectId/metadata` receives compiled JSON, validates with Zod, writes the current project metadata state, and returns `commitId` + checksum.
499
496
-**Studio metadata/artifact viewer** - browse published metadata, artifact envelope, commit id, checksum, publish history, logs, and runtime health. No metadata editing.
@@ -540,9 +537,9 @@ without explicit project-level buy-in.
540
537
Questions this document deliberately leaves unresolved. Answer them in follow-up
541
538
design docs before building.
542
539
543
-
1.**Artifact content format details.** Phase 1 chooses a single JSON document,
544
-
but the exact envelope, manifest fields, function-code packaging, and driver
545
-
requirement declaration still need a Zod schema.
540
+
1.~~**Artifact content format details.**~~**Resolved (2026-04-26):**
541
+
`ProjectArtifactSchema` v0 defines the envelope, manifest requirements,
542
+
function-code packaging, checksum, and future `payloadRef` indirection.
546
543
2.~~**Business DB connection config ownership.**~~**Resolved (2026-04-25):**
547
544
Business DB coordinates and credentials are **Deployment Config**, never
548
545
part of the Artifact. See §6.3 Runtime Inputs. Cloud mode sources them from
Copy file name to clipboardExpand all lines: content/docs/concepts/terminology.mdx
+27-15Lines changed: 27 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,39 +10,27 @@ To navigate the ObjectStack ecosystem effectively, it is helpful to understand t
10
10
## The Ecosystem
11
11
12
12
### ObjectStack
13
-
The umbrella term for the entire suite of protocols and reference implementations. It is organized into **11 protocol namespaces** grouped into three architectural layers.
13
+
The umbrella term for the entire suite of protocols and reference implementations. It is organized into **15 protocol namespaces** grouped into three architectural layers.
14
14
15
15
### Protocol Namespace
16
-
A logical grouping of related schemas and types defined with Zod. ObjectStack has 11 protocol namespaces: Data, Driver, Permission, UI, System, Auth, Kernel, Hub, AI, API, and Automation.
16
+
A logical grouping of related schemas and types defined with Zod. ObjectStack has 15 protocol namespaces: Data, UI, System, Automation, AI, API, Identity, Security, Kernel, Cloud, QA, Contracts, Integration, Studio, and Shared.
17
17
18
18
---
19
19
20
-
## The 11 Protocol Namespaces
20
+
## The 15 Protocol Namespaces
21
21
22
22
### Data Protocol
23
23
Defines the core business data model. Includes Object schema, Field types, Validation rules, Query AST, and Filter conditions. This is the foundation of ObjectQL.
24
24
25
-
### Driver Protocol
26
-
Database adapter interface for connecting to various storage engines (PostgreSQL, MongoDB, SQLite, Redis, etc.). Drivers implement a standard interface for CRUD operations and query execution.
27
-
28
-
### Permission Protocol
29
-
Access control system including object-level permissions (CRUD), field-level security (FLS), sharing rules, and territory management. Determines who can see and modify what data.
30
-
31
25
### UI Protocol
32
26
Server-Driven UI specification for building user interfaces. Includes App structure, Views (List/Form/Kanban/Calendar), Dashboards, Reports, Themes, and Actions.
33
27
34
28
### System Protocol
35
29
Infrastructure services including Event Bus, Job Scheduling, Translation (i18n), and Audit Logging. Manages system-level concerns.
36
30
37
-
### Auth Protocol
38
-
Identity and access management including User accounts, Sessions, Roles, Organization structure, and various authentication strategies (OAuth, SAML, LDAP, etc.).
39
-
40
31
### Kernel Protocol
41
32
Plugin system and runtime management. Includes Plugin lifecycle, Manifest definition, Logger configuration, and Runtime Context. The core of ObjectOS.
42
33
43
-
### Hub Protocol
44
-
SaaS and marketplace features including Multi-tenancy, Licensing, Marketplace plugins, and Deployment configurations. Enables commercial distribution.
45
-
46
34
### AI Protocol
47
35
Artificial intelligence capabilities including AI Agents, RAG pipelines, Natural Language Query (NLQ), Predictive models, Cost tracking, and Orchestration.
48
36
@@ -52,6 +40,30 @@ External communication layer including REST contracts, API discovery, Realtime s
52
40
### Automation Protocol
53
41
Business process automation including Workflows (state machines), Flows (visual logic), and Webhooks (HTTP callbacks).
54
42
43
+
### Identity Protocol
44
+
User, organization, and profile schemas for identity management.
45
+
46
+
### Security Protocol
47
+
RBAC, permissions, policy, and access-control schemas.
48
+
49
+
### Cloud Protocol
50
+
Multi-tenant cloud, deployment, environment, and package distribution schemas.
51
+
52
+
### QA Protocol
53
+
Test, validation, and quality-assurance schemas.
54
+
55
+
### Contracts Protocol
56
+
Cross-package interface contracts shared by runtime packages and services.
57
+
58
+
### Integration Protocol
59
+
External system integration schemas and connection metadata.
60
+
61
+
### Studio Protocol
62
+
Studio UI metadata and builder-specific schemas.
63
+
64
+
### Shared Protocol
65
+
Reusable error maps, suggestions, and metadata normalization utilities.
Copy file name to clipboardExpand all lines: content/docs/getting-started/examples.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -313,7 +313,7 @@ Each app declares a `namespace` in its manifest, but **the short object name is
313
313
| CRM |`crm`|`account`|`account`|
314
314
| BI |`bi`|`report`|`report`|
315
315
316
-
If two packages contribute objects with the same short name, the registry logs a warning. In that rare case, callers can disambiguate by passing the FQN (`crm__account`) — but this is the only situation where FQN appears in user code.
316
+
If two packages contribute objects with the same short name, the registry logs a warning. Resolve the collision by renaming one object's short `name` (for example, `crm_account`) rather than using FQN strings in user code.
0 commit comments