@realtimex/sdk 1.7.4 → 1.7.6

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.
@@ -125,6 +125,20 @@ var V1AuthModule = class {
125
125
  async getAuth() {
126
126
  return this.client.request("GET", `/v1/auth`);
127
127
  }
128
+ /**
129
+ * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
130
+ * @see POST /v1/auth/external-callback
131
+ */
132
+ async externalCallback() {
133
+ return this.client.request("POST", `/v1/auth/external-callback`);
134
+ }
135
+ /**
136
+ * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
137
+ * @see GET /v1/auth/external-callback/{state}
138
+ */
139
+ async getExternalCallback(state) {
140
+ return this.client.request("GET", `/v1/auth/external-callback/${state}`);
141
+ }
128
142
  };
129
143
 
130
144
  // src/v1/modules/v1Admin.ts
@@ -628,6 +642,76 @@ var V1EmbedModule = class {
628
642
  }
629
643
  };
630
644
 
645
+ // src/v1/modules/v1RuntimeSessions.ts
646
+ var V1RuntimeSessionsModule = class {
647
+ constructor(client) {
648
+ this.client = client;
649
+ }
650
+ /**
651
+ * Resolve the desktop shell launch working directory for a workspace or thread context.
652
+ * @see POST /runtime-sessions/desktop-shell/launch-spec
653
+ */
654
+ async desktopShellLaunchSpec(body) {
655
+ return this.client.request("POST", `/runtime-sessions/desktop-shell/launch-spec`, body);
656
+ }
657
+ /**
658
+ * Evaluate the runtime terminal permission policy for a pending CLI action.
659
+ * @see POST /runtime-sessions/terminal-permissions/evaluate
660
+ */
661
+ async terminalPermissionsEvaluate(body) {
662
+ return this.client.request("POST", `/runtime-sessions/terminal-permissions/evaluate`, body);
663
+ }
664
+ /**
665
+ * Resolve the CLI agent terminal launch command and working directory.
666
+ * @see POST /runtime-sessions/cli-agent/launch-spec
667
+ */
668
+ async cliAgentLaunchSpec(body) {
669
+ return this.client.request("POST", `/runtime-sessions/cli-agent/launch-spec`, body);
670
+ }
671
+ /**
672
+ * Create a persistent ACP-backed CLI agent runtime session.
673
+ * @see POST /runtime-sessions/cli-agent
674
+ */
675
+ async cliAgent(body) {
676
+ return this.client.request("POST", `/runtime-sessions/cli-agent`, body);
677
+ }
678
+ /**
679
+ * Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
680
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/chat/stream
681
+ */
682
+ async cliAgentChatStream(sessionKey, body) {
683
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/chat/stream`, body);
684
+ }
685
+ /**
686
+ * Resolve a pending permission request for a CLI agent runtime session.
687
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/permission
688
+ */
689
+ async cliAgentPermission(sessionKey, body) {
690
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/permission`, body);
691
+ }
692
+ /**
693
+ * Cancel the current CLI turn for an active runtime session.
694
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/cancel
695
+ */
696
+ async cliAgentCancel(sessionKey, body) {
697
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/cancel`, body);
698
+ }
699
+ /**
700
+ * Close a CLI agent runtime session and clear its control-plane metadata.
701
+ * @see DELETE /runtime-sessions/cli-agent/{sessionKey}
702
+ */
703
+ async deleteCliAgent(sessionKey) {
704
+ return this.client.request("DELETE", `/runtime-sessions/cli-agent/${sessionKey}`);
705
+ }
706
+ /**
707
+ * Fetch the current state and runtime options for a CLI agent session.
708
+ * @see GET /runtime-sessions/cli-agent/{sessionKey}
709
+ */
710
+ async getCliAgent(sessionKey) {
711
+ return this.client.request("GET", `/runtime-sessions/cli-agent/${sessionKey}`);
712
+ }
713
+ };
714
+
631
715
  // src/v1/namespace.ts
632
716
  var V1ApiNamespace = class {
633
717
  // [GENERATED-PROPS-END]
@@ -642,6 +726,7 @@ var V1ApiNamespace = class {
642
726
  this.users = new V1UsersModule(this._client);
643
727
  this.openai = new V1OpenAIModule(this._client);
644
728
  this.embed = new V1EmbedModule(this._client);
729
+ this.runtimeSessions = new V1RuntimeSessionsModule(this._client);
645
730
  }
646
731
  };
647
732
 
@@ -661,5 +746,6 @@ export {
661
746
  V1UsersModule,
662
747
  V1OpenAIModule,
663
748
  V1EmbedModule,
749
+ V1RuntimeSessionsModule,
664
750
  V1ApiNamespace
665
751
  };
@@ -38,6 +38,16 @@ declare class V1AuthModule {
38
38
  * @see GET /v1/auth
39
39
  */
40
40
  getAuth(): Promise<unknown>;
41
+ /**
42
+ * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
43
+ * @see POST /v1/auth/external-callback
44
+ */
45
+ externalCallback(): Promise<unknown>;
46
+ /**
47
+ * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
48
+ * @see GET /v1/auth/external-callback/{state}
49
+ */
50
+ getExternalCallback(state: string): Promise<unknown>;
41
51
  }
42
52
 
43
53
  declare class V1AdminModule {
@@ -395,6 +405,56 @@ declare class V1EmbedModule {
395
405
  deleteEmbed(embedUuid: string): Promise<unknown>;
396
406
  }
397
407
 
408
+ declare class V1RuntimeSessionsModule {
409
+ private readonly client;
410
+ constructor(client: DeveloperApiClient);
411
+ /**
412
+ * Resolve the desktop shell launch working directory for a workspace or thread context.
413
+ * @see POST /runtime-sessions/desktop-shell/launch-spec
414
+ */
415
+ desktopShellLaunchSpec(body?: Record<string, unknown>): Promise<unknown>;
416
+ /**
417
+ * Evaluate the runtime terminal permission policy for a pending CLI action.
418
+ * @see POST /runtime-sessions/terminal-permissions/evaluate
419
+ */
420
+ terminalPermissionsEvaluate(body?: Record<string, unknown>): Promise<unknown>;
421
+ /**
422
+ * Resolve the CLI agent terminal launch command and working directory.
423
+ * @see POST /runtime-sessions/cli-agent/launch-spec
424
+ */
425
+ cliAgentLaunchSpec(body?: Record<string, unknown>): Promise<unknown>;
426
+ /**
427
+ * Create a persistent ACP-backed CLI agent runtime session.
428
+ * @see POST /runtime-sessions/cli-agent
429
+ */
430
+ cliAgent(body?: Record<string, unknown>): Promise<unknown>;
431
+ /**
432
+ * Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
433
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/chat/stream
434
+ */
435
+ cliAgentChatStream(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
436
+ /**
437
+ * Resolve a pending permission request for a CLI agent runtime session.
438
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/permission
439
+ */
440
+ cliAgentPermission(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
441
+ /**
442
+ * Cancel the current CLI turn for an active runtime session.
443
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/cancel
444
+ */
445
+ cliAgentCancel(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
446
+ /**
447
+ * Close a CLI agent runtime session and clear its control-plane metadata.
448
+ * @see DELETE /runtime-sessions/cli-agent/{sessionKey}
449
+ */
450
+ deleteCliAgent(sessionKey: string): Promise<unknown>;
451
+ /**
452
+ * Fetch the current state and runtime options for a CLI agent session.
453
+ * @see GET /runtime-sessions/cli-agent/{sessionKey}
454
+ */
455
+ getCliAgent(sessionKey: string): Promise<unknown>;
456
+ }
457
+
398
458
  /**
399
459
  * V1ApiNamespace - Container for all RealtimeX Developer API (v1) modules.
400
460
  *
@@ -418,6 +478,7 @@ declare class V1ApiNamespace {
418
478
  users: V1UsersModule;
419
479
  openai: V1OpenAIModule;
420
480
  embed: V1EmbedModule;
481
+ runtimeSessions: V1RuntimeSessionsModule;
421
482
  constructor(baseUrl: string, apiKey: string, appId?: string);
422
483
  }
423
484
 
@@ -442,4 +503,4 @@ declare class ServerError extends DeveloperApiError {
442
503
  constructor(message?: string);
443
504
  }
444
505
 
445
- export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, DeveloperApiError as a, ValidationError as b, V1AuthModule as c, V1AdminModule as d, V1DocumentModule as e, V1WorkspaceModule as f, V1SystemModule as g, V1ThreadModule as h, V1UsersModule as i, V1OpenAIModule as j, V1EmbedModule as k };
506
+ export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, DeveloperApiError as a, ValidationError as b, V1AuthModule as c, V1AdminModule as d, V1DocumentModule as e, V1WorkspaceModule as f, V1SystemModule as g, V1ThreadModule as h, V1UsersModule as i, V1OpenAIModule as j, V1EmbedModule as k, V1RuntimeSessionsModule as l };
@@ -38,6 +38,16 @@ declare class V1AuthModule {
38
38
  * @see GET /v1/auth
39
39
  */
40
40
  getAuth(): Promise<unknown>;
41
+ /**
42
+ * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
43
+ * @see POST /v1/auth/external-callback
44
+ */
45
+ externalCallback(): Promise<unknown>;
46
+ /**
47
+ * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
48
+ * @see GET /v1/auth/external-callback/{state}
49
+ */
50
+ getExternalCallback(state: string): Promise<unknown>;
41
51
  }
42
52
 
43
53
  declare class V1AdminModule {
@@ -395,6 +405,56 @@ declare class V1EmbedModule {
395
405
  deleteEmbed(embedUuid: string): Promise<unknown>;
396
406
  }
397
407
 
408
+ declare class V1RuntimeSessionsModule {
409
+ private readonly client;
410
+ constructor(client: DeveloperApiClient);
411
+ /**
412
+ * Resolve the desktop shell launch working directory for a workspace or thread context.
413
+ * @see POST /runtime-sessions/desktop-shell/launch-spec
414
+ */
415
+ desktopShellLaunchSpec(body?: Record<string, unknown>): Promise<unknown>;
416
+ /**
417
+ * Evaluate the runtime terminal permission policy for a pending CLI action.
418
+ * @see POST /runtime-sessions/terminal-permissions/evaluate
419
+ */
420
+ terminalPermissionsEvaluate(body?: Record<string, unknown>): Promise<unknown>;
421
+ /**
422
+ * Resolve the CLI agent terminal launch command and working directory.
423
+ * @see POST /runtime-sessions/cli-agent/launch-spec
424
+ */
425
+ cliAgentLaunchSpec(body?: Record<string, unknown>): Promise<unknown>;
426
+ /**
427
+ * Create a persistent ACP-backed CLI agent runtime session.
428
+ * @see POST /runtime-sessions/cli-agent
429
+ */
430
+ cliAgent(body?: Record<string, unknown>): Promise<unknown>;
431
+ /**
432
+ * Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
433
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/chat/stream
434
+ */
435
+ cliAgentChatStream(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
436
+ /**
437
+ * Resolve a pending permission request for a CLI agent runtime session.
438
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/permission
439
+ */
440
+ cliAgentPermission(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
441
+ /**
442
+ * Cancel the current CLI turn for an active runtime session.
443
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/cancel
444
+ */
445
+ cliAgentCancel(sessionKey: string, body?: Record<string, unknown>): Promise<unknown>;
446
+ /**
447
+ * Close a CLI agent runtime session and clear its control-plane metadata.
448
+ * @see DELETE /runtime-sessions/cli-agent/{sessionKey}
449
+ */
450
+ deleteCliAgent(sessionKey: string): Promise<unknown>;
451
+ /**
452
+ * Fetch the current state and runtime options for a CLI agent session.
453
+ * @see GET /runtime-sessions/cli-agent/{sessionKey}
454
+ */
455
+ getCliAgent(sessionKey: string): Promise<unknown>;
456
+ }
457
+
398
458
  /**
399
459
  * V1ApiNamespace - Container for all RealtimeX Developer API (v1) modules.
400
460
  *
@@ -418,6 +478,7 @@ declare class V1ApiNamespace {
418
478
  users: V1UsersModule;
419
479
  openai: V1OpenAIModule;
420
480
  embed: V1EmbedModule;
481
+ runtimeSessions: V1RuntimeSessionsModule;
421
482
  constructor(baseUrl: string, apiKey: string, appId?: string);
422
483
  }
423
484
 
@@ -442,4 +503,4 @@ declare class ServerError extends DeveloperApiError {
442
503
  constructor(message?: string);
443
504
  }
444
505
 
445
- export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, DeveloperApiError as a, ValidationError as b, V1AuthModule as c, V1AdminModule as d, V1DocumentModule as e, V1WorkspaceModule as f, V1SystemModule as g, V1ThreadModule as h, V1UsersModule as i, V1OpenAIModule as j, V1EmbedModule as k };
506
+ export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, DeveloperApiError as a, ValidationError as b, V1AuthModule as c, V1AdminModule as d, V1DocumentModule as e, V1WorkspaceModule as f, V1SystemModule as g, V1ThreadModule as h, V1UsersModule as i, V1OpenAIModule as j, V1EmbedModule as k, V1RuntimeSessionsModule as l };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as V1ApiNamespace } from './errors-DoCX7LOD.mjs';
2
- export { A as AuthenticationError, D as DeveloperApiClient, a as DeveloperApiError, N as NotFoundError, S as ServerError, b as ValidationError } from './errors-DoCX7LOD.mjs';
1
+ import { V as V1ApiNamespace } from './errors-7Y9damGS.mjs';
2
+ export { A as AuthenticationError, D as DeveloperApiClient, a as DeveloperApiError, N as NotFoundError, S as ServerError, b as ValidationError } from './errors-7Y9damGS.mjs';
3
3
 
4
4
  /**
5
5
  * RealtimeX Local App SDK - Types
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as V1ApiNamespace } from './errors-DoCX7LOD.js';
2
- export { A as AuthenticationError, D as DeveloperApiClient, a as DeveloperApiError, N as NotFoundError, S as ServerError, b as ValidationError } from './errors-DoCX7LOD.js';
1
+ import { V as V1ApiNamespace } from './errors-7Y9damGS.js';
2
+ export { A as AuthenticationError, D as DeveloperApiClient, a as DeveloperApiError, N as NotFoundError, S as ServerError, b as ValidationError } from './errors-7Y9damGS.js';
3
3
 
4
4
  /**
5
5
  * RealtimeX Local App SDK - Types
package/dist/index.js CHANGED
@@ -3170,6 +3170,20 @@ var V1AuthModule = class {
3170
3170
  async getAuth() {
3171
3171
  return this.client.request("GET", `/v1/auth`);
3172
3172
  }
3173
+ /**
3174
+ * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
3175
+ * @see POST /v1/auth/external-callback
3176
+ */
3177
+ async externalCallback() {
3178
+ return this.client.request("POST", `/v1/auth/external-callback`);
3179
+ }
3180
+ /**
3181
+ * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
3182
+ * @see GET /v1/auth/external-callback/{state}
3183
+ */
3184
+ async getExternalCallback(state) {
3185
+ return this.client.request("GET", `/v1/auth/external-callback/${state}`);
3186
+ }
3173
3187
  };
3174
3188
 
3175
3189
  // src/v1/modules/v1Admin.ts
@@ -3673,6 +3687,76 @@ var V1EmbedModule = class {
3673
3687
  }
3674
3688
  };
3675
3689
 
3690
+ // src/v1/modules/v1RuntimeSessions.ts
3691
+ var V1RuntimeSessionsModule = class {
3692
+ constructor(client) {
3693
+ this.client = client;
3694
+ }
3695
+ /**
3696
+ * Resolve the desktop shell launch working directory for a workspace or thread context.
3697
+ * @see POST /runtime-sessions/desktop-shell/launch-spec
3698
+ */
3699
+ async desktopShellLaunchSpec(body) {
3700
+ return this.client.request("POST", `/runtime-sessions/desktop-shell/launch-spec`, body);
3701
+ }
3702
+ /**
3703
+ * Evaluate the runtime terminal permission policy for a pending CLI action.
3704
+ * @see POST /runtime-sessions/terminal-permissions/evaluate
3705
+ */
3706
+ async terminalPermissionsEvaluate(body) {
3707
+ return this.client.request("POST", `/runtime-sessions/terminal-permissions/evaluate`, body);
3708
+ }
3709
+ /**
3710
+ * Resolve the CLI agent terminal launch command and working directory.
3711
+ * @see POST /runtime-sessions/cli-agent/launch-spec
3712
+ */
3713
+ async cliAgentLaunchSpec(body) {
3714
+ return this.client.request("POST", `/runtime-sessions/cli-agent/launch-spec`, body);
3715
+ }
3716
+ /**
3717
+ * Create a persistent ACP-backed CLI agent runtime session.
3718
+ * @see POST /runtime-sessions/cli-agent
3719
+ */
3720
+ async cliAgent(body) {
3721
+ return this.client.request("POST", `/runtime-sessions/cli-agent`, body);
3722
+ }
3723
+ /**
3724
+ * Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
3725
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/chat/stream
3726
+ */
3727
+ async cliAgentChatStream(sessionKey, body) {
3728
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/chat/stream`, body);
3729
+ }
3730
+ /**
3731
+ * Resolve a pending permission request for a CLI agent runtime session.
3732
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/permission
3733
+ */
3734
+ async cliAgentPermission(sessionKey, body) {
3735
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/permission`, body);
3736
+ }
3737
+ /**
3738
+ * Cancel the current CLI turn for an active runtime session.
3739
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/cancel
3740
+ */
3741
+ async cliAgentCancel(sessionKey, body) {
3742
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/cancel`, body);
3743
+ }
3744
+ /**
3745
+ * Close a CLI agent runtime session and clear its control-plane metadata.
3746
+ * @see DELETE /runtime-sessions/cli-agent/{sessionKey}
3747
+ */
3748
+ async deleteCliAgent(sessionKey) {
3749
+ return this.client.request("DELETE", `/runtime-sessions/cli-agent/${sessionKey}`);
3750
+ }
3751
+ /**
3752
+ * Fetch the current state and runtime options for a CLI agent session.
3753
+ * @see GET /runtime-sessions/cli-agent/{sessionKey}
3754
+ */
3755
+ async getCliAgent(sessionKey) {
3756
+ return this.client.request("GET", `/runtime-sessions/cli-agent/${sessionKey}`);
3757
+ }
3758
+ };
3759
+
3676
3760
  // src/v1/namespace.ts
