agent-afk 5.302.11 → 5.302.13

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,5 +1,5 @@
1
1
  import type { AbortOrigin, TraceSink } from './trace/index.js';
2
- export interface ChildAbortedEvent {
2
+ interface ChildAbortedEvent {
3
3
  parentId: string;
4
4
  childId: string;
5
5
  reason?: unknown;
@@ -21,3 +21,4 @@ export declare class AbortGraph {
21
21
  abort(id: string, reason?: unknown, origin?: AbortOrigin): void;
22
22
  dispose(id: string): void;
23
23
  }
24
+ export {};
@@ -2,7 +2,6 @@ import type { HookHandler } from './hooks.js';
2
2
  import type { PermissionMode } from './types/sdk-types.js';
3
3
  import type { ElicitationRequest, ElicitationResult } from './types/sdk-types.js';
4
4
  import type { TraceSink } from './trace/index.js';
5
- export declare const AFK_HARNESS_SERVER_NAME = "agent-afk";
6
5
  export interface AfkModeGateOptions {
7
6
  approvalTimeoutMs?: number;
8
7
  promptForApproval?: boolean;
@@ -1,6 +1,4 @@
1
- export type { AgentRegistry, AgentSource, RegisteredAgent, ResolvedAgentToolAccess, } from './types.js';
2
- export { parseAgentMarkdown, type ParsedAgentFile } from './parser.js';
1
+ export type { AgentRegistry, RegisteredAgent, } from './types.js';
3
2
  export { resolveAgentToolAccess } from './resolve.js';
4
- export { builtinAgents } from './builtins.js';
5
- export { loadAgentRegistry, type LoadAgentRegistryOptions } from './registry.js';
3
+ export { loadAgentRegistry } from './registry.js';
6
4
  export { buildAgentToolDef } from './tool-def.js';
@@ -1,5 +1,5 @@
1
1
  import { type ModelSlots } from '../session/model-slots.js';
2
- export type AvailabilityNeed = 'anthropic' | 'openai' | 'chatgpt-oauth' | 'xai' | 'xai-oauth' | 'local' | 'unknown';
2
+ type AvailabilityNeed = 'anthropic' | 'openai' | 'chatgpt-oauth' | 'xai' | 'xai-oauth' | 'local' | 'unknown';
3
3
  export interface ModelAvailability {
4
4
  available: boolean;
5
5
  needs: AvailabilityNeed;
@@ -7,3 +7,4 @@ export interface ModelAvailability {
7
7
  }
8
8
  export declare function modelAvailability(model: string | undefined, bindings?: ModelSlots): ModelAvailability;
9
9
  export declare function isModelAvailable(model: string | undefined, bindings?: ModelSlots): boolean;
10
+ export {};
@@ -5,7 +5,7 @@ export type ExecForBranchPrune = (file: string, args: string[], opts?: {
5
5
  stderr: string;
6
6
  }>;
7
7
  export type PrState = 'open' | 'merged' | 'closed' | 'none';
8
- export type BranchVerdict = 'prune' | 'keep' | 'error';
8
+ type BranchVerdict = 'prune' | 'keep' | 'error';
9
9
  export interface BranchCandidate {
10
10
  remoteBranch: string;
11
11
  shortName: string;
@@ -32,5 +32,5 @@ export interface BranchPruneOptions {
32
32
  export declare function parseGhPrState(ghOutput: string): PrState;
33
33
  export declare function parseCommitsAhead(revListOutput: string): number;
34
34
  export declare function classify(prState: PrState, commitsAhead: number): Pick<BranchCandidate, 'verdict' | 'reason'>;
35
- export declare function listRemoteBranches(execFn: ExecForBranchPrune, remote: string, branchPrefix: string, cwd: string): Promise<string[]>;
36
35
  export declare function runBranchPrune(options: BranchPruneOptions): Promise<BranchPruneResult>;
36
+ export {};
@@ -1 +1 @@
1
- export { loadCompanionPrimer, injectCompanionPrimer, MAX_PRIMER_CHARS, } from './primer-loader.js';
1
+ export { injectCompanionPrimer, } from './primer-loader.js';
@@ -1,6 +1,6 @@
1
1
  import type { FetchSubscriptionUsageOptions, UsageResult } from '../subscription-usage.js';
2
2
  import { type BindingWindow } from '../usage/usage-budget.js';
3
- export interface BudgetGatePass {
3
+ interface BudgetGatePass {
4
4
  readonly skip: false;
5
5
  }
6
6
  export interface BudgetGateSkip {
@@ -29,3 +29,4 @@ export declare class BudgetAlertLatch {
29
29
  shouldAlert(skip: BudgetGateSkip): boolean;
30
30
  clear(): void;
31
31
  }
32
+ export {};
@@ -1,4 +1,4 @@
1
- export type HandoffRequestType = 'ask_question' | 'mcp' | 'path_approval';
1
+ type HandoffRequestType = 'ask_question' | 'mcp' | 'path_approval';
2
2
  export interface HandoffRoute {
3
3
  chatId: number;
4
4
  threadId?: number;
@@ -27,3 +27,4 @@ export declare function deleteHandoff(taskId: string, handoffsDir?: string): Pro
27
27
  export declare function listPendingHandoffs(handoffsDir?: string): Promise<HandoffRecord[]>;
28
28
  export declare function withHandoffLock<T>(taskId: string, handoffsDir: string, cb: () => Promise<T>): Promise<T | null>;
29
29
  export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<UpdateHandoffResult>;
30
+ export {};
@@ -25,7 +25,7 @@ export interface SchedulerOptions {
25
25
  budgetGate?: () => Promise<import('./budget-gate.js').BudgetGateResult>;
26
26
  }
27
27
  export type TelemetryTrigger = 'cron' | 'sessionstart' | 'pull';
28
- export type TelemetryStatus = 'success' | 'error' | 'skipped';
28
+ type TelemetryStatus = 'success' | 'error' | 'skipped';
29
29
  export interface TelemetryRecord {
30
30
  taskId: string;
31
31
  command: string;
@@ -6,7 +6,7 @@ import type { StateStore } from '../state/state-store.js';
6
6
  import type { ScheduledTask } from './triggers.js';
7
7
  import type { TelemetryRecord, TelemetryTrigger, TaskCompletionDetails } from './scheduler.js';
8
8
  import type { Telegraf } from 'telegraf';
9
- export interface AgentTaskOptions {
9
+ interface AgentTaskOptions {
10
10
  bot?: Telegraf;
11
11
  primaryChatId?: number;
12
12
  primaryThreadId?: number;
@@ -30,3 +30,4 @@ export interface AgentTaskContext {
30
30
  writeTelemetry: (record: TelemetryRecord, task: ScheduledTask, details?: TaskCompletionDetails) => void;
31
31
  }
32
32
  export declare function executeAgentTask(ctx: AgentTaskContext, task: ScheduledTask, trigger: TelemetryTrigger): Promise<TelemetryRecord>;
33
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ScheduledTask } from './triggers.js';
2
- import type { TelemetryRecord, TelemetryTrigger, TaskCompletionDetails } from './scheduler.js';
2
+ import type { TelemetryRecord, TaskCompletionDetails } from './scheduler.js';
3
3
  export interface PullTickContext {
4
4
  queueDir: string;
5
5
  isIdle: () => boolean;
@@ -13,4 +13,3 @@ export interface FireOnTaskCompleteOptions {
13
13
  onTaskComplete?: (record: TelemetryRecord, details?: TaskCompletionDetails) => void | Promise<void>;
14
14
  }
15
15
  export declare function fireOnTaskComplete(record: TelemetryRecord, options: FireOnTaskCompleteOptions, task?: ScheduledTask, details?: TaskCompletionDetails): void;
16
- export type { TelemetryTrigger };
@@ -3,7 +3,6 @@ export declare function _resetToolHealthAlertCooldownForTests(): void;
3
3
  export declare const TOOL_HEALTH_LOOKBACK_MS: number;
4
4
  export declare const TOOL_HEALTH_MIN_SESSIONS = 2;
5
5
  export declare const TOOL_HEALTH_COOLDOWN_MS: number;
6
- export declare const TOOL_HEALTH_MAX_FILES = 200;
7
6
  export interface ToolHealthTaskOptions {
8
7
  now: () => number;
9
8
  telemetryPath: () => string;
@@ -1,7 +1,5 @@
1
1
  export type TriggerMode = 'cron' | 'sessionstart' | 'both' | 'pull';
2
2
  export type TaskExecutor = 'agent' | 'shell' | 'builtin';
3
- export declare const KNOWN_BUILTINS: readonly ["worktree-prune", "tool-health"];
4
- export type BuiltinTaskName = (typeof KNOWN_BUILTINS)[number];
5
3
  export interface ScheduledTask {
6
4
  taskId: string;
7
5
  command: string;
@@ -1,6 +1,3 @@
1
- export { EffectStore } from './store.js';
2
- export { classifyToolCall } from './classifier.js';
3
- export { computeIdempotencyKey } from './idempotency.js';
4
1
  export { createEffectLedgerPostHook, createEffectLedgerPreHook } from './hook.js';
5
2
  export type { EffectRecord, EffectStatus, EffectQuery, PendingEffectInput, ExecuteEffectInput, } from './types.js';
6
3
  export type { Classification } from './classifier.js';
@@ -9,4 +9,4 @@ export declare function getCurrentBranch(execFn: ExecFnYield, cwd?: string): Pro
9
9
  export declare function queryPrState(execFn: ExecFnYield, branch: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'none' | 'error'>;
10
10
  export declare function queryPrStateByUrl(execFn: ExecFnYield, prUrl: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'error'>;
11
11
  export declare function patchYieldFields(sessionId: string, produced_pr: boolean, pr_merged: boolean | null, cacheDir?: string, pr_url?: string | null): void;
12
- export declare function writeFacetYield(sessionId: string, execFn: ExecFnYield, cwd?: string): Promise<void>;
12
+ export declare function writeFacetYield(sessionId: string, execFn: ExecFnYield, cwd?: string, cacheDir?: string): Promise<void>;
@@ -14,7 +14,7 @@ export type { BundledProviderName } from './providers/index.js';
14
14
  export type { AccountInfo, AgentConfig, AgentModelInput, CanUseTool, ClaudeModel, IAgentSession, McpServerStatus, Message, MessageChunk, MessageRole, ModelInfo, OutputEvent, PermissionBubbler, PermissionMode, ResponseMetadata, SDKStatus, SendMessageOptions, StructuredMessageOptions, SessionIdentity, SessionMetadata, SessionState, SlashCommand, ToolConfig, ToolDiffChunk, ToolResultChunk, } from './types.js';
15
15
  export type { CanUseToolContext, PermissionDecision, ToolPermission, ToolPermissionMode, ToolPermissionRules, } from './permissions.js';
16
16
  export type { ForkSubagentOptions, SubagentHandle, SubagentManagerOptions, SubagentResult, SubagentStatus, } from './subagent.js';
17
- export type { ChildAbortedEvent, ChildAbortedListener } from './abort-graph.js';
17
+ export type { ChildAbortedListener } from './abort-graph.js';
18
18
  export type { WithTimeoutOptions } from './timeout.js';
19
19
  export { runDAG, validateDAG } from './dag.js';
20
20
  export { runSubagentDAG } from './dag-subagent.js';