@tokenfactory/acc-runner 0.11.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +19 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +155 -7
- package/dist/doctor.js.map +1 -1
- package/dist/failure-classifier.d.ts +13 -0
- package/dist/failure-classifier.d.ts.map +1 -1
- package/dist/failure-classifier.js +4 -0
- package/dist/failure-classifier.js.map +1 -1
- package/dist/git.d.ts +15 -0
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +19 -0
- package/dist/git.js.map +1 -1
- package/dist/github-client.d.ts +133 -0
- package/dist/github-client.d.ts.map +1 -0
- package/dist/github-client.js +234 -0
- package/dist/github-client.js.map +1 -0
- package/dist/login.d.ts +3 -0
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +5 -2
- package/dist/login.js.map +1 -1
- package/dist/runtime/cache-dir.d.ts +2 -0
- package/dist/runtime/cache-dir.d.ts.map +1 -0
- package/dist/runtime/cache-dir.js +15 -0
- package/dist/runtime/cache-dir.js.map +1 -0
- package/dist/runtime/quarantine.d.ts +10 -0
- package/dist/runtime/quarantine.d.ts.map +1 -1
- package/dist/runtime/quarantine.js.map +1 -1
- package/dist/runtime/rework.d.ts +48 -0
- package/dist/runtime/rework.d.ts.map +1 -0
- package/dist/runtime/rework.js +136 -0
- package/dist/runtime/rework.js.map +1 -0
- package/dist/runtime/singleton.d.ts +47 -0
- package/dist/runtime/singleton.d.ts.map +1 -0
- package/dist/runtime/singleton.js +200 -0
- package/dist/runtime/singleton.js.map +1 -0
- package/dist/runtime/version-drift.d.ts +31 -0
- package/dist/runtime/version-drift.d.ts.map +1 -0
- package/dist/runtime/version-drift.js +114 -0
- package/dist/runtime/version-drift.js.map +1 -0
- package/dist/task-runner.d.ts +16 -1
- package/dist/task-runner.d.ts.map +1 -1
- package/dist/task-runner.js +302 -59
- package/dist/task-runner.js.map +1 -1
- package/dist/token-provider.d.ts +50 -0
- package/dist/token-provider.d.ts.map +1 -0
- package/dist/token-provider.js +177 -0
- package/dist/token-provider.js.map +1 -0
- package/dist/watch.d.ts +25 -0
- package/dist/watch.d.ts.map +1 -1
- package/dist/watch.js +219 -10
- package/dist/watch.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v0.53 T-53-4 — runner-side, budget-aware GitHub REST client.
|
|
3
|
+
*
|
|
4
|
+
* A port of the api/ side's `api/_lib/github-client.ts` (T-52-4) into the
|
|
5
|
+
* runner package. The runner CANNOT import api/ code (separate build, no
|
|
6
|
+
* shared module graph), so the pattern is reproduced here. The three
|
|
7
|
+
* behaviours match the server client 1:1:
|
|
8
|
+
*
|
|
9
|
+
* 1. Quota tracking — x-ratelimit-remaining / x-ratelimit-reset per
|
|
10
|
+
* resource (core, search, graphql, …) from every response, surfaced
|
|
11
|
+
* via getQuotaSnapshot() for `acc-runner doctor`.
|
|
12
|
+
*
|
|
13
|
+
* 2. Secondary-limit backoff — a 429, or a 403 carrying retry-after /
|
|
14
|
+
* x-ratelimit-remaining: 0, is a rate-limit response, not an answer.
|
|
15
|
+
* The client sleeps once (retry-after if given, else an exponential
|
|
16
|
+
* base, both jittered, capped at MAX_BACKOFF_MS) and retries once. A
|
|
17
|
+
* second rate-limit response — or a retry-after beyond the cap —
|
|
18
|
+
* surfaces as a typed RateLimitedError.
|
|
19
|
+
*
|
|
20
|
+
* 3. Per-task-execution soft budget — runTask arms a budget at the top
|
|
21
|
+
* of a task (startTaskGithubBudget) and disarms it in its finally
|
|
22
|
+
* (endTaskGithubBudget). Once the budget is spent, every further
|
|
23
|
+
* githubFetch throws GithubBudgetExceededError WITHOUT hitting the
|
|
24
|
+
* network. The caller treats this as a CLEAN, RETRYABLE infra failure
|
|
25
|
+
* — NOT a code failure: it never reaches classifyClaudeExit, so the
|
|
26
|
+
* runner is never quarantined for exhausting its GitHub budget.
|
|
27
|
+
*
|
|
28
|
+
* ── Coverage note (READ THIS) ──────────────────────────────────────────
|
|
29
|
+
* As of v0.53 the runner makes ALL of its GitHub calls through the `gh`
|
|
30
|
+
* CLI (see gh.ts, runtime/conflict-resolver.ts, runtime/rework.ts,
|
|
31
|
+
* runtime/reviewer.ts). Those `gh`/`gh api` invocations are SEPARATE
|
|
32
|
+
* processes with their own rate-limit handling and are out of scope for
|
|
33
|
+
* this client — they remain UNCOVERED by the budget/backoff here. This
|
|
34
|
+
* module is the sanctioned wrapper for any future *direct* REST call the
|
|
35
|
+
* runner adds (`fetch` against api.github.com); routing such calls through
|
|
36
|
+
* githubFetch is what keeps them budget- and rate-limit-aware.
|
|
37
|
+
*
|
|
38
|
+
* Reference: api/_lib/github-client.ts, planning/ACC_WORKFLOW_GAP_ANALYSIS.md §G13.
|
|
39
|
+
*/
|
|
40
|
+
/** Soft per-task-execution call budget. */
|
|
41
|
+
export declare const DEFAULT_TASK_GITHUB_BUDGET = 50;
|
|
42
|
+
/**
|
|
43
|
+
* Longest single backoff sleep. A secondary-limit retry-after can be 60s+;
|
|
44
|
+
* sleeping that long inside a task run wastes wall-clock the operator is
|
|
45
|
+
* paying for, so anything above the cap skips the retry and throws
|
|
46
|
+
* RateLimitedError instead.
|
|
47
|
+
*/
|
|
48
|
+
export declare const MAX_BACKOFF_MS = 15000;
|
|
49
|
+
/** Base for the exponential backoff when GitHub sends no retry-after. */
|
|
50
|
+
export declare const BASE_BACKOFF_MS = 2000;
|
|
51
|
+
/**
|
|
52
|
+
* Typed rate-limit failure: GitHub said "back off" twice in a row (or
|
|
53
|
+
* asked for a longer wait than we can afford). A rate-limit storm is then
|
|
54
|
+
* diagnosable instead of looking like random github_http_403 noise. This
|
|
55
|
+
* is a RETRYABLE INFRA failure — see isRetryableGithubError.
|
|
56
|
+
*/
|
|
57
|
+
export declare class RateLimitedError extends Error {
|
|
58
|
+
readonly status: number;
|
|
59
|
+
readonly resource: string | null;
|
|
60
|
+
/** ISO timestamp the quota window resets at, when GitHub said. */
|
|
61
|
+
readonly reset_at: string | null;
|
|
62
|
+
readonly retry_after_s: number | null;
|
|
63
|
+
constructor(opts: {
|
|
64
|
+
status: number;
|
|
65
|
+
resource: string | null;
|
|
66
|
+
reset_at: string | null;
|
|
67
|
+
retry_after_s: number | null;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Soft-budget exhaustion. NOT a code failure: the task simply did as much
|
|
72
|
+
* direct GitHub work as one task execution is allowed. The caller should
|
|
73
|
+
* surface it as a clean, RETRYABLE infra failure and NEVER feed it to the
|
|
74
|
+
* claude-exit classifier (which would quarantine the runner).
|
|
75
|
+
*/
|
|
76
|
+
export declare class GithubBudgetExceededError extends Error {
|
|
77
|
+
readonly used: number;
|
|
78
|
+
readonly budget: number;
|
|
79
|
+
constructor(used: number, budget: number);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* v0.53 T-53-4: both client failure modes are retryable infra conditions,
|
|
83
|
+
* not task/code failures. The contract the runner relies on: an error for
|
|
84
|
+
* which this returns true must surface as `phase: "github"` / retryable and
|
|
85
|
+
* MUST NOT set `quarantine_cause` — i.e. it is classifier-neutral and never
|
|
86
|
+
* benches the runner.
|
|
87
|
+
*/
|
|
88
|
+
export declare function isRetryableGithubError(err: unknown): boolean;
|
|
89
|
+
interface ResourceQuota {
|
|
90
|
+
remaining: number | null;
|
|
91
|
+
/** ISO timestamp. */
|
|
92
|
+
reset_at: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface GithubQuotaSnapshot {
|
|
95
|
+
/** Lowest remaining across observed resources (the binding constraint). */
|
|
96
|
+
remaining: number | null;
|
|
97
|
+
/** Reset time of that lowest-remaining resource. */
|
|
98
|
+
reset_at: string | null;
|
|
99
|
+
/** Direct REST calls made since the last startTaskGithubBudget(). */
|
|
100
|
+
used_this_task: number;
|
|
101
|
+
/** Per-resource view (core, search, …) as reported by GitHub headers. */
|
|
102
|
+
resources: Record<string, ResourceQuota>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Begin a budgeted task execution: resets the per-task counter and arms the
|
|
106
|
+
* soft budget. runTask calls this at the top of a task; the explicit reset
|
|
107
|
+
* also re-baselines a long-lived watch process between tasks.
|
|
108
|
+
*/
|
|
109
|
+
export declare function startTaskGithubBudget(budget?: number): void;
|
|
110
|
+
/**
|
|
111
|
+
* End a budgeted task execution: disarms the soft budget so any direct REST
|
|
112
|
+
* call made OUTSIDE a task run (e.g. doctor) is unbudgeted. Idempotent.
|
|
113
|
+
*/
|
|
114
|
+
export declare function endTaskGithubBudget(): void;
|
|
115
|
+
export declare function getQuotaSnapshot(): GithubQuotaSnapshot;
|
|
116
|
+
/** Test seam: wipe quota/budget state between unit tests. */
|
|
117
|
+
export declare function resetGithubClientStateForTests(): void;
|
|
118
|
+
/** Injection seams for unit tests; production callers never pass this. */
|
|
119
|
+
export interface GithubFetchDeps {
|
|
120
|
+
fetchImpl?: typeof fetch;
|
|
121
|
+
sleep?: (ms: number) => Promise<void>;
|
|
122
|
+
/** Returns [0, 1); defaults to Math.random. Drives backoff jitter. */
|
|
123
|
+
random?: () => number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Authenticated GitHub REST fetch. The caller supplies whatever token is
|
|
127
|
+
* appropriate (the runner uses the operator's own gh/git credentials for
|
|
128
|
+
* CLI calls; a direct REST consumer would pass a token it already holds).
|
|
129
|
+
* An empty token sends an anonymous request rather than `Bearer <empty>`.
|
|
130
|
+
*/
|
|
131
|
+
export declare function githubFetch(url: string, token: string, init?: RequestInit, deps?: GithubFetchDeps): Promise<Response>;
|
|
132
|
+
export {};
|
|
133
|
+
//# sourceMappingURL=github-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-client.d.ts","sourceRoot":"","sources":["../src/github-client.ts"],"names":[],"mappings":"AAAA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;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC1C;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,MAAmC,GAAG,IAAI,CAGvF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED,wBAAgB,gBAAgB,IAAI,mBAAmB,CAkBtD;AAED,6DAA6D;AAC7D,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AA6CD,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;CACvB;AAMD;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,WAAgB,EACtB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,QAAQ,CAAC,CAwCnB"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v0.53 T-53-4 — runner-side, budget-aware GitHub REST client.
|
|
3
|
+
*
|
|
4
|
+
* A port of the api/ side's `api/_lib/github-client.ts` (T-52-4) into the
|
|
5
|
+
* runner package. The runner CANNOT import api/ code (separate build, no
|
|
6
|
+
* shared module graph), so the pattern is reproduced here. The three
|
|
7
|
+
* behaviours match the server client 1:1:
|
|
8
|
+
*
|
|
9
|
+
* 1. Quota tracking — x-ratelimit-remaining / x-ratelimit-reset per
|
|
10
|
+
* resource (core, search, graphql, …) from every response, surfaced
|
|
11
|
+
* via getQuotaSnapshot() for `acc-runner doctor`.
|
|
12
|
+
*
|
|
13
|
+
* 2. Secondary-limit backoff — a 429, or a 403 carrying retry-after /
|
|
14
|
+
* x-ratelimit-remaining: 0, is a rate-limit response, not an answer.
|
|
15
|
+
* The client sleeps once (retry-after if given, else an exponential
|
|
16
|
+
* base, both jittered, capped at MAX_BACKOFF_MS) and retries once. A
|
|
17
|
+
* second rate-limit response — or a retry-after beyond the cap —
|
|
18
|
+
* surfaces as a typed RateLimitedError.
|
|
19
|
+
*
|
|
20
|
+
* 3. Per-task-execution soft budget — runTask arms a budget at the top
|
|
21
|
+
* of a task (startTaskGithubBudget) and disarms it in its finally
|
|
22
|
+
* (endTaskGithubBudget). Once the budget is spent, every further
|
|
23
|
+
* githubFetch throws GithubBudgetExceededError WITHOUT hitting the
|
|
24
|
+
* network. The caller treats this as a CLEAN, RETRYABLE infra failure
|
|
25
|
+
* — NOT a code failure: it never reaches classifyClaudeExit, so the
|
|
26
|
+
* runner is never quarantined for exhausting its GitHub budget.
|
|
27
|
+
*
|
|
28
|
+
* ── Coverage note (READ THIS) ──────────────────────────────────────────
|
|
29
|
+
* As of v0.53 the runner makes ALL of its GitHub calls through the `gh`
|
|
30
|
+
* CLI (see gh.ts, runtime/conflict-resolver.ts, runtime/rework.ts,
|
|
31
|
+
* runtime/reviewer.ts). Those `gh`/`gh api` invocations are SEPARATE
|
|
32
|
+
* processes with their own rate-limit handling and are out of scope for
|
|
33
|
+
* this client — they remain UNCOVERED by the budget/backoff here. This
|
|
34
|
+
* module is the sanctioned wrapper for any future *direct* REST call the
|
|
35
|
+
* runner adds (`fetch` against api.github.com); routing such calls through
|
|
36
|
+
* githubFetch is what keeps them budget- and rate-limit-aware.
|
|
37
|
+
*
|
|
38
|
+
* Reference: api/_lib/github-client.ts, planning/ACC_WORKFLOW_GAP_ANALYSIS.md §G13.
|
|
39
|
+
*/
|
|
40
|
+
/** Soft per-task-execution call budget. */
|
|
41
|
+
export const DEFAULT_TASK_GITHUB_BUDGET = 50;
|
|
42
|
+
/**
|
|
43
|
+
* Longest single backoff sleep. A secondary-limit retry-after can be 60s+;
|
|
44
|
+
* sleeping that long inside a task run wastes wall-clock the operator is
|
|
45
|
+
* paying for, so anything above the cap skips the retry and throws
|
|
46
|
+
* RateLimitedError instead.
|
|
47
|
+
*/
|
|
48
|
+
export const MAX_BACKOFF_MS = 15_000;
|
|
49
|
+
/** Base for the exponential backoff when GitHub sends no retry-after. */
|
|
50
|
+
export const BASE_BACKOFF_MS = 2_000;
|
|
51
|
+
/**
|
|
52
|
+
* Typed rate-limit failure: GitHub said "back off" twice in a row (or
|
|
53
|
+
* asked for a longer wait than we can afford). A rate-limit storm is then
|
|
54
|
+
* diagnosable instead of looking like random github_http_403 noise. This
|
|
55
|
+
* is a RETRYABLE INFRA failure — see isRetryableGithubError.
|
|
56
|
+
*/
|
|
57
|
+
export class RateLimitedError extends Error {
|
|
58
|
+
status;
|
|
59
|
+
resource;
|
|
60
|
+
/** ISO timestamp the quota window resets at, when GitHub said. */
|
|
61
|
+
reset_at;
|
|
62
|
+
retry_after_s;
|
|
63
|
+
constructor(opts) {
|
|
64
|
+
super(`github rate limited (${opts.status})` +
|
|
65
|
+
(opts.resource ? ` on ${opts.resource}` : "") +
|
|
66
|
+
(opts.reset_at ? `, resets ${opts.reset_at}` : ""));
|
|
67
|
+
this.name = "RateLimitedError";
|
|
68
|
+
this.status = opts.status;
|
|
69
|
+
this.resource = opts.resource;
|
|
70
|
+
this.reset_at = opts.reset_at;
|
|
71
|
+
this.retry_after_s = opts.retry_after_s;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Soft-budget exhaustion. NOT a code failure: the task simply did as much
|
|
76
|
+
* direct GitHub work as one task execution is allowed. The caller should
|
|
77
|
+
* surface it as a clean, RETRYABLE infra failure and NEVER feed it to the
|
|
78
|
+
* claude-exit classifier (which would quarantine the runner).
|
|
79
|
+
*/
|
|
80
|
+
export class GithubBudgetExceededError extends Error {
|
|
81
|
+
used;
|
|
82
|
+
budget;
|
|
83
|
+
constructor(used, budget) {
|
|
84
|
+
super(`github task budget exhausted (${used}/${budget} calls)`);
|
|
85
|
+
this.name = "GithubBudgetExceededError";
|
|
86
|
+
this.used = used;
|
|
87
|
+
this.budget = budget;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* v0.53 T-53-4: both client failure modes are retryable infra conditions,
|
|
92
|
+
* not task/code failures. The contract the runner relies on: an error for
|
|
93
|
+
* which this returns true must surface as `phase: "github"` / retryable and
|
|
94
|
+
* MUST NOT set `quarantine_cause` — i.e. it is classifier-neutral and never
|
|
95
|
+
* benches the runner.
|
|
96
|
+
*/
|
|
97
|
+
export function isRetryableGithubError(err) {
|
|
98
|
+
return err instanceof RateLimitedError || err instanceof GithubBudgetExceededError;
|
|
99
|
+
}
|
|
100
|
+
// ── Module state (per process) ───────────────────────────────────────────────
|
|
101
|
+
const quotaByResource = new Map();
|
|
102
|
+
let usedThisTask = 0;
|
|
103
|
+
let taskBudget = null;
|
|
104
|
+
/**
|
|
105
|
+
* Begin a budgeted task execution: resets the per-task counter and arms the
|
|
106
|
+
* soft budget. runTask calls this at the top of a task; the explicit reset
|
|
107
|
+
* also re-baselines a long-lived watch process between tasks.
|
|
108
|
+
*/
|
|
109
|
+
export function startTaskGithubBudget(budget = DEFAULT_TASK_GITHUB_BUDGET) {
|
|
110
|
+
usedThisTask = 0;
|
|
111
|
+
taskBudget = budget;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* End a budgeted task execution: disarms the soft budget so any direct REST
|
|
115
|
+
* call made OUTSIDE a task run (e.g. doctor) is unbudgeted. Idempotent.
|
|
116
|
+
*/
|
|
117
|
+
export function endTaskGithubBudget() {
|
|
118
|
+
taskBudget = null;
|
|
119
|
+
}
|
|
120
|
+
export function getQuotaSnapshot() {
|
|
121
|
+
let min = null;
|
|
122
|
+
const resources = {};
|
|
123
|
+
for (const [name, q] of quotaByResource) {
|
|
124
|
+
resources[name] = { ...q };
|
|
125
|
+
if (q.remaining !== null &&
|
|
126
|
+
(min === null || min.remaining === null || q.remaining < min.remaining)) {
|
|
127
|
+
min = q;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
remaining: min?.remaining ?? null,
|
|
132
|
+
reset_at: min?.reset_at ?? null,
|
|
133
|
+
used_this_task: usedThisTask,
|
|
134
|
+
resources,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** Test seam: wipe quota/budget state between unit tests. */
|
|
138
|
+
export function resetGithubClientStateForTests() {
|
|
139
|
+
quotaByResource.clear();
|
|
140
|
+
usedThisTask = 0;
|
|
141
|
+
taskBudget = null;
|
|
142
|
+
}
|
|
143
|
+
function recordRateLimitHeaders(res) {
|
|
144
|
+
const remainingRaw = res.headers.get("x-ratelimit-remaining");
|
|
145
|
+
const resetRaw = res.headers.get("x-ratelimit-reset");
|
|
146
|
+
if (remainingRaw === null && resetRaw === null)
|
|
147
|
+
return;
|
|
148
|
+
const resource = res.headers.get("x-ratelimit-resource") ?? "core";
|
|
149
|
+
const remaining = remainingRaw !== null && remainingRaw !== "" ? Number(remainingRaw) : NaN;
|
|
150
|
+
const resetEpochS = resetRaw !== null && resetRaw !== "" ? Number(resetRaw) : NaN;
|
|
151
|
+
quotaByResource.set(resource, {
|
|
152
|
+
remaining: Number.isFinite(remaining) ? remaining : null,
|
|
153
|
+
reset_at: Number.isFinite(resetEpochS)
|
|
154
|
+
? new Date(resetEpochS * 1000).toISOString()
|
|
155
|
+
: null,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A 429 is always "back off". A 403 is only a rate limit when it carries
|
|
160
|
+
* retry-after (secondary limit) or x-ratelimit-remaining: 0 (primary limit
|
|
161
|
+
* exhausted) — a plain 403 is a permissions error and passes through.
|
|
162
|
+
*/
|
|
163
|
+
function isRateLimitResponse(res) {
|
|
164
|
+
if (res.status === 429)
|
|
165
|
+
return true;
|
|
166
|
+
if (res.status !== 403)
|
|
167
|
+
return false;
|
|
168
|
+
if (res.headers.get("retry-after") !== null)
|
|
169
|
+
return true;
|
|
170
|
+
return res.headers.get("x-ratelimit-remaining") === "0";
|
|
171
|
+
}
|
|
172
|
+
function toRateLimitedError(res) {
|
|
173
|
+
const retryAfterRaw = res.headers.get("retry-after");
|
|
174
|
+
const retryAfter = retryAfterRaw !== null ? Number(retryAfterRaw) : NaN;
|
|
175
|
+
const resetRaw = res.headers.get("x-ratelimit-reset");
|
|
176
|
+
const resetEpochS = resetRaw !== null ? Number(resetRaw) : NaN;
|
|
177
|
+
return new RateLimitedError({
|
|
178
|
+
status: res.status,
|
|
179
|
+
resource: res.headers.get("x-ratelimit-resource"),
|
|
180
|
+
reset_at: Number.isFinite(resetEpochS)
|
|
181
|
+
? new Date(resetEpochS * 1000).toISOString()
|
|
182
|
+
: null,
|
|
183
|
+
retry_after_s: Number.isFinite(retryAfter) ? retryAfter : null,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function defaultSleep(ms) {
|
|
187
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Authenticated GitHub REST fetch. The caller supplies whatever token is
|
|
191
|
+
* appropriate (the runner uses the operator's own gh/git credentials for
|
|
192
|
+
* CLI calls; a direct REST consumer would pass a token it already holds).
|
|
193
|
+
* An empty token sends an anonymous request rather than `Bearer <empty>`.
|
|
194
|
+
*/
|
|
195
|
+
export async function githubFetch(url, token, init = {}, deps = {}) {
|
|
196
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
197
|
+
const sleep = deps.sleep ?? defaultSleep;
|
|
198
|
+
const random = deps.random ?? Math.random;
|
|
199
|
+
const headers = new Headers(init.headers);
|
|
200
|
+
if (token)
|
|
201
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
202
|
+
if (!headers.has("Accept")) {
|
|
203
|
+
headers.set("Accept", "application/vnd.github+json");
|
|
204
|
+
}
|
|
205
|
+
headers.set("X-GitHub-Api-Version", "2022-11-28");
|
|
206
|
+
headers.set("User-Agent", "acc-runner");
|
|
207
|
+
const doFetch = async () => {
|
|
208
|
+
if (taskBudget !== null && usedThisTask >= taskBudget) {
|
|
209
|
+
throw new GithubBudgetExceededError(usedThisTask, taskBudget);
|
|
210
|
+
}
|
|
211
|
+
usedThisTask++;
|
|
212
|
+
const res = await fetchImpl(url, { ...init, headers });
|
|
213
|
+
recordRateLimitHeaders(res);
|
|
214
|
+
return res;
|
|
215
|
+
};
|
|
216
|
+
const first = await doFetch();
|
|
217
|
+
if (!isRateLimitResponse(first))
|
|
218
|
+
return first;
|
|
219
|
+
// Rate limited: sleep jittered-exponential once, retry once.
|
|
220
|
+
const retryAfterRaw = first.headers.get("retry-after");
|
|
221
|
+
const retryAfterS = retryAfterRaw !== null ? Number(retryAfterRaw) : NaN;
|
|
222
|
+
const baseMs = Number.isFinite(retryAfterS) ? retryAfterS * 1000 : BASE_BACKOFF_MS;
|
|
223
|
+
if (baseMs > MAX_BACKOFF_MS) {
|
|
224
|
+
// GitHub asked for a longer pause than we want to burn mid-task —
|
|
225
|
+
// surface the typed error now instead of sleeping into the run.
|
|
226
|
+
throw toRateLimitedError(first);
|
|
227
|
+
}
|
|
228
|
+
await sleep(Math.round(baseMs * (1 + random() * 0.5)));
|
|
229
|
+
const second = await doFetch();
|
|
230
|
+
if (!isRateLimitResponse(second))
|
|
231
|
+
return second;
|
|
232
|
+
throw toRateLimitedError(second);
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=github-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-client.js","sourceRoot":"","sources":["../src/github-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,2CAA2C;AAC3C,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAErC,yEAAy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CAAC,CAAC,CAAC,GAAG,CAAC;IACzE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC;IACnF,IAAI,MAAM,GAAG,cAAc,EAAE,CAAC;QAC5B,kEAAkE;QAClE,gEAAgE;QAChE,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAEvD,MAAM,MAAM,GAAG,MAAM,OAAO,EAAE,CAAC;IAC/B,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAChD,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/login.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { RunnerCaps } from "./types.js";
|
|
2
|
+
export declare const RUNNER_CAPS: RunnerCaps;
|
|
1
3
|
export declare function machineIdentity(): string;
|
|
4
|
+
export declare function detectInstalledModels(): Promise<string[]>;
|
|
2
5
|
export interface LoginOptions {
|
|
3
6
|
/** Override the polling interval seconds (mostly for tests). */
|
|
4
7
|
intervalSeconds?: number;
|
package/dist/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,UAAU,EACX,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,WAAW,EAAE,UAOzB,CAAC;AAEF,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAGD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAe/D;AAiBD,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,YAAY,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiF5E"}
|
package/dist/login.js
CHANGED
|
@@ -16,7 +16,9 @@ import { saveSession } from "./keychain.js";
|
|
|
16
16
|
import { createRunnerClient } from "./supabase.js";
|
|
17
17
|
import { PROTOCOL_VERSION } from "./types.js";
|
|
18
18
|
import { PACKAGE_VERSION } from "./pkg-version.js";
|
|
19
|
-
|
|
19
|
+
// v0.12.0 (T-52-7): exported so the env-token-mode boot registration in
|
|
20
|
+
// watch.ts declares the same capability surface as a login-registered runner.
|
|
21
|
+
export const RUNNER_CAPS = {
|
|
20
22
|
branch: true,
|
|
21
23
|
push: true,
|
|
22
24
|
pr: true,
|
|
@@ -27,7 +29,8 @@ const RUNNER_CAPS = {
|
|
|
27
29
|
export function machineIdentity() {
|
|
28
30
|
return `${process.platform}-${process.arch}-${os.hostname()}`;
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
// v0.12.0 (T-52-7): exported for the same reason as RUNNER_CAPS above.
|
|
33
|
+
export async function detectInstalledModels() {
|
|
31
34
|
const out = [];
|
|
32
35
|
for (const bin of ["claude", "codex"]) {
|
|
33
36
|
try {
|
package/dist/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../src/login.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,C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0 (T-54-2): single source of truth for the runner cache root.
|
|
3
|
+
*
|
|
4
|
+
* `quarantine.ts` already honoured ACC_RUNNER_CACHE_DIR inline; the
|
|
5
|
+
* singleton-lock and last-task-env modules added in this release reuse the
|
|
6
|
+
* same resolution so tests can point all cache state at a tmpdir with one
|
|
7
|
+
* env var. Defaults to ~/.cache/acc-runner (unchanged from prior releases).
|
|
8
|
+
*/
|
|
9
|
+
import os from "node:os";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
export function cacheDir() {
|
|
12
|
+
return (process.env.ACC_RUNNER_CACHE_DIR?.trim() ||
|
|
13
|
+
path.join(os.homedir(), ".cache", "acc-runner"));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=cache-dir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-dir.js","sourceRoot":"","sources":["../../src/runtime/cache-dir.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE;QACxC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,CAChD,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,16 @@ export interface QuarantineState {
|
|
|
4
4
|
classifiedAt: string;
|
|
5
5
|
taskId: string;
|
|
6
6
|
detail: string;
|
|
7
|
+
/**
|
|
8
|
+
* v0.53 T-53-4: how many consecutive instant-empty (heuristic) claude
|
|
9
|
+
* exits triggered the quarantine. Cache-schema additive — older readers
|
|
10
|
+
* ignore it; the keychain entry schema and the runner protocol message
|
|
11
|
+
* shapes are untouched. Definitive machine failures (dyld, exit 127,
|
|
12
|
+
* usage/auth patterns) record 1; a heuristic env_broken records 2 (the
|
|
13
|
+
* task-runner only quarantines after the retry also exits instantly).
|
|
14
|
+
* Optional so a state written by a pre-0.53 runner still parses.
|
|
15
|
+
*/
|
|
16
|
+
consecutive?: number;
|
|
7
17
|
}
|
|
8
18
|
/** Path to the quarantine sentinel file. Configurable via ACC_RUNNER_CACHE_DIR for tests. */
|
|
9
19
|
export declare function quarantineFile(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quarantine.d.ts","sourceRoot":"","sources":["../../src/runtime/quarantine.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"quarantine.d.ts","sourceRoot":"","sources":["../../src/runtime/quarantine.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED,0EAA0E;AAC1E,wBAAsB,aAAa,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAQrE;AAED,oEAAoE;AACpE,wBAAsB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzE;AAED,yEAAyE;AACzE,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAMrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quarantine.js","sourceRoot":"","sources":["../../src/runtime/quarantine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"quarantine.js","sourceRoot":"","sources":["../../src/runtime/quarantine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAoB7B,6FAA6F;AAC7F,MAAM,UAAU,cAAc;IAC5B,OAAO,IAAI,CAAC,IAAI,CACd,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE;QACtC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,EACjD,iBAAiB,CAClB,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,MAAM,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAClE,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAsB;IACxD,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACnE,CAAC;AAED,yEAAyE;AACzE,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,GAAG,CAAC;IAClE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface ReworkMeta {
|
|
2
|
+
pr_number: number;
|
|
3
|
+
repo: string;
|
|
4
|
+
/** PR head branch. May be empty — resolve via fetchPrHeadRef then. */
|
|
5
|
+
branch: string;
|
|
6
|
+
/** The rejected task; re-review + needs-review flip target. Empty when
|
|
7
|
+
* the meta was reconstructed from task-row fallback fields. */
|
|
8
|
+
origin_task_id: string;
|
|
9
|
+
verdict: string;
|
|
10
|
+
confidence: number;
|
|
11
|
+
comments: string[];
|
|
12
|
+
cycle: number;
|
|
13
|
+
}
|
|
14
|
+
/** Mirrors the bound enforced inside acc.create_rework_task. */
|
|
15
|
+
export declare const MAX_REWORK_CYCLES = 3;
|
|
16
|
+
/**
|
|
17
|
+
* Extract rework metadata from the task description. Falls back to the
|
|
18
|
+
* task row's own pr_number/repo/branch when the sentinel is absent or
|
|
19
|
+
* malformed (same degradation path as parseConflictMeta).
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseReworkMeta(description: string | null | undefined, fallback?: {
|
|
22
|
+
pr_number?: number | null;
|
|
23
|
+
repo?: string | null;
|
|
24
|
+
branch?: string | null;
|
|
25
|
+
}): ReworkMeta | null;
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the PR's head branch via gh when the sentinel carried an empty
|
|
28
|
+
* branch (e.g. the origin task row had no branch back-written yet).
|
|
29
|
+
*/
|
|
30
|
+
export declare function fetchPrHeadRef(repo: string, prNumber: number): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Rework prompt. Replaces renderTaskPrompt for rework tasks: the protocol
|
|
33
|
+
* header changes from "open a PR" to "update the existing PR's branch",
|
|
34
|
+
* and the reviewer's verdict + comments become the work spec. The runner
|
|
35
|
+
* pushes after Claude exits, so the session only needs to commit.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderReworkPrompt(args: {
|
|
38
|
+
task: {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description?: string | null;
|
|
42
|
+
typecheck_cmd?: string | null;
|
|
43
|
+
forbidden: string[];
|
|
44
|
+
};
|
|
45
|
+
meta: ReworkMeta;
|
|
46
|
+
branch: string;
|
|
47
|
+
}): string;
|
|
48
|
+
//# sourceMappingURL=rework.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rework.d.ts","sourceRoot":"","sources":["../../src/runtime/rework.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf;oEACgE;IAChE,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,IAAI,CAAC;AA+BnC;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,CAAC,EAAE;IACT,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,MA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