Skip to content
Myr

proposal.ts

This file

Path

packages/protocol/src/domain/proposal.ts

65 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–6why, one step back
1import { Schema } from "effect";
23import {4 AskId,5 CommitSha,6 Handle,

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 7why, one step back
7 LaneName,

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 8–12why, one step back
8 ProjectName,
9 ProposalId,10 RepoName,11 RepoPath,12} from "../ids.ts";

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 13why, one step back
13import { AtLeastOne } from "./common.ts";

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 14–23why, one step back
14
15export const ProposalState = Schema.Literals([16 "open",17 "accepted",18 "declined",19 "expired",20]);2122export type ProposalState = typeof ProposalState.Type;23

Name the ask an opening opened, say why a policy has not evaluated, and give code history a durable storeoscabrielbefore adoption51f046c

lines 24–25why, one step back
24export const DraftNote = Schema.String.check(Schema.isMaxLength(2000));
25

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 26why, one step back
26export const DraftState = Schema.TaggedUnion({

Name the ask an opening opened, say why a policy has not evaluated, and give code history a durable storeoscabrielbefore adoption51f046c

lines 27–31why, one step back
27 Drafting: {
28 note: Schema.optionalKey(DraftNote),29 round: AtLeastOne,30 startedAt: Schema.DateTimeUtcFromString,31 },

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

lines 32–47why, one step back
32 Failed: {
33 attempts: AtLeastOne,34 model: Schema.NonEmptyString,35 refusal: Schema.NonEmptyString,36 round: AtLeastOne,37 },38 Ready: {39 attempts: AtLeastOne,40 model: Schema.NonEmptyString,41 red: Schema.Struct({ lane: LaneName, signature: Schema.NonEmptyString }),42 round: AtLeastOne,43 },44});4546export type DraftState = typeof DraftState.Type;47

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

line 48why, one step back
48export const Proposal = Schema.Struct({

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 49why, one step back
49 draft: Schema.optionalKey(DraftState),

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 50–65why, one step back
50 expiresAt: Schema.DateTimeUtcFromString,
51 files: Schema.Array(RepoPath),52 flags: Schema.optionalKey(AskId),53 id: ProposalId,54 openedAt: Schema.DateTimeUtcFromString,55 project: ProjectName,56 proposer: Handle,57 sealed: Schema.optionalKey(58 Schema.Struct({ fork: RepoName, head: CommitSha })59 ),60 state: ProposalState,61 territory: Schema.optionalKey(Schema.NonEmptyString),62 want: Schema.NonEmptyString,63});6465export type Proposal = typeof Proposal.Type;