@roll-agent/browser-use-agent 0.7.5 → 0.7.6

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.
@@ -0,0 +1,24 @@
1
+ import type { VisualActivityTone } from "./visual-activity.ts";
2
+ type NativeVisualTarget = {
3
+ evaluateJson<T = unknown>(expression: string): Promise<T>;
4
+ };
5
+ type NativeVisualHighlightOptions = {
6
+ readonly label?: string;
7
+ readonly padding?: number;
8
+ readonly tone?: VisualActivityTone;
9
+ };
10
+ type NativeVisualPointOptions = {
11
+ readonly durationMs?: number;
12
+ };
13
+ export declare class NativeVisualActivitySession {
14
+ private readonly target;
15
+ constructor(target: NativeVisualTarget);
16
+ begin(label: string, tone?: VisualActivityTone): Promise<boolean>;
17
+ highlightSelector(selector: string, options?: NativeVisualHighlightOptions): Promise<boolean>;
18
+ highlightPoint(x: number, y: number, options?: NativeVisualPointOptions): Promise<boolean>;
19
+ succeed(label: string, lingerMs?: number): Promise<boolean>;
20
+ fail(label: string, lingerMs?: number): Promise<boolean>;
21
+ clear(): Promise<boolean>;
22
+ private render;
23
+ }
24
+ export {};
@@ -0,0 +1,196 @@
1
+ import type { BrowserContextManager, BrowserInspectablePage, BrowserRuntime, NativeCdpController } from "@roll-agent/browser";
2
+ import type { DynamicListCollectionStopReason, DynamicListScrollResult, ScrollDirection } from "../shared/dynamic-list-scroller.ts";
3
+ import { type ChatListItem, type ChatTarget, type OpenChatResult } from "./chat-navigation.ts";
4
+ import { type ZhipinListSurface } from "./list-surfaces.ts";
5
+ import type { ZhipinRecommendFilterApplyResult, ZhipinRecommendFilterRequest } from "./recommend-filter.ts";
6
+ import type { UsernameEvidence } from "./username.ts";
7
+ export type ZhipinNativePagePortOptions = {
8
+ readonly target: BrowserInspectablePage;
9
+ readonly controller: NativeCdpController;
10
+ };
11
+ export type ReadNativeChatCandidatesOptions = {
12
+ readonly targetCount?: number;
13
+ readonly autoScroll?: boolean;
14
+ readonly maxScrolls?: number;
15
+ };
16
+ export type NativeRecommendCandidateCard = {
17
+ readonly index: number;
18
+ readonly candidateId: string;
19
+ readonly name: string;
20
+ readonly age: string;
21
+ readonly experience: string;
22
+ readonly education: string;
23
+ readonly workStatus: string;
24
+ readonly company: string;
25
+ readonly currentPosition: string;
26
+ readonly expectedLocation: string;
27
+ readonly expectedPosition: string;
28
+ readonly expectedSalary: string;
29
+ readonly tags: string[];
30
+ readonly buttonText: string;
31
+ };
32
+ export type ReadNativeRecommendCandidatesOptions = {
33
+ readonly targetCount?: number;
34
+ readonly autoScroll?: boolean;
35
+ readonly maxScrolls?: number;
36
+ };
37
+ export type OpenNativeChatOptions = ChatTarget & {
38
+ readonly preferUnread?: boolean;
39
+ readonly maxScrolls?: number;
40
+ };
41
+ export type NativeChatMessage = {
42
+ readonly index: number;
43
+ readonly sender: "candidate" | "recruiter" | "system";
44
+ readonly messageType: "text" | "system" | "resume" | "wechat-exchange";
45
+ readonly content: string;
46
+ readonly time: string;
47
+ };
48
+ export type NativeChatPanelInfo = {
49
+ readonly candidateName: string;
50
+ };
51
+ export type NativeSelectedChatTarget = {
52
+ readonly conversationId: string;
53
+ readonly candidateId: string;
54
+ readonly candidateName: string;
55
+ };
56
+ export type NativeCandidateInfo = {
57
+ readonly name: string;
58
+ readonly age: string;
59
+ readonly experience: string;
60
+ readonly education: string;
61
+ readonly communicationPosition: string;
62
+ readonly expectedJobText: string;
63
+ readonly expectedSalary: string;
64
+ readonly tags: readonly string[];
65
+ };
66
+ export type NativeCandidateChatDetails = {
67
+ readonly selectedTarget: NativeSelectedChatTarget | null;
68
+ readonly activePanel: NativeChatPanelInfo | null;
69
+ readonly candidateInfo: NativeCandidateInfo;
70
+ readonly messages: readonly NativeChatMessage[];
71
+ };
72
+ export type NativeRecommendCardInspection = {
73
+ readonly found: boolean;
74
+ readonly cardSelector: string;
75
+ readonly candidateId: string;
76
+ readonly name: string;
77
+ readonly hasGreetButton: boolean;
78
+ readonly error?: string;
79
+ };
80
+ export type NativeRecommendGreetResult = NativeRecommendCardInspection & {
81
+ readonly clicked: boolean;
82
+ };
83
+ export type NativeWechatExchangeResult = {
84
+ readonly success: boolean;
85
+ readonly exchanged: boolean;
86
+ readonly wechatNumber?: string;
87
+ readonly error?: string;
88
+ };
89
+ export type NativeSendReplyResult = {
90
+ readonly success: boolean;
91
+ readonly error?: string;
92
+ };
93
+ export type NativeDynamicListCollectionResult<TItem> = DynamicListScrollResult & {
94
+ readonly items: readonly TItem[];
95
+ readonly uniqueCount: number;
96
+ readonly duplicateCount: number;
97
+ readonly noNewRounds: number;
98
+ readonly stopReason: DynamicListCollectionStopReason;
99
+ };
100
+ type NativeClickTarget = {
101
+ readonly found: boolean;
102
+ readonly x: number;
103
+ readonly y: number;
104
+ };
105
+ type NativeClickOptions = {
106
+ readonly onTargetResolved?: (target: NativeClickTarget) => Promise<void>;
107
+ readonly preClickDelayMs?: number;
108
+ readonly pressDurationMs?: number;
109
+ readonly settleMs?: number;
110
+ };
111
+ type NativePageResolutionOptions = {
112
+ readonly requireChatPage?: boolean;
113
+ };
114
+ export declare function openZhipinNativePagePort(options?: NativePageResolutionOptions, deps?: {
115
+ readonly ctxManager?: BrowserContextManager;
116
+ readonly runtime?: BrowserRuntime;
117
+ }): Promise<ZhipinNativePagePort>;
118
+ export declare class ZhipinNativePagePort {
119
+ private readonly target;
120
+ private readonly controller;
121
+ private recommendFrameContextId;
122
+ private recommendFrameContextFrameId;
123
+ constructor(options: ZhipinNativePagePortOptions);
124
+ get targetId(): string;
125
+ inspectPage(): Promise<BrowserInspectablePage>;
126
+ url(): Promise<string>;
127
+ title(): Promise<string>;
128
+ waitForSelector(selector: string, timeoutMs?: number): Promise<boolean>;
129
+ evaluateJson<T = unknown>(expression: string): Promise<T>;
130
+ bringToFront(): Promise<void>;
131
+ isChatSurfaceOpen(): Promise<boolean>;
132
+ waitForChatSurface(timeoutMs?: number): Promise<boolean>;
133
+ isRecommendSurfaceOpen(): Promise<boolean>;
134
+ waitForRecommendSurface(timeoutMs?: number): Promise<boolean>;
135
+ private resolveRecommendFrameContextId;
136
+ private evaluateRecommendFrameJson;
137
+ private readRecommendFrameOffset;
138
+ private resolveRecommendClickTarget;
139
+ private dispatchNativeClick;
140
+ hasRecommendList(): Promise<boolean>;
141
+ waitForRecommendList(timeoutMs?: number): Promise<boolean>;
142
+ clickSidebarSection(section: "chat" | "recommend", options?: NativeClickOptions): Promise<boolean>;
143
+ scrollSurface(surface: ZhipinListSurface, options?: {
144
+ readonly direction?: ScrollDirection;
145
+ readonly steps?: number;
146
+ readonly distance?: number;
147
+ readonly settleMs?: number;
148
+ }): Promise<DynamicListScrollResult>;
149
+ readChatCandidates(options?: ReadNativeChatCandidatesOptions): Promise<ChatListItem[]>;
150
+ openChat(options: OpenNativeChatOptions): Promise<OpenChatResult>;
151
+ readSelectedChatTarget(): Promise<NativeSelectedChatTarget | null>;
152
+ readActiveChatPanel(): Promise<NativeChatPanelInfo | null>;
153
+ waitForChatMessages(timeoutMs?: number): Promise<boolean>;
154
+ readCandidateChatDetails(maxMessages: number): Promise<NativeCandidateChatDetails>;
155
+ inspectRecommendCard(index: number): Promise<NativeRecommendCardInspection>;
156
+ clickRecommendGreet(index: number, options?: NativeClickOptions): Promise<NativeRecommendGreetResult>;
157
+ exchangeWechat(options?: NativeClickOptions): Promise<NativeWechatExchangeResult>;
158
+ sendChatReply(message: string, options?: NativeClickOptions): Promise<NativeSendReplyResult>;
159
+ applyRecommendFilter(requested: ZhipinRecommendFilterRequest, options?: NativeClickOptions): Promise<ZhipinRecommendFilterApplyResult>;
160
+ readRecommendCandidates(options?: ReadNativeRecommendCandidatesOptions): Promise<NativeDynamicListCollectionResult<NativeRecommendCandidateCard>>;
161
+ readUsernameEvidence(): Promise<UsernameEvidence[]>;
162
+ close(): void;
163
+ private buildRecommendCardInspectionExpression;
164
+ private buildRecommendGreetClickExpression;
165
+ private waitForWechatExchangeDialog;
166
+ private readWechatNumber;
167
+ private selectAllFocusedText;
168
+ private waitForRecommendFilterSurface;
169
+ private isRecommendFilterPanelVisible;
170
+ private openRecommendFilterPanel;
171
+ private dismissPreviousFilterPrompt;
172
+ private clickRecommendFilterOption;
173
+ private detectVipModal;
174
+ private readNativeAgeState;
175
+ private resolveNativeAgeSlider;
176
+ private dispatchNativeDrag;
177
+ private dragAgeHandleToRatio;
178
+ private estimateAgeRatio;
179
+ private clampRatio;
180
+ private setAgeHandleToNumber;
181
+ private isDesiredAgeState;
182
+ private setRecommendAgeRange;
183
+ private readSelectedRecommendOptionText;
184
+ private readNativeAppliedFilterState;
185
+ private clickRecommendFilterSubmit;
186
+ private readRecommendFilterButtonText;
187
+ private readVisibleChatCandidates;
188
+ private waitForNativeChatReady;
189
+ private clickChatCandidate;
190
+ private readVisibleRecommendCandidates;
191
+ private inspectSurface;
192
+ private scrollSurfaceWithWheel;
193
+ private scrollSurfaceOnce;
194
+ private scrollChatList;
195
+ }
196
+ 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/geek/recommend\"]";
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
- evaluate?: {
232
- url: string;
233
- title: string;
234
- visibilityState: string;
235
- hasFocus: boolean;
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" | "highlightPoint" | "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: string | undefined;
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 { getContextManager } from "../runtime-holder.ts";
2
- import { applyRecommendFilter, waitForRecommendFilterSurface, type RecommendTarget } from "../pages/zhipin/recommend-filter.ts";
3
- import { getRecommendTarget } from "../pages/zhipin/recommend-list.ts";
4
- import { VisualActivitySession } from "../visual-activity-session.ts";
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" | "highlightPoint" | "succeed" | "fail">;
7
5
  type ZhipinFilterRecommendCandidatesDeps = {
8
- readonly getContextManager: typeof getContextManager;
9
- readonly getRecommendTarget: typeof getRecommendTarget;
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
- communicationPosition: string;
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 { getRecommendTarget, waitForRecommendList } from "../pages/zhipin/recommend-list.ts";
2
- import { getContextManager } from "../runtime-holder.ts";
3
- import { VisualActivitySession } from "../visual-activity-session.ts";
4
- type RecommendTarget = ReturnType<typeof getRecommendTarget>;
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 getContextManager: typeof getContextManager;
8
- readonly getRecommendTarget: typeof getRecommendTarget;
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
- expectedLocation: string;
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 type { Page } from "@roll-agent/browser";
2
- import { getCurrentZhipinRecruiterIdentity } from "../pages/zhipin/recruiter-identity.ts";
3
- import { findHeaderScope } from "../pages/zhipin/username.ts";
4
- import { getContextManager } from "../runtime-holder.ts";
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 getContextManager: typeof getContextManager;
8
- readonly findHeaderScope: typeof findHeaderScope;
9
- readonly getCurrentZhipinRecruiterIdentity: typeof getCurrentZhipinRecruiterIdentity;
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,14 @@
1
- import type { Page } from "@roll-agent/browser";
2
- import { randomDelay } from "../pages/zhipin/anti-detection.ts";
3
- import { findZhipinSidebarSectionLink, isZhipinChatSurfaceOpen, waitForZhipinChatSurface } from "../pages/zhipin/sidebar-navigation.ts";
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
- import { VisualActivitySession } from "../visual-activity-session.ts";
7
- import { moveVisualCursorToLocator, showVisualClickOnLocator } from "../visual-cursor.ts";
8
- type VisualActivitySessionLike = Pick<VisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail">;
5
+ type NativeVisualActivitySessionLike = Pick<NativeVisualActivitySession, "begin" | "highlightSelector" | "succeed" | "fail"> & {
6
+ readonly highlightPoint?: NativeVisualActivitySession["highlightPoint"];
7
+ };
9
8
  type ZhipinOpenChatPageDeps = {
10
9
  readonly getContextManager: typeof getContextManager;
11
- readonly findZhipinSidebarSectionLink: typeof findZhipinSidebarSectionLink;
12
- readonly isZhipinChatSurfaceOpen: typeof isZhipinChatSurfaceOpen;
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;
10
+ readonly openNativePagePort: typeof openZhipinNativePagePort;
11
+ readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
19
12
  };
20
13
  export declare function setZhipinOpenChatPageDepsForTests(override: Partial<ZhipinOpenChatPageDeps> | undefined): void;
21
14
  export declare const zhipinOpenChatPage: import("@roll-agent/sdk").ToolDefinition<{}, {
@@ -1,17 +1,27 @@
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 ZhipinOpenChatDeps = {
6
+ readonly openNativePagePort: typeof openZhipinNativePagePort;
7
+ readonly createNativeVisualActivitySession: (page: ZhipinNativePagePort) => NativeVisualActivitySessionLike;
8
+ };
9
+ export declare function setZhipinOpenChatDepsForTests(override: Partial<ZhipinOpenChatDeps> | undefined): void;
1
10
  export declare const zhipinOpenChat: 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
  preferUnread?: boolean | undefined;
6
15
  }, {
16
+ index: number;
7
17
  success: boolean;
8
18
  conversationId: string;
9
19
  candidateId: string;
10
20
  candidateName: string;
11
- index: number;
12
21
  hasUnread: boolean;
13
22
  unreadCount: number;
14
23
  lastMessageTime: string;
15
24
  messagePreview: string;
16
25
  error?: string | undefined;
17
26
  }>;
27
+ export {};