Skip to content
Myr

annotations.ts

This file

Path

packages/protocol/src/annotations.ts

51 lines · 1.5 KiB · TypeScript

Last changed by

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–34why, one step back
1import { Context, Schema } from "effect";
23export const Description = Context.Reference<string>("protocol/Description", {4 defaultValue: () => "",5});67export const Audience = Context.Reference<"public" | "signedIn" | "decider">(8 "protocol/Audience",9 { defaultValue: () => "signedIn" }10);1112export const Visibility = Context.Reference<"public" | "maintainers">(13 "protocol/Visibility",14 { defaultValue: () => "public" }15);1617export const ReadOnly = Context.Reference<boolean>("protocol/ReadOnly", {18 defaultValue: () => false,19});2021export const Idempotent = Context.Reference<boolean>("protocol/Idempotent", {22 defaultValue: () => false,23});2425export const Destructive = Context.Reference<boolean>("protocol/Destructive", {26 defaultValue: () => false,27});2829export const NeedsApproval = Context.Reference<boolean>(30 "protocol/NeedsApproval",31 { defaultValue: () => false }32);3334/**

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

lines 35–36why, one step back
35 * `formerFlags`: positionals that still parse as hidden flags of their own
36 * name, so scripts that type them keep working for a release.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 37–51why, one step back
37 */
38export const Cli = Context.Reference<{39 readonly name?: string;40 readonly positional?: readonly string[];41 readonly formerFlags?: readonly string[];42}>("protocol/Cli", { defaultValue: () => ({}) });4344export const SurfaceName = Schema.Literals(["rpc", "mcp", "cli", "web"]);4546export type SurfaceName = typeof SurfaceName.Type;4748export const Surfaces = Context.Reference<readonly SurfaceName[]>(49 "protocol/Surfaces",50 { defaultValue: () => SurfaceName.literals }51);