@fungi.computer/tourtois 0.12.17 → 0.12.19

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/AppPane.js CHANGED
@@ -7,7 +7,8 @@ import { AppStatusBar, AppStatusItem, StatusBarChip, StatusBarPicker, } from "@f
7
7
  import { Sigil } from "@fungi.computer/sigils";
8
8
  import { describeAppError } from "@fungi.computer/agar/errors";
9
9
  import { WindowActions, WindowBody, WindowFrame, WindowHeader, } from "@fungi.computer/caps/components/window";
10
- import { Settings, ShieldCheck } from "lucide-react";
10
+ import { Ellipsis, Settings, ShieldCheck } from "lucide-react";
11
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@fungi.computer/caps/components/dropdown-menu";
11
12
  import { WindowStatusItem } from "./status-bar.js";
12
13
  import { useLayer, useMaosaicoItem, useMaosaicoLayout, } from "@fungi.computer/maosaico";
13
14
  import { AppError, } from "@fungi.computer/agar";
@@ -22,11 +23,15 @@ import { launchComputerId } from "./app-launch.js";
22
23
  * The App's own path, commands and state, when it publishes them; an App
23
24
  * that publishes none keeps the title and subtitle in its header.
24
25
  */
25
- function headerContent(navigation, popover, activate) {
26
+ function headerContent(navigation, popover, activate, phone) {
26
27
  if (navigation?.crumbs === undefined || navigation.crumbs.length === 0)
27
28
  return {};
28
29
  let content = {
29
- crumbs: navigation.crumbs,
30
+ // Long App paths conventionally start with the App and Item, then view
31
+ // and version. Keep the Item and current place; the menu retains the rest.
32
+ crumbs: phone && navigation.crumbs.length > 3
33
+ ? [...navigation.crumbs.slice(1, 2), ...navigation.crumbs.slice(-1)]
34
+ : navigation.crumbs,
30
35
  popover,
31
36
  onCrumb: (crumbId, siblingId) => {
32
37
  activate(siblingId === undefined
@@ -38,13 +43,38 @@ function headerContent(navigation, popover, activate) {
38
43
  },
39
44
  };
40
45
  if (navigation.primary !== undefined)
41
- content = { ...content, primary: navigation.primary };
42
- if (navigation.menu !== undefined)
46
+ content = {
47
+ ...content,
48
+ primary: phone
49
+ ? navigation.primary.slice(0, 1).map((command) => {
50
+ const labelled = { ...command };
51
+ delete labelled.icon;
52
+ return labelled;
53
+ })
54
+ : navigation.primary,
55
+ };
56
+ if (!phone && navigation.menu !== undefined)
43
57
  content = { ...content, menu: navigation.menu };
44
58
  if (navigation.status !== undefined)
45
59
  content = { ...content, status: navigation.status };
46
60
  return content;
47
61
  }
62
+ /** The shell's phone breakpoint also selects its compact command presentation. */
63
+ function usePhone() {
64
+ const [phone, setPhone] = useState(false);
65
+ useEffect(() => {
66
+ const media = window.matchMedia("(max-width: 640px)");
67
+ const update = () => {
68
+ setPhone(media.matches);
69
+ };
70
+ update();
71
+ media.addEventListener("change", update);
72
+ return () => {
73
+ media.removeEventListener("change", update);
74
+ };
75
+ }, []);
76
+ return phone;
77
+ }
48
78
  /** The focused window's App-level settings; its Computer lives in its status bar. */
49
79
  export function FocusedWindowControls({ app, onOpenSettings, onOpenPermissions, projection, }) {
50
80
  if (!app)
@@ -61,7 +91,38 @@ function WindowFailure({ projection, onReopen, }) {
61
91
  window.location.reload();
62
92
  }, children: "Reload workspace" })] }) }));
63
93
  }
