@realtimex/sdk 1.7.28 → 2.0.1
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/dist/chunk-ORAAYW4C.mjs +271 -0
- package/dist/errors-C98IGxYU.d.mts +168 -0
- package/dist/errors-C98IGxYU.d.ts +168 -0
- package/dist/index.d.mts +8 -2048
- package/dist/index.d.ts +8 -2048
- package/dist/index.js +168 -4723
- package/dist/index.mjs +7 -3783
- package/dist/v1/index.d.mts +3 -56
- package/dist/v1/index.d.ts +3 -56
- package/dist/v1/index.js +2 -756
- package/dist/v1/index.mjs +2 -42
- package/package.json +6 -7
- package/dist/chunk-Z5GAUBIM.mjs +0 -993
- package/dist/errors-NufsyIZ-.d.mts +0 -678
- package/dist/errors-NufsyIZ-.d.ts +0 -678
- package/skills/realtimex-moderator-sdk/SKILL.md +0 -102
- package/skills/realtimex-moderator-sdk/references/activities.md +0 -14
- package/skills/realtimex-moderator-sdk/references/agents.md +0 -13
- package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +0 -105
- package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/api.md +0 -17
- package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +0 -36
- package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/core.md +0 -40
- package/skills/realtimex-moderator-sdk/references/api-reference/database.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/index.md +0 -43
- package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +0 -176
- package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +0 -50
- package/skills/realtimex-moderator-sdk/references/api-reference/port.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/task.md +0 -62
- package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +0 -18
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +0 -48
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +0 -18
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +0 -78
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +0 -24
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +0 -33
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +0 -27
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +0 -21
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +0 -12
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +0 -36
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +0 -26
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +0 -15
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +0 -39
- package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +0 -13
- package/skills/realtimex-moderator-sdk/references/api-reference.md +0 -1330
- package/skills/realtimex-moderator-sdk/references/app-concepts.md +0 -1276
- package/skills/realtimex-moderator-sdk/references/browser.md +0 -27
- package/skills/realtimex-moderator-sdk/references/channels.md +0 -189
- package/skills/realtimex-moderator-sdk/references/credentials.md +0 -111
- package/skills/realtimex-moderator-sdk/references/known-issues.md +0 -237
- package/skills/realtimex-moderator-sdk/references/llm.md +0 -13
- package/skills/realtimex-moderator-sdk/references/mcp.md +0 -13
- package/skills/realtimex-moderator-sdk/references/permissions.md +0 -30
- package/skills/realtimex-moderator-sdk/references/quickstart.md +0 -16
- package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +0 -34
- package/skills/realtimex-moderator-sdk/references/workspaces.md +0 -20
- package/skills/realtimex-moderator-sdk/scripts/lib/sdk-init.js +0 -171
- package/skills/realtimex-moderator-sdk/scripts/rtx.js +0 -1359
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: realtimex-moderator-sdk
|
|
3
|
-
description: Control and interact with the RealTimeX application through its Node.js SDK. Use for workspaces, threads, agents, activities, LLM chat, vector store, MCP tools, ACP sessions, desktop terminal/browser sessions, chat channels, TTS/STT, and other RealTimeX platform APIs. Load detailed version-matched instructions with `rtx.js skills get <topic>`.
|
|
4
|
-
generated: 2026-06-02
|
|
5
|
-
sdk_version: 1.7.28
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# RealTimeX Moderator SDK
|
|
9
|
-
|
|
10
|
-
SDK-backed control of the local RealTimeX platform (`http://localhost:3001`) using `@realtimex/sdk` **v1.7.28**.
|
|
11
|
-
|
|
12
|
-
This file is the discovery stub. Load workflow content from the bundled CLI so instructions match the installed SDK version.
|
|
13
|
-
|
|
14
|
-
`<SKILL_DIR>` below means this skill directory.
|
|
15
|
-
|
|
16
|
-
## Start Here
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
SKILL=<SKILL_DIR>/scripts/rtx.js
|
|
20
|
-
ENV=--env-dir=<cwd>
|
|
21
|
-
|
|
22
|
-
node "$SKILL" skills get core $ENV
|
|
23
|
-
node "$SKILL" skills get core --full $ENV
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The CLI serves skill content generated from the installed SDK source and generated references.
|
|
27
|
-
|
|
28
|
-
## Specialized Skills
|
|
29
|
-
|
|
30
|
-
Load the smallest relevant topic before acting:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
node "$SKILL" skills list $ENV
|
|
34
|
-
node "$SKILL" skills get workspaces $ENV
|
|
35
|
-
node "$SKILL" skills get agents $ENV
|
|
36
|
-
node "$SKILL" skills get terminal $ENV
|
|
37
|
-
node "$SKILL" skills get browser $ENV
|
|
38
|
-
node "$SKILL" skills get channels $ENV
|
|
39
|
-
node "$SKILL" skills get llm $ENV
|
|
40
|
-
node "$SKILL" skills get mcp $ENV
|
|
41
|
-
node "$SKILL" skills get activities $ENV
|
|
42
|
-
node "$SKILL" skills get api:v1-channels --full $ENV
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
File fallback is also available under `references/`, especially:
|
|
46
|
-
|
|
47
|
-
- `references/quickstart.md`
|
|
48
|
-
- `references/permissions.md`
|
|
49
|
-
- `references/workspaces.md`
|
|
50
|
-
- `references/browser.md`
|
|
51
|
-
- `references/channels.md`
|
|
52
|
-
- `references/api-reference/index.md`
|
|
53
|
-
|
|
54
|
-
## Quick Commands
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
node "$SKILL" ping $ENV
|
|
58
|
-
node "$SKILL" context $ENV
|
|
59
|
-
node "$SKILL" workspaces $ENV
|
|
60
|
-
node "$SKILL" threads <workspace-slug> $ENV
|
|
61
|
-
node "$SKILL" agents $ENV
|
|
62
|
-
node "$SKILL" help
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
For custom scripts:
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
const { initSDK } = require('<SKILL_DIR>/scripts/lib/sdk-init');
|
|
69
|
-
const { sdk, context } = await initSDK();
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Scripts using the SDK must exit explicitly with `process.exit(0)` or `process.exit(1)`.
|
|
73
|
-
|
|
74
|
-
## Critical Routing Rules
|
|
75
|
-
|
|
76
|
-
- Visible terminal work: load `skills get terminal`; use `sdk.desktopRuntimeSessions.*`, not ACP, unless the user explicitly asks for headless ACP.
|
|
77
|
-
- RealTimeX Browser work: load `skills get browser`; use `sdk.desktopBrowser.*` for session/tab control, then use `agent-browser` against the CDP port for page interaction.
|
|
78
|
-
- External chat channels: load `skills get channels`; use `sdk.v1.channels.*`; LocalApps using `x-app-id` need `channels.manage`.
|
|
79
|
-
- Workspace/thread context: load `skills get workspaces`; do not guess workspace/thread when context is unknown.
|
|
80
|
-
|
|
81
|
-
## Known Source Issues
|
|
82
|
-
|
|
83
|
-
| # | Issue |
|
|
84
|
-
|---|-------|
|
|
85
|
-
| 1 | 'sdk.webhook.triggerAgent()' sends 'event: "task.trigger"' — server expects '"trigger-agen |
|
|
86
|
-
| 2 | 'sdk.task.start/complete/fail' take positional '(taskUuid, ...)' — NOT '{ task_uuid }' obj |
|
|
87
|
-
| 3 | 'sdk.activities.list()' returns 'Activity[]' directly — NOT '{ activities: [...] }' |
|
|
88
|
-
| 4 | 'sdk.llm.chat()' response is 'res.response?.content' — NOT 'choices[0].message.content' |
|
|
89
|
-
| 5 | 'sdk.llm.chatStream()' yields 'chunk.textResponse' — NOT 'choices[0].delta.content' |
|
|
90
|
-
| 6 | 'sdk.llm.embedAndStore()' takes '{ texts: string[], documentId?, workspaceId?, ... }' — NO |
|
|
91
|
-
| 7 | 'sdk.llm.vectors.query()' takes a raw 'number[]' embedding — NOT a text string |
|
|
92
|
-
| 8 | 'sdk.llm.vectors.delete()' requires '{ deleteAll: true }' — delete-by-ID not supported |
|
|
93
|
-
| 9 | 'sdk.mcp.getServers()' takes a plain string — NOT '{ provider: "all" }' |
|
|
94
|
-
| 10 | 'getAgents/getWorkspaces/getThreads/getTask' live on 'sdk.api.*' — NOT directly on 'sdk.*' |
|
|
95
|
-
| 11 | ACP 'streamChat' uses named SSE ('event:' line); 'text_delta.data.type === "thinking"' = i |
|
|
96
|
-
| 12 | ACP sessions stall without 'approvalPolicy: "approve-all"' when tools need permission |
|
|
97
|
-
|
|
98
|
-
For evidence and corrected usage:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
node "$SKILL" skills get known-issues $ENV
|
|
102
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Activities
|
|
2
|
-
|
|
3
|
-
> Generated workflow guide · SDK **1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
Use `sdk.activities` for activity CRUD.
|
|
6
|
-
|
|
7
|
-
Required permissions: `activities.read` and/or `activities.write`.
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
await sdk.activities.list({ status: "pending" });
|
|
11
|
-
await sdk.activities.insert({ type: "note", text: "..." });
|
|
12
|
-
await sdk.activities.update(id, updates);
|
|
13
|
-
await sdk.activities.delete(id);
|
|
14
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Agents
|
|
2
|
-
|
|
3
|
-
> Generated workflow guide · SDK **1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
Use `sdk.api` for lightweight lists and `sdk.agent` / `sdk.acpAgent` for execution.
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
await sdk.api.getAgents();
|
|
9
|
-
await sdk.webhook.triggerAgent(agentSlug, workspaceSlug, message);
|
|
10
|
-
await sdk.agent.chat({ workspaceSlug, agent: agentSlug, message });
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Use ACP only for headless/background CLI agent sessions. Use `sdk.desktopRuntimeSessions` for visible Electron terminals.
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# sdk.acpAgent — ACP CLI Agent Sessions
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `AcpAgentModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// List available CLI agents. Pass includeModels to get model lists per agent.
|
|
11
|
-
async listAgents(opts?: { includeModels?: boolean; }): Promise<AcpAgentInfo[]>
|
|
12
|
-
|
|
13
|
-
// Create and initialize a new ACP session. Spawns the CLI agent process.
|
|
14
|
-
async createSession(options: AcpSessionOptions): Promise<AcpSession>
|
|
15
|
-
|
|
16
|
-
// Get session status and runtime options.
|
|
17
|
-
async getSession(sessionKey: string): Promise<AcpSessionStatus>
|
|
18
|
-
|
|
19
|
-
// List active ACP sessions owned by this app.
|
|
20
|
-
async listSessions(): Promise<AcpSessionStatus[]>
|
|
21
|
-
|
|
22
|
-
// Update runtime options (applied on next turn).
|
|
23
|
-
async patchSession(sessionKey: string, patch: AcpRuntimeOptionPatch): Promise<void>
|
|
24
|
-
|
|
25
|
-
// Close session and stop the agent process.
|
|
26
|
-
async closeSession(sessionKey: string, reason?: string): Promise<void>
|
|
27
|
-
|
|
28
|
-
// Synchronous turn — waits for completion, returns full response.
|
|
29
|
-
async chat(sessionKey: string, message: string, attachments?: AcpAttachment[]): Promise<AcpChatResponse>
|
|
30
|
-
|
|
31
|
-
// Streaming turn via SSE. Yields events as they arrive.
|
|
32
|
-
async *streamChat(sessionKey: string, message: string, attachments?: AcpAttachment[]): AsyncIterableIterator<AcpStreamEvent>
|
|
33
|
-
|
|
34
|
-
// Cancel the active turn on a session.
|
|
35
|
-
async cancelTurn(sessionKey: string, reason?: string): Promise<void>
|
|
36
|
-
|
|
37
|
-
// Resolve a pending permission request (call while SSE stream is active).
|
|
38
|
-
async resolvePermission(sessionKey: string, decision: AcpPermissionDecision): Promise<
|
|
39
|
-
|
|
40
|
-
// Convenience: create session + first sync chat in one call.
|
|
41
|
-
async startChat(message: string, options: AcpSessionOptions): Promise<
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## `AcpSessionOptions`
|
|
45
|
-
|
|
46
|
-
```ts
|
|
47
|
-
agent_id: string
|
|
48
|
-
cwd?: string
|
|
49
|
-
label?: string
|
|
50
|
-
model?: string
|
|
51
|
-
approvalPolicy?: "approve-all" | "approve-reads" | "deny-all"
|
|
52
|
-
forwardedProvider?: string
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## `AcpSession`
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
session_key: string
|
|
59
|
-
agent_id: string
|
|
60
|
-
state: "initializing" | "ready" | "stale" | "closed"
|
|
61
|
-
backend_id: string
|
|
62
|
-
created_at: string
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## `AcpSessionStatus`
|
|
66
|
-
|
|
67
|
-
```ts
|
|
68
|
-
runtime_options: AcpRuntimeOptionPatch
|
|
69
|
-
last_activity_at: string | null
|
|
70
|
-
last_error?: string
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## `AcpRuntimeOptionPatch`
|
|
74
|
-
|
|
75
|
-
```ts
|
|
76
|
-
model?: string
|
|
77
|
-
cwd?: string
|
|
78
|
-
timeoutSeconds?: number
|
|
79
|
-
runtimeMode?: string
|
|
80
|
-
approvalPolicy?: "approve-all" | "approve-reads" | "deny-all"
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## `AcpAttachment`
|
|
84
|
-
|
|
85
|
-
```ts
|
|
86
|
-
contentString: string
|
|
87
|
-
mime: string
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## `AcpChatResponse`
|
|
91
|
-
|
|
92
|
-
```ts
|
|
93
|
-
text: string
|
|
94
|
-
stop_reason?: string
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## `AcpStreamEvent`
|
|
98
|
-
|
|
99
|
-
## `AcpPermissionDecision`
|
|
100
|
-
|
|
101
|
-
```ts
|
|
102
|
-
requestId: string
|
|
103
|
-
optionId: string
|
|
104
|
-
outcome?: string
|
|
105
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# sdk.activities — Activities CRUD
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `ActivitiesModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// Request a single permission from Electron via internal API
|
|
11
|
-
async insert(rawData: Record<string, unknown>): Promise<Activity>
|
|
12
|
-
|
|
13
|
-
// Update an existing activity
|
|
14
|
-
async update(id: string, updates: Partial<Activity>): Promise<Activity>
|
|
15
|
-
|
|
16
|
-
// Delete an activity
|
|
17
|
-
async delete(id: string): Promise<void>
|
|
18
|
-
|
|
19
|
-
// Get a single activity by ID
|
|
20
|
-
async get(id: string): Promise<Activity | null>
|
|
21
|
-
|
|
22
|
-
// List activities with optional filters
|
|
23
|
-
async list(options?: { status?: string; limit?: number; offset?: number }): Promise<Activity[]>
|
|
24
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# sdk.agent — LLM Agent Sessions (REST/SSE)
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `AgentModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// Create a new agent session
|
|
11
|
-
async createSession(options?: AgentSessionOptions): Promise<AgentSession>
|
|
12
|
-
|
|
13
|
-
// Chat within a session (synchronous)
|
|
14
|
-
async chat(sessionId: string, message: string): Promise<AgentChatResponse>
|
|
15
|
-
|
|
16
|
-
// Stream chat within a session
|
|
17
|
-
async *streamChat(sessionId: string, message: string): AsyncIterableIterator<StreamChunkEvent>
|
|
18
|
-
|
|
19
|
-
// Get session information
|
|
20
|
-
async getSession(sessionId: string): Promise<AgentSessionInfo>
|
|
21
|
-
|
|
22
|
-
// Close and delete a session
|
|
23
|
-
async closeSession(sessionId: string): Promise<void>
|
|
24
|
-
|
|
25
|
-
// Helper: Create session and send first message in one call
|
|
26
|
-
async startChat(message: string, options?: AgentSessionOptions): Promise<
|
|
27
|
-
```
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# sdk.api — Agents, Workspaces, Threads, Tasks
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `ApiModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
async getAgents(): Promise<Agent[]>
|
|
11
|
-
|
|
12
|
-
async getWorkspaces(): Promise<Workspace[]>
|
|
13
|
-
|
|
14
|
-
async getThreads(workspaceSlug: string): Promise<Thread[]>
|
|
15
|
-
|
|
16
|
-
async getTask(taskUuid: string): Promise<Task>
|
|
17
|
-
```
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# sdk.auth — Auth Token
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `AuthModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// Push a Supabase access token to the Main App.
|
|
11
|
-
async syncSupabaseToken(token: string): Promise<SyncTokenResponse>
|
|
12
|
-
|
|
13
|
-
// Retrieve the current Keycloak access token from Main App.
|
|
14
|
-
async getAccessToken(): Promise<AuthTokenResponse | null>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## `AuthTokenResponse`
|
|
18
|
-
|
|
19
|
-
> Auth Module - Authentication helpers for RealtimeX SDK
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
token: string
|
|
23
|
-
hasToken: boolean
|
|
24
|
-
syncedAt: string | null
|
|
25
|
-
source: string | null
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## `SyncTokenResponse`
|
|
29
|
-
|
|
30
|
-
```ts
|
|
31
|
-
success: boolean
|
|
32
|
-
message: string
|
|
33
|
-
hasToken: boolean
|
|
34
|
-
syncedAt: string | null
|
|
35
|
-
source: string | null
|
|
36
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# sdk.contract — Local App Contract
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `ContractModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
async getLocalAppV1(forceRefresh = false): Promise<LocalAppContractDefinition>
|
|
11
|
-
|
|
12
|
-
async listCapabilities(forceRefresh = false): Promise<ContractCapability[]>
|
|
13
|
-
|
|
14
|
-
async searchCapabilities(query: string): Promise<ContractCapability[]>
|
|
15
|
-
|
|
16
|
-
async describeCapability(capabilityId: string): Promise<ContractCapability>
|
|
17
|
-
|
|
18
|
-
async search(query: string): Promise<ContractCapability[]>
|
|
19
|
-
|
|
20
|
-
async describe(capabilityId: string): Promise<ContractCapability>
|
|
21
|
-
|
|
22
|
-
async invoke(payload: ContractInvokePayload): Promise<TriggerAgentResponse>
|
|
23
|
-
|
|
24
|
-
getCachedCatalogHash(): string | null
|
|
25
|
-
|
|
26
|
-
clearCache(): void
|
|
27
|
-
```
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Core — RealtimeXSDK
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `RealtimeXSDK`
|
|
6
|
-
|
|
7
|
-
### Public Properties
|
|
8
|
-
|
|
9
|
-
- `activities: ActivitiesModule`
|
|
10
|
-
- `webhook: WebhookModule`
|
|
11
|
-
- `api: ApiModule`
|
|
12
|
-
- `task: TaskModule`
|
|
13
|
-
- `port: PortModule`
|
|
14
|
-
- `llm: LLMModule`
|
|
15
|
-
- `tts: TTSModule`
|
|
16
|
-
- `stt: STTModule`
|
|
17
|
-
- `agent: AgentModule`
|
|
18
|
-
- `acpAgent: AcpAgentModule`
|
|
19
|
-
- `mcp: MCPModule`
|
|
20
|
-
- `contract: ContractModule`
|
|
21
|
-
- `contractRuntime: ContractRuntime`
|
|
22
|
-
- `database: DatabaseModule`
|
|
23
|
-
- `auth: AuthModule`
|
|
24
|
-
- `credentials: CredentialsModule`
|
|
25
|
-
- `v1: V1ApiNamespace | undefined`
|
|
26
|
-
- `desktopRuntimeSessions: V1DesktopRuntimeSessionsModule | undefined`
|
|
27
|
-
- `desktopBrowser: V1DesktopBrowserModule | undefined`
|
|
28
|
-
|
|
29
|
-
### Methods
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
// Developer API (v1) — requires apiKey to be set in config.
|
|
33
|
-
async register(permissions?: string[]): void
|
|
34
|
-
|
|
35
|
-
// Get environment variable (works in Node.js and browser)
|
|
36
|
-
async ping(): Promise<
|
|
37
|
-
|
|
38
|
-
// Get the absolute path to the data directory for this app.
|
|
39
|
-
async getAppDataDir(): Promise<string>
|
|
40
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# sdk.database — Supabase Config
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `DatabaseModule`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// Get the Supabase database configuration for this app.
|
|
11
|
-
async getConfig(): Promise<DatabaseConfig>
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## `DatabaseConfig`
|
|
15
|
-
|
|
16
|
-
> Database Module - Retrieve Supabase config from RealtimeX Main App
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
url: string
|
|
20
|
-
anonKey: string
|
|
21
|
-
mode: 'compatible' | 'custom'
|
|
22
|
-
tables: string[]
|
|
23
|
-
max_concurrent_tasks: number
|
|
24
|
-
```
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# API Reference Index
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
Use these files for exact SDK signatures. Topic guides in `references/*.md` explain workflows.
|
|
6
|
-
|
|
7
|
-
| Module | File |
|
|
8
|
-
|---|---|
|
|
9
|
-
| Core — RealtimeXSDK | [core.md](./core.md) |
|
|
10
|
-
| sdk.api — Agents, Workspaces, Threads, Tasks | [api.md](./api.md) |
|
|
11
|
-
| sdk.activities — Activities CRUD | [activities.md](./activities.md) |
|
|
12
|
-
| sdk.task — Task Lifecycle Reporting | [task.md](./task.md) |
|
|
13
|
-
| sdk.webhook — Webhook Trigger | [webhook.md](./webhook.md) |
|
|
14
|
-
| sdk.llm — LLM Chat, Embed, Vector Search | [llm.md](./llm.md) |
|
|
15
|
-
| sdk.mcp — MCP Server Tools | [mcp.md](./mcp.md) |
|
|
16
|
-
| sdk.acpAgent — ACP CLI Agent Sessions | [acpagent.md](./acpagent.md) |
|
|
17
|
-
| sdk.agent — LLM Agent Sessions (REST/SSE) | [agent.md](./agent.md) |
|
|
18
|
-
| sdk.tts — Text-to-Speech | [tts.md](./tts.md) |
|
|
19
|
-
| sdk.stt — Speech-to-Text | [stt.md](./stt.md) |
|
|
20
|
-
| sdk.contract — Local App Contract | [contract.md](./contract.md) |
|
|
21
|
-
| sdk.database — Supabase Config | [database.md](./database.md) |
|
|
22
|
-
| sdk.auth — Auth Token | [auth.md](./auth.md) |
|
|
23
|
-
| sdk.port — Port Management | [port.md](./port.md) |
|
|
24
|
-
| sdk.v1.acpAuth — v1 Acp Auth | [v1-acpauth.md](./v1-acpauth.md) |
|
|
25
|
-
| sdk.v1.acpCommands — v1 Acp Commands | [v1-acpcommands.md](./v1-acpcommands.md) |
|
|
26
|
-
| sdk.v1.admin — v1 Admin | [v1-admin.md](./v1-admin.md) |
|
|
27
|
-
| sdk.v1.auth — v1 Auth | [v1-auth.md](./v1-auth.md) |
|
|
28
|
-
| sdk.v1.channels — v1 Channels | [v1-channels.md](./v1-channels.md) |
|
|
29
|
-
| sdk.v1.credentials — v1 Credentials | [v1-credentials.md](./v1-credentials.md) |
|
|
30
|
-
| sdk.v1.customThemes — v1 Custom Themes | [v1-customthemes.md](./v1-customthemes.md) |
|
|
31
|
-
| sdk.v1.desktopBrowser — v1 Desktop Browser | [v1-desktopbrowser.md](./v1-desktopbrowser.md) |
|
|
32
|
-
| sdk.v1.desktopEmbed — v1 Desktop Embed | [v1-desktopembed.md](./v1-desktopembed.md) |
|
|
33
|
-
| sdk.v1.desktopRuntimeSessions — v1 Desktop Runtime Sessions | [v1-desktopruntimesessions.md](./v1-desktopruntimesessions.md) |
|
|
34
|
-
| sdk.v1.document — v1 Document | [v1-document.md](./v1-document.md) |
|
|
35
|
-
| sdk.v1.embed — v1 Embed | [v1-embed.md](./v1-embed.md) |
|
|
36
|
-
| sdk.v1.openAI — v1 Open A I | [v1-openai.md](./v1-openai.md) |
|
|
37
|
-
| sdk.v1.sttApi — v1 Stt Api | [v1-sttapi.md](./v1-sttapi.md) |
|
|
38
|
-
| sdk.v1.system — v1 System | [v1-system.md](./v1-system.md) |
|
|
39
|
-
| sdk.v1.thread — v1 Thread | [v1-thread.md](./v1-thread.md) |
|
|
40
|
-
| sdk.v1.users — v1 Users | [v1-users.md](./v1-users.md) |
|
|
41
|
-
| sdk.v1.workspace — v1 Workspace | [v1-workspace.md](./v1-workspace.md) |
|
|
42
|
-
|
|
43
|
-
The legacy aggregate reference remains available at `../api-reference.md`.
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# sdk.llm — LLM Chat, Embed, Vector Search
|
|
2
|
-
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.28** · 2026-06-02
|
|
4
|
-
|
|
5
|
-
## `VectorStore`
|
|
6
|
-
|
|
7
|
-
### Methods
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
// Request a single permission from Electron via internal API
|
|
11
|
-
async upsert(vectors: VectorRecord[], options: VectorUpsertOptions = {}): Promise<VectorUpsertResponse>
|
|
12
|
-
|
|
13
|
-
// Query similar vectors by embedding
|
|
14
|
-
async query(vector: number[], options: VectorQueryOptions = {}): Promise<VectorQueryResponse>
|
|
15
|
-
|
|
16
|
-
// Delete vectors from storage
|
|
17
|
-
async delete(options: VectorDeleteOptions): Promise<VectorDeleteResponse>
|
|
18
|
-
|
|
19
|
-
// List all available workspaces (namespaces) for this app
|
|
20
|
-
async listWorkspaces(): Promise<VectorListWorkspacesResponse>
|
|
21
|
-
|
|
22
|
-
// Register a custom vector database configuration for this app
|
|
23
|
-
async registerConfig(provider: string, config: Record<string, any>): Promise<VectorRegisterResponse>
|
|
24
|
-
|
|
25
|
-
// List all supported vector database providers and their configuration requirements
|
|
26
|
-
async listProviders(): Promise<VectorProvidersResponse>
|
|
27
|
-
|
|
28
|
-
// Get the current vector database configuration for this app
|
|
29
|
-
async getConfig(): Promise<VectorConfigResponse>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## `LLMModule`
|
|
33
|
-
|
|
34
|
-
### Public Properties
|
|
35
|
-
|
|
36
|
-
- `vectors: VectorStore`
|
|
37
|
-
|
|
38
|
-
### Methods
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
// Request a single permission from Electron via internal API
|
|
42
|
-
async chatProviders(): Promise<ProvidersResponse>
|
|
43
|
-
|
|
44
|
-
// Get only configured embedding providers
|
|
45
|
-
async embedProviders(): Promise<ProvidersResponse>
|
|
46
|
-
|
|
47
|
-
// Send a chat completion request (synchronous)
|
|
48
|
-
async chat(messages: ChatMessage[], options: ChatOptions = {}): Promise<ChatResponse>
|
|
49
|
-
|
|
50
|
-
// Send a streaming chat completion request (SSE)
|
|
51
|
-
async *chatStream(messages: ChatMessage[], options: ChatOptions = {}): AsyncGenerator<StreamChunk, void, unknown>
|
|
52
|
-
|
|
53
|
-
// Generate vector embeddings from text
|
|
54
|
-
async embed(input: string | string[], options: EmbedOptions = {}): Promise<EmbedResponse>
|
|
55
|
-
|
|
56
|
-
// Helper: Embed text and store as vectors in one call
|
|
57
|
-
async embedAndStore(params: { texts: string[]; documentId?: string; workspaceId?: string; idPrefix?: string; provider?: string; model?: string; }): Promise<VectorUpsertResponse>
|
|
58
|
-
|
|
59
|
-
// Helper: Search similar documents by text query
|
|
60
|
-
async search(query: string, options: VectorQueryOptions = {}): Promise<VectorQueryResult[]>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## `ChatOptions`
|
|
64
|
-
|
|
65
|
-
```ts
|
|
66
|
-
model?: string
|
|
67
|
-
provider?: string
|
|
68
|
-
temperature?: number
|
|
69
|
-
max_tokens?: number
|
|
70
|
-
response_format?: { type: string }
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## `ChatResponse`
|
|
74
|
-
|
|
75
|
-
```ts
|
|
76
|
-
success: boolean
|
|
77
|
-
response?: {
|
|
78
|
-
content: string
|
|
79
|
-
model: string
|
|
80
|
-
provider?: string
|
|
81
|
-
metrics?: {
|
|
82
|
-
prompt_tokens: number
|
|
83
|
-
completion_tokens: number
|
|
84
|
-
total_tokens: number
|
|
85
|
-
duration?: number
|
|
86
|
-
outputTps?: number
|
|
87
|
-
error?: string
|
|
88
|
-
code?: string
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## `StreamChunk`
|
|
92
|
-
|
|
93
|
-
```ts
|
|
94
|
-
uuid?: string
|
|
95
|
-
type?: string
|
|
96
|
-
textResponse?: string
|
|
97
|
-
close?: boolean
|
|
98
|
-
error?: boolean
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## `EmbedOptions`
|
|
102
|
-
|
|
103
|
-
```ts
|
|
104
|
-
provider?: string
|
|
105
|
-
model?: string
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## `EmbedResponse`
|
|
109
|
-
|
|
110
|
-
```ts
|
|
111
|
-
success: boolean
|
|
112
|
-
embeddings?: number[][]
|
|
113
|
-
provider?: string
|
|
114
|
-
model?: string
|
|
115
|
-
dimensions?: number
|
|
116
|
-
error?: string
|
|
117
|
-
code?: string
|
|
118
|
-
errors?: string[]
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## `VectorRecord`
|
|
122
|
-
|
|
123
|
-
```ts
|
|
124
|
-
id: string
|
|
125
|
-
vector: number[]
|
|
126
|
-
metadata?: {
|
|
127
|
-
text?: string
|
|
128
|
-
documentId?: string
|
|
129
|
-
workspaceId?: string
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## `VectorUpsertOptions`
|
|
133
|
-
|
|
134
|
-
```ts
|
|
135
|
-
workspaceId?: string
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## `VectorQueryOptions`
|
|
139
|
-
|
|
140
|
-
```ts
|
|
141
|
-
topK?: number
|
|
142
|
-
filter?: {
|
|
143
|
-
workspaceId?: string
|
|
144
|
-
documentId?: string
|
|
145
|
-
workspaceId?: string
|
|
146
|
-
provider?: string
|
|
147
|
-
model?: string
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## `VectorQueryResult`
|
|
151
|
-
|
|
152
|
-
```ts
|
|
153
|
-
id: string
|
|
154
|
-
score: number
|
|
155
|
-
metadata?: {
|
|
156
|
-
text?: string
|
|
157
|
-
documentId?: string
|
|
158
|
-
workspaceId?: string
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## `VectorDeleteOptions`
|
|
162
|
-
|
|
163
|
-
```ts
|
|
164
|
-
workspaceId?: string
|
|
165
|
-
deleteAll: true
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## `VectorListWorkspacesResponse`
|
|
169
|
-
|
|
170
|
-
```ts
|
|
171
|
-
success: boolean
|
|
172
|
-
workspaces?: string[]
|
|
173
|
-
error?: string
|
|
174
|
-
code?: string
|
|
175
|
-
error_message?: string
|
|
176
|
-
```
|