@copilotz/team 1.0.0-rc.54 → 1.0.0-rc.56

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.
Files changed (66) hide show
  1. package/WORDS.md +156 -0
  2. package/package.json +2 -2
  3. package/team/actions/agent.d.ts +10 -0
  4. package/team/actions/agent.js +226 -7
  5. package/team/actions/define.js +7 -3
  6. package/team/collections/agent.d.ts +52 -7
  7. package/team/collections/agent.js +56 -5
  8. package/team/mod.d.ts +7 -0
  9. package/team/mod.js +14 -1
  10. package/team/resources/propose.d.ts +1 -0
  11. package/team/resources/propose.js +97 -0
  12. package/team/shared/definition.d.ts +1 -1
  13. package/team/shared/definition.js +5 -4
  14. package/team/shared/everywhere.d.ts +11 -0
  15. package/team/shared/everywhere.js +29 -0
  16. package/team/views/web/agent-add.js +14 -4
  17. package/team/views/web/agent-describe.d.ts +38 -0
  18. package/team/views/web/agent-describe.js +44 -0
  19. package/team/views/web/agent-fields.d.ts +3 -1
  20. package/team/views/web/agent-fields.js +2 -2
  21. package/team/views/web/agent-known.js +2 -1
  22. package/team/views/web/agent-new.d.ts +4 -1
  23. package/team/views/web/agent-new.js +26 -5
  24. package/team/views/web/agent-org.d.ts +12 -0
  25. package/team/views/web/agent-org.js +89 -0
  26. package/team/views/web/agent.d.ts +7 -4
  27. package/team/views/web/agent.js +81 -28
  28. package/team/views/web/model-pick.d.ts +3 -1
  29. package/team/views/web/model-pick.js +4 -1
  30. package/team/views/web/style.d.ts +1 -1
  31. package/team/views/web/style.js +5 -0
  32. package/team/views/web/words.d.ts +1 -1
  33. package/team/views/web/words.js +28 -0
  34. package/team/web.js +2 -0
  35. package/tiers/actions/choose.d.ts +5 -1
  36. package/tiers/actions/choose.js +247 -66
  37. package/tiers/actions/model.js +31 -22
  38. package/tiers/collections/choice.d.ts +17 -10
  39. package/tiers/collections/choice.js +39 -27
  40. package/tiers/collections/template.d.ts +90 -0
  41. package/tiers/collections/template.js +41 -0
  42. package/tiers/contract.d.ts +10 -8
  43. package/tiers/mod.d.ts +30 -21
  44. package/tiers/mod.js +45 -36
  45. package/tiers/shared/shown.d.ts +131 -49
  46. package/tiers/shared/shown.js +192 -98
  47. package/tiers/shared/tiers.d.ts +105 -62
  48. package/tiers/shared/tiers.js +127 -86
  49. package/tiers/views/web/composer.d.ts +12 -0
  50. package/tiers/views/web/composer.js +79 -0
  51. package/tiers/views/web/org.d.ts +44 -21
  52. package/tiers/views/web/org.js +231 -84
  53. package/tiers/views/web/say.d.ts +138 -0
  54. package/tiers/views/web/say.js +142 -0
  55. package/tiers/views/web/setup.d.ts +23 -0
  56. package/tiers/views/web/setup.js +80 -0
  57. package/tiers/views/web/space.d.ts +8 -20
  58. package/tiers/views/web/space.js +30 -59
  59. package/tiers/views/web/style.d.ts +1 -1
  60. package/tiers/views/web/style.js +98 -4
  61. package/tiers/views/web/team.d.ts +38 -0
  62. package/tiers/views/web/team.js +118 -0
  63. package/tiers/views/web/words.d.ts +36 -16
  64. package/tiers/views/web/words.js +102 -35
  65. package/tiers/web.d.ts +18 -9
  66. package/tiers/web.js +36 -10
@@ -10,12 +10,13 @@ import { useId, useState } from "react";
10
10
  import { Avatar, Button, Field, Icon, message, Select } from "copilotz/web";
11
11
  import { AGENT_ROLES } from "copilotz/plugins/access/contract";
12
12
  import { AgentFields } from "./agent-fields.js";
13
+ import { Describe, KindField } from "./agent-describe.js";
13
14
  import { agentPath, handleOf, shownAs, usualTools } from "./agents.js";
14
15
  import { placeName } from "./places.js";
15
16
  import { say } from "./words.js";
16
17
  /** A link in a dialog closes it as it's followed: the page it opens is behind. */
17
18
  const leaving = (event) => event.currentTarget.closest("dialog")?.close();
18
- export function NewAgent({ space, known, options, call, from: first, onBack }) {
19
+ export function NewAgent({ space, known, options, call, from: first, onBack, kinds }) {
19
20
  const id = useId();
20
21
  const offered = options.tools.map((t) => t.name);
21
22
  const app = Object.entries(known).filter(([, agent]) => !agent.in);
@@ -42,22 +43,40 @@ export function NewAgent({ space, known, options, call, from: first, onBack }) {
42
43
  const [from, setFrom] = useState(first && known[first] && !known[first].in ? first : "");
43
44
  const [draft, setDraft] = useState(() => from ? like(from) : blank());
44
45
  const [role, setRole] = useState("editor");
46
+ const [kind, setKind] = useState(kinds?.[0]?.kind ?? "");
47
+ // Described first, unless it starts from one of the app's agents.
48
+ const [step, setStep] = useState(from ? "form" : "describe");
45
49
  const [busy, setBusy] = useState(false);
46
50
  const [error, setError] = useState();
47
51
  const [made, setMade] = useState();
48
52
  const name = draft.name.trim();
49
53
  const handle = name ? handleOf(name, (taken) => taken in known) : "";
50
54
  const where = placeName(space);
55
+ if (step === "describe" && !made) {
56
+ return (_jsx(Describe, { kinds: kinds, call: call, onSkip: () => setStep("form"), onDraft: (sketch) => {
57
+ setDraft((now) => ({
58
+ ...now,
59
+ name: sketch.name,
60
+ icon: sketch.icon,
61
+ description: sketch.description,
62
+ instructions: sketch.instructions,
63
+ }));
64
+ if (sketch.like)
65
+ setKind(sketch.like);
66
+ setStep("form");
67
+ } }));
68
+ }
51
69
  if (made) {
52
70
  return (_jsx(Done, { made: made, space: space, call: call, again: () => {
53
71
  setMade(undefined);
54
72
  setFrom("");
55
73
  setDraft(blank());
74
+ setStep("describe");
56
75
  } }));
57
76
  }
58
77
  return (_jsxs("form", { className: "agent-new", "aria-label": say("newAgentForm"), onSubmit: async (event) => {
59
78
  event.preventDefault();
60
- if (!name || !draft.model || busy)
79
+ if (!name || (!kinds?.length && !draft.model) || busy)
61
80
  return;
62
81
  setBusy(true);
63
82
  setError(undefined);
@@ -67,7 +86,7 @@ export function NewAgent({ space, known, options, call, from: first, onBack }) {
67
86
  name,
68
87
  ...(draft.description.trim() ? { description: draft.description.trim() } : {}),
69
88
  ...(draft.instructions.trim() ? { instructions: draft.instructions.trim() } : {}),
70
- model: draft.model,
89
+ ...(kinds?.length ? (kind ? { like: kind } : {}) : { model: draft.model }),
71
90
  tools: draft.tools,
72
91
  ...(draft.icon ? { icon: draft.icon } : {}),
73
92
  ...(from ? { from } : {}),
@@ -95,10 +114,12 @@ export function NewAgent({ space, known, options, call, from: first, onBack }) {
95
114
  setDraft((now) => ({ ...(next ? like(next) : blank()), name: now.name }));
96
115
  }, children: [_jsx("option", { value: "", children: say("startBlank") }), app.map(([key, agent]) => (_jsx("option", { value: key, children: shownAs(key, agent).name }, key)))] })] }))
97
116
  : null] }))
98
- : null, _jsx(AgentFields, { value: draft, onChange: (patch) => setDraft((now) => ({ ...now, ...patch })), options: options, handle: handle, call: call, autoFocus: true }), _jsx(Field, { label: say("worksInAs", { place: where }), hint: say("belongsHint", {
117
+ : null, _jsx(AgentFields, { value: draft, onChange: (patch) => setDraft((now) => ({ ...now, ...patch })), options: options, handle: handle, call: call, autoFocus: true, model: kinds?.length
118
+ ? _jsx(KindField, { kinds: kinds, value: kind, onChange: setKind, disabled: busy })
119
+ : undefined }), _jsx(Field, { label: say("worksInAs", { place: where }), hint: say("belongsHint", {
99
120
  lets: AGENT_ROLES.find((r) => r.value === role)?.lets ?? "",
100
121
  place: where,
101
- }), children: (control) => (_jsx(Select, { ...control, value: role, onChange: (event) => setRole(event.target.value), children: AGENT_ROLES.map((r) => _jsx("option", { value: r.value, children: r.label }, r.value)) })) }), _jsxs("div", { className: "agent-new-end", children: [_jsx("p", { id: `${id}-said`, className: "agent-form-note", "aria-live": "polite", children: error ? _jsx("span", { className: "agent-error", role: "alert", children: error }) : null }), _jsx(Button, { type: "submit", variant: "primary", icon: "plus", loading: busy, disabled: !name || !draft.model, "aria-describedby": `${id}-said`, children: name ? say("createNamed", { name }) : say("createAgent") })] })] }));
122
+ }), children: (control) => (_jsx(Select, { ...control, value: role, onChange: (event) => setRole(event.target.value), children: AGENT_ROLES.map((r) => _jsx("option", { value: r.value, children: r.label }, r.value)) })) }), _jsxs("div", { className: "agent-new-end", children: [_jsx("p", { id: `${id}-said`, className: "agent-form-note", "aria-live": "polite", children: error ? _jsx("span", { className: "agent-error", role: "alert", children: error }) : null }), _jsx(Button, { type: "submit", variant: "primary", icon: "plus", loading: busy, disabled: !name || (!kinds?.length && !draft.model), "aria-describedby": `${id}-said`, children: name ? say("createNamed", { name }) : say("createAgent") })] })] }));
102
123
  }
