Format the trimmed comments
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by oscabriel · committed by oscabriel · parent 0b0a8b1 · Browse files · 4 files·+1 added−10 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+1 added−10 removed
- other:+1 added−10 removed
Provenance
- Commit
bc299e2- Tree
253acda- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent
0b0a8b1
4 files changed+1 added−10 removed
modified:apps/cli/src/hook/decide.ts-3 removed
69 unmodified lines70 note: Option.fromUndefinedOr(note),71 output: {},72 });73 74-74 const normalize = (path: string) => {75 const parts: string[] = [];76 77 for (const part of path.split("/")) {91 unmodified lines169 : allow(facts.holds);170 },171 });172 174-173 const bullets = (items: readonly string[]) =>174 items.map((item) => `- \`${item}\``);175 176 const brief = ({ ask, checkCommand, project, territory, want }: HookClaim) =>37 unmodified lines214 },215 }),216 });217 220-218 export const MAX_HOLDS = 3;219 220 /** A retryable refusal never holds. `stop_hook_active` counts as at least one hold even if the session's count was lost. */221 const stopHook = (input: HookInput, facts: HookFacts): HookDecision => {41 unmodified linesmodified:apps/cli/src/hook/judge.ts-1 removed
23 unmodified lines24252627282829303118 unmodified lines23 unmodified lines pointers: closure.pointers, };};
const decodeRun = Schema.decodeUnknownOption(RunBlock);
/** The config folder's run block needs the config evaluated, which only `<cli> check` does, so the claim's check command stands in. */export const judgeAt = (input: {18 unmodified linesmodified:apps/cli/src/local/login.ts-4 removed
39 unmodified lines40 const SIGN_IN_WAIT = "5 minutes";41 42 const clientIdOf = (origin: string) => `${origin}/oauth/cli`;43 44-44 export const Loopback = Context.Reference<{45 readonly listen: (address: {46 readonly hostname: string;47 readonly port: number;61 unmodified lines109 open: (url) => openWith(url, ["xdg-open", "open"]),110 }),111 });112 114-113 export class LoginUsage extends Schema.TaggedError<LoginUsage>()("LoginUsage", {114 reason: Schema.String,115 }) {116 override get message() {18 unmodified lines135 return `git did not take this; run it yourself: ${this.command}`;136 }137 }138 141-139 const flags = {140 json: Flag.Boolean("json").pipe(141 Flag.withDefault(false),142 Flag.withDescription("Print machine-readable JSON")104 unmodified lines247 reason: `no platform to log in to for profile ${name}: run ${Brand.cli} login --url https://<platform host>${Option.isSome(profile) ? ` --profile ${name}` : ""}`,248 });249 });250 254-251 const tokenFromStdin = Effect.gen(function* () {252 const { stdin } = yield* Stdio.Stdio;253 254 const [line = ""] = yield* stdin.pipe(390 unmodified linesmodified:apps/cli/src/pi.ts+1 added-2 removed
269 unmodified lines270 )271 );272 273 // Only a completed run with an actionable verdict is sent back, at most `most` times.274- // `event.context.canContinue` is no guide: pi computes it before this handler's entry.274+ // `event.context.canContinue` is no guide: pi computes it before this handler's entry.275 pi.on("agent_before_settle", (event, ctx) => {276 const session = sessionOf(ctx);277 const used = continued.get(session.id) ?? 0;278 20 unmodified lines299 );300 });301 };302 303-303 const factsOf = (session: PiSession, look: boolean) =>304 Effect.gen(function* () {305 const kept = yield* loadSession(session.id);306 131 unmodified lines