@realtimex/sdk 1.7.17 → 1.7.19
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/package.json +1 -1
- package/skills/realtimex-moderator-sdk/SKILL.md +49 -493
- package/skills/realtimex-moderator-sdk/references/activities.md +14 -0
- package/skills/realtimex-moderator-sdk/references/agents.md +13 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +105 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/api.md +17 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +36 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/core.md +40 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/database.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/index.md +43 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +176 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +50 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/port.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/task.md +62 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +18 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +48 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +18 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +78 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +33 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +12 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +36 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +26 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +13 -0
- package/skills/realtimex-moderator-sdk/references/api-reference.md +78 -1
- package/skills/realtimex-moderator-sdk/references/app-concepts.md +148 -0
- package/skills/realtimex-moderator-sdk/references/browser.md +27 -0
- package/skills/realtimex-moderator-sdk/references/channels.md +189 -0
- package/skills/realtimex-moderator-sdk/references/known-issues.md +1 -1
- package/skills/realtimex-moderator-sdk/references/llm.md +13 -0
- package/skills/realtimex-moderator-sdk/references/mcp.md +13 -0
- package/skills/realtimex-moderator-sdk/references/permissions.md +30 -0
- package/skills/realtimex-moderator-sdk/references/quickstart.md +16 -0
- package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +34 -0
- package/skills/realtimex-moderator-sdk/references/workspaces.md +20 -0
- package/skills/realtimex-moderator-sdk/scripts/rtx.js +121 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# sdk.acpAgent — ACP CLI Agent Sessions
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# sdk.activities — Activities CRUD
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# sdk.agent — LLM Agent Sessions (REST/SSE)
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# sdk.api — Agents, Workspaces, Threads, Tasks
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# sdk.auth — Auth Token
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# sdk.contract — Local App Contract
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Core — RealtimeXSDK
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# sdk.database — Supabase Config
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# API Reference Index
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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`.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# sdk.llm — LLM Chat, Embed, Vector Search
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
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
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# sdk.mcp — MCP Server Tools
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
4
|
+
|
|
5
|
+
## `MCPModule` *(extends ApiModule)*
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
super(realtimexUrl, appId, appName, apiKey): void
|
|
11
|
+
|
|
12
|
+
// List configured MCP servers.
|
|
13
|
+
async getServers(provider: 'local' | 'remote' | 'all' = 'all'): Promise<MCPServer[]>
|
|
14
|
+
|
|
15
|
+
// List available tools for a specific MCP server.
|
|
16
|
+
async getTools(serverName: string, provider: 'local' | 'remote' = 'local'): Promise<MCPTool[]>
|
|
17
|
+
|
|
18
|
+
// Execute a tool on an MCP server.
|
|
19
|
+
async executeTool(serverName: string, toolName: string, args: Record<string, any> = {}, provider: 'local' | 'remote' = 'local'): Promise<any>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## `MCPServer`
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
name: string
|
|
26
|
+
display_name: string
|
|
27
|
+
description: string | null
|
|
28
|
+
server_type: string
|
|
29
|
+
enabled: boolean
|
|
30
|
+
provider: 'local' | 'remote'
|
|
31
|
+
tags: string[]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## `MCPTool`
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
name: string
|
|
38
|
+
description: string | null
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## `MCPToolResult`
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
success: boolean
|
|
45
|
+
server: string
|
|
46
|
+
tool: string
|
|
47
|
+
provider: string
|
|
48
|
+
result: any
|
|
49
|
+
error?: string
|
|
50
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# sdk.port — Port Management
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
4
|
+
|
|
5
|
+
## `PortModule`
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Get suggested port from environment (RTX_PORT) or default
|
|
11
|
+
getSuggestedPort(): number
|
|
12
|
+
|
|
13
|
+
// Check if a port is available on a specific host
|
|
14
|
+
async isPortAvailable(port: number): Promise<boolean>
|
|
15
|
+
|
|
16
|
+
// Find an available port starting from the suggested port
|
|
17
|
+
async findAvailablePort(startPort?: number, maxAttempts: number = 100): Promise<number>
|
|
18
|
+
|
|
19
|
+
// Get a ready-to-use port
|
|
20
|
+
async getPort(): Promise<number>
|
|
21
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# sdk.stt — Speech-to-Text
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
4
|
+
|
|
5
|
+
## `STTModule` *(extends ApiModule)*
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Get available STT providers and their models.
|
|
11
|
+
async listProviders(): Promise<STTProvider[]>
|
|
12
|
+
|
|
13
|
+
// Listen to microphone and transcribe speech to text.
|
|
14
|
+
async listen(options: STTListenOptions): Promise<STTResponse>
|
|
15
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# sdk.task — Task Lifecycle Reporting
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
4
|
+
|
|
5
|
+
## `TaskModule`
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Configure callback signing behavior.
|
|
11
|
+
configureContract(config: { callbackSecret?: string; signCallbacksByDefault?: boolean }): void
|
|
12
|
+
|
|
13
|
+
// Claim a task before processing.
|
|
14
|
+
async claim(taskUuid: string, options: TaskEventOptions = {}): Promise<TaskStatusResponse>
|
|
15
|
+
|
|
16
|
+
// Alias for claim()
|
|
17
|
+
async claimed(taskUuid: string, options: TaskEventOptions = {}): Promise<TaskStatusResponse>
|
|
18
|
+
|
|
19
|
+
// Mark task as processing.
|
|
20
|
+
async start(taskUuid: string, machineIdOrOptions?: string | TaskEventOptions): Promise<TaskStatusResponse>
|
|
21
|
+
|
|
22
|
+
// Report incremental task progress.
|
|
23
|
+
async progress(taskUuid: string, progressData: Record<string, unknown> = {}, options: TaskEventOptions = {}): Promise<TaskStatusResponse>
|
|
24
|
+
|
|
25
|
+
// Mark task as completed with result.
|
|
26
|
+
async complete(taskUuid: string, result: Record<string, unknown> = {}, machineIdOrOptions?: string | TaskEventOptions): Promise<TaskStatusResponse>
|
|
27
|
+
|
|
28
|
+
// Mark task as failed with error.
|
|
29
|
+
async fail(taskUuid: string, error: string, machineIdOrOptions?: string | TaskEventOptions): Promise<TaskStatusResponse>
|
|
30
|
+
|
|
31
|
+
// Mark task as canceled.
|
|
32
|
+
async cancel(taskUuid: string, reason?: string, options: TaskEventOptions = {}): Promise<TaskStatusResponse>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## `TaskStatusResponse`
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
success: boolean
|
|
39
|
+
task_uuid: string
|
|
40
|
+
status: string
|
|
41
|
+
event_id?: string
|
|
42
|
+
attempt_id?: string
|
|
43
|
+
event_type?: ContractEventType | string
|
|
44
|
+
deduplicated?: boolean
|
|
45
|
+
duplicate?: boolean
|
|
46
|
+
message?: string
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## `TaskEventOptions`
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
machineId?: string
|
|
53
|
+
attemptId?: string | number
|
|
54
|
+
eventId?: string
|
|
55
|
+
timestamp?: string
|
|
56
|
+
callbackUrl?: string
|
|
57
|
+
callbackSecret?: string
|
|
58
|
+
sign?: boolean
|
|
59
|
+
userEmail?: string
|
|
60
|
+
activityId?: string
|
|
61
|
+
tableName?: string
|
|
62
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# sdk.tts — Text-to-Speech
|
|
2
|
+
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.19** · 2026-05-18
|
|
4
|
+
|
|
5
|
+
## `TTSModule`
|
|
6
|
+
|
|
7
|
+
### Methods
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Request a single permission from Electron via internal API
|
|
11
|
+
async speak(text: string, options: TTSOptions = {}): Promise<ArrayBuffer>
|
|
12
|
+
|
|
13
|
+
// Generate speech from text with streaming (yields decoded audio chunks)
|
|
14
|
+
async *speakStream(text: string, options: TTSOptions = {}): AsyncGenerator<TTSChunk>
|
|
15
|
+
|
|
16
|
+
// List available TTS providers with configuration options
|
|
17
|
+
async listProviders(): Promise<TTSProvider[]>
|
|
18
|
+
```
|