@realtimex/sdk 1.7.7 → 1.7.9
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-EMMHP4JM.mjs → chunk-3DVGTGOK.mjs} +65 -73
- package/dist/{errors-kN70vQrd.d.mts → errors-x6ngbrlA.d.mts} +47 -52
- package/dist/{errors-kN70vQrd.d.ts → errors-x6ngbrlA.d.ts} +47 -52
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +65 -72
- package/dist/index.mjs +2 -1
- package/dist/v1/index.d.mts +2 -2
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/index.js +66 -74
- package/dist/v1/index.mjs +3 -3
- package/package.json +1 -1
- package/skills/realtimex-moderator-sdk/SKILL.md +93 -9
- package/skills/realtimex-moderator-sdk/references/api-reference.md +106 -34
- package/skills/realtimex-moderator-sdk/references/known-issues.md +1 -1
- package/skills/realtimex-moderator-sdk/scripts/rtx.js +143 -0
package/dist/v1/index.js
CHANGED
|
@@ -28,10 +28,10 @@ __export(v1_exports, {
|
|
|
28
28
|
V1AdminModule: () => V1AdminModule,
|
|
29
29
|
V1ApiNamespace: () => V1ApiNamespace,
|
|
30
30
|
V1AuthModule: () => V1AuthModule,
|
|
31
|
+
V1DesktopRuntimeSessionsModule: () => V1DesktopRuntimeSessionsModule,
|
|
31
32
|
V1DocumentModule: () => V1DocumentModule,
|
|
32
33
|
V1EmbedModule: () => V1EmbedModule,
|
|
33
34
|
V1OpenAIModule: () => V1OpenAIModule,
|
|
34
|
-
V1RuntimeSessionsModule: () => V1RuntimeSessionsModule,
|
|
35
35
|
V1SystemModule: () => V1SystemModule,
|
|
36
36
|
V1ThreadModule: () => V1ThreadModule,
|
|
37
37
|
V1UsersModule: () => V1UsersModule,
|
|
@@ -533,77 +533,6 @@ var V1SystemModule = class {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
|
|
536
|
-
// src/v1/modules/v1RuntimeSessions.ts
|
|
537
|
-
var V1RuntimeSessionsModule = class {
|
|
538
|
-
constructor(client) {
|
|
539
|
-
this.client = client;
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Resolve the desktop shell launch working directory for a workspace or thread context.
|
|
543
|
-
* @see POST /v1/runtime-sessions/desktop-shell/launch-spec
|
|
544
|
-
*/
|
|
545
|
-
async desktopShellLaunchSpec(body) {
|
|
546
|
-
return this.client.request("POST", `/v1/runtime-sessions/desktop-shell/launch-spec`, body);
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Evaluate the runtime terminal permission policy for a pending CLI action.
|
|
550
|
-
* @see POST /v1/runtime-sessions/terminal-permissions/evaluate
|
|
551
|
-
*/
|
|
552
|
-
async terminalPermissionsEvaluate(body) {
|
|
553
|
-
return this.client.request("POST", `/v1/runtime-sessions/terminal-permissions/evaluate`, body);
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Resolve the CLI agent terminal launch command and working directory.
|
|
557
|
-
* @see POST /v1/runtime-sessions/cli-agent/launch-spec
|
|
558
|
-
*/
|
|
559
|
-
async cliAgentLaunchSpec(body) {
|
|
560
|
-
return this.client.request("POST", `/v1/runtime-sessions/cli-agent/launch-spec`, body);
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Create a persistent ACP-backed CLI agent runtime session.
|
|
564
|
-
* @see POST /v1/runtime-sessions/cli-agent
|
|
565
|
-
*/
|
|
566
|
-
async cliAgent(body) {
|
|
567
|
-
return this.client.request("POST", `/v1/runtime-sessions/cli-agent`, body);
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
|
|
571
|
-
* @see POST /v1/runtime-sessions/cli-agent/{sessionKey}/chat/stream
|
|
572
|
-
*/
|
|
573
|
-
// @streaming-stub — implement SSE parsing in overrides/v1RuntimeSessionsStreaming.ts
|
|
574
|
-
async cliAgentChatStream(sessionKey, body) {
|
|
575
|
-
return this.client.requestRaw("POST", `/v1/runtime-sessions/cli-agent/${sessionKey}/chat/stream`, body);
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Resolve a pending permission request for a CLI agent runtime session.
|
|
579
|
-
* @see POST /v1/runtime-sessions/cli-agent/{sessionKey}/permission
|
|
580
|
-
*/
|
|
581
|
-
async cliAgentPermission(sessionKey, body) {
|
|
582
|
-
return this.client.request("POST", `/v1/runtime-sessions/cli-agent/${sessionKey}/permission`, body);
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Cancel the current CLI turn for an active runtime session.
|
|
586
|
-
* @see POST /v1/runtime-sessions/cli-agent/{sessionKey}/cancel
|
|
587
|
-
*/
|
|
588
|
-
async cliAgentCancel(sessionKey, body) {
|
|
589
|
-
return this.client.request("POST", `/v1/runtime-sessions/cli-agent/${sessionKey}/cancel`, body);
|
|
590
|
-
}
|
|
591
|
-
/**
|
|
592
|
-
* Close a CLI agent runtime session and clear its control-plane metadata.
|
|
593
|
-
* @see DELETE /v1/runtime-sessions/cli-agent/{sessionKey}
|
|
594
|
-
*/
|
|
595
|
-
async deleteCliAgent(sessionKey) {
|
|
596
|
-
return this.client.request("DELETE", `/v1/runtime-sessions/cli-agent/${sessionKey}`);
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Fetch the current state and runtime options for a CLI agent session.
|
|
600
|
-
* @see GET /v1/runtime-sessions/cli-agent/{sessionKey}
|
|
601
|
-
*/
|
|
602
|
-
async getCliAgent(sessionKey) {
|
|
603
|
-
return this.client.request("GET", `/v1/runtime-sessions/cli-agent/${sessionKey}`);
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
|
|
607
536
|
// src/v1/modules/v1Thread.ts
|
|
608
537
|
var V1ThreadModule = class {
|
|
609
538
|
constructor(client) {
|
|
@@ -759,6 +688,69 @@ var V1EmbedModule = class {
|
|
|
759
688
|
}
|
|
760
689
|
};
|
|
761
690
|
|
|
691
|
+
// src/v1/modules/v1DesktopRuntimeSessions.ts
|
|
692
|
+
var V1DesktopRuntimeSessionsModule = class {
|
|
693
|
+
constructor(client) {
|
|
694
|
+
this.client = client;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Open the shared terminal launcher in the Electron desktop app.
|
|
698
|
+
* @see POST /sdk/desktop/runtime-sessions/open-launcher
|
|
699
|
+
*/
|
|
700
|
+
async openLauncher(body) {
|
|
701
|
+
return this.client.request("POST", `/sdk/desktop/runtime-sessions/open-launcher`, body);
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Launch a local PTY-backed shell terminal in the Electron desktop app.
|
|
705
|
+
* @see POST /sdk/desktop/runtime-sessions/launch-terminal-shell
|
|
706
|
+
*/
|
|
707
|
+
async launchTerminalShell(body) {
|
|
708
|
+
return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-shell`, body);
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Launch a local PTY-backed CLI agent terminal in the Electron desktop app.
|
|
712
|
+
* @see POST /sdk/desktop/runtime-sessions/launch-terminal-cli-agent
|
|
713
|
+
*/
|
|
714
|
+
async launchTerminalCliAgent(body) {
|
|
715
|
+
return this.client.request("POST", `/sdk/desktop/runtime-sessions/launch-terminal-cli-agent`, body);
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* List desktop PTY-backed runtime sessions currently known to the Electron app.
|
|
719
|
+
* @see GET /sdk/desktop/runtime-sessions
|
|
720
|
+
*/
|
|
721
|
+
async listRuntimeSessions() {
|
|
722
|
+
return this.client.request("GET", `/sdk/desktop/runtime-sessions`);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Fetch one desktop PTY-backed runtime session by runtime session ID or PTY session ID.
|
|
726
|
+
* @see GET /sdk/desktop/runtime-sessions/{sessionId}
|
|
727
|
+
*/
|
|
728
|
+
async getRuntimeSession(sessionId) {
|
|
729
|
+
return this.client.request("GET", `/sdk/desktop/runtime-sessions/${sessionId}`);
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Close an existing desktop runtime session.
|
|
733
|
+
* @see DELETE /sdk/desktop/runtime-sessions/{sessionId}
|
|
734
|
+
*/
|
|
735
|
+
async deleteRuntimeSession(sessionId) {
|
|
736
|
+
return this.client.request("DELETE", `/sdk/desktop/runtime-sessions/${sessionId}`);
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Write input to an existing desktop runtime session. Use `message` to submit a CLI turn or `input` for raw PTY data.
|
|
740
|
+
* @see POST /sdk/desktop/runtime-sessions/{sessionId}/write
|
|
741
|
+
*/
|
|
742
|
+
async write(sessionId, body) {
|
|
743
|
+
return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/write`, body);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Approve or deny a pending desktop runtime session action.
|
|
747
|
+
* @see POST /sdk/desktop/runtime-sessions/{sessionId}/permission
|
|
748
|
+
*/
|
|
749
|
+
async permission(sessionId, body) {
|
|
750
|
+
return this.client.request("POST", `/sdk/desktop/runtime-sessions/${sessionId}/permission`, body);
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
|
|
762
754
|
// src/v1/namespace.ts
|
|
763
755
|
var V1ApiNamespace = class {
|
|
764
756
|
// [GENERATED-PROPS-END]
|
|
@@ -769,11 +761,11 @@ var V1ApiNamespace = class {
|
|
|
769
761
|
this.document = new V1DocumentModule(this._client);
|
|
770
762
|
this.workspace = new V1WorkspaceModule(this._client);
|
|
771
763
|
this.system = new V1SystemModule(this._client);
|
|
772
|
-
this.runtimeSessions = new V1RuntimeSessionsModule(this._client);
|
|
773
764
|
this.thread = new V1ThreadModule(this._client);
|
|
774
765
|
this.users = new V1UsersModule(this._client);
|
|
775
766
|
this.openai = new V1OpenAIModule(this._client);
|
|
776
767
|
this.embed = new V1EmbedModule(this._client);
|
|
768
|
+
this.desktopRuntimeSessions = new V1DesktopRuntimeSessionsModule(this._client);
|
|
777
769
|
}
|
|
778
770
|
};
|
|
779
771
|
|
|
@@ -900,10 +892,10 @@ async function uploadFileToFolder(client, file, folderName, options = {}) {
|
|
|
900
892
|
V1AdminModule,
|
|
901
893
|
V1ApiNamespace,
|
|
902
894
|
V1AuthModule,
|
|
895
|
+
V1DesktopRuntimeSessionsModule,
|
|
903
896
|
V1DocumentModule,
|
|
904
897
|
V1EmbedModule,
|
|
905
898
|
V1OpenAIModule,
|
|
906
|
-
V1RuntimeSessionsModule,
|
|
907
899
|
V1SystemModule,
|
|
908
900
|
V1ThreadModule,
|
|
909
901
|
V1UsersModule,
|
package/dist/v1/index.mjs
CHANGED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
V1AdminModule,
|
|
8
8
|
V1ApiNamespace,
|
|
9
9
|
V1AuthModule,
|
|
10
|
+
V1DesktopRuntimeSessionsModule,
|
|
10
11
|
V1DocumentModule,
|
|
11
12
|
V1EmbedModule,
|
|
12
13
|
V1OpenAIModule,
|
|
13
|
-
V1RuntimeSessionsModule,
|
|
14
14
|
V1SystemModule,
|
|
15
15
|
V1ThreadModule,
|
|
16
16
|
V1UsersModule,
|
|
17
17
|
V1WorkspaceModule,
|
|
18
18
|
ValidationError
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-3DVGTGOK.mjs";
|
|
20
20
|
|
|
21
21
|
// src/v1/overrides/v1WorkspaceStreaming.ts
|
|
22
22
|
async function* streamWorkspaceChat(client, slug, body) {
|
|
@@ -140,10 +140,10 @@ export {
|
|
|
140
140
|
V1AdminModule,
|
|
141
141
|
V1ApiNamespace,
|
|
142
142
|
V1AuthModule,
|
|
143
|
+
V1DesktopRuntimeSessionsModule,
|
|
143
144
|
V1DocumentModule,
|
|
144
145
|
V1EmbedModule,
|
|
145
146
|
V1OpenAIModule,
|
|
146
|
-
V1RuntimeSessionsModule,
|
|
147
147
|
V1SystemModule,
|
|
148
148
|
V1ThreadModule,
|
|
149
149
|
V1UsersModule,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: realtimex-moderator-sdk
|
|
3
3
|
description: Control and interact with the RealTimeX application through its Node.js SDK. This skill should be used when users want to manage workspaces, threads, agents, activities, LLM chat, vector store, MCP tools, ACP agent sessions, TTS/STT, or any other RealTimeX platform feature via the API. All method signatures are verified against the SDK source code.
|
|
4
|
-
generated: 2026-05-
|
|
5
|
-
sdk_version: 1.7.
|
|
4
|
+
generated: 2026-05-06
|
|
5
|
+
sdk_version: 1.7.9
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# RealTimeX Moderator (SDK Source-Verified)
|
|
9
9
|
|
|
10
|
-
Interact with the RealTimeX platform (`http://localhost:3001`) using `@realtimex/sdk` **v1.7.
|
|
10
|
+
Interact with the RealTimeX platform (`http://localhost:3001`) using `@realtimex/sdk` **v1.7.9**. Authentication is automatic when running inside RealtimeX.
|
|
11
11
|
|
|
12
12
|
`<SKILL_DIR>` below refers to the directory containing this SKILL.md.
|
|
13
13
|
|
|
@@ -24,6 +24,10 @@ node "$SKILL" agents $ENV
|
|
|
24
24
|
node "$SKILL" workspaces $ENV
|
|
25
25
|
node "$SKILL" threads <workspace-slug> $ENV
|
|
26
26
|
node "$SKILL" trigger-agent <agent> <workspace> <msg> $ENV
|
|
27
|
+
node "$SKILL" terminal-launch-cli-agent claude claude-cli "what is current working dir" --workspace=<slug> --thread=<slug> $ENV
|
|
28
|
+
node "$SKILL" terminal-launch-shell --workspace=<slug> --thread=<slug> --command="pwd" $ENV
|
|
29
|
+
node "$SKILL" terminal-sessions --workspace=<slug> $ENV
|
|
30
|
+
node "$SKILL" terminal-write <session-id> "continue" $ENV
|
|
27
31
|
node "$SKILL" acp-chat qwen-cli "question" --cwd=<path> $ENV
|
|
28
32
|
node "$SKILL" llm-chat "message" $ENV
|
|
29
33
|
node "$SKILL" activities --status=pending $ENV
|
|
@@ -44,15 +48,95 @@ Scripts using the SDK must exit explicitly — `process.exit(0)` on success, `pr
|
|
|
44
48
|
|
|
45
49
|
---
|
|
46
50
|
|
|
47
|
-
##
|
|
51
|
+
## Desktop Terminal Sessions
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
For anything that says **launch terminal**, **open shell**, **open Claude/Gemini in terminal**, or **send another message to an existing terminal session**, use:
|
|
50
54
|
|
|
51
|
-
|
|
52
|
-
- `sdk.agent.*` = Runtime Sessions = CLI Agent / Terminal mode
|
|
53
|
-
- `sdk.acpAgent.*` = ACP-backed CLI agent sessions
|
|
55
|
+
- `sdk.desktopRuntimeSessions.*`
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
Do **not** use ACP for that unless the user explicitly asks for a headless ACP session.
|
|
58
|
+
|
|
59
|
+
### Use desktop terminal sessions for
|
|
60
|
+
- opening a visible terminal in the Electron app
|
|
61
|
+
- launching a shell session
|
|
62
|
+
- launching a CLI agent in a terminal tab/panel
|
|
63
|
+
- listing desktop terminal sessions
|
|
64
|
+
- writing more input to an existing terminal session
|
|
65
|
+
- approving or denying a pending terminal action
|
|
66
|
+
- closing a terminal session
|
|
67
|
+
|
|
68
|
+
### Use ACP only for
|
|
69
|
+
- headless background agent sessions
|
|
70
|
+
- persistent server-side automation
|
|
71
|
+
- `acp-chat`, `acp-stream`, `acp-session-*`
|
|
72
|
+
|
|
73
|
+
### Correct SDK namespace
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
sdk.desktopRuntimeSessions
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Compatibility:
|
|
80
|
+
- `sdk.desktopRuntimeSessions` is the preferred alias
|
|
81
|
+
- `sdk.v1.desktopRuntimeSessions` still exists for backward compatibility
|
|
82
|
+
- there is no `sdk.v1.runtimeSessions`
|
|
83
|
+
|
|
84
|
+
### Required payloads
|
|
85
|
+
|
|
86
|
+
Launch terminal CLI agent:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
await sdk.desktopRuntimeSessions.launchTerminalCliAgent({
|
|
90
|
+
workspaceSlug: "agent-heartbeat",
|
|
91
|
+
threadSlug: "ambient-agent-week-agent-heartbeat-2026-w17",
|
|
92
|
+
agentName: "claude", // required
|
|
93
|
+
providerId: "claude-cli", // strongly recommended
|
|
94
|
+
presentationMode: "panel", // optional: "panel" | "tab"
|
|
95
|
+
message: "what is current working dir"
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Important:
|
|
100
|
+
- `agentName` is the agent label, like `"claude"` or `"gemini"`
|
|
101
|
+
- `providerId` is the launcher/provider id, like `"claude-cli"` or `"gemini-cli"`
|
|
102
|
+
- Do not pass `agentName: "claude-cli"` unless that is truly the agent label shown by the app
|
|
103
|
+
|
|
104
|
+
Launch terminal shell:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
await sdk.desktopRuntimeSessions.launchTerminalShell({
|
|
108
|
+
workspaceSlug: "agent-heartbeat",
|
|
109
|
+
threadSlug: "ambient-agent-week-agent-heartbeat-2026-w17",
|
|
110
|
+
presentationMode: "panel",
|
|
111
|
+
initialCommand: "pwd",
|
|
112
|
+
initialCommandMode: "direct"
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Manage existing terminal sessions:
|
|
117
|
+
|
|
118
|
+
```js
|
|
119
|
+
await sdk.desktopRuntimeSessions.listRuntimeSessions();
|
|
120
|
+
await sdk.desktopRuntimeSessions.getRuntimeSession("cli-agent:pty-123");
|
|
121
|
+
await sdk.desktopRuntimeSessions.write("cli-agent:pty-123", {
|
|
122
|
+
message: "continue"
|
|
123
|
+
});
|
|
124
|
+
await sdk.desktopRuntimeSessions.permission("cli-agent:pty-123", {
|
|
125
|
+
outcome: "approved",
|
|
126
|
+
actionId: "terminal-action-1"
|
|
127
|
+
});
|
|
128
|
+
await sdk.desktopRuntimeSessions.deleteRuntimeSession("cli-agent:pty-123");
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Preferred decision rule
|
|
132
|
+
|
|
133
|
+
If the user says:
|
|
134
|
+
- "launch in terminal"
|
|
135
|
+
- "open Claude in terminal"
|
|
136
|
+
- "ask Gemini in terminal"
|
|
137
|
+
- "open a shell and run pwd"
|
|
138
|
+
|
|
139
|
+
then prefer `sdk.desktopRuntimeSessions.*`, not ACP.
|
|
56
140
|
|
|
57
141
|
---
|
|
58
142
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RealTimeX SDK — API Reference
|
|
2
2
|
|
|
3
|
-
> Auto-generated from `@realtimex/sdk` source · v**1.7.
|
|
3
|
+
> Auto-generated from `@realtimex/sdk` source · v**1.7.9** · 2026-05-06
|
|
4
4
|
|
|
5
5
|
**Package:** `@realtimex/sdk` (CJS) · **Server:** `http://localhost:3001`
|
|
6
6
|
**Developer Mode auth:** `Authorization: Bearer <apiKey>`
|
|
@@ -30,6 +30,77 @@
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## sdk.desktopRuntimeSessions — Desktop Terminal Sessions
|
|
34
|
+
|
|
35
|
+
Use this module for visible Electron terminal sessions. This is the correct path for:
|
|
36
|
+
- launching a shell terminal
|
|
37
|
+
- launching Claude/Gemini/Qwen in a terminal
|
|
38
|
+
- listing existing terminal sessions
|
|
39
|
+
- sending more input to an existing terminal
|
|
40
|
+
- approving terminal prompts
|
|
41
|
+
- closing a terminal session
|
|
42
|
+
|
|
43
|
+
Do not use ACP for these unless the user explicitly asks for ACP/headless mode.
|
|
44
|
+
|
|
45
|
+
### `V1DesktopRuntimeSessionsModule`
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
async openLauncher(body?: { workspaceSlug?: string; threadSlug?: string; presentationMode?: 'panel' | 'tab'; preferredAgentName?: string; preferredAgentProviderId?: string; }): Promise<unknown>
|
|
49
|
+
async launchTerminalShell(body?: { workspaceSlug?: string; threadSlug?: string; presentationMode?: 'panel' | 'tab'; title?: string; subtitle?: string; initialCommand?: string; initialCommandMode?: 'direct' | 'prefill' | 'shell'; }): Promise<unknown>
|
|
50
|
+
async launchTerminalCliAgent(body?: { workspaceSlug?: string; threadSlug?: string; agentName: string; providerId?: string; modelId?: string; presentationMode?: 'panel' | 'tab'; message?: string; }): Promise<unknown>
|
|
51
|
+
async listRuntimeSessions(): Promise<unknown>
|
|
52
|
+
async getRuntimeSession(sessionId: string): Promise<unknown>
|
|
53
|
+
async write(sessionId: string, body?: { message?: string; input?: string; }): Promise<unknown>
|
|
54
|
+
async permission(sessionId: string, body?: { outcome: 'approved' | 'denied'; actionId?: string; requestId?: string; optionId?: string; optionLabel?: string; input?: string; reason?: string; }): Promise<unknown>
|
|
55
|
+
async deleteRuntimeSession(sessionId: string): Promise<unknown>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Correct examples
|
|
59
|
+
|
|
60
|
+
Launch Claude in a terminal:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
await sdk.desktopRuntimeSessions.launchTerminalCliAgent({
|
|
64
|
+
workspaceSlug: 'agent-heartbeat',
|
|
65
|
+
threadSlug: 'ambient-agent-week-agent-heartbeat-2026-w17',
|
|
66
|
+
agentName: 'claude',
|
|
67
|
+
providerId: 'claude-cli',
|
|
68
|
+
presentationMode: 'panel',
|
|
69
|
+
message: 'what is current working dir'
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Launch a shell and run `pwd`:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
await sdk.desktopRuntimeSessions.launchTerminalShell({
|
|
77
|
+
workspaceSlug: 'agent-heartbeat',
|
|
78
|
+
threadSlug: 'ambient-agent-week-agent-heartbeat-2026-w17',
|
|
79
|
+
presentationMode: 'panel',
|
|
80
|
+
initialCommand: 'pwd',
|
|
81
|
+
initialCommandMode: 'direct'
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Common mistake:
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
// ❌ WRONG
|
|
89
|
+
await sdk.desktopRuntimeSessions.launchTerminalCliAgent({
|
|
90
|
+
agentName: 'claude-cli'
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// ✅ CORRECT
|
|
94
|
+
await sdk.desktopRuntimeSessions.launchTerminalCliAgent({
|
|
95
|
+
agentName: 'claude',
|
|
96
|
+
providerId: 'claude-cli'
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Compatibility: `sdk.v1.desktopRuntimeSessions` remains available, but prefer the top-level alias.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
33
104
|
## Core — RealtimeXSDK
|
|
34
105
|
|
|
35
106
|
### `RealtimeXSDK`
|
|
@@ -52,6 +123,7 @@
|
|
|
52
123
|
- `auth: AuthModule`
|
|
53
124
|
- `credentials: CredentialsModule`
|
|
54
125
|
- `v1: V1ApiNamespace | undefined`
|
|
126
|
+
- `desktopRuntimeSessions: V1DesktopRuntimeSessionsModule | undefined`
|
|
55
127
|
|
|
56
128
|
```ts
|
|
57
129
|
// Developer API (v1) — requires apiKey to be set in config.
|
|
@@ -503,7 +575,7 @@ outcome?: string
|
|
|
503
575
|
|
|
504
576
|
---
|
|
505
577
|
|
|
506
|
-
## sdk.agent —
|
|
578
|
+
## sdk.agent — LLM Agent Sessions (REST/SSE)
|
|
507
579
|
|
|
508
580
|
### `AgentModule`
|
|
509
581
|
|
|
@@ -834,6 +906,38 @@ async deleteExposure(exposureId: string): Promise<unknown>
|
|
|
834
906
|
|
|
835
907
|
---
|
|
836
908
|
|
|
909
|
+
## sdk.v1.desktopRuntimeSessions — v1 Desktop Runtime Sessions
|
|
910
|
+
|
|
911
|
+
### `V1DesktopRuntimeSessionsModule`
|
|
912
|
+
|
|
913
|
+
```ts
|
|
914
|
+
// Open the shared terminal launcher in the Electron desktop app.
|
|
915
|
+
async openLauncher(body?: Record<string, unknown>): Promise<unknown>
|
|
916
|
+
|
|
917
|
+
// Launch a local PTY-backed shell terminal in the Electron desktop app.
|
|
918
|
+
async launchTerminalShell(body?: Record<string, unknown>): Promise<unknown>
|
|
919
|
+
|
|
920
|
+
// Launch a local PTY-backed CLI agent terminal in the Electron desktop app.
|
|
921
|
+
async launchTerminalCliAgent(body?: Record<string, unknown>): Promise<unknown>
|
|
922
|
+
|
|
923
|
+
// List desktop PTY-backed runtime sessions currently known to the Electron app.
|
|
924
|
+
async listRuntimeSessions(): Promise<unknown>
|
|
925
|
+
|
|
926
|
+
// Fetch one desktop PTY-backed runtime session by runtime session ID or PTY session ID.
|
|
927
|
+
async getRuntimeSession(sessionId: string): Promise<unknown>
|
|
928
|
+
|
|
929
|
+
// Close an existing desktop runtime session.
|
|
930
|
+
async deleteRuntimeSession(sessionId: string): Promise<unknown>
|
|
931
|
+
|
|
932
|
+
// Write input to an existing desktop runtime session. Use `message` to submit a CLI turn or `input` for raw PTY data.
|
|
933
|
+
async write(sessionId: string, body?: Record<string, unknown>): Promise<unknown>
|
|
934
|
+
|
|
935
|
+
// Approve or deny a pending desktop runtime session action.
|
|
936
|
+
async permission(sessionId: string, body?: Record<string, unknown>): Promise<unknown>
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
---
|
|
940
|
+
|
|
837
941
|
## sdk.v1.document — v1 Document
|
|
838
942
|
|
|
839
943
|
### `V1DocumentModule`
|
|
@@ -918,38 +1022,6 @@ async listVectorStores(): Promise<unknown>
|
|
|
918
1022
|
|
|
919
1023
|
---
|
|
920
1024
|
|
|
921
|
-
## sdk.v1.runtimeSessions — Runtime Sessions (CLI Agent / Terminal mode)
|
|
922
|
-
|
|
923
|
-
### `V1RuntimeSessionsModule`
|
|
924
|
-
|
|
925
|
-
```ts
|
|
926
|
-
// Resolve the desktop shell launch working directory for a workspace or thread context.
|
|
927
|
-
async desktopShellLaunchSpec(body?: Record<string, unknown>): Promise<unknown>
|
|
928
|
-
|
|
929
|
-
// Evaluate the runtime terminal permission policy for a pending CLI action.
|
|
930
|
-
async terminalPermissionsEvaluate(body?: Record<string, unknown>): Promise<unknown>
|
|
931
|
-
|
|
932
|
-
// Resolve the CLI agent terminal launch command and working directory.
|
|
933
|
-
async cliAgentLaunchSpec(body?: Record<string, unknown>): Promise<unknown>
|
|
934
|
-
|
|
935
|
-
// Create a persistent ACP-backed CLI agent runtime session.
|
|
936
|
-
async cliAgent(body?: Record<string, unknown>): Promise<unknown>
|
|
937
|
-
|
|
938
|
-
// Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
|
|
939
|
-
async cliAgentPermission(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>
|
|
940
|
-
|
|
941
|
-
// Cancel the current CLI turn for an active runtime session.
|
|
942
|
-
async cliAgentCancel(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>
|
|
943
|
-
|
|
944
|
-
// Close a CLI agent runtime session and clear its control-plane metadata.
|
|
945
|
-
async deleteCliAgent(sessionKey: string): Promise<unknown>
|
|
946
|
-
|
|
947
|
-
// Fetch the current state and runtime options for a CLI agent session.
|
|
948
|
-
async getCliAgent(sessionKey: string): Promise<unknown>
|
|
949
|
-
```
|
|
950
|
-
|
|
951
|
-
---
|
|
952
|
-
|
|
953
1025
|
## sdk.v1.sttApi — v1 Stt Api
|
|
954
1026
|
|
|
955
1027
|
### `V1SttApiModule`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Known Issues — Source-Detected
|
|
2
2
|
|
|
3
|
-
> Auto-generated by `scripts/generate-skill.mjs` · SDK **1.7.
|
|
3
|
+
> Auto-generated by `scripts/generate-skill.mjs` · SDK **1.7.9** · 2026-05-06
|
|
4
4
|
|
|
5
5
|
Run `node scripts/generate-skill.mjs --force` after SDK source changes to refresh.
|
|
6
6
|
|