94
+ /** Places folded out of a phone's trail stay available in the same menu. */
95
+ function PhonePathMenu({ crumbs, onAction, }) {
96
+ if (crumbs === undefined || crumbs.length <= 3)
97
+ return null;
98
+ return crumbs.flatMap((crumb, index) => index === 1 || index === crumbs.length - 1
99
+ ? []
100
+ : [
101
+ _jsx(DropdownMenuItem, { onSelect: () => {
102
+ onAction({ kind: "crumb", crumbId: crumb.id });
103
+ }, children: crumb.label }, `crumb:${crumb.id}`),
104
+ ...(crumb.siblings ?? []).map((sibling) => (_jsxs(DropdownMenuItem, { onSelect: () => {
105
+ onAction({
106
+ kind: "crumb",
107
+ crumbId: crumb.id,
108
+ siblingId: sibling.id,
109
+ });
110
+ }, children: [crumb.label, " \u00B7 ", sibling.label] }, `crumb:${crumb.id}:${sibling.id}`))),
111
+ ]);
112
+ }
113
+ /** One maintained command menu on phones; ordinary window keys on desktop. */
114
+ function AppWindowControls({ phone, navigation, onAction, popover, ...actions }) {
115
+ if (!phone)
116
+ return _jsx(WindowActions, { ...actions });
117
+ return (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { render: _jsx(IconButton, { icon: _jsx(Ellipsis, {}), "aria-label": `More for ${actions.title}` }) }), _jsxs(DropdownMenuContent, { align: "end", container: popover, children: [_jsx(PhonePathMenu, { crumbs: navigation?.crumbs, onAction: onAction }), [
118
+ ...(navigation?.primary?.slice(1) ?? []),
119
+ ...(navigation?.menu ?? []),
120
+ ].map((command) => (_jsx(DropdownMenuItem, { disabled: command.disabled === true, variant: command.tone === "destructive" ? "destructive" : "default", onSelect: () => {
121
+ onAction({ kind: "action", actionId: command.id });
122
+ }, children: command.label }, command.id))), actions.onPromote ? (_jsx(DropdownMenuItem, { onSelect: actions.onPromote, children: "Make main window" })) : null, _jsx(DropdownMenuItem, { onSelect: actions.onToggleMaximize, children: actions.maximized ? "Restore window" : "Maximize window" }), _jsx(DropdownMenuItem, { onSelect: actions.onMinimize, children: "Minimize window" }), _jsx(DropdownMenuItem, { variant: "destructive", onSelect: actions.onClose, children: "Close window" })] })] }));
123
+ }
64
124
  export function AppPane({ projection, nextLaunch, icon, manager, onError, index, focusWindow, afterHide, onBack, onSelectComputer, onChooseComputer, }) {
125
+ const phone = usePhone();
65
126
  const containerRef = useRef(null);
66
127
  const popover = useLayer("popover");
67
128
  const [computerPickerOpen, setComputerPickerOpen] = useState(false);
@@ -136,7 +197,7 @@ export function AppPane({ projection, nextLaunch, icon, manager, onError, index,
136
197
  return;
137
198
  event.preventDefault();
138
199
  onBack(projection.windowId);
139
- }, style: binding.stackingStyle, children: [_jsx(WindowHeader, { title: projection.launch.title, ...(projection.navigation?.title === undefined
200
+ }, style: binding.stackingStyle, children: [_jsx(WindowHeader, { title: projection.launch.title, "data-phone-compact": phone || undefined, ...(projection.navigation?.title === undefined
140
201
  ? {}
141
202
  : { subtitle: projection.navigation.title }), ...headerContent(projection.navigation, popover, (activation) => {
142
203
  void manager
@@ -145,7 +206,7 @@ export function AppPane({ projection, nextLaunch, icon, manager, onError, index,
145
206
  console.error("App workbench operation failed", cause);
146
207
  onError("App could not handle that action.");
147
208
  });
148
- }), density: layout.mode === "tiled" ? "compact" : "regular", icon: _jsx(AppIcon, { roles: projection.launch.roles, icon: icon }), ...(projection.navigation?.canGoBack === true
209
+ }, phone), density: layout.mode === "tiled" ? "compact" : "regular", icon: _jsx(AppIcon, { roles: projection.launch.roles, icon: icon }), ...(projection.navigation?.canGoBack === true
149
210
  ? {
150
211
  back: {
151
212
  label: `Back in ${projection.launch.title}`,
@@ -159,27 +220,34 @@ export function AppPane({ projection, nextLaunch, icon, manager, onError, index,
159
220
  ...binding.props,
160
221
  onClick: binding.focus,
161
222
  onDoubleClick: zoom,
162
- }, actions: _jsx(_Fragment, { children: _jsx(WindowActions, { title: projection.launch.title, maximized: zoomed, ...(layout.mode === "tiled" &&
163
- layout.order[0] !== projection.windowId
164
- ? {
165
- onPromote: () => {
166
- const main = layout.order[0];
167
- if (main)
168
- layout.swap(projection.windowId, main);
169
- focusWindow(projection.windowId);
170
- },
171
- }
172
- : {}), onToggleMaximize: zoom, onMinimize: () => {
173
- void manager
174
- .minimize(projection.windowId)
175
- .then(() => {
176
- afterHide(projection.windowId);
177
- })
178
- .catch((cause) => {
179
- console.error("App workbench operation failed", cause);
180
- onError("App could not be minimized.");
181
- });
182
- }, onClose: close }) }) }), projection.status === "loading" ||
223
+ }, actions: _jsx(AppWindowControls, { phone: phone, navigation: projection.navigation, popover: popover, onAction: (activation) => {
224
+ void manager
225
+ .activateNavigation(projection.windowId, activation)
226
+ .catch((cause) => {
227
+ console.error("App workbench operation failed", cause);
228
+ onError("App could not handle that action.");
229
+ });
230
+ }, title: projection.launch.title, maximized: zoomed, ...(layout.mode === "tiled" &&
231
+ layout.order[0] !== projection.windowId
232
+ ? {
233
+ onPromote: () => {
234
+ const main = layout.order[0];
235
+ if (main)
236
+ layout.swap(projection.windowId, main);
237
+ focusWindow(projection.windowId);
238
+ },
239
+ }
240
+ : {}), onToggleMaximize: zoom, onMinimize: () => {
241
+ void manager
242
+ .minimize(projection.windowId)
243
+ .then(() => {
244
+ afterHide(projection.windowId);
245
+ })
246
+ .catch((cause) => {
247
+ console.error("App workbench operation failed", cause);
248
+ onError("App could not be minimized.");
249
+ });
250
+ }, onClose: close }) }), projection.status === "loading" ||
183
251
  projection.status === "getting-ready" ? (_jsx(LoadingState, { className: "tourtois-app-loading", framed: false, icon: _jsx(AppIcon, { roles: projection.launch.roles, icon: icon }), variant: projection.status === "getting-ready" ? "square" : "line", message: projection.status === "getting-ready"
184
252
  ? `Getting ${projection.launch.title} ready…`
185
253
  : `Opening ${projection.launch.title}…`, detail: "Preparing this App for your workspace." })) : null, projection.status === "error" ? (_jsx("div", { className: "tourtois-window-status", children: _jsx(WindowFailure, { projection: projection, onReopen: () => {
@@ -227,19 +295,7 @@ export function AppPane({ projection, nextLaunch, icon, manager, onError, index,
227
295
  */
228
296
  export function WindowStatusBar({ projection, onSelectComputer, onAction, surface, computerPickerOpen, onComputerPickerOpenChange, onReload, onChooseComputer, }) {
229
297
  const popover = useLayer("popover");
230
- const [phone, setPhone] = useState(false);
231
- useEffect(() => {
232
- // Match Caps' phone status-bar breakpoint, including its touch targets.
233
- const media = window.matchMedia("(max-width: 640px)");
234
- const update = () => {
235
- setPhone(media.matches);
236
- };
237
- update();
238
- media.addEventListener("change", update);
239
- return () => {
240
- media.removeEventListener("change", update);
241
- };
242
- }, []);
298
+ const phone = usePhone();
243
299
  const { computers, title } = projection.launch;
244
300
  const items = projection.statusItems;
245
301
  if (computers === undefined && items.length === 0 && !onReload)
@@ -20,6 +20,22 @@ export declare const modelKeysViewSchema: z.ZodObject<{
20
20
  createdAt: z.ZodNumber;
21
21
  validatedAt: z.ZodNumber;
22
22
  }, z.core.$strict>>;
23
+ models: z.ZodEnum<{
24
+ missing: "missing";
25
+ ready: "ready";
26
+ unknown: "unknown";
27
+ }>;
28
+ catalogs: z.ZodRecord<z.ZodEnum<{
29
+ "cloudflare-workers-ai": "cloudflare-workers-ai";
30
+ anthropic: "anthropic";
31
+ openai: "openai";
32
+ openrouter: "openrouter";
33
+ }> & z.core.$partial, z.ZodArray<z.ZodObject<{
34
+ id: z.ZodString;
35
+ name: z.ZodString;
36
+ input: z.ZodNumber;
37
+ output: z.ZodNumber;
38
+ }, z.core.$strict>>>;
23
39
  agents: z.ZodArray<z.ZodObject<{
24
40
  agentId: z.ZodString;
25
41
  name: z.ZodString;
package/dist/ModelKeys.js CHANGED
@@ -2,9 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { SectionHeading } from "@fungi.computer/caps/blocks/section-heading";
3
3
  import { Button } from "@fungi.computer/caps/components/button";
4
4
  import { DataList, DataListHeading, DataRow, FactRow, } from "@fungi.computer/caps/components/data-list";
5
+ import { Select } from "@fungi.computer/caps/components/select";
5
6
  import { FormFooter } from "@fungi.computer/caps/components/field";
6
7
  import { KeycapButton } from "@fungi.computer/caps/components/keycap";
7
- import { FormFields, SchemaForm, field, useSchemaForm, } from "@fungi.computer/caps/form";
8
+ import { FormField, FormFields, SchemaForm, field, useSchemaForm, } from "@fungi.computer/caps/form";
8
9
  import { Sigil } from "@fungi.computer/sigils";
9
10
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
10
11
  import { useCallback, useMemo, useState } from "react";
@@ -42,6 +43,13 @@ const agentChoiceSchema = z.strictObject({
42
43
  /** Every stored key and every Agent with its persisted model choice. */
43
44
  export const modelKeysViewSchema = z.strictObject({
44
45
  keys: z.array(modelKeySchema),
46
+ models: z.enum(["ready", "missing", "unknown"]),
47
+ catalogs: z.partialRecord(providerSchema, z.array(z.strictObject({
48
+ id: z.string().min(1),
49
+ name: z.string().min(1),
50
+ input: z.number().nonnegative(),
51
+ output: z.number().nonnegative(),
52
+ }))),
45
53
  agents: z.array(z.strictObject({
46
54
  agentId: z.string().min(1),
47
55
  name: z.string(),
@@ -80,16 +88,24 @@ export function ModelKeys({ port, focus = false, }) {
80
88
  await port.addKey(draft);
81
89
  await refresh();
82
90
  setFormKey((current) => current + 1);
83
- } }, formKey), _jsx(SectionHeading, { children: "Agent models" }), _jsxs(DataList, { density: "compact", "aria-label": "Agent models", children: [_jsx(DataListHeading, { children: "Current choice" }), agents.length === 0 ? (_jsx(DataRow, { className: "tourtois-settings-empty", children: "Create an Agent first." })) : null, agents.map((agent) => {
84
- const keyLabel = agent.choice?.keyId === undefined
85
- ? null
86
- : (keys.find((key) => key.keyId === agent.choice?.keyId)
87
- ?.label ?? "Removed key");
88
- return (_jsxs(FactRow, { icon: _jsx(Sigil, { name: "agent" }), label: agent.name, children: [agent.choice?.model.modelId ?? "Unavailable", keyLabel === null ? "" : ` · ${keyLabel}`] }, agent.agentId));
89
- })] }), agents.length > 0 ? (_jsx(ChooseAgentModel, { agents: agents, keys: keys, onChoose: async (agentId, draft) => {
91
+ } }, formKey), _jsx(SectionHeading, { children: "Agent models" }), view.data.models === "missing" ? (_jsx("p", { role: "status", children: "No model is connected yet. The instance default cannot reply until you add a model key." })) : null, _jsxs(DataList, { density: "compact", "aria-label": "Agent models", children: [_jsx(DataListHeading, { children: "Current choice" }), agents.length === 0 ? (_jsx(DataRow, { className: "tourtois-settings-empty", children: "Create an Agent first." })) : null, agents.map((agent) => {
92
+ const selectedKey = keys.find((key) => key.keyId === agent.choice?.keyId);
93
+ const catalog = Object.entries(view.data.catalogs).find(([provider]) => provider === agent.choice?.model.providerId)?.[1];
94
+ const name = catalog?.find((model) => model.id === agent.choice?.model.modelId)?.name;
95
+ const disconnected = view.data.models === "missing" ||
96
+ (agent.choice?.keySource === "byok" &&
97
+ selectedKey === undefined);
98
+ return (_jsxs(FactRow, { icon: _jsx(Sigil, { name: "agent" }), label: agent.name, children: [disconnected
99
+ ? "Not connected"
100
+ : agent.choice === null
101
+ ? "Unavailable"
102
+ : (name ?? "Instance default"), disconnected || selectedKey === undefined
103
+ ? ""
104
+ : ` · ${selectedKey.label}`] }, agent.agentId));
105
+ })] }), agents.length > 0 ? (_jsx(ChooseAgentModel, { agents: agents, keys: keys, catalogs: view.data.catalogs, models: view.data.models, onChoose: async (agentId, draft) => {
90
106
  await port.chooseModel(agentId, draft);
91
107
  await refresh();
92
- } })) : null] })) : null] }));
108
+ } }, keys.map((key) => key.keyId).join(":"))) : null] })) : null] }));
93
109
  }
94
110
  function AddModelKey({ onAdd, }) {
95
111
  const schema = useMemo(() => z.object({
@@ -172,7 +188,7 @@ function AddModelKey({ onAdd, }) {
172
188
  ? ["provider", "label", "accountId", "apiKey"]
173
189
  : ["provider", "label", "apiKey"], layout: "columns" })) }) }));
