Skip to content
Myr

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

6 files+13 added−12 removed

modified:apps/cli/src/render.ts+1 added-1 removed
1 unmodified line
2 * 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 */6import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported";6import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported-note";7import { Brand } from "@repo/brand";8import type { View } from "@repo/protocol/cli";9import {10 Claim,
572 unmodified lines
modified:apps/web/src/features/project/project-page.tsx+1 added-2 removed
6 unmodified lines
7 * 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 */11import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported";11import { IMPORTED_NOTE } from "@repo/agent-kit/docs/imported-note";12import { Brand } from "@repo/brand";13import type { Ask, AskListing } from "@repo/protocol/domain/ask";14import type { FileView, TreeListing } from "@repo/protocol/domain/code";15import type { Glob } from "@repo/protocol/domain/common";
201 unmodified lines
217 <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 lines
added:packages/agent-kit/src/docs/imported-note.ts+7 added
modified:packages/agent-kit/src/docs/imported.ts-7 removed
5 unmodified lines
6 * source and licence.7 */8import { ProjectName } from "@repo/protocol/ids";910/**11 * What an imported project is, in the words the docs' Imported projects12 * page and the project's own page share.13 */14export const IMPORTED_NOTE =15 "a copy of a public repo, read-only here and not run by its maintainers";1610/** One imported project: its name here, its source, its licence, and what it is. */11export interface ImportedProject {12 readonly project: ProjectName;13 readonly url: string;
232 unmodified lines
modified:packages/agent-kit/src/docs/reference.ts+2 added-1 removed
modified:packages/protocol/src/domain/policy.ts+2 added-1 removed
122 unmodified lines
123/**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 */130export const ImportSource = Schema.Struct({131 branch: Schema.optionalKey(Schema.NonEmptyString),132 url: Schema.String.check(Schema.isPattern(/^https:\/\/\S+$/u)),
95 unmodified lines