agent-afk 5.321.10 → 5.322.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/mcp/error-hints.d.ts +13 -0
- package/dist/agent/trace/cost.d.ts +1 -0
- package/dist/agent/trace/events.d.ts +2 -0
- package/dist/agent/trace/events.session-phase.d.ts +2 -0
- package/dist/agent/trace/types.session-phase.d.ts +1 -1
- package/dist/browser/real-chrome-advice.d.ts +10 -0
- package/dist/browser/real-chrome-probe.d.ts +24 -0
- package/dist/cli/commands/browser.connect-diagnosis.d.ts +4 -0
- package/dist/cli/commands/browser.d.ts +4 -5
- package/dist/cli/terminal-compositor.d.ts +1 -0
- package/dist/cli/terminal-compositor.frame.d.ts +1 -0
- package/dist/cli/terminal-compositor.lifecycle.d.ts +1 -0
- package/dist/cli/terminal-compositor.reset.d.ts +1 -0
- package/dist/cli.mjs +449 -441
- package/dist/config/env.d.ts +7 -0
- package/dist/config/env.paths.d.ts +7 -0
- package/dist/index.mjs +196 -192
- package/dist/telegram.mjs +236 -228
- package/dist/whatif/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ToolResult } from '../tools/types.js';
|
|
2
|
+
import type { McpServerConfig } from './types.js';
|
|
3
|
+
import { channelFromArgs, type RealChromeProbeResult } from '../../browser/real-chrome-probe.js';
|
|
4
|
+
export interface McpErrorHintRule {
|
|
5
|
+
id: string;
|
|
6
|
+
appliesTo(serverName: string, config: McpServerConfig): boolean;
|
|
7
|
+
hint(errorText: string, config: McpServerConfig): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface McpErrorHintDeps {
|
|
10
|
+
probe?: (channel: ReturnType<typeof channelFromArgs>) => RealChromeProbeResult;
|
|
11
|
+
}
|
|
12
|
+
export declare function chromeDevtoolsActivePortRule(deps?: McpErrorHintDeps): McpErrorHintRule;
|
|
13
|
+
export declare function applyMcpErrorHints(serverName: string, config: McpServerConfig, result: ToolResult, rules?: readonly McpErrorHintRule[]): ToolResult;
|
|
@@ -714,6 +714,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
714
714
|
compose_recovery_decision: "compose_recovery_decision";
|
|
715
715
|
compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
|
|
716
716
|
hook_block_repeat_tripped: "hook_block_repeat_tripped";
|
|
717
|
+
billing_settled: "billing_settled";
|
|
717
718
|
}>;
|
|
718
719
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
719
720
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1173,6 +1174,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1173
1174
|
compose_recovery_decision: "compose_recovery_decision";
|
|
1174
1175
|
compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
|
|
1175
1176
|
hook_block_repeat_tripped: "hook_block_repeat_tripped";
|
|
1177
|
+
billing_settled: "billing_settled";
|
|
1176
1178
|
}>;
|
|
1177
1179
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1178
1180
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -49,6 +49,7 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
|
|
|
49
49
|
compose_recovery_decision: "compose_recovery_decision";
|
|
50
50
|
compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
|
|
51
51
|
hook_block_repeat_tripped: "hook_block_repeat_tripped";
|
|
52
|
+
billing_settled: "billing_settled";
|
|
52
53
|
}>;
|
|
53
54
|
export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
54
55
|
phase: z.ZodEnum<{
|
|
@@ -101,6 +102,7 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
|
|
|
101
102
|
compose_recovery_decision: "compose_recovery_decision";
|
|
102
103
|
compose_leaf_tools_stripped: "compose_leaf_tools_stripped";
|
|
103
104
|
hook_block_repeat_tripped: "hook_block_repeat_tripped";
|
|
105
|
+
billing_settled: "billing_settled";
|
|
104
106
|
}>;
|
|
105
107
|
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
106
108
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'context_pressure_wind_down' | 'catalog_model_upgrade' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'overload_pause' | 'overload_resume' | 'idle_watchdog_fired' | 'pause_extension_granted' | 'suspected_loop' | 'compaction_disabled' | 'boot_warning' | 'workspace_subscribed' | 'workspace_delivery' | 'gate_shape' | 'session_id_assigned' | 'many_image_degraded' | 'stream_accepted_after_drop' | 'connection_retry' | 'connection_retry_exhausted' | 'connection_failure' | 'connection_recovered' | 'connection_budget_exhausted' | 'usage_notice' | 'tool_degraded' | 'strategy_nudge_fired' | 'stop_inject_dropped' | 'stop_hook_continuation' | 'stop_hook_cap_reached' | 'orphan_repair' | 'thinking_block_dropped' | 'background_process_started' | 'background_process_settled' | 'compose_recovery_decision' | 'compose_leaf_tools_stripped' | 'hook_block_repeat_tripped';
|
|
1
|
+
export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'context_pressure_wind_down' | 'catalog_model_upgrade' | 'interrupt_halt' | 'rate_limit' | 'ttfb_timeout' | 'usage_limit_pause' | 'usage_limit_resume' | 'overload_pause' | 'overload_resume' | 'idle_watchdog_fired' | 'pause_extension_granted' | 'suspected_loop' | 'compaction_disabled' | 'boot_warning' | 'workspace_subscribed' | 'workspace_delivery' | 'gate_shape' | 'session_id_assigned' | 'many_image_degraded' | 'stream_accepted_after_drop' | 'connection_retry' | 'connection_retry_exhausted' | 'connection_failure' | 'connection_recovered' | 'connection_budget_exhausted' | 'usage_notice' | 'tool_degraded' | 'strategy_nudge_fired' | 'stop_inject_dropped' | 'stop_hook_continuation' | 'stop_hook_cap_reached' | 'orphan_repair' | 'thinking_block_dropped' | 'background_process_started' | 'background_process_settled' | 'compose_recovery_decision' | 'compose_leaf_tools_stripped' | 'hook_block_repeat_tripped' | 'billing_settled';
|
|
2
2
|
export interface SessionPhasePayload {
|
|
3
3
|
phase: SessionPhaseName;
|
|
4
4
|
durationMs?: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RealChromeProbeResult } from './real-chrome-probe.js';
|
|
2
|
+
export declare const REMOTE_DEBUGGING_URL = "chrome://inspect/#remote-debugging";
|
|
3
|
+
export declare const MAC_FILES_AND_FOLDERS_URL = "x-apple.systempreferences:com.apple.preference.security?Privacy_FilesAndFolders";
|
|
4
|
+
export interface RealChromeAdvice {
|
|
5
|
+
headline: string;
|
|
6
|
+
steps: string[];
|
|
7
|
+
openUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function adviseRealChrome(probe: RealChromeProbeResult): RealChromeAdvice;
|
|
10
|
+
export declare function formatRealChromeAdvice(advice: RealChromeAdvice): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const CHROME_DEVTOOLS_SERVER_NAME = "chrome-devtools";
|
|
2
|
+
export declare const REAL_CHROME_CHANNELS: readonly ["stable", "beta", "canary", "dev"];
|
|
3
|
+
export type RealChromeChannel = (typeof REAL_CHROME_CHANNELS)[number];
|
|
4
|
+
export type RealChromeState = 'ok' | 'missing' | 'blocked' | 'unknown';
|
|
5
|
+
export interface RealChromeProbeResult {
|
|
6
|
+
state: RealChromeState;
|
|
7
|
+
channel: RealChromeChannel;
|
|
8
|
+
platform: NodeJS.Platform;
|
|
9
|
+
userDataDir: string | null;
|
|
10
|
+
errorCode?: string;
|
|
11
|
+
terminalBundleId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RealChromeProbeOptions {
|
|
14
|
+
channel?: RealChromeChannel;
|
|
15
|
+
platform?: NodeJS.Platform;
|
|
16
|
+
home?: string;
|
|
17
|
+
localAppData?: string;
|
|
18
|
+
terminalBundleId?: string;
|
|
19
|
+
touchFile?: (file: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function chromeAppName(channel: RealChromeChannel): string;
|
|
22
|
+
export declare function resolveChromeUserDataDir(channel: RealChromeChannel, platform: NodeJS.Platform, home: string, localAppData: string | undefined): string | null;
|
|
23
|
+
export declare function probeRealChrome(opts?: RealChromeProbeOptions): RealChromeProbeResult;
|
|
24
|
+
export declare function channelFromArgs(args: readonly string[] | undefined): RealChromeChannel;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type RealChromeChannel } from '../../browser/real-chrome-probe.js';
|
|
2
|
+
export declare const CHROME_DEVTOOLS_MCP_FALLBACK_VERSION = "1.11.0";
|
|
3
|
+
export declare function resolveChromeDevtoolsMcpVersion(): string;
|
|
4
|
+
export declare function printConnectDiagnosis(channel: RealChromeChannel, open: boolean, platform?: NodeJS.Platform): void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { type McpConfigFile } from '../../agent/mcp/index.js';
|
|
3
3
|
import type { McpServerConfig } from '../../agent/mcp/types.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type ChromeChannel =
|
|
7
|
-
export declare function buildChromeDevtoolsEntry(channel?: ChromeChannel): McpServerConfig;
|
|
4
|
+
import { CHROME_DEVTOOLS_SERVER_NAME, type RealChromeChannel } from '../../browser/real-chrome-probe.js';
|
|
5
|
+
export { CHROME_DEVTOOLS_SERVER_NAME };
|
|
6
|
+
type ChromeChannel = RealChromeChannel;
|
|
7
|
+
export declare function buildChromeDevtoolsEntry(channel?: ChromeChannel, version?: string): McpServerConfig;
|
|
8
8
|
export declare function readMcpConfigFile(path: string): McpConfigFile;
|
|
9
9
|
export declare function writeMcpConfigFileAtomic(path: string, cfg: McpConfigFile): void;
|
|
10
10
|
export declare function registerBrowserCommand(program: Command): void;
|
|
11
|
-
export {};
|