Public: anyone can read this; the crew can change it.
Access 3, terminal: the palette offers a screen by its `asks` through may(); the entries' own gates go #18431
Merged 8h 54m ago, live in production
torque/forge:torque/18426-access-3-terminal-the-palette-offers-a-s → main 0 commits fork
171 files
changed +384
−339
- docs/features/may.md
- src/core/access_disagreement.ts
- src/design/door_checks.ts
- src/tui/screens/abstractions.ts
- src/tui/screens/access.ts
- src/tui/screens/account_access.ts
- src/tui/screens/advisories.ts
- src/tui/screens/agents.ts
- src/tui/screens/app_templates.ts
- src/tui/screens/appleusage.ts
- src/tui/screens/apps_crew.ts
- src/tui/screens/archived.ts
- src/tui/screens/ask_data.ts
- src/tui/screens/audit.ts
- src/tui/screens/bets.ts
- src/tui/screens/billing.ts
- src/tui/screens/billinglinks.ts
- src/tui/screens/bills.ts
- src/tui/screens/boards.ts
- src/tui/screens/buckets.ts
- src/tui/screens/budgets.ts
- src/tui/screens/bugs.ts
- src/tui/screens/bulk.ts
- src/tui/screens/childcredit.ts
- src/tui/screens/claim_link.ts
- src/tui/screens/claim_start.ts
- src/tui/screens/cloud.ts
- src/tui/screens/cloudcost.ts
- src/tui/screens/cloudtree.ts
- src/tui/screens/codes.ts
- src/tui/screens/connections.ts
- src/tui/screens/controls.ts
- src/tui/screens/cores.ts
- src/tui/screens/crewbudgets.ts
- src/tui/screens/crewfallback.ts
- src/tui/screens/crewhandover.ts
- src/tui/screens/crewkey.ts
- src/tui/screens/crewsplits.ts
- src/tui/screens/crewtop.ts
- src/tui/screens/dataset.ts
- src/tui/screens/design.ts
- src/tui/screens/design_gallery.ts
- src/tui/screens/devices.ts
- src/tui/screens/disks.ts
- src/tui/screens/displays.ts
- src/tui/screens/domains.ts
- src/tui/screens/dotfiles.ts
- src/tui/screens/drift.ts
- src/tui/screens/dutybudgets.ts
- src/tui/screens/dutyswitch.ts
- src/tui/screens/economics.ts
- src/tui/screens/edgeonly.ts
- src/tui/screens/entries.ts
- src/tui/screens/experiments.ts
- src/tui/screens/featurefeed.ts
- src/tui/screens/features.ts
- src/tui/screens/featureswitch.ts
- src/tui/screens/feed.ts
- src/tui/screens/flowsall.ts
- src/tui/screens/footing.ts
- src/tui/screens/forgeready.ts
- src/tui/screens/forges.ts
- src/tui/screens/forgeview.ts
- src/tui/screens/front.ts
- src/tui/screens/frontms.ts
- src/tui/screens/funnel.ts
- src/tui/screens/health_voice.ts
- src/tui/screens/home_pins.ts
- src/tui/screens/hostreach.ts
- src/tui/screens/infra.ts
- src/tui/screens/inventory.ts
- src/tui/screens/invites.ts
- src/tui/screens/knobs.ts
- src/tui/screens/lapsed.ts
- src/tui/screens/limits.ts
- src/tui/screens/loopstalls.ts
- src/tui/screens/madefrom.ts
- src/tui/screens/maintainruns.ts
- src/tui/screens/maintenance.ts
- src/tui/screens/mergedbranches.ts
- src/tui/screens/mirrorpacks.ts
- src/tui/screens/model.ts
- src/tui/screens/money.ts
- src/tui/screens/newissue.ts
- src/tui/screens/next.ts
- src/tui/screens/nowlist.ts
- src/tui/screens/offers.ts
- src/tui/screens/offsite.ts
- src/tui/screens/originahead.ts
- src/tui/screens/owner.ts
- src/tui/screens/packrepos.ts
- src/tui/screens/payments.ts
- src/tui/screens/people.ts
- src/tui/screens/pinned.ts
- src/tui/screens/planner.ts
- src/tui/screens/planrow.ts
- src/tui/screens/plans.ts
- src/tui/screens/previewdirs.ts
- src/tui/screens/profile.ts
- src/tui/screens/quotas.ts
docs/features/may.md +14 −9
| @@ -64,15 +64,20 @@ token is refused (403), a person who is not the admin is told not found and a st | ||
| 64 | 64 | admin's look at `GET /api/v1/places` refreshes a stale catalog only when `may` grants `forge.administer` with the |
| 65 | 65 | credential sent. |
| 66 | 66 | |
| 67 | **The terminal's screens ask it.** A palette entry whose gate is the forge's admin names `forge.administer` beside it, | |
| 68 | and one whose gate is an account names `forge.read` (opening a screen is a read); the palette asks `may` that action as | |
| 69 | the terminal's account, once a session for each entry and answer, not on every build (`src/tui/screens/entries.ts`, the | |
| 70 | entry's `asks`). The entry's own gate still decides what the palette offers; where the two part the count's door is | |
| 71 | `terminal <entry>`. Whether there is anything to show (a file, the forge's own key, runs) is the entry's `shows`, asked | |
| 72 | first: a screen with nothing to show is not offered and counts nothing. Two partings are expected: signed out, every | |
| 73 | screen for accounts (as on the web), and an admin agent, on the screens that are a person's. A screen gated on | |
| 74 | something `may` has no action for (a telemetry role, a subscription, an organization, a game grant) or on nothing names | |
| 75 | no action and says why beside its gate. | |
| 67 | **The terminal's screens ask it alone.** A palette entry for the forge's admin names `forge.administer`, and one for | |
| 68 | any account names `forge.read` (opening a screen is a read); the palette offers it when `may` grants that action to the | |
| 69 | terminal's account (`src/tui/screens/entries.ts`, the entry's `asks`). The entries' own gates are gone (#18426), and | |
| 70 | `test/door-inline-checks.test.ts` keeps them gone. Whether there is anything to show (a file, the forge's own key, | |
| 71 | runs) is the entry's `shows`, asked first. The two partings the shadow expected are decided: | |
| 72 | ||
| 73 | - **Signed out**, `forge.read` is open to all, yet a signed-out terminal is offered no entry that names an action: | |
| 74 | it has no account to ask as, and a screen for accounts asks you to sign in, as on the web. | |
| 75 | - **An admin agent** holds `forge.administer`, yet a screen marked `for: "person"` (billing, people, profile, …) is | |
| 76 | not offered to it: the screen is a person's work, not a permission the agent lacks. The admin's other screens are. | |
| 77 | ||
| 78 | Nothing anyone is offered changed: the palette offers just what the old gates did. A screen gated on something `may` | |
| 79 | has no action for (a telemetry role, a subscription, an organization, a game grant) or on nothing names no action and | |
| 80 | keeps its own `offered`, with a `// Names no \`asks\`: …` comment beside it saying why. | |
| 76 | 81 | |
| 77 | 82 | **The game grants ask it.** A game box's grant checks (the box and server pages, the games MCP tool, the game door's |
| 78 | 83 | API, the map, and the terminal's Games screens and keys) go through `mayOnGame` (`src/games/game_may.ts`): the grant still |
src/core/access_disagreement.ts +1 −1
| @@ -35,7 +35,7 @@ export function noteDisagreement( | ||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Ask `may` beside `old`, the answer of the check it is replacing, and count a parting under |
| 38 | * `door`: what every door in shadow does (the terminal's palette, the game grants). Returns what | |
| 38 | * `door`: what every door in shadow does (the game grants). Returns what | |
| 39 | 39 | * `may` said; a door still in shadow keeps its old answer itself. |
| 40 | 40 | */ |
| 41 | 41 | export function askBeside(db: Database, asking: Principal, door: string, action: Action, old: boolean, resource?: Resource): boolean { |
src/design/door_checks.ts +32 −5
| @@ -6,6 +6,9 @@ | ||
| 6 | 6 | * finds each line that gates on the account inline: a refusal on `isAdmin` (`!user.isAdmin`, |
| 7 | 7 | * `isAdmin !== true`, or `isAdmin` in an `if`), a `scopeAllows(…, "rw")` write floor, or a |
| 8 | 8 | * signed-out test (`!ctx.auth.user`, `ctx.auth.user === undefined` in a condition). |
| 9 | * The terminal's palette entries under `src/tui/screens/` offer by `may` too (#18426): there the | |
| 10 | * gate is an entry's own `offered`, and one is found unless the comment right above it says why | |
| 11 | * the entry names no action (`// Names no \`asks\`: …`). | |
| 9 | 12 | * |
| 10 | 13 | * Only gate shapes count: a role passed on for display (`familyView(app, user.isAdmin === true)`) |
| 11 | 14 | * is a read, not a door, and is not matched. `scopeAllows(…, "admin")` is how far a token reaches, |
| @@ -17,7 +20,7 @@ | ||
| 17 | 20 | */ |
| 18 | 21 | import { tsSources, type Source } from "./ratchets.ts"; |
| 19 | 22 | |
| 20 | export type DoorCheck = "isAdmin" | "scopeAllows" | "signedOut"; | |
| 23 | export type DoorCheck = "isAdmin" | "scopeAllows" | "signedOut" | "entryGate"; | |
| 21 | 24 | |
| 22 | 25 | /** One line found: its file, line number, which check, and the line's trimmed text. */ |
| 23 | 26 | export interface DoorFound { |
| @@ -32,12 +35,13 @@ const HELPER: Record<DoorCheck, string> = { | ||
| 32 | 35 | isAdmin: `adminPage(ctx) or personAdminPage(ctx) on a page, holds(db, principalOf(ctx.auth), "forge.administer") on a route`, |
| 33 | 36 | scopeAllows: `holds(db, principalOf(ctx.auth), "forge.write") (mayToolWrite in the MCP)`, |
| 34 | 37 | signedOut: "signedInPage(ctx)", |
| 38 | entryGate: `asks: "forge.administer" or "forge.read" on the entry, with for: "person" for a person's screen`, | |
| 35 | 39 | }; |
| 36 | 40 | |
| 37 | 41 | /** The fix that ends each finding: which helper, or which list line to delete. */ |
| 38 | 42 | export const DOOR_FIX = { |
| 39 | 43 | newLine: (c: DoorCheck): string => |
| 40 | `Fix: ask ${HELPER[c]} (src/http/page_may.ts, src/core/may.ts); never add the line to DOOR_LINES in src/design/door_checks.ts.`, | |
| 44 | `Fix: ask ${HELPER[c]} (${c === "entryGate" ? "src/tui/screens/entries.ts" : "src/http/page_may.ts, src/core/may.ts"}); never add the line to DOOR_LINES in src/design/door_checks.ts.`, | |
| 41 | 45 | gone: "Fix: the check is gone, so delete its entry from DOOR_LINES in src/design/door_checks.ts; lowering is the right move.", |
| 42 | 46 | } as const; |
| 43 | 47 | |
| @@ -49,8 +53,31 @@ const SHAPES: readonly (readonly [DoorCheck, RegExp])[] = [ | ||
| 49 | 53 | ["signedOut", /!\s*ctx\.auth\.user\b(?!\s*\??\.)|(?:\bif\s*\(|\|\||&&)\s*ctx\.auth\.user\s*===?\s*(?:undefined|null)\b/], |
| 50 | 54 | ]; |
| 51 | 55 | |
| 52 | /** Every gate-shaped inline check in one file, a line at a time; comment lines are skipped. */ | |
| 56 | const SCREENS = "src/tui/screens/"; | |
| 57 | const ENTRY_GATE = /^offered\s*[:(]/; | |
| 58 | const SAYS_WHY = "Names no `asks`"; | |
| 59 | ||
| 60 | /** | |
| 61 | * Each palette entry's own `offered` in a screen file whose comment block right above does not | |
| 62 | * say why the entry names no action. | |
| 63 | */ | |
| 64 | function entryGates(src: Source): DoorFound[] { | |
| 65 | const lines = src.text.split("\n").map((l) => l.trim()); | |
| 66 | return lines.flatMap((text, i) => { | |
| 67 | if (!ENTRY_GATE.test(text)) return []; | |
| 68 | let j = i - 1; | |
| 69 | while (j >= 0 && lines[j]!.startsWith("//")) j--; | |
| 70 | const why = lines.slice(j + 1, i).join(" "); | |
| 71 | return why.includes(SAYS_WHY) ? [] : [{ file: src.path, line: i + 1, check: "entryGate" as const, text }]; | |
| 72 | }); | |
| 73 | } | |
| 74 | ||
| 75 | /** | |
| 76 | * Every gate-shaped inline check in one file, a line at a time; comment lines are skipped. A | |
| 77 | * terminal screen file is read for its entries' gates alone: its screens read the account to draw. | |
| 78 | */ | |
| 53 | 79 | export function doorChecks(src: Source): DoorFound[] { |
| 80 | if (src.path.startsWith(SCREENS)) return entryGates(src); | |
| 54 | 81 | return src.text.split("\n").flatMap((raw, i) => { |
| 55 | 82 | const text = raw.trim(); |
| 56 | 83 | if (text.startsWith("*") || text.startsWith("//") || text.startsWith("/*")) return []; |
| @@ -63,12 +90,12 @@ const MOVED = new Set(["src/http/mcp.ts", "src/http/infra_routes.ts"]); | ||
| 63 | 90 | |
| 64 | 91 | /** |
| 65 | 92 | * The files the moved doors live in: repository route modules and the cloud API under |
| 66 | * src/http/api, the infrastructure pages, the MCP, and the web pages. | |
| 93 | * src/http/api, the infrastructure pages, the MCP, the web pages, and the terminal's screens. | |
| 67 | 94 | */ |
| 68 | 95 | export function doorSources(root: string): Source[] { |
| 69 | 96 | const api = tsSources(root, "src/http/api").filter((f) => f.text.includes("/api/v1/repos/") || f.path === "src/http/api/cloud.ts"); |
| 70 | 97 | const mcp = tsSources(root, "src/http").filter((f) => MOVED.has(f.path)); |
| 71 | return [...api, ...mcp, ...tsSources(root, "src/http/mcp"), ...tsSources(root, "src/web/pages")]; | |
| 98 | return [...api, ...mcp, ...tsSources(root, "src/http/mcp"), ...tsSources(root, "src/web/pages"), ...tsSources(root, SCREENS.slice(0, -1))]; | |
| 72 | 99 | } |
| 73 | 100 | |
| 74 | 101 | /** A line that keeps its inline check, by file and exact trimmed text, and why. Only shrinks. */ |
src/tui/screens/abstractions.ts +2 −2
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | * Anyone else sees nothing: the gate is the action's. |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | import { listAbstractions, mayReadAtlas } from "../../actions/abstractions.ts"; | |
| 7 | import { listAbstractions } from "../../actions/abstractions.ts"; | |
| 8 | 8 | import type { Abstraction } from "../../core/abstractions.ts"; |
| 9 | 9 | import { abstractionFacts, atlasSummary, rowWords } from "../../view/abstraction_words.ts"; |
| 10 | 10 | import type { Ctx, Screen } from "../app/app.ts"; |
| @@ -60,6 +60,6 @@ export const entry: PaletteEntry = { | ||
| 60 | 60 | title: "Tables", |
| 61 | 61 | hint: "the forge's tables: how much each is used, and what builds on what", |
| 62 | 62 | asks: "forge.administer", |
| 63 | offered: (session) => mayReadAtlas(session.user), | |
| 63 | for: "person", | |
| 64 | 64 | run: (session, ctx) => ctx.push(abstractionsScreen(session, ctx)), |
| 65 | 65 | }; |
src/tui/screens/access.ts +1 −1
| @@ -121,6 +121,6 @@ export const entry: PaletteEntry = { | ||
| 121 | 121 | hint: "what outside agents tried", |
| 122 | 122 | after: ["file-holds"], |
| 123 | 123 | asks: "forge.administer", |
| 124 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 124 | for: "person", | |
| 125 | 125 | run: (session, ctx) => ctx.push(accessScreen(session, ctx)), |
| 126 | 126 | }; |
src/tui/screens/account_access.ts +1 −1
| @@ -174,6 +174,6 @@ export const entry: PaletteEntry = { | ||
| 174 | 174 | hint: "search people, reset access, end sessions", |
| 175 | 175 | after: ["people"], |
| 176 | 176 | asks: "forge.administer", |
| 177 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 177 | for: "person", | |
| 178 | 178 | run: (session, ctx) => ctx.push(accountAccessScreen(session, ctx)), |
| 179 | 179 | }; |
src/tui/screens/advisories.ts +1 −1
| @@ -74,6 +74,6 @@ export const entry: PaletteEntry = { | ||
| 74 | 74 | hint: "known vulnerabilities in your lockfiles", |
| 75 | 75 | after: ["resilience"], |
| 76 | 76 | asks: "forge.administer", |
| 77 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 77 | for: "person", | |
| 78 | 78 | run: openAdvisories, |
| 79 | 79 | }; |
src/tui/screens/agents.ts +1 −1
| @@ -157,6 +157,6 @@ export const entry: PaletteEntry = { | ||
| 157 | 157 | hint: "each agent's model, budget and brief", |
| 158 | 158 | after: ["teams", "limits", "quotas", "people"], |
| 159 | 159 | asks: "forge.administer", |
| 160 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 160 | for: "person", | |
| 161 | 161 | run: (session, ctx) => ctx.push(agentsScreen(session, ctx)), |
| 162 | 162 | }; |
src/tui/screens/app_templates.ts +1 −1
| @@ -170,6 +170,6 @@ export const entry: PaletteEntry = { | ||
| 170 | 170 | hint: "the repositories New app offers; mark or unmark one", |
| 171 | 171 | after: ["economics"], |
| 172 | 172 | asks: "forge.administer", |
| 173 | offered: (session) => mayMark(session), | |
| 173 | for: "person", | |
| 174 | 174 | run: (session, ctx) => ctx.push(appTemplatesScreen(session, ctx)), |
| 175 | 175 | }; |
src/tui/screens/appleusage.ts +1 −1
| @@ -98,6 +98,6 @@ export const entry: PaletteEntry = { | ||
| 98 | 98 | hint: "the Apple app's anonymous usage: counts and timings per version", |
| 99 | 99 | after: ["limits"], |
| 100 | 100 | asks: "forge.administer", |
| 101 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 101 | for: "person", | |
| 102 | 102 | run: (session, ctx) => ctx.push(appleUsageScreen(session, ctx)), |
| 103 | 103 | }; |
src/tui/screens/apps_crew.ts +1 −1
| @@ -93,7 +93,7 @@ export const entry: PaletteEntry = { | ||
| 93 | 93 | id: "apps-crew", |
| 94 | 94 | title: "What the crew is doing", |
| 95 | 95 | hint: "one plain sentence per app: who is on what", |
| 96 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 96 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 97 | 97 | offered: () => true, |
| 98 | 98 | run: (session, ctx) => ctx.push(appsCrewScreen(session, ctx)), |
| 99 | 99 | }; |
src/tui/screens/archived.ts −1
| @@ -109,6 +109,5 @@ export const entry: PaletteEntry = { | ||
| 109 | 109 | title: "Archive", |
| 110 | 110 | hint: "what is put away, who put it there: open one or unarchive it", |
| 111 | 111 | asks: "forge.read", |
| 112 | offered: (session) => session.user !== undefined, | |
| 113 | 112 | run: (session, ctx) => ctx.push(archivedScreen(session, ctx)), |
| 114 | 113 | }; |
src/tui/screens/ask_data.ts +1 −1
src/tui/screens/audit.ts +1 −1
| @@ -110,7 +110,7 @@ export const entry: PaletteEntry = { | ||
| 110 | 110 | id: "audit", |
| 111 | 111 | title: "Who can do what", |
| 112 | 112 | hint: "each app's doors from its contract.json: yes, own or no", |
| 113 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 113 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 114 | 114 | offered: () => true, |
| 115 | 115 | run: (session, ctx) => |
| 116 | 116 | runAsync(ctx, async () => { |
src/tui/screens/bets.ts +1 −1
| @@ -198,6 +198,6 @@ export const entry: PaletteEntry = { | ||
| 198 | 198 | title: "Bets", |
| 199 | 199 | hint: "back, stop and finish a repository's bets", |
| 200 | 200 | asks: "forge.read", |
| 201 | offered: (session) => session.user !== undefined && session.user.kind !== "agent", | |
| 201 | for: "person", | |
| 202 | 202 | run: (session, ctx) => ctx.push(betsScreen(session, ctx)), |
| 203 | 203 | }; |
src/tui/screens/billing.ts +1 −1
src/tui/screens/billinglinks.ts +1 −1
| @@ -77,6 +77,6 @@ export const entry: PaletteEntry = { | ||
| 77 | 77 | hint: "where each hosted plan is paid for, shown on the home page", |
| 78 | 78 | after: ["limits", "invites"], |
| 79 | 79 | asks: "forge.administer", |
| 80 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 80 | for: "person", | |
| 81 | 81 | run: (session, ctx) => ctx.push(billingLinksScreen(session, ctx)), |
| 82 | 82 | }; |
src/tui/screens/bills.ts +1 −1
| @@ -68,6 +68,6 @@ export const entry: PaletteEntry = { | ||
| 68 | 68 | hint: "this month's cost of each forge you claimed", |
| 69 | 69 | asks: "forge.read", |
| 70 | 70 | shows: (session) => session.user === undefined || billNames(session.app, session.user).length > 0, |
| 71 | offered: (session) => session.user !== undefined && session.user.kind === "user" && billNames(session.app, session.user).length > 0, | |
| 71 | for: "person", | |
| 72 | 72 | run: (session, ctx) => ctx.push(billsScreen(session, ctx)), |
| 73 | 73 | }; |
src/tui/screens/boards.ts +1 −1
| @@ -424,6 +424,6 @@ export const entry: PaletteEntry = { | ||
| 424 | 424 | hint: "the forge's boards and their panels", |
| 425 | 425 | after: ["sentinel"], |
| 426 | 426 | asks: "forge.administer", |
| 427 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 427 | for: "person", | |
| 428 | 428 | run: (session, ctx) => ctx.push(boardsScreen(session, ctx)), |
| 429 | 429 | }; |
src/tui/screens/buckets.ts −1
| @@ -111,6 +111,5 @@ export const entry: PaletteEntry = { | ||
| 111 | 111 | title: "Buckets", |
| 112 | 112 | hint: "an object bucket's price a month, and binding it to an app", |
| 113 | 113 | asks: "forge.read", |
| 114 | offered: (session) => session.user !== undefined, | |
| 115 | 114 | run: (session, ctx) => ctx.push(bucketsScreen(session, ctx)), |
| 116 | 115 | }; |
src/tui/screens/budgets.ts −1
| @@ -91,6 +91,5 @@ export const entry: PaletteEntry = { | ||
| 91 | 91 | title: "Cloud budgets", |
| 92 | 92 | hint: "each cloud account's monthly budget against its projected spend", |
| 93 | 93 | asks: "forge.administer", |
| 94 | offered: (session) => session.user?.isAdmin === true, | |
| 95 | 94 | run: (session, ctx) => ctx.push(budgetsScreen(session, ctx)), |
| 96 | 95 | }; |
src/tui/screens/bugs.ts +1 −1
| @@ -52,7 +52,7 @@ export const entry: PaletteEntry = { | ||
| 52 | 52 | title: "Bugs", |
| 53 | 53 | hint: "open bugs and the bug clock", |
| 54 | 54 | after: ["boards"], |
| 55 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 55 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 56 | 56 | offered: () => true, |
| 57 | 57 | run: (session, ctx) => ctx.push(bugsScreen(session, ctx)), |
| 58 | 58 | }; |
src/tui/screens/bulk.ts +1 −1
| @@ -170,6 +170,6 @@ export const entry: PaletteEntry = { | ||
| 170 | 170 | hint: "your last bulk actions; u undoes one inside its day", |
| 171 | 171 | after: ["invites", "teams", "limits"], |
| 172 | 172 | asks: "forge.read", |
| 173 | offered: isPerson, | |
| 173 | for: "person", | |
| 174 | 174 | run: (session, ctx) => ctx.push(bulkScreen(session, ctx)), |
| 175 | 175 | }; |
src/tui/screens/childcredit.ts −1
| @@ -53,7 +53,6 @@ export const entry: PaletteEntry = { | ||
| 53 | 53 | hint: "set the dollars a forge you sent may spend on this one's model credential", |
| 54 | 54 | after: ["forges"], |
| 55 | 55 | asks: "forge.administer", |
| 56 | offered: (session) => session.user?.isAdmin === true, | |
| 57 | 56 | run: (session, ctx) => |
| 58 | 57 | runAsync(ctx, async () => { |
| 59 | 58 | const rows = (await clientRows(session.app)).filter((r) => r.made); |
src/tui/screens/claim_link.ts +2 −2
| @@ -70,7 +70,7 @@ export const entry: PaletteEntry = { | ||
| 70 | 70 | hint: "the old link stops; shown once", |
| 71 | 71 | after: ["claim-start"], |
| 72 | 72 | asks: "forge.read", |
| 73 | offered: (session) => session.user?.kind === "user", | |
| 73 | for: "person", | |
| 74 | 74 | run: (session, ctx) => ctx.push(claimLinkScreen(session, ctx)), |
| 75 | 75 | }; |
| 76 | 76 | |
| @@ -123,6 +123,6 @@ export const recoveryEntry: PaletteEntry = { | ||
| 123 | 123 | hint: "shown once; works once", |
| 124 | 124 | after: ["claim-link"], |
| 125 | 125 | asks: "forge.read", |
| 126 | offered: (session) => session.user?.kind === "user", | |
| 126 | for: "person", | |
| 127 | 127 | run: (session, ctx) => ctx.push(recoveryLinkScreen(session, ctx)), |
| 128 | 128 | }; |
src/tui/screens/claim_start.ts +1 −1
| @@ -72,6 +72,6 @@ export const entry: PaletteEntry = { | ||
| 72 | 72 | hint: "claim the repositories an agent started, from its one-time link", |
| 73 | 73 | after: ["invites", "repos"], |
| 74 | 74 | asks: "forge.read", |
| 75 | offered: (session) => session.user?.kind === "user", | |
| 75 | for: "person", | |
| 76 | 76 | run: (session, ctx) => ctx.push(claimStartScreen(session, ctx)), |
| 77 | 77 | }; |
src/tui/screens/cloud.ts −1
| @@ -277,6 +277,5 @@ export const entry: PaletteEntry = { | ||
| 277 | 277 | title: "Cloud accounts", |
| 278 | 278 | hint: "provider tokens, what they are used for, today's calls", |
| 279 | 279 | asks: "forge.administer", |
| 280 | offered: (session) => session.user?.isAdmin === true, | |
| 281 | 280 | run: (session, ctx) => ctx.push(cloudScreen(session, ctx)), |
| 282 | 281 | }; |
src/tui/screens/cloudcost.ts +1 −1
| @@ -56,6 +56,6 @@ export const entry: PaletteEntry = { | ||
| 56 | 56 | hint: "each account against its budget, and what costs most", |
| 57 | 57 | after: ["footing", "system"], |
| 58 | 58 | asks: "forge.administer", |
| 59 | offered: mayRead, | |
| 59 | for: "person", | |
| 60 | 60 | run: (session, ctx) => ctx.push(cloudCostScreen(session, ctx)), |
| 61 | 61 | }; |
src/tui/screens/cloudtree.ts −1
| @@ -324,6 +324,5 @@ export const entry: PaletteEntry = { | ||
| 324 | 324 | hint: "every resource on every cloud, what it costs, filtered", |
| 325 | 325 | after: ["cloud"], |
| 326 | 326 | asks: "forge.administer", |
| 327 | offered: (session) => session.user?.isAdmin === true, | |
| 328 | 327 | run: (session, ctx) => ctx.push(cloudTreeScreen(session, ctx)), |
| 329 | 328 | }; |
src/tui/screens/codes.ts +1 −2
| @@ -17,7 +17,6 @@ import type { Session } from "../session.ts"; | ||
| 17 | 17 | import { ListState, confirmScreen, drawList, live, yesNo, type ListRow } from "./common.ts"; |
| 18 | 18 | import type { PaletteEntry } from "./entries.ts"; |
| 19 | 19 | |
| 20 | const isAdmin = (f: Session): boolean => f.user?.isAdmin === true && f.user.kind !== "agent"; | |
| 21 | 20 | |
| 22 | 21 | export function codeRows(f: Session): { rows: ListRow[]; ids: string[]; plans: string[] } { |
| 23 | 22 | const read = readCodes(f.app, f.user); |
| @@ -100,6 +99,6 @@ export const entry: PaletteEntry = { | ||
| 100 | 99 | title: "Gift codes", |
| 101 | 100 | hint: "make a code that gives a plan for free, and revoke one", |
| 102 | 101 | asks: "forge.administer", |
| 103 | offered: isAdmin, | |
| 102 | for: "person", | |
| 104 | 103 | run: (session, ctx) => ctx.push(codesScreen(session, ctx)), |
| 105 | 104 | }; |
src/tui/screens/connections.ts +1 −1
| @@ -167,6 +167,6 @@ export const entry: PaletteEntry = { | ||
| 167 | 167 | title: "Connected accounts", |
| 168 | 168 | hint: "the hosts your mirrors come from", |
| 169 | 169 | asks: "forge.read", |
| 170 | offered: (session) => session.user !== undefined && session.user.kind !== "agent", | |
| 170 | for: "person", | |
| 171 | 171 | run: (session, ctx) => ctx.push(connectionsScreen(session, ctx)), |
| 172 | 172 | }; |
src/tui/screens/controls.ts +1 −2
| @@ -16,7 +16,6 @@ import type { Session } from "../session.ts"; | ||
| 16 | 16 | import { ListState, drawList, type ListRow } from "./common.ts"; |
| 17 | 17 | import type { PaletteEntry } from "./entries.ts"; |
| 18 | 18 | |
| 19 | const isAdmin = (f: Session): boolean => f.user?.isAdmin === true && f.user.kind !== "agent"; | |
| 20 | 19 | |
| 21 | 20 | /** The same four words as the page's badge. */ |
| 22 | 21 | function stateWord(ok: boolean, attention: boolean): string { |
| @@ -73,6 +72,6 @@ export const entry: PaletteEntry = { | ||
| 73 | 72 | title: "Security controls", |
| 74 | 73 | hint: "each safeguard, its state, and when it was last checked", |
| 75 | 74 | asks: "forge.administer", |
| 76 | offered: isAdmin, | |
| 75 | for: "person", | |
| 77 | 76 | run: (session, ctx) => ctx.push(controlsScreen(session, ctx)), |
| 78 | 77 | }; |
src/tui/screens/cores.ts −1
| @@ -31,7 +31,6 @@ export const entry: PaletteEntry = { | ||
| 31 | 31 | after: ["plan-row", "limits"], |
| 32 | 32 | asks: "forge.administer", |
| 33 | 33 | shows: () => coresLine() !== undefined, |
| 34 | offered: (session) => session.user?.isAdmin === true && coresLine() !== undefined, | |
| 35 | 34 | run: (session, ctx) => { |
| 36 | 35 | if (session.user?.isAdmin === true) ctx.push(coresScreen(session, ctx)); |
| 37 | 36 | }, |
src/tui/screens/crewbudgets.ts +1 −1
| @@ -94,6 +94,6 @@ export const entry: PaletteEntry = { | ||
| 94 | 94 | asks: "forge.administer", |
| 95 | 95 | // The budgets are the forge's own key's: a forge sent to someone has none to set. |
| 96 | 96 | shows: (session) => isOwnForge(session.app), |
| 97 | offered: mayAct, | |
| 97 | for: "person", | |
| 98 | 98 | run: (session, ctx) => ctx.push(crewBudgetsScreen(session, ctx)), |
| 99 | 99 | }; |
src/tui/screens/crewfallback.ts +1 −1
| @@ -93,6 +93,6 @@ export const entry: PaletteEntry = { | ||
| 93 | 93 | hint: "the capped key the crew falls back to when every plan's window is full", |
| 94 | 94 | after: ["crewbudgets"], |
| 95 | 95 | asks: "forge.administer", |
| 96 | offered: mayAct, | |
| 96 | for: "person", | |
| 97 | 97 | run: (session, ctx) => ctx.push(crewFallbackScreen(session, ctx)), |
| 98 | 98 | }; |
src/tui/screens/crewhandover.ts −1
| @@ -113,6 +113,5 @@ export const entry: PaletteEntry = { | ||
| 113 | 113 | hint: "issues parked twice, and the last restore drill", |
| 114 | 114 | after: ["crew-scorecard"], |
| 115 | 115 | asks: "forge.administer", |
| 116 | offered: (session) => session.user?.isAdmin === true, | |
| 117 | 116 | run: (session, ctx) => ctx.push(crewHandoverScreen(session, ctx)), |
| 118 | 117 | }; |
src/tui/screens/crewkey.ts +1 −1
src/tui/screens/crewsplits.ts −1
| @@ -82,6 +82,5 @@ export const entry: PaletteEntry = { | ||
| 82 | 82 | hint: "agent runs per model and per prompt version", |
| 83 | 83 | after: ["usage", "trusted-hosts", "secrets"], |
| 84 | 84 | asks: "forge.administer", |
| 85 | offered: (session) => session.user?.isAdmin === true, | |
| 86 | 85 | run: (session, ctx) => ctx.push(crewSplitsScreen(session, ctx)), |
| 87 | 86 | }; |
src/tui/screens/crewtop.ts −1
| @@ -160,6 +160,5 @@ export const entry: PaletteEntry = { | ||
| 160 | 160 | hint: "who is on what, what waits, accounts, the week and runs that failed early", |
| 161 | 161 | after: ["scorecard"], |
| 162 | 162 | asks: "forge.administer", |
| 163 | offered: mayReadCrewTop, | |
| 164 | 163 | run: (session, ctx) => ctx.push(crewTopScreen(session, ctx)), |
| 165 | 164 | }; |
src/tui/screens/dataset.ts +1 −1
| @@ -68,6 +68,6 @@ export const entry: PaletteEntry = { | ||
| 68 | 68 | hint: "what the forge's dataset holds, and what it already answers", |
| 69 | 69 | after: ["bottleneck", "system"], |
| 70 | 70 | asks: "forge.administer", |
| 71 | offered: mayRead, | |
| 71 | for: "person", | |
| 72 | 72 | run: (session, ctx) => ctx.push(datasetScreen(session, ctx)), |
| 73 | 73 | }; |
src/tui/screens/design.ts −1
| @@ -143,6 +143,5 @@ export const entry: PaletteEntry = { | ||
| 143 | 143 | hint: "colours and scales, the AA verdict; publish or revert", |
| 144 | 144 | after: ["footing"], |
| 145 | 145 | asks: "forge.read", |
| 146 | offered: (session) => session.user !== undefined, | |
| 147 | 146 | run: (session, ctx) => ctx.push(designScreen(session, ctx)), |
| 148 | 147 | }; |
src/tui/screens/design_gallery.ts +1 −1
| @@ -11,7 +11,7 @@ export const entry: PaletteEntry = { | ||
| 11 | 11 | id: "design-gallery", |
| 12 | 12 | title: "Component gallery", |
| 13 | 13 | hint: "every component the design names", |
| 14 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 14 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 15 | 15 | offered: () => true, |
| 16 | 16 | run: (_session, ctx) => ctx.toast(galleryLine(), "default"), |
| 17 | 17 | }; |
src/tui/screens/devices.ts +1 −1
| @@ -183,6 +183,6 @@ export const entry: PaletteEntry = { | ||
| 183 | 183 | hint: "LAN printers: model, state, supplies; declare or remove one", |
| 184 | 184 | after: ["app-templates"], |
| 185 | 185 | asks: "forge.administer", |
| 186 | offered: (session) => mayUse(session), | |
| 186 | for: "person", | |
| 187 | 187 | run: (session, ctx) => ctx.push(devicesScreen(session, ctx)), |
| 188 | 188 | }; |
src/tui/screens/disks.ts +2 −2
| @@ -6,7 +6,7 @@ | ||
| 6 | 6 | * `mayHandleDisks`. |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | import { mayHandleDisks, readMachine, readMachines } from "../../actions/disk_readings.ts"; | |
| 9 | import { readMachine, readMachines } from "../../actions/disk_readings.ts"; | |
| 10 | 10 | import { printable, type MachineSummary } from "../../machines/disk_readings.ts"; |
| 11 | 11 | import type { Ctx, Screen } from "../app/app.ts"; |
| 12 | 12 | import { binding } from "../app/keys.ts"; |
| @@ -70,7 +70,7 @@ export const entry: PaletteEntry = { | ||
| 70 | 70 | hint: "machines' disk readings: 30-day write rate and projected rated-TBW date", |
| 71 | 71 | after: ["system"], |
| 72 | 72 | asks: "forge.administer", |
| 73 | offered: (session) => mayHandleDisks(session.user), | |
| 73 | for: "person", | |
| 74 | 74 | run: (session, ctx) => { |
| 75 | 75 | const names = readMachines(session.app, session.user); |
| 76 | 76 | if (!names.ok || names.value.length === 0) return ctx.toast("No disk readings yet"); |
src/tui/screens/displays.ts −1
src/tui/screens/domains.ts +1 −1
| @@ -137,6 +137,6 @@ export const entry: PaletteEntry = { | ||
| 137 | 137 | title: "Failure domains", |
| 138 | 138 | hint: "failure domains and their last drill", |
| 139 | 139 | asks: "forge.administer", |
| 140 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 140 | for: "person", | |
| 141 | 141 | run: (session, ctx) => ctx.push(domainsScreen(session, ctx)), |
| 142 | 142 | }; |
src/tui/screens/dotfiles.ts +1 −1
| @@ -67,6 +67,6 @@ export const entry: PaletteEntry = { | ||
| 67 | 67 | title: "Your dotfiles", |
| 68 | 68 | hint: "the repository every shell you open copies from", |
| 69 | 69 | asks: "forge.read", |
| 70 | offered: (session) => session.user !== undefined && session.user.kind !== "agent", | |
| 70 | for: "person", | |
| 71 | 71 | run: (session, ctx) => ctx.push(dotfilesScreen(session, ctx)), |
| 72 | 72 | }; |
src/tui/screens/drift.ts +1 −1
| @@ -83,6 +83,6 @@ export const entry: PaletteEntry = { | ||
| 83 | 83 | hint: "open pulls far behind main, and the one action that brings each up to date", |
| 84 | 84 | after: ["boards"], |
| 85 | 85 | asks: "forge.administer", |
| 86 | offered: mayDrift, | |
| 86 | for: "person", | |
| 87 | 87 | run: (session, ctx) => ctx.push(driftScreen(session, ctx)), |
| 88 | 88 | }; |
src/tui/screens/dutybudgets.ts +1 −1
| @@ -79,6 +79,6 @@ export const entry: PaletteEntry = { | ||
| 79 | 79 | hint: "runs per day and dollars per day a duty may use", |
| 80 | 80 | after: ["maintenance-duties", "maintenance-runs"], |
| 81 | 81 | asks: "forge.administer", |
| 82 | offered: mayAct, | |
| 82 | for: "person", | |
| 83 | 83 | run: (session, ctx) => ctx.push(dutyBudgetScreen(session, ctx)), |
| 84 | 84 | }; |
src/tui/screens/dutyswitch.ts +1 −1
| @@ -98,6 +98,6 @@ export const entry: PaletteEntry = { | ||
| 98 | 98 | hint: "switch a duty off, or on again after it paused itself", |
| 99 | 99 | after: ["maintenance-runs", "maintenance"], |
| 100 | 100 | asks: "forge.administer", |
| 101 | offered: mayAct, | |
| 101 | for: "person", | |
| 102 | 102 | run: (session, ctx) => ctx.push(dutySwitchScreen(session, ctx)), |
| 103 | 103 | }; |
src/tui/screens/economics.ts +1 −1
| @@ -203,6 +203,6 @@ export const entry: PaletteEntry = { | ||
| 203 | 203 | hint: "the profit slider's position, the margin, the owned-node label and the prices; change one", |
| 204 | 204 | after: ["limits"], |
| 205 | 205 | asks: "forge.administer", |
| 206 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 206 | for: "person", | |
| 207 | 207 | run: (session, ctx) => ctx.push(economicsScreen(session, ctx)), |
| 208 | 208 | }; |
src/tui/screens/edgeonly.ts +1 −2
| @@ -17,7 +17,6 @@ import { emptyState } from "../ui/widgets.ts"; | ||
| 17 | 17 | import { ListState, drawList, type ListRow } from "./common.ts"; |
| 18 | 18 | import type { PaletteEntry } from "./entries.ts"; |
| 19 | 19 | |
| 20 | const isAdmin = (f: Session): boolean => f.user?.isAdmin === true && f.user.kind !== "agent"; | |
| 21 | 20 | |
| 22 | 21 | export function edgeOnlyScreen(f: Session, ctx: Ctx): Screen { |
| 23 | 22 | const state = new ListState(); |
| @@ -58,6 +57,6 @@ export const entry: PaletteEntry = { | ||
| 58 | 57 | title: "Edge-only accounts", |
| 59 | 58 | hint: "who would be locked out if the platform edge sign-in went off", |
| 60 | 59 | asks: "forge.administer", |
| 61 | offered: isAdmin, | |
| 60 | for: "person", | |
| 62 | 61 | run: (session, ctx) => ctx.push(edgeOnlyScreen(session, ctx)), |
| 63 | 62 | }; |
src/tui/screens/entries.ts +29 −36
| @@ -9,15 +9,14 @@ | ||
| 9 | 9 | * `forge.ts`, never the reverse. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | import { askBeside } from "../../core/access_disagreement.ts"; | |
| 13 | import type { Action } from "../../core/may.ts"; | |
| 12 | import { type Action, holds } from "../../core/may.ts"; | |
| 14 | 13 | import { principalOfUser } from "../../core/principal.ts"; |
| 15 | 14 | import type { Ctx } from "../app/app.ts"; |
| 16 | 15 | import type { Command } from "../app/palette.ts"; |
| 17 | 16 | import type { Session } from "../session.ts"; |
| 18 | 17 | import { SCREEN_MODULES } from "../../generated/screens.ts"; |
| 19 | 18 | |
| 20 | export interface PaletteEntry { | |
| 19 | interface EntryBase { | |
| 21 | 20 | readonly id: string; |
| 22 | 21 | /** |
| 23 | 22 | * Where the palette offers it: lower first, grouped by purpose and spaced |
| @@ -32,24 +31,28 @@ export interface PaletteEntry { | ||
| 32 | 31 | * `addEntries` is called. |
| 33 | 32 | */ |
| 34 | 33 | readonly after?: readonly string[]; |
| 35 | /** Whether this session is offered the entry: the whole answer, callers may ask it alone. */ | |
| 36 | offered(session: Session): boolean; | |
| 37 | 34 | /** |
| 38 | * The part of `offered` that is not who is asking (a file the forge has, a repository with | |
| 39 | * runs): asked first, and when it says no the entry is not offered and `may` is not asked, so a | |
| 40 | * screen with nothing to show counts no parting. | |
| 35 | * The part of the answer that is not who is asking (a file the forge has, a repository with | |
| 36 | * runs): asked first, and when it says no the entry is not offered. | |
| 41 | 37 | */ |
| 42 | 38 | shows?(session: Session): boolean; |
| 43 | /** | |
| 44 | * The action `offered` stands for, when its gate is the forge's admin (`forge.administer`) or an | |
| 45 | * account (`forge.read`, opening a screen): `may` is asked it beside `offered`, which still | |
| 46 | * decides, and a parting is counted under `terminal <id>` (#18396). An entry gated on anything | |
| 47 | * else (a grant, a subscription, a telemetry role, or nothing) names none, and says why. | |
| 48 | */ | |
| 49 | readonly asks?: Action; | |
| 50 | 39 | run(session: Session, ctx: Ctx): void; |
| 51 | 40 | } |
| 52 | 41 | |
| 42 | /** | |
| 43 | * Who decides whether a session is offered the entry. An entry whose gate is the forge's admin | |
| 44 | * names `forge.administer`, one whose gate is an account names `forge.read` (opening a screen is a | |
| 45 | * read), and `may` alone answers it, as the terminal's account (#18426). `for: "person"` says the | |
| 46 | * screen is a person's: an agent is not offered it, whatever it may do. An entry gated on anything | |
| 47 | * `may` has no action for (a grant, a subscription, an organization, or nothing) keeps its own | |
| 48 | * `offered` and says why beside it. | |
| 49 | */ | |
| 50 | type Gate = | |
| 51 | | { readonly asks: Action; readonly for?: "person"; readonly offered?: never } | |
| 52 | | { readonly offered: (session: Session) => boolean; readonly asks?: never; readonly for?: never }; | |
| 53 | ||
| 54 | export type PaletteEntry = EntryBase & Gate; | |
| 55 | ||
| 53 | 56 | /** |
| 54 | 57 | * Every entry the screen files declare, by rank, then file name, then export name. The roster is |
| 55 | 58 | * `src/generated/screens.ts`. |
| @@ -59,29 +62,19 @@ export const ENTRIES: readonly PaletteEntry[] = SCREEN_MODULES.flatMap(([mod, na | ||
| 59 | 62 | ); |
| 60 | 63 | |
| 61 | 64 | /** |
| 62 | * What each session's palette has asked `may` already: an entry, the account and the gate's answer. | |
| 63 | * The palette is built on every open, and an answer asked once is not asked again, so a session | |
| 64 | * writes at most one parting per entry and not one per build. | |
| 65 | * Whether the session is offered `e`. What there is to show is asked first. An entry that names an | |
| 66 | * action is offered when `may` grants it to the terminal's account (`none`: the terminal acts for | |
| 67 | * the person signed in to it). A signed-out terminal has no account to ask as, so it is offered | |
| 68 | * only the entries that name none: on the web too a screen for accounts asks you to sign in, though | |
| 69 | * `forge.read` is open to all. A person's screen (`for: "person"`) is not offered to an agent, an | |
| 70 | * admin agent included: the screen is a person's work, not a permission the agent lacks. | |
| 65 | 71 | */ |
| 66 | const asked = new WeakMap<Session, Set<string>>(); | |
| 67 | ||
| 68 | /** | |
| 69 | * Whether the session is offered `e`: its own gate decides; when the entry names the action that | |
| 70 | * gate stands for, `may` is asked it beside, once a session, as the screen's account (`none`: the | |
| 71 | * terminal acts for the person signed in to it), and a parting is counted. | |
| 72 | */ | |
| 73 | function offers(e: PaletteEntry, session: Session): boolean { | |
| 72 | export function offers(e: PaletteEntry, session: Session): boolean { | |
| 74 | 73 | if (e.shows?.(session) === false) return false; |
| 75 | const old = e.offered(session); | |
| 76 | if (e.asks === undefined) return old; | |
| 77 | const key = `${e.id} ${session.user?.id ?? ""} ${session.user?.isAdmin === true} ${old}`; | |
| 78 | let seen = asked.get(session); | |
| 79 | if (seen === undefined) asked.set(session, (seen = new Set())); | |
| 80 | if (!seen.has(key)) { | |
| 81 | seen.add(key); | |
| 82 | askBeside(session.app.db, principalOfUser(session.user), `terminal ${e.id}`, e.asks, old); | |
| 83 | } | |
| 84 | return old; | |
| 74 | if (e.asks === undefined) return e.offered(session); | |
| 75 | const user = session.user; | |
| 76 | if (user === undefined || (e.for === "person" && user.kind === "agent")) return false; | |
| 77 | return holds(session.app.db, principalOfUser(user), e.asks); | |
| 85 | 78 | } |
| 86 | 79 | |
| 87 | 80 | /** |
src/tui/screens/experiments.ts −1
| @@ -152,6 +152,5 @@ export const entry: PaletteEntry = { | ||
| 152 | 152 | hint: "what each cloud machine costs and answers", |
| 153 | 153 | after: ["pinned"], |
| 154 | 154 | asks: "forge.administer", |
| 155 | offered: (session) => session.user?.isAdmin === true, | |
| 156 | 155 | run: (session, ctx) => ctx.push(experimentsScreen(session, ctx)), |
| 157 | 156 | }; |
src/tui/screens/featurefeed.ts −1
| @@ -122,6 +122,5 @@ export const entry: PaletteEntry = { | ||
| 122 | 122 | hint: "the feed items about an absorbed app, as Settings › Features shows them", |
| 123 | 123 | after: ["feature-review"], |
| 124 | 124 | asks: "forge.read", |
| 125 | offered: (session) => session.user !== undefined, | |
| 126 | 125 | run: (session, ctx) => ctx.push(featureFeedPicker(session, ctx)), |
| 127 | 126 | }; |
src/tui/screens/features.ts +1 −1
| @@ -79,6 +79,6 @@ export const entry: PaletteEntry = { | ||
| 79 | 79 | title: "Menu entries to review", |
| 80 | 80 | hint: "absorbed apps whose declared name or page changed: accept them", |
| 81 | 81 | asks: "forge.administer", |
| 82 | offered: mayReview, | |
| 82 | for: "person", | |
| 83 | 83 | run: (session, ctx) => ctx.push(featuresScreen(session, ctx)), |
| 84 | 84 | }; |
src/tui/screens/featureswitch.ts +1 −1
| @@ -163,6 +163,6 @@ export const entry: PaletteEntry = { | ||
| 163 | 163 | title: "Features", |
| 164 | 164 | hint: "apps that declare a feature: absorb one, change its settings", |
| 165 | 165 | asks: "forge.administer", |
| 166 | offered: mayFeatures, | |
| 166 | for: "person", | |
| 167 | 167 | run: (session, ctx) => ctx.push(featureSwitchScreen(session, ctx)), |
| 168 | 168 | }; |
src/tui/screens/feed.ts −1
| @@ -338,6 +338,5 @@ export const entry: PaletteEntry = { | ||
| 338 | 338 | title: "Feed", |
| 339 | 339 | hint: "what happened, ranked; r replies on a post about an issue or pull, l likes, h who liked, p its permalink, o a run's log", |
| 340 | 340 | asks: "forge.read", |
| 341 | offered: (session) => session.user !== undefined, | |
| 342 | 341 | run: (session, ctx) => ctx.push(feedScreen(session, ctx)), |
| 343 | 342 | }; |
src/tui/screens/flowsall.ts +1 −1
src/tui/screens/footing.ts +1 −1
| @@ -77,6 +77,6 @@ export const entry: PaletteEntry = { | ||
| 77 | 77 | hint: "each piece on another machine, in the order it would break the forge", |
| 78 | 78 | after: ["stalls", "system"], |
| 79 | 79 | asks: "forge.administer", |
| 80 | offered: mayRead, | |
| 80 | for: "person", | |
| 81 | 81 | run: (session, ctx) => ctx.push(footingScreen(session, ctx)), |
| 82 | 82 | }; |
src/tui/screens/forgeready.ts −1
| @@ -18,7 +18,6 @@ export const entry: PaletteEntry = { | ||
| 18 | 18 | after: ["forges"], |
| 19 | 19 | // Admin only, as `forges` is: the list names every forge this one sent. |
| 20 | 20 | asks: "forge.administer", |
| 21 | offered: (session) => session.user?.isAdmin === true, | |
| 22 | 21 | run: (session, ctx: Ctx) => |
| 23 | 22 | runAsync(ctx, async () => { |
| 24 | 23 | // From the ledger alone: filling the picker probes no child. |
src/tui/screens/forges.ts −1
| @@ -505,7 +505,6 @@ export const entry: PaletteEntry = { | ||
| 505 | 505 | title: "Forges you sent", |
| 506 | 506 | hint: "each forge sent, claimed or not, and its apps", |
| 507 | 507 | asks: "forge.administer", |
| 508 | offered: (session) => session.user?.isAdmin === true, | |
| 509 | 508 | run: (session, ctx) => runAsync(ctx, async () => { |
| 510 | 509 | ctx.push(forgesScreen(ctx, await clientRows(session.app), session)); |
| 511 | 510 | }), |
src/tui/screens/forgeview.ts −1
src/tui/screens/front.ts +1 −1
| @@ -156,7 +156,7 @@ export const entry: PaletteEntry = { | ||
| 156 | 156 | id: "front", |
| 157 | 157 | title: "Front page", |
| 158 | 158 | hint: "the apps a first visitor sees, ranked; an admin pins or hides", |
| 159 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 159 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 160 | 160 | offered: () => true, |
| 161 | 161 | run: (session, ctx) => ctx.push(frontScreen(session, ctx)), |
| 162 | 162 | }; |
src/tui/screens/frontms.ts −1
src/tui/screens/funnel.ts +1 −1
| @@ -51,6 +51,6 @@ export const entry: PaletteEntry = { | ||
| 51 | 51 | title: "From visit to paid", |
| 52 | 52 | hint: "the last 7 days: home visits, plans seen, plan clicks, forges made, paid", |
| 53 | 53 | asks: "forge.administer", |
| 54 | offered: mayRead, | |
| 54 | for: "person", | |
| 55 | 55 | run: (f, ctx) => ctx.push(funnelScreen(f, ctx)), |
| 56 | 56 | }; |
src/tui/screens/health_voice.ts +1 −1
| @@ -36,7 +36,7 @@ export const entry: PaletteEntry = { | ||
| 36 | 36 | title: "Health — spoken", |
| 37 | 37 | hint: "how the forge is, in two plain sentences", |
| 38 | 38 | after: ["system", "flow", "boards"], |
| 39 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 39 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 40 | 40 | offered: () => true, |
| 41 | 41 | run: (session, ctx) => ctx.push(healthVoiceScreen(session, ctx)), |
| 42 | 42 | }; |
src/tui/screens/home_pins.ts +1 −1
src/tui/screens/hostreach.ts +1 −1
| @@ -184,6 +184,6 @@ export const entry: PaletteEntry = { | ||
| 184 | 184 | hint: "answer what a hosted forge asked to reach, and take a grant back", |
| 185 | 185 | after: ["forges"], |
| 186 | 186 | asks: "forge.administer", |
| 187 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 187 | for: "person", | |
| 188 | 188 | run: (session, ctx) => ctx.push(hostReachScreen(session, ctx)), |
| 189 | 189 | }; |
src/tui/screens/infra.ts −1
| @@ -694,6 +694,5 @@ export const entry: PaletteEntry = { | ||
| 694 | 694 | hint: "what runs on your own cloud, what it costs, when it ends", |
| 695 | 695 | after: ["cloud"], |
| 696 | 696 | asks: "forge.administer", |
| 697 | offered: (session) => session.user?.isAdmin === true, | |
| 698 | 697 | run: (session, ctx) => ctx.push(infraScreen(session, ctx)), |
| 699 | 698 | }; |
src/tui/screens/inventory.ts −1
| @@ -119,6 +119,5 @@ export const entry: PaletteEntry = { | ||
| 119 | 119 | hint: "every repository on your connected accounts, what it holds, where its move stands", |
| 120 | 120 | after: ["migrate"], |
| 121 | 121 | asks: "forge.read", |
| 122 | offered: (session) => session.user !== undefined, | |
| 123 | 122 | run: (session, ctx) => ctx.push(inventoryScreen(session, ctx)), |
| 124 | 123 | }; |
src/tui/screens/invites.ts +1 −1
| @@ -221,6 +221,6 @@ export const entry: PaletteEntry = { | ||
| 221 | 221 | hint: "make a single-use link, see which are open, revoke one", |
| 222 | 222 | after: ["teams", "limits", "quotas", "people", "can"], |
| 223 | 223 | asks: "forge.administer", |
| 224 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 224 | for: "person", | |
| 225 | 225 | run: (session, ctx) => ctx.push(invitesScreen(session, ctx)), |
| 226 | 226 | }; |
src/tui/screens/knobs.ts −1
| @@ -71,6 +71,5 @@ export const entry: PaletteEntry = { | ||
| 71 | 71 | hint: "speed, weekly budget, polish, autonomy, feedback first", |
| 72 | 72 | after: ["crew-scorecard", "usage"], |
| 73 | 73 | asks: "forge.administer", |
| 74 | offered: (session) => session.user?.isAdmin === true, | |
| 75 | 74 | run: (session, ctx) => ctx.push(knobsScreen(session, ctx)), |
| 76 | 75 | }; |
src/tui/screens/lapsed.ts +1 −2
| @@ -24,7 +24,6 @@ import type { PaletteEntry } from "./entries.ts"; | ||
| 24 | 24 | /** Said when `p` is pressed on a forge whose link has expired: no checkout is made. */ |
| 25 | 25 | export const EXPIRED_NOTE = "This link has expired; ask the operator before paying."; |
| 26 | 26 | |
| 27 | const isAdmin = (f: Session): boolean => f.user?.isAdmin === true && f.user.kind !== "agent"; | |
| 28 | 27 | |
| 29 | 28 | /** The forges asleep for want of payment, with the lines that say why and how to export. */ |
| 30 | 29 | export function lapsedForges(f: Session): { name: string; expired: boolean; lines: string[] }[] { |
| @@ -95,6 +94,6 @@ export const entry: PaletteEntry = { | ||
| 95 | 94 | hint: "forges asleep until paid, when their data goes, pay again", |
| 96 | 95 | after: ["billing"], |
| 97 | 96 | asks: "forge.administer", |
| 98 | offered: isAdmin, | |
| 97 | for: "person", | |
| 99 | 98 | run: (session, ctx) => ctx.push(lapsedScreen(session, ctx)), |
| 100 | 99 | }; |
src/tui/screens/limits.ts +1 −1
| @@ -111,6 +111,6 @@ export const entry: PaletteEntry = { | ||
| 111 | 111 | hint: "what the forge caps, with default and bounds; change one", |
| 112 | 112 | after: ["quotas", "people", "can"], |
| 113 | 113 | asks: "forge.administer", |
| 114 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 114 | for: "person", | |
| 115 | 115 | run: (session, ctx) => ctx.push(limitsScreen(session, ctx)), |
| 116 | 116 | }; |
src/tui/screens/loopstalls.ts +1 −1
src/tui/screens/madefrom.ts −1
| @@ -44,6 +44,5 @@ export const entry: PaletteEntry = { | ||
| 44 | 44 | after: ["plan-row"], |
| 45 | 45 | asks: "forge.read", |
| 46 | 46 | shows: (session) => madeFromOf(session.app.config.dataDir) !== undefined, |
| 47 | offered: (session) => session.signedIn && madeFromOf(session.app.config.dataDir) !== undefined, | |
| 48 | 47 | run: (session, ctx) => ctx.push(madeFromScreen(session, ctx)), |
| 49 | 48 | }; |
src/tui/screens/maintainruns.ts −1
src/tui/screens/maintenance.ts +1 −1
| @@ -281,6 +281,6 @@ export const entry: PaletteEntry = { | ||
| 281 | 281 | hint: "prepare the forge for a power-off, check the drain, or end maintenance", |
| 282 | 282 | after: ["resilience", "capacity", "flow", "sentinel"], |
| 283 | 283 | asks: "forge.administer", |
| 284 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 284 | for: "person", | |
| 285 | 285 | run: (session, ctx) => ctx.push(maintenanceScreen(session, ctx)), |
| 286 | 286 | }; |
src/tui/screens/mergedbranches.ts +1 −1
| @@ -79,6 +79,6 @@ export const entry: PaletteEntry = { | ||
| 79 | 79 | hint: "delete the merged pulls' branches in one receipted step", |
| 80 | 80 | after: ["maintenance", "maintenance-runs", "stale-pulls"], |
| 81 | 81 | asks: "forge.administer", |
| 82 | offered: mayAct, | |
| 82 | for: "person", | |
| 83 | 83 | run: (session, ctx) => ctx.push(mergedBranchesScreen(session, ctx)), |
| 84 | 84 | }; |
src/tui/screens/mirrorpacks.ts +1 −1
| @@ -68,6 +68,6 @@ export const entry: PaletteEntry = { | ||
| 68 | 68 | hint: "bring each pack's upstream projects in as read-only repositories", |
| 69 | 69 | after: ["packs"], |
| 70 | 70 | asks: "forge.administer", |
| 71 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 71 | for: "person", | |
| 72 | 72 | run: (session, ctx) => ctx.push(mirrorPacksScreen(session, ctx)), |
| 73 | 73 | }; |
src/tui/screens/model.ts +2 −2
| @@ -366,7 +366,7 @@ export const modelGrantEntry: PaletteEntry = { | ||
| 366 | 366 | hint: "give an account dollars a month, or take it back", |
| 367 | 367 | after: ["model"], |
| 368 | 368 | asks: "forge.administer", |
| 369 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 369 | for: "person", | |
| 370 | 370 | run: (session, ctx) => ctx.push(modelGrantPrompt(session, ctx, blank("Model grant"))), |
| 371 | 371 | }; |
| 372 | 372 | |
| @@ -378,6 +378,6 @@ export const modelCeilingEntry: PaletteEntry = { | ||
| 378 | 378 | hint: "set an account's dollars a day and a run", |
| 379 | 379 | after: ["model-grant"], |
| 380 | 380 | asks: "forge.administer", |
| 381 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 381 | for: "person", | |
| 382 | 382 | run: (session, ctx) => ctx.push(modelCeilingPrompt(session, ctx, blank("Model ceiling"))), |
| 383 | 383 | }; |
src/tui/screens/money.ts +1 −1
| @@ -100,7 +100,7 @@ export const entry: PaletteEntry = { | ||
| 100 | 100 | hint: "this month's cost, revenue and gap, and the last 30 days", |
| 101 | 101 | after: ["economics"], |
| 102 | 102 | asks: "forge.administer", |
| 103 | offered: (f) => f.user?.isAdmin === true && f.user.kind !== "agent", | |
| 103 | for: "person", | |
| 104 | 104 | run: (f, ctx) => ctx.push(moneyScreen(f, ctx)), |
| 105 | 105 | }; |
| 106 | 106 |
src/tui/screens/newissue.ts −1
src/tui/screens/next.ts +1 −2
| @@ -285,7 +285,6 @@ export function nextScreen(f: Session, ctx: Ctx, repo: Repo): Screen { | ||
| 285 | 285 | /** |
| 286 | 286 | * Next up across repositories (#15870): read-only, the same `nextAll` as `/next` and the MCP tool. |
| 287 | 287 | */ |
| 288 | const mayReadAll = (session: Session): boolean => session.user !== undefined && session.user.kind !== "agent"; | |
| 289 | 288 | |
| 290 | 289 | /** One line for each repository, then one per row: " 1. title (#7, on it: ada)". */ |
| 291 | 290 | export function nextAllLines(groups: readonly NextGroup[]): string[] { |
| @@ -325,7 +324,7 @@ export const nextAllEntry: PaletteEntry = { | ||
| 325 | 324 | hint: "the top of each list you administer", |
| 326 | 325 | after: ["waiting-for-me"], |
| 327 | 326 | asks: "forge.read", |
| 328 | offered: mayReadAll, | |
| 327 | for: "person", | |
| 329 | 328 | run: (session, ctx) => { |
| 330 | 329 | if (session.user === undefined) return; |
| 331 | 330 | ctx.push(nextAllScreen(ctx, nextAll(session.app, session.user))); |
src/tui/screens/nowlist.ts +1 −1
| @@ -63,6 +63,6 @@ export const entry: PaletteEntry = { | ||
| 63 | 63 | hint: "what check, review, land and live count, with the rows", |
| 64 | 64 | after: ["boards"], |
| 65 | 65 | asks: "forge.administer", |
| 66 | offered: (session) => mayReadNow(session.user), | |
| 66 | for: "person", | |
| 67 | 67 | run: (session, ctx) => ctx.push(nowScreen(session, ctx)), |
| 68 | 68 | }; |
src/tui/screens/offers.ts +1 −2
| @@ -15,7 +15,6 @@ import { style } from "../term/style.ts"; | ||
| 15 | 15 | import { Scroll, drawLines, hitScroll } from "./common.ts"; |
| 16 | 16 | import type { PaletteEntry } from "./entries.ts"; |
| 17 | 17 | |
| 18 | const mayRead = (session: Session): boolean => session.user !== undefined && session.user.kind !== "agent"; | |
| 19 | 18 | |
| 20 | 19 | /** |
| 21 | 20 | * One receipt as text lines, the page's rows in the page's words; detail lines start with a space. |
| @@ -98,7 +97,7 @@ export const entry: PaletteEntry = { | ||
| 98 | 97 | hint: "the receipts of what you offered from your forks", |
| 99 | 98 | after: ["waiting-for-me"], |
| 100 | 99 | asks: "forge.read", |
| 101 | offered: mayRead, | |
| 100 | for: "person", | |
| 102 | 101 | run: (session, ctx) => { |
| 103 | 102 | if (session.user === undefined) return; |
| 104 | 103 | ctx.push(offersScreen(ctx, listForkOffers(session.app.db, session.user), session)); |
src/tui/screens/offsite.ts +1 −1
| @@ -76,6 +76,6 @@ export const entry: PaletteEntry = { | ||
| 76 | 76 | hint: "where the sealed lane writes, when it last succeeded, and the last restore drill", |
| 77 | 77 | after: ["footing"], |
| 78 | 78 | asks: "forge.administer", |
| 79 | offered: mayRead, | |
| 79 | for: "person", | |
| 80 | 80 | run: (session, ctx) => ctx.push(offsiteScreen(session, ctx)), |
| 81 | 81 | }; |
src/tui/screens/originahead.ts +1 −1
| @@ -80,7 +80,7 @@ export const entry: PaletteEntry = { | ||
| 80 | 80 | id: "origin-ahead", |
| 81 | 81 | title: "New commits upstream", |
| 82 | 82 | hint: "mirrors whose origin has moved on: take them", |
| 83 | // Names no `asks`: offered to everyone, so there is no gate for `may` to be asked beside. | |
| 83 | // Names no `asks`: offered to everyone, signed out too, so there is nothing for `may` to answer. | |
| 84 | 84 | offered: () => true, |
| 85 | 85 | run: (session, ctx) => ctx.push(originAheadScreen(session, ctx)), |
| 86 | 86 | }; |
src/tui/screens/owner.ts +1 −1
| @@ -77,6 +77,6 @@ export const entry: PaletteEntry = { | ||
| 77 | 77 | title: "Owner's needs", |
| 78 | 78 | hint: "what needs the owner, snapshots, failure domains", |
| 79 | 79 | asks: "forge.administer", |
| 80 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 80 | for: "person", | |
| 81 | 81 | run: (session, ctx) => ctx.push(ownerScreen(session, ctx)), |
| 82 | 82 | }; |
src/tui/screens/packrepos.ts +1 −1
| @@ -79,6 +79,6 @@ export const entry: PaletteEntry = { | ||
| 79 | 79 | hint: "which repositories /packs lists", |
| 80 | 80 | after: ["mirror-packs", "packs"], |
| 81 | 81 | asks: "forge.administer", |
| 82 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 82 | for: "person", | |
| 83 | 83 | run: (session, ctx) => ctx.push(packReposScreen(session, ctx)), |
| 84 | 84 | }; |
src/tui/screens/payments.ts +1 −1
| @@ -72,6 +72,6 @@ export const entry: PaletteEntry = { | ||
| 72 | 72 | title: "Payments", |
| 73 | 73 | hint: "what was charged for the forges you claimed", |
| 74 | 74 | asks: "forge.read", |
| 75 | offered: (session) => session.user !== undefined && session.user.kind === "user", | |
| 75 | for: "person", | |
| 76 | 76 | run: (session, ctx) => ctx.push(paymentsScreen(session, ctx)), |
| 77 | 77 | }; |
src/tui/screens/people.ts +1 −1
| @@ -193,6 +193,6 @@ export const entry: PaletteEntry = { | ||
| 193 | 193 | hint: "who is a guest, a member or an admin; promote or demote", |
| 194 | 194 | after: ["can"], |
| 195 | 195 | asks: "forge.administer", |
| 196 | offered: (session) => session.user?.isAdmin === true && session.user.kind === "user", | |
| 196 | for: "person", | |
| 197 | 197 | run: (session, ctx) => ctx.push(peopleScreen(session, ctx)), |
| 198 | 198 | }; |
src/tui/screens/pinned.ts −1
| @@ -288,6 +288,5 @@ export const entry: PaletteEntry = { | ||
| 288 | 288 | hint: "deploy, update and roll back a forge on your cloud", |
| 289 | 289 | after: ["cloud"], |
| 290 | 290 | asks: "forge.administer", |
| 291 | offered: (session) => session.user?.isAdmin === true, | |
| 292 | 291 | run: (session, ctx) => ctx.push(pinnedScreen(session, ctx)), |
| 293 | 292 | }; |
src/tui/screens/planner.ts −1
| @@ -38,6 +38,5 @@ export const entry: PaletteEntry = { | ||
| 38 | 38 | hint: "its last pass, its spend this week and what became of what it filed", |
| 39 | 39 | after: ["crewbudgets"], |
| 40 | 40 | asks: "forge.administer", |
| 41 | offered: (f) => f.user?.isAdmin === true, | |
| 42 | 41 | run: (session, ctx) => ctx.push(plannerScreen(session, ctx)), |
| 43 | 42 | }; |
src/tui/screens/planrow.ts −1
| @@ -75,6 +75,5 @@ export const entry: PaletteEntry = { | ||
| 75 | 75 | hint: "this forge's plan, its last backup, and where its owner manages billing", |
| 76 | 76 | after: ["billing-links", "limits"], |
| 77 | 77 | asks: "forge.administer", |
| 78 | offered: (session) => session.user?.isAdmin === true, | |
| 79 | 78 | run: (session, ctx) => ctx.push(planRowScreen(session, ctx)), |
| 80 | 79 | }; |
src/tui/screens/plans.ts +1 −1
| @@ -132,6 +132,6 @@ export const entry: PaletteEntry = { | ||
| 132 | 132 | hint: "free, small, medium and large: size, price, crew credit, forges; change one", |
| 133 | 133 | after: ["limits"], |
| 134 | 134 | asks: "forge.administer", |
| 135 | offered: (session: Session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 135 | for: "person", | |
| 136 | 136 | run: (session, ctx) => ctx.push(plansScreen(session, ctx)), |
| 137 | 137 | }; |
src/tui/screens/previewdirs.ts +1 −1
| @@ -78,6 +78,6 @@ export const entry: PaletteEntry = { | ||
| 78 | 78 | hint: "remove the old previews' data in one receipted step", |
| 79 | 79 | after: ["maintenance", "maintenance-runs", "merged-branches"], |
| 80 | 80 | asks: "forge.administer", |
| 81 | offered: mayAct, | |
| 81 | for: "person", | |
| 82 | 82 | run: (session, ctx) => ctx.push(previewDirsScreen(session, ctx)), |
| 83 | 83 | }; |
src/tui/screens/profile.ts +1 −1
| @@ -227,6 +227,6 @@ export const entry: PaletteEntry = { | ||
| 227 | 227 | title: "Your profile", |
| 228 | 228 | hint: "display name and email", |
| 229 | 229 | asks: "forge.read", |
| 230 | offered: (session) => session.user !== undefined && session.user.kind !== "agent", | |
| 230 | for: "person", | |
| 231 | 231 | run: (session, ctx) => ctx.push(profileScreen(session, ctx)), |
| 232 | 232 | }; |
src/tui/screens/quotas.ts +1 −1
| @@ -105,6 +105,6 @@ export const entry: PaletteEntry = { | ||
| 105 | 105 | hint: "what one account may own, and who changed it", |
| 106 | 106 | after: ["people", "can"], |
| 107 | 107 | asks: "forge.administer", |
| 108 | offered: (session) => session.user?.isAdmin === true && session.user.kind !== "agent", | |
| 108 | for: "person", | |
| 109 | 109 | run: (session, ctx) => ctx.push(quotasScreen(session, ctx)), |
| 110 | 110 | }; |
71 more files not shown.
new above
offline