3677
3761
  var V1ApiNamespace = class {
3678
3762
  // [GENERATED-PROPS-END]
@@ -3687,6 +3771,7 @@ var V1ApiNamespace = class {
3687
3771
  this.users = new V1UsersModule(this._client);
3688
3772
  this.openai = new V1OpenAIModule(this._client);
3689
3773
  this.embed = new V1EmbedModule(this._client);
3774
+ this.runtimeSessions = new V1RuntimeSessionsModule(this._client);
3690
3775
  }
3691
3776
  };
3692
3777
 
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  ServerError,
7
7
  V1ApiNamespace,
8
8
  ValidationError
9
- } from "./chunk-PDAMNSF2.mjs";
9
+ } from "./chunk-YHNURPXJ.mjs";
10
10
 
11
11
  // src/modules/api.ts
12
12
  var PermissionDeniedError = class extends Error {
@@ -1,5 +1,5 @@
1
- import { D as DeveloperApiClient } from '../errors-DoCX7LOD.mjs';
2
- export { A as AuthenticationError, a as DeveloperApiError, N as NotFoundError, S as ServerError, d as V1AdminModule, V as V1ApiNamespace, c as V1AuthModule, e as V1DocumentModule, k as V1EmbedModule, j as V1OpenAIModule, g as V1SystemModule, h as V1ThreadModule, i as V1UsersModule, f as V1WorkspaceModule, b as ValidationError } from '../errors-DoCX7LOD.mjs';
1
+ import { D as DeveloperApiClient } from '../errors-7Y9damGS.mjs';
2
+ export { A as AuthenticationError, a as DeveloperApiError, N as NotFoundError, S as ServerError, d as V1AdminModule, V as V1ApiNamespace, c as V1AuthModule, e as V1DocumentModule, k as V1EmbedModule, j as V1OpenAIModule, l as V1RuntimeSessionsModule, g as V1SystemModule, h as V1ThreadModule, i as V1UsersModule, f as V1WorkspaceModule, b as ValidationError } from '../errors-7Y9damGS.mjs';
3
3
 
4
4
  interface WorkspaceStreamChunk {
5
5
  /** The text fragment emitted by this SSE event */
@@ -1,5 +1,5 @@
1
- import { D as DeveloperApiClient } from '../errors-DoCX7LOD.js';
2
- export { A as AuthenticationError, a as DeveloperApiError, N as NotFoundError, S as ServerError, d as V1AdminModule, V as V1ApiNamespace, c as V1AuthModule, e as V1DocumentModule, k as V1EmbedModule, j as V1OpenAIModule, g as V1SystemModule, h as V1ThreadModule, i as V1UsersModule, f as V1WorkspaceModule, b as ValidationError } from '../errors-DoCX7LOD.js';
1
+ import { D as DeveloperApiClient } from '../errors-7Y9damGS.js';
2
+ export { A as AuthenticationError, a as DeveloperApiError, N as NotFoundError, S as ServerError, d as V1AdminModule, V as V1ApiNamespace, c as V1AuthModule, e as V1DocumentModule, k as V1EmbedModule, j as V1OpenAIModule, l as V1RuntimeSessionsModule, g as V1SystemModule, h as V1ThreadModule, i as V1UsersModule, f as V1WorkspaceModule, b as ValidationError } from '../errors-7Y9damGS.js';
3
3
 
4
4
  interface WorkspaceStreamChunk {
5
5
  /** The text fragment emitted by this SSE event */
package/dist/v1/index.js CHANGED
@@ -31,6 +31,7 @@ __export(v1_exports, {
31
31
  V1DocumentModule: () => V1DocumentModule,
32
32
  V1EmbedModule: () => V1EmbedModule,
33
33
  V1OpenAIModule: () => V1OpenAIModule,
34
+ V1RuntimeSessionsModule: () => V1RuntimeSessionsModule,
34
35
  V1SystemModule: () => V1SystemModule,
35
36
  V1ThreadModule: () => V1ThreadModule,
36
37
  V1UsersModule: () => V1UsersModule,
@@ -170,6 +171,20 @@ var V1AuthModule = class {
170
171
  async getAuth() {
171
172
  return this.client.request("GET", `/v1/auth`);
172
173
  }
174
+ /**
175
+ * Relay external browser auth callbacks back to the local Electron renderer. Localhost only; keyed by OAuth state.
176
+ * @see POST /v1/auth/external-callback
177
+ */
178
+ async externalCallback() {
179
+ return this.client.request("POST", `/v1/auth/external-callback`);
180
+ }
181
+ /**
182
+ * Poll for a relayed external browser auth callback by OAuth state. Localhost only.
183
+ * @see GET /v1/auth/external-callback/{state}
184
+ */
185
+ async getExternalCallback(state) {
186
+ return this.client.request("GET", `/v1/auth/external-callback/${state}`);
187
+ }
173
188
  };
174
189
 
175
190
  // src/v1/modules/v1Admin.ts
@@ -673,6 +688,76 @@ var V1EmbedModule = class {
673
688
  }
674
689
  };
675
690
 
691
+ // src/v1/modules/v1RuntimeSessions.ts
692
+ var V1RuntimeSessionsModule = class {
693
+ constructor(client) {
694
+ this.client = client;
695
+ }
696
+ /**
697
+ * Resolve the desktop shell launch working directory for a workspace or thread context.
698
+ * @see POST /runtime-sessions/desktop-shell/launch-spec
699
+ */
700
+ async desktopShellLaunchSpec(body) {
701
+ return this.client.request("POST", `/runtime-sessions/desktop-shell/launch-spec`, body);
702
+ }
703
+ /**
704
+ * Evaluate the runtime terminal permission policy for a pending CLI action.
705
+ * @see POST /runtime-sessions/terminal-permissions/evaluate
706
+ */
707
+ async terminalPermissionsEvaluate(body) {
708
+ return this.client.request("POST", `/runtime-sessions/terminal-permissions/evaluate`, body);
709
+ }
710
+ /**
711
+ * Resolve the CLI agent terminal launch command and working directory.
712
+ * @see POST /runtime-sessions/cli-agent/launch-spec
713
+ */
714
+ async cliAgentLaunchSpec(body) {
715
+ return this.client.request("POST", `/runtime-sessions/cli-agent/launch-spec`, body);
716
+ }
717
+ /**
718
+ * Create a persistent ACP-backed CLI agent runtime session.
719
+ * @see POST /runtime-sessions/cli-agent
720
+ */
721
+ async cliAgent(body) {
722
+ return this.client.request("POST", `/runtime-sessions/cli-agent`, body);
723
+ }
724
+ /**
725
+ * Stream a chat turn to an existing CLI agent runtime session using Server-Sent Events.
726
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/chat/stream
727
+ */
728
+ async cliAgentChatStream(sessionKey, body) {
729
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/chat/stream`, body);
730
+ }
731
+ /**
732
+ * Resolve a pending permission request for a CLI agent runtime session.
733
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/permission
734
+ */
735
+ async cliAgentPermission(sessionKey, body) {
736
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/permission`, body);
737
+ }
738
+ /**
739
+ * Cancel the current CLI turn for an active runtime session.
740
+ * @see POST /runtime-sessions/cli-agent/{sessionKey}/cancel
741
+ */
742
+ async cliAgentCancel(sessionKey, body) {
743
+ return this.client.request("POST", `/runtime-sessions/cli-agent/${sessionKey}/cancel`, body);
744
+ }
745
+ /**
746
+ * Close a CLI agent runtime session and clear its control-plane metadata.
747
+ * @see DELETE /runtime-sessions/cli-agent/{sessionKey}
748
+ */
749
+ async deleteCliAgent(sessionKey) {
750
+ return this.client.request("DELETE", `/runtime-sessions/cli-agent/${sessionKey}`);
751
+ }
752
+ /**
753
+ * Fetch the current state and runtime options for a CLI agent session.
754
+ * @see GET /runtime-sessions/cli-agent/{sessionKey}
755
+ */
756
+ async getCliAgent(sessionKey) {
757
+ return this.client.request("GET", `/runtime-sessions/cli-agent/${sessionKey}`);
758
+ }
759
+ };
760
+
676
761
  // src/v1/namespace.ts
677
762
  var V1ApiNamespace = class {
678
763
  // [GENERATED-PROPS-END]
@@ -687,6 +772,7 @@ var V1ApiNamespace = class {
687
772
  this.users = new V1UsersModule(this._client);
688
773
  this.openai = new V1OpenAIModule(this._client);
689
774
  this.embed = new V1EmbedModule(this._client);
775
+ this.runtimeSessions = new V1RuntimeSessionsModule(this._client);
690
776
  }
691
777
  };
692
778
 
@@ -816,6 +902,7 @@ async function uploadFileToFolder(client, file, folderName, options = {}) {
816
902
  V1DocumentModule,
817
903
  V1EmbedModule,
818
904
  V1OpenAIModule,
905
+ V1RuntimeSessionsModule,
819
906
  V1SystemModule,
820
907
  V1ThreadModule,
821
908
  V1UsersModule,
package/dist/v1/index.mjs CHANGED
@@ -10,12 +10,13 @@ import {
10
10
  V1DocumentModule,
11
11
  V1EmbedModule,
12
12
  V1OpenAIModule,
13
+ V1RuntimeSessionsModule,
13
14
  V1SystemModule,
14
15
  V1ThreadModule,
15
16
  V1UsersModule,
16
17
  V1WorkspaceModule,
17
18
  ValidationError
18
- } from "../chunk-PDAMNSF2.mjs";
19
+ } from "../chunk-YHNURPXJ.mjs";
19
20
 
20
21
  // src/v1/overrides/v1WorkspaceStreaming.ts
21
22
  async function* streamWorkspaceChat(client, slug, body) {
@@ -142,6 +143,7 @@ export {
142
143
  V1DocumentModule,
143
144
  V1EmbedModule,
144
145
  V1OpenAIModule,
146
+ V1RuntimeSessionsModule,
145
147
  V1SystemModule,
146
148
  V1ThreadModule,
147
149
  V1UsersModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realtimex/sdk",
3
- "version": "1.7.4",
3
+ "version": "1.7.6",
4
4
  "description": "SDK for building Local Apps that integrate with RealtimeX",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "scripts": {
21
- "build": "node ../scripts/generate-v1-sdk.mjs --force && node ../scripts/generate-skill.mjs --force && tsup src/index.ts src/v1/index.ts --format cjs,esm --dts --clean",
21
+ "build": "node ../scripts/generate-v1-sdk.mjs --force && node ../scripts/generate-concepts.mjs && node ../scripts/generate-skill.mjs --force && tsup src/index.ts src/v1/index.ts --format cjs,esm --dts --clean",
22
22
  "dev": "tsup src/index.ts src/v1/index.ts --format cjs,esm --dts --watch",
23
23
  "test": "vitest run",
24
24
  "contract:verify": "node ../scripts/verify-contract-compat.mjs",
@@ -27,6 +27,7 @@
27
27
  "sdk:generate": "node ../scripts/generate-v1-sdk.mjs",
28
28
  "sdk:generate:force": "node ../scripts/generate-v1-sdk.mjs --force",
29
29
  "sdk:diff": "node ../scripts/generate-v1-sdk.mjs --dry-run",
30
+ "concepts:generate": "node ../scripts/generate-concepts.mjs",
30
31
  "prepublishOnly": "npm run build"
31
32
  },
32
33
  "keywords": [
@@ -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-04-16
5
- sdk_version: 1.7.4
4
+ generated: 2026-05-04
5
+ sdk_version: 1.7.6
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.4**. Authentication is automatic when running inside RealtimeX.
10
+ Interact with the RealTimeX platform (`http://localhost:3001`) using `@realtimex/sdk` **v1.7.6**. Authentication is automatic when running inside RealtimeX.
11
11
 
12
12
  `<SKILL_DIR>` below refers to the directory containing this SKILL.md.
13
13
 
@@ -44,6 +44,18 @@ Scripts using the SDK must exit explicitly — `process.exit(0)` on success, `pr
44
44
 
45
45
  ---
46
46
 
47
+ ## Runtime Sessions
48
+
49
+ In this SDK, **Runtime Sessions** means the CLI Agent in **Terminal mode**. Use `sdk.agent.*` for that path.
50
+
51
+ This is separate from ACP mode:
52
+ - `sdk.agent.*` = Runtime Sessions = CLI Agent / Terminal mode
53
+ - `sdk.acpAgent.*` = ACP-backed CLI agent sessions
54
+
55
+ If a user refers to the v1/OpenAPI tag `Runtime Sessions`, interpret that as the Terminal mode session flow, not ACP.
56
+
57
+ ---
58
+
47
59
  ## ACP Session Management
48
60
 
49
61
  ACP sessions are persistent agent processes. **Always reuse sessions** across turns instead of spawning a new process for every message — it preserves context and is far more efficient.
@@ -215,7 +227,22 @@ Full fixes in `references/known-issues.md`.
215
227
  - **`resolvePermission()`** must be called while the `streamChat` SSE stream is still active
216
228
  - **SDK env vars:** `RTX_API_KEY` (dev), `RTX_APP_ID` (prod), `RTX_APP_NAME`
217
229
 
230
+ ## App Concepts
231
+
232
+ When the user asks **what something is** in RealtimeX (e.g. Personality, Heartbeat, Workspace types, Agent Skills, data models), read `references/app-concepts.md` first.
233
+
234
+ It covers:
235
+ - **Personality** — file structure (AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md, MEMORY.md, HEARTBEAT.md) and storage paths
236
+ - **Heartbeat** — ambient background agent scheduler, config fields, calendar routines, queue
237
+ - **Workspace** — types (`default`, `meeting_minutes`, `agent_skills`, `agent_heartbeat`), chat modes, key settings
238
+ - **Agent Skills** — types (`repo`/`zip`), scopes, status values
239
+ - **Data Models** — all database models with fields and defaults
240
+
241
+ ---
242
+
218
243
  ## References
219
244
 
220
- - `references/api-reference.md` — all class methods (auto-generated from source)
245
+ - `references/app-concepts.md` — RealtimeX app concepts (auto-generated from source)
246
+ - `references/api-reference.md` — all SDK class methods (auto-generated from source)
221
247
  - `references/known-issues.md` — verified source mismatches (auto-generated)
248
+ - `references/credentials.md` — credential usage patterns