@realtimex/sdk 2.0.2 → 2.0.4

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.2",
3
+ "version": "2.0.4",
4
4
  "description": "SDK for building Local Apps that integrate with RealtimeX",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,7 +27,7 @@
27
27
  "skill:generate": "node ../scripts/generate-skill.mjs --force",
28
28
  "pp-cli:build": "node ../scripts/build-pp-cli-packages.mjs",
29
29
  "pp-cli:publish": "node ../scripts/publish-pp-cli-packages.mjs",
30
- "prepublishOnly": "npm run build"
30
+ "prepublishOnly": "npm run build && npm run skill:generate"
31
31
  },
32
32
  "keywords": [
33
33
  "realtimex",
@@ -0,0 +1,326 @@
1
+ ---
2
+ name: realtimex-moderator-sdk
3
+ description: "Use the RealTimeX API through the generated CLI for workspace, thread, and chat operations."
4
+ author: ""
5
+ license: "Apache-2.0"
6
+ argument-hint: "<command> [args] | install cli"
7
+ allowed-tools: "Read Bash"
8
+ metadata:
9
+ openclaw:
10
+ requires:
11
+ bins:
12
+ - realtimex-pp-cli
13
+ ---
14
+
15
+ # Realtimex — Printing Press CLI
16
+
17
+ ## Prerequisites: Install the CLI
18
+
19
+ This skill drives the `realtimex-pp-cli` binary. Verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
20
+
21
+ 1. Install via npm:
22
+ ```bash
23
+ npm install -g @realtimex/pp-cli@2.0.4
24
+ ```
25
+ 2. Verify: `realtimex-pp-cli --version`
26
+
27
+ If `--version` reports "command not found" after install, the npm global bin directory is not on `$PATH`. Do not proceed with skill commands until verification succeeds.
28
+
29
+ ## Command Reference
30
+
31
+ **chat-feedback** — Manage chat feedback
32
+
33
+ - `realtimex-pp-cli chat-feedback <slug> <chatId>` — Update workspace chat feedback.
34
+
35
+ **chats** — Manage chats
36
+
37
+ - `realtimex-pp-cli chats <slug>` — Get workspace chats.
38
+
39
+ **config** — Manage config
40
+
41
+ - `realtimex-pp-cli config get-workspace` — Get or create workspace config.
42
+ - `realtimex-pp-cli config update-workspace` — Update workspace config.
43
+
44
+ **delete-chats** — Manage delete chats
45
+
46
+ - `realtimex-pp-cli delete-chats <slug>` — Delete selected workspace chats.
47
+
48
+ **delete-edited-chats** — Manage delete edited chats
49
+
50
+ - `realtimex-pp-cli delete-edited-chats <slug>` — Delete edited workspace chats from a starting id.
51
+
52
+ **document** — Manage document
53
+
54
+ - `realtimex-pp-cli document <slug> <docPath>` — Get document content for a workspace document.
55
+
56
+ **linked-terminal-message** — Manage linked terminal message
57
+
58
+ - `realtimex-pp-cli linked-terminal-message <slug>` — Persist a linked terminal message.
59
+
60
+ **llm-provider** — Manage llm provider
61
+
62
+ - `realtimex-pp-cli llm-provider <slug>` — Get workspace LLM provider metadata.
63
+
64
+ **local-llm-tuning-suggestion** — Manage local llm tuning suggestion
65
+
66
+ - `realtimex-pp-cli local-llm-tuning-suggestion <slug>` — Generate a local LLM tuning suggestion.
67
+
68
+ **pfp** — Manage pfp
69
+
70
+ - `realtimex-pp-cli pfp <slug>` — Get a workspace profile picture.
71
+
72
+ **prompt-history** — Manage prompt history
73
+
74
+ - `realtimex-pp-cli prompt-history delete-workspace` — Clear workspace prompt history.
75
+ - `realtimex-pp-cli prompt-history delete-workspace-entry` — Delete a workspace prompt history entry.
76
+ - `realtimex-pp-cli prompt-history get-workspace` — Get workspace prompt history.
77
+
78
+ **realtimex-developer-search** — Manage realtimex developer search
79
+
80
+ - `realtimex-pp-cli realtimex-developer-search <slug>` — Validate search provider configuration.
81
+
82
+ **remove-and-unembed** — Manage remove and unembed
83
+
84
+ - `realtimex-pp-cli remove-and-unembed <slug>` — Remove and unembed a document.
85
+
86
+ **remove-pfp** — Manage remove pfp
87
+
88
+ - `realtimex-pp-cli remove-pfp <slug>` — Remove a workspace profile picture.
89
+
90
+ **reset-vector-db** — Manage reset vector db
91
+
92
+ - `realtimex-pp-cli reset-vector-db <slug>` — Reset workspace vector database records.
93
+
94
+ **stream-chat** — Manage stream chat
95
+
96
+ - `realtimex-pp-cli stream-chat <slug>` — Stream a chat response for a workspace default thread.
97
+
98
+ **suggested-messages** — Manage suggested messages
99
+
100
+ - `realtimex-pp-cli suggested-messages get-workspace` — Get suggested messages for a workspace.
101
+ - `realtimex-pp-cli suggested-messages save-workspace` — Save suggested messages for a workspace.
102
+
103
+ **terminal-goal** — Manage terminal goal
104
+
105
+ - `realtimex-pp-cli terminal-goal <slug>` — Create a terminal goal for a workspace.
106
+
107
+ **terminal-goal-draft** — Manage terminal goal draft
108
+
109
+ - `realtimex-pp-cli terminal-goal-draft <slug>` — Draft a terminal goal for a workspace.
110
+
111
+ **terminal-session-details** — Manage terminal session details
112
+
113
+ - `realtimex-pp-cli terminal-session-details <slug>` — Get workspace terminal session details.
114
+
115
+ **terminal-ui-events** — Manage terminal ui events
116
+
117
+ - `realtimex-pp-cli terminal-ui-events <slug>` — Persist terminal UI events.
118
+
119
+ **thread** — Manage thread
120
+
121
+ - `realtimex-pp-cli thread coordinate-task` — Coordinate a task into a workspace thread.
122
+ - `realtimex-pp-cli thread create` — Create a workspace thread.
123
+ - `realtimex-pp-cli thread delete` — Delete a workspace thread.
124
+ - `realtimex-pp-cli thread fork` — Fork the workspace default thread.
125
+ - `realtimex-pp-cli thread get` — Get a workspace thread.
126
+
127
+ **thread-bulk-delete** — Manage thread bulk delete
128
+
129
+ - `realtimex-pp-cli thread-bulk-delete <slug>` — Bulk delete workspace threads.
130
+
131
+ **thread-events** — Manage thread events
132
+
133
+ - `realtimex-pp-cli thread-events <slug>` — Open an SSE stream for workspace thread events.
134
+
135
+ **threads** — Manage threads
136
+
137
+ - `realtimex-pp-cli threads <slug>` — List workspace threads.
138
+
139
+ **tts** — Manage tts
140
+
141
+ - `realtimex-pp-cli tts <slug> <chatId>` — Generate text-to-speech audio for a workspace chat.
142
+
143
+ **update** — Manage update
144
+
145
+ - `realtimex-pp-cli update <slug>` — Update workspace settings by slug.
146
+
147
+ **update-chat** — Manage update chat
148
+
149
+ - `realtimex-pp-cli update-chat <slug>` — Update a workspace chat response.
150
+
151
+ **update-embeddings** — Manage update embeddings
152
+
153
+ - `realtimex-pp-cli update-embeddings <slug>` — Update workspace document embeddings.
154
+
155
+ **update-pin** — Manage update pin
156
+
157
+ - `realtimex-pp-cli update-pin <slug>` — Update workspace document pin status.
158
+
159
+ **upload** — Manage upload
160
+
161
+ - `realtimex-pp-cli upload <slug>` — Upload a document to workspace documents.
162
+
163
+ **upload-and-embed** — Manage upload and embed
164
+
165
+ - `realtimex-pp-cli upload-and-embed <slug>` — Upload and embed a document.
166
+
167
+ **upload-link** — Manage upload link
168
+
169
+ - `realtimex-pp-cli upload-link <slug>` — Upload a link to workspace documents.
170
+
171
+ **upload-pfp** — Manage upload pfp
172
+
173
+ - `realtimex-pp-cli upload-pfp <slug>` — Upload a workspace profile picture.
174
+
175
+ **vision-availability** — Manage vision availability
176
+
177
+ - `realtimex-pp-cli vision-availability <slug>` — Get workspace vision availability.
178
+
179
+ **workspace** — Manage workspace
180
+
181
+ - `realtimex-pp-cli workspace create` — Create a workspace using the app workspace creation behavior.
182
+ - `realtimex-pp-cli workspace delete` — Delete a workspace.
183
+ - `realtimex-pp-cli workspace get` — Get a workspace by slug.
184
+ - `realtimex-pp-cli workspace hide-chat` — Hide a workspace chat.
185
+ - `realtimex-pp-cli workspace search` — Search workspaces and threads.
186
+
187
+ **workspaces** — Manage workspaces
188
+
189
+ - `realtimex-pp-cli workspaces` — List workspaces using the app workspace list behavior.
190
+
191
+
192
+ ### Finding the right command
193
+
194
+ When you know what you want to do but not which command does it, ask the CLI directly:
195
+
196
+ ```bash
197
+ realtimex-pp-cli which "<capability in your own words>"
198
+ ```
199
+
200
+ `which` resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code `0` means at least one match; exit code `2` means no confident match — fall back to `--help` or use a narrower query.
201
+
202
+ ## Auth Setup
203
+ Run `realtimex-pp-cli auth setup` to print the URL and steps for getting a key (add `--launch` to open the URL). Then set:
204
+
205
+ ```bash
206
+ export REALTIMEX_APP_ID_AUTH="<your-key>"
207
+ ```
208
+
209
+ Or persist it in `~/.config/realtimex-developer-pp-cli/config.toml`.
210
+
211
+ Run `realtimex-pp-cli doctor` to verify setup.
212
+
213
+ ## Agent Mode
214
+
215
+ Add `--agent` to any command. Expands to: `--json --compact --no-input --no-color --yes`.
216
+
217
+ - **Pipeable** — JSON on stdout, errors on stderr
218
+ - **Filterable** — `--select` keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
219
+
220
+ ```bash
221
+ realtimex-pp-cli thread get mock-value mock-value --agent --select id,name,status
222
+ ```
223
+ - **Previewable** — `--dry-run` shows the request without sending
224
+ - **Offline-friendly** — sync/search commands can use the local SQLite store when available
225
+ - **Non-interactive** — never prompts, every input is a flag
226
+ - **Explicit retries** — use `--idempotent` only when an already-existing create should count as success, and `--ignore-missing` only when a missing delete target should count as success
227
+
228
+ ### Response envelope
229
+
230
+ Commands that read from the local store or the API wrap output in a provenance envelope:
231
+
232
+ ```json
233
+ {
234
+ "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
235
+ "results": <data>
236
+ }
237
+ ```
238
+
239
+ Parse `.results` for data and `.meta.source` to know whether it's live or local. A human-readable `N results (live)` summary is printed to stderr only when stdout is a terminal AND no machine-format flag (`--json`, `--csv`, `--compact`, `--quiet`, `--plain`, `--select`) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.
240
+
241
+ ## Agent Feedback
242
+
243
+ When you (or the agent) notice something off about this CLI, record it:
244
+
245
+ ```
246
+ realtimex-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
247
+ realtimex-pp-cli feedback --stdin < notes.txt
248
+ realtimex-pp-cli feedback list --json --limit 10
249
+ ```
250
+
251
+ Entries are stored locally at `~/.local/share/realtimex-pp-cli/feedback.jsonl`. They are never POSTed unless `REALTIMEX_FEEDBACK_ENDPOINT` is set AND either `--send` is passed or `REALTIMEX_FEEDBACK_AUTO_SEND=true`. Default behavior is local-only.
252
+
253
+ Write what *surprised* you, not a bug report. Short, specific, one line: that is the part that compounds.
254
+
255
+ ## Output Delivery
256
+
257
+ Every command accepts `--deliver <sink>`. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
258
+
259
+ | Sink | Effect |
260
+ |------|--------|
261
+ | `stdout` | Default; write to stdout only |
262
+ | `file:<path>` | Atomically write output to `<path>` (tmp + rename) |
263
+ | `webhook:<url>` | POST the output body to the URL (`application/json` or `application/x-ndjson` when `--compact`) |
264
+
265
+ Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
266
+
267
+ ## Named Profiles
268
+
269
+ A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
270
+
271
+ ```
272
+ realtimex-pp-cli profile save briefing --json
273
+ realtimex-pp-cli --profile briefing thread get mock-value mock-value
274
+ realtimex-pp-cli profile list --json
275
+ realtimex-pp-cli profile show briefing
276
+ realtimex-pp-cli profile delete briefing --yes
277
+ ```
278
+
279
+ Explicit flags always win over profile values; profile values win over defaults. `agent-context` lists all available profiles under `available_profiles` so introspecting agents discover them at runtime.
280
+
281
+ ## Exit Codes
282
+
283
+ | Code | Meaning |
284
+ |------|---------|
285
+ | 0 | Success |
286
+ | 2 | Usage error (wrong arguments) |
287
+ | 3 | Resource not found |
288
+ | 4 | Authentication required |
289
+ | 5 | API error (upstream issue) |
290
+ | 7 | Rate limited (wait and retry) |
291
+ | 10 | Config error |
292
+
293
+ ## Argument Parsing
294
+
295
+ Parse `$ARGUMENTS`:
296
+
297
+ 1. **Empty, `help`, or `--help`** → show `realtimex-pp-cli --help` output
298
+ 2. **Starts with `install`** → ends with `mcp` → MCP installation; otherwise → see Prerequisites above
299
+ 3. **Anything else** → Direct Use (execute as CLI command with `--agent`)
300
+
301
+ ## MCP Server Installation
302
+
303
+ Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
304
+
305
+ ```bash
306
+ claude mcp add realtimex-pp-mcp -- realtimex-pp-mcp
307
+ ```
308
+
309
+ Verify: `claude mcp list`
310
+
311
+ ## Direct Use
312
+
313
+ 1. Check if installed: `which realtimex-pp-cli`
314
+ If not found, offer to install (see Prerequisites at the top of this skill).
315
+ 2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
316
+ 3. Execute with the `--agent` flag:
317
+ ```bash
318
+ realtimex-pp-cli <command> [subcommand] [args] --agent
319
+ ```
320
+ 4. If ambiguous, drill into subcommand help: `realtimex-pp-cli <command> --help`.
321
+
322
+ ## Constraints
323
+
324
+ Use only the `realtimex-pp-cli` commands documented by this skill. Never call the RealTimeX API directly with `curl`, `fetch`, raw HTTP clients, or custom scripts.
325
+
326
+ If a requested task is impossible with the current CLI commands, do not work around it through direct API calls or undocumented behavior. Say the feature is not available and will be added soon.