Skip to content
Myr

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

4 files+1 added−10 removed

modified:apps/cli/src/hook/decide.ts-3 removed
69 unmodified lines
70 note: Option.fromUndefinedOr(note),71 output: {},72});737474const normalize = (path: string) => {75 const parts: string[] = [];7677 for (const part of path.split("/")) {
91 unmodified lines
169 : allow(facts.holds);170 },171 });172174173const bullets = (items: readonly string[]) =>174 items.map((item) => `- \`${item}\``);175176const brief = ({ ask, checkCommand, project, territory, want }: HookClaim) =>
37 unmodified lines
214 },215 }),216 });217220218export const MAX_HOLDS = 3;219220/** A retryable refusal never holds. `stop_hook_active` counts as at least one hold even if the session's count was lost. */221const stopHook = (input: HookInput, facts: HookFacts): HookDecision => {
41 unmodified lines
modified:apps/cli/src/hook/judge.ts-1 removed
modified:apps/cli/src/local/login.ts-4 removed
39 unmodified lines
40const SIGN_IN_WAIT = "5 minutes";4142const clientIdOf = (origin: string) => `${origin}/oauth/cli`;434444export const Loopback = Context.Reference<{45 readonly listen: (address: {46 readonly hostname: string;47 readonly port: number;
61 unmodified lines
109 open: (url) => openWith(url, ["xdg-open", "open"]),110 }),111});112114113export class LoginUsage extends Schema.TaggedError<LoginUsage>()("LoginUsage", {114 reason: Schema.String,115}) {116 override get message() {
18 unmodified lines
135 return `git did not take this; run it yourself: ${this.command}`;136 }137}138141139const flags = {140 json: Flag.Boolean("json").pipe(141 Flag.withDefault(false),142 Flag.withDescription("Print machine-readable JSON")
104 unmodified lines
247 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 });250254251const tokenFromStdin = Effect.gen(function* () {252 const { stdin } = yield* Stdio.Stdio;253254 const [line = ""] = yield* stdin.pipe(
390 unmodified lines
modified:apps/cli/src/pi.ts+1 added-2 removed
269 unmodified lines
270 )271 );272273 // 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 lines
299 );300 });301 };302303303const factsOf = (session: PiSession, look: boolean) =>304 Effect.gen(function* () {305 const kept = yield* loadSession(session.id);306
131 unmodified lines