feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning

This commit is contained in:
LukeGus committed 2026-09-25 13:06:33 -05:00
1 parent c21bca8cf0
commit fbe736bc20
70 files changed
+1117 -1139

No files matched your search

+14
View File
@@ -74,6 +74,15 @@ export interface ShellLayout {
}
/** What a plugin may ask of the shell. */
/** Fields a plugin can fill in when it opens the host editor. */
export interface HostDraft {
name?: string;
ip?: string;
port?: number;
username?: string;
authType?: string;
}
export interface ShellApi {
openTab: (
host: PluginHostRecord | null,
@@ -88,6 +97,11 @@ export interface ShellApi {
tab: PluginTabRecord,
host: PluginHostRecord,
) => Promise<void>;
/**
* Opens the host editor for a new host with these fields filled in. The
* user reviews and saves it. Absent in some shells.
*/
openHostEditor?: (draft?: HostDraft) => void;
/** Opens a rail view in the left sidebar. */
openRailView: (id: string) => void;
/** Closes a rail view wherever it is shown. */
+26 -1
View File
@@ -271,6 +271,10 @@ export interface PluginHostSettingsContribution {
enableLabelKey?: string;
/** What the enable switch reads before a host saves it. Off by default. */
enableDefault?: boolean;
/** Host editor strip the generated tab sits in. Defaults to "top". */
editorGroup?: "top" | "ssh";
/** Position among that strip's tabs, core ones included. */
editorOrder?: number;
fields: PluginSettingsField[];
}
@@ -1086,7 +1090,14 @@ function validateSettings(settings: unknown, errors: string[]): void {
}
rejectUnknown(
host,
["enableKey", "enableLabelKey", "enableDefault", "fields"],
[
"enableKey",
"enableLabelKey",
"enableDefault",
"editorGroup",
"editorOrder",
"fields",
],
`"${at}"`,
errors,
);
@@ -1104,6 +1115,20 @@ function validateSettings(settings: unknown, errors: string[]): void {
if ("enableDefault" in host && typeof host.enableDefault !== "boolean") {
errors.push(`${at}.enableDefault must be a boolean`);
}
if (
"editorGroup" in host &&
host.editorGroup !== "top" &&
host.editorGroup !== "ssh"
) {
errors.push(`${at}.editorGroup must be "top" or "ssh"`);
}
if (
"editorOrder" in host &&
(typeof host.editorOrder !== "number" ||
!Number.isFinite(host.editorOrder))
) {
errors.push(`${at}.editorOrder must be a number`);
}
if (!Array.isArray(host.fields)) {
errors.push(`${at}.fields must be an array`);