@realtimex/sdk 2.0.28 → 2.0.30

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/README.md CHANGED
@@ -15,5 +15,9 @@ const client = createRealtimeXClient({
15
15
  const workspaces = await client.request("listWorkspaces");
16
16
  ```
17
17
 
18
+ `baseUrl` is required, either as an explicit client option or through
19
+ `REALTIMEX_BASE_URL`. Desktop and `dev:all` runtimes propagate the resolved
20
+ dynamic `/cli` endpoint; the SDK does not guess a localhost port.
21
+
18
22
  The package also publishes generated skill assets under
19
23
  `skills/realtimex-moderator-sdk`.
package/index.d.ts CHANGED
@@ -818,6 +818,26 @@ export interface RenameWorkspaceOptions extends RealtimeXRequestOptions {
818
818
  body?: RenameWorkspaceBody;
819
819
  }
820
820
 
821
+ export type RespondTerminalIdlePromptParams = {
822
+ sessionId: string;
823
+ };
824
+ export type RespondTerminalIdlePromptQuery = Record<string, never>;
825
+ export type RespondTerminalIdlePromptHeaders = {
826
+ "x-app-id"?: string;
827
+ };
828
+ export type RespondTerminalIdlePromptBody = {
829
+ responseAction: "confirm-selected-option" | "cancel-prompt";
830
+ expectedEventSeq: number;
831
+ dispatchKey: string;
832
+ };
833
+ export type RespondTerminalIdlePromptResponse = Record<string, unknown>;
834
+ export interface RespondTerminalIdlePromptOptions extends RealtimeXRequestOptions {
835
+ params?: RespondTerminalIdlePromptParams;
836
+ query?: RespondTerminalIdlePromptQuery;
837
+ headers?: RespondTerminalIdlePromptHeaders & Record<string, string>;
838
+ body?: RespondTerminalIdlePromptBody;
839
+ }
840
+
821
841
  export type ResumeArtifactParams = {
822
842
  artifactId: string;
823
843
  };
@@ -1572,6 +1592,9 @@ export declare class RealtimeXClient {
1572
1592
  /** Rename one workspace by exact workspace slug. Only the name is changed. */
1573
1593
  renameWorkspace(options?: RenameWorkspaceOptions): Promise<RenameWorkspaceResponse>;
1574
1594
  renameWorkspace(workspaceSlug: string, body: RenameWorkspaceBody, options?: Omit<RenameWorkspaceOptions, 'params' | 'body'>): Promise<RenameWorkspaceResponse>;
1595
+ /** Send one constrained response action to an exact idle terminal session only when its PTY event sequence is unchanged. */
1596
+ respondTerminalIdlePrompt(options?: RespondTerminalIdlePromptOptions): Promise<RespondTerminalIdlePromptResponse>;
1597
+ respondTerminalIdlePrompt(sessionId: string, body: RespondTerminalIdlePromptBody, options?: Omit<RespondTerminalIdlePromptOptions, 'params' | 'body'>): Promise<RespondTerminalIdlePromptResponse>;
1575
1598
  /** Resume one paused artifact by artifact id. */
1576
1599
  resumeArtifact(options?: ResumeArtifactOptions): Promise<ResumeArtifactResponse>;
1577
1600
  resumeArtifact(artifactId: string, options?: Omit<ResumeArtifactOptions, 'params'>): Promise<ResumeArtifactResponse>;
package/index.js CHANGED
@@ -519,6 +519,18 @@ const operations = {
519
519
  ],
520
520
  "hasBody": true
521
521
  },
522
+ "respondTerminalIdlePrompt": {
523
+ "method": "POST",
524
+ "path": "/respond-terminal-idle-prompt/{sessionId}",
525
+ "pathParams": [
526
+ "sessionId"
527
+ ],
528
+ "queryParams": [],
529
+ "headerParams": [
530
+ "x-app-id"
531
+ ],
532
+ "hasBody": true
533
+ },
522
534
  "resumeArtifact": {
523
535
  "method": "POST",
524
536
  "path": "/resume-artifact/{artifactId}",
@@ -980,8 +992,12 @@ function normalizeOperationOptions(operation, args) {
980
992
  class RealtimeXClient {
981
993
  constructor(options = {}) {
982
994
  const env = typeof process !== 'undefined' ? process.env || {} : {};
983
- this.baseUrl =
984
- options.baseUrl || env.REALTIMEX_BASE_URL || 'http://localhost:3101/cli';
995
+ this.baseUrl = options.baseUrl || env.REALTIMEX_BASE_URL;
996
+ if (!this.baseUrl) {
997
+ throw new Error(
998
+ 'RealtimeX SDK base URL is unavailable; pass { baseUrl } or propagate REALTIMEX_BASE_URL.'
999
+ );
1000
+ }
985
1001
  this.fetch = options.fetch || globalThis.fetch;
986
1002
  if (typeof this.fetch !== 'function') {
987
1003
  throw new Error('A fetch implementation is required. Use Node 18+ or pass { fetch }.');
@@ -1355,6 +1371,13 @@ class RealtimeXClient {
1355
1371
  );
1356
1372
  }
1357
1373
 
1374
+ respondTerminalIdlePrompt(...args) {
1375
+ return this.request(
1376
+ "respondTerminalIdlePrompt",
1377
+ normalizeOperationOptions(operations["respondTerminalIdlePrompt"], args)
1378
+ );
1379
+ }
1380
+
1358
1381
  resumeArtifact(...args) {
1359
1382
  return this.request(
1360
1383
  "resumeArtifact",
@@ -1576,5 +1599,5 @@ module.exports = {
1576
1599
  createClient: createRealtimeXClient,
1577
1600
  createRealtimeXClient,
1578
1601
  operations,
1579
- version: "2.0.28",
1602
+ version: "2.0.30",
1580
1603
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realtimex/sdk",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "RealtimeX runtime SDK package and moderator agent skill assets.",
5
5
  "private": false,
6
6
  "main": "./index.js",
@@ -20,15 +20,15 @@ This skill drives the `realtimex-pp-cli` binary. Verify the CLI is installed and
20
20
 
21
21
  1. Install or reinstall the pinned version via npm:
22
22
  ```bash
23
- npm install -g @realtimex/pp-cli@2.0.28
23
+ npm install -g @realtimex/pp-cli@2.0.30
24
24
  ```
25
25
  2. Verify the exact version:
26
26
  ```bash
27
27
  realtimex-pp-cli --version
28
28
  ```
29
- The output must be `realtimex-pp-cli 2.0.28`.
29
+ The output must be `realtimex-pp-cli 2.0.30`.
30
30
 
31
- If `--version` reports "command not found" after install, the npm global bin directory is not on `$PATH`. If it reports any version other than `2.0.28`, reinstall with the pinned npm command above. Do not proceed with skill commands until exact-version verification succeeds.
31
+ If `--version` reports "command not found" after install, the npm global bin directory is not on `$PATH`. If it reports any version other than `2.0.30`, reinstall with the pinned npm command above. Do not proceed with skill commands until exact-version verification succeeds.
32
32
 
33
33
  * Always run first:
34
34
 
@@ -214,6 +214,10 @@ If `--version` reports "command not found" after install, the npm global bin dir
214
214
 
215
215
  - `realtimex-pp-cli rename-workspace <workspaceSlug>` — Rename one workspace by exact workspace slug. Only the name is changed.
216
216
 
217
+ **respond-terminal-idle-prompt** — Manage respond terminal idle prompt
218
+
219
+ - `realtimex-pp-cli respond-terminal-idle-prompt <sessionId>` — Send one constrained response action to an exact idle terminal session only when its PTY event sequence is unchanged.
220
+
217
221
  **resume-artifact** — Manage resume artifact
218
222
 
219
223
  - `realtimex-pp-cli resume-artifact <artifactId>` — Resume one paused artifact by artifact id.
@@ -456,9 +460,9 @@ Verify: `claude mcp list`
456
460
  ```bash
457
461
  realtimex-pp-cli --version
458
462
  ```
459
- If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.28`, reinstall the pinned version:
463
+ If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.30`, reinstall the pinned version:
460
464
  ```bash
461
- npm install -g @realtimex/pp-cli@2.0.28
465
+ npm install -g @realtimex/pp-cli@2.0.30
462
466
  ```
463
467
  Then run `realtimex-pp-cli --version` again and proceed only after exact-version verification succeeds.
464
468
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.