@kmlckj/licos-platform-sdk
v0.6.7
Published
LICOS platform SDK package shell for browser and Node runtimes
Readme
@kmlckj/licos-platform-sdk
LICOS platform SDK for server-side project runtime code.
Runtime Configuration
Server-side helpers call platform Studio runtime APIs. Project code does not pass API base URLs, project IDs, tokens, or environment scopes. The SDK loads identity from runtime environment variables injected by LICOS. Authentication is resolved automatically by the runtime:
LICOS_PLATFORM_API_BASE_URLLICOS_PROJECT_IDorAGENT_PROJECT_IDLICOS_WORKSPACE_IDorAGENT_WORKSPACE_IDLICOS_USER_IDorAGENT_USER_IDLICOS_PROJECT_ENV, mapped internally todevorprod
Database
Database CRUD helpers call the runtime database data plane only. Tooling helpers can fetch platform schema metadata for ORM export. The SDK does not expose service deletion APIs.
import { database } from '@kmlckj/licos-platform-sdk';
const rows = await database
.table('todos')
.select('id', 'title')
.eq('done', false)
.order('created_at', { desc: true })
.limit(10)
.execute();ORM export is a tooling helper. It fetches platform schema metadata and returns source text; it does not use direct database credentials.
import { database } from '@kmlckj/licos-platform-sdk';
const source = await database.exportOrm({ language: 'typescript', orm: 'drizzle' });Studio project database management is exposed through studioDatabase for
server-side tooling flows. Use it for tables, rows, controlled SQL, migrations,
sync, and backup. Do not import it into browser/client bundles.
import { studioDatabase } from '@kmlckj/licos-platform-sdk';
await studioDatabase.createTable('users', {
columns: [{ name: 'email', type: 'text', nullable: false }],
});
const schema = await studioDatabase.getSchema({ environment: 'dev' });Object Storage
import { storage } from '@kmlckj/licos-platform-sdk';
await storage.createFolder('reports');
const file = await storage.uploadFile('/tmp/report.pdf');
const link = await storage.shareUrl(file.id);uploadFile limits each file to 20 MiB.
The browser entry does not export object storage helpers because runtime tokens must not be bundled into public frontend code.
Knowledge
Knowledge helpers import project documents and run semantic retrieval through the LICOS Knowledge API. Search without dataset filters retrieves from all accessible datasets. Use dataset IDs or names only when the user explicitly targets a specific knowledge base.
import { knowledge } from '@kmlckj/licos-platform-sdk';
await knowledge.addText('FAQ content', {
datasetName: 'project_docs',
name: 'faq.txt',
});
const results = await knowledge.search('How do I reset my password?', {
topK: 5,
});The browser entry does not export knowledge helpers because runtime tokens must not be bundled into public frontend code.