103
124
  /** Made: what it is now, and what's next. */
104
125
  function Done({ made, space, call, again }) {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Making an agent for the org's team (kind `agent.org`, hints `{ done?,
3
+ * kinds? }`): for its owners and admins, on the org's page. First what it
4
+ * should do, and Compass drafts the rest (`Describe`, `agent.sketch`), or
5
+ * they fill it in. Then its fields (`AgentFields`), with its kind of work in
6
+ * place of a model where tiers give agents theirs (`kinds`); else a model.
7
+ * Made (`agent.create`, the org's: `in: "*"`), it joins every space in use
8
+ * and every new one; `done()` is called with its id.
9
+ */
10
+ import { type ReactNode } from "react";
11
+ import type { ViewContext } from "copilotz";
12
+ export declare const agentOrgView: (_: unknown, ctx: ViewContext<ReactNode>) => ReactNode;
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Making an agent for the org's team (kind `agent.org`, hints `{ done?,
4
+ * kinds? }`): for its owners and admins, on the org's page. First what it
5
+ * should do, and Compass drafts the rest (`Describe`, `agent.sketch`), or
6
+ * they fill it in. Then its fields (`AgentFields`), with its kind of work in
7
+ * place of a model where tiers give agents theirs (`kinds`); else a model.
8
+ * Made (`agent.create`, the org's: `in: "*"`), it joins every space in use
9
+ * and every new one; `done()` is called with its id.
10
+ */
11
+ import { useId, useState } from "react";
12
+ import { Button, message, Skeleton } from "copilotz/web";
13
+ import { AgentFields } from "./agent-fields.js";
14
+ import { Describe, KindField } from "./agent-describe.js";
15
+ import { handleOf, usualTools } from "./agents.js";
16
+ import { STYLE } from "./style.js";
17
+ import { say } from "./words.js";
18
+ /** The org's own, as the access plugin keeps it: the org itself. */
19
+ const ORG = "*";
20
+ export const agentOrgView = (_, ctx) => {
21
+ const known = ctx.db.collection("agent").query("known", {}).value;
22
+ const options = ctx.db.collection("agent").query("options", {}).value;
23
+ const done = typeof ctx.hints.done === "function"
24
+ ? ctx.hints.done
25
+ : undefined;
26
+ const kinds = Array.isArray(ctx.hints.kinds) ? ctx.hints.kinds : undefined;
27
+ return (_jsxs(_Fragment, { children: [_jsx("style", { href: "team-web", precedence: "copilotz", children: STYLE }), known && options
28
+ ? _jsx(OrgAgent, { known: known, options: options, kinds: kinds, call: ctx.call, done: done })
29
+ : _jsx(Skeleton, { height: 320, radius: "lg" })] }));
30
+ };
31
+ function OrgAgent({ known, options, kinds, call, done }) {
32
+ const id = useId();
33
+ const offered = options.tools.map((t) => t.name);
34
+ const [step, setStep] = useState("describe");
35
+ const [draft, setDraft] = useState(() => ({
36
+ name: "",
37
+ icon: "",
38
+ description: "",
39
+ instructions: "",
40
+ model: options.models[0] ?? "",
41
+ tools: usualTools(known, offered),
42
+ }));
43
+ const [like, setLike] = useState(kinds?.[0]?.kind ?? "");
44
+ const [busy, setBusy] = useState(false);
45
+ const [error, setError] = useState();
46
+ const name = draft.name.trim();
47
+ const handle = name ? handleOf(name, (taken) => taken in known) : "";
48
+ if (step === "describe") {
49
+ return (_jsx(Describe, { kinds: kinds, call: call, onSkip: () => setStep("form"), onDraft: (sketch) => {
50
+ setDraft((now) => ({
51
+ ...now,
52
+ name: sketch.name,
53
+ icon: sketch.icon,
54
+ description: sketch.description,
55
+ instructions: sketch.instructions,
56
+ }));
57
+ if (sketch.like)
58
+ setLike(sketch.like);
59
+ setStep("form");
60
+ } }));
61
+ }
62
+ return (_jsxs("form", { className: "agent-new", "aria-label": say("orgForm"), onSubmit: async (event) => {
63
+ event.preventDefault();
64
+ if (!name || busy)
65
+ return;
66
+ setBusy(true);
67
+ setError(undefined);
68
+ try {
69
+ const { agent } = await call("agent.create", {
70
+ in: ORG,
71
+ name,
72
+ ...(draft.description.trim() ? { description: draft.description.trim() } : {}),
73
+ ...(draft.instructions.trim() ? { instructions: draft.instructions.trim() } : {}),
74
+ tools: draft.tools,
75
+ ...(draft.icon ? { icon: draft.icon } : {}),
76
+ ...(kinds?.length ? (like ? { like } : {}) : { model: draft.model }),
77
+ });
78
+ done?.(agent);
79
+ }
80
+ catch (e) {
81
+ setError(message(e));
82
+ }
83
+ finally {
84
+ setBusy(false);
85
+ }
86
+ }, children: [_jsx(AgentFields, { value: draft, onChange: (patch) => setDraft((now) => ({ ...now, ...patch })), options: options, handle: handle, call: call, autoFocus: true, model: kinds?.length
87
+ ? _jsx(KindField, { kinds: kinds, value: like, onChange: setLike, disabled: busy })
88
+ : undefined }), _jsxs("div", { className: "agent-new-end", children: [_jsx("p", { id: `${id}-said`, className: "agent-form-note", "aria-live": "polite", children: error ? _jsx("span", { className: "agent-error", role: "alert", children: error }) : say("orgJoins") }), _jsx(Button, { variant: "ghost", onClick: () => setStep("describe"), disabled: busy, children: say("back") }), _jsx(Button, { type: "submit", variant: "primary", icon: "plus", loading: busy, disabled: !name, "aria-describedby": `${id}-said`, children: name ? say("addToTeamNamed", { name }) : say("addToTeam") })] })] }));
89
+ }
@@ -5,10 +5,13 @@
5
5
  * new chats), and what it's told: its instructions, model and tools. "Ask"
6
6
  * starts a chat where it works, `@name` ready. Those who manage where it
7
7
  * belongs change it in place (`?edit=1` opens it so) and delete it, after
8
- * a question that says it leaves every space it works in. The app's own
9
- * agents are read only; a manager starts a new agent from one. Its menu
10
- * adds it to another space they manage, and has it answer new chats where
11
- * the person is.
8
+ * a question that says it leaves every space it works in. The org's team
9
+ * (the app's agents, and those the org made, `in: "*"`) is its owners' and
10
+ * admins': they change one in place (one of the app's becomes the org's
11
+ * version of it, its model still the tier's) and take it off the team;
12
+ * anyone else reads it, and a space's manager starts a new agent from one.
13
+ * Its menu adds it to another space they manage, and has it answer new chats
14
+ * where the person is.
12
15
  */
13
16
  import { type ReactNode } from "react";
14
17
  import type { ViewContext } from "copilotz";
@@ -6,19 +6,27 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  * new chats), and what it's told: its instructions, model and tools. "Ask"
7
7
  * starts a chat where it works, `@name` ready. Those who manage where it
8
8
  * belongs change it in place (`?edit=1` opens it so) and delete it, after
9
- * a question that says it leaves every space it works in. The app's own
10
- * agents are read only; a manager starts a new agent from one. Its menu
11
- * adds it to another space they manage, and has it answer new chats where
12
- * the person is.
9
+ * a question that says it leaves every space it works in. The org's team
10
+ * (the app's agents, and those the org made, `in: "*"`) is its owners' and
11
+ * admins': they change one in place (one of the app's becomes the org's
12
+ * version of it, its model still the tier's) and take it off the team;
13
+ * anyone else reads it, and a space's manager starts a new agent from one.
14
+ * Its menu adds it to another space they manage, and has it answer new chats
15
+ * where the person is.
13
16
  */
14
- import { useState } from "react";
17
+ import { useEffect, useState } from "react";
15
18
  import { Avatar, Badge, Button, Card, DetailList, Dialog, EmptyState, go, Icon, IconButton, LongText, Menu, message, Notice, openPalette, Page, Skeleton, Title, } from "copilotz/web";
19
+ import { runs, useStanding } from "copilotz/plugins/interfaces/contract";
16
20
  import { AgentFields } from "./agent-fields.js";
21
+ import { KindField } from "./agent-describe.js";
17
22
  import { spaceStep } from "./agent-steps.js";
18
23
  import { agentPath, listed, shownAs } from "./agents.js";
19
24
  import { managed, manages, placeName, placePath } from "./places.js";
20
25
  import { STYLE } from "./style.js";
26
+ import { sayText } from "copilotz/web/words";
21
27
  import { say } from "./words.js";
28
+ /** Where the org's own agents belong, as the access plugin keeps it: the org itself. */
29
+ const ORG = "*";
22
30
  export const agentView = (item, ctx) => {
23
31
  const id = item._id ?? "";
24
32
  const here = typeof ctx.hints.in === "string" ? ctx.hints.in : undefined;
@@ -29,8 +37,13 @@ export const agentView = (item, ctx) => {
29
37
  const places = ctx.db.collection("space").query("reached", {}).value;
30
38
  const options = ctx.db.collection("agent").query("options", {}).value;
31
39
  const seats = ctx.db.collection("member").find({ member: `agent:${id}` }).value;
40
+ // Kinds of work, where tiers give agents their models (their front end says so: `agentKinds`).
41
+ const kindsAsked = !!ctx.resources.agentKinds?.query;
42
+ const tiers = kindsAsked
43
+ ? ctx.db.collection("modelChoice").query("offered", {}).value
44
+ : undefined;
32
45
  const style = _jsx("style", { href: "team-web", precedence: "copilotz", children: STYLE });
33
- if (!roster || !places || !options || !seats) {
46
+ if (!roster || !places || !options || !seats || (kindsAsked && !tiers)) {
34
47
  return (_jsxs(Page, { title: _jsx(Skeleton, { width: 200, height: 30 }), leading: _jsx(Skeleton, { width: 52, height: 52 }), children: [style, _jsxs("div", { className: "agent-page", "aria-busy": "true", children: [_jsx(Skeleton, { height: 64, radius: "xl" }), _jsx(Skeleton, { height: 160, radius: "xl" })] })] }));
35
48
  }
36
49
  const agent = roster.agents[id];
@@ -38,16 +51,31 @@ export const agentView = (item, ctx) => {
38
51
  return (_jsxs("div", { className: "agent-missing", children: [style, _jsx(Title, { text: say("noSuchAgentTitle") }), _jsx(EmptyState, { icon: "bot", heading: "h1", title: say("noSuchAgent"), action: _jsx(Button, { variant: "primary", icon: "compose", href: "/", children: say("goHome") }), children: say("noSuchAgentBody") })] }));
39
52
  }
40
53
  const query = (ctx.hints.query ?? {});
41
- return (_jsxs(_Fragment, { children: [style, _jsx(AgentPage, { id: id, agent: agent, here: places.find((p) => p._id === here), answers: !!here && roster.here.includes(id) && roster.default.includes(id), places: places, seats: seats.filter((s) => !s.on), options: options, editing: query.edit === "1", call: ctx.call }, id)] }));
54
+ return (_jsxs(_Fragment, { children: [style, _jsx(AgentPage, { id: id, agent: agent, here: places.find((p) => p._id === here), answers: !!here && roster.here.includes(id) && roster.default.includes(id), places: places, seats: seats.filter((s) => !s.on), options: options, kinds: tiers?.kinds.map((k) => ({
55
+ kind: k.kind,
56
+ title: sayText(k.title),
57
+ agents: k.agents.map((a) => a.name),
58
+ })), editing: query.edit === "1", call: ctx.call }, id)] }));
42
59
  };
43
- function AgentPage({ id, agent, here, answers, places, seats, options, editing: asked, call }) {
60
+ function AgentPage({ id, agent, here, answers, places, seats, options, kinds, editing: asked, call }) {
44
61
  const { name, icon } = shownAs(id, agent);
45
62
  const home = agent.in ? places.find((p) => p._id === agent.in) : undefined;
46
- const edits = !!home && manages(home);
63
+ const app = !agent.in;
64
+ // The org's team: the app's agents (as they are, or the org's version) and the org's own.
65
+ const team = app || agent.in === ORG;
66
+ // One of the app's, as it is or as the org changed it: its model is the tier's.
67
+ const appBased = app || (agent.in === ORG && agent.default === true);
68
+ const standing = useStanding(call, team);
69
+ const runsTeam = !!standing && runs(standing);
70
+ const edits = team ? runsTeam : !!home && manages(home);
47
71
  const [editing, setEditing] = useState(asked && edits);
72
+ // Asked for in the address (`?edit=1`) before the person's standing was known: open it once it is.
73
+ useEffect(() => {
74
+ if (asked && edits)
75
+ setEditing(true);
76
+ }, [asked, edits]);
48
77
  const [deleting, setDeleting] = useState(false);
49
78
  const [error, setError] = useState();
50
- const app = !agent.in;
51
79
  const placeOf = (space) => places.find((p) => p._id === space);
52
80
  const working = seats.flatMap((s) => {
53
81
  const place = placeOf(s.space);
@@ -58,6 +86,11 @@ function AgentPage({ id, agent, here, answers, places, seats, options, editing:
58
86
  const seatHere = here && seats.find((s) => s.space === here._id);
59
87
  // Back to the space the person is in, if it works there; else to where it belongs.
60
88
  const back = seatHere ? here : home;
89
+ const backTo = back
90
+ ? { href: placePath(back._id, "members"), label: placeName(back) }
91
+ : team
92
+ ? { href: "/org?tab=models", label: say("orgsTeam") }
93
+ : undefined;
61
94
  // Where asking it starts a chat: here if it answers chats here, else where it does.
62
95
  const ask = seatHere?.role === "editor"
63
96
  ? here
@@ -101,14 +134,14 @@ function AgentPage({ id, agent, here, answers, places, seats, options, editing:
101
134
  ...(elsewhere.length
102
135
  ? [{ label: say("addToSpaceMenu"), icon: "plus", onSelect: addStep }]
103
136
  : []),
104
- ...(app && mine.length
137
+ ...(appBased && mine.length
105
138
  ? [{ label: say("startFromIt"), icon: "sparkles", onSelect: fromStep }]
106
139
  : []),
107
140
  ...(edits
108
141
  ? [
109
142
  "separator",
110
143
  {
111
- label: say("deleteMenu", { name }),
144
+ label: team ? say("removeFromTeamMenu") : say("deleteMenu", { name }),
112
145
  icon: "trash",
113
146
  tone: "destructive",
114
147
  onSelect: () => setDeleting(true),
@@ -116,15 +149,17 @@ function AgentPage({ id, agent, here, answers, places, seats, options, editing:
116
149
  ]
117
150
  : []),
118
151
  ];
119
- return (_jsxs(Page, { className: "agent-page-frame", leading: _jsx(Avatar, { name: name, kind: "agent", icon: icon, size: 52, className: "agent-mark" }), title: name, back: back ? { href: placePath(back._id, "members"), label: placeName(back) } : undefined, badges: _jsxs(_Fragment, { children: [_jsxs(Badge, { variant: "outline", className: "agent-page-handle", children: ["@", id] }), app ? _jsx(Badge, { children: say("partOfApp") }) : (_jsx(Badge, { tone: "primary", children: home ? say("madeIn", { place: placeName(home) }) : say("madeElsewhere") })), answers && here ? _jsx(Badge, { tone: "success", children: say("answersNewChatsHere") }) : null] }), description: agent.description, actions: editing ? null : (_jsxs(_Fragment, { children: [ask
152
+ return (_jsxs(Page, { className: "agent-page-frame", leading: _jsx(Avatar, { name: name, kind: "agent", icon: icon, size: 52, className: "agent-mark" }), title: name, back: backTo, badges: _jsxs(_Fragment, { children: [_jsxs(Badge, { variant: "outline", className: "agent-page-handle", children: ["@", id] }), app ? _jsx(Badge, { children: say("partOfApp") }) : agent.in === ORG
153
+ ? (_jsx(Badge, { tone: "primary", children: appBased ? say("changedForOrg") : say("orgsTeam") }))
154
+ : (_jsx(Badge, { tone: "primary", children: home ? say("madeIn", { place: placeName(home) }) : say("madeElsewhere") })), answers && here ? _jsx(Badge, { tone: "success", children: say("answersNewChatsHere") }) : null] }), description: agent.description && sayText(agent.description), actions: editing ? null : (_jsxs(_Fragment, { children: [ask
120
155
  ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "primary", icon: "chat", href: askAt(ask), className: "agent-wide", children: say("askAgent", { name }) }), _jsx(IconButton, { icon: "chat", label: say("askAgent", { name }), variant: "primary", href: askAt(ask), className: "agent-narrow" })] }))
121
156
  : null, edits
122
157
  ? (_jsxs(_Fragment, { children: [_jsx(Button, { icon: "pencil", className: "agent-wide", onClick: () => setEditing(true), children: say("edit") }), _jsx(IconButton, { icon: "pencil", label: say("editAgent", { name }), variant: "outline", className: "agent-narrow", onClick: () => setEditing(true) })] }))
123
158
  : null, more.length ? _jsx(Menu, { label: say("moreMenu", { name }), align: "end", items: more }) : null] })), children: [_jsx(Title, { text: name }), error
124
159
  ? _jsx(Notice, { tone: "destructive", role: "alert", className: "agent-page-error", children: error })
125
160
  : null, editing
126
- ? _jsx(Edit, { id: id, agent: agent, options: options, call: call, done: done })
127
- : (_jsxs("div", { className: "agent-page", children: [app
161
+ ? (_jsx(Edit, { id: id, agent: agent, options: options, call: call, done: done, tierModel: appBased, kinds: kinds }))
162
+ : (_jsxs("div", { className: "agent-page", children: [app && !runsTeam
128
163
  ? (_jsx(Notice, { tone: "neutral", icon: "lock", action: mine.length
129
164
  ? (_jsx(Button, { size: "sm", icon: "sparkles", onClick: fromStep, children: say("startFromShort") }))
130
165
  : null, children: say("appAgentNotice") }))
@@ -163,7 +198,7 @@ function AgentPage({ id, agent, here, answers, places, seats, options, editing:
163
198
  : say("noTools"),
164
199
  },
165
200
  ] })] })] })), edits
166
- ? (_jsx(Delete, { open: deleting, onClose: () => setDeleting(false), id: id, name: name, spaces: working.map((w) => placeName(w.place)), after: home ? placePath(home._id, "members") : "/", call: call }))
201
+ ? (_jsx(Delete, { open: deleting, onClose: () => setDeleting(false), id: id, name: name, spaces: working.map((w) => placeName(w.place)), after: home ? placePath(home._id, "members") : team ? "/org?tab=models" : "/", call: call, ...(team ? { team: appBased ? "back" : "gone" } : {}) }))
167
202
  : null] }));
168
203
  }
169
204
  /** How many tools show before "Show all". */
@@ -186,7 +221,11 @@ const modelName = (model) => typeof model === "string"
186
221
  ? model.map(modelName).join(say("modelsThenJoin"))
187
222
  : modelName(model.model);
188
223
  /** Changing it, in place: its fields, then Save (what changed only) or Cancel. */
189
- function Edit({ id, agent, options, call, done }) {
224
+ function Edit({ id, agent, options, call, done, tierModel, kinds }) {
225
+ const wasLike = agent.like && kinds?.some((k) => k.kind === agent.like)
226
+ ? agent.like
227
+ : kinds?.[0]?.kind ?? "";
228
+ const [like, setLike] = useState(wasLike);
190
229
  const was = {
191
230
  name: shownAs(id, agent).name,
192
231
  icon: agent.icon ?? "",
@@ -198,8 +237,14 @@ function Edit({ id, agent, options, call, done }) {
198
237
  const [draft, setDraft] = useState(was);
199
238
  const [busy, setBusy] = useState(false);
200
239
  const [error, setError] = useState();
201
- const changed = changes(was, draft);
202
- const ready = !!draft.name.trim() && !!draft.model;
240
+ const changed = {
241
+ ...changes(was, draft),
242
+ ...(kinds?.length && !tierModel && like !== wasLike ? { like } : {}),
243
+ };
244
+ // Where tiers give it its model, nothing's chosen here: the model isn't sent.
245
+ if (kinds?.length || tierModel)
246
+ delete changed.model;
247
+ const ready = !!draft.name.trim() && (!!kinds?.length || !!tierModel || !!draft.model);
203
248
  return (_jsxs("form", { className: "agent-edit", "aria-label": say("changeAgent", { name: was.name }), onSubmit: async (event) => {
204
249
  event.preventDefault();
205
250
  if (!ready || busy)
@@ -216,7 +261,13 @@ function Edit({ id, agent, options, call, done }) {
216
261
  setError(message(e));
217
262
  setBusy(false);
218
263
  }
219
- }, children: [_jsx(Card, { className: "agent-edit-card", children: _jsx(AgentFields, { value: draft, onChange: (patch) => setDraft((now) => ({ ...now, ...patch })), options: options, handle: id, call: call, autoFocus: true, disabled: busy }) }), _jsxs("div", { className: "agent-edit-end", children: [_jsx("p", { className: "agent-form-note", "aria-live": "polite", children: error
264
+ }, children: [_jsx(Card, { className: "agent-edit-card", children: _jsx(AgentFields, { value: draft, onChange: (patch) => setDraft((now) => ({ ...now, ...patch })), options: options, handle: id, call: call, autoFocus: true, disabled: busy, model: tierModel
265
+ ? (_jsx(Notice, { tone: "neutral", icon: "sparkles", children: say.nodes("tierModel", {
266
+ place: _jsx("a", { href: "/org?tab=models", children: say("tierModelPlace") }),
267
+ }) }))
268
+ : kinds?.length
269
+ ? _jsx(KindField, { kinds: kinds, value: like, onChange: setLike, disabled: busy })
270
+ : undefined }) }), _jsxs("div", { className: "agent-edit-end", children: [_jsx("p", { className: "agent-form-note", "aria-live": "polite", children: error
220
271
  ? _jsx("span", { className: "agent-error", role: "alert", children: error })
221
272
  : say("keepsHandle", { handle: id }) }), _jsx(Button, { onClick: done, disabled: busy, children: say("cancel") }), _jsx(Button, { type: "submit", variant: "primary", icon: "check", loading: busy, disabled: !ready || !Object.keys(changed).length, children: say("saveChanges") })] })] }));
222
273
  }
@@ -233,10 +284,10 @@ function changes(was, now) {
233
284
  return out;
234
285
  }
235
286
  /** Deleting it, once they've read what it means: it leaves every space it works in. */
236
- function Delete({ open, onClose, id, name, spaces, after, call }) {
287
+ function Delete({ open, onClose, id, name, spaces, after, call, team }) {
237
288
  const [busy, setBusy] = useState(false);
238
289
  const [error, setError] = useState();
239
- return (_jsxs(Dialog, { open: open, onClose: onClose, size: "sm", title: say("deleteTitle", { name }), footer: _jsxs(_Fragment, { children: [_jsx(Button, { onClick: onClose, disabled: busy, children: say("cancel") }), _jsx(Button, { variant: "destructive", icon: "trash", loading: busy, onClick: async () => {
290
+ return (_jsxs(Dialog, { open: open, onClose: onClose, size: "sm", title: team ? say("removeTeamTitle", { name }) : say("deleteTitle", { name }), footer: _jsxs(_Fragment, { children: [_jsx(Button, { onClick: onClose, disabled: busy, children: say("cancel") }), _jsx(Button, { variant: "destructive", icon: "trash", loading: busy, onClick: async () => {
240
291
  setBusy(true);
241
292
  setError(undefined);
242
293
  try {
@@ -248,10 +299,12 @@ function Delete({ open, onClose, id, name, spaces, after, call }) {
248
299
  setError(message(e));
249
300
  setBusy(false);
250
301
  }
251
- }, children: say("deleteButton", { name }) })] }), children: [_jsxs("ul", { className: "agent-delete-means", children: [_jsx("li", { children: spaces.length
252
- ? say.nodes("deleteLeavesNamed", {
253
- bold: _jsx("b", { children: say("deleteLeavesBold") }),
254
- spaces: listed(spaces),
255
- })
256
- : say.nodes("deleteLeaves", { bold: _jsx("b", { children: say("deleteLeavesBold") }) }) }), _jsx("li", { children: say.nodes("deleteGone", { bold: _jsx("b", { children: say("deleteGoneBold") }) }) }), _jsx("li", { children: say.nodes("deleteChats", { bold: _jsx("b", { children: say("deleteChatsBold") }) }) })] }), error ? _jsx(Notice, { tone: "destructive", role: "alert", children: error }) : null] }));
302
+ }, children: team ? say("removeButton") : say("deleteButton", { name }) })] }), children: [team
303
+ ? (_jsxs("ul", { className: "agent-delete-means", children: [_jsx("li", { children: say.nodes("teamLeaves", { bold: _jsx("b", { children: say("teamLeavesBold") }) }) }), _jsx("li", { children: say("teamSaidStays") }), _jsx("li", { children: team === "back" ? say("teamAddBack") : say("teamDeleted") })] }))
304
+ : (_jsxs("ul", { className: "agent-delete-means", children: [_jsx("li", { children: spaces.length
305
+ ? say.nodes("deleteLeavesNamed", {
306
+ bold: _jsx("b", { children: say("deleteLeavesBold") }),
307
+ spaces: listed(spaces),
308
+ })
309
+ : say.nodes("deleteLeaves", { bold: _jsx("b", { children: say("deleteLeavesBold") }) }) }), _jsx("li", { children: say.nodes("deleteGone", { bold: _jsx("b", { children: say("deleteGoneBold") }) }) }), _jsx("li", { children: say.nodes("deleteChats", { bold: _jsx("b", { children: say("deleteChatsBold") }) }) })] })), error ? _jsx(Notice, { tone: "destructive", role: "alert", children: error }) : null] }));
257
310
  }
@@ -14,8 +14,10 @@
14
14
  import { type ReactNode } from "react";
15
15
  import type { ViewContext } from "copilotz";
16
16
  export type ModelPick = {
17
- action: string;
17
+ action?: string;
18
18
  input?: Record<string, unknown>;
19
+ /** Called with the model chosen, in place of `action`: a page that does more with it. */
20
+ onPick?(model: string): Promise<unknown>;
19
21
  look?: "field" | "link";
20
22
  label?: string;
21
23
  disabled?: boolean;
@@ -26,7 +26,10 @@ function Pick({ value, pick, call }) {
26
26
  setBusy(true);
27
27
  setError(undefined);
28
28
  try {
29
- await call(pick.action, { ...pick.input, model });
29
+ if (pick.onPick)
30
+ await pick.onPick(model);
31
+ else if (pick.action)
32
+ await call(pick.action, { ...pick.input, model });
30
33
  }
31
34
  catch (e) {
32
35
  setError(message(e));
@@ -6,4 +6,4 @@
6
6
  * it's told, what it uses, changing and deleting it). Only layout: the
7
7
  * pieces are the toolkit's.
8
8
  */
9
- export declare const STYLE = "\n/* Choosing a model */\n.model-chosen { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px;\n padding: 8px 12px; border: 1px solid var(--input); border-radius: var(--radius-md);\n background: var(--background); color: inherit; font: inherit; text-align: left; cursor: pointer;\n transition: border-color .15s, background-color .15s; }\n.model-chosen:hover:not(:disabled) { background: var(--accent); }\n.model-chosen:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }\n.model-chosen:disabled { opacity: .6; cursor: default; }\n.model-chosen > .copilotz-icon { flex: none; color: var(--muted-foreground); }\n.model-chosen-text, .model-row-text { display: grid; flex: 1; min-width: 0; gap: 1px; }\n.model-chosen-text b, .model-row-text b { overflow: hidden; font-size: 14px; font-weight: 580;\n text-overflow: ellipsis; white-space: nowrap; }\n.model-chosen-text span, .model-row-text span { overflow: hidden; color: var(--muted-foreground);\n font-size: 12.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }\n.model-dialog .copilotz-dialog-body { display: flex; min-height: min(560px, calc(100dvh - 130px)); }\n.model-choose { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; }\n.model-groups { display: grid; gap: 16px; }\n.model-group { margin: 0 0 6px; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }\n.model-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.model-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;\n padding: 7px 10px; border: 0; border-radius: var(--radius-md); background: transparent;\n color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.model-row:hover:not(:disabled) { background: var(--accent); }\n.model-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }\n.model-row:disabled { opacity: .55; cursor: not-allowed; }\n.model-row[aria-current] { background: var(--primary-soft); }\n.model-row > .copilotz-icon { flex: none; color: var(--muted-foreground); }\n.model-row[aria-current] > .copilotz-icon { color: var(--primary); }\n.model-row .model-row-text span { white-space: normal; }\n.model-none { margin: 24px 0; color: var(--muted-foreground); font-size: 14px; text-align: center; }\n.model-provider-head { display: flex; align-items: center; gap: 8px; margin-left: -6px; }\n.model-provider-head h3 { margin: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }\n.model-provider-note { margin: -6px 0 0; color: var(--muted-foreground); font-size: 13px; }\n.model-key { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); }\n.model-key label { font-size: 13.5px; font-weight: 600; }\n.model-key p { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.model-key-entry { display: flex; flex-wrap: wrap; gap: 8px; }\n.model-key-entry > .copilotz-input { flex: 1 1 180px; min-width: 0; }\n.model-key p.model-key-error, .model-key-error { margin: 0; color: var(--destructive-text, var(--destructive));\n font-size: 13px; }\n.model-key-kept { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;\n gap: 4px 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); font-size: 13px; }\n.model-key-actions { display: flex; }\n.model-key-kept .model-key-error { flex-basis: 100%; }\n.model-pick { display: grid; gap: 4px; min-width: 0; }\n.model-pick[data-look=link] { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }\n.model-pick-error { color: var(--destructive-text, var(--destructive)); font-size: 12.5px; line-height: 1.4; }\n.model-change { height: auto; padding: 0; font-size: 13px; }\n\n/* Adding an agent to a space */\n.agent-add { container: agent-add / inline-size; display: grid; gap: 14px; }\n.agent-known { display: grid; gap: 12px; }\n.agent-known-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }\n.agent-known-find { flex: 1; min-width: 0; }\n.agent-known-intro { margin: 0; color: var(--muted-foreground); font-size: 13px; }\n.agent-known-role { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground);\n font-size: 13px; }\n.agent-known-role .copilotz-select { min-width: 112px; }\n.agent-known-list { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); max-height: min(420px, 52vh); overflow-y: auto;\n scrollbar-width: thin; }\n.agent-known-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n width: 100%; min-height: 56px; padding: 8px 8px 8px 10px; border: 0; border-radius: var(--radius-lg);\n background: transparent; color: inherit; font: inherit; text-align: left; }\n.agent-known-row + .agent-known-row, li + .agent-known-row { border-top: 1px solid var(--border); border-radius: 0; }\n.agent-known-new { cursor: pointer; transition: background-color .12s; }\n.agent-known-new:hover { background: var(--accent); }\n.agent-known-new > .copilotz-icon { color: var(--muted-foreground); margin-right: 6px; }\n.agent-known-plus { display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--primary-border);\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.agent-known-text { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }\n.agent-known-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.agent-known-what { overflow: hidden; color: var(--muted-foreground); font-size: 12.5px; text-overflow: ellipsis;\n white-space: nowrap; }\n.agent-known-from { margin-left: 8px; color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.agent-known-from::before { content: \"\u00B7\"; margin-right: 8px; }\n.agent-known-none { margin: 0 2px; color: var(--muted-foreground); font-size: 13px; text-align: center; }\n.agent-handle { color: var(--muted-foreground); font: 500 12px var(--font-mono); }\n.agent-form-note b.agent-handle, .copilotz-field-note b.agent-handle { color: var(--secondary-foreground); }\n.agent-done { display: inline-flex; align-items: center; gap: 6px; color: var(--success-text); }\n.agent-error { color: var(--destructive-text); }\n@container agent-add (max-width: 420px) {\n .agent-known-tools { flex-wrap: wrap; }\n .agent-known-find { flex-basis: 100%; }\n .agent-known-from { display: block; margin-left: 0; }\n .agent-known-from::before { content: none; }\n}\n\n/* Making one */\n.agent-new { display: grid; gap: 20px; }\n.agent-new :is(input, textarea, select, button) { scroll-margin-bottom: 84px; }\n.agent-new-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -4px; }\n.agent-new-top > .copilotz-button { margin-left: -8px; }\n.agent-new-from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 13px; }\n.agent-new-from .copilotz-select { min-width: 170px; }\n.agent-new-end { position: sticky; bottom: -22px; z-index: 1; display: flex; align-items: center; justify-content: flex-end;\n gap: 14px; margin: 0 -22px -22px; padding: 12px 22px 16px; border-top: 1px solid var(--border);\n background: var(--popover); }\n.agent-new-end .agent-form-note { flex: 1; min-width: 0; }\n.agent-new-end .agent-form-note:empty { visibility: hidden; }\n\n/* The form: who it is, what it does, what it's told, what it uses */\n.agent-form { display: grid; gap: 20px; }\n.agent-form-who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }\n.agent-form-who > .copilotz-avatar { margin-top: 22px; box-shadow: var(--shadow-sm); }\n.agent-face-empty { display: grid; place-items: center; width: 56px; height: 56px; margin-top: 22px;\n border: 1.5px dashed var(--input); border-radius: var(--radius-xl); background: var(--muted);\n color: var(--muted-foreground); }\n.agent-form-field { display: grid; gap: 7px; min-width: 0; }\n.agent-form-label { font-size: 13.5px; font-weight: 600; color: var(--foreground); }\n.agent-form-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px;\n margin: -4px 0 -3px; }\n.agent-form-label-row > .copilotz-button { margin-right: -6px; }\n.agent-form-count { margin-left: 6px; color: var(--muted-foreground); font-weight: 500; font-variant-numeric: tabular-nums; }\n.agent-form-note { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.agent-undo { min-height: 0; padding: 0; vertical-align: baseline; }\n.agent-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }\n.agent-icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border);\n border-radius: var(--radius-md); background: var(--card); color: var(--secondary-foreground); font-size: 18px;\n line-height: 1; cursor: pointer; transition: background-color .12s, border-color .12s, transform .12s; }\n.agent-icon:hover:not(:disabled) { background: var(--accent); transform: translateY(-1px); }\n.agent-icon[aria-checked=true] { border-color: var(--ring); background: var(--primary-soft);\n outline: 2px solid color-mix(in oklab, var(--ring) 22%, transparent); }\n.agent-icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n.agent-icon-none { font-size: 13px; font-weight: 650; }\n.agent-icon-own { width: 84px; height: 36px; }\n.agent-icon-own:has(input[data-chosen]) { border-color: var(--ring); background: var(--primary-soft); }\n.agent-instructions { position: relative; }\n.agent-instructions .copilotz-textarea { font-size: 14px; line-height: 1.55; }\n.agent-instructions[data-busy] .copilotz-textarea { color: transparent; }\n.agent-drafting { position: absolute; inset: 1px; display: grid; align-content: start; gap: 10px; overflow: hidden;\n padding: 12px 14px; border-radius: var(--radius-lg); background: color-mix(in oklab, var(--card) 94%, transparent);\n animation: agent-fade .2s ease-out; }\n.agent-drafting-say { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--primary-text);\n font-size: 13px; font-weight: 560; }\n@keyframes agent-fade { from { opacity: 0; } }\n.agent-tools { display: grid; gap: 6px; padding: 6px 6px 8px 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: color-mix(in oklab, var(--muted) 35%, var(--card)); }\n.agent-tools ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 8px 16px; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }\n.agent-tools-all { display: flex; gap: 12px; }\n.agent-tools-all .copilotz-button { min-height: 26px; padding: 0; }\n.agent-tool { display: grid; gap: 1px; }\n.agent-tool code { font: 600 12.5px var(--font-mono); }\n.agent-tool span { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }\n.agent-tools-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted-foreground);\n font-size: 12.5px; }\n.agent-tools-line code { padding: 2px 7px; border-radius: var(--radius-full); background: var(--muted);\n color: var(--secondary-foreground); font: 500 12px var(--font-mono); }\n\n/* Made: what's next */\n.agent-made { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; padding: 18px;\n border: 1px solid var(--success-border); border-radius: var(--radius-xl);\n background: color-mix(in oklab, var(--success-soft) 55%, var(--card)); animation: agent-rise .25s ease-out; }\n@keyframes agent-rise { from { opacity: 0; transform: translateY(4px); } }\n.agent-made-face { position: relative; }\n.agent-made-check { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px;\n height: 20px; border: 2px solid var(--card); border-radius: var(--radius-full); background: var(--success);\n color: var(--success-foreground); }\n.agent-made-text { display: grid; gap: 4px; min-width: 0; }\n.agent-made-text h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 650; }\n.agent-made-text p { margin: 0; color: var(--secondary-foreground); font-size: 13.5px; }\n.agent-made-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }\n\n/* An agent's page */\n.agent-mark { box-shadow: var(--shadow-sm); }\n.agent-narrow { display: none; }\n@container copilotz-page (max-width: 640px) {\n .agent-wide { display: none; }\n .agent-narrow { display: inline-grid; }\n .agent-mark { --size: 40px !important; }\n}\n.agent-page-handle { font: 500 12px var(--font-mono); }\n.agent-page { display: grid; gap: 26px; }\n.agent-page-error { margin-bottom: 16px; }\n.agent-page-note { display: flex; align-items: center; gap: 7px; margin: -6px 0 -8px; color: var(--muted-foreground);\n font-size: 13px; }\n.agent-section { display: grid; gap: 10px; }\n.agent-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px;\n margin-bottom: -4px; }\n.agent-section-head .copilotz-button { margin-right: -6px; }\n.agent-section-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground);\n font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.agent-count { font-variant-numeric: tabular-nums; letter-spacing: 0; }\n.agent-seats { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-sm); }\n.agent-seat { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px 8px 10px;\n border-radius: var(--radius-lg); color: inherit; text-decoration: none; transition: background-color .12s; }\n.agent-seat:hover { background: var(--accent); }\n.agent-seat > .copilotz-icon { color: var(--muted-foreground); }\n.agent-seat-personal { display: grid; place-items: center; flex: none; width: 28px; height: 28px;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.agent-seat-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }\n.agent-none { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }\n.agent-instructions-read { font-size: 14.5px; line-height: 1.6; }\n.agent-tool-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));\n gap: 10px 22px; margin: 0; padding: 0; }\n.agent-tool-list li { display: grid; gap: 1px; min-width: 0; }\n.agent-tool-list code { font: 600 12.5px var(--font-mono); }\n.agent-tool-list span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;\n color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.agent-tool-list span:empty { display: none; }\n.agent-tools-read { display: grid; justify-items: start; gap: 8px; }\n.agent-tools-read > .copilotz-button { min-height: 0; padding: 0; }\n.agent-edit { display: grid; gap: 14px; }\n.agent-edit-card { padding: 20px; }\n.agent-edit-end { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px;\n margin: 0 -24px -64px; padding: 14px 24px 18px; border-top: 1px solid var(--border);\n background: color-mix(in oklab, var(--background) 92%, transparent); backdrop-filter: blur(8px); }\n.agent-edit-end .agent-form-note { flex: 1; min-width: 0; }\n.agent-delete-means { display: grid; gap: 10px; margin: 0 0 4px; padding: 0 0 0 18px; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.agent-delete-means b { color: var(--foreground); font-weight: 620; }\n.agent-delete-means + .copilotz-notice { margin-top: 14px; }\n.agent-missing { display: grid; place-items: center; height: 100%; padding: 32px; }\n@container copilotz-page (max-width: 560px) {\n .agent-edit-card { padding: 16px; }\n .agent-edit-end { flex-wrap: wrap; margin: 0 -16px -48px; padding: 12px 16px 14px; }\n .agent-edit-end .agent-form-note { flex-basis: 100%; }\n .agent-edit-end .copilotz-button { flex: 1; }\n .agent-form-who { gap: 12px; }\n .agent-form-who > .copilotz-avatar { --size: 44px !important; margin-top: 24px; }\n .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }\n}\n@container agent-add (max-width: 420px) {\n .agent-form-who { gap: 12px; }\n .agent-form-who > .copilotz-avatar { --size: 44px !important; margin-top: 24px; }\n .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }\n .agent-new-top { flex-wrap: wrap; }\n .agent-new-end { flex-wrap: wrap; }\n .agent-new-end .agent-form-note { flex-basis: 100%; }\n .agent-new-end .agent-form-note:empty { display: none; }\n .agent-new-end .copilotz-button { flex: 1; }\n}\n";
9
+ export declare const STYLE = "\n/* Choosing a model */\n.model-chosen { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px;\n padding: 8px 12px; border: 1px solid var(--input); border-radius: var(--radius-md);\n background: var(--background); color: inherit; font: inherit; text-align: left; cursor: pointer;\n transition: border-color .15s, background-color .15s; }\n.model-chosen:hover:not(:disabled) { background: var(--accent); }\n.model-chosen:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }\n.model-chosen:disabled { opacity: .6; cursor: default; }\n.model-chosen > .copilotz-icon { flex: none; color: var(--muted-foreground); }\n.model-chosen-text, .model-row-text { display: grid; flex: 1; min-width: 0; gap: 1px; }\n.model-chosen-text b, .model-row-text b { overflow: hidden; font-size: 14px; font-weight: 580;\n text-overflow: ellipsis; white-space: nowrap; }\n.model-chosen-text span, .model-row-text span { overflow: hidden; color: var(--muted-foreground);\n font-size: 12.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }\n.model-dialog .copilotz-dialog-body { display: flex; min-height: min(560px, calc(100dvh - 130px)); }\n.model-choose { display: flex; flex: 1; flex-direction: column; gap: 12px; min-width: 0; }\n.model-groups { display: grid; gap: 16px; }\n.model-group { margin: 0 0 6px; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }\n.model-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.model-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;\n padding: 7px 10px; border: 0; border-radius: var(--radius-md); background: transparent;\n color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.model-row:hover:not(:disabled) { background: var(--accent); }\n.model-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }\n.model-row:disabled { opacity: .55; cursor: not-allowed; }\n.model-row[aria-current] { background: var(--primary-soft); }\n.model-row > .copilotz-icon { flex: none; color: var(--muted-foreground); }\n.model-row[aria-current] > .copilotz-icon { color: var(--primary); }\n.model-row .model-row-text span { white-space: normal; }\n.model-none { margin: 24px 0; color: var(--muted-foreground); font-size: 14px; text-align: center; }\n.model-provider-head { display: flex; align-items: center; gap: 8px; margin-left: -6px; }\n.model-provider-head h3 { margin: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }\n.model-provider-note { margin: -6px 0 0; color: var(--muted-foreground); font-size: 13px; }\n.model-key { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); }\n.model-key label { font-size: 13.5px; font-weight: 600; }\n.model-key p { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.model-key-entry { display: flex; flex-wrap: wrap; gap: 8px; }\n.model-key-entry > .copilotz-input { flex: 1 1 180px; min-width: 0; }\n.model-key p.model-key-error, .model-key-error { margin: 0; color: var(--destructive-text, var(--destructive));\n font-size: 13px; }\n.model-key-kept { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;\n gap: 4px 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: var(--card); font-size: 13px; }\n.model-key-actions { display: flex; }\n.model-key-kept .model-key-error { flex-basis: 100%; }\n.model-pick { display: grid; gap: 4px; min-width: 0; }\n.model-pick[data-look=link] { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }\n.model-pick-error { color: var(--destructive-text, var(--destructive)); font-size: 12.5px; line-height: 1.4; }\n.model-change { height: auto; padding: 0; font-size: 13px; }\n\n/* Adding an agent to a space */\n.agent-add { container: agent-add / inline-size; display: grid; gap: 14px; }\n.agent-known { display: grid; gap: 12px; }\n.agent-known-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }\n.agent-known-find { flex: 1; min-width: 0; }\n.agent-known-intro { margin: 0; color: var(--muted-foreground); font-size: 13px; }\n.agent-known-role { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground);\n font-size: 13px; }\n.agent-known-role .copilotz-select { min-width: 112px; }\n.agent-known-list { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); max-height: min(420px, 52vh); overflow-y: auto;\n scrollbar-width: thin; }\n.agent-known-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;\n width: 100%; min-height: 56px; padding: 8px 8px 8px 10px; border: 0; border-radius: var(--radius-lg);\n background: transparent; color: inherit; font: inherit; text-align: left; }\n.agent-known-row + .agent-known-row, li + .agent-known-row { border-top: 1px solid var(--border); border-radius: 0; }\n.agent-known-new { cursor: pointer; transition: background-color .12s; }\n.agent-known-new:hover { background: var(--accent); }\n.agent-known-new > .copilotz-icon { color: var(--muted-foreground); margin-right: 6px; }\n.agent-known-plus { display: grid; place-items: center; width: 34px; height: 34px; border: 1px dashed var(--primary-border);\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.agent-known-text { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }\n.agent-known-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.agent-known-what { overflow: hidden; color: var(--muted-foreground); font-size: 12.5px; text-overflow: ellipsis;\n white-space: nowrap; }\n.agent-known-from { margin-left: 8px; color: var(--muted-foreground); font-size: 12px; font-weight: 450; }\n.agent-known-from::before { content: \"\u00B7\"; margin-right: 8px; }\n.agent-known-none { margin: 0 2px; color: var(--muted-foreground); font-size: 13px; text-align: center; }\n.agent-handle { color: var(--muted-foreground); font: 500 12px var(--font-mono); }\n.agent-form-note b.agent-handle, .copilotz-field-note b.agent-handle { color: var(--secondary-foreground); }\n.agent-done { display: inline-flex; align-items: center; gap: 6px; color: var(--success-text); }\n.agent-error { color: var(--destructive-text); }\n@container agent-add (max-width: 420px) {\n .agent-known-tools { flex-wrap: wrap; }\n .agent-known-find { flex-basis: 100%; }\n .agent-known-from { display: block; margin-left: 0; }\n .agent-known-from::before { content: none; }\n}\n\n/* Making one */\n.agent-new { display: grid; gap: 20px; }\n.agent-new :is(input, textarea, select, button) { scroll-margin-bottom: 84px; }\n.agent-new-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -4px; }\n.agent-new-top > .copilotz-button { margin-left: -8px; }\n.agent-new-from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 13px; }\n.agent-new-from .copilotz-select { min-width: 170px; }\n.agent-new-end { position: sticky; bottom: -22px; z-index: 1; display: flex; align-items: center; justify-content: flex-end;\n gap: 14px; margin: 0 -22px -22px; padding: 12px 22px 16px; border-top: 1px solid var(--border);\n background: var(--popover); }\n.agent-new-end .agent-form-note { flex: 1; min-width: 0; }\n.agent-new-end .agent-form-note:empty { visibility: hidden; }\n\n/* The form: who it is, what it does, what it's told, what it uses */\n.agent-form { display: grid; gap: 20px; }\n.agent-form-who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }\n.agent-form-who > .copilotz-avatar { margin-top: 22px; box-shadow: var(--shadow-sm); }\n.agent-face-empty { display: grid; place-items: center; width: 56px; height: 56px; margin-top: 22px;\n border: 1.5px dashed var(--input); border-radius: var(--radius-xl); background: var(--muted);\n color: var(--muted-foreground); }\n.agent-form-field { display: grid; gap: 7px; min-width: 0; }\n.agent-form-label { font-size: 13.5px; font-weight: 600; color: var(--foreground); }\n.agent-form-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px;\n margin: -4px 0 -3px; }\n.agent-form-label-row > .copilotz-button { margin-right: -6px; }\n.agent-form-count { margin-left: 6px; color: var(--muted-foreground); font-weight: 500; font-variant-numeric: tabular-nums; }\n.agent-form-note { margin: 0; color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.agent-undo { min-height: 0; padding: 0; vertical-align: baseline; }\n.agent-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }\n.agent-icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border);\n border-radius: var(--radius-md); background: var(--card); color: var(--secondary-foreground); font-size: 18px;\n line-height: 1; cursor: pointer; transition: background-color .12s, border-color .12s, transform .12s; }\n.agent-icon:hover:not(:disabled) { background: var(--accent); transform: translateY(-1px); }\n.agent-icon[aria-checked=true] { border-color: var(--ring); background: var(--primary-soft);\n outline: 2px solid color-mix(in oklab, var(--ring) 22%, transparent); }\n.agent-icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n.agent-icon-none { font-size: 13px; font-weight: 650; }\n.agent-icon-own { width: 84px; height: 36px; }\n.agent-icon-own:has(input[data-chosen]) { border-color: var(--ring); background: var(--primary-soft); }\n.agent-instructions { position: relative; }\n.agent-instructions .copilotz-textarea { font-size: 14px; line-height: 1.55; }\n.agent-instructions[data-busy] .copilotz-textarea { color: transparent; }\n.agent-drafting { position: absolute; inset: 1px; display: grid; align-content: start; gap: 10px; overflow: hidden;\n padding: 12px 14px; border-radius: var(--radius-lg); background: color-mix(in oklab, var(--card) 94%, transparent);\n animation: agent-fade .2s ease-out; }\n.agent-drafting-say { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--primary-text);\n font-size: 13px; font-weight: 560; }\n@keyframes agent-fade { from { opacity: 0; } }\n.agent-tools { display: grid; gap: 6px; padding: 6px 6px 8px 12px; border: 1px solid var(--border);\n border-radius: var(--radius-lg); background: color-mix(in oklab, var(--muted) 35%, var(--card)); }\n.agent-tools ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 8px 16px; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }\n.agent-tools-all { display: flex; gap: 12px; }\n.agent-tools-all .copilotz-button { min-height: 26px; padding: 0; }\n.agent-tool { display: grid; gap: 1px; }\n.agent-tool code { font: 600 12.5px var(--font-mono); }\n.agent-tool span { color: var(--muted-foreground); font-size: 12.5px; line-height: 1.4; }\n.agent-tools-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted-foreground);\n font-size: 12.5px; }\n.agent-tools-line code { padding: 2px 7px; border-radius: var(--radius-full); background: var(--muted);\n color: var(--secondary-foreground); font: 500 12px var(--font-mono); }\n\n/* Made: what's next */\n.agent-made { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; padding: 18px;\n border: 1px solid var(--success-border); border-radius: var(--radius-xl);\n background: color-mix(in oklab, var(--success-soft) 55%, var(--card)); animation: agent-rise .25s ease-out; }\n@keyframes agent-rise { from { opacity: 0; transform: translateY(4px); } }\n.agent-made-face { position: relative; }\n.agent-made-check { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 20px;\n height: 20px; border: 2px solid var(--card); border-radius: var(--radius-full); background: var(--success);\n color: var(--success-foreground); }\n.agent-made-text { display: grid; gap: 4px; min-width: 0; }\n.agent-made-text h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 650; }\n.agent-made-text p { margin: 0; color: var(--secondary-foreground); font-size: 13.5px; }\n.agent-made-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }\n\n/* An agent's page */\n.agent-mark { box-shadow: var(--shadow-sm); }\n.agent-narrow { display: none; }\n@container copilotz-page (max-width: 640px) {\n .agent-wide { display: none; }\n .agent-narrow { display: inline-grid; }\n .agent-mark { --size: 40px !important; }\n}\n.agent-page-handle { font: 500 12px var(--font-mono); }\n.agent-page { display: grid; gap: 26px; }\n.agent-page-error { margin-bottom: 16px; }\n.agent-page-note { display: flex; align-items: center; gap: 7px; margin: -6px 0 -8px; color: var(--muted-foreground);\n font-size: 13px; }\n.agent-section { display: grid; gap: 10px; }\n.agent-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px;\n margin-bottom: -4px; }\n.agent-section-head .copilotz-button { margin-right: -6px; }\n.agent-section-title { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground);\n font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }\n.agent-count { font-variant-numeric: tabular-nums; letter-spacing: 0; }\n.agent-seats { list-style: none; display: grid; margin: 0; padding: 4px; border: 1px solid var(--border);\n border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-sm); }\n.agent-seat { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px 8px 10px;\n border-radius: var(--radius-lg); color: inherit; text-decoration: none; transition: background-color .12s; }\n.agent-seat:hover { background: var(--accent); }\n.agent-seat > .copilotz-icon { color: var(--muted-foreground); }\n.agent-seat-personal { display: grid; place-items: center; flex: none; width: 28px; height: 28px;\n border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-text); }\n.agent-seat-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }\n.agent-none { margin: 0; color: var(--muted-foreground); font-size: 13.5px; }\n.agent-instructions-read { font-size: 14.5px; line-height: 1.6; }\n.agent-tool-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));\n gap: 10px 22px; margin: 0; padding: 0; }\n.agent-tool-list li { display: grid; gap: 1px; min-width: 0; }\n.agent-tool-list code { font: 600 12.5px var(--font-mono); }\n.agent-tool-list span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;\n color: var(--muted-foreground); font-size: 12.5px; line-height: 1.45; }\n.agent-tool-list span:empty { display: none; }\n.agent-tools-read { display: grid; justify-items: start; gap: 8px; }\n.agent-tools-read > .copilotz-button { min-height: 0; padding: 0; }\n.agent-edit { display: grid; gap: 14px; }\n.agent-edit-card { padding: 20px; }\n.agent-edit-end { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px;\n margin: 0 -24px -64px; padding: 14px 24px 18px; border-top: 1px solid var(--border);\n background: color-mix(in oklab, var(--background) 92%, transparent); backdrop-filter: blur(8px); }\n.agent-edit-end .agent-form-note { flex: 1; min-width: 0; }\n.agent-delete-means { display: grid; gap: 10px; margin: 0 0 4px; padding: 0 0 0 18px; color: var(--secondary-foreground);\n font-size: 14px; line-height: 1.5; }\n.agent-delete-means b { color: var(--foreground); font-weight: 620; }\n.agent-delete-means + .copilotz-notice { margin-top: 14px; }\n.agent-missing { display: grid; place-items: center; height: 100%; padding: 32px; }\n@container copilotz-page (max-width: 560px) {\n .agent-edit-card { padding: 16px; }\n .agent-edit-end { flex-wrap: wrap; margin: 0 -16px -48px; padding: 12px 16px 14px; }\n .agent-edit-end .agent-form-note { flex-basis: 100%; }\n .agent-edit-end .copilotz-button { flex: 1; }\n .agent-form-who { gap: 12px; }\n .agent-form-who > .copilotz-avatar { --size: 44px !important; margin-top: 24px; }\n .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }\n}\n@container agent-add (max-width: 420px) {\n .agent-form-who { gap: 12px; }\n .agent-form-who > .copilotz-avatar { --size: 44px !important; margin-top: 24px; }\n .agent-face-empty { width: 44px; height: 44px; margin-top: 24px; }\n .agent-new-top { flex-wrap: wrap; }\n .agent-new-end { flex-wrap: wrap; }\n .agent-new-end .agent-form-note { flex-basis: 100%; }\n .agent-new-end .agent-form-note:empty { display: none; }\n .agent-new-end .copilotz-button { flex: 1; }\n}\n\n/* Making an agent: what it should do, first */\n.agent-describe { display: grid; gap: 12px; }\n.agent-describe-end { display: flex; justify-content: flex-end; gap: 8px; }\n.agent-describe-wait { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground); font-size: 13px; }\n";
@@ -243,4 +243,9 @@ export const STYLE = `
243
243
  .agent-new-end .agent-form-note:empty { display: none; }
