Skip to content

Commit 3adc6c2

Browse files
hotlongCopilot
andcommitted
fix(ci): add @types/node and revise customer docs against framework
- Install @types/node in apps/objectos so tsc --noEmit can compile objectstack.config.ts (uses process.env). Fixes CI type-check failure. - Cross-check customer docs against ../framework source: - kubernetes probes use built-in /health endpoint - split auth callback paths: social /callback/<p> vs OIDC /oauth2/callback/<p> - permission-set grants use real flags (allowRead/allowCreate/allowEdit/ allowDelete/viewAllRecords/modifyAllRecords) - env-var reference adds OS_ARTIFACT_PATH, OS_ENVIRONMENT_ID, OS_ORGANIZATION_ID, OS_MULTI_TENANT, OS_RUNTIME_PORT, OS_DATABASE_*, OS_BUSINESS_DB_URL, OS_CACHE_DIR, OS_SKIP_SCHEMA_SYNC - clarify OS_ARTIFACT_FILE (wrapper) vs OS_ARTIFACT_PATH (framework) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e8a6289 commit 3adc6c2

7 files changed

Lines changed: 78 additions & 37 deletions

File tree

apps/objectos/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
"type-check": "tsc --noEmit"
1313
},
1414
"dependencies": {
15-
"@objectstack/runtime": "^5.2.0",
16-
"@objectstack/core": "^5.2.0",
17-
"@objectstack/spec": "^5.2.0",
18-
"@objectstack/metadata": "^5.2.0",
19-
"@objectstack/objectql": "^5.2.0",
2015
"@objectstack/cli": "^5.2.0",
16+
"@objectstack/core": "^5.2.0",
2117
"@objectstack/driver-memory": "^5.2.0",
2218
"@objectstack/driver-sql": "^5.2.0",
23-
"@objectstack/driver-turso": "^5.2.0"
19+
"@objectstack/driver-turso": "^5.2.0",
20+
"@objectstack/metadata": "^5.2.0",
21+
"@objectstack/objectql": "^5.2.0",
22+
"@objectstack/runtime": "^5.2.0",
23+
"@objectstack/spec": "^5.2.0"
2424
},
2525
"devDependencies": {
26+
"@types/node": "^25.9.1",
2627
"typescript": "^5.7.0"
2728
}
2829
}

content/docs/configure/authentication.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,34 @@ Configure provider credentials through environment variables or system
5151
settings, depending on how the application package exposes auth
5252
configuration.
5353

54-
Provider callback URLs use the ObjectOS auth route:
54+
Provider callback URLs depend on the provider type. ObjectStack exposes
55+
two distinct callback paths and they are **not** interchangeable:
5556

56-
```text
57-
https://<project-domain>/api/v1/auth/callback/<provider>
58-
```
57+
| Provider type | Callback path |
58+
|---|---|
59+
| Built-in social (Google, GitHub, Microsoft, Apple, …) | `/api/v1/auth/callback/<provider>` |
60+
| Generic OIDC / OAuth2 (Okta, Entra ID, Keycloak, Ping, …) | `/api/v1/auth/oauth2/callback/<provider>` |
5961

6062
Examples:
6163

6264
```text
6365
https://crm.example.com/api/v1/auth/callback/google
6466
https://crm.example.com/api/v1/auth/callback/microsoft
67+
https://crm.example.com/api/v1/auth/oauth2/callback/okta
68+
https://crm.example.com/api/v1/auth/oauth2/callback/entra
6569
```
6670

71+
Configure the matching redirect URI in the identity provider's
72+
application registration before enabling the provider in ObjectOS.
73+
6774
## Enterprise OIDC/SSO
6875

69-
OIDC providers typically require:
76+
OIDC providers are registered as generic OAuth2 providers and use the
77+
`/oauth2/callback/<provider>` path. A typical configuration requires:
7078

7179
| Field | Description |
7280
|---|---|
73-
| Provider id | Stable id such as `okta` or `azure-ad` |
81+
| Provider id | Stable id such as `okta` or `entra` (used in the callback URL) |
7482
| Display name | Button label shown to users |
7583
| Discovery URL | `.well-known/openid-configuration` endpoint |
7684
| Client id | Application client id from the identity provider |

