agent-afk 5.82.12 → 5.83.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/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 +478 -478
- package/dist/config/env.d.ts +1 -0
- package/dist/index.mjs +166 -166
- package/dist/telegram.mjs +219 -219
- 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,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;
|