agent-afk 5.10.0 → 5.10.2

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,7 +1,9 @@
1
1
  import type { SdkPluginConfig } from '../types/sdk-types.js';
2
+ export type PluginApi = Pick<typeof import('../../skills/index.js'), 'registerSkill' | 'listSkills' | 'getSkill'> & Pick<typeof import('../../skills/_lib/prompt-loader.js'), 'loadSkillPrompts'>;
2
3
  export declare function _resetLoadedEntrypoints(): void;
3
4
  export type LoadEntrypointsOptions = {
4
5
  importer?: (specifier: string) => Promise<unknown>;
5
6
  onError?: (plugin: SdkPluginConfig, error: unknown) => void;
7
+ pluginApi?: PluginApi;
6
8
  };
7
9
  export declare function loadPluginEntrypoints(plugins: readonly SdkPluginConfig[], opts?: LoadEntrypointsOptions): Promise<void>;
@@ -1,3 +1 @@
1
- import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
- export declare const AFK_MODE_ADDENDUM_TEXT: string;
3
- export declare function buildAfkModeAddendumBlock(mode: string | undefined): ContentBlockParam | null;
1
+ export { AFK_MODE_ADDENDUM_TEXT, buildAfkModeAddendumBlock, } from '../shared/afk-mode-addendum.js';
@@ -1,3 +1 @@
1
- import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
- export declare const PLAN_MODE_ADDENDUM_TEXT: string;
3
- export declare function buildPlanModeAddendumBlock(mode: string | undefined): ContentBlockParam | null;
1
+ export { PLAN_MODE_ADDENDUM_TEXT, buildPlanModeAddendumBlock, } from '../shared/plan-mode-addendum.js';
@@ -1,15 +1,2 @@
1
- import type { ProviderUsage } from '../../../provider.js';
2
- export declare function computeUsedTokens(usage: Partial<ProviderUsage>): number;
3
- export declare function contextWindowTokensUsed(usage: Partial<ProviderUsage>): number;
4
- export type ContextUsageApiBreakdown = {
5
- input_tokens: number;
6
- output_tokens: number;
7
- cache_read_input_tokens: number;
8
- cache_creation_input_tokens: number;
9
- };
10
- export interface ContextUsageFields {
11
- totalTokens: number;
12
- apiUsage: ContextUsageApiBreakdown | null;
13
- }
14
- export declare function buildContextUsageFields(last: ProviderUsage | null | undefined): ContextUsageFields;
15
- export declare function shouldAutoCompact(usedTokens: number, contextLimit: number, threshold: number): boolean;
1
+ export { computeUsedTokens, contextWindowTokensUsed, buildContextUsageFields, shouldAutoCompact, } from '../../shared/auto-compact.js';
2
+ export type { ContextUsageApiBreakdown, ContextUsageFields, } from '../../shared/auto-compact.js';
@@ -0,0 +1,3 @@
1
+ import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
+ export declare const AFK_MODE_ADDENDUM_TEXT: string;
3
+ export declare function buildAfkModeAddendumBlock(mode: string | undefined): ContentBlockParam | null;
@@ -0,0 +1,15 @@
1
+ import type { ProviderUsage } from '../../provider.js';
2
+ export declare function computeUsedTokens(usage: Partial<ProviderUsage>): number;
3
+ export declare function contextWindowTokensUsed(usage: Partial<ProviderUsage>): number;
4
+ export type ContextUsageApiBreakdown = {
5
+ input_tokens: number;
6
+ output_tokens: number;
7
+ cache_read_input_tokens: number;
8
+ cache_creation_input_tokens: number;
9
+ };
10
+ export interface ContextUsageFields {
11
+ totalTokens: number;
12
+ apiUsage: ContextUsageApiBreakdown | null;
13
+ }
14
+ export declare function buildContextUsageFields(last: ProviderUsage | null | undefined): ContextUsageFields;
15
+ export declare function shouldAutoCompact(usedTokens: number, contextLimit: number, threshold: number): boolean;
@@ -0,0 +1,3 @@
1
+ import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
2
+ export declare const PLAN_MODE_ADDENDUM_TEXT: string;
3
+ export declare function buildPlanModeAddendumBlock(mode: string | undefined): ContentBlockParam | null;
@@ -0,0 +1 @@
1
+ export declare function sleepWithAbort(ms: number, signal: AbortSignal): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { ProviderCommandInfo } from '../../provider.js';
2
+ export declare function collectSupportedCommands(): Promise<ProviderCommandInfo[]>;
@@ -0,0 +1 @@
1
+ export declare function summarizeToolInput(toolName: string, input: unknown): string;
@@ -1,5 +1,6 @@
1
1
  import type { ModelProvider } from '../agent/provider.js';
2
2
  import type { AgentModelInput, ThinkingConfig, EffortLevel } from '../agent/types.js';
3
+ import type { GrantManager } from './slash/commands/allow-dir.js';
3
4
  export declare function loadSystemPrompt(): string | undefined;
4
5
  export declare function loadConfigSystemPrompt(): string | undefined;
5
6
  export declare const OPERATOR_CONFIG_HEADER: string;
@@ -31,3 +32,4 @@ export declare function parseProvider(raw: string | undefined, opts?: {
31
32
  model?: string;
32
33
  openaiBaseUrl?: string;
33
34
  }): ModelProvider | undefined;
35
+ export declare function isGrantManager(p: unknown): p is GrantManager;