agent-afk 5.344.0 → 5.345.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.
@@ -1,6 +1,7 @@
1
1
  export declare class DaemonAlreadyRunningError extends Error {
2
2
  readonly ownerPid: number | null;
3
- constructor(lockPath: string, ownerPid: number | null);
3
+ readonly windowsEpermAmbiguous: boolean;
4
+ constructor(lockPath: string, ownerPid: number | null, windowsEpermAmbiguous?: boolean);
4
5
  }
5
6
  export declare function getDaemonLockPath(instanceId?: string): string;
6
7
  export declare function acquireDaemonLock(lockPath?: string, platform?: string): Promise<() => Promise<void>>;
@@ -3,4 +3,4 @@ export { extractEpisodeInput } from './extract.js';
3
3
  export { synthesizeEpisode } from './synthesize.js';
4
4
  export { writeEpisode, formatEpisodeContent, sanitizeNarrative } from './writer.js';
5
5
  import type { EpisodeRecord } from './types.js';
6
- export declare function synthesizeAndWriteEpisode(sessionId: string): Promise<EpisodeRecord>;
6
+ export declare function synthesizeAndWriteEpisode(sessionId: string): Promise<EpisodeRecord | null>;
@@ -13,7 +13,7 @@ export declare class AnthropicDirectProvider implements ModelProvider {
13
13
  private _stateStore;
14
14
  private readonly providerFactory?;
15
15
  private readonly skillExecutor?;
16
- private readonly schemas;
16
+ private schemas;
17
17
  private readonly hookRegistry;
18
18
  private readonly permissions;
19
19
  private readonly canUseTool;
@@ -5,6 +5,8 @@ context: fork
5
5
  category: Debug & fix
6
6
  ---
7
7
 
8
+ **Reference documents.** Before forming hypotheses, check `references/` alongside this SKILL.md for decision tables matching the bug's domain keywords (e.g. layout jumps, reflow). When a reference applies, use it to constrain the hypothesis space rather than exploring from scratch.
9
+
8
10
  Gather context: read the failing test or bug description, relevant error output, and recent git changes. If no failing test exists yet, write a minimal reproducer test (or identify a concrete verification command) before proceeding — hypotheses need a pass/fail signal to validate against. Dispatch two sub-agents in parallel — one to search the codebase for code paths involved in the failure (`subagent_type: research-agent`, read-only), and one to check recent commits and diffs that could have introduced the regression (`subagent_type: general-purpose` — requires Bash for `git log`/`git diff`/`git show`). When both return, synthesize findings into 2–4 ranked hypotheses, each with a specific code location and proposed cause.
9
11
 
10
12
  **TUI label convention.** Set `id_prefix` on each Agent dispatch to a short, descriptive label so the live progress view shows the agent's role:
@@ -0,0 +1,52 @@
1
+ # Layout Jump Decision Table
2
+
3
+ Consult this reference when a bug report mentions **jump**, **gap**, **shift**, **pop**, **reflow**, or **flicker** in a UI context (TUI, web, or desktop). These keywords warrant checking layout behavior; they do not establish a single root cause or remedy.
4
+
5
+ ## Core invariant
6
+
7
+ First establish the intended layout contract and inspect the element's existing layout footprint:
8
+
9
+ - **Intended overlay** (e.g. a floating toast or modal): it should not displace siblings. Absolute/fixed positioning and layering can be appropriate; do not reserve in-flow space merely because the overlay appears dynamically.
10
+ - **Intentional expansion/collapse** (e.g. an accordion or expanding sidebar): sibling movement may be expected. Verify the intended transition rather than forcing a permanently reserved box.
11
+ - **Stable in-flow footprint** (e.g. a mascot bar or loading slot whose siblings should stay put): if insertion/removal or resizing changes that footprint, **reserve space before reveal, not after**. If the element already retains its in-flow footprint, investigate another cause (e.g. changing dimensions, margins, or ancestor layout) rather than adding a redundant placeholder.
12
+
13
+ The decision table below applies to unintended shifts where a stable in-flow footprint is required.
14
+
15
+ ## Signal keywords
16
+
17
+ | Keyword | Example report phrasing |
18
+ |---------|------------------------|
19
+ | jump | "the input area jumps up" |
20
+ | gap | "there's a gap when X appears" |
21
+ | shift | "content shifts down when the banner loads" |
22
+ | pop | "the element pops in and pushes everything" |
23
+ | reflow | "reflow when toggling the sidebar" |
24
+ | flicker | "layout flickers on mount" |
25
+
26
+ ## Decision table
27
+
28
+ | Symptom | Root cause | Fix strategy | Anti-pattern to avoid |
29
+ |---------|-----------|-------------|----------------------|
30
+ | Element appears and displaces siblings | Conditional render inserts new layout space | Reserve space with hidden/opacity-zero placeholder; toggle visibility, not existence | Using z-index/absolute positioning instead of preserving the required in-flow footprint (not an exclusion for intended overlays); animation-delay |
31
+ | Element disappears and siblings collapse | Conditional render removes layout space | Keep element in DOM with `visibility: hidden` or `opacity: 0`; preserve its layout box | Removing from DOM and re-inserting |
32
+ | Element animates in and causes reflow | Height/width transition from 0 triggers layout recalc | Reserve full space in a fixed-size wrapper; animate content within it using `transform: scale` or `opacity` | Animating `height`/`width`/`max-height` from 0 (all change the layout box) |
33
+ | Content shifts after async load | Placeholder absent during fetch; content insertion changes layout | Reserve exact or minimum dimensions before content arrives | Rendering nothing then inserting loaded content |
34
+ | Show/hide toggle causes jump per cycle | Each toggle adds/removes layout participation | Toggle `opacity` or `visibility`, not `display: none`/DOM presence | Conditional rendering (`if`/`v-if`/ternary) that adds/removes nodes |
35
+
36
+ ## Verification
37
+
38
+ For the stable in-flow footprint remedy, a fix is valid when:
39
+
40
+ 1. The target element can cycle through every show/hide state without unintended sibling movement
41
+ 2. The reserved in-flow footprint remains stable during the visibility transition, even if content inside the wrapper mounts/unmounts
42
+ 3. The fix survives fast repeated toggles (no transient jump on race conditions)
43
+
44
+ For intended overlays or intentional expansion/collapse, verify the declared layout contract instead: overlays do not displace siblings; expansion/collapse produces only the intended movement, including under fast repeated toggles.
45
+
46
+ ## Falsifier
47
+
48
+ The reservation diagnosis is wrong for a stable in-flow case if the jump is fixed durably without stabilizing a changing footprint and does not recur under repeated show/hide cycles. Intended overlays, intentional expansion/collapse, and elements that already retain their in-flow footprint do not establish a need for additional space reservation.
49
+
50
+ ## Provenance
51
+
52
+ Derived from pattern card `layout-jumps-caused-by-dynamic-element-insertion-a-2026-10-04t21-54-24-831` (session `1d6cf0de`, score 26/35, status: operational). Original fix: opacity-toggle reservation for mascot-bar vertical jump in Goblin Portal TUI.
@@ -11,6 +11,7 @@ import type { ProgressEvent } from '../../agent/types.js';
11
11
  import { type TtfbTickCtx } from './stream-renderer-ttfb.js';
12
12
  export declare const WAITING_LABEL_PREFIX = " \u00B7 waiting ";
13
13
  export declare const AWAITING_LABEL_PREFIX = " \u00B7 awaiting ";
14
+ export declare const THINKING_GRACE_MS = 2000;
14
15
  export interface LifecycleContext extends TtfbTickCtx {
15
16
  compositor: TerminalCompositor | null;
16
17
  overlayComposer: OverlayComposer | null;
@@ -26,6 +27,7 @@ export interface LifecycleContext extends TtfbTickCtx {
26
27
  sources: Map<string, SourceState>;
27
28
  pauseTickInterval: ReturnType<typeof setInterval> | null;
28
29
  resizeUnsub: (() => void) | null;
30
+ lastThinkingAnnotation: string;
29
31
  }
30
32
  export declare function registerOverlaySlots(overlayComposer: OverlayComposer, ctx: Readonly<Pick<LifecycleContext, 'stageTracker' | 'thinkingMode' | 'thinkingLane' | 'streamingMarkdownRef' | 'toolLane' | 'lastProgressByTask'>> & {
31
33
  sources?: ReadonlyMap<string, SourceState>;
@@ -36,3 +38,4 @@ export declare function registerOverlaySlots(overlayComposer: OverlayComposer, c
36
38
  export declare function formatInterruptAffordance(interrupting: boolean): string;
37
39
  export declare function subscribeToResize(overlayComposer: OverlayComposer, disposed: boolean): () => void;
38
40
  export declare function checkPauseAnnotations(ctx: LifecycleContext): boolean;
41
+ export declare function checkThinkingAnnotation(ctx: LifecycleContext, _now: number): boolean;
@@ -44,6 +44,7 @@ export declare class StreamRenderer {
44
44
  private readonly ttfbStartedAt;
45
45
  private ttfbDone;
46
46
  private lastTtfbAnnotation;
47
+ private lastThinkingAnnotation;
47
48
  private readonly addPreviewDiffRef;
48
49
  private completionWriter;
49
50
  readonly sink: (event: OutputEvent, meta?: SubagentProgressMeta) => void;
@@ -15,4 +15,5 @@ export declare class ThinkingLane {
15
15
  drainPhase(): string;
16
16
  collapse(): string | null;
17
17
  inlineSummary(): string | null;
18
+ activeThinkingElapsedMs(): number | null;
18
19
  }