agent-afk 5.307.12 → 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 +1 -1
- package/dist/agent/plugins/tool-injector.d.ts +2 -0
- package/dist/agent/provider.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/cache-policy.d.ts +3 -4
- package/dist/agent/providers/anthropic-direct/query/live-client.d.ts +6 -0
- package/dist/agent/providers/anthropic-direct/query/retry-context.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query/usage-limit-catch-up.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query/usage-limit-pause.d.ts +2 -1
- package/dist/agent/tools/skill-bridge.d.ts +2 -0
- package/dist/cli/slash/_lib/flag-harvest.d.ts +1 -9
- package/dist/cli/slash/plugin-skills/state.d.ts +1 -0
- package/dist/cli.mjs +374 -375
- package/dist/config/env.browser.d.ts +1 -0
- package/dist/config/env.d.ts +5 -1
- package/dist/config/env.daemon.d.ts +3 -1
- package/dist/config/env.mcp.d.ts +1 -0
- package/dist/index.mjs +163 -163
- package/dist/service/launchd/manager.d.ts +18 -1
- package/dist/telegram.mjs +191 -191
- package/dist/utils/errors.d.ts +1 -0
- package/dist/utils/skill-md.d.ts +11 -0
- package/package.json +1 -1
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
|
|
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
|
package/dist/agent/provider.d.ts
CHANGED
|
@@ -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
|
|
25
|
+
tools?: readonly T[];
|
|
27
26
|
messages: readonly MessageParam[];
|
|
28
27
|
}): {
|
|
29
28
|
system?: readonly ContentBlockParam[];
|
|
30
|
-
tools?: readonly
|
|
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;
|
|
@@ -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
|
|
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';
|