Skip to content
Myr

index.ts

This file

Path

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

61 lines · 1.5 KiB · TypeScript

Last changed by

Merge redesign into mainoscabrielbefore adoptioncaedd21

History of this file

Take it

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 1–14why, one step back
1import { Option } from "effect";
23import { answerAnAsk } from "./answer-an-ask.ts";4import { connectAnAgent } from "./connect-an-agent.ts";5import { docEntry } from "./entries.ts";6import { heldBackChecks } from "./held-back-checks.ts";7import type { DocInput, DocPage, DocSource } from "./page.ts";8import { written } from "./page.ts";9import {10 commandsPage,11 eventsPage,12 gitPage,13 importedPage,14 landingPage,

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 15why, one step back
15 limitsPage,

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 16–39why, one step back
16 mcpPage,
17 refusalsPage,18} from "./reference.ts";19import { runAProject } from "./run-a-project.ts";20import { startHere } from "./start-here.ts";2122export { docEntries, docEntry } from "./entries.ts";2324export type { DocEntry, DocPart, DocSlug } from "./entries.ts";2526export type { DocInput, DocPage } from "./page.ts";2728const sources: readonly DocSource[] = [29 startHere,30 answerAnAsk,31 runAProject,32 heldBackChecks,33 connectAnAgent,34 commandsPage,35 refusalsPage,36 gitPage,37 landingPage,38 eventsPage,39 mcpPage,

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 40why, one step back
40 limitsPage,

Merge build/1313-docs into mainoscabrielbefore adoption9000f4e

lines 41–61why, one step back
41 importedPage,
42];4344export const docPages = (input: DocInput): readonly DocPage[] =>45 sources.flatMap((source) =>46 Option.toArray(47 Option.map(docEntry(source.slug), (entry) =>48 written(entry, source, input)49 )50 )51 );5253export const docPage = (54 input: DocInput,55 slug: string56): Option.Option<DocPage> =>57 Option.flatMap(58 Option.fromUndefinedOr(sources.find((source) => source.slug === slug)),59 (source) =>60 Option.map(docEntry(slug), (entry) => written(entry, source, input))61 );