agent-afk 5.305.2 → 5.305.4
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/bg-job-log.orphan.d.ts +10 -1
- package/dist/agent/elicitation/answer-validation.d.ts +10 -0
- package/dist/agent/providers/anthropic-direct/loop/sdk-thinking-warning.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/pricing.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/resolve-params.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/usage-limit-tier.d.ts +5 -0
- package/dist/agent/session/model-slots.d.ts +1 -1
- package/dist/agent/worktree/sweep-policy.d.ts +23 -0
- package/dist/cli/config/types.d.ts +2 -2
- package/dist/cli.mjs +349 -349
- package/dist/index.mjs +148 -148
- package/dist/telegram.mjs +172 -172
- package/package.json +2 -2
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-
|
|
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
|
|
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,10 @@
|
|
|
1
|
+
import type { ElicitationRequest } from '../types/sdk-types.js';
|
|
2
|
+
export type AnswerValidationResult = {
|
|
3
|
+
ok: true;
|
|
4
|
+
value: string | number;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function validateTextAnswer(raw: string, request: Pick<ElicitationRequest, 'minLength' | 'maxLength'>): AnswerValidationResult;
|
|
10
|
+
export declare function validateNumberAnswer(raw: string, request: Pick<ElicitationRequest, 'min' | 'max'>): AnswerValidationResult;
|
|
@@ -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-
|
|
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";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const SWEEP_POLICY_DEFAULTS: {
|
|
2
|
+
readonly maxAgeDaysClean: 14;
|
|
3
|
+
readonly maxAgeDaysDirty: 30;
|
|
4
|
+
};
|
|
5
|
+
export interface SweepPolicyInputs {
|
|
6
|
+
overrides?: {
|
|
7
|
+
maxAgeDaysClean?: number;
|
|
8
|
+
maxAgeDaysDirty?: number;
|
|
9
|
+
};
|
|
10
|
+
config?: {
|
|
11
|
+
maxAgeDaysClean?: number;
|
|
12
|
+
maxAgeDaysDirty?: number;
|
|
13
|
+
};
|
|
14
|
+
env?: {
|
|
15
|
+
maxAgeDaysClean?: string | undefined;
|
|
16
|
+
maxAgeDaysDirty?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface SweepPolicyResult {
|
|
20
|
+
maxAgeDaysClean: number;
|
|
21
|
+
maxAgeDaysDirty: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function resolveSweepPolicy(inputs: SweepPolicyInputs): SweepPolicyResult;
|