@roll-agent/browser-use-agent 0.7.5 → 0.7.7
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/SKILL.md +75 -217
- package/dist/index.js +1 -1
- package/dist/native-mouse-motion.d.ts +55 -0
- package/dist/native-visual-activity-session.d.ts +23 -0
- package/dist/pages/zhipin/native-page.d.ts +194 -0
- package/dist/pages/zhipin/resume-dom-contract.d.ts +43 -0
- package/dist/pages/zhipin/selectors.d.ts +1 -1
- package/dist/tools/zhipin-diagnose-browser-state.d.ts +35 -10
- package/dist/tools/zhipin-exchange-wechat.d.ts +13 -7
- package/dist/tools/zhipin-filter-recommend-candidates.d.ts +6 -13
- package/dist/tools/zhipin-get-candidate-info.d.ts +20 -10
- package/dist/tools/zhipin-get-candidate-list.d.ts +11 -14
- package/dist/tools/zhipin-get-username.d.ts +7 -9
- package/dist/tools/zhipin-locate-resume-canvas.d.ts +2 -2
- package/dist/tools/zhipin-open-chat-page.d.ts +6 -15
- package/dist/tools/zhipin-open-chat.d.ts +12 -2
- package/dist/tools/zhipin-open-recommend-page.d.ts +6 -17
- package/dist/tools/zhipin-read-messages.d.ts +9 -0
- package/dist/tools/zhipin-say-hello.d.ts +13 -23
- package/dist/tools/zhipin-scroll-view.d.ts +10 -0
- package/dist/tools/zhipin-send-reply.d.ts +14 -6
- package/package.json +2 -2
- package/references/zhipin-diagnostics.md +77 -0
- package/references/zhipin-workflows.md +102 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { NativeCdpController, NativeCdpMouseEventInput } from "@roll-agent/browser";
|
|
2
|
+
export type NativeMousePoint = {
|
|
3
|
+
readonly x: number;
|
|
4
|
+
readonly y: number;
|
|
5
|
+
};
|
|
6
|
+
export type NativeMouseMotionPreview = {
|
|
7
|
+
readonly points: readonly NativeMousePoint[];
|
|
8
|
+
readonly durationMs: number;
|
|
9
|
+
};
|
|
10
|
+
export type NativeMouseClickPreview = {
|
|
11
|
+
readonly point: NativeMousePoint;
|
|
12
|
+
readonly durationMs: number;
|
|
13
|
+
};
|
|
14
|
+
export type NativeMouseMotionObserver = {
|
|
15
|
+
previewMouseMotion(preview: NativeMouseMotionPreview): Promise<void>;
|
|
16
|
+
previewMouseClick?(preview: NativeMouseClickPreview): Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export type NativeMouseMotionControllerOptions = {
|
|
19
|
+
readonly sleep?: (ms: number) => Promise<void>;
|
|
20
|
+
readonly stepDelayMs?: number;
|
|
21
|
+
};
|
|
22
|
+
export type NativeMouseMoveOptions = {
|
|
23
|
+
readonly button?: NativeCdpMouseEventInput["button"];
|
|
24
|
+
readonly buttons?: number;
|
|
25
|
+
readonly motionObserver?: NativeMouseMotionObserver;
|
|
26
|
+
readonly stepDelayMs?: number;
|
|
27
|
+
};
|
|
28
|
+
export type NativeMouseClickOptions = {
|
|
29
|
+
readonly button?: NativeCdpMouseEventInput["button"];
|
|
30
|
+
readonly clickCount?: number;
|
|
31
|
+
readonly motionObserver?: NativeMouseMotionObserver;
|
|
32
|
+
readonly preClickDelayMs?: number;
|
|
33
|
+
readonly pressDurationMs?: number;
|
|
34
|
+
readonly settleMs?: number;
|
|
35
|
+
};
|
|
36
|
+
export type NativeMouseDragOptions = {
|
|
37
|
+
readonly motionObserver?: NativeMouseMotionObserver;
|
|
38
|
+
readonly pressDurationMs?: number;
|
|
39
|
+
readonly stepDelayMs?: number;
|
|
40
|
+
};
|
|
41
|
+
type NativeMouseDispatcher = Pick<NativeCdpController, "dispatchMouseEvent">;
|
|
42
|
+
export declare function createNativeMousePath(currentPoint: NativeMousePoint | undefined, targetPoint: NativeMousePoint): readonly NativeMousePoint[];
|
|
43
|
+
export declare class NativeMouseMotionController {
|
|
44
|
+
private readonly dispatcher;
|
|
45
|
+
private readonly sleep;
|
|
46
|
+
private readonly defaultStepDelayMs;
|
|
47
|
+
private lastPoint;
|
|
48
|
+
constructor(dispatcher: NativeMouseDispatcher, options?: NativeMouseMotionControllerOptions);
|
|
49
|
+
reset(point?: NativeMousePoint): void;
|
|
50
|
+
moveTo(targetPoint: NativeMousePoint, options?: NativeMouseMoveOptions): Promise<NativeMouseMotionPreview>;
|
|
51
|
+
click(targetPoint: NativeMousePoint, options?: NativeMouseClickOptions): Promise<void>;
|
|
52
|
+
drag(fromPoint: NativeMousePoint, toPoint: NativeMousePoint, options?: NativeMouseDragOptions): Promise<void>;
|
|
53
|
+
private delayIfPositive;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { VisualActivityTone } from "./visual-activity.ts";
|
|
2
|
+
import type { NativeMouseClickPreview, NativeMouseMotionObserver, NativeMouseMotionPreview } from "./native-mouse-motion.ts";
|
|
3
|
+
type NativeVisualTarget = {
|
|
4
|
+
evaluateJson<T = unknown>(expression: string): Promise<T>;
|
|
5
|
+
};
|
|
6
|
+
type NativeVisualHighlightOptions = {
|
|
7
|
+
readonly label?: string;
|
|
8
|
+
readonly padding?: number;
|
|
9
|
+
readonly tone?: VisualActivityTone;
|
|
10
|
+
};
|
|
11
|
+
export declare class NativeVisualActivitySession implements NativeMouseMotionObserver {
|
|
12
|
+
private readonly target;
|
|
13
|
+
constructor(target: NativeVisualTarget);
|
|
14
|
+
begin(label: string, tone?: VisualActivityTone): Promise<boolean>;
|
|
15
|
+
highlightSelector(selector: string, options?: NativeVisualHighlightOptions): Promise<boolean>;
|
|
16
|
+
previewMouseMotion(preview: NativeMouseMotionPreview): Promise<void>;
|
|
17
|
+
previewMouseClick(preview: NativeMouseClickPreview): Promise<void>;
|
|
18
|
+
succeed(label: string, lingerMs?: number): Promise<boolean>;
|
|
19
|
+
fail(label: string, lingerMs?: number): Promise<boolean>;
|
|
20
|
+
clear(): Promise<boolean>;
|
|
21
|
+
private render;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { BrowserContextManager, BrowserInspectablePage, BrowserRuntime, NativeCdpController } from "@roll-agent/browser";
|
|
2
|
+
import { type NativeMouseMotionObserver } from "../../native-mouse-motion.ts";
|
|
3
|
+
import type { DynamicListCollectionStopReason, DynamicListScrollResult, ScrollDirection } from "../shared/dynamic-list-scroller.ts";
|
|
4
|
+
import { type ChatListItem, type ChatTarget, type OpenChatResult } from "./chat-navigation.ts";
|
|
5
|
+
import { type ZhipinListSurface } from "./list-surfaces.ts";
|
|
6
|
+
import type { ZhipinRecommendFilterApplyResult, ZhipinRecommendFilterRequest } from "./recommend-filter.ts";
|
|
7
|
+
import type { UsernameEvidence } from "./username.ts";
|
|
8
|
+
export type ZhipinNativePagePortOptions = {
|
|
9
|
+
readonly target: BrowserInspectablePage;
|
|
10
|
+
readonly controller: NativeCdpController;
|
|
11
|
+
};
|
|
12
|
+
export type ReadNativeChatCandidatesOptions = {
|
|
13
|
+
readonly targetCount?: number;
|
|
14
|
+
readonly autoScroll?: boolean;
|
|
15
|
+
readonly maxScrolls?: number;
|
|
16
|
+
};
|
|
17
|
+
export type NativeRecommendCandidateCard = {
|
|
18
|
+
readonly index: number;
|
|
19
|
+
readonly candidateId: string;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly age: string;
|
|
22
|
+
readonly experience: string;
|
|
23
|
+
readonly education: string;
|
|
24
|
+
readonly workStatus: string;
|
|
25
|
+
readonly company: string;
|
|
26
|
+
readonly currentPosition: string;
|
|
27
|
+
readonly expectedLocation: string;
|
|
28
|
+
readonly expectedPosition: string;
|
|
29
|
+
readonly expectedSalary: string;
|
|
30
|
+
readonly tags: string[];
|
|
31
|
+
readonly buttonText: string;
|
|
32
|
+
};
|
|
33
|
+
export type ReadNativeRecommendCandidatesOptions = {
|
|
34
|
+
readonly targetCount?: number;
|
|
35
|
+
readonly autoScroll?: boolean;
|
|
36
|
+
readonly maxScrolls?: number;
|
|
37
|
+
};
|
|
38
|
+
export type OpenNativeChatOptions = ChatTarget & {
|
|
39
|
+
readonly preferUnread?: boolean;
|
|
40
|
+
readonly maxScrolls?: number;
|
|
41
|
+
readonly motionObserver?: NativeMouseMotionObserver;
|
|
42
|
+
};
|
|
43
|
+
export type NativeChatMessage = {
|
|
44
|
+
readonly index: number;
|
|
45
|
+
readonly sender: "candidate" | "recruiter" | "system";
|
|
46
|
+
readonly messageType: "text" | "system" | "resume" | "wechat-exchange";
|
|
47
|
+
readonly content: string;
|
|
48
|
+
readonly time: string;
|
|
49
|
+
};
|
|
50
|
+
export type NativeChatPanelInfo = {
|
|
51
|
+
readonly candidateName: string;
|
|
52
|
+
};
|
|
53
|
+
export type NativeSelectedChatTarget = {
|
|
54
|
+
readonly conversationId: string;
|
|
55
|
+
readonly candidateId: string;
|
|
56
|
+
readonly candidateName: string;
|
|
57
|
+
};
|
|
58
|
+
export type NativeCandidateInfo = {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly age: string;
|
|
61
|
+
readonly experience: string;
|
|
62
|
+
readonly education: string;
|
|
63
|
+
readonly communicationPosition: string;
|
|
64
|
+
readonly expectedJobText: string;
|
|
65
|
+
readonly expectedSalary: string;
|
|
66
|
+
readonly tags: readonly string[];
|
|
67
|
+
};
|
|
68
|
+
export type NativeCandidateChatDetails = {
|
|
69
|
+
readonly selectedTarget: NativeSelectedChatTarget | null;
|
|
70
|
+
readonly activePanel: NativeChatPanelInfo | null;
|
|
71
|
+
readonly candidateInfo: NativeCandidateInfo;
|
|
72
|
+
readonly messages: readonly NativeChatMessage[];
|
|
73
|
+
};
|
|
74
|
+
export type NativeRecommendCardInspection = {
|
|
75
|
+
readonly found: boolean;
|
|
76
|
+
readonly cardSelector: string;
|
|
77
|
+
readonly candidateId: string;
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly hasGreetButton: boolean;
|
|
80
|
+
readonly error?: string;
|
|
81
|
+
};
|
|
82
|
+
export type NativeRecommendGreetResult = NativeRecommendCardInspection & {
|
|
83
|
+
readonly clicked: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type NativeWechatExchangeResult = {
|
|
86
|
+
readonly success: boolean;
|
|
87
|
+
readonly exchanged: boolean;
|
|
88
|
+
readonly wechatNumber?: string;
|
|
89
|
+
readonly error?: string;
|
|
90
|
+
};
|
|
91
|
+
export type NativeSendReplyResult = {
|
|
92
|
+
readonly success: boolean;
|
|
93
|
+
readonly error?: string;
|
|
94
|
+
};
|
|
95
|
+
export type NativeDynamicListCollectionResult<TItem> = DynamicListScrollResult & {
|
|
96
|
+
readonly items: readonly TItem[];
|
|
97
|
+
readonly uniqueCount: number;
|
|
98
|
+
readonly duplicateCount: number;
|
|
99
|
+
readonly noNewRounds: number;
|
|
100
|
+
readonly stopReason: DynamicListCollectionStopReason;
|
|
101
|
+
};
|
|
102
|
+
type NativeClickOptions = {
|
|
103
|
+
readonly motionObserver?: NativeMouseMotionObserver;
|
|
104
|
+
readonly preClickDelayMs?: number;
|
|
105
|
+
readonly pressDurationMs?: number;
|
|
106
|
+
readonly settleMs?: number;
|
|
107
|
+
};
|
|
108
|
+
type NativePageResolutionOptions = {
|
|
109
|
+
readonly requireChatPage?: boolean;
|
|
110
|
+
};
|
|
111
|
+
export declare function openZhipinNativePagePort(options?: NativePageResolutionOptions, deps?: {
|
|
112
|
+
readonly ctxManager?: BrowserContextManager;
|
|
113
|
+
readonly runtime?: BrowserRuntime;
|
|
114
|
+
}): Promise<ZhipinNativePagePort>;
|
|
115
|
+
export declare class ZhipinNativePagePort {
|
|
116
|
+
private readonly target;
|
|
117
|
+
private readonly controller;
|
|
118
|
+
private readonly mouse;
|
|
119
|
+
private recommendFrameContextId;
|
|
120
|
+
private recommendFrameContextFrameId;
|
|
121
|
+
constructor(options: ZhipinNativePagePortOptions);
|
|
122
|
+
get targetId(): string;
|
|
123
|
+
inspectPage(): Promise<BrowserInspectablePage>;
|
|
124
|
+
url(): Promise<string>;
|
|
125
|
+
title(): Promise<string>;
|
|
126
|
+
waitForSelector(selector: string, timeoutMs?: number): Promise<boolean>;
|
|
127
|
+
evaluateJson<T = unknown>(expression: string): Promise<T>;
|
|
128
|
+
bringToFront(): Promise<void>;
|
|
129
|
+
isChatSurfaceOpen(): Promise<boolean>;
|
|
130
|
+
waitForChatSurface(timeoutMs?: number): Promise<boolean>;
|
|
131
|
+
isRecommendSurfaceOpen(): Promise<boolean>;
|
|
132
|
+
waitForRecommendSurface(timeoutMs?: number): Promise<boolean>;
|
|
133
|
+
private resolveRecommendFrameContextId;
|
|
134
|
+
private evaluateRecommendFrameJson;
|
|
135
|
+
private readRecommendFrameOffset;
|
|
136
|
+
private resolveRecommendClickTarget;
|
|
137
|
+
private dispatchNativeClick;
|
|
138
|
+
hasRecommendList(): Promise<boolean>;
|
|
139
|
+
waitForRecommendList(timeoutMs?: number): Promise<boolean>;
|
|
140
|
+
clickSidebarSection(section: "chat" | "recommend", options?: NativeClickOptions): Promise<boolean>;
|
|
141
|
+
scrollSurface(surface: ZhipinListSurface, options?: {
|
|
142
|
+
readonly direction?: ScrollDirection;
|
|
143
|
+
readonly steps?: number;
|
|
144
|
+
readonly distance?: number;
|
|
145
|
+
readonly settleMs?: number;
|
|
146
|
+
}): Promise<DynamicListScrollResult>;
|
|
147
|
+
readChatCandidates(options?: ReadNativeChatCandidatesOptions): Promise<ChatListItem[]>;
|
|
148
|
+
openChat(options: OpenNativeChatOptions): Promise<OpenChatResult>;
|
|
149
|
+
readSelectedChatTarget(): Promise<NativeSelectedChatTarget | null>;
|
|
150
|
+
readActiveChatPanel(): Promise<NativeChatPanelInfo | null>;
|
|
151
|
+
waitForChatMessages(timeoutMs?: number): Promise<boolean>;
|
|
152
|
+
readCandidateChatDetails(maxMessages: number): Promise<NativeCandidateChatDetails>;
|
|
153
|
+
inspectRecommendCard(index: number): Promise<NativeRecommendCardInspection>;
|
|
154
|
+
clickRecommendGreet(index: number, options?: NativeClickOptions): Promise<NativeRecommendGreetResult>;
|
|
155
|
+
exchangeWechat(options?: NativeClickOptions): Promise<NativeWechatExchangeResult>;
|
|
156
|
+
sendChatReply(message: string, options?: NativeClickOptions): Promise<NativeSendReplyResult>;
|
|
157
|
+
applyRecommendFilter(requested: ZhipinRecommendFilterRequest, options?: NativeClickOptions): Promise<ZhipinRecommendFilterApplyResult>;
|
|
158
|
+
readRecommendCandidates(options?: ReadNativeRecommendCandidatesOptions): Promise<NativeDynamicListCollectionResult<NativeRecommendCandidateCard>>;
|
|
159
|
+
readUsernameEvidence(): Promise<UsernameEvidence[]>;
|
|
160
|
+
close(): void;
|
|
161
|
+
private buildRecommendCardInspectionExpression;
|
|
162
|
+
private buildRecommendGreetClickExpression;
|
|
163
|
+
private waitForWechatExchangeDialog;
|
|
164
|
+
private readWechatNumber;
|
|
165
|
+
private selectAllFocusedText;
|
|
166
|
+
private waitForRecommendFilterSurface;
|
|
167
|
+
private isRecommendFilterPanelVisible;
|
|
168
|
+
private openRecommendFilterPanel;
|
|
169
|
+
private dismissPreviousFilterPrompt;
|
|
170
|
+
private clickRecommendFilterOption;
|
|
171
|
+
private detectVipModal;
|
|
172
|
+
private readNativeAgeState;
|
|
173
|
+
private resolveNativeAgeSlider;
|
|
174
|
+
private dispatchNativeDrag;
|
|
175
|
+
private dragAgeHandleToRatio;
|
|
176
|
+
private estimateAgeRatio;
|
|
177
|
+
private clampRatio;
|
|
178
|
+
private setAgeHandleToNumber;
|
|
179
|
+
private isDesiredAgeState;
|
|
180
|
+
private setRecommendAgeRange;
|
|
181
|
+
private readSelectedRecommendOptionText;
|
|
182
|
+
private readNativeAppliedFilterState;
|
|
183
|
+
private clickRecommendFilterSubmit;
|
|
184
|
+
private readRecommendFilterButtonText;
|
|
185
|
+
private readVisibleChatCandidates;
|
|
186
|
+
private waitForNativeChatReady;
|
|
187
|
+
private clickChatCandidate;
|
|
188
|
+
private readVisibleRecommendCandidates;
|
|
189
|
+
private inspectSurface;
|
|
190
|
+
private scrollSurfaceWithWheel;
|
|
191
|
+
private scrollSurfaceOnce;
|
|
192
|
+
private scrollChatList;
|
|
193
|
+
}
|
|
194
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const ZHIPIN_RESUME_RECOMMEND_FRAME_NAME: "recommendFrame";
|
|
2
|
+
export declare const ZHIPIN_RESUME_RECOMMEND_FRAME_URL_MARKER: "recommend";
|
|
3
|
+
export declare const ZHIPIN_RESUME_RECOMMEND_FRAME_SELECTOR: "#recommendFrame";
|
|
4
|
+
export declare const ZHIPIN_RESUME_CARD_PRIMARY_SELECTOR: ".candidate-card-wrap";
|
|
5
|
+
export declare const ZHIPIN_RESUME_CARD_FALLBACK_SELECTOR: "[data-geek], .geek-item";
|
|
6
|
+
export declare const ZHIPIN_RESUME_CARD_LIST_SELECTOR: ".candidate-card-wrap, [data-geek], .geek-item";
|
|
7
|
+
export declare const ZHIPIN_RESUME_CARD_CLICK_SURFACE_SELECTOR: "[data-geek], .card-inner, .geek-item";
|
|
8
|
+
export declare const ZHIPIN_RESUME_CANDIDATE_ID_SELECTOR: "[data-geek]";
|
|
9
|
+
export declare const ZHIPIN_RESUME_CANDIDATE_NAME_SELECTOR: ".name";
|
|
10
|
+
export declare const ZHIPIN_RESUME_IFRAME_CLOSE_SELECTORS: readonly [".recommendV2 .boss-popup__close", ".dialog-lib-resume .boss-popup__close", ".boss-dialog .boss-popup__close", ".boss-popup__close", ".close-btn", ".dialog-close"];
|
|
11
|
+
export declare const ZHIPIN_RESUME_PAGE_CLOSE_SELECTORS: readonly [".boss-popup__close", ".close-btn", ".dialog-close", ".modal-close"];
|
|
12
|
+
export declare const ZHIPIN_RESUME_DIALOG_SELECTOR: ".boss-popup__wrapper, .dialog-lib-resume, .boss-dialog";
|
|
13
|
+
export declare const ZHIPIN_RESUME_PAGE_DIALOG_SELECTOR: ".boss-popup__wrapper";
|
|
14
|
+
export declare const ZHIPIN_RESUME_IFRAME_SELECTOR: "iframe[src*=\"c-resume\"]";
|
|
15
|
+
export declare const ZHIPIN_RESUME_CANVAS_SELECTOR: "canvas#resume, div#resume canvas";
|
|
16
|
+
export declare const ZHIPIN_RESUME_RECOMMEND_TARGET_KINDS: readonly ["named-frame", "recommend-url-frame", "main-page"];
|
|
17
|
+
export type ZhipinResumeRecommendTargetKind = (typeof ZHIPIN_RESUME_RECOMMEND_TARGET_KINDS)[number];
|
|
18
|
+
export type ZhipinResumeCandidateIdentityInput = {
|
|
19
|
+
readonly ownDataGeek?: string | null;
|
|
20
|
+
readonly childDataGeek?: string | null;
|
|
21
|
+
readonly nameText?: string | null;
|
|
22
|
+
};
|
|
23
|
+
export type ZhipinResumeCandidateIdentity = {
|
|
24
|
+
readonly candidateId: string;
|
|
25
|
+
readonly name: string;
|
|
26
|
+
};
|
|
27
|
+
export type ZhipinResumeCanvasRect = {
|
|
28
|
+
readonly x: number;
|
|
29
|
+
readonly y: number;
|
|
30
|
+
readonly width: number;
|
|
31
|
+
readonly height: number;
|
|
32
|
+
};
|
|
33
|
+
export declare function resolveRecommendTargetKind(input: {
|
|
34
|
+
readonly hasNamedRecommendFrame: boolean;
|
|
35
|
+
readonly hasRecommendUrlFrame: boolean;
|
|
36
|
+
}): ZhipinResumeRecommendTargetKind;
|
|
37
|
+
export declare function resolveResumeCardSelector(primaryCardCount: number): string;
|
|
38
|
+
export declare function resolveResumeCandidateIdentity(input: ZhipinResumeCandidateIdentityInput): ZhipinResumeCandidateIdentity;
|
|
39
|
+
export declare function composeResumeCanvasArea(input: {
|
|
40
|
+
readonly recommendFrameRect?: Pick<ZhipinResumeCanvasRect, "x" | "y"> | null;
|
|
41
|
+
readonly resumeFrameRect?: Pick<ZhipinResumeCanvasRect, "x" | "y"> | null;
|
|
42
|
+
readonly canvasRect: ZhipinResumeCanvasRect;
|
|
43
|
+
}): ZhipinResumeCanvasRect;
|
|
@@ -90,7 +90,7 @@ export declare const ZHIPIN_SELECTORS: {
|
|
|
90
90
|
readonly nav: {
|
|
91
91
|
readonly sidebar: ".side-wrap.side-wrap-v2";
|
|
92
92
|
readonly chatLink: ".side-wrap.side-wrap-v2 a[href*=\"/web/chat/index\"]";
|
|
93
|
-
readonly recommendLink: ".side-wrap.side-wrap-v2 a[href*=\"/web/
|
|
93
|
+
readonly recommendLink: ".side-wrap.side-wrap-v2 a[href*=\"/web/chat/recommend\"]";
|
|
94
94
|
};
|
|
95
95
|
readonly recommend: {
|
|
96
96
|
readonly iframe: "#recommendFrame";
|
|
@@ -163,14 +163,14 @@ export declare function summarizeCookie(cookie: {
|
|
|
163
163
|
}): CookieSummary;
|
|
164
164
|
export declare function diffStorageCounters(beforeEntries: ReadonlyArray<StorageEntrySummary>, afterEntries: ReadonlyArray<StorageEntrySummary>): StorageCounterDiff[];
|
|
165
165
|
export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolDefinition<{
|
|
166
|
-
phase?: "native" | "native-watch" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary" | undefined;
|
|
166
|
+
phase?: "native" | "native-watch" | "native-ws-connect" | "native-page-bring-front" | "native-evaluate-url-no-runtime-enable" | "native-dom-read-no-runtime-enable" | "native-input-move-no-runtime-enable" | "native-runtime-enable" | "native-evaluate-url" | "native-dom-read" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary" | undefined;
|
|
167
167
|
targetPageId?: string | undefined;
|
|
168
168
|
watchMs?: number | undefined;
|
|
169
169
|
networkEventLimit?: number | undefined;
|
|
170
170
|
}, {
|
|
171
171
|
mode: string;
|
|
172
172
|
success: boolean;
|
|
173
|
-
requestedPhase: "native" | "native-watch" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary";
|
|
173
|
+
requestedPhase: "native" | "native-watch" | "native-ws-connect" | "native-page-bring-front" | "native-evaluate-url-no-runtime-enable" | "native-dom-read-no-runtime-enable" | "native-input-move-no-runtime-enable" | "native-runtime-enable" | "native-evaluate-url" | "native-dom-read" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary";
|
|
174
174
|
nativePages: {
|
|
175
175
|
url: string;
|
|
176
176
|
title: string;
|
|
@@ -182,7 +182,7 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
182
182
|
browserAttached: boolean;
|
|
183
183
|
pageAttached: boolean;
|
|
184
184
|
nativeTimeline: {
|
|
185
|
-
phase: "native" | "native-watch" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary" | "browser-attach-watch";
|
|
185
|
+
phase: "native" | "native-watch" | "native-ws-connect" | "native-page-bring-front" | "native-evaluate-url-no-runtime-enable" | "native-dom-read-no-runtime-enable" | "native-input-move-no-runtime-enable" | "native-runtime-enable" | "native-evaluate-url" | "native-dom-read" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary" | "native-ws-connect-watch" | "native-page-bring-front-watch" | "native-evaluate-url-no-runtime-enable-watch" | "native-dom-read-no-runtime-enable-watch" | "native-input-move-no-runtime-enable-watch" | "native-runtime-enable-watch" | "native-evaluate-url-watch" | "native-dom-read-watch" | "browser-attach-watch";
|
|
186
186
|
capturedAt: string;
|
|
187
187
|
targetFound: boolean;
|
|
188
188
|
urlChangedFromPrevious: boolean;
|
|
@@ -203,10 +203,16 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
203
203
|
phases: {
|
|
204
204
|
success: boolean;
|
|
205
205
|
durationMs: number;
|
|
206
|
-
phase: "native" | "native-watch" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary";
|
|
206
|
+
phase: "native" | "native-watch" | "native-ws-connect" | "native-page-bring-front" | "native-evaluate-url-no-runtime-enable" | "native-dom-read-no-runtime-enable" | "native-input-move-no-runtime-enable" | "native-runtime-enable" | "native-evaluate-url" | "native-dom-read" | "browser-attach" | "page-attach" | "network-watch" | "page-evaluate" | "detector-fingerprint" | "storage-summary";
|
|
207
207
|
error?: string | undefined;
|
|
208
208
|
}[];
|
|
209
209
|
warnings: string[];
|
|
210
|
+
evaluate?: {
|
|
211
|
+
url: string;
|
|
212
|
+
title: string;
|
|
213
|
+
visibilityState: string;
|
|
214
|
+
hasFocus: boolean;
|
|
215
|
+
} | undefined;
|
|
210
216
|
targetPage?: {
|
|
211
217
|
url: string;
|
|
212
218
|
title: string;
|
|
@@ -217,9 +223,9 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
217
223
|
} | undefined;
|
|
218
224
|
networkEvents?: {
|
|
219
225
|
url: string;
|
|
226
|
+
reason: "apm-action-log" | "device-action-report" | "boss-risk-report" | "zhipin-security";
|
|
220
227
|
capturedAt: string;
|
|
221
228
|
kind: "request" | "response";
|
|
222
|
-
reason: "apm-action-log" | "device-action-report" | "boss-risk-report" | "zhipin-security";
|
|
223
229
|
status?: number | undefined;
|
|
224
230
|
method?: string | undefined;
|
|
225
231
|
resourceType?: string | undefined;
|
|
@@ -228,11 +234,30 @@ export declare const zhipinDiagnoseBrowserState: import("@roll-agent/sdk").ToolD
|
|
|
228
234
|
url: string;
|
|
229
235
|
capturedAt: string;
|
|
230
236
|
}[] | undefined;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
nativeCdp?: {
|
|
238
|
+
targetId: string;
|
|
239
|
+
connected: boolean;
|
|
240
|
+
websocketUrlAvailable: boolean;
|
|
241
|
+
input?: {
|
|
242
|
+
type: "mouseMoved";
|
|
243
|
+
x: number;
|
|
244
|
+
y: number;
|
|
245
|
+
} | undefined;
|
|
246
|
+
pageBroughtToFront?: boolean | undefined;
|
|
247
|
+
runtimeEnabled?: boolean | undefined;
|
|
248
|
+
evaluate?: {
|
|
249
|
+
url: string;
|
|
250
|
+
title: string;
|
|
251
|
+
visibilityState: string;
|
|
252
|
+
hasFocus: boolean;
|
|
253
|
+
} | undefined;
|
|
254
|
+
dom?: {
|
|
255
|
+
rootNodeId: number;
|
|
256
|
+
rootNodeName: string;
|
|
257
|
+
childNodeCount?: number | undefined;
|
|
258
|
+
bodyTextLength?: number | undefined;
|
|
259
|
+
elementCount?: number | undefined;
|
|
260
|
+
} | undefined;
|
|
236
261
|
} | undefined;
|
|
237
262
|
detectorFingerprint?: {
|
|
238
263
|
userAgentContainsHeadless: boolean;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
4
|
+
type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "previewMouseMotion" | "succeed" | "fail">;
|
|
5
|
+
type ZhipinExchangeWechatDeps = {
|
|
6
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
7
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
|
|
8
|
+
};
|
|
9
|
+
export declare function setZhipinExchangeWechatDepsForTests(override: Partial<ZhipinExchangeWechatDeps> | undefined): void;
|
|
1
10
|
export declare const zhipinExchangeWechat: import("@roll-agent/sdk").ToolDefinition<{
|
|
11
|
+
index?: number | undefined;
|
|
2
12
|
conversationId?: string | undefined;
|
|
3
13
|
candidateName?: string | undefined;
|
|
4
|
-
index?: number | undefined;
|
|
5
14
|
}, {
|
|
6
15
|
success: boolean;
|
|
7
16
|
exchanged: boolean;
|
|
8
|
-
error
|
|
9
|
-
|
|
10
|
-
wechatNumber?: string;
|
|
11
|
-
success: boolean;
|
|
12
|
-
exchanged: boolean;
|
|
13
|
-
error?: never;
|
|
17
|
+
error?: string | undefined;
|
|
18
|
+
wechatNumber?: string | undefined;
|
|
14
19
|
}>;
|
|
20
|
+
export {};
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { moveVisualCursorToLocator, showVisualClickOnLocator } from "../visual-cursor.ts";
|
|
6
|
-
type VisualActivitySessionLike = Pick<VisualActivitySession, "begin" | "highlightSelector" | "retarget" | "succeed" | "fail">;
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
4
|
+
type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "highlightSelector" | "previewMouseMotion" | "succeed" | "fail">;
|
|
7
5
|
type ZhipinFilterRecommendCandidatesDeps = {
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly waitForRecommendFilterSurface: typeof waitForRecommendFilterSurface;
|
|
11
|
-
readonly applyRecommendFilter: typeof applyRecommendFilter;
|
|
12
|
-
readonly moveVisualCursorToLocator: typeof moveVisualCursorToLocator;
|
|
13
|
-
readonly showVisualClickOnLocator: typeof showVisualClickOnLocator;
|
|
14
|
-
readonly createVisualActivitySession: (target: RecommendTarget) => VisualActivitySessionLike;
|
|
6
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
7
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
|
|
15
8
|
};
|
|
16
9
|
export declare function setZhipinFilterRecommendCandidatesDepsForTests(override: Partial<ZhipinFilterRecommendCandidatesDeps> | undefined): void;
|
|
17
10
|
export declare const zhipinFilterRecommendCandidates: import("@roll-agent/sdk").ToolDefinition<{
|
|
@@ -1,28 +1,37 @@
|
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
4
|
+
type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail">;
|
|
5
|
+
type ZhipinGetCandidateInfoDeps = {
|
|
6
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
7
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
|
|
8
|
+
};
|
|
9
|
+
export declare function setZhipinGetCandidateInfoDepsForTests(override: Partial<ZhipinGetCandidateInfoDeps> | undefined): void;
|
|
1
10
|
export declare const zhipinGetCandidateInfo: import("@roll-agent/sdk").ToolDefinition<{
|
|
11
|
+
index?: number | undefined;
|
|
2
12
|
conversationId?: string | undefined;
|
|
3
13
|
candidateName?: string | undefined;
|
|
4
|
-
index?: number | undefined;
|
|
5
14
|
maxMessages?: number | undefined;
|
|
6
15
|
}, {
|
|
7
16
|
success: boolean;
|
|
8
17
|
conversationId: string;
|
|
9
18
|
candidateId: string;
|
|
10
|
-
stats: {
|
|
11
|
-
totalMessages: number;
|
|
12
|
-
candidateMessages: number;
|
|
13
|
-
recruiterMessages: number;
|
|
14
|
-
systemMessages: number;
|
|
15
|
-
};
|
|
16
19
|
candidateInfo: {
|
|
17
20
|
name: string;
|
|
18
|
-
expectedLocation: string;
|
|
19
|
-
expectedPosition: string;
|
|
20
21
|
age: string;
|
|
21
22
|
experience: string;
|
|
22
23
|
education: string;
|
|
23
|
-
|
|
24
|
+
expectedLocation: string;
|
|
25
|
+
expectedPosition: string;
|
|
24
26
|
expectedSalary: string;
|
|
25
27
|
tags: string[];
|
|
28
|
+
communicationPosition: string;
|
|
29
|
+
};
|
|
30
|
+
stats: {
|
|
31
|
+
totalMessages: number;
|
|
32
|
+
candidateMessages: number;
|
|
33
|
+
recruiterMessages: number;
|
|
34
|
+
systemMessages: number;
|
|
26
35
|
};
|
|
27
36
|
chatMessages: {
|
|
28
37
|
time: string;
|
|
@@ -35,3 +44,4 @@ export declare const zhipinGetCandidateInfo: import("@roll-agent/sdk").ToolDefin
|
|
|
35
44
|
error?: string | undefined;
|
|
36
45
|
preferredBrand?: string | undefined;
|
|
37
46
|
}>;
|
|
47
|
+
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
type VisualActivitySessionLike = Pick<VisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail" | "retarget">;
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
4
|
+
type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail">;
|
|
6
5
|
type ZhipinGetCandidateListDeps = {
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly waitForRecommendList: typeof waitForRecommendList;
|
|
10
|
-
readonly createVisualActivitySession: (target: RecommendTarget) => VisualActivitySessionLike;
|
|
6
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
7
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
|
|
11
8
|
};
|
|
12
9
|
export declare function setZhipinGetCandidateListDepsForTests(override: Partial<ZhipinGetCandidateListDeps> | undefined): void;
|
|
13
10
|
export declare const zhipinGetCandidateList: import("@roll-agent/sdk").ToolDefinition<{
|
|
@@ -18,18 +15,18 @@ export declare const zhipinGetCandidateList: import("@roll-agent/sdk").ToolDefin
|
|
|
18
15
|
success: boolean;
|
|
19
16
|
candidates: {
|
|
20
17
|
name: string;
|
|
21
|
-
candidateId: string;
|
|
22
18
|
index: number;
|
|
23
|
-
|
|
24
|
-
expectedPosition: string;
|
|
19
|
+
candidateId: string;
|
|
25
20
|
age: string;
|
|
26
21
|
experience: string;
|
|
27
22
|
education: string;
|
|
28
|
-
expectedSalary: string;
|
|
29
|
-
tags: string[];
|
|
30
23
|
workStatus: string;
|
|
31
24
|
company: string;
|
|
32
25
|
currentPosition: string;
|
|
26
|
+
expectedLocation: string;
|
|
27
|
+
expectedPosition: string;
|
|
28
|
+
expectedSalary: string;
|
|
29
|
+
tags: string[];
|
|
33
30
|
buttonText: string;
|
|
34
31
|
}[];
|
|
35
32
|
total: number;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { VisualActivitySession } from "../visual-activity-session.ts";
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
4
|
+
import { pickBestUsername } from "../pages/zhipin/username.ts";
|
|
6
5
|
type ZhipinGetUsernameDeps = {
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly createVisualActivitySession: (page: Page) => VisualActivitySession;
|
|
6
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
7
|
+
readonly pickBestUsername: typeof pickBestUsername;
|
|
8
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySession;
|
|
11
9
|
};
|
|
12
10
|
export declare function setZhipinGetUsernameDepsForTests(override: Partial<ZhipinGetUsernameDeps> | undefined): void;
|
|
13
11
|
export declare const zhipinGetUsername: import("@roll-agent/sdk").ToolDefinition<{}, {
|
|
@@ -2,10 +2,10 @@ export declare const zhipinLocateResumeCanvas: import("@roll-agent/sdk").ToolDef
|
|
|
2
2
|
success: boolean;
|
|
3
3
|
error?: string | undefined;
|
|
4
4
|
screenshotArea?: {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
5
|
x: number;
|
|
8
6
|
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
9
|
} | undefined;
|
|
10
10
|
canvasInfo?: {
|
|
11
11
|
width: number;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { toAttachedPageInfo } from "../page-info.ts";
|
|
1
|
+
import { NativeVisualActivitySession } from "../native-visual-activity-session.ts";
|
|
2
|
+
import { openZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
3
|
+
import type { ZhipinNativePagePort } from "../pages/zhipin/native-page.ts";
|
|
5
4
|
import { getContextManager } from "../runtime-holder.ts";
|
|
6
|
-
|
|
7
|
-
import { moveVisualCursorToLocator, showVisualClickOnLocator } from "../visual-cursor.ts";
|
|
8
|
-
type VisualActivitySessionLike = Pick<VisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail">;
|
|
5
|
+
type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "highlightSelector" | "previewMouseMotion" | "succeed" | "fail">;
|
|
9
6
|
type ZhipinOpenChatPageDeps = {
|
|
10
7
|
readonly getContextManager: typeof getContextManager;
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly waitForZhipinChatSurface: typeof waitForZhipinChatSurface;
|
|
14
|
-
readonly moveVisualCursorToLocator: typeof moveVisualCursorToLocator;
|
|
15
|
-
readonly showVisualClickOnLocator: typeof showVisualClickOnLocator;
|
|
16
|
-
readonly randomDelay: typeof randomDelay;
|
|
17
|
-
readonly toAttachedPageInfo: typeof toAttachedPageInfo;
|
|
18
|
-
readonly createVisualActivitySession: (page: Page) => VisualActivitySessionLike;
|
|
8
|
+
readonly openNativePagePort: typeof openZhipinNativePagePort;
|
|
9
|
+
readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
|
|
19
10
|
};
|
|
20
11
|
export declare function setZhipinOpenChatPageDepsForTests(override: Partial<ZhipinOpenChatPageDeps> | undefined): void;
|
|
21
12
|
export declare const zhipinOpenChatPage: import("@roll-agent/sdk").ToolDefinition<{}, {
|