244
244
  .agent-new-end .copilotz-button { flex: 1; }
245
245
  }
246
+
247
+ /* Making an agent: what it should do, first */
248
+ .agent-describe { display: grid; gap: 12px; }
249
+ .agent-describe-end { display: flex; justify-content: flex-end; gap: 8px; }
250
+ .agent-describe-wait { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted-foreground); font-size: 13px; }
246
251
  `;
@@ -1,5 +1,5 @@
1
1
  /** Every word Team's web front end shows, to be changed by the app (`team.<key>`). */
2
2
  import { type Phrase } from "copilotz/web/words";
3
- export declare const say: import("copilotz/web/words").Say<"instructions" | "model" | "effort" | "tools" | "replace" | "cancel" | "change" | "listJoin" | "listEnd" | "personalSpace" | "noSuchAgentTitle" | "noSuchAgent" | "noSuchAgentBody" | "goHome" | "partOfApp" | "madeIn" | "madeElsewhere" | "answersNewChatsHere" | "askAgent" | "edit" | "editAgent" | "moreMenu" | "makeAnswerIn" | "addToSpaceMenu" | "startFromIt" | "deleteMenu" | "addToTitle" | "addToNote" | "newLikeTitle" | "newLikeNote" | "newAgentIn" | "startingFrom" | "appAgentNotice" | "startFromShort" | "managersChangeIt" | "managersChangeItElsewhere" | "worksIn" | "addToSpace" | "answersNewChats" | "roleViewer" | "roleEditor" | "worksNowhere" | "modelAndTools" | "thinks" | "toolsLabel" | "noTools" | "showFewer" | "showAll" | "modelsThenJoin" | "changeAgent" | "keepsHandle" | "saveChanges" | "deleteTitle" | "deleteButton" | "deleteLeavesBold" | "deleteLeavesNamed" | "deleteLeaves" | "deleteGoneBold" | "deleteGone" | "deleteChatsBold" | "deleteChats" | "findSpace" | "spacesYouManage" | "justYou" | "keywordPersonal" | "deleteStepNote" | "deleteStepKeep" | "fieldName" | "calledIn" | "nameHint" | "namePlaceholder" | "emoji" | "noEmoji" | "anotherEmoji" | "otherEmoji" | "fieldDoes" | "doesHint" | "doesPlaceholder" | "modelHint" | "rewriteForMe" | "writeForMe" | "sayNameFirst" | "youArePlaceholder" | "youAreDefaultName" | "writingFor" | "draftNote" | "undo" | "instructionsHint" | "instructionsEmptyHint" | "toolsOf" | "toolsChooseDone" | "toolsChoose" | "toolsAll" | "toolsNone" | "toolsMore" | "newAgentForm" | "agentsYouKnow" | "startFrom" | "startBlank" | "worksInAs" | "belongsHint" | "createNamed" | "createAgent" | "worksNow" | "askHandle" | "readsOnly" | "makeAnswer" | "openPage" | "makeAnother" | "notYourSpace" | "archivedSpace" | "managersAdd" | "addAnAgentTitle" | "addAnAgentNote" | "oneOfApps" | "madeInOther" | "findAgent" | "findAgentKnown" | "knownIntro" | "addsAs" | "createNewAgent" | "createNewAgentBody" | "addAgentTo" | "add" | "noneCalled" | "allWorkHere" | "worksNowNames" | "paletteThisAgent" | "paletteThisSpace" | "paletteAgents" | "paletteCreate" | "makeNamedAnswerIn" | "makeNamedAnswer" | "keywordDefault" | "keywordAnswer" | "keywordNewChats" | "addNamedTo" | "addNamedNote" | "keywordMember" | "keywordJoin" | "keywordWork" | "editNamed" | "keywordChange" | "keywordInstructions" | "keywordRename" | "startNewFrom" | "keywordCopy" | "keywordLike" | "keywordCreate" | "addAnAgentTo" | "keywordInvite" | "keywordAgent" | "worksHere" | "newAgent" | "newAgentInHere" | "keywordMake" | "newAgentInStep" | "newAgentInNote" | "chooseModel" | "needsKey" | "yourKey" | "providerModels" | "searchModels" | "readyToUse" | "withOwnKey" | "providers" | "models" | "nothingMatches" | "allProviders" | "noKeyForProvider" | "apiKeyLabel" | "pasteIt" | "save" | "keyNote" | "orgKey" | "usesAppKey" | "useOwnKey" | "remove" | "noCreditsUsed" | "priceLine" | "priceOwnKey" | "contextSize" | "mediaImage" | "mediaPdf" | "mediaAudio" | "mediaVideo" | "reasoning">;
3
+ export declare const say: import("copilotz/web/words").Say<"instructions" | "model" | "effort" | "tools" | "replace" | "cancel" | "change" | "listJoin" | "listEnd" | "personalSpace" | "noSuchAgentTitle" | "noSuchAgent" | "noSuchAgentBody" | "goHome" | "partOfApp" | "madeIn" | "madeElsewhere" | "answersNewChatsHere" | "askAgent" | "edit" | "editAgent" | "moreMenu" | "makeAnswerIn" | "addToSpaceMenu" | "startFromIt" | "deleteMenu" | "addToTitle" | "addToNote" | "newLikeTitle" | "newLikeNote" | "newAgentIn" | "startingFrom" | "appAgentNotice" | "startFromShort" | "managersChangeIt" | "managersChangeItElsewhere" | "worksIn" | "addToSpace" | "answersNewChats" | "roleViewer" | "roleEditor" | "worksNowhere" | "modelAndTools" | "thinks" | "toolsLabel" | "noTools" | "showFewer" | "showAll" | "modelsThenJoin" | "changeAgent" | "keepsHandle" | "saveChanges" | "deleteTitle" | "deleteButton" | "deleteLeavesBold" | "deleteLeavesNamed" | "deleteLeaves" | "deleteGoneBold" | "deleteGone" | "deleteChatsBold" | "deleteChats" | "findSpace" | "spacesYouManage" | "justYou" | "keywordPersonal" | "deleteStepNote" | "deleteStepKeep" | "fieldName" | "calledIn" | "nameHint" | "namePlaceholder" | "emoji" | "noEmoji" | "anotherEmoji" | "otherEmoji" | "fieldDoes" | "doesHint" | "doesPlaceholder" | "modelHint" | "rewriteForMe" | "writeForMe" | "sayNameFirst" | "youArePlaceholder" | "youAreDefaultName" | "writingFor" | "draftNote" | "undo" | "instructionsHint" | "instructionsEmptyHint" | "toolsOf" | "toolsChooseDone" | "toolsChoose" | "toolsAll" | "toolsNone" | "toolsMore" | "newAgentForm" | "agentsYouKnow" | "startFrom" | "startBlank" | "worksInAs" | "belongsHint" | "createNamed" | "createAgent" | "worksNow" | "askHandle" | "readsOnly" | "makeAnswer" | "openPage" | "makeAnother" | "notYourSpace" | "archivedSpace" | "managersAdd" | "addAnAgentTitle" | "addAnAgentNote" | "oneOfApps" | "madeInOther" | "findAgent" | "findAgentKnown" | "knownIntro" | "addsAs" | "createNewAgent" | "createNewAgentBody" | "addAgentTo" | "add" | "noneCalled" | "allWorkHere" | "worksNowNames" | "paletteThisAgent" | "paletteThisSpace" | "paletteAgents" | "paletteCreate" | "makeNamedAnswerIn" | "makeNamedAnswer" | "keywordDefault" | "keywordAnswer" | "keywordNewChats" | "addNamedTo" | "addNamedNote" | "keywordMember" | "keywordJoin" | "keywordWork" | "editNamed" | "keywordChange" | "keywordInstructions" | "keywordRename" | "startNewFrom" | "keywordCopy" | "keywordLike" | "keywordCreate" | "addAnAgentTo" | "keywordInvite" | "keywordAgent" | "worksHere" | "newAgent" | "newAgentInHere" | "keywordMake" | "newAgentInStep" | "newAgentInNote" | "chooseModel" | "needsKey" | "yourKey" | "providerModels" | "searchModels" | "readyToUse" | "withOwnKey" | "providers" | "models" | "nothingMatches" | "allProviders" | "noKeyForProvider" | "apiKeyLabel" | "pasteIt" | "save" | "keyNote" | "orgKey" | "usesAppKey" | "useOwnKey" | "remove" | "noCreditsUsed" | "priceLine" | "priceOwnKey" | "contextSize" | "mediaImage" | "mediaPdf" | "mediaAudio" | "mediaVideo" | "reasoning" | "describeHint" | "describePlaceholder" | "fillMyself" | "draftIt" | "drafting" | "draftingWait" | "kindLabel" | "kindHint" | "kindLike" | "orgForm" | "orgJoins" | "back" | "addToTeamNamed" | "addToTeam" | "removeFromTeamMenu" | "changedForOrg" | "orgsTeam" | "tierModel" | "tierModelPlace" | "removeTeamTitle" | "removeButton" | "teamLeaves" | "teamLeavesBold" | "teamSaidStays" | "teamAddBack" | "teamDeleted">;
4
4
  /** Every word of team's front end, by area (WORDS.md lists them). */
5
5
  export declare const PHRASES: Record<string, Record<string, Phrase>>;