@jhytabest/plashboard 0.1.9 → 0.1.11
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 +7 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/plashboard-admin/SKILL.md +15 -1
- package/src/plugin.ts +90 -1
package/README.md
CHANGED
|
@@ -30,9 +30,12 @@ No manual config is required for first use. Defaults are safe:
|
|
|
30
30
|
In chat, run:
|
|
31
31
|
|
|
32
32
|
```text
|
|
33
|
-
/plashboard
|
|
33
|
+
/plashboard onboard <what this dashboard should focus on>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
For end users (Telegram/other channels), no slash command is required:
|
|
37
|
+
natural-language requests such as "I want a dashboard for X" are handled by the bundled `plashboard-admin` skill via tool calls.
|
|
38
|
+
|
|
36
39
|
## Optional Config
|
|
37
40
|
|
|
38
41
|
Add to `openclaw.json`:
|
|
@@ -74,6 +77,7 @@ Use `fill_provider: "command"` only if you need a custom external runner.
|
|
|
74
77
|
## Runtime Command
|
|
75
78
|
|
|
76
79
|
```text
|
|
80
|
+
/plashboard onboard <description> [local_url] [https_port] [repo_dir]
|
|
77
81
|
/plashboard setup [openclaw [agent_id]|mock|command <fill_command>]
|
|
78
82
|
/plashboard quickstart <description>
|
|
79
83
|
/plashboard doctor [local_url] [https_port] [repo_dir]
|
|
@@ -93,10 +97,10 @@ Use `fill_provider: "command"` only if you need a custom external runner.
|
|
|
93
97
|
Recommended first run:
|
|
94
98
|
|
|
95
99
|
```text
|
|
96
|
-
/plashboard
|
|
100
|
+
/plashboard onboard "Focus on service health, priorities, blockers, and next actions."
|
|
97
101
|
```
|
|
98
102
|
|
|
99
|
-
If `
|
|
103
|
+
If `onboard` returns web/exposure warnings:
|
|
100
104
|
|
|
101
105
|
```text
|
|
102
106
|
/plashboard web-guide
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "plashboard",
|
|
3
3
|
"name": "Plashboard",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.11",
|
|
5
5
|
"description": "Template-driven dashboard runtime with scheduled OpenClaw fills and safe publish.",
|
|
6
6
|
"entry": "./src/index.ts",
|
|
7
7
|
"skills": ["./skills/plashboard-admin"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plashboard-admin
|
|
3
|
-
description: Manage plashboard templates
|
|
3
|
+
description: Manage plashboard templates and autonomously convert natural-language dashboard requests into plashboard tool actions.
|
|
4
4
|
command-dispatch: tool
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ command-dispatch: tool
|
|
|
9
9
|
Use this skill for plashboard runtime administration.
|
|
10
10
|
|
|
11
11
|
## Use Cases
|
|
12
|
+
- Convert user requests like "I want dashboard X" into created/activated dashboards automatically.
|
|
12
13
|
- Create, update, copy, delete, and validate dashboard templates.
|
|
13
14
|
- Activate a template as the live dashboard source.
|
|
14
15
|
- Trigger immediate runs.
|
|
@@ -17,6 +18,7 @@ Use this skill for plashboard runtime administration.
|
|
|
17
18
|
|
|
18
19
|
## Required Tooling
|
|
19
20
|
Always use plugin tools:
|
|
21
|
+
- `plashboard_onboard`
|
|
20
22
|
- `plashboard_setup`
|
|
21
23
|
- `plashboard_exposure_guide`
|
|
22
24
|
- `plashboard_exposure_check`
|
|
@@ -40,8 +42,20 @@ Always use plugin tools:
|
|
|
40
42
|
- Never edit template/state/run JSON files directly.
|
|
41
43
|
- Never perform Docker, Tailscale, or systemd operations.
|
|
42
44
|
- Never ask the model to generate full dashboard structure when filling values.
|
|
45
|
+
- Do not tell end users to run slash commands when tool calls can do the action directly.
|
|
46
|
+
|
|
47
|
+
## Intent Automation
|
|
48
|
+
- If the user asks for a new dashboard in natural language, call `plashboard_onboard` with:
|
|
49
|
+
- `description`: user request rewritten as a concrete dashboard objective
|
|
50
|
+
- `force_quickstart`: `true`
|
|
51
|
+
- `activate`: `true`
|
|
52
|
+
- `run_now`: `true`
|
|
53
|
+
- If onboarding returns readiness issues, call `plashboard_web_guide` and `plashboard_exposure_guide`, then present exact operator commands.
|
|
54
|
+
- If the user asks to modify an existing dashboard, call `plashboard_template_list` first, then update/copy/activate/run via tools.
|
|
55
|
+
- Prefer tool execution over conversational planning; only ask clarifying questions if the request is ambiguous.
|
|
43
56
|
|
|
44
57
|
## Command Shortcuts
|
|
58
|
+
- `/plashboard onboard <description> [local_url] [https_port] [repo_dir]`
|
|
45
59
|
- `/plashboard quickstart <description>`
|
|
46
60
|
- `/plashboard setup [openclaw [agent_id]|mock|command <fill_command>]`
|
|
47
61
|
- `/plashboard doctor [local_url] [https_port] [repo_dir]`
|
package/src/plugin.ts
CHANGED
|
@@ -126,6 +126,10 @@ type DoctorParams = ExposureParams & {
|
|
|
126
126
|
repo_dir?: string;
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
type OnboardParams = DoctorParams & QuickstartParams & {
|
|
130
|
+
force_quickstart?: boolean;
|
|
131
|
+
};
|
|
132
|
+
|
|
129
133
|
type CommandExecResult = {
|
|
130
134
|
ok: boolean;
|
|
131
135
|
stdout: string;
|
|
@@ -607,6 +611,51 @@ async function runDoctor(
|
|
|
607
611
|
};
|
|
608
612
|
}
|
|
609
613
|
|
|
614
|
+
async function runOnboard(
|
|
615
|
+
runtime: PlashboardRuntime,
|
|
616
|
+
resolvedConfig: ReturnType<typeof resolveConfig>,
|
|
617
|
+
params: OnboardParams = {}
|
|
618
|
+
): Promise<ToolResponse<Record<string, unknown>>> {
|
|
619
|
+
const initResult = await runtime.init();
|
|
620
|
+
if (!initResult.ok) return initResult;
|
|
621
|
+
|
|
622
|
+
const beforeStatus = await runtime.status();
|
|
623
|
+
const beforeTemplateCount = Number(beforeStatus.data?.template_count ?? 0);
|
|
624
|
+
const shouldQuickstart = params.force_quickstart === true || beforeTemplateCount === 0;
|
|
625
|
+
|
|
626
|
+
let quickstartResult: ToolResponse<Record<string, unknown>> | null = null;
|
|
627
|
+
if (shouldQuickstart) {
|
|
628
|
+
quickstartResult = await runQuickstart(runtime, resolvedConfig, {
|
|
629
|
+
description: params.description,
|
|
630
|
+
template_id: params.template_id,
|
|
631
|
+
template_name: params.template_name,
|
|
632
|
+
every_minutes: params.every_minutes,
|
|
633
|
+
activate: params.activate,
|
|
634
|
+
run_now: params.run_now
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
const doctorResult = await runDoctor(runtime, resolvedConfig, {
|
|
639
|
+
local_url: params.local_url,
|
|
640
|
+
tailscale_https_port: params.tailscale_https_port,
|
|
641
|
+
dashboard_output_path: params.dashboard_output_path,
|
|
642
|
+
repo_dir: params.repo_dir
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
return {
|
|
646
|
+
ok: doctorResult.ok,
|
|
647
|
+
errors: doctorResult.errors,
|
|
648
|
+
data: {
|
|
649
|
+
workflow: 'onboard',
|
|
650
|
+
init: initResult.data,
|
|
651
|
+
quickstart_ran: shouldQuickstart,
|
|
652
|
+
quickstart: quickstartResult?.data,
|
|
653
|
+
doctor: doctorResult.data,
|
|
654
|
+
next_steps: doctorResult.data?.next_steps ?? []
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
|
|
610
659
|
export function registerPlashboardPlugin(api: UnknownApi): void {
|
|
611
660
|
const config = resolveConfig(api);
|
|
612
661
|
const runtimeCommand = api.runtime?.system?.runCommandWithTimeout;
|
|
@@ -651,6 +700,31 @@ export function registerPlashboardPlugin(api: UnknownApi): void {
|
|
|
651
700
|
}
|
|
652
701
|
});
|
|
653
702
|
|
|
703
|
+
api.registerTool?.({
|
|
704
|
+
name: 'plashboard_onboard',
|
|
705
|
+
description: 'Run complete onboarding flow: init, first template (if needed), and readiness doctor.',
|
|
706
|
+
optional: true,
|
|
707
|
+
parameters: {
|
|
708
|
+
type: 'object',
|
|
709
|
+
properties: {
|
|
710
|
+
description: { type: 'string' },
|
|
711
|
+
template_id: { type: 'string' },
|
|
712
|
+
template_name: { type: 'string' },
|
|
713
|
+
every_minutes: { type: 'number' },
|
|
714
|
+
activate: { type: 'boolean' },
|
|
715
|
+
run_now: { type: 'boolean' },
|
|
716
|
+
local_url: { type: 'string' },
|
|
717
|
+
tailscale_https_port: { type: 'number' },
|
|
718
|
+
dashboard_output_path: { type: 'string' },
|
|
719
|
+
repo_dir: { type: 'string' },
|
|
720
|
+
force_quickstart: { type: 'boolean' }
|
|
721
|
+
},
|
|
722
|
+
additionalProperties: false
|
|
723
|
+
},
|
|
724
|
+
execute: async (_toolCallId: unknown, params: OnboardParams = {}) =>
|
|
725
|
+
toToolResult(await runOnboard(runtime, config, params))
|
|
726
|
+
});
|
|
727
|
+
|
|
654
728
|
api.registerTool?.({
|
|
655
729
|
name: 'plashboard_exposure_guide',
|
|
656
730
|
description: 'Return copy-paste commands to expose dashboard UI over existing Tailscale.',
|
|
@@ -1003,6 +1077,21 @@ export function registerPlashboardPlugin(api: UnknownApi): void {
|
|
|
1003
1077
|
})
|
|
1004
1078
|
);
|
|
1005
1079
|
}
|
|
1080
|
+
if (cmd === 'onboard') {
|
|
1081
|
+
const localUrl = rest.find((token) => token.startsWith('http://') || token.startsWith('https://'));
|
|
1082
|
+
const portToken = rest.find((token) => /^[0-9]+$/.test(token));
|
|
1083
|
+
const repoDir = rest.find((token) => token.startsWith('/'));
|
|
1084
|
+
const descriptionTokens = rest.filter((token) => token !== localUrl && token !== portToken && token !== repoDir);
|
|
1085
|
+
const description = descriptionTokens.join(' ').trim() || undefined;
|
|
1086
|
+
return toCommandResult(
|
|
1087
|
+
await runOnboard(runtime, config, {
|
|
1088
|
+
description,
|
|
1089
|
+
local_url: localUrl,
|
|
1090
|
+
tailscale_https_port: portToken ? Number(portToken) : undefined,
|
|
1091
|
+
repo_dir: repoDir
|
|
1092
|
+
})
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1006
1095
|
if (cmd === 'setup') {
|
|
1007
1096
|
const mode = asString(rest[0]).toLowerCase();
|
|
1008
1097
|
const fillProvider = mode === 'command' || mode === 'mock' || mode === 'openclaw' ? mode : undefined;
|
|
@@ -1044,7 +1133,7 @@ export function registerPlashboardPlugin(api: UnknownApi): void {
|
|
|
1044
1133
|
return toCommandResult({
|
|
1045
1134
|
ok: false,
|
|
1046
1135
|
errors: [
|
|
1047
|
-
'unknown command. supported: setup [openclaw [agent_id]|mock|command <fill_command>], quickstart <description>, doctor [local_url] [https_port] [repo_dir], web-guide [local_url] [repo_dir], expose-guide [local_url] [https_port], expose-check [local_url] [https_port], init, status, list, activate <id>, delete <id>, copy <src> <new-id> [new-name] [activate], run <id>, set-display <width> <height> <top> <bottom>'
|
|
1136
|
+
'unknown command. supported: onboard <description> [local_url] [https_port] [repo_dir], setup [openclaw [agent_id]|mock|command <fill_command>], quickstart <description>, doctor [local_url] [https_port] [repo_dir], web-guide [local_url] [repo_dir], expose-guide [local_url] [https_port], expose-check [local_url] [https_port], init, status, list, activate <id>, delete <id>, copy <src> <new-id> [new-name] [activate], run <id>, set-display <width> <height> <top> <bottom>'
|
|
1048
1137
|
]
|
|
1049
1138
|
});
|
|
1050
1139
|
}
|