Skip to content
Myr

reference.ts

This file

Path

packages/agent-kit/src/docs/reference.ts

105 lines · 3.4 KiB · TypeScript

Last changed by

landed by oscarf7b8ef2

History of this file

Take it

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 1–9why, one step back
1import { Brand } from "@repo/brand";
2import {3 Contracts,4 Description,5 ReadOnly,6 Surfaces,7} from "@repo/protocol/contracts";8import { Context } from "effect";9

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 10why, one step back
10import { endpointLines, limitLines, synopsisLine } from "../agent-setup.ts";

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 11–13why, one step back
11import { events, gitHere, landing, refusals } from "../llms-sections.ts";
12import { exitCodeSection } from "../refusals.ts";13import { code, table } from "../text.ts";

Merge build/imported-from into mainoscabrielbefore adoptionf224a14

line 14why, one step back
14import { IMPORTED_NOTE } from "./imported-note.ts";

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 15–20why, one step back
15import { importedProjects } from "./imported.ts";
16import type { DocSource } from "./page.ts";17import { withoutHeading } from "./page.ts";1819export const commandsPage: DocSource = {20 body: ({ commands }) => [

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 21why, one step back
21 "Every command the CLI has, as its synopsis, from the one list the CLI, its skill and `llms.txt` all read. A command that lists `--json` prints JSON for an agent; one that writes takes `--dry-run`, and one that needs your approval takes `--yes`.",

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 22–23why, one step back
22 "",
23 ...table(

Merge redesign into mainoscabrielbefore adoptioncaedd21

lines 24–29why, one step back
24 ["Command", "What it does", "Only reads"],
25 commands.map((command) => {26 const { summary, usage } = synopsisLine(command);2728 return [code(usage), summary, command.readOnly ? "yes" : "no"];29 })

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 30–70why, one step back
30 ),
31 "",32 ],33 slug: "commands",34};3536export const refusalsPage: DocSource = {37 body: () => [...withoutHeading(refusals()), ...exitCodeSection()],38 slug: "refusals",39};4041export const gitPage: DocSource = {42 body: ({ platformUrl }) => withoutHeading(gitHere(platformUrl)),43 slug: "git",44};4546export const landingPage: DocSource = {47 body: () => withoutHeading(landing()),48 slug: "landing",49};5051export const eventsPage: DocSource = {52 body: () => withoutHeading(events()),53 slug: "events",54};5556const mcpTools = () =>57 [...Contracts.requests.values()].flatMap(({ _tag, annotations }) =>58 Context.get(annotations, Surfaces).includes("mcp")59 ? [60 [61 code(_tag),62 Context.get(annotations, Description),63 Context.get(annotations, ReadOnly) ? "yes" : "no",64 ],65 ]66 : []67 );6869export const mcpPage: DocSource = {70 body: ({ platformUrl }) => [

landed by oscarf7b8ef2

line 71why, one step back
71 `The platform serves its contracts as MCP tools at ${code(`${platformUrl}/mcp`)} over streamable HTTP, signed in with its own OAuth; ${code(`${Brand.cli} mcp`)} serves the same tools over stdio, and ${code(`${platformUrl}/mcp/public`)} serves the tools that only read to anyone, with no sign-in. A refusal comes back as the tool's error, its \`_tag\` intact. [Install](/install) has each client's setup.`,

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 72–76why, one step back
72 "",
73 ...table(["Tool", "What it does", "Only reads"], mcpTools()),74 "",75 ],76 slug: "mcp",

Merge redesign into mainoscabrielbefore adoptioncaedd21

lines 77–86why, one step back
77};
7879export const limitsPage: DocSource = {80 body: (input) => [81 "These are the defaults: a project's policy can change any of them, and each project shows its own. Past a cap the platform refuses with `CapReached` (see [Refusals](/docs/refusals)).",82 "",83 ...limitLines(),84 ...endpointLines(input),85 ],86 slug: "limits",

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 87–90why, one step back
87};
8889export const importedPage: DocSource = {90 body: () => [

Merge build/imported-from into mainoscabrielbefore adoptionf224a14

line 91why, one step back
91 `These projects were imported so you can read code you know on the platform. Each is ${IMPORTED_NOTE}; its history, with its authors, came with it, and why each line is there reads as before adoption. Each stays under its own licence.`,

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 92–94why, one step back
92 "",
93 ...table(94 ["Project", "Source", "Licence", "What it is"],

Merge build/1400-w14-foundation into mainoscabrielbefore adoption47dd2f8

lines 95–96why, one step back
95 importedProjects.map(({ kind, licence, name, url }) => [
96 `[${name}](/${name})`,

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 97–105why, one step back
97 url,
98 licence,99 kind,100 ])101 ),102 "",103 ],104 slug: "imported",105};