content/docs/configure/permissions/permission-sets.mdx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,22 @@ Object permissions answer:
2626
Can this user perform this operation on this object at all?
2727
```
2828

29-
Common grants:
29+
Permission set grants use these flag names (as enforced by the security
30+
plugin's permission evaluator):
3031

31-
| Grant | Meaning |
32+
| Flag | Meaning |
3233
|---|---|
33-
| `create` | Create records |
34-
| `read` | Read records allowed by record access rules |
35-
| `update` | Update records allowed by record access rules |
36-
| `delete` | Delete records allowed by record access rules |
37-
| `viewAll` | Read all records for the object |
38-
| `modifyAll` | Update/delete all records for the object |
39-
40-
Record access still matters unless `viewAll` or `modifyAll` bypasses the
41-
normal row-level boundary.
34+
| `allowRead` | Read records allowed by record access rules |
35+
| `allowCreate` | Create records |
36+
| `allowEdit` | Update records allowed by record access rules |
37+
| `allowDelete` | Delete records allowed by record access rules |
38+
| `viewAllRecords` | Read every record for the object, bypassing record access |
39+
| `modifyAllRecords` | Update or delete every record for the object, bypassing record access; implies `viewAllRecords` for reads |
40+
41+
Record access still matters unless `viewAllRecords` or `modifyAllRecords`
42+
bypasses the normal row-level boundary. Reserve those flags for
43+
administrative permission sets — they are effectively a tenant-wide
44+
super-user grant for that object.
4245

4346
## System permissions
4447

content/docs/configure/runtime.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@ ObjectOS uses a local Artifact API client. Every hostname resolves to the
3030
same project. The runtime config is read from the artifact when present,
3131
or falls back to a local runtime default for evaluation.
3232

33+
`OS_ARTIFACT_FILE` is the ObjectOS app-wrapper convention. The underlying
34+
runtime also accepts `OS_ARTIFACT_PATH` directly (used by the
35+
`@objectstack/cli` `dev` and `start` commands and by the framework's
36+
standalone stack). Set either one — not both.
37+
3338
Optional:
3439

3540
```bash
3641
OS_PROJECT_ID=proj_customer_prod
42+
OS_ENVIRONMENT_ID=env_prod
3743
OS_WATCH_ARTIFACT=1
3844
```
3945

content/docs/deploy/kubernetes.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,28 @@ env:
6060
6161
## Probes
6262
63-
Configure probes against an HTTP route that confirms the container is
64-
serving traffic:
63+
ObjectOS exposes a built-in `GET /health` endpoint that responds before
64+
the project kernel is fully resolved, which makes it the right target
65+
for both liveness and readiness probes:
6566

6667
```yaml
6768
readinessProbe:
6869
httpGet:
69-
path: /
70+
path: /health
7071
port: 3000
72+
initialDelaySeconds: 5
73+
periodSeconds: 10
7174
livenessProbe:
7275
httpGet:
73-
path: /
76+
path: /health
7477
port: 3000
78+
initialDelaySeconds: 15
79+
periodSeconds: 20
7580
```
7681

77-
For stricter checks, use an application-specific API route that requires
78-
the target artifact to be loaded.
82+
For stricter readiness checks, point an additional probe at an
83+
application-specific generated API route — this confirms the artifact
84+
loaded and the kernel is serving requests.
7985

8086
## Ingress and CORS
8187

content/docs/reference/environment-variables.mdx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@ Use system settings for tenant/user-editable application configuration.
1919

2020
| Variable | Required | Description |
2121
|---|---:|---|
22-
| `OS_ARTIFACT_FILE` | File mode | Path to local compiled artifact used by this ObjectOS app wrapper. |
22+
| `OS_ARTIFACT_FILE` | File mode | Path to a local compiled `objectstack.json`. Read by the ObjectOS app wrapper and forwarded as `fileConfig.artifactPath`. |
23+
| `OS_ARTIFACT_PATH` | Alternative | Framework-level name for the same path or `http(s)://` URL. Honoured by `@objectstack/runtime` directly (CLI `dev`/`start`, standalone mode). |
2324
| `OS_PROJECT_ID` | Optional | Project id for file-backed mode or explicit project identity. |
24-
| `OS_WATCH_ARTIFACT` | No | Set to `1` to reload local artifact while developing. |
25-
| `OS_CLOUD_URL` | Cloud mode | Control-plane base URL for hostname resolution and artifact fetch. |
25+
| `OS_ENVIRONMENT_ID` | Optional | Environment id for standalone/file-backed mode (default `proj_local`). Also used to derive the per-project auth secret. |
26+
| `OS_ORGANIZATION_ID` | Optional | Default organization id for file-backed mode (default `org_local`). |
27+
| `OS_WATCH_ARTIFACT` | No | Set to `1` to reload the local artifact when it changes. Use only in development. |
28+
| `OS_CLOUD_URL` | Cloud mode | Control-plane base URL for hostname resolution and artifact fetch. Set to `off` or `local` to opt out of cloud-connected behaviour. |
2629
| `OS_CLOUD_API_KEY` | Optional | Bearer token for private control-plane Artifact API access. |
30+
| `OS_MULTI_TENANT` | No | Set to `false` to disable multi-tenant routing (default `true`). |
31+
| `OS_RUNTIME_PORT` | Dev only | Localhost port used to build platform-SSO callback URLs when developing on `http://localhost:<port>`. |
2732

2833
## Cache
2934

@@ -46,11 +51,20 @@ Use system settings for tenant/user-editable application configuration.
4651

4752
## Database
4853

49-
Database configuration can come from the control-plane runtime response
50-
or the artifact datasource declarations. Framework standalone mode also
51-
recognizes `OS_DATABASE_URL`, `OS_DATABASE_DRIVER`, and
52-
`OS_DATABASE_AUTH_TOKEN`.
54+
In cloud-connected mode the control plane returns the per-project
55+
runtime database configuration with the artifact response. In
56+
file-backed mode ObjectOS reads datasource declarations from the
57+
artifact. As a last resort the framework also honours:
58+
59+
| Variable | Description |
60+
|---|---|
61+
| `OS_DATABASE_URL` | Connection URL (`file:./db.sqlite`, `libsql://…`, `postgres://…`, `mongodb://…`, `memory://`). Used by standalone mode and CLI `dev`. |
62+
| `OS_DATABASE_DRIVER` | Override the driver auto-detected from the URL. |
63+
| `OS_DATABASE_AUTH_TOKEN` | Auth token for managed drivers such as Turso/libSQL. |
64+
| `OS_BUSINESS_DB_URL` | ObjectOS wrapper convention for the per-project business database URL. Resolve it to `OS_DATABASE_URL` or a runtime datasource override in your deployment. |
65+
| `OS_CACHE_DIR` | Local artifact and runtime cache directory (default `/var/cache/objectos`). |
66+
| `OS_SKIP_SCHEMA_SYNC` | Set to `1` to skip ObjectQL DDL sync at boot. Use when schema is managed out-of-band. |
5367

5468
For ObjectOS customer deployments, prefer explicit control-plane runtime
55-
configuration or artifact datasource configuration over undocumented
69+
configuration or artifact datasource configuration over relying on
5670
container-local defaults.

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)