agent-afk 5.305.3 → 5.305.5

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 CHANGED
@@ -143,7 +143,7 @@ afk chat "refactor this" --model gpt-5.5
143
143
  | Slot | Default | Notes |
144
144
  |---|---|---|
145
145
  | `local` | *(empty — you configure)* | Point at Ollama, LM Studio, or any OpenAI-compatible shim via `AFK_MODEL_LOCAL` + `AFK_MODEL_LOCAL_BASE_URL` |
146
- | `small` | `claude-haiku-4-5-20251001` | Cheapest/fastest Anthropic tier |
146
+ | `small` | `claude-haiku-5-5` | Cheapest/fastest Anthropic tier |
147
147
  | `medium` | `claude-sonnet-4-6` | General-use default |
148
148
  | `large` | `claude-opus-5` | Most capable |
149
149
 
@@ -1,3 +1,12 @@
1
+ import type { StartTimeProbeDeps } from './process-liveness.start-time.js';
1
2
  import type { BgJobMeta } from './bg-job-log.js';
2
- export declare function reconcileOrphanedMeta(meta: BgJobMeta): BgJobMeta;
3
+ export interface ReconcileOrphanDeps {
4
+ probe?: (pids: readonly number[], deps?: StartTimeProbeDeps) => Promise<Map<number, {
5
+ startedAtMs?: number;
6
+ startTicks?: number;
7
+ } | undefined>>;
8
+ ownTicks?: () => number | undefined;
9
+ ownMs?: () => number;
10
+ }
11
+ export declare function reconcileOrphanedMeta(meta: BgJobMeta, deps?: ReconcileOrphanDeps): Promise<BgJobMeta>;
3
12
  export declare function persistReconciled(metaPath: string, reconciled: BgJobMeta): void;
@@ -0,0 +1,2 @@
1
+ export declare function isSdkThinkingDeprecationWarning(args: readonly unknown[]): boolean;
2
+ export declare function withoutSdkThinkingDeprecationWarning<T>(fn: () => T): T;
@@ -4,6 +4,10 @@ export interface ModelPricing {
4
4
  cacheWrite5mPerMTok?: number;
5
5
  cacheWrite1hPerMTok?: number;
6
6
  cacheReadPerMTok?: number;
7
+ longPrompt?: {
8
+ thresholdTokens: number;
9
+ rates: Omit<ModelPricing, 'longPrompt'>;
10
+ };
7
11
  }
8
12
  export declare const MODEL_PRICING: ReadonlyMap<string, ModelPricing>;
9
13
  export interface CacheWriteSplit {
@@ -2,6 +2,7 @@ import type { ContentBlockParam, MessageParam, ThinkingConfigParam } from '@anth
2
2
  import type { AgentConfig, ResumeHistoryTurn } from '../../types/config-types.js';
3
3
  import type { EffortLevel, ThinkingConfig } from '../../types/sdk-types.js';
4
4
  export declare const isFable51: (model: string) => boolean;
5
+ export declare const isHaiku55: (model: string) => boolean;
5
6
  export { resolveAutoCompactThreshold } from '../shared/auto-compact.js';
6
7
  export declare function _resetWarnedTemperatureClampsForTest(): void;
7
8
  export declare function isNonDefaultSamplingForbiddenModel(model: string | undefined): boolean;
@@ -7,6 +7,11 @@ export declare const QUOTA_TWO_HOURS_MS: number;
7
7
  export declare const QUOTA_FALLBACK_WAIT_MS: number;
8
8
  export declare function __setQuotaTwoHoursMs(ms: number | null): void;
9
9
  export declare function __setQuotaFallbackWaitMs(ms: number | null): void;
10
+ export declare function __setQuotaOverrides(overrides: {
11
+ transientThresholdMs?: number | null;
12
+ twoHoursMs?: number | null;
13
+ fallbackWaitMs?: number | null;
14
+ }): void;
10
15
  export declare function isQuotaLimitErrorEvent(event: ProviderEvent): boolean;
11
16
  export interface QuotaLimitTierContext {
12
17
  autoResumeOnUsageLimit: boolean;
@@ -10,7 +10,7 @@ export interface ModelSlotBinding {
10
10
  contextWindow?: number;
11
11
  }
12
12
  export type ModelSlots = Record<SlotName, ModelSlotBinding>;
13
- export declare const CLAUDE_HAIKU_ID = "claude-haiku-4-5-20251001";
13
+ export declare const CLAUDE_HAIKU_ID = "claude-haiku-5-5";
14
14
  export declare const CLAUDE_SONNET_ID = "claude-sonnet-4-6";
15
15
  export declare const CLAUDE_OPUS_ID = "claude-opus-5-5";
16
16
  export declare const CLAUDE_OPUS_55_ID = "claude-opus-5-5";
@@ -5,6 +5,7 @@ export interface ResolvedComposeAgent {
5
5
  systemPrompt?: string;
6
6
  namedAgentModel?: string;
7
7
  canUseTool?: CanUseTool;
8
+ readOnlyBash?: true;
8
9
  }
9
10
  export declare function buildAllowlistCanUseTool(allowed: string[]): CanUseTool;
10
11
  export declare function resolveComposeNodeAgent(agentType: string | undefined, agentRegistry: AgentRegistry | undefined): ResolvedComposeAgent;
@@ -1,6 +1,11 @@
1
1
  import type { ModelProvider } from '../provider.js';
2
2
  import type { WorkspaceStore } from '../workspace/workspace-store.js';
3
+ import type { CanUseTool } from '../types.js';
3
4
  import type { AgentModelInput } from '../types/model-types.js';
4
- export declare function resolveComposeNodeProvider(nodeModel: AgentModelInput, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl: string | undefined): {
5
+ export interface ComposeNodeRestrictions {
6
+ canUseTool?: CanUseTool;
7
+ readOnlyBash?: boolean;
8
+ }
9
+ export declare function resolveComposeNodeProvider(nodeModel: AgentModelInput, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl: string | undefined, restrictions?: ComposeNodeRestrictions): {
5
10
  provider: ModelProvider;
6
11
  } | Record<string, never>;
@@ -1,6 +1,6 @@
1
1
  import type { IAgentSession } from '../types.js';
2
2
  import type { ModelProvider } from '../provider.js';
3
- import type { AgentModelInput } from '../types.js';
3
+ import type { AgentModelInput, CanUseTool } from '../types.js';
4
4
  import type { Surface } from '../awareness/types.js';
5
5
  import type { ReadScopeInputs } from '../subagent-read-scope.js';
6
6
  import type { JournalParent } from '../subagent/fork-types.js';
@@ -33,7 +33,7 @@ export interface CreateChildProviderFactoryOptions {
33
33
  }
34
34
  export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
35
35
  export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
36
- export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore, openaiBaseUrl?: string, readOnlyBash?: boolean): ModelProvider;
36
+ export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl?: string, readOnlyBash?: boolean, canUseTool?: CanUseTool): ModelProvider;
37
37
  export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent, rootSessionId?: string) => SkillExecutor;
38
38
  export type PhaseRole = 'read-only' | 'read-write';
39
39
  export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string, workspaceStore?: WorkspaceStore): ModelProvider;
@@ -0,0 +1,7 @@
1
+ export interface ChildSessionSignals {
2
+ parentSessionId: string | undefined;
3
+ subagentId: string | undefined;
4
+ }
5
+ export declare function isChildDispatcherSession(s: ChildSessionSignals): boolean;
6
+ export declare function isPeerToolBlocked(toolName: string, s: ChildSessionSignals): boolean;
7
+ export declare function peerToolChildDenial(toolName: string): string;