174
190
  }
175
- function ChooseAgentModel({ agents, keys, onChoose, }) {
191
+ function ChooseAgentModel({ agents, keys, catalogs, models, onChoose, }) {
176
192
  const schema = useMemo(() => z.object({
177
193
  agentId: z.string().meta(field({
178
194
  label: "Agent",
@@ -180,28 +196,9 @@ function ChooseAgentModel({ agents, keys, onChoose, }) {
180
196
  kind: "select",
181
197
  options: Object.fromEntries(agents.map((agent) => [agent.agentId, agent.name])),
182
198
  })),
183
- source: z.string().meta(field({
184
- label: "Runs on",
185
- icon: _jsx(Sigil, { name: "restricted" }),
186
- kind: "select",
187
- options: {
188
- [defaultSource]: "Instance default model",
189
- ...Object.fromEntries(keys.map((key) => [
190
- key.keyId,
191
- `${key.label} (${providers[key.provider]})`,
192
- ])),
193
- },
194
- })),
195
- modelId: z
196
- .string()
197
- .max(256)
198
- .meta(field({
199
- label: "Model",
200
- icon: _jsx(Sigil, { name: "write" }),
201
- help: "For a key: the provider's model id, such as gpt-6-luna.",
202
- maxLength: 256,
203
- })),
204
- }), [agents, keys]);
199
+ source: z.string(),
200
+ modelId: z.string(),
201
+ }), [agents]);
205
202
  const choose = useMutation({
206
203
  mutationFn: (input) => onChoose(input.agentId, input.draft),
207
204
  });
