@kmlckj/licos-platform-sdk 0.6.3 → 0.6.5

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 CHANGED
@@ -1,47 +1,58 @@
1
- # @kmlckj/licos-platform-sdk
2
-
3
- LICOS platform SDK for server-side project runtime code.
4
-
5
- ## Runtime Configuration
6
-
7
- Server-side helpers call platform Studio runtime APIs. Project code does not
1
+ # @kmlckj/licos-platform-sdk
2
+
3
+ LICOS platform SDK for server-side project runtime code.
4
+
5
+ ## Runtime Configuration
6
+
7
+ Server-side helpers call platform Studio runtime APIs. Project code does not
8
8
  pass API base URLs, project IDs, tokens, or environment scopes. The SDK loads
9
- them from runtime environment variables injected by LICOS:
9
+ identity from runtime environment variables injected by LICOS. Authentication
10
+ is resolved automatically by the runtime:
10
11
 
11
12
  - `LICOS_PLATFORM_API_BASE_URL`
12
- - `LICOS_RUNTIME_TOKEN` or `LICOS_USER_TOKEN`
13
13
  - `LICOS_PROJECT_ID` or `AGENT_PROJECT_ID`
14
14
  - `LICOS_WORKSPACE_ID` or `AGENT_WORKSPACE_ID`
15
+ - `LICOS_USER_ID` or `AGENT_USER_ID`
15
16
  - `LICOS_PROJECT_ENV`, mapped internally to `dev` or `prod`
16
-
17
- ## Database
18
-
19
- Database helpers call the runtime database data plane only. They do not expose
20
- database control-plane or service deletion APIs.
21
-
22
- ```js
23
- import { database } from '@kmlckj/licos-platform-sdk';
24
-
25
- const rows = await database
26
- .table('todos')
27
- .select('id', 'title')
28
- .eq('done', false)
29
- .order('created_at', { desc: true })
30
- .limit(10)
31
- .execute();
32
- ```
33
-
34
- ## Object Storage
35
-
36
- ```js
37
- import { storage } from '@kmlckj/licos-platform-sdk';
38
-
39
- await storage.createFolder('reports');
40
- const file = await storage.uploadFile('/tmp/report.pdf');
41
- const link = await storage.shareUrl(file.id);
42
- ```
43
-
44
- `uploadFile` limits each file to 20 MiB.
45
-
46
- The browser entry does not export object storage helpers because runtime tokens
47
- must not be bundled into public frontend code.
17
+
18
+ ## Database
19
+
20
+ Database CRUD helpers call the runtime database data plane only. Tooling helpers
21
+ can fetch platform schema metadata for ORM export. The SDK does not expose
22
+ service deletion APIs.
23
+
24
+ ```js
25
+ import { database } from '@kmlckj/licos-platform-sdk';
26
+
27
+ const rows = await database
28
+ .table('todos')
29
+ .select('id', 'title')
30
+ .eq('done', false)
31
+ .order('created_at', { desc: true })
32
+ .limit(10)
33
+ .execute();
34
+ ```
35
+
36
+ ORM export is a tooling helper. It fetches platform schema metadata and returns
37
+ source text; it does not use direct database credentials.
38
+
39
+ ```js
40
+ import { database } from '@kmlckj/licos-platform-sdk';
41
+
42
+ const source = await database.exportOrm({ language: 'typescript', orm: 'drizzle' });
43
+ ```
44
+
45
+ ## Object Storage
46
+
47
+ ```js
48
+ import { storage } from '@kmlckj/licos-platform-sdk';
49
+
50
+ await storage.createFolder('reports');
51
+ const file = await storage.uploadFile('/tmp/report.pdf');
52
+ const link = await storage.shareUrl(file.id);
53
+ ```
54
+
55
+ `uploadFile` limits each file to 20 MiB.
56
+
57
+ The browser entry does not export object storage helpers because runtime tokens
58
+ must not be bundled into public frontend code.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-platform-sdk",
3
- "version": "0.6.3",
4
- "description": "LICOS platform SDK package shell for browser and Node runtimes",
3
+ "version": "0.6.5",
4
+ "description": "LICOS platform SDK package shell for browser and Node runtimes",
5
5
  "author": "kmlckj",
6
6
  "type": "module",
7
7
  "main": "./src/index.js",