@fungi.computer/tourtois 0.12.20 → 0.12.21

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.
@@ -35,6 +35,7 @@ export declare const modelKeysViewSchema: z.ZodObject<{
35
35
  name: z.ZodString;
36
36
  input: z.ZodNumber;
37
37
  output: z.ZodNumber;
38
+ tools: z.ZodBoolean;
38
39
  }, z.core.$strict>>>;
39
40
  agents: z.ZodArray<z.ZodObject<{
40
41
  agentId: z.ZodString;
package/dist/ModelKeys.js CHANGED
@@ -49,6 +49,7 @@ export const modelKeysViewSchema = z.strictObject({
49
49
  name: z.string().min(1),
50
50
  input: z.number().nonnegative(),
51
51
  output: z.number().nonnegative(),
52
+ tools: z.boolean(),
52
53
  }))),
53
54
  agents: z.array(z.strictObject({
54
55
  agentId: z.string().min(1),
@@ -99,7 +100,10 @@ export function ModelKeys({ port, focus = false, }) {
99
100
  ? "Not connected"
100
101
  : agent.choice === null
101
102
  ? "Unavailable"
102
- : (name ?? "Instance default"), disconnected || selectedKey === undefined
103
+ : (name ??
104
+ (catalog === undefined
105
+ ? "Instance default"
106
+ : "Model unavailable for tools")), disconnected || selectedKey === undefined
103
107
  ? ""
104
108
  : ` · ${selectedKey.label}`] }, agent.agentId));
105
109
  })] }), agents.length > 0 ? (_jsx(ChooseAgentModel, { agents: agents, keys: keys, catalogs: view.data.catalogs, models: view.data.models, onChoose: async (agentId, draft) => {
@@ -214,7 +218,7 @@ function ChooseAgentModel({ agents, keys, catalogs, models, onChoose, }) {
214
218
  if (value.source !== defaultSource && key === undefined)
215
219
  return { kind: "refused", error: "Choose a stored key." };
216
220
  const available = key === undefined ? [] : (catalogs[key.provider] ?? []);
217
- const modelId = value.modelId || available[0]?.id;
221
+ const modelId = value.modelId || available.find((item) => item.tools)?.id;
218
222
  if (key !== undefined && !available.some((item) => item.id === modelId))
219
223
  return {
220
224
  kind: "refused",
@@ -253,8 +257,13 @@ function ChooseAgentModel({ agents, keys, catalogs, models, onChoose, }) {
253
257
  if (key === undefined)
254
258
  return null;
255
259
  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) => {
260
+ return (_jsx(FormField, { form: model.form, name: "modelId", label: "Model", description: "Choose tools for work in Apps. Other models may not use tools. USD per million tokens: input / output; lowest rate first in each group.", children: (choice) => (_jsxs(Select, { name: "modelId", value: choice.state.value ||
261
+ (available.find((item) => item.tools)?.id ?? ""), onChange: (event) => {
257
262
  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)))] })) }));
263
+ }, children: [available.length === 0 ? (_jsx("option", { value: "", children: "No supported models available" })) : null, available.length > 0 &&
264
+ !available.some((item) => item.tools) ? (_jsx("option", { value: "", children: "Choose a model" })) : null, [true, false].map((tools) => {
265
+ const group = available.filter((item) => item.tools === tools);
266
+ return group.length === 0 ? null : (_jsx("optgroup", { label: tools ? "Tools" : "Other models (may not use tools)", children: group.map((item) => (_jsxs("option", { value: item.id, children: [item.name, " \u00B7 ", tools ? "tools" : "chat only", " \u00B7 $", item.input, " / $", item.output] }, item.id))) }, String(tools)));
267
+ })] })) }));
259
268
  } })] }));
260
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/tourtois",
3
- "version": "0.12.20",
3
+ "version": "0.12.21",
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",
@@ -83,7 +83,7 @@
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.11",
86
+ "@fungi.computer/parakeet": "0.11.12",
87
87
  "@fungi.computer/puffball": "0.5.5",
88
88
  "@fungi.computer/shiitake": "0.13.0",
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.20.0",
109
+ "@fungi.computer/oyster": "0.20.1",
110
110
  "@cloudflare/workers-types": "5.20260828.1",
111
111
  "@fungi.computer/forage": "0.3.5",
112
112
  "@fungi.computer/mycelium": "0.3.8",