@@ -209,15 +206,20 @@ function ChooseAgentModel({ agents, keys, onChoose, }) {
209
206
  schema,
210
207
  defaultValues: {
211
208
  agentId: agents[0]?.agentId ?? "",
212
- source: defaultSource,
209
+ source: keys[0]?.keyId ?? defaultSource,
213
210
  modelId: "",
214
211
  },
215
212
  onSubmit: async (value) => {
216
213
  const key = keys.find((item) => item.keyId === value.source);
217
214
  if (value.source !== defaultSource && key === undefined)
218
215
  return { kind: "refused", error: "Choose a stored key." };
219
- if (key !== undefined && value.modelId.length === 0)
220
- return { kind: "refused", error: "Name the model this key runs." };
216
+ const available = key === undefined ? [] : (catalogs[key.provider] ?? []);
217
+ const modelId = value.modelId || available[0]?.id;
218
+ if (key !== undefined && !available.some((item) => item.id === modelId))
219
+ return {
220
+ kind: "refused",
221
+ error: "Choose a supported model for this key.",
222
+ };
221
223
  try {
222
224
  await choose.mutateAsync({
223
225
  agentId: value.agentId,
@@ -226,7 +228,7 @@ function ChooseAgentModel({ agents, keys, onChoose, }) {
226
228
  : {
227
229
  keyId: key.keyId,
228
230
  provider: key.provider,
229
- modelId: value.modelId,
231
+ modelId: modelId ?? "",
230
232
  },
231
233
  });
232
234
  return { kind: "saved" };
@@ -241,5 +243,18 @@ function ChooseAgentModel({ agents, keys, onChoose, }) {
241
243
  }
242
244
  },
243
245
  });
244
- return (_jsx(SchemaForm, { model: model, layout: "columns", "aria-label": "Choose Agent model", disabled: choose.isPending, footer: _jsx(FormFooter, { divider: false, error: model.error, children: _jsx(Button, { type: "submit", children: choose.isPending ? "Saving…" : "Save model" }) }) }));
246
+ return (_jsxs(SchemaForm, { model: model, layout: "columns", "aria-label": "Choose Agent model", disabled: choose.isPending, footer: _jsx(FormFooter, { divider: false, error: model.error, children: _jsx(Button, { type: "submit", children: choose.isPending ? "Saving…" : "Save model" }) }), children: [_jsx(FormFields, { model: model, names: ["agentId"] }), _jsx(FormField, { form: model.form, name: "source", label: "Runs on", children: (source) => (_jsxs(Select, { name: "source", value: source.state.value, onChange: (event) => {
247
+ source.handleChange(event.target.value);
248
+ model.form.setFieldValue("modelId", "");
249
+ }, children: [_jsx("option", { value: defaultSource, children: models === "missing"
250
+ ? "Instance default — not connected"
251
+ : "Instance default model" }), keys.map((key) => (_jsxs("option", { value: key.keyId, children: [key.label, " (", providers[key.provider], ")"] }, key.keyId)))] })) }), _jsx(model.form.Subscribe, { selector: (state) => state.values.source, children: (source) => {
252
+ const key = keys.find((item) => item.keyId === source);
253
+ if (key === undefined)
254
+ return null;
255
+ const available = catalogs[key.provider] ?? [];
256
+ return (_jsx(FormField, { form: model.form, name: "modelId", label: "Model", description: "USD per million tokens: input / output. Lowest combined rate first.", children: (choice) => (_jsxs(Select, { name: "modelId", value: choice.state.value || (available[0]?.id ?? ""), onChange: (event) => {
257
+ choice.handleChange(event.target.value);
258
+ }, children: [available.length === 0 ? (_jsx("option", { value: "", children: "No supported models available" })) : null, available.map((item) => (_jsxs("option", { value: item.id, children: [item.name, " \u00B7 $", item.input, " / $", item.output] }, item.id)))] })) }));
259
+ } })] }));
245
260
  }
