@realtimex/sdk 2.0.10 → 2.0.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realtimex/sdk",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "SDK for building Local Apps that integrate with RealtimeX",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: realtimex-moderator-sdk
3
- description: "Use the RealTimeX API through the generated CLI for workspace, thread, channel (Telegram, Zalo, Discord), skills, plugins and send messages, setup personality, heartbeat tasks operations."
3
+ description: "Use the RealTimeX API through the generated CLI for workspace, thread, terminal-agent sessions, channel (Telegram, Zalo, Discord), skills, plugins and send messages, setup personality, heartbeat tasks operations."
4
4
  author: ""
5
5
  license: "Apache-2.0"
6
6
  argument-hint: "<command> [args] | install cli"
@@ -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.10
23
+ npm install -g @realtimex/pp-cli@2.0.12
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.10`.
29
+ The output must be `realtimex-pp-cli 2.0.12`.
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.10`, 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.12`, 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
 
@@ -114,6 +114,10 @@ If `--version` reports "command not found" after install, the npm global bin dir
114
114
 
115
115
  - `realtimex-pp-cli list-plugins` — List installed plugins with enabled state and runtime load status.
116
116
 
117
+ **list-terminal-agents** — Manage list terminal agents
118
+
119
+ - `realtimex-pp-cli list-terminal-agents` — List terminal CLI agents that can be used with open-terminal-session.
120
+
117
121
  **list-terminal-sessions** — Manage list terminal sessions
118
122
 
119
123
  - `realtimex-pp-cli list-terminal-sessions` — List terminal runtime sessions known to the desktop app. Optionally filter by workspaceSlug and threadSlug.
@@ -130,6 +134,10 @@ If `--version` reports "command not found" after install, the npm global bin dir
130
134
 
131
135
  - `realtimex-pp-cli list-workspaces` — List all workspaces visible to the current API caller. Use this before choosing a workspace slug.
132
136
 
137
+ **open-terminal-session** — Manage open terminal session
138
+
139
+ - `realtimex-pp-cli open-terminal-session` — Open a new desktop terminal session for one terminal CLI agent. Use list-terminal-agents or prepare.
140
+
133
141
  **prepare** — Manage prepare
134
142
 
135
143
  - `realtimex-pp-cli prepare` — Return compact workspace, thread, current workspace/thread from explicit workspaceSlug and threadSlug query parameters
@@ -210,6 +218,14 @@ If `--version` reports "command not found" after install, the npm global bin dir
210
218
 
211
219
  - `realtimex-pp-cli terminate-terminal-session <sessionId>` — Terminate a terminal runtime session by detaching any controller and closing the underlying PTY session.
212
220
 
221
+ **trigger-workspace-heartbeat** — Manage trigger workspace heartbeat
222
+
223
+ - `realtimex-pp-cli trigger-workspace-heartbeat <workspaceSlug>` — Trigger the main heartbeat executor for a workspace immediately. Scheduled tasks are ignored.
224
+
225
+ **trigger-workspace-heartbeat-tasks** — Manage trigger workspace heartbeat tasks
226
+
227
+ - `realtimex-pp-cli trigger-workspace-heartbeat-tasks <workspaceSlug>` — Trigger specified HEARTBEAT.md task names for a workspace immediately.
228
+
213
229
  **update-channel** — Manage update channel
214
230
 
215
231
  - `realtimex-pp-cli update-channel <channelId>` — Update one chat channel by exact channel id. Only channel writable fields are changed.
@@ -340,9 +356,9 @@ Verify: `claude mcp list`
340
356
  ```bash
341
357
  realtimex-pp-cli --version
342
358
  ```
343
- If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.10`, reinstall the pinned version:
359
+ If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.12`, reinstall the pinned version:
344
360
  ```bash
345
- npm install -g @realtimex/pp-cli@2.0.10
361
+ npm install -g @realtimex/pp-cli@2.0.12
346
362
  ```
347
363
  Then run `realtimex-pp-cli --version` again and proceed only after exact-version verification succeeds.
348
364
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
@@ -399,6 +415,15 @@ For workspace default-agent setup:
399
415
  * Use exact agent `canonical` and optional agent `modelId` values from `prepare.agents`.
400
416
  * Never use `prepare.models` for workspace default-agent setup.
401
417
 
418
+ For terminal agents and terminal sessions:
419
+
420
+ * Use `list-terminal-agents` when you only need available terminal agents. Use `prepare` when you also need workspace/thread/provider/model context.
421
+ * Use `open-terminal-session` to open a new desktop terminal session for a terminal agent. It auto-attaches the CLI controller through the desktop runtime launch request.
422
+ * Use exact `agentName`, `providerId`, and `modelId` values from `list-terminal-agents` or `prepare.agents`.
423
+ * When opening a terminal session for the current thread, pass both `--workspace-slug "$RTX_WORKSPACE_SLUG"` and `--thread-slug "$RTX_THREAD_SLUG"`.
424
+ * Use `list-terminal-sessions` to inspect grouped terminal sessions by `workspaceSlug` and `threadSlug`. Each session includes compact identity fields and `attached` status.
425
+ * Use `resume-terminal-session` or `resume-latest-terminal-session` to resume + attach an existing session. Use `terminate-terminal-session` to close + detach a session.
426
+
402
427
  For agent skills:
403
428
 
404
429
  * Use `list-workspace-agent-skills` before enabling, disabling, or reloading workspace skills.
@@ -14,7 +14,32 @@ Use `cron` for complex schedules, for example `0 9 * * *`.
14
14
  Use `agent` to run a task with a specific terminal agent, for example `@codex-terminal`.
15
15
  Use `model` to run a task with a specific model, for example `gpt-5.5-medium`.
16
16
  Use `skills` to prefer skills for the task, for example `agent-browser, realtimex-moderator-sdk`.
17
- `agent`, `model`, `skills`, `interval`, and `cron` are optional. If omitted, the task inherits from the main heartbeat executor.
17
+ Use `executor: shell` and `command` to run a shell command instead of an agent.
18
+ `agent`, `model`, `skills`, `executor`, `command`, `interval`, and `cron` are optional. If omitted, the task inherits from the main heartbeat executor.
19
+ When a shell command prints valid JSON, it can trigger additional tasks. Use one of these forms:
20
+
21
+ ```json
22
+ ["task-name-1", "task-name-2"]
23
+ ```
24
+
25
+ ```json
26
+ {
27
+ "tasks": ["task-name-1", "task-name-2"],
28
+ "reason": "metrics changed"
29
+ }
30
+ ```
31
+
32
+ To trigger tasks in another workspace, include `workspace`:
33
+
34
+ ```json
35
+ {
36
+ "workspace": "other-workspace-slug",
37
+ "tasks": ["task-name-1"],
38
+ "reason": "shared dependency changed"
39
+ }
40
+ ```
41
+
42
+ Only valid JSON triggers task dispatch. If the shell output is not valid JSON, no extra tasks are run.
18
43
 
19
44
  tasks:
20
45
 
@@ -27,6 +52,10 @@ tasks:
27
52
  - name: weekday-morning-task
28
53
  cron: 0 9 * * 1-5
29
54
  prompt: Describe what should run on a cron schedule
55
+ - name: sync-metrics
56
+ interval: 30m
57
+ executor: shell
58
+ command: bash ./scripts/sync-metrics.sh
30
59
  - name: another-task
31
60
  prompt: Tasks without interval run at the main check interval
32
61