MCPcopy Create free account

hub / github.com/anxuanzi/bua / functions

Functions249 in github.com/anxuanzi/bua

↓ 1 callersMethodGetBoundingBox
()
screenshot/screenshot.go:34
↓ 1 callersMethodGetBoundingBox
()
dom/element.go:199
↓ 1 callersMethodGetHeight
()
screenshot/screenshot.go:24
↓ 1 callersMethodGetHistory
GetHistory returns the agent's execution history.
agent/agent.go:467
↓ 1 callersMethodGetIndex
()
screenshot/screenshot.go:30
↓ 1 callersMethodGetIndex
()
dom/element.go:195
↓ 1 callersMethodGetIsEmpty
()
screenshot/screenshot.go:25
↓ 1 callersMethodGetIsVisible
()
screenshot/screenshot.go:35
↓ 1 callersMethodGetIsVisible
()
dom/element.go:200
↓ 1 callersMethodGetRole
()
screenshot/screenshot.go:32
↓ 1 callersMethodGetRole
()
dom/element.go:197
↓ 1 callersMethodGetSystemPrompt
GetSystemPrompt returns the system prompt.
agent/message.go:49
↓ 1 callersMethodGetTagName
()
screenshot/screenshot.go:31
↓ 1 callersMethodGetTagName
()
dom/element.go:196
↓ 1 callersMethodGetText
()
screenshot/screenshot.go:33
↓ 1 callersMethodGetText
()
dom/element.go:198
↓ 1 callersMethodGetURL
GetURL returns the current page URL.
bua.go:185
↓ 1 callersMethodGoBack
GoBack navigates back in history.
browser/page.go:48
↓ 1 callersMethodGoForward
GoForward navigates forward in history.
browser/page.go:67
↓ 1 callersMethodHover
Hover moves the mouse to hover over an element.
browser/page.go:512
↓ 1 callersMethodIsEmpty
IsEmpty returns true if the bounding box has no area.
dom/element.go:24
↓ 1 callersFunctionNewAgentHistory
NewAgentHistory creates a new agent history manager.
agent/history.go:33
↓ 1 callersFunctionNewBrowserAgent
NewBrowserAgent creates a new browser agent using ADK.
agent/agent.go:82
↓ 1 callersFunctionNewBrowserToolkit
NewBrowserToolkit creates a new browser toolkit.
agent/adk_tools.go:20
↓ 1 callersFunctionNewElementMap
NewElementMap creates a new empty element map.
dom/element.go:159
↓ 1 callersFunctionNewMessageManager
NewMessageManager creates a new message manager.
agent/message.go:28
↓ 1 callersFunctionNewSensitiveDataFilter
NewSensitiveDataFilter creates a new sensitive data filter.
agent/message.go:186
↓ 1 callersMethodReload
Reload reloads the current page.
browser/page.go:86
↓ 1 callersMethodScreenshotAfterActionWithAnnotations
ScreenshotAfterActionWithAnnotations captures an annotated screenshot after an action.
browser/page.go:728
↓ 1 callersMethodScroll
Scroll scrolls the page or an element.
browser/page.go:391
↓ 1 callersMethodScrollToElement
ScrollToElement scrolls an element into view.
browser/page.go:451
↓ 1 callersMethodSendKeys
SendKeys sends keyboard keys to the page.
browser/page.go:351
↓ 1 callersMethodSetTask
SetTask sets the task description for context.
agent/history.go:44
↓ 1 callersMethodSwitchTab
SwitchTab switches to a different tab by ID.
bua.go:227
↓ 1 callersFunctionSystemPrompt
SystemPrompt returns the system prompt for the browser agent. Ported and adapted from browser-use Python project.
agent/prompts.go:10
↓ 1 callersMethodToDescription
ToDescription generates a text description of the history for the LLM. It implements truncation: keeps first item + most recent items within maxItems.
agent/history.go:98
↓ 1 callersMethodToTokenString
ToTokenString serializes the element map for LLM consumption. Uses a compact format to minimize token usage.
dom/serialize.go:36
↓ 1 callersMethodTypeText
TypeText types text into an element by index.
browser/page.go:220
↓ 1 callersMethodUpdateLastItem
UpdateLastItem updates the result and success status of the last history item.
agent/history.go:72
↓ 1 callersMethodapplyDefaults
applyDefaults fills in default values for the config.
config.go:158
↓ 1 callersMethodcaptureScreenshotAfterAction
captureScreenshotAfterAction captures a screenshot after an action has completed. Uses enhanced waiting for page stability after the action.
agent/agent.go:540
↓ 1 callersFunctiondrawBoundingBoxFromInfo
drawBoundingBoxFromInfo draws a rectangle border around the bounding box using the interface.
screenshot/annotate.go:133
↓ 1 callersFunctiondrawDigit
drawDigit draws a single digit using a simple 5x7 pixel pattern.
screenshot/annotate.go:226
↓ 1 callersFunctiondrawIndexLabelFromInfo
drawIndexLabelFromInfo draws the element index at the top center of the bounding box using the interface. Uses a simple built-in digit renderer for mi
screenshot/annotate.go:177
↓ 1 callersFunctionfindTestFiles
(tasksDir, category string)
tests/e2e/run_tests.go:152
↓ 1 callersFunctionformatElement
formatElement formats a single element as a compact string.
dom/serialize.go:76
↓ 1 callersFunctiongetElementColorFromInfo
getElementColorFromInfo returns the appropriate color for an element type using the interface.
screenshot/annotate.go:110
↓ 1 callersFunctionisImplicitRole
isImplicitRole returns true if the role is implied by the tag.
dom/serialize.go:141
↓ 1 callersFunctionjsonMarshal
jsonMarshal wraps json.Marshal.
dom/serialize.go:203
↓ 1 callersFunctionloadTests
(files []string, testName string)
tests/e2e/run_tests.go:166
↓ 1 callersFunctionparseFlags
()
tests/e2e/run_tests.go:113
↓ 1 callersFunctionprintResults
(results []TestResult, verbose bool)
tests/e2e/run_tests.go:322
↓ 1 callersFunctionrunSingleTest
(test TestCase, cfg Config)
tests/e2e/run_tests.go:210
↓ 1 callersFunctionrunTests
(tests []TestCase, cfg Config)
tests/e2e/run_tests.go:190
↓ 1 callersFunctiontruncate
truncate truncates a string to maxLen characters.
examples/01_quick_start/main.go:80
↓ 1 callersMethodvalidate
validate checks that required configuration is provided.
config.go:215
↓ 1 callersFunctionvalidateExpectations
(exp Expectations, result *bua.Result, finalURL string)
tests/e2e/run_tests.go:287
↓ 1 callersFunctionwaitForPageReady
waitForPageReady waits for the page to be ready for screenshot.
screenshot/screenshot.go:219
MethodAddPattern
AddPattern adds a custom sensitive data pattern.
agent/message.go:213
FunctionAnnotateBrowserUseStyle
AnnotateBrowserUseStyle annotates following browser-use pattern: Only show index labels for elements without text information.
screenshot/annotate.go:296
FunctionAnnotateForLLM
AnnotateForLLM annotates a screenshot optimized for LLM vision consumption. Uses default annotation config with appropriate sizing.
screenshot/annotate.go:287
MethodAvailable
Available returns tokens available after subtracting used tokens.
agent/token.go:138
FunctionBuildContinuationPrompt
BuildContinuationPrompt creates a prompt for continuing after an action.
agent/prompts.go:159
MethodBuildErrorRecoveryMessage
BuildErrorRecoveryMessage builds a message for recovering from an error.
agent/message.go:149
FunctionCaptureAfterAction
CaptureAfterAction captures a screenshot after an action has been performed. It waits for the page to stabilize after the action before capturing.
screenshot/screenshot.go:463
FunctionCaptureAfterActionWithAnnotations
CaptureAfterActionWithAnnotations captures an annotated screenshot after an action.
screenshot/screenshot.go:549
FunctionCaptureElement
CaptureElement takes a screenshot of a specific element.
screenshot/screenshot.go:366
FunctionCaptureFullPage
CaptureFullPage takes a screenshot of the entire page.
screenshot/screenshot.go:424
FunctionCaptureViewport
CaptureViewport takes a screenshot of the current viewport only.
screenshot/screenshot.go:418
MethodClear
Clear removes all elements.
dom/element.go:227
MethodClear
Clear resets the message manager state.
agent/message.go:176
MethodClickAt
ClickAt clicks at specific coordinates.
browser/page.go:162
MethodClose
Close cleans up the agent resources.
agent/agent.go:472
MethodCloseTab
CloseTab closes a tab by ID.
browser/browser.go:408
FunctionDefaultConfig
DefaultConfig returns a default browser configuration.
browser/browser.go:52
FunctionDefaultOptions
DefaultOptions returns sensible defaults for LLM consumption.
screenshot/screenshot.go:85
MethodEstimateFromElements
EstimateFromElements estimates tokens for element descriptions. Elements have a predictable format so we can be more precise.
agent/token.go:77
FunctionExtractElementMap
ExtractElementMap is a convenience function for extracting elements.
dom/extract.go:206
MethodFindBySelector
FindBySelector returns the first element matching the selector.
dom/element.go:236
MethodFindByText
FindByText returns elements containing the given text.
dom/element.go:249
FunctionForLLM
ForLLM captures a screenshot optimized for LLM consumption. Uses JPEG format with reasonable compression for token efficiency. Includes page readiness
screenshot/screenshot.go:432
FunctionForLLMSafe
ForLLMSafe captures a screenshot for LLM consumption with full validation. Returns nil data (not error) if page is blank or screenshot is empty. This
screenshot/screenshot.go:443
FunctionForLLMSafeWithAnnotations
ForLLMSafeWithAnnotations captures an annotated screenshot, returning nil for blank pages.
screenshot/screenshot.go:530
FunctionForLLMWithAnnotations
ForLLMWithAnnotations captures an annotated screenshot optimized for LLM vision. Includes bounding boxes around interactive elements with index labels
screenshot/screenshot.go:521
MethodGetBoundingBox
()
browser/page.go:700
MethodGetBoundingBox
GetBoundingBox implements ElementInfo interface for screenshot annotations. Returns a BoundingBoxInfoInterface that wraps the BoundingBox.
dom/element.go:134
MethodGetCurrentMemory
GetCurrentMemory returns the accumulated memory from history.
agent/history.go:81
MethodGetElements
GetElements returns elements as screenshot.ElementInfo slice.
browser/page.go:678
MethodGetElements
GetElements returns all elements as ElementInfoInterface for screenshot annotations. This implements ElementMapInterface from the screenshot package.
dom/element.go:215
MethodGetHeight
GetHeight implements BoundingBoxInfo interface.
dom/element.go:38
MethodGetHeight
()
dom/element.go:209
MethodGetHistory
GetHistory returns the agent history.
agent/message.go:64
MethodGetIndex
()
browser/page.go:695
MethodGetIndex
GetIndex implements ElementInfo interface for screenshot annotations.
dom/element.go:121
MethodGetIsEmpty
GetIsEmpty implements BoundingBoxInfo interface.
dom/element.go:41
MethodGetIsEmpty
()
dom/element.go:210
MethodGetIsVisible
()
browser/page.go:699
MethodGetIsVisible
GetIsVisible implements ElementInfo interface for screenshot annotations.
dom/element.go:139
MethodGetItems
GetItems returns all history items.
agent/history.go:59
MethodGetLastItem
GetLastItem returns the most recent history item, or nil if empty.
agent/history.go:64
← previousnext →101–200 of 249, ranked by callers