@@ -313,7 +313,7 @@ function ArrangedDesktop({ owner, ...props }) {
313
313
  left: frame.x,
314
314
  top: frame.y,
315
315
  width: frame.width,
316
- height: frame.height,
316
+ height: Math.min(contentHeights.get(item.id) ?? frame.height, frame.height),
317
317
  }, onPointerDown: (event) => {
318
318
  // Touch has no menu to reach Arrange from: a long press enters it.
319
319
  if (editing || event.pointerType !== "touch")
@@ -72,7 +72,7 @@ export function LauncherGill({ items, size = "M", onAllApps, loading = false, un
72
72
  },
73
73
  } })) : null, items.length > 0 ||
74
74
  pendingTiles.length > 0 ||
75
- warnings.length > 0 ? (_jsx(AppGrid, { "aria-label": "Apps", items: [
75
+ warnings.length > 0 ? (_jsx(AppGrid, { className: "tourtois-launcher-grid", "aria-label": "Apps", items: [
76
76
  ...tiles,
77
77
  ...pendingTiles,
78
78
  ...warnings,
@@ -113,7 +113,13 @@ const modelKeys = {
113
113
  ]);
114
114
  return modelKeysViewSchema.parse({
115
115
  keys: z.object({ keys: z.unknown() }).parse(keys).keys,
116
- agents: z.object({ agents: z.unknown() }).parse(agents).agents,
116
+ ...z
117
+ .object({
118
+ agents: z.unknown(),
119
+ catalogs: z.unknown(),
120
+ models: z.unknown(),
121
+ })
122
+ .parse(agents),
117
123
  });
118
124
  },
119
125
  addKey: async (draft) => {
package/dist/shell.css CHANGED
@@ -908,3 +908,18 @@
908
908
  height: 7rem;
909
909
  }
910
910
  }
911
+
912
+ /* Keep the launcher keys' existing material at a compact widget scale. */
913
+ .tourtois-launcher-grid[data-size="lg"] {
914
+ grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
915
+ }
916
+ .tourtois-launcher-grid[data-size="lg"] .caps-app-grid-icon {
917
+ width: 4rem;
918
+ height: 4rem;
919
+ }
920
+ .tourtois-gill-frame > .caps-card-header {
921
+ padding: var(--spacing-lg);
922
+ }
923
+ .tourtois-gill-frame > .caps-card-content {
924
+ padding: 0 var(--spacing-lg) var(--spacing-lg);
925
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/tourtois",
3
- "version": "0.12.17",
3
+ "version": "0.12.19",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Tourtois: the trusted desktop shell for Oyster and Fungi, with host-supplied Settings sections",
6
6
  "type": "module",
@@ -79,11 +79,11 @@
79
79
  "dependencies": {
80
80
  "@fungi.computer/agar": "0.9.1",
81
81
  "@fungi.computer/cairn": "0.1.0",
82
- "@fungi.computer/caps": "0.10.4",
82
+ "@fungi.computer/caps": "0.10.5",
83
83
  "@fungi.computer/ear-tag": "0.1.0",
84
84
  "@fungi.computer/gills": "0.3.0",
85
85
  "@fungi.computer/maosaico": "0.1.2",
86
- "@fungi.computer/parakeet": "0.11.9",
86
+ "@fungi.computer/parakeet": "0.11.10",
87
87
  "@fungi.computer/puffball": "0.5.5",
88
88
  "@fungi.computer/shiitake": "0.12.4",
89
89
  "@fungi.computer/sigils": "0.3.1",
@@ -106,7 +106,7 @@
106
106
  "react": "^18.3.1 || ^19.2.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@fungi.computer/oyster": "0.19.31",
109
+ "@fungi.computer/oyster": "0.19.34",
110
110
  "@cloudflare/workers-types": "5.20260828.1",
111
111
  "@fungi.computer/forage": "0.3.5",
112
112
  "@fungi.computer/mycelium": "0.3.8",