agent-afk 5.313.9 → 5.313.10
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 +2 -0
- package/dist/browser/playwright/domain-recheck.d.ts +7 -1
- package/dist/browser/playwright/egress-attribution.d.ts +18 -0
- package/dist/browser/playwright/egress-gate.d.ts +14 -0
- package/dist/browser/playwright/egress-launch.d.ts +20 -0
- package/dist/browser/playwright/egress-proxy.d.ts +41 -0
- package/dist/browser/playwright/launcher.d.ts +5 -0
- package/dist/cli.mjs +384 -372
- package/dist/http-client/egress-guard.d.ts +1 -0
- package/dist/index.mjs +193 -181
- package/dist/telegram.mjs +208 -196
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,8 @@ Codex imports use `CODEX_HOME` when set (otherwise `~/.codex`) and also discover
|
|
|
61
61
|
|
|
62
62
|
## What it has done
|
|
63
63
|
|
|
64
|
+
**Constructed SW(27,16), a symmetric weighing matrix the standard archives do not list.** Given a research campaign goal, agent-afk agents picked the target, designed a prescribed-automorphism SAT search, found a symmetric 27x27 weighing matrix in 1903 seconds of solver time, checked it with independent exact checkers on two machines, and ran a kill lane that could not refute it. The standard databases list no symmetric W(27,16). Check it yourself in under a second: [`docs/results/sw-27-16`](docs/results/sw-27-16/README.md).
|
|
65
|
+
|
|
64
66
|
**Constructed SW(25,16), a math case a 2025 paper listed as open.** Given a one-sentence goal ("settle one published open question"), agent-afk agents picked the target, designed a structured SAT search, found a symmetric 25x25 weighing matrix in 760 seconds of solver time, checked it with independent exact checkers and a prior-work search, and wrote up a short proof. The author of the paper that listed the case as open confirmed it passes his verifier. Check it yourself in under a second: [`docs/results/sw-25-16`](docs/results/sw-25-16/README.md).
|
|
65
67
|
|
|
66
68
|
## How it compares
|
|
@@ -3,4 +3,10 @@ export interface RecheckablePage {
|
|
|
3
3
|
url(): string;
|
|
4
4
|
goBack(): Promise<unknown>;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export interface RecheckOptions {
|
|
7
|
+
lookupFn?: (hostname: string) => Promise<readonly {
|
|
8
|
+
address: string;
|
|
9
|
+
}[]>;
|
|
10
|
+
allowPrivateHosts?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function recheckLandedUrl(page: RecheckablePage, config: BrowserConfig, clearedUrl: string, invalidateSession: () => Promise<void>, opts?: RecheckOptions): Promise<BlockedByPolicy | null>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Page } from 'playwright';
|
|
2
|
+
import type { BlockedByPolicy } from '../types.js';
|
|
3
|
+
import { EgressBlockedError } from '../../http-client/egress-guard.js';
|
|
4
|
+
import { type EgressRefusal } from './egress-proxy.js';
|
|
5
|
+
import type { RefusalLog } from './egress-launch.js';
|
|
6
|
+
export interface RefusalVerdict {
|
|
7
|
+
main: EgressRefusal | undefined;
|
|
8
|
+
any: EgressRefusal | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface EgressWatch {
|
|
11
|
+
check(): RefusalVerdict;
|
|
12
|
+
stop(): RefusalVerdict;
|
|
13
|
+
}
|
|
14
|
+
export declare function watchEgressRefusals(page: Page, log: RefusalLog | undefined): EgressWatch;
|
|
15
|
+
export declare function mainRefusalOutcome(v: RefusalVerdict, url: string): BlockedByPolicy | null;
|
|
16
|
+
export declare function renderRefusalError(v: RefusalVerdict): EgressBlockedError | undefined;
|
|
17
|
+
export declare function invalidateOnRefusal(outcome: BlockedByPolicy, invalidate: () => Promise<void>): Promise<BlockedByPolicy>;
|
|
18
|
+
export declare function runActionWithRetry(execute: () => Promise<void>, consumeTrap: () => unknown, watch: EgressWatch): Promise<unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BrowserContext, Page, Response } from 'playwright';
|
|
2
|
+
import type { BlockedByPolicy } from '../types.js';
|
|
3
|
+
export declare function checkNavigationEgress(url: string): Promise<BlockedByPolicy | null>;
|
|
4
|
+
export declare function egressBlockOutcome(err: unknown, url: string): BlockedByPolicy | null;
|
|
5
|
+
export declare function watchMainFrameNavigation(page: Page): () => Response | null;
|
|
6
|
+
export declare function checkRedirectChain(response: Response | null, finalUrl: string, proxied?: boolean): Promise<BlockedByPolicy | null>;
|
|
7
|
+
export declare class RequestGuardTrap {
|
|
8
|
+
private lastError;
|
|
9
|
+
install(context: BrowserContext): Promise<void>;
|
|
10
|
+
clear(): void;
|
|
11
|
+
consume(): unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function installRenderRouteGuard(context: BrowserContext, guard: (url: string) => Promise<void>, onRefusal: (err: unknown) => void): Promise<void>;
|
|
14
|
+
export { invalidateOnRefusal, mainRefusalOutcome, renderRefusalError, runActionWithRetry, watchEgressRefusals } from './egress-attribution.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LaunchOptions } from 'playwright';
|
|
2
|
+
import { type EgressProxyDeps, type EgressRefusal } from './egress-proxy.js';
|
|
3
|
+
export declare const EGRESS_LAUNCH_ARGS: readonly string[];
|
|
4
|
+
export declare const EGRESS_PROXY_BYPASS = "<-loopback>";
|
|
5
|
+
export declare function buildLaunchOptions(headless: boolean, proxyPort: number | undefined): LaunchOptions;
|
|
6
|
+
export interface RefusalLog {
|
|
7
|
+
mark(): number;
|
|
8
|
+
refusalsSince(mark: number): EgressRefusal[];
|
|
9
|
+
}
|
|
10
|
+
export declare class GuardedEgress implements RefusalLog {
|
|
11
|
+
private readonly deps;
|
|
12
|
+
private proxy;
|
|
13
|
+
private unregister;
|
|
14
|
+
constructor(deps?: EgressProxyDeps);
|
|
15
|
+
start(headless: boolean): Promise<LaunchOptions>;
|
|
16
|
+
isActive(): boolean;
|
|
17
|
+
mark(): number;
|
|
18
|
+
refusalsSince(mark: number): EgressRefusal[];
|
|
19
|
+
stop(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface EgressRefusal {
|
|
2
|
+
seq: number;
|
|
3
|
+
at: number;
|
|
4
|
+
target: string;
|
|
5
|
+
reason: string;
|
|
6
|
+
}
|
|
7
|
+
export interface EgressProxyDeps {
|
|
8
|
+
lookupFn?: (hostname: string) => Promise<readonly {
|
|
9
|
+
address: string;
|
|
10
|
+
}[]>;
|
|
11
|
+
isBlocked?: (ip: string, port: number) => boolean;
|
|
12
|
+
connectTimeoutMs?: number;
|
|
13
|
+
drainTimeoutMs?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function targetKey(host: string, port: number | string): string;
|
|
16
|
+
export declare function targetKeyFromUrl(raw: string): string | null;
|
|
17
|
+
export declare class EgressProxy {
|
|
18
|
+
private readonly server;
|
|
19
|
+
private readonly sockets;
|
|
20
|
+
private readonly refusals;
|
|
21
|
+
private seq;
|
|
22
|
+
private closing;
|
|
23
|
+
private readonly lookupFn;
|
|
24
|
+
private readonly isBlocked;
|
|
25
|
+
private readonly connectTimeoutMs;
|
|
26
|
+
private readonly drainTimeoutMs;
|
|
27
|
+
constructor(deps?: EgressProxyDeps);
|
|
28
|
+
listen(): Promise<number>;
|
|
29
|
+
mark(): number;
|
|
30
|
+
refusalsSince(mark: number): EgressRefusal[];
|
|
31
|
+
resolve(host: string, port: number): Promise<string[]>;
|
|
32
|
+
private lookupGuarded;
|
|
33
|
+
private record;
|
|
34
|
+
private track;
|
|
35
|
+
private dial;
|
|
36
|
+
private openUpstream;
|
|
37
|
+
private onForward;
|
|
38
|
+
private relayResponse;
|
|
39
|
+
private onTunnel;
|
|
40
|
+
close(): Promise<void>;
|
|
41
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Browser, BrowserContext, Page } from 'playwright';
|
|
2
2
|
import type { BrowserConfig } from '../types.js';
|
|
3
|
+
import { type RefusalLog } from './egress-launch.js';
|
|
3
4
|
export declare class BrowserLauncher {
|
|
4
5
|
private readonly config;
|
|
5
6
|
private browser;
|
|
@@ -7,6 +8,7 @@ export declare class BrowserLauncher {
|
|
|
7
8
|
private launchPromise;
|
|
8
9
|
private launchFailure;
|
|
9
10
|
private shutdownComplete;
|
|
11
|
+
private readonly egress;
|
|
10
12
|
constructor(config: BrowserConfig);
|
|
11
13
|
private clearLaunchFailure;
|
|
12
14
|
private latchLaunchFailure;
|
|
@@ -15,6 +17,9 @@ export declare class BrowserLauncher {
|
|
|
15
17
|
ensureContext(sessionId: string): Promise<BrowserContext>;
|
|
16
18
|
ensurePage(sessionId: string): Promise<Page>;
|
|
17
19
|
getPage(sessionId: string): Page | undefined;
|
|
20
|
+
consumeRequestGuardError(sessionId: string): unknown;
|
|
21
|
+
egressLog(): RefusalLog | undefined;
|
|
22
|
+
clearRequestGuardError(sessionId: string): void;
|
|
18
23
|
renderHtml(url: string, opts: {
|
|
19
24
|
timeoutMs: number;
|
|
20
25
|
waitUntil: 'load' | 'domcontentloaded' | 'networkidle';
|