agent-afk 5.221.5 → 5.222.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/dist/agent/session/provider-lifecycle.d.ts +1 -1
- package/dist/bundled-plugins/awa-bundled/skills/review/SKILL.md +4 -3
- package/dist/cli.mjs +638 -638
- package/dist/index.mjs +3 -3
- package/dist/telegram.mjs +3 -3
- package/dist/web-ui-assets/assets/index-CMdRmKqT.js +153 -0
- package/dist/web-ui-assets/assets/{index-Cp0j8w9U.js → index-Q48Eod_3.js} +73 -73
- package/dist/web-ui-assets/index.html +1 -1
- package/package.json +1 -1
- package/dist/web-ui-assets/assets/index-C7ktp0DS.js +0 -13
|
@@ -13,4 +13,4 @@ export interface ProviderLifecycleResult {
|
|
|
13
13
|
providerIterator: AsyncIterator<ProviderEvent>;
|
|
14
14
|
}
|
|
15
15
|
export declare function buildProviderLifecycle(config: AgentConfig): ProviderLifecycleResult;
|
|
16
|
-
export declare function runInitialization(config: AgentConfig,
|
|
16
|
+
export declare function runInitialization(config: AgentConfig, getProviderIterator: () => AsyncIterator<ProviderEvent>, abortSignal: AbortSignal, stateManager: SessionStateManager, accounting: AccountingAccumulator, shutdown: SessionShutdown, hookRegistry: HookRegistry | undefined, queueFrameworkContext: (text: string) => void, buildTransformDeps: () => TransformDeps): Promise<void>;
|
|
@@ -46,13 +46,13 @@ Never fabricate intent. When none is available the value is the literal `(none s
|
|
|
46
46
|
|
|
47
47
|
**Capture prior reviewer feedback (inline, PR targets only).** When the review target is a PR URL or number, fetch existing reviewer feedback from all three GitHub comment stores before dispatching Wave 1:
|
|
48
48
|
|
|
49
|
-
1. Inline review comments (anchored to diff lines): `gh api repos/{owner}/{repo}/pulls/<n>/comments
|
|
49
|
+
1. Inline review comments (anchored to diff lines): `gh api "repos/{owner}/{repo}/pulls/<n>/comments?per_page=25&sort=created&direction=desc"`.
|
|
50
50
|
2. Review summary bodies (top-level body per review submission): `gh pr view <n> -R {owner}/{repo} --json reviews -q '.reviews[] | {author: .author.login, state: .state, body: .body, submittedAt: .submittedAt}'`.
|
|
51
51
|
3. Conversation comments (issue-level PR comments): `gh pr view <n> -R {owner}/{repo} --json comments -q '.comments[] | {author: .author.login, body: .body, createdAt: .createdAt}'`.
|
|
52
52
|
|
|
53
53
|
Extract `{owner}/{repo}` from the PR URL argument directly, or for bare-number inputs from `gh pr view <n> --json url -q .url`. Pass `-R {owner}/{repo}` on every `gh pr view` call above so cross-repo PR URLs resolve in the correct repository.
|
|
54
54
|
|
|
55
|
-
Filter: drop bot/automation comments (author login contains `[bot]` or body is empty/whitespace). Merge all three stores into a single array, sort by timestamp descending
|
|
55
|
+
Normalize each source's timestamp field (`created_at` for inline, `submittedAt` for review summaries, `createdAt` for conversation) to a single `timestamp` ISO string during merge. Filter: drop bot/automation comments (author login contains `[bot]` or body is empty/whitespace). Merge all three stores into a single array, sort by timestamp descending, then cap to the **20 most recent** comments, truncated to a combined **4,096 tokens** to prevent context-window bloat on busy PRs. Identify afk's own prior review comments by the `<!-- agent-afk-review -->` marker.
|
|
56
56
|
|
|
57
57
|
Bundle surviving comments as a **`prior-reviewer-feedback`** block: `[{ source: "inline"|"review"|"conversation", author, body, timestamp, path?, line? }]`. When the PR has no prior comments, set `prior-reviewer-feedback: none`.
|
|
58
58
|
|
|
@@ -156,7 +156,7 @@ Severity and disposition are **separate axes**. `severity` answers "how bad is t
|
|
|
156
156
|
- A `medium` representing a material data-integrity risk or a likely production failure under normal usage is **never** overridable to `false` — a race that intermittently loses user state stays blocking even when its blast radius keeps it out of `high`.
|
|
157
157
|
- A `low` or `nit` may be marked `blocking: true` only for a stated external constraint (release gate, compliance requirement). Do not use this to smuggle a preference.
|
|
158
158
|
|
|
159
|
-
**Invariant — assignment order.** `blocking` is assigned from the **pre-downgrade** severity. A finding later downgraded by **any** downgrade rule in this file — the api-compat reachability rule (which drops straight to `nit`, two tiers in one step), its grep-unavailable fallback, Wave 1's absence-grounding fallback, Wave 1.5's `diff-only` citation rule, Wave 1.5's `grep-unavailable` absence rule,
|
|
159
|
+
**Invariant — assignment order.** `blocking` is assigned from the **pre-downgrade** severity. A finding later downgraded by **any** downgrade rule in this file — the api-compat reachability rule (which drops straight to `nit`, two tiers in one step), its grep-unavailable fallback, Wave 1's absence-grounding fallback, Wave 1.5's `diff-only` citation rule, Wave 1.5's `grep-unavailable` absence rule, the confidence rule below, or the prior-feedback addressed-since-prior-review rule (Wave 2) — **keeps the `blocking` value its pre-downgrade severity earned**: a downgrade lowers severity, never disposition. Only an explicit, justified override from the list above may flip `blocking`. Without this ordering, a security or data-integrity `medium` would silently become non-blocking by being downgraded rather than waived, defeating the two never-overridable rules above through a path that requires no justification at all.
|
|
160
160
|
|
|
161
161
|
A `blocking: true` that survives a downgrade this way is **not** an override and needs no justification clause: it carries `· blocking preserved from pre-downgrade <severity>` instead, and the `low`/`nit` external-constraint rule above does not apply to it. Without this exemption the invariant and that rule contradict each other — every downgraded `medium` would land as a `low`/`nit` carrying `blocking: true` with no admissible reason to write, forcing the reviewer to either fabricate an external constraint or emit a schema-violating finding.
|
|
162
162
|
|
|
@@ -191,6 +191,7 @@ Confidence `low` → auto-downgrade one tier + append `[low confidence — verif
|
|
|
191
191
|
- If any citations could not be verified against a live ref (patch-file input): `Citation verification skipped — no live ref available; diff-context citations only.`
|
|
192
192
|
- Any topical gaps (e.g. 'did not review Telegram surface', 'did not run tests').
|
|
193
193
|
- Whether a **stated intent** was available and spec-compliance was assessed. Example: `Stated intent: PR #123 title+body — spec-compliance assessed.` or `Stated intent: (none supplied) — spec-compliance not assessed.`
|
|
194
|
+
- Whether prior-reviewer-feedback was captured (PR targets: list comment count and cap hit if truncated; non-PR targets: 'not available — non-PR target').
|
|
194
195
|
|
|
195
196
|
**Post-synthesis:** if any `critical` or `high` finding is present, **or any finding whose `blocking` value departs from the default table** (a waived `medium`, an escalated `low`/`nit`), invoke `/shadow-verify` on those findings before surfacing to the user. Shadow-verify independently re-derives each claim against source; fabricated or unsupportable findings drop here before they reach the merge decision. An overridden finding is routed because the agent that found it also set its disposition and wrote its own justification — the waiver is otherwise the only judgement in this pipeline with no second reader. `medium` and below **at their default disposition** go straight through.
|
|
196
197
|
|