agent-afk 5.40.0 → 5.42.0
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 +8 -5
- package/dist/agent/providers/openai-compatible/auth.d.ts +2 -2
- package/dist/agent/session/model-slots.d.ts +6 -2
- package/dist/agent/session/slot-credentials.d.ts +1 -0
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli/clipboard.d.ts +9 -1
- package/dist/cli.mjs +419 -419
- package/dist/index.mjs +147 -147
- package/dist/telegram/handlers/commands.d.ts +2 -2
- package/dist/telegram.mjs +191 -191
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,11 +139,14 @@ afk chat "refactor this" --model gpt-5.5
|
|
|
139
139
|
| Slot | Default | Notes |
|
|
140
140
|
|---|---|---|
|
|
141
141
|
| `local` | *(empty — you configure)* | Point at Ollama, LM Studio, or any OpenAI-compatible shim via `AFK_MODEL_LOCAL` + `AFK_MODEL_LOCAL_BASE_URL` |
|
|
142
|
-
| `small` | `claude-haiku-4-5-20251001` | Cheapest/fastest Anthropic tier
|
|
143
|
-
| `medium` | `claude-sonnet-5` | General-use default
|
|
144
|
-
| `large` | `claude-opus-4-8` | Most capable
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
| `small` | `claude-haiku-4-5-20251001` | Cheapest/fastest Anthropic tier |
|
|
143
|
+
| `medium` | `claude-sonnet-5` | General-use default |
|
|
144
|
+
| `large` | `claude-opus-4-8` | Most capable |
|
|
145
|
+
|
|
146
|
+
The `haiku`/`sonnet`/`opus`/`fable` handles are **fixed identities**, not tier
|
|
147
|
+
aliases: they always resolve to their Claude model even after you rebind a tier
|
|
148
|
+
(so rebinding `medium` to an OpenAI model won't hijack `sonnet`). See
|
|
149
|
+
[`docs/model-slots.md`](docs/model-slots.md) for the full configuration reference.
|
|
147
150
|
|
|
148
151
|
MCP servers (tool-providing plugins over stdio/HTTP) — see [`docs/mcp.md`](docs/mcp.md) for config, transports, OAuth, and security notes.
|
|
149
152
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type OpenAIAuthSource = 'config' | 'env' | 'codex-cli' | 'chatgpt-oauth' | 'no-usable-auth' | 'no-usable-auth-codex-oauth';
|
|
1
|
+
export type OpenAIAuthSource = 'config' | 'env' | 'codex-cli' | 'chatgpt-oauth' | 'no-usable-auth' | 'no-usable-auth-codex-oauth' | 'no-usable-auth-forced-chatgpt-oauth';
|
|
2
2
|
export interface OpenAIAuthResolution {
|
|
3
3
|
apiKey: string | null;
|
|
4
4
|
source: OpenAIAuthSource;
|
|
@@ -12,7 +12,7 @@ export interface AuthResolverDeps {
|
|
|
12
12
|
homedir?: () => string;
|
|
13
13
|
readFile?: (path: string) => string | null;
|
|
14
14
|
}
|
|
15
|
-
export declare function resolveOpenAIAuth(explicitConfigKey: string | undefined, deps?: AuthResolverDeps): OpenAIAuthResolution;
|
|
15
|
+
export declare function resolveOpenAIAuth(explicitConfigKey: string | undefined, deps?: AuthResolverDeps, forceChatgptOAuth?: boolean): OpenAIAuthResolution;
|
|
16
16
|
type CodexAuthParse = {
|
|
17
17
|
kind: 'apikey';
|
|
18
18
|
apiKey: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type SlotName = 'local' | 'small' | 'medium' | 'large';
|
|
2
2
|
export declare const SLOT_NAMES: readonly SlotName[];
|
|
3
|
-
export type SlotProvider = 'anthropic' | 'openai';
|
|
3
|
+
export type SlotProvider = 'anthropic' | 'openai' | 'chatgpt-oauth';
|
|
4
4
|
export interface ModelSlotBinding {
|
|
5
5
|
id: string;
|
|
6
6
|
name?: string;
|
|
@@ -9,10 +9,14 @@ export interface ModelSlotBinding {
|
|
|
9
9
|
apiKey?: string;
|
|
10
10
|
}
|
|
11
11
|
export type ModelSlots = Record<SlotName, ModelSlotBinding>;
|
|
12
|
+
export declare const CLAUDE_HAIKU_ID = "claude-haiku-4-5-20251001";
|
|
13
|
+
export declare const CLAUDE_SONNET_ID = "claude-sonnet-5";
|
|
14
|
+
export declare const CLAUDE_OPUS_ID = "claude-opus-4-8";
|
|
15
|
+
export declare const CLAUDE_FABLE_5_ID = "claude-fable-5";
|
|
12
16
|
export declare const DEFAULT_SLOT_BINDINGS: ModelSlots;
|
|
13
17
|
export declare const AUTO_SENTINEL = "auto";
|
|
14
|
-
export declare const CLAUDE_FABLE_5_ID = "claude-fable-5";
|
|
15
18
|
export declare const DIRECT_MODEL_ALIASES: Readonly<Record<string, string>>;
|
|
19
|
+
export declare const MODEL_ALIASES_HINT: readonly string[];
|
|
16
20
|
export declare function setSlotBindings(bindings: ModelSlots | undefined): void;
|
|
17
21
|
export declare function resetSlotBindings(): void;
|
|
18
22
|
export declare function computeSlotBindings(fileOverrides?: Partial<Record<SlotName, ModelSlotBinding>>): ModelSlots;
|
package/dist/cli/clipboard.d.ts
CHANGED
|
@@ -2,6 +2,14 @@ interface ClipboardTool {
|
|
|
2
2
|
cmd: string;
|
|
3
3
|
args: string[];
|
|
4
4
|
}
|
|
5
|
+
export interface Osc52Sink {
|
|
6
|
+
write(chunk: string): boolean;
|
|
7
|
+
isTTY?: boolean;
|
|
8
|
+
}
|
|
5
9
|
export declare function clipboardToolsFor(platform: NodeJS.Platform): ClipboardTool[];
|
|
6
|
-
export declare function
|
|
10
|
+
export declare function osc52Copy(text: string): string;
|
|
11
|
+
export declare function wrapTmuxPassthrough(sequence: string): string;
|
|
12
|
+
export declare function osc52ClipboardSequence(text: string, env?: NodeJS.ProcessEnv): string;
|
|
13
|
+
export declare function copyViaOsc52(text: string, env?: NodeJS.ProcessEnv, sink?: Osc52Sink): boolean;
|
|
14
|
+
export declare function copyToClipboard(text: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, sink?: Osc52Sink): boolean;
|
|
7
15
|
export {};
|