Skip to content

Commit fde4a4a

Browse files
os-zhuangclaude
andauthored
chore(deps): upgrade @objectstack to 8.0.1 and bump ObjectOS One to 8.0.1 (#19)
Bump all @objectstack/* dependencies in @objectos/server from ^7.9.0 to ^8.0.1 and refresh the lockfile. 8.0 is a major: the runtime removed the cloud-connected, hostname-routed createObjectOSStack wrapper, so apps/objectos/objectstack.config.ts is migrated to the single-tenant createStandaloneStack host (OS_ARTIFACT_FILE → artifactPath, which now also accepts an http(s):// cloud artifact URL; OS_BUSINESS_DB_URL → databaseUrl). The cli-internal @objectstack/plugin-mcp-server → @objectstack/mcp rename does not affect ObjectOS (no direct import). Propagate the resolved cli version (8.0.1) to apps/objectos-one package.json, tauri.conf.json, Cargo.toml and Cargo.lock via sync-version. type-check passes; smoke test boots clean on 8.0.1 (26 plugins, HTTP ready). Docs: scan the framework changesets for the real 8.0 surface and update the official site — changelog (MCP over HTTP, self-serve API keys, field conditional rules, RLS read filter, standalone host), environment-variables (OS_MCP_SERVER_ENABLED, corrected artifact/cloud wording, artifact HMR via NODE_ENV), and api-access (POST /api/v1/keys, x-api-key / Authorization: ApiKey, /api/v1/mcp). English + all six translations (de/es/fr/ja/ko/zh-Hans). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 64a7ae1 commit fde4a4a

28 files changed

Lines changed: 821 additions & 612 deletions

apps/objectos-one/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@objectos/one",
3-
"version": "7.9.0",
3+
"version": "8.0.1",
44
"private": true,
55
"license": "Apache-2.0",
66
"description": "ObjectOS One — all-in-one local distribution (Tauri shell + bundled Node runtime + DB).",

apps/objectos-one/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/objectos-one/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "objectos-one"
3-
version = "7.9.0"
3+
version = "8.0.1"
44
description = "ObjectOS One shell"
55
edition = "2021"
66
rust-version = "1.77"

apps/objectos-one/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "ObjectOS",
4-
"version": "7.9.0",
4+
"version": "8.0.1",
55
"identifier": "ai.objectstack.objectos",
66
"build": {
77
"frontendDist": "../src",

apps/objectos/objectstack.config.ts

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,38 @@
66
* `@objectstack/*` packages on npm; this repository deliberately
77
* contains no protocol code of its own.
88
*
9-
* Boot mode is governed by environment variables:
9+
* As of @objectstack 8.0 the runtime ships a single-tenant *standalone*
10+
* stack (`createStandaloneStack`); the 7.x cloud-connected, hostname-routed
11+
* multi-tenant wrapper (`createObjectOSStack`) has been removed from the
12+
* public runtime API. A cloud deployment now points `OS_ARTIFACT_FILE` at a
13+
* published artifact URL — `artifactPath` accepts `http(s)://` sources and
14+
* is fetched lazily by the loader.
1015
*
11-
* OS_CLOUD_URL — Artifact API base URL (cloud-connected mode)
12-
* OS_ENVIRONMENT_ID — Environment/project to serve (legacy: OS_PROJECT_ID)
13-
* OS_ARTIFACT_FILE — Path to a local dist/objectstack.json (offline mode)
14-
* OS_BUSINESS_DB_URL — Per-project business database
15-
* OS_CACHE_DIR — Local artifact cache (default: /var/cache/objectos)
16+
* Boot is governed by environment variables (all optional — sensible
17+
* defaults are applied by `createStandaloneStack`):
1618
*
17-
* If OS_CLOUD_URL is absent, ObjectOS defaults to local file-backed mode.
18-
* Enterprise plugins live in ../../packages/* and can be appended to the
19-
* default plugin manifest below.
19+
* OS_ARTIFACT_FILE — Path or URL to a compiled `dist/objectstack.json`
20+
* (default: <cwd>/dist/objectstack.json)
21+
* OS_ENVIRONMENT_ID — Environment/project to serve (legacy: OS_PROJECT_ID;
22+
* default: proj_local)
23+
* OS_BUSINESS_DB_URL — Per-project business database (legacy: OS_DATABASE_URL;
24+
* default: file-backed sqlite under the ObjectStack home)
25+
*
26+
* Artifact hot-reload follows `NODE_ENV` (on outside production). Enterprise
27+
* plugins live in ../../packages/* and can be appended to the returned
28+
* plugin manifest below.
2029
*/
2130

22-
import { createObjectOSStack } from '@objectstack/runtime';
31+
import { createStandaloneStack } from '@objectstack/runtime';
2332

24-
const cloudUrl = process.env.OS_CLOUD_URL;
2533
const artifactFile = process.env.OS_ARTIFACT_FILE;
2634
const environmentId =
2735
process.env.OS_ENVIRONMENT_ID ?? process.env.OS_PROJECT_ID;
36+
const databaseUrl =
37+
process.env.OS_BUSINESS_DB_URL ?? process.env.OS_DATABASE_URL;
2838

29-
export default await createObjectOSStack({
30-
controlPlaneUrl: cloudUrl ?? 'file',
31-
controlPlaneApiKey: process.env.OS_CLOUD_API_KEY,
32-
fileConfig: artifactFile
33-
? {
34-
artifactPath: artifactFile,
35-
environmentId,
36-
watch: process.env.OS_WATCH_ARTIFACT === '1',
37-
}
38-
: undefined,
39+
export default await createStandaloneStack({
40+
artifactPath: artifactFile,
41+
environmentId,
42+
databaseUrl,
3943
});

apps/objectos/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"type-check": "tsc --noEmit"
1414
},
1515
"dependencies": {
16-
"@objectstack/cli": "^7.9.0",
17-
"@objectstack/core": "^7.9.0",
18-
"@objectstack/driver-memory": "^7.9.0",
19-
"@objectstack/driver-sql": "^7.9.0",
20-
"@objectstack/metadata": "^7.9.0",
21-
"@objectstack/objectql": "^7.9.0",
22-
"@objectstack/runtime": "^7.9.0",
23-
"@objectstack/spec": "^7.9.0"
16+
"@objectstack/cli": "^8.0.1",
17+
"@objectstack/core": "^8.0.1",
18+
"@objectstack/driver-memory": "^8.0.1",
19+
"@objectstack/driver-sql": "^8.0.1",
20+
"@objectstack/metadata": "^8.0.1",
21+
"@objectstack/objectql": "^8.0.1",
22+
"@objectstack/runtime": "^8.0.1",
23+
"@objectstack/spec": "^8.0.1"
2424
},
2525
"devDependencies": {
2626
"@types/node": "^25.9.1",

content/docs/configure/api-access.de.mdx

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Wichtige Schnittstellen:
2525
| `/api/v1/actions/<object>/<action>` | Eine deklarative Aktion aufrufen (POST) |
2626
| `/api/v1/auth/*` | Authentifizierung (Anmeldung, Sitzungen, OAuth, OIDC) |
2727
| `/api/v1/meta/*` | Metadaten-APIs (Objekte, Felder, Ansichten), sofern aktiviert |
28+
| `/api/v1/keys` | Erzeugt einen nur einmal angezeigten `sys_api_key` für den aufrufenden Benutzer (POST) |
29+
| `/api/v1/mcp` | Model-Context-Protocol-Server über Streamable HTTP, wenn `OS_MCP_SERVER_ENABLED=true` |
2830
| `/api/v1/health` | Liveness-/Readiness-Probe (keine Authentifizierung) |
2931

3032
Das Präfix lautet standardmäßig `/api/v1` (der API-`basePath` von `/api` plus
@@ -51,20 +53,32 @@ selbst wird gehasht gespeichert — nur das `prefix` und Metadaten bleiben
5153
abfragbar, sodass ein durchgesickerter Schlüssel nicht aus der Datenbank
5254
rekonstruiert werden kann.
5355

54-
So stellen Sie einen Schlüssel aus:
55-
56-
1. Melden Sie sich als Administrator bei **Console → API Keys** an.
57-
2. Wählen Sie den besitzenden Benutzer (der API-Aufruf erbt die
58-
Berechtigungen und den Datensatzzugriff dieses Benutzers).
59-
3. Legen Sie optional ein Ablaufdatum fest.
60-
4. Kopieren Sie das angezeigte Geheimnis **einmalig** — es wird nicht erneut
61-
angezeigt.
62-
63-
Verwenden Sie den Schlüssel als Bearer-Token:
56+
Es gibt zwei Wege, einen Schlüssel auszustellen:
57+
58+
- **Console** — melden Sie sich als Administrator bei **Console → API Keys**
59+
an, wählen Sie den besitzenden Benutzer, legen Sie optional ein Ablaufdatum
60+
fest und kopieren Sie das angezeigte Geheimnis **einmalig**.
61+
- **Self-Service-Endpunkt**`POST /api/v1/keys` erzeugt einen Schlüssel für
62+
den authentifizierten Aufrufer und gibt das rohe Geheimnis genau einmal
63+
zurück. Der Schlüssel ist an den eigenen Benutzer des Aufrufers gebunden und
64+
kann daher nicht zur Identitätsübernahme verwendet werden:
65+
66+
```bash
67+
curl -X POST https://app.example.com/api/v1/keys \
68+
-H "Authorization: Bearer <session-or-access-token>" \
69+
-H "Content-Type: application/json" \
70+
-d '{"name": "etl-pipeline"}'
71+
# → { "id": "...", "name": "etl-pipeline", "prefix": "os_pk_…", "key": "os_pk_live_…" }
72+
```
73+
74+
Übergeben Sie den Schlüssel bei nachfolgenden Anfragen als Bearer-Token, als
75+
`x-api-key`-Header oder als `Authorization: ApiKey`. Die REST-Daten- und
76+
Metadaten-APIs authentifizieren ihn über denselben Verifier wie MCP, unter den
77+
Berechtigungen und der Datensatz-Sicherheit des Schlüsselinhabers:
6478

6579
```bash
6680
curl https://app.example.com/api/v1/data/account \
67-
-H "Authorization: Bearer os_pk_live_…"
81+
-H "x-api-key: os_pk_live_…"
6882
```
6983

7084
Um einen Schlüssel zu widerrufen, führen Sie die Aktion `revoke_api_key` für

content/docs/configure/api-access.es.mdx

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Superficies destacadas:
2525
| `/api/v1/actions/<object>/<action>` | Invocar una acción declarativa (POST) |
2626
| `/api/v1/auth/*` | Autenticación (inicio de sesión, sesiones, OAuth, OIDC) |
2727
| `/api/v1/meta/*` | APIs de metadatos (objetos, campos, vistas) cuando está habilitado |
28+
| `/api/v1/keys` | Genera un `sys_api_key` de un solo uso para el usuario que llama (POST) |
29+
| `/api/v1/mcp` | Servidor Model Context Protocol sobre Streamable HTTP, cuando `OS_MCP_SERVER_ENABLED=true` |
2830
| `/api/v1/health` | Sonda de liveness/readiness (sin autenticación) |
2931

3032
El prefijo es `/api/v1` de forma predeterminada (el `basePath` de la API,
@@ -51,19 +53,32 @@ de la clave en sí se almacena cifrado (hash) — solo el `prefix` y los
5153
metadatos permanecen consultables, de modo que una clave filtrada no puede
5254
reconstruirse a partir de la base de datos.
5355

54-
Para emitir una clave:
55-
56-
1. Inicia sesión en **Console → API Keys** como administrador.
57-
2. Elige el usuario propietario (la llamada a la API hereda los permisos
58-
y el acceso a registros de ese usuario).
59-
3. Opcionalmente, establece una fecha de expiración.
60-
4. Copia el secreto mostrado **una sola vez** — no se vuelve a mostrar.
61-
62-
Usa la clave como token bearer:
56+
Emite una clave de dos maneras:
57+
58+
- **Console** — inicia sesión en **Console → API Keys** como administrador,
59+
elige el usuario propietario, opcionalmente establece una fecha de
60+
expiración y copia el secreto mostrado **una sola vez**.
61+
- **Endpoint de autoservicio**`POST /api/v1/keys` genera una clave para el
62+
llamante autenticado y devuelve el secreto en bruto exactamente una vez. La
63+
clave queda fijada al propio usuario del llamante, por lo que no puede usarse
64+
para suplantar otra identidad:
65+
66+
```bash
67+
curl -X POST https://app.example.com/api/v1/keys \
68+
-H "Authorization: Bearer <session-or-access-token>" \
69+
-H "Content-Type: application/json" \
70+
-d '{"name": "etl-pipeline"}'
71+
# → { "id": "...", "name": "etl-pipeline", "prefix": "os_pk_…", "key": "os_pk_live_…" }
72+
```
73+
74+
Pasa la clave en las solicitudes posteriores como token bearer, como cabecera
75+
`x-api-key` o como `Authorization: ApiKey`. Las API REST de datos y metadatos
76+
la autentican con el mismo verificador que MCP, bajo los permisos y la
77+
seguridad a nivel de registro del propietario de la clave:
6378

6479
```bash
6580
curl https://app.example.com/api/v1/data/account \
66-
-H "Authorization: Bearer os_pk_live_…"
81+
-H "x-api-key: os_pk_live_…"
6782
```
6883

6984
Para revocar una clave, ejecuta la acción `revoke_api_key` en el registro

content/docs/configure/api-access.fr.mdx

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Surfaces notables :
2525
| `/api/v1/actions/<object>/<action>` | Invoquer une action déclarative (POST) |
2626
| `/api/v1/auth/*` | Authentification (connexion, sessions, OAuth, OIDC) |
2727
| `/api/v1/meta/*` | API de métadonnées (objets, champs, vues) lorsqu'elles sont activées |
28+
| `/api/v1/keys` | Génère une `sys_api_key` affichée une seule fois pour l'utilisateur appelant (POST) |
29+
| `/api/v1/mcp` | Serveur Model Context Protocol via Streamable HTTP, lorsque `OS_MCP_SERVER_ENABLED=true` |
2830
| `/api/v1/health` | Sonde de vivacité/disponibilité (sans authentification) |
2931

3032
Le préfixe est `/api/v1` par défaut (le `basePath` de l'API `/api` plus la
@@ -51,20 +53,34 @@ valeur de la clé elle-même est stockée hachée — seuls le `prefix` et les
5153
métadonnées restent interrogeables, de sorte qu'une clé divulguée ne peut
5254
pas être reconstituée à partir de la base de données.
5355

54-
Pour émettre une clé :
55-
56-
1. Connectez-vous à **Console → API Keys** en tant qu'administrateur.
57-
2. Choisissez l'utilisateur propriétaire (l'appel API hérite des
58-
permissions et de l'accès aux enregistrements de cet utilisateur).
59-
3. Définissez éventuellement une date d'expiration.
60-
4. Copiez le secret affiché **une seule fois** — il n'est plus affiché par
61-
la suite.
62-
63-
Utilisez la clé comme jeton bearer :
56+
Émettez une clé de deux façons :
57+
58+
- **Console** — connectez-vous à **Console → API Keys** en tant
59+
qu'administrateur, choisissez l'utilisateur propriétaire, définissez
60+
éventuellement une date d'expiration et copiez le secret affiché **une seule
61+
fois**.
62+
- **Endpoint en libre-service**`POST /api/v1/keys` génère une clé pour
63+
l'appelant authentifié et renvoie le secret brut exactement une fois. La clé
64+
est rattachée au propre utilisateur de l'appelant et ne peut donc pas servir
65+
à usurper une autre identité :
66+
67+
```bash
68+
curl -X POST https://app.example.com/api/v1/keys \
69+
-H "Authorization: Bearer <session-or-access-token>" \
70+
-H "Content-Type: application/json" \
71+
-d '{"name": "etl-pipeline"}'
72+
# → { "id": "...", "name": "etl-pipeline", "prefix": "os_pk_…", "key": "os_pk_live_…" }
73+
```
74+
75+
Passez la clé sur les requêtes suivantes comme jeton bearer, comme en-tête
76+
`x-api-key` ou comme `Authorization: ApiKey`. Les API REST de données et de
77+
métadonnées l'authentifient via le même vérificateur que MCP, sous les
78+
permissions et la sécurité au niveau des enregistrements du propriétaire de la
79+
clé :
6480

6581
```bash
6682
curl https://app.example.com/api/v1/data/account \
67-
-H "Authorization: Bearer os_pk_live_…"
83+
-H "x-api-key: os_pk_live_…"
6884
```
6985

7086
Pour révoquer une clé, exécutez l'action `revoke_api_key` sur

content/docs/configure/api-access.ja.mdx

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ https://<project-domain>/api/v1
2424
| `/api/v1/actions/<object>/<action>` | 宣言的アクションの呼び出し(POST) |
2525
| `/api/v1/auth/*` | 認証(サインイン、セッション、OAuth、OIDC) |
2626
| `/api/v1/meta/*` | 有効化されている場合のメタデータ API(オブジェクト、フィールド、ビュー) |
27+
| `/api/v1/keys` | 呼び出しユーザー向けに一度だけ表示される `sys_api_key` を発行(POST) |
28+
| `/api/v1/mcp` | `OS_MCP_SERVER_ENABLED=true` のとき、Streamable HTTP 経由の Model Context Protocol サーバー |
2729
| `/api/v1/health` | 死活/準備状態のプローブ(認証不要) |
2830

2931
プレフィックスのデフォルトは `/api/v1`(API の `basePath` である `/api`
@@ -48,19 +50,32 @@ API キーはファーストクラスの `sys_api_key` レコードです。キ
4850
ハッシュ化して保存され、クエリ可能なのは `prefix` とメタデータのみです。
4951
そのため、漏洩したキーをデータベースから復元することはできません。
5052

51-
キーを発行するには:
52-
53-
1. 管理者として **Console → API Keys** にサインインします。
54-
2. 所有ユーザーを選択します(API 呼び出しはそのユーザーの権限と
55-
レコードアクセスを継承します)。
56-
3. 必要に応じて有効期限を設定します。
57-
4. 表示されたシークレットを**一度だけ**コピーします。再表示はされません。
58-
59-
キーは bearer トークンとして使用します:
53+
キーは次の 2 つの方法で発行できます:
54+
55+
- **Console** — 管理者として **Console → API Keys** にサインインし、所有
56+
ユーザーを選択し、必要に応じて有効期限を設定して、表示されたシークレットを
57+
**一度だけ**コピーします。
58+
- **セルフサービスエンドポイント**`POST /api/v1/keys` は認証済みの呼び出し元
59+
に対してキーを発行し、生のシークレットをちょうど一度だけ返します。キーは
60+
呼び出し元自身のユーザーに固定されるため、別の ID へのなりすましには使用
61+
できません:
62+
63+
```bash
64+
curl -X POST https://app.example.com/api/v1/keys \
65+
-H "Authorization: Bearer <session-or-access-token>" \
66+
-H "Content-Type: application/json" \
67+
-d '{"name": "etl-pipeline"}'
68+
# → { "id": "...", "name": "etl-pipeline", "prefix": "os_pk_…", "key": "os_pk_live_…" }
69+
```
70+
71+
以降のリクエストでは、キーを bearer トークン、`x-api-key` ヘッダー、または
72+
`Authorization: ApiKey` として渡します。REST のデータ/メタデータ API はいずれも
73+
MCP と同じ検証器で認証し、キー所有者の権限とレコードレベルセキュリティの下で
74+
実行されます:
6075

6176
```bash
6277
curl https://app.example.com/api/v1/data/account \
63-
-H "Authorization: Bearer os_pk_live_…"
78+
-H "x-api-key: os_pk_live_…"
6479
```
6580

6681
キーを失効させるには、対応する `sys_api_key` レコードに対して

0 commit comments

Comments
 (0)