@oceanswave/openclaw-tescmd 0.3.9 → 0.4.1
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/index.ts +1 -3
- package/package.json +3 -3
- package/skill.md +1 -1
- package/tools/status.ts +1 -1
- package/tools/system.ts +1 -1
- package/tools/triggers.ts +4 -6
- package/commands/cli.ts +0 -74
package/index.ts
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
37
|
-
import { registerCliCommands } from "./commands/cli.js";
|
|
38
37
|
import { registerSlashCommands } from "./commands/slash.js";
|
|
39
38
|
import { type TescmdConfig, tescmdConfigSchema } from "./config.js";
|
|
40
39
|
import { registerCapabilitiesTool } from "./tools/capabilities.js";
|
|
@@ -79,9 +78,8 @@ export default {
|
|
|
79
78
|
registerTriggerTools(api);
|
|
80
79
|
registerSystemTools(api);
|
|
81
80
|
|
|
82
|
-
// Register slash commands
|
|
81
|
+
// Register slash commands
|
|
83
82
|
registerSlashCommands(api);
|
|
84
|
-
registerCliCommands(api);
|
|
85
83
|
|
|
86
84
|
// Register a service for lifecycle logging
|
|
87
85
|
api.registerService({
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanswave/openclaw-tescmd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "OpenClaw platform plugin for Tesla vehicle control and telemetry via tescmd",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/Oceanswave/openclaw-tescmd.git"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/
|
|
11
|
+
"homepage": "https://github.com/Oceanswave/openclaw-tescmd",
|
|
12
12
|
"files": [
|
|
13
13
|
"index.ts",
|
|
14
14
|
"config.ts",
|
package/skill.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: openclaw-tescmd
|
|
3
3
|
slug: openclaw-tescmd
|
|
4
4
|
displayName: OpenClaw Tesla (tescmd)
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.4.1
|
|
6
6
|
description: Installation and setup guide for Tesla vehicle control and telemetry via the tescmd node.
|
|
7
7
|
homepage: https://github.com/oceanswave/openclaw-tescmd
|
|
8
8
|
metadata: {"category":"platform","platform":"tesla","node":"tescmd"}
|
package/tools/status.ts
CHANGED
package/tools/system.ts
CHANGED
|
@@ -40,7 +40,7 @@ export function registerSystemTools(api: OpenClawPluginApi): void {
|
|
|
40
40
|
description: "Command method name — dot-notation (door.lock) or snake_case (door_lock)",
|
|
41
41
|
}),
|
|
42
42
|
params: Type.Optional(
|
|
43
|
-
Type.Record(Type.String(), Type.
|
|
43
|
+
Type.Record(Type.String(), Type.Object({}), {
|
|
44
44
|
description: "Optional parameters to pass to the command",
|
|
45
45
|
}),
|
|
46
46
|
),
|
package/tools/triggers.ts
CHANGED
|
@@ -110,11 +110,9 @@ export function registerTriggerTools(api: OpenClawPluginApi): void {
|
|
|
110
110
|
parameters: Type.Object({
|
|
111
111
|
field: stringEnum(TRIGGER_FIELDS),
|
|
112
112
|
operator: stringEnum(TRIGGER_OPERATORS),
|
|
113
|
-
value: Type.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
),
|
|
113
|
+
value: Type.Any({
|
|
114
|
+
description: "Threshold value for the condition",
|
|
115
|
+
}),
|
|
118
116
|
once: Type.Optional(
|
|
119
117
|
Type.Boolean({
|
|
120
118
|
description: "If true, the trigger fires only once then auto-deletes (default: false)",
|
|
@@ -287,7 +285,7 @@ export function registerTriggerTools(api: OpenClawPluginApi): void {
|
|
|
287
285
|
Type.Number({ description: "Geofence radius in meters", minimum: 0 }),
|
|
288
286
|
),
|
|
289
287
|
value: Type.Optional(
|
|
290
|
-
Type.
|
|
288
|
+
Type.Object({}, { description: "Alternative: pass {lat, lon, radius} as value object" }),
|
|
291
289
|
),
|
|
292
290
|
once: Type.Optional(Type.Boolean({ description: "Fire only once (default: false)" })),
|
|
293
291
|
cooldown_seconds: Type.Optional(
|
package/commands/cli.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI subcommands — terminal commands under `openclaw tescmd`.
|
|
3
|
-
*
|
|
4
|
-
* Registered commands:
|
|
5
|
-
* openclaw tescmd status — show plugin and node connection status
|
|
6
|
-
* openclaw tescmd commands — list all whitelisted commands
|
|
7
|
-
* openclaw tescmd events — list all telemetry event types
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
11
|
-
import { ALL_COMMANDS } from "../platform.js";
|
|
12
|
-
import { ALL_EVENT_TYPES, TELEMETRY_FIELD_MAP } from "../telemetry.js";
|
|
13
|
-
|
|
14
|
-
interface CliCommand {
|
|
15
|
-
command(name: string): CliCommand;
|
|
16
|
-
description(desc: string): CliCommand;
|
|
17
|
-
action(fn: () => void): CliCommand;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function registerCliCommands(api: OpenClawPluginApi): void {
|
|
21
|
-
api.registerCli(
|
|
22
|
-
({ program }: { program: unknown }) => {
|
|
23
|
-
const tescmd = (program as CliCommand)
|
|
24
|
-
.command("tescmd")
|
|
25
|
-
.description("Tesla vehicle platform (tescmd)");
|
|
26
|
-
|
|
27
|
-
tescmd
|
|
28
|
-
.command("status")
|
|
29
|
-
.description("Show plugin and node connection status")
|
|
30
|
-
.action(() => {
|
|
31
|
-
console.log("openclaw-tescmd plugin status");
|
|
32
|
-
console.log("─".repeat(40));
|
|
33
|
-
console.log(` Platform: tesla`);
|
|
34
|
-
console.log(` Commands: ${ALL_COMMANDS.length} whitelisted`);
|
|
35
|
-
console.log(` Events: ${ALL_EVENT_TYPES.length} telemetry types`);
|
|
36
|
-
console.log(` Node: https://github.com/oceanswave/tescmd`);
|
|
37
|
-
console.log(` Plugin: https://github.com/oceanswave/openclaw-tescmd`);
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
tescmd
|
|
41
|
-
.command("commands")
|
|
42
|
-
.description("List all whitelisted commands")
|
|
43
|
-
.action(() => {
|
|
44
|
-
console.log("Whitelisted commands:");
|
|
45
|
-
console.log("");
|
|
46
|
-
const reads = ALL_COMMANDS.filter((c) => c.direction === "read");
|
|
47
|
-
const writes = ALL_COMMANDS.filter((c) => c.direction === "write");
|
|
48
|
-
console.log(` Reads (${reads.length}):`);
|
|
49
|
-
for (const cmd of reads) {
|
|
50
|
-
console.log(` ${cmd.method.padEnd(22)} ${cmd.label}`);
|
|
51
|
-
}
|
|
52
|
-
console.log("");
|
|
53
|
-
console.log(` Writes (${writes.length}):`);
|
|
54
|
-
for (const cmd of writes) {
|
|
55
|
-
console.log(` ${cmd.method.padEnd(22)} ${cmd.label}`);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
tescmd
|
|
60
|
-
.command("events")
|
|
61
|
-
.description("List all telemetry event types")
|
|
62
|
-
.action(() => {
|
|
63
|
-
console.log("Telemetry event types:");
|
|
64
|
-
console.log("");
|
|
65
|
-
for (const [field, eventType] of Object.entries(TELEMETRY_FIELD_MAP)) {
|
|
66
|
-
console.log(` ${field.padEnd(22)} → ${eventType}`);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
{ commands: ["tescmd"] },
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
api.logger.info("Registered CLI commands: openclaw tescmd {status,commands,events}");
|
|
74
|
-
}
|