@realtimex/sdk 2.0.17 → 2.0.19
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 +11 -374
- package/index.d.ts +1327 -0
- package/index.js +1309 -0
- package/package.json +18 -39
- package/skills/realtimex-moderator-sdk/SKILL.md +9 -5
- package/dist/chunk-SFY6E7TY.mjs +0 -132
- package/dist/chunk-UPXEAZIT.mjs +0 -41
- package/dist/chunk-XKQRTTIC.mjs +0 -567
- package/dist/cli/index.d.mts +0 -54
- package/dist/cli/index.d.ts +0 -54
- package/dist/cli/index.js +0 -185
- package/dist/cli/index.mjs +0 -9
- package/dist/errors-DwEt8WYf.d.mts +0 -399
- package/dist/errors-DwEt8WYf.d.ts +0 -399
- package/dist/index.d.mts +0 -32
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -785
- package/dist/index.mjs +0 -59
- package/dist/v1/index.d.mts +0 -64
- package/dist/v1/index.d.ts +0 -64
- package/dist/v1/index.js +0 -733
- package/dist/v1/index.mjs +0 -124
package/package.json
CHANGED
|
@@ -1,61 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realtimex/sdk",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"types": "
|
|
3
|
+
"version": "2.0.19",
|
|
4
|
+
"description": "RealtimeX runtime SDK package and moderator agent skill assets.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"require": "./dist/index.js"
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"types": "./index.d.ts"
|
|
13
12
|
},
|
|
14
|
-
"./
|
|
15
|
-
"types": "./dist/v1/index.d.ts",
|
|
16
|
-
"import": "./dist/v1/index.mjs",
|
|
17
|
-
"require": "./dist/v1/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./cli": {
|
|
20
|
-
"types": "./dist/cli/index.d.ts",
|
|
21
|
-
"import": "./dist/cli/index.mjs",
|
|
22
|
-
"require": "./dist/cli/index.js"
|
|
23
|
-
}
|
|
13
|
+
"./skills/*": "./skills/*"
|
|
24
14
|
},
|
|
25
15
|
"scripts": {
|
|
26
|
-
"
|
|
27
|
-
"dev": "tsup src/index.ts src/v1/index.ts src/cli/index.ts --format cjs,esm --dts --watch",
|
|
28
|
-
"test": "vitest run --passWithNoTests",
|
|
29
|
-
"sdk:generate": "node ../scripts/generate-v1-sdk.mjs",
|
|
30
|
-
"sdk:generate:force": "node ../scripts/generate-v1-sdk.mjs --force",
|
|
31
|
-
"sdk:diff": "node ../scripts/generate-v1-sdk.mjs --dry-run",
|
|
16
|
+
"sdk:generate": "node ../scripts/generate-sdk.mjs",
|
|
32
17
|
"skill:generate": "node ../scripts/generate-skill.mjs --force",
|
|
33
|
-
"skill:local-test": "node ../scripts/local-test-realtimex-skill.mjs",
|
|
34
18
|
"pp-cli:build": "node ../scripts/build-pp-cli-packages.mjs",
|
|
35
|
-
"pp-cli:publish": "node ../scripts/publish-pp-cli-packages.mjs"
|
|
36
|
-
"prepublishOnly": "npm run build && npm run skill:generate"
|
|
19
|
+
"pp-cli:publish": "node ../scripts/publish-pp-cli-packages.mjs"
|
|
37
20
|
},
|
|
38
21
|
"keywords": [
|
|
39
22
|
"realtimex",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"supabase"
|
|
23
|
+
"cli",
|
|
24
|
+
"agent-skill"
|
|
43
25
|
],
|
|
44
26
|
"author": "RealtimeX Team",
|
|
45
27
|
"license": "MIT",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"rollup": "^4.55.1",
|
|
49
|
-
"tsup": "^8.0.0",
|
|
50
|
-
"typescript": "^5.3.0",
|
|
51
|
-
"vitest": "^1.0.0"
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18.0.0"
|
|
52
30
|
},
|
|
53
31
|
"files": [
|
|
54
|
-
"
|
|
32
|
+
"index.js",
|
|
33
|
+
"index.d.ts",
|
|
55
34
|
"skills",
|
|
56
35
|
"README.md"
|
|
57
36
|
],
|
|
58
|
-
"
|
|
59
|
-
"
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
60
39
|
}
|
|
61
40
|
}
|
|
@@ -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.
|
|
23
|
+
npm install -g @realtimex/pp-cli@2.0.19
|
|
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.
|
|
29
|
+
The output must be `realtimex-pp-cli 2.0.19`.
|
|
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.
|
|
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.19`, 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
|
|
|
@@ -396,9 +396,9 @@ Verify: `claude mcp list`
|
|
|
396
396
|
```bash
|
|
397
397
|
realtimex-pp-cli --version
|
|
398
398
|
```
|
|
399
|
-
If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.
|
|
399
|
+
If the command is missing or the output is not exactly `realtimex-pp-cli 2.0.19`, reinstall the pinned version:
|
|
400
400
|
```bash
|
|
401
|
-
npm install -g @realtimex/pp-cli@2.0.
|
|
401
|
+
npm install -g @realtimex/pp-cli@2.0.19
|
|
402
402
|
```
|
|
403
403
|
Then run `realtimex-pp-cli --version` again and proceed only after exact-version verification succeeds.
|
|
404
404
|
2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
|
|
@@ -493,3 +493,7 @@ For personality and heartbeat setup:
|
|
|
493
493
|
For `setup-working-dir` and `run-automation-workflow*`:
|
|
494
494
|
|
|
495
495
|
* Never auto retry on error code 500 or timeout, just inform error to user
|
|
496
|
+
|
|
497
|
+
For `publish-artifact`:
|
|
498
|
+
|
|
499
|
+
* files or folders have to be placed in <working-dir>/artifacts/ to be able to published
|
package/dist/chunk-SFY6E7TY.mjs
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AuthenticationError,
|
|
3
|
-
DeveloperApiError,
|
|
4
|
-
NotFoundError,
|
|
5
|
-
ServerError,
|
|
6
|
-
ValidationError
|
|
7
|
-
} from "./chunk-UPXEAZIT.mjs";
|
|
8
|
-
|
|
9
|
-
// src/cli/client.ts
|
|
10
|
-
var CliApiClient = class {
|
|
11
|
-
constructor(baseUrl, apiKey, appId) {
|
|
12
|
-
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
13
|
-
this.apiKey = apiKey;
|
|
14
|
-
this.appId = appId;
|
|
15
|
-
}
|
|
16
|
-
getHeaders(extra) {
|
|
17
|
-
const headers = {
|
|
18
|
-
"Content-Type": "application/json",
|
|
19
|
-
"Authorization": `Bearer ${this.apiKey}`
|
|
20
|
-
};
|
|
21
|
-
if (this.appId) headers["x-app-id"] = this.appId;
|
|
22
|
-
return { ...headers, ...extra };
|
|
23
|
-
}
|
|
24
|
-
async handleResponse(response) {
|
|
25
|
-
let data;
|
|
26
|
-
try {
|
|
27
|
-
data = await response.json();
|
|
28
|
-
} catch {
|
|
29
|
-
data = {};
|
|
30
|
-
}
|
|
31
|
-
if (response.ok) return data;
|
|
32
|
-
const message = data?.message || data?.error || response.statusText || "Request failed";
|
|
33
|
-
switch (response.status) {
|
|
34
|
-
case 400:
|
|
35
|
-
throw new ValidationError(message);
|
|
36
|
-
case 401:
|
|
37
|
-
case 403:
|
|
38
|
-
throw new AuthenticationError(message);
|
|
39
|
-
case 404:
|
|
40
|
-
throw new NotFoundError(message);
|
|
41
|
-
case 500:
|
|
42
|
-
case 502:
|
|
43
|
-
case 503:
|
|
44
|
-
throw new ServerError(message);
|
|
45
|
-
default:
|
|
46
|
-
throw new DeveloperApiError(response.status, "API_ERROR", message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
async request(method, path, body) {
|
|
50
|
-
const url = `${this.baseUrl}/cli${path}`;
|
|
51
|
-
const response = await fetch(url, {
|
|
52
|
-
method,
|
|
53
|
-
headers: this.getHeaders(),
|
|
54
|
-
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
55
|
-
});
|
|
56
|
-
return this.handleResponse(response);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// src/cli/namespace.ts
|
|
61
|
-
var CliApiNamespace = class {
|
|
62
|
-
constructor(baseUrl, apiKey, appId) {
|
|
63
|
-
this._client = new CliApiClient(baseUrl, apiKey, appId);
|
|
64
|
-
}
|
|
65
|
-
async prepare() {
|
|
66
|
-
return this._client.request("GET", "/prepare");
|
|
67
|
-
}
|
|
68
|
-
async listWorkspaces() {
|
|
69
|
-
return this._client.request("GET", "/list-workspaces");
|
|
70
|
-
}
|
|
71
|
-
async createWorkspace(body) {
|
|
72
|
-
return this._client.request("POST", "/create-workspace", body);
|
|
73
|
-
}
|
|
74
|
-
async getWorkspace(workspaceSlug) {
|
|
75
|
-
return this._client.request("GET", `/get-workspace/${encodeURIComponent(workspaceSlug)}`);
|
|
76
|
-
}
|
|
77
|
-
async renameWorkspace(workspaceSlug, body) {
|
|
78
|
-
return this._client.request("POST", `/rename-workspace/${encodeURIComponent(workspaceSlug)}`, body);
|
|
79
|
-
}
|
|
80
|
-
async deleteWorkspace(workspaceSlug) {
|
|
81
|
-
return this._client.request("DELETE", `/delete-workspace/${encodeURIComponent(workspaceSlug)}`);
|
|
82
|
-
}
|
|
83
|
-
async setWorkspaceDefaultAgent(workspaceSlug, body) {
|
|
84
|
-
return this._client.request("POST", `/set-workspace-default-agent/${encodeURIComponent(workspaceSlug)}`, body);
|
|
85
|
-
}
|
|
86
|
-
async clearWorkspaceDefaultAgent(workspaceSlug) {
|
|
87
|
-
return this._client.request("DELETE", `/clear-workspace-default-agent/${encodeURIComponent(workspaceSlug)}`);
|
|
88
|
-
}
|
|
89
|
-
async listThreads(workspaceSlug) {
|
|
90
|
-
return this._client.request("GET", `/list-threads/${encodeURIComponent(workspaceSlug)}`);
|
|
91
|
-
}
|
|
92
|
-
async createThread(workspaceSlug, body) {
|
|
93
|
-
return this._client.request("POST", `/create-thread/${encodeURIComponent(workspaceSlug)}`, body);
|
|
94
|
-
}
|
|
95
|
-
async getThread(workspaceSlug, threadSlug) {
|
|
96
|
-
return this._client.request(
|
|
97
|
-
"GET",
|
|
98
|
-
`/get-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
async renameThread(workspaceSlug, threadSlug, body) {
|
|
102
|
-
return this._client.request(
|
|
103
|
-
"POST",
|
|
104
|
-
`/rename-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`,
|
|
105
|
-
body
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
async deleteThread(workspaceSlug, threadSlug) {
|
|
109
|
-
return this._client.request(
|
|
110
|
-
"DELETE",
|
|
111
|
-
`/delete-thread/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
async sendLlmMessage(workspaceSlug, threadSlug, body) {
|
|
115
|
-
return this._client.request(
|
|
116
|
-
"POST",
|
|
117
|
-
`/send-llm-message/${encodeURIComponent(workspaceSlug)}/${encodeURIComponent(threadSlug)}`,
|
|
118
|
-
body
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
async listLlmProviders() {
|
|
122
|
-
return this._client.request("GET", "/list-llm-providers");
|
|
123
|
-
}
|
|
124
|
-
async listLlmModels(provider) {
|
|
125
|
-
return this._client.request("GET", `/list-llm-models/${encodeURIComponent(provider)}`);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
CliApiClient,
|
|
131
|
-
CliApiNamespace
|
|
132
|
-
};
|
package/dist/chunk-UPXEAZIT.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// src/v1/errors.ts
|
|
2
|
-
var DeveloperApiError = class extends Error {
|
|
3
|
-
constructor(status, code, message) {
|
|
4
|
-
super(message);
|
|
5
|
-
this.status = status;
|
|
6
|
-
this.code = code;
|
|
7
|
-
this.name = "DeveloperApiError";
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var AuthenticationError = class extends DeveloperApiError {
|
|
11
|
-
constructor(message = "Invalid or missing API key") {
|
|
12
|
-
super(403, "AUTHENTICATION_ERROR", message);
|
|
13
|
-
this.name = "AuthenticationError";
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var NotFoundError = class extends DeveloperApiError {
|
|
17
|
-
constructor(message = "Resource not found") {
|
|
18
|
-
super(404, "NOT_FOUND", message);
|
|
19
|
-
this.name = "NotFoundError";
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
var ValidationError = class extends DeveloperApiError {
|
|
23
|
-
constructor(message) {
|
|
24
|
-
super(400, "VALIDATION_ERROR", message);
|
|
25
|
-
this.name = "ValidationError";
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var ServerError = class extends DeveloperApiError {
|
|
29
|
-
constructor(message = "Internal server error") {
|
|
30
|
-
super(500, "SERVER_ERROR", message);
|
|
31
|
-
this.name = "ServerError";
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
DeveloperApiError,
|
|
37
|
-
AuthenticationError,
|
|
38
|
-
NotFoundError,
|
|
39
|
-
ValidationError,
|
|
40
|
-
ServerError
|
|
41
|
-
};
|