zidane-ui 9.3.1 → 9.4.0
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/dist/adapters/live.d.ts +2 -0
- package/dist/adapters/live.js +3 -0
- package/dist/adapters/server-git-host.js +5 -2
- package/dist/adapters/server-host.js +17 -11
- package/dist/adapters/server-machines-host.js +7 -0
- package/dist/adapters/server-session-host.js +49 -0
- package/dist/adapters/server-settings-sections.js +4 -1
- package/dist/adapters/sse-host.js +3 -0
- package/dist/adapters/sse-protocol.d.ts +10 -0
- package/dist/appearance/ZoomIndicator.js +5 -8
- package/dist/chat/HostTranscript.js +15 -1
- package/dist/chat/SessionStreamsProvider.d.ts +1 -1
- package/dist/chat/Transcript.d.ts +3 -2
- package/dist/chat/Transcript.js +26 -7
- package/dist/chat/composer/ComposerEditor.js +1 -1
- package/dist/chat/composer/ModelOptionsPicker.js +6 -2
- package/dist/chat/composer/ModelPicker.d.ts +1 -1
- package/dist/chat/composer/PlacePicker.d.ts +3 -1
- package/dist/chat/composer/PlacePicker.js +5 -1
- package/dist/chat/composer/use-draft-target.js +15 -3
- package/dist/chat/headless/block-runs.js +26 -1
- package/dist/chat/headless/chip-views.js +1 -1
- package/dist/chat/headless/draft-target.d.ts +28 -1
- package/dist/chat/headless/draft-target.js +22 -1
- package/dist/chat/headless/hosts.d.ts +4 -0
- package/dist/chat/headless/index.d.ts +25 -25
- package/dist/chat/headless/index.js +6 -6
- package/dist/chat/headless/markdown-scan.d.ts +0 -2
- package/dist/chat/headless/markdown-scan.js +3 -8
- package/dist/chat/headless/markdown-stream.js +3 -3
- package/dist/chat/headless/prompt-origin.d.ts +2 -0
- package/dist/chat/headless/prompt-origin.js +6 -2
- package/dist/chat/headless/sidebar/directory.d.ts +10 -1
- package/dist/chat/headless/sidebar/directory.js +9 -1
- package/dist/chat/headless/sidebar/environment.d.ts +15 -4
- package/dist/chat/headless/sidebar/environment.js +27 -9
- package/dist/chat/headless/sidebar/index.d.ts +2 -2
- package/dist/chat/headless/sidebar/index.js +2 -2
- package/dist/chat/headless/sidebar/labels.d.ts +9 -2
- package/dist/chat/headless/sidebar/labels.js +8 -1
- package/dist/chat/headless/streams/actions.d.ts +2 -2
- package/dist/chat/headless/streams/actions.js +1 -1
- package/dist/chat/headless/streams/event-bytes.d.ts +12 -1
- package/dist/chat/headless/streams/event-bytes.js +13 -1
- package/dist/chat/headless/streams/store.d.ts +21 -5
- package/dist/chat/headless/streams/store.js +36 -7
- package/dist/chat/headless/streams/transcript-map.js +2 -5
- package/dist/chat/headless/streams/types.d.ts +2 -1
- package/dist/chat/headless/transcript/collapse.js +3 -0
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +2 -2
- package/dist/chat/sidebar/ProjectIcon.js +1 -1
- package/dist/chat/sidebar/RowChips.js +2 -2
- package/dist/chat/sidebar/SessionSidebar.d.ts +6 -0
- package/dist/chat/sidebar/SessionSidebar.js +23 -16
- package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
- package/dist/chat/sidebar/SidebarFold.js +17 -16
- package/dist/chat/sidebar/SidebarSessionRow.d.ts +7 -1
- package/dist/chat/sidebar/SidebarSessionRow.js +11 -8
- package/dist/chat/sidebar/session-menu.d.ts +4 -0
- package/dist/chat/sidebar/session-menu.js +14 -2
- package/dist/chat/sidebar/sidebar-live.js +28 -4
- package/dist/chat/sidebar/useInboxRows.js +6 -6
- package/dist/chat/sidebar/useInboxTriage.js +50 -47
- package/dist/chat/sidebar/useSessionSearch.js +19 -18
- package/dist/chat/transcript/FileChip.js +28 -0
- package/dist/chat/transcript/LazyRow.d.ts +1 -1
- package/dist/chat/transcript/LazyRow.js +3 -4
- package/dist/chat/transcript/PromptEcho.js +3 -11
- package/dist/chat/transcript/SessionChip.d.ts +11 -0
- package/dist/chat/transcript/SessionChip.js +34 -0
- package/dist/chat/transcript/TranscriptRail.d.ts +1 -1
- package/dist/chat/transcript/chip-details.d.ts +11 -0
- package/dist/chat/transcript/chip-details.js +17 -1
- package/dist/chat/transcript/fold-worker.js +2 -1
- package/dist/chat/transcript/fold.js +11 -3
- package/dist/chat/transcript/index.d.ts +2 -2
- package/dist/chat/transcript/index.js +2 -2
- package/dist/chat/transcript/markdown-cache.d.ts +10 -1
- package/dist/chat/transcript/markdown-cache.js +37 -4
- package/dist/chat/transcript/markdown.js +27 -34
- package/dist/chat/transcript/media-gallery.js +13 -16
- package/dist/chat/transcript/messages.js +5 -4
- package/dist/chat/transcript/prompt.d.ts +1 -1
- package/dist/chat/transcript/row-mount.d.ts +27 -8
- package/dist/chat/transcript/row-mount.js +114 -80
- package/dist/chat/transcript/row-parking.d.ts +27 -0
- package/dist/chat/transcript/row-parking.js +37 -1
- package/dist/chat/transcript/script-input.d.ts +1 -1
- package/dist/chat/transcript/tool-parts.js +0 -1
- package/dist/chat/transcript/use-transcript-rows.d.ts +1 -1
- package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
- package/dist/chat/transcript/useHistoryBackfill.js +170 -0
- package/dist/chat/transcript/useTranscriptFind.js +2 -4
- package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
- package/dist/chat/transcript/useTranscriptScroll.js +12 -1
- package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
- package/dist/chat/transcript/useTranscriptSearch.js +6 -6
- package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
- package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
- package/dist/code/editor/FileTree.d.ts +2 -0
- package/dist/code/editor/FileTree.js +1 -1
- package/dist/code/editor/FileView.js +16 -25
- package/dist/code/editor/find/useFind.js +17 -17
- package/dist/code/editor/useCodeDocument.js +22 -19
- package/dist/code/editor/useDetachCleanup.js +4 -3
- package/dist/code/use-highlighted-html.js +12 -13
- package/dist/components/IconButton.d.ts +3 -1
- package/dist/components/IconButton.js +7 -2
- package/dist/components/IconButtonTip.d.ts +3 -1
- package/dist/components/IconButtonTip.js +2 -1
- package/dist/components/RowActionsMenu.js +7 -14
- package/dist/components/Tooltip.d.ts +4 -1
- package/dist/components/Tooltip.js +8 -6
- package/dist/components/assign-ref.d.ts +8 -0
- package/dist/components/assign-ref.js +12 -0
- package/dist/components/floating/FloatingSurface.js +2 -2
- package/dist/components/floating/HoverCard.js +32 -14
- package/dist/components/floating/Popover.js +4 -7
- package/dist/components/floating/useAnchoredPosition.d.ts +5 -3
- package/dist/components/floating/useAnchoredPosition.js +7 -7
- package/dist/components/object-key.d.ts +7 -0
- package/dist/components/object-key.js +18 -0
- package/dist/components/palette/PaletteList.js +2 -7
- package/dist/components/tooltip-arming.d.ts +3 -0
- package/dist/components/tooltip-arming.js +8 -1
- package/dist/core.css +3 -3
- package/dist/dist/{index-C6-t1SS9.d.ts → index-BheVJOLc.d.ts} +1 -0
- package/dist/dist/index.d.ts +2 -2
- package/dist/files/FilesTab.js +0 -1
- package/dist/files/TreeColumn.d.ts +2 -4
- package/dist/files/TreeColumn.js +0 -5
- package/dist/files/headless/host.d.ts +3 -7
- package/dist/files/headless/labels.d.ts +0 -1
- package/dist/files/headless/labels.js +0 -1
- package/dist/files/headless/workspace-diff.js +1 -1
- package/dist/files/useCodeReview.js +1 -3
- package/dist/files/useFilesDiagnostics.d.ts +1 -1
- package/dist/files/useFilesDiagnostics.js +4 -11
- package/dist/files/useOpenFiles.js +9 -12
- package/dist/files/useWorkspace.d.ts +5 -7
- package/dist/files/useWorkspace.js +4 -15
- package/dist/git/GitBar.js +5 -3
- package/dist/git/MoveSessionDialog.d.ts +18 -8
- package/dist/git/MoveSessionDialog.js +32 -53
- package/dist/git/MoveToDialog.d.ts +61 -0
- package/dist/git/MoveToDialog.js +240 -0
- package/dist/git/SandboxManager.js +9 -4
- package/dist/git/SyncChip.js +11 -4
- package/dist/git/TeleportSessionDialog.d.ts +69 -0
- package/dist/git/TeleportSessionDialog.js +440 -0
- package/dist/git/headless/host.d.ts +14 -0
- package/dist/git/headless/index.d.ts +2 -1
- package/dist/git/headless/index.js +2 -1
- package/dist/git/headless/labels.d.ts +44 -1
- package/dist/git/headless/labels.js +50 -0
- package/dist/git/headless/sandboxes.d.ts +1 -1
- package/dist/git/headless/sandboxes.js +4 -3
- package/dist/git/headless/teleport.d.ts +76 -0
- package/dist/git/headless/teleport.js +19 -0
- package/dist/git/index.d.ts +4 -2
- package/dist/git/index.js +4 -2
- package/dist/git/useEnvironmentChoices.d.ts +5 -2
- package/dist/git/useEnvironmentChoices.js +12 -4
- package/dist/hooks/useLatest.d.ts +8 -0
- package/dist/hooks/useLatest.js +17 -0
- package/dist/hooks/useMinuteTick.d.ts +6 -2
- package/dist/hooks/useMinuteTick.js +12 -6
- package/dist/hooks/useNearViewport.js +11 -8
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/keybindings/KeybindingsProvider.js +3 -4
- package/dist/keybindings/headless/catalog.d.ts +1 -1
- package/dist/keybindings/headless/catalog.js +18 -0
- package/dist/machines/AddServerForm.js +55 -3
- package/dist/machines/Banners.d.ts +2 -2
- package/dist/machines/Banners.js +3 -3
- package/dist/machines/DaemonMenu.js +1 -3
- package/dist/machines/HostsSection.js +5 -1
- package/dist/machines/OrganizationPanel.d.ts +25 -0
- package/dist/machines/OrganizationPanel.js +266 -0
- package/dist/machines/PersonalLayerPanel.d.ts +32 -0
- package/dist/machines/PersonalLayerPanel.js +360 -0
- package/dist/machines/headless/fixture-host.d.ts +10 -0
- package/dist/machines/headless/fixture-host.js +44 -0
- package/dist/machines/headless/host.d.ts +21 -1
- package/dist/machines/headless/index.d.ts +3 -1
- package/dist/machines/headless/index.js +3 -1
- package/dist/machines/headless/labels.d.ts +55 -0
- package/dist/machines/headless/labels.js +58 -1
- package/dist/machines/headless/layer.d.ts +64 -0
- package/dist/machines/headless/layer.js +56 -0
- package/dist/machines/headless/organization.d.ts +38 -0
- package/dist/machines/headless/organization.js +44 -0
- package/dist/machines/index.d.ts +3 -1
- package/dist/machines/index.js +3 -1
- package/dist/machines/testing/contract.d.ts +25 -1
- package/dist/machines/testing/contract.js +97 -1
- package/dist/motion/grow.js +12 -13
- package/dist/motion/swap.js +2 -5
- package/dist/motion/use-flip-list.d.ts +14 -0
- package/dist/motion/use-flip-list.js +17 -12
- package/dist/palette/headless/app-sources.js +37 -0
- package/dist/palette/headless/labels.js +3 -0
- package/dist/server/sse-handler.js +25 -2
- package/dist/session/DiffFileTree.js +1 -4
- package/dist/session/OpenSessionsDialog.d.ts +46 -0
- package/dist/session/OpenSessionsDialog.js +170 -0
- package/dist/session/PlanTracker.js +1 -2
- package/dist/session/ProjectHome.js +10 -9
- package/dist/session/RemindersPanel.js +10 -12
- package/dist/session/SecretsPanel.js +2 -1
- package/dist/session/SessionPeopleStack.d.ts +23 -0
- package/dist/session/SessionPeopleStack.js +65 -0
- package/dist/session/SessionPlaceMenu.js +5 -4
- package/dist/session/ShareSessionDialog.d.ts +32 -0
- package/dist/session/ShareSessionDialog.js +342 -0
- package/dist/session/TypingLine.d.ts +22 -0
- package/dist/session/TypingLine.js +31 -0
- package/dist/session/headless/host.d.ts +40 -1
- package/dist/session/headless/index.d.ts +4 -2
- package/dist/session/headless/index.js +3 -1
- package/dist/session/headless/labels.d.ts +49 -0
- package/dist/session/headless/labels.js +56 -0
- package/dist/session/headless/people.d.ts +29 -0
- package/dist/session/headless/people.js +53 -0
- package/dist/session/headless/place.d.ts +5 -0
- package/dist/session/headless/place.js +5 -1
- package/dist/session/headless/typing.d.ts +37 -0
- package/dist/session/headless/typing.js +60 -0
- package/dist/session/index.d.ts +5 -1
- package/dist/session/index.js +5 -1
- package/dist/settings/headless/search.d.ts +1 -1
- package/dist/settings/headless/sections-host.d.ts +7 -2
- package/dist/settings/section.d.ts +15 -3
- package/dist/settings/section.js +15 -3
- package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
- package/dist/settings/sections/keybindings/labels.d.ts +3 -0
- package/dist/settings/sections/keybindings/labels.js +3 -0
- package/dist/settings/sections/keybindings/rows.js +12 -0
- package/dist/settings/sections/logs/LogsSection.js +5 -8
- package/dist/styles.css +32 -7
- package/dist/terminal/HostTerminalSurface.js +28 -30
- package/dist/terminal/TerminalPanel.js +4 -12
- package/dist/terminal/TerminalProvider.d.ts +10 -2
- package/dist/terminal/TerminalProvider.js +10 -2
- package/dist/terminal/headless/labels.d.ts +0 -1
- package/dist/terminal/headless/labels.js +1 -2
- package/dist/terminal/headless/store.js +5 -1
- package/dist/workspace/LayoutBudget.js +1 -7
- package/package.json +2 -2
- package/src/styles/chat.css +3 -1
- package/src/styles/palette.css +3 -3
- package/src/styles/transcript.css +17 -3
- /package/dist/dist/{index-De9AbmxS.d.ts → index-ttmMvjgM.d.ts} +0 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { BTN_PRIMARY, BTN_SECONDARY, buttonClass } from "../components/button.js";
|
|
2
|
+
import { ErrorNote, FormSection, INPUT_CLASS, ROW_CLASS, RowText, TEXTAREA_CLASS } from "../components/Form.js";
|
|
3
|
+
import { RowMenuButton } from "../components/RowMenuButton.js";
|
|
4
|
+
import { machinesError } from "./headless/host.js";
|
|
5
|
+
import { HostIcon } from "./HostIcon.js";
|
|
6
|
+
import { HostSignIn } from "./HostSignIn.js";
|
|
7
|
+
import { useMachinesConfirm, useMachinesHost, useMachinesLabels } from "./MachinesProvider.js";
|
|
8
|
+
import { useCallback, useEffect, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
// src/machines/PersonalLayerPanel.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Renders the signed-in user's keys, MCP servers, skills and SYSTEM.md on a server. Nothing without the host's
|
|
13
|
+
* `layer`, or when the server does not sign its users in.
|
|
14
|
+
*
|
|
15
|
+
* @param props - The server, `className` and `style`.
|
|
16
|
+
*/
|
|
17
|
+
function PersonalLayerPanel(props) {
|
|
18
|
+
const host = useMachinesHost();
|
|
19
|
+
if (!host.layer) return null;
|
|
20
|
+
return /* @__PURE__ */ jsx(LayerBody, {
|
|
21
|
+
...props,
|
|
22
|
+
layer: host.layer
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function LayerBody({ host, layer, className = "", style }) {
|
|
26
|
+
const labels = useMachinesLabels();
|
|
27
|
+
const ask = useMachinesConfirm();
|
|
28
|
+
const signIn = useMachinesHost().signIn;
|
|
29
|
+
const [state, setState] = useState(null);
|
|
30
|
+
const [error, setError] = useState(null);
|
|
31
|
+
const [editing, setEditing] = useState(null);
|
|
32
|
+
const [busy, setBusy] = useState(false);
|
|
33
|
+
const [systemMd, setSystemMd] = useState("");
|
|
34
|
+
const read = useCallback(async () => {
|
|
35
|
+
try {
|
|
36
|
+
const next = await layer.read(host.id);
|
|
37
|
+
setState(next);
|
|
38
|
+
setSystemMd(next?.systemMd ?? "");
|
|
39
|
+
} catch (err) {
|
|
40
|
+
setError(labels.machinesError(machinesError("layer", err)));
|
|
41
|
+
}
|
|
42
|
+
}, [
|
|
43
|
+
layer,
|
|
44
|
+
host.id,
|
|
45
|
+
labels
|
|
46
|
+
]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
read();
|
|
49
|
+
}, [read, host.status]);
|
|
50
|
+
const act = async (action, after) => {
|
|
51
|
+
setBusy(true);
|
|
52
|
+
setError(null);
|
|
53
|
+
try {
|
|
54
|
+
await action();
|
|
55
|
+
after?.();
|
|
56
|
+
} catch (err) {
|
|
57
|
+
setError(labels.machinesError(machinesError("layer", err)));
|
|
58
|
+
} finally {
|
|
59
|
+
setBusy(false);
|
|
60
|
+
read();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const close = () => setEditing(null);
|
|
64
|
+
if (!state) return error ? /* @__PURE__ */ jsx(ErrorNote, {
|
|
65
|
+
className,
|
|
66
|
+
style,
|
|
67
|
+
children: error
|
|
68
|
+
}) : null;
|
|
69
|
+
const add = (label, next) => editing === null ? /* @__PURE__ */ jsx("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
className: BTN_SECONDARY,
|
|
72
|
+
onClick: () => setEditing(next),
|
|
73
|
+
children: label
|
|
74
|
+
}) : void 0;
|
|
75
|
+
const row = (id, icon, label, description, items) => /* @__PURE__ */ jsxs("div", {
|
|
76
|
+
role: "listitem",
|
|
77
|
+
className: ROW_CLASS,
|
|
78
|
+
"data-testid": `layer-${id}`,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx(HostIcon, { icon }),
|
|
81
|
+
/* @__PURE__ */ jsx(RowText, {
|
|
82
|
+
label,
|
|
83
|
+
...description ? { description } : {}
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx(RowMenuButton, {
|
|
86
|
+
label: labels.machinesLayerRowActions(label),
|
|
87
|
+
items
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}, id);
|
|
91
|
+
/** Remove, after asking: what the user keeps here goes for every session they own. */
|
|
92
|
+
const remove = (name, action) => ({
|
|
93
|
+
id: "remove",
|
|
94
|
+
label: labels.machinesRemove,
|
|
95
|
+
icon: "i-ph-trash",
|
|
96
|
+
destructive: true,
|
|
97
|
+
onSelect: () => void ask({
|
|
98
|
+
title: labels.machinesLayerRemoveTitle(name),
|
|
99
|
+
message: labels.machinesLayerRemoveMessage,
|
|
100
|
+
confirmLabel: labels.machinesRemove,
|
|
101
|
+
destructive: true
|
|
102
|
+
}).then((ok) => {
|
|
103
|
+
if (ok) act(action);
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
const empty = (text) => /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: ROW_CLASS,
|
|
108
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
109
|
+
className: "text-xs text-[var(--zg-text-muted)]",
|
|
110
|
+
children: text
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
114
|
+
className: `space-y-5 ${className}`.trimEnd(),
|
|
115
|
+
style,
|
|
116
|
+
"data-testid": `layer-${host.id}`,
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsxs("div", {
|
|
119
|
+
className: "px-4 space-y-1",
|
|
120
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
121
|
+
className: "m-0 text-sm font-semibold text-[var(--zg-text)]",
|
|
122
|
+
children: labels.machinesLayerTitle
|
|
123
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
124
|
+
className: "m-0 text-xs text-[var(--zg-text-muted)]",
|
|
125
|
+
children: labels.machinesLayerHint
|
|
126
|
+
})]
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ jsxs(FormSection, {
|
|
129
|
+
title: labels.machinesLayerKeys,
|
|
130
|
+
trailing: add(labels.machinesLayerAddKey, { kind: "key" }),
|
|
131
|
+
children: [
|
|
132
|
+
editing?.kind === "key" && /* @__PURE__ */ jsx(LayerForm, {
|
|
133
|
+
busy,
|
|
134
|
+
fields: [{
|
|
135
|
+
id: "provider",
|
|
136
|
+
label: labels.machinesLayerProvider,
|
|
137
|
+
placeholder: labels.machinesLayerProviderPlaceholder
|
|
138
|
+
}, {
|
|
139
|
+
id: "key",
|
|
140
|
+
label: labels.machinesLayerKey,
|
|
141
|
+
secret: true
|
|
142
|
+
}],
|
|
143
|
+
onCancel: close,
|
|
144
|
+
onSubmit: (v) => void act(() => layer.setApiKey(host.id, v.provider, v.key), close)
|
|
145
|
+
}),
|
|
146
|
+
state.apiKeys.length === 0 && editing?.kind !== "key" && empty(labels.machinesLayerKeysEmpty),
|
|
147
|
+
/* @__PURE__ */ jsx("div", {
|
|
148
|
+
role: "list",
|
|
149
|
+
"aria-label": labels.machinesLayerKeys,
|
|
150
|
+
className: "contents",
|
|
151
|
+
children: state.apiKeys.map((provider) => row(`key-${provider}`, "i-ph-key", provider, void 0, [remove(provider, () => layer.removeApiKey(host.id, provider))]))
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsxs(FormSection, {
|
|
156
|
+
title: labels.machinesLayerMcp,
|
|
157
|
+
trailing: add(labels.machinesLayerAddMcp, { kind: "mcp" }),
|
|
158
|
+
children: [
|
|
159
|
+
editing?.kind === "mcp" && /* @__PURE__ */ jsx(LayerForm, {
|
|
160
|
+
busy,
|
|
161
|
+
fields: [{
|
|
162
|
+
id: "name",
|
|
163
|
+
label: labels.machinesLayerMcpName
|
|
164
|
+
}, {
|
|
165
|
+
id: "url",
|
|
166
|
+
label: labels.machinesLayerMcpUrl,
|
|
167
|
+
placeholder: labels.machinesLayerMcpUrlPlaceholder
|
|
168
|
+
}],
|
|
169
|
+
onCancel: close,
|
|
170
|
+
onSubmit: (v) => void act(() => layer.addMcpServer(host.id, {
|
|
171
|
+
name: v.name,
|
|
172
|
+
url: v.url
|
|
173
|
+
}), close)
|
|
174
|
+
}),
|
|
175
|
+
state.mcpServers.length === 0 && editing?.kind !== "mcp" && empty(labels.machinesLayerMcpEmpty),
|
|
176
|
+
/* @__PURE__ */ jsx("div", {
|
|
177
|
+
role: "list",
|
|
178
|
+
"aria-label": labels.machinesLayerMcp,
|
|
179
|
+
className: "contents",
|
|
180
|
+
children: state.mcpServers.map((server) => row(`mcp-${server.name}`, "i-ph-plugs-connected", server.name, server.url, [
|
|
181
|
+
...signIn && server.url ? [{
|
|
182
|
+
id: "sign-in",
|
|
183
|
+
label: labels.machinesLayerSignIn,
|
|
184
|
+
icon: "i-ph-sign-in",
|
|
185
|
+
onSelect: () => setEditing({
|
|
186
|
+
kind: "sign-in",
|
|
187
|
+
name: server.name
|
|
188
|
+
})
|
|
189
|
+
}] : [],
|
|
190
|
+
...server.url ? [{
|
|
191
|
+
id: "sign-out",
|
|
192
|
+
label: labels.machinesLayerSignOut,
|
|
193
|
+
icon: "i-ph-sign-out",
|
|
194
|
+
onSelect: () => void act(() => layer.signOutMcp(host.id, server.name))
|
|
195
|
+
}] : [],
|
|
196
|
+
remove(server.name, () => layer.removeMcpServer(host.id, server.name))
|
|
197
|
+
]))
|
|
198
|
+
}),
|
|
199
|
+
editing?.kind === "sign-in" && /* @__PURE__ */ jsx(HostSignIn, {
|
|
200
|
+
hostId: host.id,
|
|
201
|
+
hostName: host.name,
|
|
202
|
+
target: { mcpServer: editing.name },
|
|
203
|
+
label: editing.name,
|
|
204
|
+
onClose: close
|
|
205
|
+
})
|
|
206
|
+
]
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ jsxs(FormSection, {
|
|
209
|
+
title: labels.machinesLayerSkills,
|
|
210
|
+
trailing: add(labels.machinesLayerAddSkill, { kind: "skill" }),
|
|
211
|
+
children: [
|
|
212
|
+
editing?.kind === "skill" && /* @__PURE__ */ jsx(LayerForm, {
|
|
213
|
+
busy,
|
|
214
|
+
initial: {
|
|
215
|
+
name: editing.name ?? "",
|
|
216
|
+
contents: editing.contents ?? ""
|
|
217
|
+
},
|
|
218
|
+
fields: [{
|
|
219
|
+
id: "name",
|
|
220
|
+
label: labels.machinesLayerSkillName,
|
|
221
|
+
placeholder: labels.machinesLayerSkillNamePlaceholder,
|
|
222
|
+
locked: editing.name !== void 0
|
|
223
|
+
}, {
|
|
224
|
+
id: "contents",
|
|
225
|
+
label: labels.machinesLayerSkillContents,
|
|
226
|
+
multiline: true
|
|
227
|
+
}],
|
|
228
|
+
onCancel: close,
|
|
229
|
+
onSubmit: (v) => void act(() => layer.setSkill(host.id, v.name, v.contents), close)
|
|
230
|
+
}),
|
|
231
|
+
state.skills.length === 0 && editing?.kind !== "skill" && empty(labels.machinesLayerSkillsEmpty),
|
|
232
|
+
/* @__PURE__ */ jsx("div", {
|
|
233
|
+
role: "list",
|
|
234
|
+
"aria-label": labels.machinesLayerSkills,
|
|
235
|
+
className: "contents",
|
|
236
|
+
children: state.skills.map((name) => row(`skill-${name}`, "i-ph-book-open", name, void 0, [{
|
|
237
|
+
id: "edit",
|
|
238
|
+
label: labels.machinesLayerEdit,
|
|
239
|
+
icon: "i-ph-pencil-simple",
|
|
240
|
+
onSelect: () => void act(async () => setEditing({
|
|
241
|
+
kind: "skill",
|
|
242
|
+
name,
|
|
243
|
+
contents: await layer.readSkill(host.id, name) ?? ""
|
|
244
|
+
}))
|
|
245
|
+
}, remove(name, () => layer.removeSkill(host.id, name))]))
|
|
246
|
+
})
|
|
247
|
+
]
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ jsx(FormSection, {
|
|
250
|
+
title: labels.machinesLayerSystemMd,
|
|
251
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
252
|
+
className: "px-3 py-2 space-y-2",
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ jsx("p", {
|
|
255
|
+
className: "m-0 text-xs text-[var(--zg-text-muted)]",
|
|
256
|
+
children: state.systemMd === null ? labels.machinesLayerSystemMdUnset : labels.machinesLayerSystemMdHint
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ jsx("textarea", {
|
|
259
|
+
"aria-label": labels.machinesLayerSystemMd,
|
|
260
|
+
className: `${TEXTAREA_CLASS} w-full min-h-32`,
|
|
261
|
+
value: systemMd,
|
|
262
|
+
onChange: (event) => setSystemMd(event.target.value)
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsxs("div", {
|
|
265
|
+
className: "flex justify-end gap-2",
|
|
266
|
+
children: [state.systemMd !== null && /* @__PURE__ */ jsx("button", {
|
|
267
|
+
type: "button",
|
|
268
|
+
className: buttonClass({
|
|
269
|
+
variant: "ghost",
|
|
270
|
+
size: "sm"
|
|
271
|
+
}),
|
|
272
|
+
disabled: busy,
|
|
273
|
+
onClick: () => void ask({
|
|
274
|
+
title: labels.machinesLayerRemoveTitle(labels.machinesLayerSystemMd),
|
|
275
|
+
message: labels.machinesLayerRemoveMessage,
|
|
276
|
+
confirmLabel: labels.machinesRemove,
|
|
277
|
+
destructive: true
|
|
278
|
+
}).then((ok) => {
|
|
279
|
+
if (ok) act(() => layer.setSystemMd(host.id, null));
|
|
280
|
+
}),
|
|
281
|
+
children: labels.machinesRemove
|
|
282
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
283
|
+
type: "button",
|
|
284
|
+
className: BTN_PRIMARY,
|
|
285
|
+
disabled: busy || systemMd === (state.systemMd ?? "") || !systemMd.trim(),
|
|
286
|
+
onClick: () => void act(() => layer.setSystemMd(host.id, systemMd)),
|
|
287
|
+
children: busy ? labels.machinesLayerSaving : labels.machinesSave
|
|
288
|
+
})]
|
|
289
|
+
})
|
|
290
|
+
]
|
|
291
|
+
})
|
|
292
|
+
}),
|
|
293
|
+
error && /* @__PURE__ */ jsx(ErrorNote, {
|
|
294
|
+
className: "mx-3",
|
|
295
|
+
children: error
|
|
296
|
+
})
|
|
297
|
+
]
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/** An inline form: its fields, Cancel and Save (every field filled). */
|
|
301
|
+
function LayerForm({ fields, initial, busy, onSubmit, onCancel }) {
|
|
302
|
+
const labels = useMachinesLabels();
|
|
303
|
+
const [values, setValues] = useState(() => ({
|
|
304
|
+
...Object.fromEntries(fields.map((f) => [f.id, ""])),
|
|
305
|
+
...initial
|
|
306
|
+
}));
|
|
307
|
+
const filled = fields.every((f) => values[f.id]?.trim());
|
|
308
|
+
return /* @__PURE__ */ jsxs("form", {
|
|
309
|
+
className: "px-3 py-2 space-y-2",
|
|
310
|
+
onSubmit: (event) => {
|
|
311
|
+
event.preventDefault();
|
|
312
|
+
if (filled) onSubmit(Object.fromEntries(Object.entries(values).map(([k, v]) => [k, k === "contents" ? v : v.trim()])));
|
|
313
|
+
},
|
|
314
|
+
children: [fields.map((field, index) => {
|
|
315
|
+
const common = {
|
|
316
|
+
"aria-label": field.label,
|
|
317
|
+
"value": values[field.id] ?? "",
|
|
318
|
+
"onChange": (event) => setValues((v) => ({
|
|
319
|
+
...v,
|
|
320
|
+
[field.id]: event.target.value
|
|
321
|
+
})),
|
|
322
|
+
"onKeyDown": (event) => {
|
|
323
|
+
if (event.key === "Escape") {
|
|
324
|
+
event.stopPropagation();
|
|
325
|
+
onCancel();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
return field.multiline ? /* @__PURE__ */ jsx("textarea", {
|
|
330
|
+
className: `${TEXTAREA_CLASS} w-full min-h-32`,
|
|
331
|
+
...common
|
|
332
|
+
}, field.id) : /* @__PURE__ */ jsx("input", {
|
|
333
|
+
className: `${INPUT_CLASS} w-full`,
|
|
334
|
+
type: field.secret ? "password" : "text",
|
|
335
|
+
autoComplete: "off",
|
|
336
|
+
readOnly: field.locked,
|
|
337
|
+
placeholder: field.placeholder ?? field.label,
|
|
338
|
+
autoFocus: index === 0 && !field.locked,
|
|
339
|
+
...common
|
|
340
|
+
}, field.id);
|
|
341
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
342
|
+
className: "flex justify-end gap-2",
|
|
343
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
344
|
+
type: "button",
|
|
345
|
+
className: buttonClass({
|
|
346
|
+
variant: "ghost",
|
|
347
|
+
size: "sm"
|
|
348
|
+
}),
|
|
349
|
+
onClick: onCancel,
|
|
350
|
+
children: labels.machinesCancel
|
|
351
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
352
|
+
type: "submit",
|
|
353
|
+
className: BTN_PRIMARY,
|
|
354
|
+
disabled: busy || !filled,
|
|
355
|
+
children: busy ? labels.machinesLayerSaving : labels.machinesSave
|
|
356
|
+
})]
|
|
357
|
+
})]
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
export { PersonalLayerPanel };
|
|
@@ -22,6 +22,16 @@ export interface FixtureMachinesOptions {
|
|
|
22
22
|
updates?: Readonly<Record<string, ServerUpdateStatus | null>>;
|
|
23
23
|
/** Each server's tokens, by host id. Default: none. */
|
|
24
24
|
tokens?: Readonly<Record<string, readonly ServerToken[]>>;
|
|
25
|
+
/** The signed-in user's layer on each server in organization mode, by host id; a server not listed does not sign its users in. Absent: no \`layer\`. */
|
|
26
|
+
layers?: Readonly<Record<string, {
|
|
27
|
+
apiKeys?: readonly string[];
|
|
28
|
+
mcpServers?: readonly {
|
|
29
|
+
name: string;
|
|
30
|
+
url?: string;
|
|
31
|
+
}[];
|
|
32
|
+
systemMd?: string | null;
|
|
33
|
+
skills?: Readonly<Record<string, string>>;
|
|
34
|
+
}>>;
|
|
25
35
|
/** The local daemon's status, or `false` for no daemon. Default: no daemon. */
|
|
26
36
|
daemon?: DaemonStatus | false;
|
|
27
37
|
/** The daemon's health. Default: `connected`. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { writable } from "../../chat/headless/store.js";
|
|
2
2
|
import { machinesError } from "./host.js";
|
|
3
|
+
import { serverLayerOver } from "./layer.js";
|
|
3
4
|
import { createPresenceStore } from "./presence.js";
|
|
4
5
|
import { createMachineLists, createOnlineMachines } from "./stores.js";
|
|
5
6
|
import { createHostSyncReads } from "./sync.js";
|
|
@@ -28,6 +29,48 @@ function hostnameOf(url) {
|
|
|
28
29
|
return url;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
/** The \`layer\` member over an in-memory server that answers \`me.*\` as zidane-server does. */
|
|
33
|
+
function fixtureLayer(seed) {
|
|
34
|
+
const layers = new Map(Object.entries(seed).map(([id, l]) => [id, {
|
|
35
|
+
apiKeys: new Set(l.apiKeys ?? []),
|
|
36
|
+
mcpServers: new Map((l.mcpServers ?? []).map((s) => [s.name, s])),
|
|
37
|
+
systemMd: l.systemMd ?? null,
|
|
38
|
+
skills: new Map(Object.entries(l.skills ?? {}))
|
|
39
|
+
}]));
|
|
40
|
+
return serverLayerOver(async (hostId, method, p) => {
|
|
41
|
+
const l = layers.get(hostId);
|
|
42
|
+
if (!l) return { signedIn: false };
|
|
43
|
+
const answer = {
|
|
44
|
+
"me.apiKeys": () => [...l.apiKeys].map((provider) => ({ provider })),
|
|
45
|
+
"me.setApiKey": () => l.apiKeys.add(p.provider),
|
|
46
|
+
"me.removeApiKey": () => l.apiKeys.delete(p.provider),
|
|
47
|
+
"me.mcpServers": () => [...l.mcpServers.values()],
|
|
48
|
+
"me.upsertMcpServer": () => {
|
|
49
|
+
const config = p.config;
|
|
50
|
+
l.mcpServers.set(config.name, {
|
|
51
|
+
name: config.name,
|
|
52
|
+
...config.url ? { url: config.url } : {}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
"me.removeMcpServer": () => l.mcpServers.delete(p.name),
|
|
56
|
+
"me.mcpSignOut": () => void 0,
|
|
57
|
+
"me.systemMd": () => ({ contents: l.systemMd }),
|
|
58
|
+
"me.setSystemMd": () => {
|
|
59
|
+
l.systemMd = p.contents;
|
|
60
|
+
},
|
|
61
|
+
"me.skills": () => [...l.skills.keys()].sort().map((name) => ({ name })),
|
|
62
|
+
"me.skill": () => ({ contents: l.skills.get(p.name) ?? null }),
|
|
63
|
+
"me.setSkill": () => l.skills.set(p.name, p.contents),
|
|
64
|
+
"me.removeSkill": () => l.skills.delete(p.name)
|
|
65
|
+
}[method];
|
|
66
|
+
if (!answer) throw new Error(`unknown method ${method}`);
|
|
67
|
+
const result = answer();
|
|
68
|
+
return {
|
|
69
|
+
signedIn: true,
|
|
70
|
+
result: method.startsWith("me.set") || method.startsWith("me.remove") || method === "me.upsertMcpServer" ? void 0 : result
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}
|
|
31
74
|
/**
|
|
32
75
|
* Creates a {@link MachinesHost} held in memory.
|
|
33
76
|
*
|
|
@@ -401,6 +444,7 @@ function createFixtureMachinesHost(options = {}) {
|
|
|
401
444
|
} : token));
|
|
402
445
|
}
|
|
403
446
|
},
|
|
447
|
+
...options.layers ? { layer: fixtureLayer(options.layers) } : {},
|
|
404
448
|
...daemonStatus ? { daemon: {
|
|
405
449
|
health,
|
|
406
450
|
status: async () => daemonStatus,
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
import { HostView } from "../../chat/headless/hosts.js";
|
|
19
19
|
import { Readable } from "../../chat/headless/store.js";
|
|
20
20
|
import { SignInFlow } from "../../onboarding/headless/host.js";
|
|
21
|
+
import { ServerLayer } from "./layer.js";
|
|
22
|
+
import { ServerOrganization } from "./organization.js";
|
|
21
23
|
import { MachinesPresence } from "./presence.js";
|
|
22
24
|
import { HostSyncPatch, HostSyncRead, HostSyncState, SyncStatus } from "./sync.js";
|
|
23
25
|
import { DaemonHealth, HostCapabilities, MachineInfo, MachineJoinEvent, MachineLinksStatus, ServerUpdateStatus } from "zidane/chat/pure";
|
|
@@ -70,7 +72,7 @@ export type MachineActionResult = {
|
|
|
70
72
|
/** What went wrong, for the UI to word through its labels. `detail` is the backend's own message. */
|
|
71
73
|
export interface MachinesError {
|
|
72
74
|
/** Which action failed. */
|
|
73
|
-
kind: 'read' | 'update' | 'forget' | 'remove' | 'tokens' | 'daemon' | 'sync' | 'invite' | 'install';
|
|
75
|
+
kind: 'read' | 'update' | 'forget' | 'remove' | 'tokens' | 'daemon' | 'sync' | 'invite' | 'install' | 'layer' | 'people';
|
|
74
76
|
/** The backend's message, shown as is by the default labels. */
|
|
75
77
|
detail: string;
|
|
76
78
|
}
|
|
@@ -326,6 +328,20 @@ export interface MachinesHost {
|
|
|
326
328
|
token: string;
|
|
327
329
|
name?: string;
|
|
328
330
|
}) => Promise<HostCheckResult>;
|
|
331
|
+
/**
|
|
332
|
+
* Sign in to an organization's server with Google instead of a token (docs/IDENTITY.md):
|
|
333
|
+
* `onCode` shows the code and the link while the person signs in, then the server is saved like
|
|
334
|
+
* {@link MachinesHost.addHost}. Absent: no "Sign in with Google".
|
|
335
|
+
*/
|
|
336
|
+
signInToServer?: (input: {
|
|
337
|
+
url: string;
|
|
338
|
+
name?: string;
|
|
339
|
+
}, onCode: (code: {
|
|
340
|
+
userCode: string;
|
|
341
|
+
verificationUrl: string;
|
|
342
|
+
}) => void, signal?: AbortSignal) => Promise<HostCheckResult>;
|
|
343
|
+
/** Whether the server at `url` signs its users in with Google, before the add form offers it. Absent: "Sign in with Google" shows whenever `signInToServer` is there. */
|
|
344
|
+
serverSignsIn?: (url: string) => Promise<boolean>;
|
|
329
345
|
/** Renames a saved server. Absent: no Rename. */
|
|
330
346
|
renameHost?: (id: string, name: string) => Promise<HostCheckResult>;
|
|
331
347
|
/** Moves a saved server to a new URL with its saved token, once the same server answers there. Absent: no Change URL. */
|
|
@@ -356,6 +372,10 @@ export interface MachinesHost {
|
|
|
356
372
|
updates?: ServerUpdates;
|
|
357
373
|
/** A server's client tokens. Absent: no token list. */
|
|
358
374
|
tokens?: ServerTokens;
|
|
375
|
+
/** What the signed-in user keeps for themselves on a server in organization mode. Absent: no "Yours on this server". */
|
|
376
|
+
layer?: ServerLayer;
|
|
377
|
+
/** A server's organization mode: who you are, whether it shares, its people for an admin. Absent: no People section. */
|
|
378
|
+
organization?: ServerOrganization;
|
|
359
379
|
/** The local daemon. Absent: no daemon menu. */
|
|
360
380
|
daemon?: DaemonControl;
|
|
361
381
|
/**
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { BrowserPairing, DaemonControl, DaemonHealth, DaemonStatus, HostCapabilities, HostCheckError, HostCheckResult, HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostsState, MachineActionResult, MachineInfo, MachineInvite, MachineJoinEvent, MachineLinks, MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, ServerUpdateStatus, ServerUpdates, ToolInstallResult, isMachinesError, isPermitted, machinesError } from "./host.js";
|
|
8
8
|
import { DEFAULT_MACHINES_LABELS, MACHINES_SYNC_LIST_LABELS, MachinesLabels } from "./labels.js";
|
|
9
|
+
import { LayerCall, PersonalLayer, ServerLayer, serverLayerOver } from "./layer.js";
|
|
9
10
|
import { MachinesTone, UPDATE_BUSY_STATES, agoText, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostStatusText, hostStatusTone, linkStateText, updateStateLine, uptimeText } from "./messages.js";
|
|
11
|
+
import { OrgUserView, OrganizationStatus, ServerOrganization, organizationStatusOf, serverOrganizationOver } from "./organization.js";
|
|
10
12
|
import { MachinesPresence, PresenceFeed, SessionPresence, createPresenceStore } from "./presence.js";
|
|
11
13
|
import { hostOfSettingsFocus, hostSettingsFocus } from "./settings-focus.js";
|
|
12
14
|
import { LazyReadableOptions, LazySink, createMachineLists, createOnlineMachines, lazyReadable, machinesByHost } from "./stores.js";
|
|
13
15
|
import { HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, SyncBlockedReason, SyncCategory, SyncMode, SyncOutcome, SyncPushResult, SyncStatus, createHostSyncReads, shortList, syncBlockedReason, syncOutcome } from "./sync.js";
|
|
14
16
|
import { ServerUpdateState, ServerUpdateStore, UPDATE_POLL_MS, serverUpdateStore } from "./update-store.js";
|
|
15
|
-
export { BrowserPairing, DEFAULT_MACHINES_LABELS, DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, HostsState, LazyReadableOptions, LazySink, MACHINES_SYNC_LIST_LABELS, MachineActionResult, type MachineInfo, MachineInvite, type MachineJoinEvent, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, MachinesLabels, MachinesPresence, MachinesTone, PresenceFeed, SavedHosts, SavedHostsState, ServerToken, ServerTokenScope, ServerTokens, ServerUpdateState, type ServerUpdateStatus, ServerUpdateStore, ServerUpdates, SessionPresence, SyncBlockedReason, type SyncCategory, type SyncMode, SyncOutcome, type SyncPushResult, type SyncStatus, ToolInstallResult, UPDATE_BUSY_STATES, UPDATE_POLL_MS, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesByHost, machinesError, serverUpdateStore, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
17
|
+
export { BrowserPairing, DEFAULT_MACHINES_LABELS, DaemonControl, type DaemonHealth, DaemonStatus, type HostCapabilities, HostCheckError, HostCheckResult, type HostProviderAuth, HostSignInTarget, HostSummary, HostSync, HostSyncAccount, HostSyncConfig, HostSyncPatch, HostSyncRead, HostSyncState, HostsState, LayerCall, LazyReadableOptions, LazySink, MACHINES_SYNC_LIST_LABELS, MachineActionResult, type MachineInfo, MachineInvite, type MachineJoinEvent, MachineLinks, type MachineLinksStatus, MachineList, MachineListState, MachinesAction, MachinesDirectory, MachinesError, MachinesHost, MachinesLabels, MachinesPresence, MachinesTone, type OrgUserView, type OrganizationStatus, PersonalLayer, PresenceFeed, SavedHosts, SavedHostsState, ServerLayer, ServerOrganization, ServerToken, ServerTokenScope, ServerTokens, ServerUpdateState, type ServerUpdateStatus, ServerUpdateStore, ServerUpdates, SessionPresence, SyncBlockedReason, type SyncCategory, type SyncMode, SyncOutcome, type SyncPushResult, type SyncStatus, ToolInstallResult, UPDATE_BUSY_STATES, UPDATE_POLL_MS, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesByHost, machinesError, organizationStatusOf, serverLayerOver, serverOrganizationOver, serverUpdateStore, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { isMachinesError, isPermitted, machinesError } from "./host.js";
|
|
2
2
|
import { DEFAULT_MACHINES_LABELS, MACHINES_SYNC_LIST_LABELS } from "./labels.js";
|
|
3
|
+
import { serverLayerOver } from "./layer.js";
|
|
3
4
|
import { UPDATE_BUSY_STATES, agoText, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostStatusText, hostStatusTone, linkStateText, updateStateLine, uptimeText } from "./messages.js";
|
|
5
|
+
import { organizationStatusOf, serverOrganizationOver } from "./organization.js";
|
|
4
6
|
import { createPresenceStore } from "./presence.js";
|
|
5
7
|
import { hostOfSettingsFocus, hostSettingsFocus } from "./settings-focus.js";
|
|
6
8
|
import { createMachineLists, createOnlineMachines, lazyReadable, machinesByHost } from "./stores.js";
|
|
7
9
|
import { createHostSyncReads, shortList, syncBlockedReason, syncOutcome } from "./sync.js";
|
|
8
10
|
import { UPDATE_POLL_MS, serverUpdateStore } from "./update-store.js";
|
|
9
|
-
export { DEFAULT_MACHINES_LABELS, MACHINES_SYNC_LIST_LABELS, UPDATE_BUSY_STATES, UPDATE_POLL_MS, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesByHost, machinesError, serverUpdateStore, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
11
|
+
export { DEFAULT_MACHINES_LABELS, MACHINES_SYNC_LIST_LABELS, UPDATE_BUSY_STATES, UPDATE_POLL_MS, agoText, createHostSyncReads, createMachineLists, createOnlineMachines, createPresenceStore, daemonStatusText, hostCheckMessage, hostCheckOkLine, hostOfSettingsFocus, hostSettingsFocus, hostStatusText, hostStatusTone, isMachinesError, isPermitted, lazyReadable, linkStateText, machinesByHost, machinesError, organizationStatusOf, serverLayerOver, serverOrganizationOver, serverUpdateStore, shortList, syncBlockedReason, syncOutcome, updateStateLine, uptimeText };
|
|
@@ -56,6 +56,9 @@ export declare const DEFAULT_MACHINES_LABELS: {
|
|
|
56
56
|
machinesHostName: string;
|
|
57
57
|
machinesTest: string;
|
|
58
58
|
machinesTesting: string;
|
|
59
|
+
machinesSignInGoogle: string;
|
|
60
|
+
machinesSigningIn: string;
|
|
61
|
+
machinesSignInCode: (code: string) => string;
|
|
59
62
|
machinesRename: string;
|
|
60
63
|
machinesRenaming: string;
|
|
61
64
|
machinesHostActions: (name: string) => string;
|
|
@@ -160,6 +163,7 @@ export declare const DEFAULT_MACHINES_LABELS: {
|
|
|
160
163
|
machinesPlaceAddServer: (name: string) => string;
|
|
161
164
|
machinesPlaceMachineGone: (machine: string, host: string) => string;
|
|
162
165
|
machinesPlaceFolderGone: (folder: string) => string;
|
|
166
|
+
machinesPlaceUnavailable: (label: string, reason: string | undefined, fallback: string) => string;
|
|
163
167
|
machinesNewChatLabel: (name: string) => string;
|
|
164
168
|
machinesFoldersMore: (count: number) => string;
|
|
165
169
|
machinesStatus: (status: "online" | "offline") => "offline" | "online";
|
|
@@ -244,6 +248,57 @@ export declare const DEFAULT_MACHINES_LABELS: {
|
|
|
244
248
|
machinesTokensCancel: string;
|
|
245
249
|
/** The folded row under the live tokens. */
|
|
246
250
|
machinesTokensInactive: (count: number) => string;
|
|
251
|
+
machinesPeopleTitle: string;
|
|
252
|
+
machinesPeopleOff: string;
|
|
253
|
+
machinesPeopleTurnOn: string;
|
|
254
|
+
machinesPeopleYou: (email: string, role: "admin" | "user") => string;
|
|
255
|
+
machinesPeopleSharingOn: string;
|
|
256
|
+
machinesPeopleSharingOff: string;
|
|
257
|
+
machinesPeopleAdd: string;
|
|
258
|
+
machinesPeopleEmail: string;
|
|
259
|
+
machinesPeopleAdmin: string;
|
|
260
|
+
machinesPeopleDisabled: string;
|
|
261
|
+
machinesPeopleYouChip: string;
|
|
262
|
+
machinesPeopleRowActions: (email: string) => string;
|
|
263
|
+
machinesPeopleMakeAdmin: string;
|
|
264
|
+
machinesPeopleMakeUser: string;
|
|
265
|
+
machinesPeopleDisable: string;
|
|
266
|
+
machinesPeopleEnable: string;
|
|
267
|
+
machinesPeopleRemoveTitle: (email: string) => string;
|
|
268
|
+
machinesPeopleRemoveMessage: string;
|
|
269
|
+
machinesPeopleDisableTitle: (email: string) => string;
|
|
270
|
+
machinesPeopleDisableMessage: string;
|
|
271
|
+
machinesPeopleRemoved: (sessions: number) => string;
|
|
272
|
+
machinesLayerTitle: string;
|
|
273
|
+
machinesLayerHint: string;
|
|
274
|
+
machinesLayerKeys: string;
|
|
275
|
+
machinesLayerKeysEmpty: string;
|
|
276
|
+
machinesLayerAddKey: string;
|
|
277
|
+
machinesLayerProvider: string;
|
|
278
|
+
machinesLayerProviderPlaceholder: string;
|
|
279
|
+
machinesLayerKey: string;
|
|
280
|
+
machinesLayerMcp: string;
|
|
281
|
+
machinesLayerMcpEmpty: string;
|
|
282
|
+
machinesLayerAddMcp: string;
|
|
283
|
+
machinesLayerMcpName: string;
|
|
284
|
+
machinesLayerMcpUrl: string;
|
|
285
|
+
machinesLayerMcpUrlPlaceholder: string;
|
|
286
|
+
machinesLayerSkills: string;
|
|
287
|
+
machinesLayerSkillsEmpty: string;
|
|
288
|
+
machinesLayerAddSkill: string;
|
|
289
|
+
machinesLayerSkillName: string;
|
|
290
|
+
machinesLayerSkillNamePlaceholder: string;
|
|
291
|
+
machinesLayerSkillContents: string;
|
|
292
|
+
machinesLayerEdit: string;
|
|
293
|
+
machinesLayerSignIn: string;
|
|
294
|
+
machinesLayerSignOut: string;
|
|
295
|
+
machinesLayerSystemMd: string;
|
|
296
|
+
machinesLayerSystemMdHint: string;
|
|
297
|
+
machinesLayerSystemMdUnset: string;
|
|
298
|
+
machinesLayerSaving: string;
|
|
299
|
+
machinesLayerRowActions: (name: string) => string;
|
|
300
|
+
machinesLayerRemoveTitle: (name: string) => string;
|
|
301
|
+
machinesLayerRemoveMessage: string;
|
|
247
302
|
machinesDaemonMenu: (health: string) => string;
|
|
248
303
|
machinesDaemon: string;
|
|
249
304
|
machinesDaemonOff: string;
|