@kvell007/embed-labs-cli 0.1.0-alpha.57 → 0.1.0-alpha.59
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 +4 -4
- package/dist/index.js +31 -4
- package/dist/index.js.map +1 -1
- package/dist/local-toolchain.d.ts +21 -0
- package/dist/local-toolchain.js +114 -7
- package/dist/local-toolchain.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -338,10 +338,10 @@ Current local workflows are intentionally guarded:
|
|
|
338
338
|
evidence without opening probes or starting debug sessions.
|
|
339
339
|
- RP2350 UF2 flashing requires a mounted UF2 volume, a `.uf2` artifact, a ready
|
|
340
340
|
flash plan, and explicit `--approve`.
|
|
341
|
-
- TaishanPi
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
- TaishanPi initialization image flashing resolves the installed local SDK
|
|
342
|
+
image set by default. `embed flash run --board taishanpi --approve` writes
|
|
343
|
+
through Local Bridge only after the ready plan validates `rkdeveloptool`,
|
|
344
|
+
`parameter.txt`, and all required images.
|
|
345
345
|
|
|
346
346
|
These commands should be treated as current local evidence and planning tools,
|
|
347
347
|
not broad hardware support claims.
|
package/dist/index.js
CHANGED
|
@@ -121,12 +121,12 @@ const BOARD_KNOWLEDGE_FILE_USAGE = "Usage: embed board knowledge file <template_
|
|
|
121
121
|
const MODEL_LIST_USAGE = "Usage: embed model list [--json]";
|
|
122
122
|
const MODEL_DEFAULT_USAGE = "Usage: embed model default [--json]";
|
|
123
123
|
const SERVICE_MODES_USAGE = "Usage: embed service modes [--json]";
|
|
124
|
-
const AGENT_RUN_USAGE = "Usage: embed agent run --prompt <request> [--account <account_id>] [--workspace <workspace_id>] [--provider stub|openai|bai|cc|claude-code] [--model <model>] [--max-tool-calls 6] [--host <ip>] [--ports 22,15301] [--artifact <local_file>|--artifact-id <artifact_id>|--artifact-task <task_id>] [--artifact-output <path>] [--remote-path <path>] [--run] [--approve] [--json]";
|
|
124
|
+
const AGENT_RUN_USAGE = "Usage: embed agent run --prompt <request> [--account <account_id>] [--workspace <workspace_id>] [--provider stub|openai|bai|cc|claude-code] [--model <model>] [--max-tool-calls 6] [--host <ip>] [--ports 22,15301] [--artifact <local_file>|--artifact-id <artifact_id>|--artifact-task <task_id>] [--artifact-output <path>] [--remote-path <path>] [--run-command <cmd>] [--run] [--approve] [--json]";
|
|
125
125
|
let cachedLocalHardwareFingerprint;
|
|
126
126
|
const TOOL_LIST_USAGE = "Usage: embed tool list [--json]";
|
|
127
127
|
const TOOL_CALL_USAGE = "Usage: embed tool call <capability_id> [--input-json '<json>'] [--approve] [--json]";
|
|
128
128
|
const MCP_TOOL_EVENT_USAGE = "Usage: embed mcp log --tool <tool_name> [--client codex|opencode] [--mode local_ai|server_ai] [--local-device-id <id>] [--server-model-used true|false] [--success true|false] [--request-id <id>] [--duration-ms <ms>] [--input-summary <text>] [--output-summary <text>] [--json]";
|
|
129
|
-
const BOARD_DEPLOY_TAISHANPI_USAGE = "Usage: embed deploy taishanpi --host <ip> --artifact <local_file> --approve [--user root] [--remote-path /userdata/embed-labs/apps/app] [--run] [--timeout 30] [--json]";
|
|
129
|
+
const BOARD_DEPLOY_TAISHANPI_USAGE = "Usage: embed deploy taishanpi --host <ip> --artifact <local_file> --approve [--user root] [--remote-path /userdata/embed-labs/apps/app] [--run-command <cmd>] [--run] [--timeout 30] [--json]";
|
|
130
130
|
const CLOUD_TASK_EVENT_APPEND_USAGE = "Usage: embed cloud task event append <task_id> [--state <state>] [--progress-stage <stage>|--stage <stage>] [--progress-text <text>|--message <text>] [--progress-percent 0-100] [--severity info|warning|error] [--type <event_type>] [--artifact-json '<json>'] [--evidence-json '<json>'] [--json]";
|
|
131
131
|
const TASK_STATES = new Set([
|
|
132
132
|
"created",
|
|
@@ -1228,6 +1228,7 @@ function flashBody(parsed, includeApproval) {
|
|
|
1228
1228
|
variant_id: stringFlag(parsed, "variant"),
|
|
1229
1229
|
hardware_profile_id: stringFlag(parsed, "hardware-profile"),
|
|
1230
1230
|
profile_id: stringFlag(parsed, "profile"),
|
|
1231
|
+
local_device_id: stringFlag(parsed, "local-device-id") ?? stringFlag(parsed, "device-id"),
|
|
1231
1232
|
image_dir: stringFlag(parsed, "image-dir"),
|
|
1232
1233
|
artifact_path: stringFlag(parsed, "artifact"),
|
|
1233
1234
|
target_volume_path: stringFlag(parsed, "target-volume")
|
|
@@ -3719,6 +3720,10 @@ function agentRunToolInputs(parsed) {
|
|
|
3719
3720
|
if (remotePath.error) {
|
|
3720
3721
|
return remotePath.error;
|
|
3721
3722
|
}
|
|
3723
|
+
const runCommand = optionalTrimmedStringFlag(parsed, "run-command");
|
|
3724
|
+
if (runCommand.error) {
|
|
3725
|
+
return runCommand.error;
|
|
3726
|
+
}
|
|
3722
3727
|
const user = optionalTrimmedStringFlag(parsed, "user");
|
|
3723
3728
|
if (user.error) {
|
|
3724
3729
|
return user.error;
|
|
@@ -3772,6 +3777,7 @@ function agentRunToolInputs(parsed) {
|
|
|
3772
3777
|
user: user.value,
|
|
3773
3778
|
artifact_path: artifact.value,
|
|
3774
3779
|
remote_path: remotePath.value,
|
|
3780
|
+
run_command: runCommand.value,
|
|
3775
3781
|
run: booleanFlag(parsed, "run") || undefined,
|
|
3776
3782
|
timeout_seconds: timeout.value
|
|
3777
3783
|
});
|
|
@@ -4795,7 +4801,7 @@ function isTaishanPiDeployCommand(parsed) {
|
|
|
4795
4801
|
|| area === "deploy";
|
|
4796
4802
|
}
|
|
4797
4803
|
function boardDeployTaishanPiRequest(parsed) {
|
|
4798
|
-
const unknownFlag = firstUnknownFlag(parsed, ["json", "host", "user", "artifact", "artifact-path", "remote-path", "run", "timeout", "approve", "approved"]);
|
|
4804
|
+
const unknownFlag = firstUnknownFlag(parsed, ["json", "host", "user", "artifact", "artifact-path", "remote-path", "run-command", "run", "timeout", "approve", "approved"]);
|
|
4799
4805
|
if (unknownFlag) {
|
|
4800
4806
|
return `Unknown flag --${unknownFlag}. ${BOARD_DEPLOY_TAISHANPI_USAGE}`;
|
|
4801
4807
|
}
|
|
@@ -4837,6 +4843,10 @@ function boardDeployTaishanPiRequest(parsed) {
|
|
|
4837
4843
|
if (remotePath.error) {
|
|
4838
4844
|
return remotePath.error;
|
|
4839
4845
|
}
|
|
4846
|
+
const runCommand = optionalTrimmedStringFlag(parsed, "run-command");
|
|
4847
|
+
if (runCommand.error) {
|
|
4848
|
+
return runCommand.error;
|
|
4849
|
+
}
|
|
4840
4850
|
const timeout = optionalNonNegativeIntegerFlag(parsed, "timeout");
|
|
4841
4851
|
if (timeout.error) {
|
|
4842
4852
|
return timeout.error;
|
|
@@ -4851,6 +4861,7 @@ function boardDeployTaishanPiRequest(parsed) {
|
|
|
4851
4861
|
user: user.value,
|
|
4852
4862
|
artifact_path: artifact.value,
|
|
4853
4863
|
remote_path: remotePath.value,
|
|
4864
|
+
run_command: runCommand.value,
|
|
4854
4865
|
run: booleanFlag(parsed, "run") || undefined,
|
|
4855
4866
|
timeout_seconds: timeout.value,
|
|
4856
4867
|
approved: approval.value || undefined
|
|
@@ -7120,6 +7131,18 @@ function renderLocalToolchainList(result) {
|
|
|
7120
7131
|
}
|
|
7121
7132
|
}
|
|
7122
7133
|
lines.push(` install_modes=${environment.install_modes.join(",")}`);
|
|
7134
|
+
if (environment.execution) {
|
|
7135
|
+
lines.push(` execution=${environment.execution.kind} supported=${environment.execution.supported}`);
|
|
7136
|
+
if (environment.execution.required_host) {
|
|
7137
|
+
lines.push(` execution_required_host=${environment.execution.required_host}`);
|
|
7138
|
+
}
|
|
7139
|
+
if (environment.execution.actual_host) {
|
|
7140
|
+
lines.push(` execution_actual_host=${environment.execution.actual_host}`);
|
|
7141
|
+
}
|
|
7142
|
+
if (environment.execution.reason) {
|
|
7143
|
+
lines.push(` execution_reason=${environment.execution.reason}`);
|
|
7144
|
+
}
|
|
7145
|
+
}
|
|
7123
7146
|
lines.push(` install_command=${environment.install_command}`);
|
|
7124
7147
|
if (environment.status === "update_available") {
|
|
7125
7148
|
lines.push(` update_command=${environment.update_command}`);
|
|
@@ -7162,12 +7185,16 @@ function renderWindowsWslStatus(result) {
|
|
|
7162
7185
|
`applicable=${result.applicable}`,
|
|
7163
7186
|
`wsl_available=${result.wsl_available}`,
|
|
7164
7187
|
`usable=${result.usable}`,
|
|
7188
|
+
`taishanpi_execution=${result.taishanpi_execution.status} supported=${result.taishanpi_execution.supported}`,
|
|
7189
|
+
`taishanpi_required_host=${result.taishanpi_execution.required_host}`,
|
|
7190
|
+
result.taishanpi_execution.actual_host ? `taishanpi_actual_host=${result.taishanpi_execution.actual_host}` : "",
|
|
7191
|
+
`taishanpi_reason=${result.taishanpi_execution.reason}`,
|
|
7165
7192
|
`checked_at=${result.checked_at}`,
|
|
7166
7193
|
`status_command=${result.commands.status}`,
|
|
7167
7194
|
`list_command=${result.commands.list}`,
|
|
7168
7195
|
`list_online_command=${result.commands.list_online}`,
|
|
7169
7196
|
`install_command=${result.commands.install_ubuntu}`
|
|
7170
|
-
];
|
|
7197
|
+
].filter(Boolean);
|
|
7171
7198
|
if (result.distributions.length > 0) {
|
|
7172
7199
|
lines.push("distributions:");
|
|
7173
7200
|
for (const distro of result.distributions) {
|