Review: the imported note in a module of its own, no unused data attribute, and why ImportSource sits beside the policy
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by oscabriel · committed by oscabriel · parent 616a84f · Browse files · 6 files·+13 added−12 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+13 added−12 removed
- other:+13 added−12 removed
Provenance
- Commit
93641b3- Tree
d9b3ae8- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent
616a84f
6 files changed+13 added−12 removed
modified:apps/cli/src/render.ts+1 added-1 removed
1 unmodified line2 * The CLI's prose for the contracts' results: Markdown for an agent (and a3 * script), and plain text for a person where a table reads better padded.4 * A contract without a view here prints its encoded JSON in a fenced block.5 */6-import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported";6+import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported-note";7 import { Brand } from "@repo/brand";8 import type { View } from "@repo/protocol/cli";9 import {10 Claim,572 unmodified linesmodified:apps/web/src/features/project/project-page.tsx+1 added-2 removed
6 unmodified lines7 * from them. Props in, markup out: the route reads the asks, the ledger,8 * the events, the policy and the code on the server and keeps them live in9 * the browser, and hands them here.10 */11-import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported";11+import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported-note";12 import { Brand } from "@repo/brand";13 import type { Ask, AskListing } from "@repo/protocol/domain/ask";14 import type { FileView, TreeListing } from "@repo/protocol/domain/code";15 import type { Glob } from "@repo/protocol/domain/common";201 unmodified lines217 <FactBlock label="Imported from">218 <p className="text-ui">219 <a220 className={`${LINK} [overflow-wrap:anywhere]`}221- data-imported-from={source.url}221 href={source.url}222 rel="noreferrer"223 >224 {source.url}421 unmodified linesadded:packages/agent-kit/src/docs/imported-note.ts+7 added
1234567/** * What an imported project is, in the words the docs' Imported projects * page, the project's own page and the CLI's `policy` share. A module of * its own, so a page that says it does not carry the imported list. */export const IMPORTED_NOTE = "a copy of a public repo, read-only here and not run by its maintainers";modified:packages/agent-kit/src/docs/imported.ts-7 removed
5 unmodified lines6 * source and licence.7 */8 import { ProjectName } from "@repo/protocol/ids";9 10-/**11- * What an imported project is, in the words the docs' Imported projects12- * page and the project's own page share.13- */14-export const IMPORTED_NOTE =15- "a copy of a public repo, read-only here and not run by its maintainers";16-10 /** One imported project: its name here, its source, its licence, and what it is. */11 export interface ImportedProject {12 readonly project: ProjectName;13 readonly url: string;232 unmodified linesmodified:packages/agent-kit/src/docs/reference.ts+2 added-1 removed
16 unmodified lines171819202121222324252684 unmodified lines16 unmodified linesimport type { CommandDoc } from "../command-doc.ts";import { events, gitHere, landing, refusals } from "../llms-sections.ts";import { exitCodeSection } from "../refusals.ts";import { code, table } from "../text.ts";import { IMPORTED_NOTE, importedProjects } from "./imported.ts";import { IMPORTED_NOTE } from "./imported-note.ts";import { importedProjects } from "./imported.ts";import type { DocSource } from "./page.ts";import { withoutHeading } from "./page.ts";
/** A command as typed: its words, then its positionals in angle brackets. */84 unmodified linesmodified:packages/protocol/src/domain/policy.ts+2 added-1 removed
122 unmodified lines123 /**124 * Where an imported project came from: the public repo's https address,125 * and the branch its `main` was adopted from when the import named one.126 * The same shape `initProject` takes, kept on the project's record and127- * shown on its page (ADR 0031).127+ * shown on its page (ADR 0031). It lives beside the policy, whose read128+ * names it: a module of its own would cost the root's preloaded bytes.129 */130 export const ImportSource = Schema.Struct({131 branch: Schema.optionalKey(Schema.NonEmptyString),132 url: Schema.String.check(Schema.isPattern(/^https:\/\/\S+$/u)),95 unmodified lines