agent-afk 5.307.13 → 5.307.14

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
@@ -22,7 +22,7 @@ Open source. Runs locally. Works with any model provider, including local models
22
22
  ## Quick Start
23
23
 
24
24
  ```bash
25
- npm install -g agent-afk # Node 22.22.2+, 24.15+, or 26+
25
+ npm install -g agent-afk # Node 22.22.2–22.x, 24.15–24.x, or 26+ (23.x and 25.x excluded)
26
26
  afk login # authenticate (auto-detects Claude Code / Codex creds)
27
27
  afk doctor # verify everything works
28
28
  afk chat "hello" # first real conversation
@@ -3,6 +3,8 @@ export interface PluginSkillMetadata {
3
3
  description?: string;
4
4
  argumentHint?: string;
5
5
  whenToUse?: string;
6
+ flags?: string[];
7
+ category?: string;
6
8
  origin?: 'command';
7
9
  allowedTools?: string[];
8
10
  context?: string;
@@ -197,6 +197,8 @@ export interface ProviderCommandInfo {
197
197
  description?: string;
198
198
  argumentHint?: string;
199
199
  whenToUse?: string;
200
+ flags?: readonly string[];
201
+ category?: string;
200
202
  source?: 'builtin' | 'user' | 'project' | 'plugin' | 'imported' | 'command';
201
203
  }
202
204
  export interface ProviderModelInfo {
@@ -19,14 +19,13 @@ export interface CacheableToolLike {
19
19
  cache_control?: {
20
20
  type: string;
21
21
  } | null;
22
- [k: string]: unknown;
23
22
  }
24
- export declare function clampBreakpoints(params: {
23
+ export declare function clampBreakpoints<T extends CacheableToolLike>(params: {
25
24
  system?: readonly ContentBlockParam[];
26
- tools?: readonly CacheableToolLike[];
25
+ tools?: readonly T[];
27
26
  messages: readonly MessageParam[];
28
27
  }): {
29
28
  system?: readonly ContentBlockParam[];
30
- tools?: readonly CacheableToolLike[];
29
+ tools?: readonly T[];
31
30
  messages: readonly MessageParam[];
32
31
  };
@@ -0,0 +1,6 @@
1
+ import type { RunTurnInput } from '../types.js';
2
+ import type { RetryTierContext } from './retry-context.js';
3
+ type RefreshResult = Awaited<ReturnType<RetryTierContext['forceClientRefresh']>>;
4
+ export declare function adoptFreshClient(ctx: Pick<RetryTierContext, 'forceClientRefresh' | 'getClient' | 'rotateHeaders'>, runInput: RunTurnInput): Promise<RefreshResult>;
5
+ export declare function liveAccountId(ctx: Pick<RetryTierContext, 'getClientToken'>): string;
6
+ export {};
@@ -9,6 +9,7 @@ export interface RetryTierContext {
9
9
  readonly autoResumeOnUsageLimit: boolean;
10
10
  readonly tokenRefresher: (() => Promise<Anthropic | null>) | undefined;
11
11
  getClient(): Anthropic;
12
+ getClientToken(): string | undefined;
12
13
  rotateHeaders(runInput: Pick<RunTurnInput, 'effort' | 'fastMode'>): Record<string, string>;
13
14
  forceClientRefresh(): Promise<{
14
15
  accountId: string;
@@ -0,0 +1,3 @@
1
+ import type { RunTurnInput } from '../types.js';
2
+ import type { RetryTierContext } from './retry-context.js';
3
+ export declare function catchUpStaleCredential(ctx: RetryTierContext, runInput: RunTurnInput): Promise<boolean>;
@@ -1,5 +1,6 @@
1
1
  import type { ProviderEvent } from '../../../provider.js';
2
2
  import type { RunTurnInput } from '../types.js';
3
- import type { RetryTierContext, TierGenerator } from './retry-context.js';
3
+ import type { RetryTierContext, TierGenerator, UsageLimitWaitResult } from './retry-context.js';
4
+ export declare function joinUsageLimitWait(shared: Promise<UsageLimitWaitResult>, signal: AbortSignal): Promise<UsageLimitWaitResult>;
4
5
  export declare function usageLimitNoTimestampPause(ctx: RetryTierContext, runInput: RunTurnInput, isClosed: () => boolean, next: TierGenerator, pendingErrorEvent: ProviderEvent): AsyncGenerator<ProviderEvent, void, void>;
5
6
  export declare function usageLimitResetPause(ctx: RetryTierContext, runInput: RunTurnInput, isClosed: () => boolean, next: TierGenerator, pendingErrorEvent: ProviderEvent, resetsAt: Date): AsyncGenerator<ProviderEvent, void, void>;
@@ -7,6 +7,8 @@ export interface SkillManifestEntry {
7
7
  source: 'builtin' | 'user' | 'project' | 'plugin' | 'imported' | 'command';
8
8
  argumentHint?: string;
9
9
  whenToUse?: string;
10
+ flags?: readonly string[];
11
+ category?: string;
10
12
  disableModelInvocation?: boolean;
11
13
  }
12
14
  export declare function buildSkillManifest(pluginConfigs?: SdkPluginConfig[], opts?: BuildSkillManifestOptions): string;
@@ -1,9 +1 @@
1
- export declare function normalizeFlag(flag: string): string;
2
- export declare function extractFlagsFromBody(body: string): string[];
3
- export interface ParsedSkillMd {
4
- frontmatter: Record<string, string> | null;
5
- frontmatterFlags: string[] | null;
6
- body: string;
7
- }
8
- export declare function parseSkillMd(content: string): ParsedSkillMd;
9
- export declare function harvestFlagsFromSkillMd(content: string): string[];
1
+ export { normalizeFlag, extractFlagsFromBody, parseFlagsField, resolveSkillFlags, parseSkillMd, harvestFlagsFromSkillMd, type ParsedSkillMd, } from '../../../utils/skill-md.js';
@@ -5,6 +5,7 @@ export interface DiscoveredSkill {
5
5
  argumentHint?: string;
6
6
  source?: SkillManifestEntry['source'];
7
7
  category?: string;
8
+ flags?: readonly string[];
8
9
  whenToUse?: string;
9
10
  }
10
11
  export interface PluginCollision {