npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@coolkiller007/my-page-agent

v0.2.9

Published

In-page GUI agent for Sexytea Vue 2 applications

Readme

My Page Agent

面向中台的页面内嵌 GUI Agent。项目将自然语言任务转换为受控的页面读取与操作,并以单一 npm 包交付。

Installation

运行环境要求:Node.js ^22.22.1 || >=24、npm ^11.6.3。

npm install @coolkiller007/my-page-agent

Usage

import { createAgent } from '@coolkiller007/my-page-agent'

const agent = createAgent({
    baseURL: '/api/ai/v1',
    apiKey: 'provided-by-the-company-gateway',
    model: 'configured-model',
    language: 'zh-CN',
})

agent.ui.show()
const result = await agent.execute('打开会员列表并筛选本月新增会员')

const writeResult = result.success ? console.log : console.error
writeResult(result.data)

// 用户退出、切换租户或应用卸载时清理资源。
agent.dispose()

生产环境必须通过公司后端代理或 AI 网关访问模型,不得把生产 API Key 打进浏览器产物。页面内容在发送给模型前也应通过 transformPageContent 完成业务所需的脱敏。

Public API

包根入口是唯一公共入口:

  • createAgent(config):创建并组装 MyPageAgent。
  • MyPageAgent:Agent 门面;提供 execute(task)、stop()、dispose() 和只读status。
  • agent.ui:提供 show()、hide()、expand() 和 collapse()。
  • tool(options):定义自定义 Agent 工具。
  • 类型:MyPageAgentConfig、AgentActivity、AgentStatus、ExecutionResult和 HistoricalEvent。

AgentRuntime、BrowserController、OpenAICompatibleClient、UI 内部组件、DOM Tree、Prompt 和自动修复器属于内部实现,不从包根入口导出。

Architecture

  • src/agent:任务编排、工具和公共门面。
  • src/browser:DOM 提取与页面操作。
  • src/llm:OpenAI-compatible 模型调用。
  • src/ui:页面内用户界面。
  • src/shared:跨能力共享的无状态工具。
  • src/index.ts:限定公共 API 的唯一包入口。

项目只发布 @coolkiller007/my-page-agent,不使用 npm workspaces。Browser、Runtime 和 UI 只在 MyPageAgent 中组装,内部模块使用相对 import。