agent-afk 5.82.12 → 5.83.1
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/dist/agent/awareness/index.d.ts +1 -1
- package/dist/agent/awareness/runtime-snapshot.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query/date-rollover.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/translate.d.ts +1 -1
- package/dist/agent/providers/shared/stream-stall-timeout.d.ts +15 -0
- package/dist/agent/providers/shared/timer-limits.d.ts +2 -0
- package/dist/agent/tools/handlers/web-scrape.d.ts +2 -0
- package/dist/agent/tools/skill-executor/fork-result.d.ts +5 -0
- package/dist/browser/playwright/launcher.d.ts +1 -0
- package/dist/browser/types.d.ts +1 -0
- package/dist/cli/commands/interactive/shared.d.ts +1 -1
- package/dist/cli/quota-footer.d.ts +6 -0
- package/dist/cli/quota-indicator.d.ts +20 -0
- package/dist/cli/status-line.d.ts +2 -1
- package/dist/cli.mjs +517 -514
- package/dist/config/env.d.ts +2 -0
- package/dist/index.mjs +187 -184
- package/dist/telegram.mjs +239 -236
- package/dist/web/egress-guard.d.ts +24 -0
- package/dist/web/index.d.ts +2 -0
- package/dist/web/scrape.d.ts +2 -0
- package/dist/web/types.d.ts +1 -0
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { Surface, PhaseRole, SubagentStatusLite, SubagentStatusLiteValue, BgJobLite, BgJobStatus, McpServerSummary, RuntimeSelf, RuntimeTools, RuntimeSubagents, RuntimeWorkspace, RuntimeSnapshot, RuntimeView, RuntimeStateSource, } from './types.js';
|
|
2
|
-
export { buildRuntimeSnapshot, parseView, formatEnvironmentFragment, } from './runtime-snapshot.js';
|
|
2
|
+
export { buildRuntimeSnapshot, parseView, formatEnvironmentFragment, formatEnvironmentDateLine, } from './runtime-snapshot.js';
|
|
3
3
|
export { buildRuntimeStateSource, type RuntimeSourceDeps, } from './runtime-source.js';
|
|
4
4
|
export { getRuntimeStateTool, AWARENESS_TOOL_NAMES, createGetRuntimeStateHandler, wrapDispatcherWithRuntimeState, } from './tool.js';
|
|
5
5
|
export { gatherWorkspace } from './workspace-source.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function refreshEnvironmentDate(systemPrompt: string, now?: Date, timeZone?: string): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RawMessageStreamEvent } from '@anthropic-ai/sdk/resources';
|
|
2
2
|
import type { TranslateCtx, TranslateOutput } from './types.js';
|
|
3
|
-
export declare function translateMessageStream(events: AsyncIterable<RawMessageStreamEvent>, ctx: TranslateCtx): AsyncIterable<TranslateOutput>;
|
|
3
|
+
export declare function translateMessageStream(events: AsyncIterable<RawMessageStreamEvent>, ctx: TranslateCtx, onRawProgress?: () => void): AsyncIterable<TranslateOutput>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DEFAULT_MODEL_STALL_TIMEOUT_MS = 1200000;
|
|
2
|
+
export declare function resolveStallTimeoutMs(): number;
|
|
3
|
+
export declare const STALL_TIMEOUT_MESSAGE = "model_stream_stall_timeout";
|
|
4
|
+
export declare function isStallTimeoutError(err: unknown): boolean;
|
|
5
|
+
export declare function stallTimeoutError(timeoutMs: number): Error;
|
|
6
|
+
export interface StreamStallHandle {
|
|
7
|
+
readonly signal: AbortSignal;
|
|
8
|
+
timedOut(): boolean;
|
|
9
|
+
progress(): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function armStreamStallWatchdog(baseSignal: AbortSignal, timeoutMs: number, onFire?: (info: {
|
|
13
|
+
stallTimeoutMs: number;
|
|
14
|
+
elapsedSinceLastProgressMs: number;
|
|
15
|
+
}) => void): StreamStallHandle;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ToolHandler } from '../types.js';
|
|
2
|
+
import type { EgressGuardOptions as GuardOpts } from '../../../web/egress-guard.js';
|
|
2
3
|
import type { RenderFn } from '../../../web/types.js';
|
|
3
4
|
type FetchFn = typeof fetch;
|
|
4
5
|
interface WebScrapeOptions {
|
|
5
6
|
fetchFn?: FetchFn;
|
|
6
7
|
env?: Record<string, string | undefined>;
|
|
7
8
|
renderFn?: RenderFn;
|
|
9
|
+
lookupFn?: GuardOpts['lookupFn'];
|
|
8
10
|
}
|
|
9
11
|
export declare function createWebScrapeHandler(opts?: WebScrapeOptions): ToolHandler;
|
|
10
12
|
export declare const webScrapeHandler: ToolHandler;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SubagentResult } from '../../subagent/result.js';
|
|
2
|
+
import type { ToolResult } from '../types.js';
|
|
3
|
+
export declare const CANCELLED_PARTIAL_MARKER = "[skill cancelled mid-flight \u2014 partial output preserved below]";
|
|
4
|
+
export declare function failedPartialMarker(errorMessage: string): string;
|
|
5
|
+
export declare function renderForkOutcome(result: SubagentResult, noOutputError: string): ToolResult;
|
package/dist/browser/types.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export declare const REPL_SPINNER_OPTIONS: {
|
|
|
111
111
|
};
|
|
112
112
|
export declare function contextRatio(stats: SessionStats, sampler?: ContextSampler): number;
|
|
113
113
|
export declare function formatStatusFields(stats: SessionStats, sampler?: ContextSampler, gitSampler?: GitStatusSampler): {
|
|
114
|
-
|
|
114
|
+
quotaWindows?: import("../../quota-indicator.js").QuotaWindows | undefined;
|
|
115
115
|
pr?: number | undefined;
|
|
116
116
|
branch?: string | undefined;
|
|
117
117
|
cwd?: string | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type QuotaWindows } from './quota-indicator.js';
|
|
2
|
+
export type QuotaUsageTier = 'quiet' | 'caution' | 'near' | 'over';
|
|
3
|
+
export declare function formatQuotaUsage(windows: QuotaWindows | undefined, now?: Date): {
|
|
4
|
+
tier: QuotaUsageTier;
|
|
5
|
+
text: string | null;
|
|
6
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { QuotaSnapshot } from '../agent/quota-cache.js';
|
|
2
|
+
export interface QuotaWindowState {
|
|
3
|
+
readonly utilization: number;
|
|
4
|
+
readonly resetsAt?: Date;
|
|
5
|
+
}
|
|
6
|
+
export interface QuotaWindows {
|
|
7
|
+
readonly fiveHour?: QuotaWindowState;
|
|
8
|
+
readonly sevenDay?: QuotaWindowState;
|
|
9
|
+
readonly observedAt?: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare function quotaWindowsFromSnapshot(snapshot: QuotaSnapshot | undefined): QuotaWindows | undefined;
|
|
12
|
+
export type QuotaSeverity = 'calm' | 'caution' | 'critical';
|
|
13
|
+
export interface QuotaIndicator {
|
|
14
|
+
readonly text: string;
|
|
15
|
+
readonly severity: QuotaSeverity;
|
|
16
|
+
readonly stale: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const STALE_AFTER_MS: number;
|
|
19
|
+
export declare function formatResetCountdown(msRemaining: number): string;
|
|
20
|
+
export declare function formatQuotaIndicator(windows: QuotaWindows, now?: Date): QuotaIndicator | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PermissionMode } from '../agent/types/sdk-types.js';
|
|
2
|
+
import { type QuotaWindows } from './quota-indicator.js';
|
|
2
3
|
export interface StatusLineFields {
|
|
3
4
|
model: string;
|
|
4
5
|
cost?: number;
|
|
@@ -11,7 +12,7 @@ export interface StatusLineFields {
|
|
|
11
12
|
cwd?: string;
|
|
12
13
|
branch?: string;
|
|
13
14
|
pr?: number;
|
|
14
|
-
|
|
15
|
+
quotaWindows?: QuotaWindows;
|
|
15
16
|
}
|
|
16
17
|
interface StatusLineOpts {
|
|
17
18
|
stream?: NodeJS.WriteStream;
|