@pairz/team 0.0.1 → 1.0.0-rc.82
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/LICENSE +21 -0
- package/README.md +51 -1
- package/WORDS.md +370 -0
- package/contract.d.ts +8 -0
- package/contract.js +8 -0
- package/mod.d.ts +25 -0
- package/mod.js +25 -0
- package/package.json +61 -3
- package/team/actions/agent.d.ts +14 -0
- package/team/actions/agent.js +401 -0
- package/team/actions/define.d.ts +1 -0
- package/team/actions/define.js +45 -0
- package/team/collections/agent.d.ts +170 -0
- package/team/collections/agent.js +126 -0
- package/team/contract.d.ts +11 -0
- package/team/contract.js +1 -0
- package/team/mod.d.ts +28 -0
- package/team/mod.js +64 -0
- package/team/resources/propose.d.ts +1 -0
- package/team/resources/propose.js +102 -0
- package/team/shared/definition.d.ts +3 -0
- package/team/shared/definition.js +11 -0
- package/team/shared/everywhere.d.ts +11 -0
- package/team/shared/everywhere.js +29 -0
- package/team/shared/limits.d.ts +17 -0
- package/team/shared/limits.js +17 -0
- package/team/views/web/agent-add.d.ts +14 -0
- package/team/views/web/agent-add.js +58 -0
- package/team/views/web/agent-describe.d.ts +38 -0
- package/team/views/web/agent-describe.js +44 -0
- package/team/views/web/agent-fields.d.ts +35 -0
- package/team/views/web/agent-fields.js +88 -0
- package/team/views/web/agent-known.d.ts +22 -0
- package/team/views/web/agent-known.js +62 -0
- package/team/views/web/agent-new.d.ts +27 -0
- package/team/views/web/agent-new.js +150 -0
- package/team/views/web/agent-org.d.ts +12 -0
- package/team/views/web/agent-org.js +89 -0
- package/team/views/web/agent-palette.d.ts +19 -0
- package/team/views/web/agent-palette.js +203 -0
- package/team/views/web/agent-steps.d.ts +23 -0
- package/team/views/web/agent-steps.js +56 -0
- package/team/views/web/agent.d.ts +20 -0
- package/team/views/web/agent.js +310 -0
- package/team/views/web/agents.d.ts +48 -0
- package/team/views/web/agents.js +59 -0
- package/team/views/web/model-pick.d.ts +36 -0
- package/team/views/web/model-pick.js +44 -0
- package/team/views/web/model-picker.d.ts +83 -0
- package/team/views/web/model-picker.js +262 -0
- package/team/views/web/places.d.ts +24 -0
- package/team/views/web/places.js +10 -0
- package/team/views/web/style.d.ts +9 -0
- package/team/views/web/style.js +251 -0
- package/team/views/web/words.d.ts +5 -0
- package/team/views/web/words.js +246 -0
- package/team/web.d.ts +22 -0
- package/team/web.js +43 -0
- package/tiers/actions/choose.d.ts +7 -0
- package/tiers/actions/choose.js +336 -0
- package/tiers/actions/model.d.ts +1 -0
- package/tiers/actions/model.js +61 -0
- package/tiers/collections/choice.d.ts +54 -0
- package/tiers/collections/choice.js +81 -0
- package/tiers/collections/template.d.ts +76 -0
- package/tiers/collections/template.js +42 -0
- package/tiers/contract.d.ts +23 -0
- package/tiers/contract.js +1 -0
- package/tiers/mod.d.ts +75 -0
- package/tiers/mod.js +114 -0
- package/tiers/shared/plans.d.ts +61 -0
- package/tiers/shared/plans.js +74 -0
- package/tiers/shared/shown.d.ts +189 -0
- package/tiers/shared/shown.js +284 -0
- package/tiers/shared/tiers.d.ts +157 -0
- package/tiers/shared/tiers.js +179 -0
- package/tiers/views/web/composer.d.ts +15 -0
- package/tiers/views/web/composer.js +87 -0
- package/tiers/views/web/org.d.ts +69 -0
- package/tiers/views/web/org.js +334 -0
- package/tiers/views/web/say.d.ts +146 -0
- package/tiers/views/web/say.js +150 -0
- package/tiers/views/web/setup.d.ts +23 -0
- package/tiers/views/web/setup.js +80 -0
- package/tiers/views/web/space.d.ts +32 -0
- package/tiers/views/web/space.js +78 -0
- package/tiers/views/web/style.d.ts +7 -0
- package/tiers/views/web/style.js +193 -0
- package/tiers/views/web/team.d.ts +38 -0
- package/tiers/views/web/team.js +118 -0
- package/tiers/views/web/words.d.ts +48 -0
- package/tiers/views/web/words.js +122 -0
- package/tiers/web.d.ts +31 -0
- package/tiers/web.js +72 -0
- package/web.d.ts +14 -0
- package/web.js +14 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The tier beside the send button (kind `tiers.composer`, chat's
|
|
4
|
+
* `composerControls`, hints `{ thread?, in? }`): what what's sent runs on,
|
|
5
|
+
* with what a typical message comes to for the person, their own plans
|
|
6
|
+
* costing nothing ("Everyday · on your plans · model $0"). In a
|
|
7
|
+
* conversation, choosing one sets that conversation's tier
|
|
8
|
+
* (`tiers.choose { thread }`), for everyone in it; on home, the person's own
|
|
9
|
+
* default for new chats (`{ mine }`). Each tier says its price; one over the
|
|
10
|
+
* org's cap is out of reach for those who don't run it, and says who sets
|
|
11
|
+
* it. Back to the default where one was chosen. Where the org uses only its
|
|
12
|
+
* default, it just says the tier: there's nothing to switch.
|
|
13
|
+
*/
|
|
14
|
+
import { useState } from "react";
|
|
15
|
+
import { Menu, toast } from "pairz/web";
|
|
16
|
+
import { runs, useStanding } from "pairz/plugins/interfaces/contract";
|
|
17
|
+
import { STYLE } from "./style.js";
|
|
18
|
+
import { say } from "./say.js";
|
|
19
|
+
import { bySaid, shownSaid, tierPriceSaid } from "./words.js";
|
|
20
|
+
export const tiersComposerView = (_, ctx) => {
|
|
21
|
+
const thread = typeof ctx.hints.thread === "string" ? ctx.hints.thread : undefined;
|
|
22
|
+
const space = typeof ctx.hints.in === "string" ? ctx.hints.in : undefined;
|
|
23
|
+
const shown = shownSaid(ctx.db.collection("modelChoice").query("offered", {
|
|
24
|
+
...(space ? { space } : {}),
|
|
25
|
+
...(thread ? { thread } : {}),
|
|
26
|
+
}).value);
|
|
27
|
+
if (!shown?.tiers.length || !shown.now)
|
|
28
|
+
return null;
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { href: "tiers-web", precedence: "pairz", children: STYLE }), _jsx(TierPick, { shown: shown, thread: thread, call: ctx.call })] }));
|
|
30
|
+
};
|
|
31
|
+
function TierPick({ shown, thread, call }) {
|
|
32
|
+
const standing = useStanding(call);
|
|
33
|
+
const [busy, setBusy] = useState(false);
|
|
34
|
+
const free = !!standing && runs(standing);
|
|
35
|
+
const now = shown.now;
|
|
36
|
+
const tier = shown.tiers.find((t) => t.name === now.tier);
|
|
37
|
+
const capIndex = shown.org.cap ? shown.tiers.findIndex((t) => t.name === shown.org.cap) : -1;
|
|
38
|
+
const capTitle = capIndex >= 0 ? shown.tiers[capIndex].title : undefined;
|
|
39
|
+
// What's been chosen right here: the conversation's, or on home the person's own.
|
|
40
|
+
const own = thread ? shown.thread?.tier : shown.person.tier;
|
|
41
|
+
const choose = async (name) => {
|
|
42
|
+
setBusy(true);
|
|
43
|
+
try {
|
|
44
|
+
await call("tiers.choose", { tier: name, ...(thread ? { thread } : { mine: true }) });
|
|
45
|
+
const title = shown.tiers.find((t) => t.name === name)?.title;
|
|
46
|
+
toast(thread
|
|
47
|
+
? title ? say("chatRunsOn", { tier: title }) : say("chatRunsDefault")
|
|
48
|
+
: title
|
|
49
|
+
? say("newChatsOn", { tier: title })
|
|
50
|
+
: say("newChatsDefault"));
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
toast(e.message, { tone: "destructive" });
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
setBusy(false);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const items = [
|
|
60
|
+
...shown.tiers.map((t, i) => {
|
|
61
|
+
const price = tierPriceSaid(t);
|
|
62
|
+
const over = !free && capIndex >= 0 && i > capIndex;
|
|
63
|
+
return {
|
|
64
|
+
label: `${t.title}${price ? ` · ${price}` : ""}`,
|
|
65
|
+
...(t.name === now.tier ? { icon: "check" } : {}),
|
|
66
|
+
...(over ? { disabled: true } : {}),
|
|
67
|
+
onSelect: () => void choose(t.name),
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
...(own
|
|
71
|
+
? [
|
|
72
|
+
"separator",
|
|
73
|
+
{
|
|
74
|
+
label: thread ? say("backToDefault") : say("backToOrgDefault"),
|
|
75
|
+
onSelect: () => void choose(null),
|
|
76
|
+
},
|
|
77
|
+
]
|
|
78
|
+
: []),
|
|
79
|
+
];
|
|
80
|
+
const price = tier && tierPriceSaid(tier);
|
|
81
|
+
const text = (_jsxs("span", { className: "tiers-pick-text", children: [_jsx("span", { className: "tiers-pick-name", children: tier?.title ?? now.tier }), price ? _jsx("span", { className: "tiers-pick-price", children: ` · ${price}` }) : null] }));
|
|
82
|
+
// Only the default: the tier, said, with nothing to choose.
|
|
83
|
+
if (shown.org.fixed) {
|
|
84
|
+
return (_jsx("span", { className: "tiers-pick", "data-fixed": "", title: say("capDefaultNote"), children: text }));
|
|
85
|
+
}
|
|
86
|
+
return (_jsx("span", { className: "tiers-pick", "aria-busy": busy || undefined, children: _jsx(Menu, { label: `${say("pickLabel", { tier: tier?.title ?? now.tier, by: bySaid(now.by) })}${capTitle && !free ? `. ${say("pickCap", { cap: capTitle })}` : ""}`, text: text, icon: "sparkles", variant: "ghost", size: "sm", side: "top", align: "end", items: items }) }));
|
|
87
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The org's agents (kind `tiers.org`, the org page's Agents section, the web
|
|
3
|
+
* shell's `orgSettings`, at `/org?tab=models`): how hard they think, then who
|
|
4
|
+
* they are.
|
|
5
|
+
*
|
|
6
|
+
* - **The tiers**, as cards side by side, in the org's order: each its name,
|
|
7
|
+
* what it's good for, what a typical message comes to at this org's prices
|
|
8
|
+
* and how far the plan's credits go, and each kind of work's model; the
|
|
9
|
+
* org's default outlined. Owners and admins make one the default in a
|
|
10
|
+
* click (Undo right after), customize one (a dialog: each kind of work's
|
|
11
|
+
* models in the order they're tried, any of them first, from every model
|
|
12
|
+
* the org can run, each saying how it's paid for), duplicate one into a
|
|
13
|
+
* new tier, make one from nothing, move one before or after another, take
|
|
14
|
+
* one away or put it back as it was, and say what members can use (all
|
|
15
|
+
* tiers, up to one, or only the default). On a plan of credits given once,
|
|
16
|
+
* a heavier default says how much faster it spends them.
|
|
17
|
+
* - **The team** (team.tsx): the agents every space starts with.
|
|
18
|
+
*
|
|
19
|
+
* Anyone else reads it, and is told who changes it. Everything shown is a
|
|
20
|
+
* watched read (`modelChoice.offered`), so a change shows at once.
|
|
21
|
+
*/
|
|
22
|
+
import { type ReactNode } from "react";
|
|
23
|
+
import type { ViewContext } from "pairz";
|
|
24
|
+
import type { ModelShown, Shown, TierShown } from "../../contract.js";
|
|
25
|
+
import { type TeamAgent } from "./team.js";
|
|
26
|
+
type Call = <R = unknown>(action: string, input?: unknown) => Promise<R>;
|
|
27
|
+
export declare const tiersOrgView: (_: unknown, ctx: ViewContext<ReactNode>) => ReactNode;
|
|
28
|
+
export declare function OrgAgents({ shown, team, may, org, personal, call }: {
|
|
29
|
+
shown: Shown;
|
|
30
|
+
team?: TeamAgent[];
|
|
31
|
+
may: boolean;
|
|
32
|
+
/** The org's name; none for a person's own. */
|
|
33
|
+
org?: string;
|
|
34
|
+
/** A person's own org: its tiers' models are theirs alone. */
|
|
35
|
+
personal?: boolean;
|
|
36
|
+
call: Call;
|
|
37
|
+
}): ReactNode;
|
|
38
|
+
/** A list with one entry moved from `from` to `to`. */
|
|
39
|
+
export declare function moved<T>(list: T[], from: number, to: number): T[];
|
|
40
|
+
/**
|
|
41
|
+
* What the tier in use means for the plan's credits, when it's worth saying: a
|
|
42
|
+
* plan of credits given once (a trial's) spent faster than the cheapest tier
|
|
43
|
+
* would, or a plan that gives none.
|
|
44
|
+
*/
|
|
45
|
+
export declare function SpendNote({ shown, tier }: {
|
|
46
|
+
shown: Shown;
|
|
47
|
+
tier?: string;
|
|
48
|
+
}): ReactNode;
|
|
49
|
+
/** A tier: what it's for, what a message comes to, each kind of work's model, and choosing it. */
|
|
50
|
+
export declare function TierCard({ tier, shown, current, may, busy, onChoose, onEdit, onCopy, onMove, onRemove, onRestore }: {
|
|
51
|
+
tier: TierShown;
|
|
52
|
+
shown: Shown;
|
|
53
|
+
/** It's the org's default. */
|
|
54
|
+
current: boolean;
|
|
55
|
+
may: boolean;
|
|
56
|
+
busy?: string;
|
|
57
|
+
onChoose(): void;
|
|
58
|
+
onEdit(): void;
|
|
59
|
+
onCopy(): void;
|
|
60
|
+
/** Moves it before the one before it (-1), or after the one after it (1). */
|
|
61
|
+
onMove?(by: -1 | 1): void;
|
|
62
|
+
onRemove(): void;
|
|
63
|
+
onRestore(): void;
|
|
64
|
+
}): ReactNode;
|
|
65
|
+
/** What a model falls back to, each name once: "GPT-6 Luna, Claude Haiku 5.5". */
|
|
66
|
+
export declare function thenSaid(model: ModelShown): string | undefined;
|
|
67
|
+
/** A model as a short line: "Claude Haiku 5.5, low effort, then GPT-6 Luna". */
|
|
68
|
+
export declare const modelLine: (model: ModelShown) => string;
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The org's agents (kind `tiers.org`, the org page's Agents section, the web
|
|
4
|
+
* shell's `orgSettings`, at `/org?tab=models`): how hard they think, then who
|
|
5
|
+
* they are.
|
|
6
|
+
*
|
|
7
|
+
* - **The tiers**, as cards side by side, in the org's order: each its name,
|
|
8
|
+
* what it's good for, what a typical message comes to at this org's prices
|
|
9
|
+
* and how far the plan's credits go, and each kind of work's model; the
|
|
10
|
+
* org's default outlined. Owners and admins make one the default in a
|
|
11
|
+
* click (Undo right after), customize one (a dialog: each kind of work's
|
|
12
|
+
* models in the order they're tried, any of them first, from every model
|
|
13
|
+
* the org can run, each saying how it's paid for), duplicate one into a
|
|
14
|
+
* new tier, make one from nothing, move one before or after another, take
|
|
15
|
+
* one away or put it back as it was, and say what members can use (all
|
|
16
|
+
* tiers, up to one, or only the default). On a plan of credits given once,
|
|
17
|
+
* a heavier default says how much faster it spends them.
|
|
18
|
+
* - **The team** (team.tsx): the agents every space starts with.
|
|
19
|
+
*
|
|
20
|
+
* Anyone else reads it, and is told who changes it. Everything shown is a
|
|
21
|
+
* watched read (`modelChoice.offered`), so a change shows at once.
|
|
22
|
+
*/
|
|
23
|
+
import { useEffect, useState } from "react";
|
|
24
|
+
import { Badge, Button, Card, Dialog, EmptyState, Field, Icon, Input, LazyView, Menu, message, Notice, Select, Skeleton, } from "pairz/web";
|
|
25
|
+
import { runs } from "pairz/plugins/interfaces/contract";
|
|
26
|
+
import { say } from "./say.js";
|
|
27
|
+
import { STYLE } from "./style.js";
|
|
28
|
+
import { Team } from "./team.js";
|
|
29
|
+
import { creditsGo, faster, modelSaid, perReply, providerSaid, shownSaid, unitSaid, } from "./words.js";
|
|
30
|
+
/** How long "Undo" stays after a change. */
|
|
31
|
+
const UNDO_MS = 12_000;
|
|
32
|
+
export const tiersOrgView = (_, ctx) => {
|
|
33
|
+
const shown = shownSaid(ctx.db.collection("modelChoice").query("offered", {}).value);
|
|
34
|
+
// The org's team (team's), when the app lets people make agents.
|
|
35
|
+
const team = ctx.db.collection("agent").query("team", {}).value;
|
|
36
|
+
const may = runs({
|
|
37
|
+
role: ctx.hints.role ?? null,
|
|
38
|
+
staff: ctx.hints.staff === true,
|
|
39
|
+
});
|
|
40
|
+
const org = ctx.hints.org;
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { href: "tiers-web", precedence: "pairz", children: STYLE }), shown
|
|
42
|
+
? (_jsx(OrgAgents, { shown: shown, team: team?.agents, may: may, org: org?.kind === "personal" ? undefined : org?.name, personal: org?.kind === "personal", call: ctx.call }))
|
|
43
|
+
: _jsx(Loading, {})] }));
|
|
44
|
+
};
|
|
45
|
+
function Loading() {
|
|
46
|
+
return (_jsxs("div", { className: "tiers", "aria-busy": "true", children: [_jsx(Skeleton, { height: 22, width: "55%" }), _jsx("div", { className: "tiers-cards", children: [0, 1, 2, 3].map((n) => _jsx(Skeleton, { height: 300, radius: "xl" }, n)) }), _jsx(Skeleton, { height: 220, radius: "xl" })] }));
|
|
47
|
+
}
|
|
48
|
+
export function OrgAgents({ shown, team, may, org, personal, call }) {
|
|
49
|
+
const [busy, setBusy] = useState();
|
|
50
|
+
const [error, setError] = useState();
|
|
51
|
+
const [done, setDone] = useState();
|
|
52
|
+
const [editing, setEditing] = useState();
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!done)
|
|
55
|
+
return;
|
|
56
|
+
const timer = setTimeout(() => setDone(undefined), UNDO_MS);
|
|
57
|
+
return () => clearTimeout(timer);
|
|
58
|
+
}, [done]);
|
|
59
|
+
if (!shown.tiers.length) {
|
|
60
|
+
return (_jsx(EmptyState, { icon: "bot", title: say("emptyTitle"), children: say("emptyBody") }));
|
|
61
|
+
}
|
|
62
|
+
const fallback = shown.tiers.find((t) => t.name === shown.plan) ?? shown.tiers[0];
|
|
63
|
+
const current = shown.org.tier ?? fallback.name;
|
|
64
|
+
const title = (name) => shown.tiers.find((t) => t.name === name)?.title;
|
|
65
|
+
const act = async (key, work) => {
|
|
66
|
+
setBusy(key);
|
|
67
|
+
setError(undefined);
|
|
68
|
+
try {
|
|
69
|
+
await work();
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
setError(message(e));
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
setBusy(undefined);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const choose = (tier, undoing = false) => act(tier ?? "plan", async () => {
|
|
79
|
+
const before = shown.org.tier;
|
|
80
|
+
await call("tiers.choose", { tier });
|
|
81
|
+
setDone(undoing ? undefined : {
|
|
82
|
+
said: say("doneSaid", { tier: title(tier ?? shown.plan) ?? "" }),
|
|
83
|
+
tier: before,
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
return (_jsxs("div", { className: "tiers", children: [_jsxs("div", { className: "tiers-now", children: [_jsxs("p", { children: [say.nodes(shown.org.tier ? "nowOrg" : "nowPlan", { tier: _jsx("b", { children: title(current) }) }), " ", shown.org.fixed ? say("capDefaultNote") : say("nowMore")] }), may && shown.org.tier && shown.plan && shown.org.tier !== shown.plan
|
|
87
|
+
? (_jsx(Button, { size: "sm", variant: "ghost", loading: busy === "plan", disabled: !!busy, onClick: () => void choose(null), children: say("backToPlan") }))
|
|
88
|
+
: null] }), done
|
|
89
|
+
? (_jsx(Notice, { tone: "success", role: "status", action: _jsx(Button, { size: "sm", onClick: () => void choose(done.tier, true), disabled: !!busy, children: say("undo") }), children: done.said }))
|
|
90
|
+
: null, error ? _jsx(Notice, { tone: "destructive", role: "alert", children: error }) : null, may ? null : (_jsx(Notice, { tone: "neutral", icon: "lock", children: shown.org.fixed
|
|
91
|
+
? say("onlyRunnersFixed")
|
|
92
|
+
: org
|
|
93
|
+
? say("onlyRunners", { org })
|
|
94
|
+
: say("onlyRunnersHere") })), _jsxs("ul", { className: "tiers-cards", "aria-label": say("tiersLabel"), children: [shown.tiers.map((tier, i) => (_jsx(TierCard, { tier: tier, shown: shown, current: tier.name === current, may: may, busy: busy, onMove: (by) => void act(tier.name, () => call("tiers.order", { tiers: moved(shown.tiers.map((t) => t.name), i, i + by) })), onChoose: () => void choose(tier.name), onEdit: () => setEditing({ name: tier.name }), onCopy: () => setEditing({ from: tier.name, title: say("copyOf", { tier: tier.title }) }), onRemove: () => void act(tier.name, () => call("tiers.remove", { tier: tier.name })), onRestore: () => void act(tier.name, () => call("tiers.restore", { tier: tier.name })) }, tier.name))), may
|
|
95
|
+
? (_jsx("li", { className: "tier-new", children: _jsxs("button", { type: "button", className: "tier-new-button", onClick: () => setEditing({ from: current, title: "" }), children: [_jsx(Icon, { name: "plus", size: 18 }), _jsx("b", { children: say("newTier") }), _jsx("span", { children: say("newTierAbout") })] }) }))
|
|
96
|
+
: null] }), may && shown.removed.length
|
|
97
|
+
? (_jsxs("p", { className: "tiers-removed", children: [_jsx("span", { children: say("takenAway") }), shown.removed.map((r) => (_jsx(Button, { size: "sm", variant: "ghost", icon: "plus", loading: busy === r.name, onClick: () => void act(r.name, () => call("tiers.restore", { tier: r.name })), children: say("addBackTier", { tier: r.title }) }, r.name)))] }))
|
|
98
|
+
: null, may ? _jsx(MembersUse, { shown: shown, busy: busy, act: act, call: call }) : null, _jsx(SpendNote, { shown: shown, tier: current }), _jsx(Team, { shown: shown, team: team, may: may, org: org, tier: current, call: call }), _jsxs("p", { className: "tiers-foot", children: [_jsx(Icon, { name: "info", size: 14 }), _jsxs("span", { children: [shown.per === "message" ? say("footMessage") : say("footReply"), " ", say.nodes("footPrices", { budget: _jsx("a", { href: "/org?tab=billing", children: say("budget") }) })] })] }), editing
|
|
99
|
+
? (_jsx(TierEditor, { shown: shown, team: team, editing: editing, members: !personal, call: call, onClose: () => setEditing(undefined) }))
|
|
100
|
+
: null] }));
|
|
101
|
+
}
|
|
102
|
+
/** A list with one entry moved from `from` to `to`. */
|
|
103
|
+
export function moved(list, from, to) {
|
|
104
|
+
const next = [...list];
|
|
105
|
+
const [one] = next.splice(from, 1);
|
|
106
|
+
next.splice(to, 0, one);
|
|
107
|
+
return next;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* What the org's members can use, in one choice: every tier, tiers up to
|
|
111
|
+
* one (in the org's order), or only the org's default (`tiers.cap`).
|
|
112
|
+
*/
|
|
113
|
+
function MembersUse({ shown, busy, act, call }) {
|
|
114
|
+
// Up to the last is every tier.
|
|
115
|
+
const cap = shown.org.cap !== shown.tiers.at(-1)?.name ? shown.org.cap : null;
|
|
116
|
+
const value = shown.org.fixed ? "default" : cap ? `up:${cap}` : "all";
|
|
117
|
+
const set = (next) => act("cap", () => call("tiers.cap", next === "default"
|
|
118
|
+
? { fixed: true }
|
|
119
|
+
: { tier: next.startsWith("up:") ? next.slice(3) : null }));
|
|
120
|
+
return (_jsxs("div", { className: "tiers-cap", children: [_jsx("label", { htmlFor: "tiers-cap", children: say("capLabel") }), _jsxs(Select, { id: "tiers-cap", size: "sm", value: value, disabled: busy === "cap", onChange: (e) => void set(e.target.value), children: [_jsx("option", { value: "all", children: say("capAll") }), shown.tiers.slice(0, -1).map((t) => (_jsx("option", { value: `up:${t.name}`, children: say("capUpTo", { tier: t.title }) }, t.name))), _jsx("option", { value: "default", children: say("capDefault") })] }), _jsx("span", { children: shown.org.fixed ? say("capDefaultNote") : say("capNote") })] }));
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* What the tier in use means for the plan's credits, when it's worth saying: a
|
|
124
|
+
* plan of credits given once (a trial's) spent faster than the cheapest tier
|
|
125
|
+
* would, or a plan that gives none.
|
|
126
|
+
*/
|
|
127
|
+
export function SpendNote({ shown, tier }) {
|
|
128
|
+
const credits = shown.credits;
|
|
129
|
+
if (!credits)
|
|
130
|
+
return null;
|
|
131
|
+
if (!credits.amount) {
|
|
132
|
+
return (_jsxs(Notice, { tone: "warning", icon: "info", action: _jsx(Button, { size: "sm", variant: "outline", href: "/org?tab=billing", children: say("billing") }), children: [_jsx("b", { children: say("noCredits", { plan: credits.title }) }), " ", say("noCreditsMore")] }));
|
|
133
|
+
}
|
|
134
|
+
if (credits.every !== "once")
|
|
135
|
+
return null;
|
|
136
|
+
const using = shown.tiers.find((t) => t.name === (tier ?? shown.now?.tier));
|
|
137
|
+
const cheapest = shown.tiers.reduce((low, t) => t.price !== null && (!low || (low.price ?? Infinity) > t.price) ? t : low, undefined);
|
|
138
|
+
if (!using || !cheapest || using.name === cheapest.name)
|
|
139
|
+
return null;
|
|
140
|
+
const times = faster(using.price, cheapest.price);
|
|
141
|
+
if (!times)
|
|
142
|
+
return null;
|
|
143
|
+
const goes = creditsGo(credits, using.price, shown.per);
|
|
144
|
+
return (_jsxs(Notice, { tone: "warning", icon: "info", className: "tiers-spend", children: [_jsx("b", { children: say("faster", { tier: using.title, times, cheapest: cheapest.title }) }), " ", goes ? `${say("fasterGoes", { goes })} ` : "", say("changeAnyTime")] }));
|
|
145
|
+
}
|
|
146
|
+
/** A tier: what it's for, what a message comes to, each kind of work's model, and choosing it. */
|
|
147
|
+
export function TierCard({ tier, shown, current, may, busy, onChoose, onEdit, onCopy, onMove, onRemove, onRestore }) {
|
|
148
|
+
const price = perReply(tier.price);
|
|
149
|
+
const goes = creditsGo(shown.credits, tier.price, shown.per);
|
|
150
|
+
const kindTitle = (kind) => shown.kinds.find((k) => k.kind === kind)?.title ?? kind;
|
|
151
|
+
const at = shown.tiers.findIndex((t) => t.name === tier.name);
|
|
152
|
+
const before = shown.tiers[at - 1];
|
|
153
|
+
const after = shown.tiers[at + 1];
|
|
154
|
+
const items = [
|
|
155
|
+
{ label: say("customize"), icon: "pencil", onSelect: onEdit },
|
|
156
|
+
{ label: say("duplicate"), icon: "copy", onSelect: onCopy },
|
|
157
|
+
...(onMove && before
|
|
158
|
+
? [{
|
|
159
|
+
label: say("moveBefore", { tier: before.title }),
|
|
160
|
+
icon: "chevron-left",
|
|
161
|
+
onSelect: () => onMove(-1),
|
|
162
|
+
}]
|
|
163
|
+
: []),
|
|
164
|
+
...(onMove && after
|
|
165
|
+
? [{
|
|
166
|
+
label: say("moveAfter", { tier: after.title }),
|
|
167
|
+
icon: "chevron",
|
|
168
|
+
onSelect: () => onMove(1),
|
|
169
|
+
}]
|
|
170
|
+
: []),
|
|
171
|
+
...(tier.changed
|
|
172
|
+
? [{ label: say("backToOriginal"), icon: "restore", onSelect: onRestore }]
|
|
173
|
+
: []),
|
|
174
|
+
...(shown.tiers.length > 1
|
|
175
|
+
? [
|
|
176
|
+
"separator",
|
|
177
|
+
{
|
|
178
|
+
label: tier.made ? say("deleteTier") : say("takeAway"),
|
|
179
|
+
icon: "trash",
|
|
180
|
+
tone: "destructive",
|
|
181
|
+
onSelect: onRemove,
|
|
182
|
+
},
|
|
183
|
+
]
|
|
184
|
+
: []),
|
|
185
|
+
];
|
|
186
|
+
return (_jsxs(Card, { as: "li", className: "tier-card", "data-current": current ? true : undefined, "aria-current": current ? "true" : undefined, "aria-labelledby": `tier-${tier.name}`, children: [_jsxs("div", { className: "tier-card-top", children: [_jsx("h3", { id: `tier-${tier.name}`, children: tier.title }), _jsxs("span", { className: "tier-card-badges", children: [current
|
|
187
|
+
? (_jsxs(Badge, { tone: "primary", children: [_jsx(Icon, { name: "check", size: 12 }), say("badgeDefault")] }))
|
|
188
|
+
: tier.name === shown.plan
|
|
189
|
+
? _jsx(Badge, { variant: "outline", children: say("badgePlan") })
|
|
190
|
+
: null, tier.made ? _jsx(Badge, { variant: "outline", children: say("badgeYours") }) : null, tier.changed ? _jsx(Badge, { variant: "outline", children: say("badgeChanged") }) : null, may
|
|
191
|
+
? _jsx(Menu, { label: say("tierMore", { tier: tier.title }), align: "end", items: items })
|
|
192
|
+
: null] })] }), tier.description ? _jsx("p", { className: "tier-card-for", children: tier.description }) : null, _jsx("p", { className: "tier-card-price", children: price
|
|
193
|
+
? (_jsxs(_Fragment, { children: [_jsx("b", { children: price }), " ", unitSaid(shown.per)] }))
|
|
194
|
+
: say("pricedEach") }), _jsx("p", { className: "tier-card-goes", children: goes ? goes[0].toUpperCase() + goes.slice(1) : null }), _jsx("ul", { className: "tier-card-agents", "aria-label": say("tierModels", { tier: tier.title }), children: tier.kinds.map(({ kind, model }) => (_jsxs("li", { children: [_jsx("span", { className: "tier-who", children: kindTitle(kind) }), _jsxs("span", { className: "tier-model", children: [model.name, thenSaid(model) ? _jsx("small", { children: say("then", { names: thenSaid(model) }) }) : null] })] }, kind))) }), may
|
|
195
|
+
? (_jsx("div", { className: "tier-card-end", children: current
|
|
196
|
+
? (_jsxs("p", { className: "tier-card-using", children: [_jsx(Icon, { name: "check", size: 15 }), " ", say("defaultForNew")] }))
|
|
197
|
+
: (_jsx(Button, { loading: busy === tier.name, disabled: !!busy, onClick: onChoose, "aria-describedby": `tier-${tier.name}`, children: say("makeDefault") })) }))
|
|
198
|
+
: null] }));
|
|
199
|
+
}
|
|
200
|
+
const chainOf = (model) => model ? [model.id, ...(model.fallbacks ?? []).map((f) => f.id)] : [];
|
|
201
|
+
/**
|
|
202
|
+
* Customizing a tier, or making one (a dialog): its name and what it's for,
|
|
203
|
+
* then each kind of work, with the agents that do it, its model and what it
|
|
204
|
+
* falls back to (team's picker, `model.pick`, offering every model the org
|
|
205
|
+
* can run, each saying how it's paid for: `members`, for an org of others,
|
|
206
|
+
* that those without a model's plan fall back to the next), and adding a
|
|
207
|
+
* kind of work of the org's own. Saved at once (`tiers.save`): only the
|
|
208
|
+
* kinds changed.
|
|
209
|
+
*/
|
|
210
|
+
function TierEditor({ shown, team, editing, members, call, onClose }) {
|
|
211
|
+
const tier = editing.name ? shown.tiers.find((t) => t.name === editing.name) : undefined;
|
|
212
|
+
const base = tier ?? shown.tiers.find((t) => t.name === editing.from) ?? shown.tiers[0];
|
|
213
|
+
const making = !tier;
|
|
214
|
+
const [title, setTitle] = useState(tier?.title ?? editing.title ?? "");
|
|
215
|
+
const [description, setDescription] = useState(tier?.description ?? "");
|
|
216
|
+
const [chains, setChains] = useState({});
|
|
217
|
+
const [busy, setBusy] = useState(false);
|
|
218
|
+
const [error, setError] = useState();
|
|
219
|
+
const [adding, setAdding] = useState();
|
|
220
|
+
// Names for models chosen here, until the page shows them.
|
|
221
|
+
const [names, setNames] = useState({});
|
|
222
|
+
const known = new Map();
|
|
223
|
+
for (const t of shown.tiers) {
|
|
224
|
+
for (const k of t.kinds) {
|
|
225
|
+
known.set(k.model.id, k.model.name);
|
|
226
|
+
for (const f of k.model.fallbacks ?? [])
|
|
227
|
+
known.set(f.id, f.name);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const nameOf = (id) => known.get(id) ?? names[id] ?? id.slice(id.indexOf("/") + 1);
|
|
231
|
+
const chainFor = (kind) => chains[kind] ?? chainOf(base?.kinds.find((k) => k.kind === kind)?.model);
|
|
232
|
+
const set = (kind, chain) => setChains((had) => ({ ...had, [kind]: chain }));
|
|
233
|
+
const agentsOf = (kind) => [
|
|
234
|
+
...(shown.kinds.find((k) => k.kind === kind)?.agents.map((a) => a.name) ?? []),
|
|
235
|
+
...(team ?? []).filter((a) => !a.off && a.kind === "org" && a.like === kind).map((a) => a.name),
|
|
236
|
+
];
|
|
237
|
+
const save = async () => {
|
|
238
|
+
setBusy(true);
|
|
239
|
+
setError(undefined);
|
|
240
|
+
try {
|
|
241
|
+
await call("tiers.save", {
|
|
242
|
+
...(tier ? { tier: tier.name } : { from: base?.name }),
|
|
243
|
+
...(title.trim() && title.trim() !== tier?.title ? { title: title.trim() } : {}),
|
|
244
|
+
...(description.trim() !== (tier?.description ?? "")
|
|
245
|
+
? { description: description.trim() }
|
|
246
|
+
: {}),
|
|
247
|
+
...(Object.keys(chains).length ? { kinds: chains } : {}),
|
|
248
|
+
});
|
|
249
|
+
onClose();
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
setError(message(e));
|
|
253
|
+
setBusy(false);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const addKind = async () => {
|
|
257
|
+
if (!adding?.title.trim())
|
|
258
|
+
return;
|
|
259
|
+
setBusy(true);
|
|
260
|
+
setError(undefined);
|
|
261
|
+
try {
|
|
262
|
+
await call("tiers.kind", { title: adding.title.trim(), base: adding.base });
|
|
263
|
+
setAdding(undefined);
|
|
264
|
+
}
|
|
265
|
+
catch (e) {
|
|
266
|
+
setError(message(e));
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
setBusy(false);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const appKinds = shown.kinds.filter((k) => !k.base);
|
|
273
|
+
return (_jsx(Dialog, { open: true, onClose: onClose, size: "lg", title: making ? say("newTierTitle") : say("customizeTitle", { tier: tier.title }), description: making
|
|
274
|
+
? say("newTierStarts", { tier: base?.title ?? "" })
|
|
275
|
+
: say("customizeAbout"), footer: _jsxs(_Fragment, { children: [error ? _jsx("span", { className: "tiers-editor-error", role: "alert", children: error }) : null, _jsx(Button, { variant: "ghost", onClick: onClose, disabled: busy, children: say("cancel") }), _jsx(Button, { variant: "primary", loading: busy, disabled: making && !title.trim(), onClick: () => void save(), children: making ? say("createTier") : say("save") })] }), children: _jsxs("div", { className: "tiers-editor", children: [_jsxs("div", { className: "tiers-editor-names", children: [_jsx(Field, { label: say("name"), children: (control) => (_jsx(Input, { ...control, value: title, maxLength: 40, placeholder: say("namePlaceholder"), autoFocus: making, onChange: (e) => setTitle(e.target.value) })) }), _jsx(Field, { label: say("forLabel"), children: (control) => (_jsx(Input, { ...control, value: description, maxLength: 200, placeholder: say("forPlaceholder"), onChange: (e) => setDescription(e.target.value) })) })] }), _jsx("ol", { className: "tiers-kinds", children: shown.kinds.map((kind) => {
|
|
276
|
+
const chain = chainFor(kind.kind);
|
|
277
|
+
const who = agentsOf(kind.kind);
|
|
278
|
+
return (_jsxs("li", { className: "tiers-kind", children: [_jsxs("div", { className: "tiers-kind-head", children: [_jsx("b", { children: kind.title }), _jsx("span", { children: who.length ? who.join(", ") : say("nobodyYet") }), chains[kind.kind]
|
|
279
|
+
? _jsx(Badge, { variant: "outline", children: say("badgeChanged") })
|
|
280
|
+
: null] }), _jsx(ChainEditor, { chain: chain, members: members, nameOf: nameOf, onName: (id, name) => setNames((had) => ({ ...had, [id]: name })), onChange: (next) => set(kind.kind, next) })] }, kind.kind));
|
|
281
|
+
}) }), adding
|
|
282
|
+
? (_jsxs("div", { className: "tiers-kind-new", children: [_jsx(Field, { label: say("newKind"), children: (control) => (_jsx(Input, { ...control, value: adding.title, maxLength: 40, placeholder: say("newKindPlaceholder"), autoFocus: true, onChange: (e) => setAdding({ ...adding, title: e.target.value }) })) }), _jsx(Field, { label: say("startsFrom"), children: (control) => (_jsx(Select, { ...control, value: adding.base, onChange: (e) => setAdding({ ...adding, base: e.target.value }), children: appKinds.map((k) => _jsx("option", { value: k.kind, children: k.title }, k.kind)) })) }), _jsxs("div", { className: "tiers-kind-new-end", children: [_jsx(Button, { size: "sm", variant: "ghost", onClick: () => setAdding(undefined), children: say("cancel") }), _jsx(Button, { size: "sm", variant: "secondary", disabled: !adding.title.trim() || busy, onClick: () => void addKind(), children: say("add") })] })] }))
|
|
283
|
+
: (_jsx(Button, { size: "sm", variant: "ghost", icon: "plus", onClick: () => setAdding({ title: "", base: appKinds[0]?.kind ?? "" }), children: say("addKind") }))] }) }));
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* A model chain, in the order it's tried: the model (team's picker), then
|
|
287
|
+
* what's tried when it fails, each with Move up (the first of them up to the
|
|
288
|
+
* model's place: "Try it first"), Move down and Remove, and Add a fallback.
|
|
289
|
+
*/
|
|
290
|
+
function ChainEditor({ chain, members, nameOf, onName, onChange }) {
|
|
291
|
+
const [first, ...rest] = chain;
|
|
292
|
+
const pick = (onPick) => ({
|
|
293
|
+
plans: members ? "members" : "mine",
|
|
294
|
+
onPick: (model) => {
|
|
295
|
+
onName(model, model.slice(model.indexOf("/") + 1));
|
|
296
|
+
onPick(model);
|
|
297
|
+
return Promise.resolve();
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
return (_jsxs("div", { className: "tiers-chain", children: [_jsx(LazyView, { kind: "model.pick", item: { value: first ?? "" }, hints: pick((model) => onChange([model, ...rest.filter((id) => id !== model)])), fallback: _jsx(Skeleton, { height: 54 }) }), _jsxs("div", { className: "tiers-fallbacks", children: [_jsx("p", { className: "tiers-fallbacks-head", children: say("fallbacks") }), rest.length
|
|
301
|
+
? (_jsx("ol", { className: "tiers-fallbacks-list", children: rest.map((id, i) => (_jsxs("li", { children: [_jsxs("span", { className: "tiers-fallback-name", children: [_jsx("b", { children: nameOf(id) }), _jsx("small", { children: providerSaid(id) })] }), _jsx(Menu, { label: say("tierMore", { tier: nameOf(id) }), align: "end", items: [
|
|
302
|
+
// In the chain, it's at i + 1: up to i, the model's place for the first.
|
|
303
|
+
{
|
|
304
|
+
label: i === 0 ? say("tryFirst") : say("moveUp"),
|
|
305
|
+
onSelect: () => onChange(moved(chain, i + 1, i)),
|
|
306
|
+
},
|
|
307
|
+
...(i < rest.length - 1
|
|
308
|
+
? [{
|
|
309
|
+
label: say("moveDown"),
|
|
310
|
+
onSelect: () => onChange(moved(chain, i + 1, i + 2)),
|
|
311
|
+
}]
|
|
312
|
+
: []),
|
|
313
|
+
{
|
|
314
|
+
label: say("remove"),
|
|
315
|
+
icon: "trash",
|
|
316
|
+
tone: "destructive",
|
|
317
|
+
onSelect: () => onChange([first, ...rest.filter((_, j) => j !== i)]),
|
|
318
|
+
},
|
|
319
|
+
] })] }, `${id}:${i}`))) }))
|
|
320
|
+
: _jsx("p", { className: "tiers-fallbacks-none", children: say("noFallback") }), _jsx(LazyView, { kind: "model.pick", item: { value: "" }, hints: {
|
|
321
|
+
...pick((model) => onChange([first, ...rest.filter((id) => id !== model), model])),
|
|
322
|
+
look: "link",
|
|
323
|
+
label: say("addFallback"),
|
|
324
|
+
disabled: rest.length >= 7,
|
|
325
|
+
}, fallback: null })] })] }));
|
|
326
|
+
}
|
|
327
|
+
/** What a model falls back to, each name once: "GPT-6 Luna, Claude Haiku 5.5". */
|
|
328
|
+
export function thenSaid(model) {
|
|
329
|
+
const names = [...new Set((model.fallbacks ?? []).map((f) => f.name))]
|
|
330
|
+
.filter((name) => name !== model.name);
|
|
331
|
+
return names.length ? names.join(", ") : undefined;
|
|
332
|
+
}
|
|
333
|
+
/** A model as a short line: "Claude Haiku 5.5, low effort, then GPT-6 Luna". */
|
|
334
|
+
export const modelLine = (model) => `${modelSaid(model)}${thenSaid(model) ? `, then ${thenSaid(model)}` : ""}`;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/** Every word tiers' web front end shows, to be changed by the app (`tiers.<key>`). */
|
|
2
|
+
import { type Phrase } from "pairz/web/words";
|
|
3
|
+
export declare const tiers: {
|
|
4
|
+
perMessage: string;
|
|
5
|
+
perReply: string;
|
|
6
|
+
messages: {
|
|
7
|
+
one: string;
|
|
8
|
+
other: string;
|
|
9
|
+
};
|
|
10
|
+
replies: {
|
|
11
|
+
one: string;
|
|
12
|
+
other: string;
|
|
13
|
+
};
|
|
14
|
+
creditsOnce: string;
|
|
15
|
+
creditsSeat: string;
|
|
16
|
+
creditsMonth: string;
|
|
17
|
+
underTenth: string;
|
|
18
|
+
effortNone: string;
|
|
19
|
+
effortMinimal: string;
|
|
20
|
+
effortLow: string;
|
|
21
|
+
effortMedium: string;
|
|
22
|
+
effortHigh: string;
|
|
23
|
+
effortXhigh: string;
|
|
24
|
+
effortMax: string;
|
|
25
|
+
effortOther: string;
|
|
26
|
+
providerChatgpt: string;
|
|
27
|
+
byThread: string;
|
|
28
|
+
byPerson: string;
|
|
29
|
+
bySpace: string;
|
|
30
|
+
byOrg: string;
|
|
31
|
+
byPlan: string;
|
|
32
|
+
emptyTitle: string;
|
|
33
|
+
emptyBody: string;
|
|
34
|
+
nowOrg: string;
|
|
35
|
+
nowPlan: string;
|
|
36
|
+
nowMore: string;
|
|
37
|
+
backToPlan: string;
|
|
38
|
+
doneSaid: string;
|
|
39
|
+
undo: string;
|
|
40
|
+
onlyRunners: string;
|
|
41
|
+
onlyRunnersHere: string;
|
|
42
|
+
onlyRunnersFixed: string;
|
|
43
|
+
tiersLabel: string;
|
|
44
|
+
newTier: string;
|
|
45
|
+
newTierAbout: string;
|
|
46
|
+
takenAway: string;
|
|
47
|
+
addBackTier: string;
|
|
48
|
+
capLabel: string;
|
|
49
|
+
capAll: string;
|
|
50
|
+
capUpTo: string;
|
|
51
|
+
capDefault: string;
|
|
52
|
+
capNote: string;
|
|
53
|
+
capDefaultNote: string;
|
|
54
|
+
noCredits: string;
|
|
55
|
+
noCreditsMore: string;
|
|
56
|
+
billing: string;
|
|
57
|
+
faster: string;
|
|
58
|
+
fasterGoes: string;
|
|
59
|
+
changeAnyTime: string;
|
|
60
|
+
footMessage: string;
|
|
61
|
+
footReply: string;
|
|
62
|
+
footPrices: string;
|
|
63
|
+
budget: string;
|
|
64
|
+
tierMore: string;
|
|
65
|
+
customize: string;
|
|
66
|
+
duplicate: string;
|
|
67
|
+
moveBefore: string;
|
|
68
|
+
moveAfter: string;
|
|
69
|
+
copyOf: string;
|
|
70
|
+
backToOriginal: string;
|
|
71
|
+
deleteTier: string;
|
|
72
|
+
takeAway: string;
|
|
73
|
+
badgeDefault: string;
|
|
74
|
+
badgePlan: string;
|
|
75
|
+
badgeYours: string;
|
|
76
|
+
badgeChanged: string;
|
|
77
|
+
pricedEach: string;
|
|
78
|
+
tierModels: string;
|
|
79
|
+
then: string;
|
|
80
|
+
defaultForNew: string;
|
|
81
|
+
makeDefault: string;
|
|
82
|
+
newTierTitle: string;
|
|
83
|
+
customizeTitle: string;
|
|
84
|
+
newTierStarts: string;
|
|
85
|
+
customizeAbout: string;
|
|
86
|
+
cancel: string;
|
|
87
|
+
createTier: string;
|
|
88
|
+
save: string;
|
|
89
|
+
name: string;
|
|
90
|
+
namePlaceholder: string;
|
|
91
|
+
forLabel: string;
|
|
92
|
+
forPlaceholder: string;
|
|
93
|
+
nobodyYet: string;
|
|
94
|
+
newKind: string;
|
|
95
|
+
newKindPlaceholder: string;
|
|
96
|
+
startsFrom: string;
|
|
97
|
+
add: string;
|
|
98
|
+
addKind: string;
|
|
99
|
+
fallbacks: string;
|
|
100
|
+
tryFirst: string;
|
|
101
|
+
moveUp: string;
|
|
102
|
+
moveDown: string;
|
|
103
|
+
remove: string;
|
|
104
|
+
noFallback: string;
|
|
105
|
+
addFallback: string;
|
|
106
|
+
teamTitle: string;
|
|
107
|
+
teamAbout: string;
|
|
108
|
+
teamAboutMine: string;
|
|
109
|
+
addAgent: string;
|
|
110
|
+
edit: string;
|
|
111
|
+
removeFromTeam: string;
|
|
112
|
+
badgeOrgs: string;
|
|
113
|
+
onTier: string;
|
|
114
|
+
notOnTeam: string;
|
|
115
|
+
addBack: string;
|
|
116
|
+
addAgentTitle: string;
|
|
117
|
+
addAgentAbout: string;
|
|
118
|
+
addAgentAboutMine: string;
|
|
119
|
+
removeTitle: string;
|
|
120
|
+
removeSaid: string;
|
|
121
|
+
removeSaidMine: string;
|
|
122
|
+
removeDeletes: string;
|
|
123
|
+
removeBack: string;
|
|
124
|
+
recommended: string;
|
|
125
|
+
ownersChoose: string;
|
|
126
|
+
spaceStartsOn: string;
|
|
127
|
+
spaceChosen: string;
|
|
128
|
+
spaceAsOrg: string;
|
|
129
|
+
spaceSwitch: string;
|
|
130
|
+
spaceManagers: string;
|
|
131
|
+
spaceSelect: string;
|
|
132
|
+
asOrg: string;
|
|
133
|
+
agentLine: string;
|
|
134
|
+
onPlans: string;
|
|
135
|
+
pickLabel: string;
|
|
136
|
+
pickCap: string;
|
|
137
|
+
backToDefault: string;
|
|
138
|
+
backToOrgDefault: string;
|
|
139
|
+
chatRunsOn: string;
|
|
140
|
+
chatRunsDefault: string;
|
|
141
|
+
newChatsOn: string;
|
|
142
|
+
newChatsDefault: string;
|
|
143
|
+
};
|
|
144
|
+
export declare const say: import("pairz/web/words").Say<"name" | "then" | "cancel" | "edit" | "namePlaceholder" | "undo" | "add" | "save" | "remove" | "billing" | "fallbacks" | "budget" | "perMessage" | "perReply" | "messages" | "replies" | "creditsOnce" | "creditsSeat" | "creditsMonth" | "underTenth" | "effortNone" | "effortMinimal" | "effortLow" | "effortMedium" | "effortHigh" | "effortXhigh" | "effortMax" | "effortOther" | "providerChatgpt" | "byThread" | "byPerson" | "bySpace" | "byOrg" | "byPlan" | "emptyTitle" | "emptyBody" | "nowOrg" | "nowPlan" | "nowMore" | "backToPlan" | "doneSaid" | "onlyRunners" | "onlyRunnersHere" | "onlyRunnersFixed" | "tiersLabel" | "newTier" | "newTierAbout" | "takenAway" | "addBackTier" | "capLabel" | "capAll" | "capUpTo" | "capDefault" | "capNote" | "capDefaultNote" | "noCredits" | "noCreditsMore" | "faster" | "fasterGoes" | "changeAnyTime" | "footMessage" | "footReply" | "footPrices" | "tierMore" | "customize" | "duplicate" | "moveBefore" | "moveAfter" | "copyOf" | "backToOriginal" | "deleteTier" | "takeAway" | "badgeDefault" | "badgePlan" | "badgeYours" | "badgeChanged" | "pricedEach" | "tierModels" | "defaultForNew" | "makeDefault" | "newTierTitle" | "customizeTitle" | "newTierStarts" | "customizeAbout" | "createTier" | "forLabel" | "forPlaceholder" | "nobodyYet" | "newKind" | "newKindPlaceholder" | "startsFrom" | "addKind" | "tryFirst" | "moveUp" | "moveDown" | "noFallback" | "addFallback" | "teamTitle" | "teamAbout" | "teamAboutMine" | "addAgent" | "removeFromTeam" | "badgeOrgs" | "onTier" | "notOnTeam" | "addBack" | "addAgentTitle" | "addAgentAbout" | "addAgentAboutMine" | "removeTitle" | "removeSaid" | "removeSaidMine" | "removeDeletes" | "removeBack" | "recommended" | "ownersChoose" | "spaceStartsOn" | "spaceChosen" | "spaceAsOrg" | "spaceSwitch" | "spaceManagers" | "spaceSelect" | "asOrg" | "agentLine" | "onPlans" | "pickLabel" | "pickCap" | "backToDefault" | "backToOrgDefault" | "chatRunsOn" | "chatRunsDefault" | "newChatsOn" | "newChatsDefault">;
|
|
145
|
+
/** Every word of tiers' front end, by area (team's WORDS.md lists them). */
|
|
146
|
+
export declare const PHRASES: Record<string, Record<string, Phrase>>;
|