Compare commits

...

8 Commits

Author SHA1 Message Date
Simon 4aab7f991f chore(version): bump version to 1.5.6 2026-03-12 00:53:10 +08:00
Simon 67846db28f chore(ext): ui layout 2026-03-12 00:52:19 +08:00
Simon cac55fa2bf Merge pull request #209 from alibaba/feat/extension-use-same-version-as-packages
feat: extension use the same version as packages
2026-03-12 00:41:58 +08:00
Simon a74b7542ba feat: extension use the same version as packages 2026-03-12 00:37:43 +08:00
Simon a9f462ed37 Merge pull request #191 from RinZ27/fix/ui-security-xss
fix(ui): escape array content in cards and fix double-escaping
2026-03-11 23:43:02 +08:00
Simon c33b3d8278 fix(ui): remove unnecessary tags 2026-03-11 23:38:57 +08:00
Simon e2c00b1bfc chore(ext): bump version to 0.1.17 2026-03-10 22:50:02 +08:00
RinZ27 c4bdd8fc4b fix(ui): escape array content in cards and fix double-escaping 2026-03-10 21:08:20 +07:00
19 changed files with 71 additions and 119 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ Fastest way to try PageAgent with our free Demo LLM:
| Mirrors | URL | | Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- | | ------- | ---------------------------------------------------------------------------------- |
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.5.5/dist/iife/page-agent.demo.js | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.5.6/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.5.5/files/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.5.6/files/dist/iife/page-agent.demo.js |
> **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md). > **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md).
+2 -2
View File
@@ -49,8 +49,8 @@
| Mirrors | URL | | Mirrors | URL |
| ------- | ---------------------------------------------------------------------------------- | | ------- | ---------------------------------------------------------------------------------- |
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.5.5/dist/iife/page-agent.demo.js | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.5.6/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.5.5/files/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.5.6/files/dist/iife/page-agent.demo.js |
> **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。 > **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。
+19 -19
View File
@@ -1,12 +1,12 @@
{ {
"name": "root", "name": "root",
"version": "1.5.5", "version": "1.5.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "root", "name": "root",
"version": "1.5.5", "version": "1.5.6",
"license": "MIT", "license": "MIT",
"workspaces": [ "workspaces": [
"packages/page-controller", "packages/page-controller",
@@ -11090,11 +11090,11 @@
}, },
"packages/core": { "packages/core": {
"name": "@page-agent/core", "name": "@page-agent/core",
"version": "1.5.5", "version": "1.5.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5", "@page-agent/page-controller": "1.5.6",
"chalk": "^5.6.2" "chalk": "^5.6.2"
}, },
"devDependencies": { "devDependencies": {
@@ -11106,13 +11106,13 @@
}, },
"packages/extension": { "packages/extension": {
"name": "@page-agent/ext", "name": "@page-agent/ext",
"version": "0.1.16", "version": "1.5.6",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@page-agent/core": "1.5.5", "@page-agent/core": "1.5.6",
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5", "@page-agent/page-controller": "1.5.6",
"@page-agent/ui": "1.5.5", "@page-agent/ui": "1.5.6",
"ai-motion": "^0.4.8", "ai-motion": "^0.4.8",
"chalk": "^5.6.2" "chalk": "^5.6.2"
}, },
@@ -11150,7 +11150,7 @@
}, },
"packages/llms": { "packages/llms": {
"name": "@page-agent/llms", "name": "@page-agent/llms",
"version": "1.5.5", "version": "1.5.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"chalk": "^5.6.2" "chalk": "^5.6.2"
@@ -11163,13 +11163,13 @@
} }
}, },
"packages/page-agent": { "packages/page-agent": {
"version": "1.5.5", "version": "1.5.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@page-agent/core": "1.5.5", "@page-agent/core": "1.5.6",
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5", "@page-agent/page-controller": "1.5.6",
"@page-agent/ui": "1.5.5", "@page-agent/ui": "1.5.6",
"chalk": "^5.6.2" "chalk": "^5.6.2"
}, },
"devDependencies": { "devDependencies": {
@@ -11181,7 +11181,7 @@
}, },
"packages/page-controller": { "packages/page-controller": {
"name": "@page-agent/page-controller", "name": "@page-agent/page-controller",
"version": "1.5.5", "version": "1.5.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ai-motion": "^0.4.8" "ai-motion": "^0.4.8"
@@ -11189,12 +11189,12 @@
}, },
"packages/ui": { "packages/ui": {
"name": "@page-agent/ui", "name": "@page-agent/ui",
"version": "1.5.5", "version": "1.5.6",
"license": "MIT" "license": "MIT"
}, },
"packages/website": { "packages/website": {
"name": "@page-agent/website", "name": "@page-agent/website",
"version": "1.5.5", "version": "1.5.6",
"devDependencies": { "devDependencies": {
"@radix-ui/react-icons": "^1.3.2", "@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-separator": "^1.1.8", "@radix-ui/react-separator": "^1.1.8",
+1 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "root", "name": "root",
"private": true, "private": true,
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"workspaces": [ "workspaces": [
"packages/page-controller", "packages/page-controller",
@@ -32,7 +32,6 @@
"build:website": "npm run build:website --workspace=@page-agent/website", "build:website": "npm run build:website --workspace=@page-agent/website",
"build:ext": "npm run build:libs && npm run zip -w @page-agent/ext", "build:ext": "npm run build:libs && npm run zip -w @page-agent/ext",
"version": "node scripts/sync-version.js", "version": "node scripts/sync-version.js",
"version:ext": "node scripts/ext-version.js",
"lint": "eslint .", "lint": "eslint .",
"cleanup": "rm -rf packages/*/dist", "cleanup": "rm -rf packages/*/dist",
"prepare": "husky" "prepare": "husky"
+3 -3
View File
@@ -1,7 +1,7 @@
{ {
"name": "@page-agent/core", "name": "@page-agent/core",
"private": false, "private": false,
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"main": "./dist/esm/page-agent-core.js", "main": "./dist/esm/page-agent-core.js",
"module": "./dist/esm/page-agent-core.js", "module": "./dist/esm/page-agent-core.js",
@@ -44,8 +44,8 @@
}, },
"dependencies": { "dependencies": {
"chalk": "^5.6.2", "chalk": "^5.6.2",
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5" "@page-agent/page-controller": "1.5.6"
}, },
"peerDependencies": { "peerDependencies": {
"zod": "^3.25.0 || ^4.0.0" "zod": "^3.25.0 || ^4.0.0"
+5 -5
View File
@@ -1,7 +1,7 @@
{ {
"name": "@page-agent/ext", "name": "@page-agent/ext",
"private": true, "private": true,
"version": "0.1.16", "version": "1.5.6",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "wxt", "dev": "wxt",
@@ -38,10 +38,10 @@
"wxt": "^0.20.18" "wxt": "^0.20.18"
}, },
"dependencies": { "dependencies": {
"@page-agent/core": "1.5.5", "@page-agent/core": "1.5.6",
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5", "@page-agent/page-controller": "1.5.6",
"@page-agent/ui": "1.5.5", "@page-agent/ui": "1.5.6",
"ai-motion": "^0.4.8", "ai-motion": "^0.4.8",
"chalk": "^5.6.2" "chalk": "^5.6.2"
}, },
@@ -110,9 +110,9 @@ export default defineUnlistedScript(() => {
) )
} }
;(window as any).PAGE_AGENT_EXT_VERSION = __EXT_VERSION__ ;(window as any).PAGE_AGENT_EXT_VERSION = __VERSION__
;(window as any).PAGE_AGENT_EXT = { ;(window as any).PAGE_AGENT_EXT = {
version: __EXT_VERSION__, version: __VERSION__,
execute, execute,
stop, stop,
} }
@@ -286,6 +286,10 @@ export function ConfigPanel({ config, onSave, onClose }: ConfigPanelProps) {
{/* Footer */} {/* Footer */}
<div className="mt-4 mb-4 pt-4 border-t border-border/50 flex gap-2 justify-between text-[10px] text-muted-foreground"> <div className="mt-4 mb-4 pt-4 border-t border-border/50 flex gap-2 justify-between text-[10px] text-muted-foreground">
<div className="flex flex-col justify-between"> <div className="flex flex-col justify-between">
<span>
Version <span className="font-mono">v{__VERSION__}</span>
</span>
<a <a
href="https://github.com/alibaba/page-agent" href="https://github.com/alibaba/page-agent"
target="_blank" target="_blank"
@@ -297,7 +301,9 @@ export function ConfigPanel({ config, onSave, onClose }: ConfigPanelProps) {
</svg> </svg>
<span>Source Code</span> <span>Source Code</span>
</a> </a>
</div>
<div className="flex flex-col items-end">
<a <a
href="https://alibaba.github.io/page-agent/" href="https://alibaba.github.io/page-agent/"
target="_blank" target="_blank"
@@ -315,18 +321,9 @@ export function ConfigPanel({ config, onSave, onClose }: ConfigPanelProps) {
className="flex items-center gap-1 hover:text-foreground" className="flex items-center gap-1 hover:text-foreground"
> >
<HatGlasses className="size-3" /> <HatGlasses className="size-3" />
<span>Privacy Policy</span> <span>Privacy</span>
</a> </a>
</div> </div>
<div className="flex flex-col items-end">
<span>
Extension <span className="font-mono">v{__EXT_VERSION__}</span>
</span>
<span>
PageAgent <span className="font-mono">v{__CORE_VERSION__}</span>
</span>
</div>
</div> </div>
{/* attribute */} {/* attribute */}
+1 -2
View File
@@ -1,2 +1 @@
declare const __EXT_VERSION__: string declare const __VERSION__: string
declare const __CORE_VERSION__: string
+1 -2
View File
@@ -19,8 +19,7 @@ export default defineConfig({
vite: () => ({ vite: () => ({
plugins: [tailwindcss()], plugins: [tailwindcss()],
define: { define: {
__EXT_VERSION__: JSON.stringify(pkg.version), __VERSION__: JSON.stringify(pkg.version),
__CORE_VERSION__: JSON.stringify(pkg.dependencies['@page-agent/core']),
}, },
optimizeDeps: { optimizeDeps: {
force: true, force: true,
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@page-agent/llms", "name": "@page-agent/llms",
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"main": "./dist/lib/page-agent-llms.js", "main": "./dist/lib/page-agent-llms.js",
"module": "./dist/lib/page-agent-llms.js", "module": "./dist/lib/page-agent-llms.js",
+5 -5
View File
@@ -1,7 +1,7 @@
{ {
"name": "page-agent", "name": "page-agent",
"private": false, "private": false,
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"main": "./dist/esm/page-agent.js", "main": "./dist/esm/page-agent.js",
"module": "./dist/esm/page-agent.js", "module": "./dist/esm/page-agent.js",
@@ -44,10 +44,10 @@
"postpublish": "node -e \"['README.md','LICENSE'].forEach(f=>{try{require('fs').unlinkSync(f)}catch{}})\"" "postpublish": "node -e \"['README.md','LICENSE'].forEach(f=>{try{require('fs').unlinkSync(f)}catch{}})\""
}, },
"dependencies": { "dependencies": {
"@page-agent/core": "1.5.5", "@page-agent/core": "1.5.6",
"@page-agent/llms": "1.5.5", "@page-agent/llms": "1.5.6",
"@page-agent/page-controller": "1.5.5", "@page-agent/page-controller": "1.5.6",
"@page-agent/ui": "1.5.5", "@page-agent/ui": "1.5.6",
"chalk": "^5.6.2" "chalk": "^5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@page-agent/page-controller", "name": "@page-agent/page-controller",
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"main": "./dist/lib/page-controller.js", "main": "./dist/lib/page-controller.js",
"module": "./dist/lib/page-controller.js", "module": "./dist/lib/page-controller.js",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@page-agent/ui", "name": "@page-agent/ui",
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"main": "./dist/lib/page-agent-ui.js", "main": "./dist/lib/page-agent-ui.js",
"module": "./dist/lib/page-agent-ui.js", "module": "./dist/lib/page-agent-ui.js",
+4 -4
View File
@@ -18,7 +18,7 @@ interface CardOptions {
export function createCard({ icon, content, meta, type }: CardOptions): string { export function createCard({ icon, content, meta, type }: CardOptions): string {
const typeClass = type ? styles[type] : '' const typeClass = type ? styles[type] : ''
const contentHtml = Array.isArray(content) const contentHtml = Array.isArray(content)
? `<div class="${styles.reflectionLines}">${content.join('')}</div>` ? `<div class="${styles.reflectionLines}">${content.map((line) => `<span>${escapeHtml(line)}</span>`).join('')}</div>`
: `<span>${escapeHtml(content)}</span>` : `<span>${escapeHtml(content)}</span>`
return ` return `
@@ -40,13 +40,13 @@ export function createReflectionLines(reflection: {
}): string[] { }): string[] {
const lines: string[] = [] const lines: string[] = []
if (reflection.evaluation_previous_goal) { if (reflection.evaluation_previous_goal) {
lines.push(`<div>🔍 ${escapeHtml(reflection.evaluation_previous_goal)}</div>`) lines.push(`🔍 ${reflection.evaluation_previous_goal}`)
} }
if (reflection.memory) { if (reflection.memory) {
lines.push(`<div>💾 ${escapeHtml(reflection.memory)}</div>`) lines.push(`💾 ${reflection.memory}`)
} }
if (reflection.next_goal) { if (reflection.next_goal) {
lines.push(`<div>🎯 ${escapeHtml(reflection.next_goal)}</div>`) lines.push(`🎯 ${reflection.next_goal}`)
} }
return lines return lines
} }
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@page-agent/website", "name": "@page-agent/website",
"private": true, "private": true,
"version": "1.5.5", "version": "1.5.6",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --host 0.0.0.0", "dev": "vite --host 0.0.0.0",
+2 -2
View File
@@ -1,8 +1,8 @@
// Demo build (auto-init with demo LLM, for quick testing) // Demo build (auto-init with demo LLM, for quick testing)
export const CDN_DEMO_URL = export const CDN_DEMO_URL =
'https://cdn.jsdelivr.net/npm/page-agent@1.5.5/dist/iife/page-agent.demo.js' 'https://cdn.jsdelivr.net/npm/page-agent@1.5.6/dist/iife/page-agent.demo.js'
export const CDN_DEMO_CN_URL = export const CDN_DEMO_CN_URL =
'https://registry.npmmirror.com/page-agent/1.5.5/files/dist/iife/page-agent.demo.js' 'https://registry.npmmirror.com/page-agent/1.5.6/files/dist/iife/page-agent.demo.js'
// Demo LLM for website testing (homepage quick trial uses flash) // Demo LLM for website testing (homepage quick trial uses flash)
export const DEMO_MODEL = 'qwen3.5-flash' export const DEMO_MODEL = 'qwen3.5-flash'
-41
View File
@@ -1,41 +0,0 @@
#!/usr/bin/env node
/**
* Bump extension version and show git tag commands
*
* Usage:
* node scripts/ext-version.js 0.1.16
*/
import chalk from 'chalk'
import { readFileSync, writeFileSync } from 'fs'
import { dirname, join } from 'path'
import { exit } from 'process'
import { fileURLToPath } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url))
const pkgPath = join(__dirname, '..', 'packages', 'extension', 'package.json')
const newVersion = process.argv[2]
if (!newVersion) {
console.log(chalk.yellow('⚠️ Usage: npm run ext:version <version>\n'))
exit(1)
}
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'))
const oldVersion = pkg.version
pkg.version = newVersion
writeFileSync(pkgPath, JSON.stringify(pkg, null, ' ') + '\n')
console.log(
chalk.green.bold('\n✓') +
` ${chalk.bold('@page-agent/ext')}: ${chalk.dim(oldVersion)}${chalk.yellow(newVersion)}\n`
)
const tagName = `EXT_v${newVersion}`
console.log(chalk.cyan.bold('📋 Next steps:\n'))
console.log(chalk.blueBright(`npm i`))
console.log(
chalk.blueBright(`git add . && git commit -m "chore(ext): bump version to ${newVersion}"`)
)
console.log(chalk.blueBright(`git tag -a ${tagName} -m "${tagName}"`))
console.log(chalk.blueBright(`git push && git push origin ${tagName}\n`))
+13 -14
View File
@@ -4,7 +4,7 @@
* *
* Usage: * Usage:
* node scripts/sync-version.js # Sync current version from root * node scripts/sync-version.js # Sync current version from root
* node scripts/sync-version.js 0.1.0 # Set and sync new version * node scripts/sync-version.js 0.1.0 # Set root version, then sync all packages
*/ */
import chalk from 'chalk' import chalk from 'chalk'
import { existsSync, readFileSync, readdirSync, writeFileSync } from 'fs' import { existsSync, readFileSync, readdirSync, writeFileSync } from 'fs'
@@ -15,19 +15,18 @@ import { fileURLToPath } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url)) const __dirname = dirname(fileURLToPath(import.meta.url))
const rootDir = join(__dirname, '..') const rootDir = join(__dirname, '..')
// Parse arguments
const versionArg = process.argv[2] const versionArg = process.argv[2]
if (!versionArg) {
console.log(chalk.yellow('⚠️ No version specified.\n'))
exit(1)
}
// Read root package.json // Read root package.json
const rootPkgPath = join(rootDir, 'package.json') const rootPkgPath = join(rootDir, 'package.json')
const rootPkg = JSON.parse(readFileSync(rootPkgPath, 'utf-8')) const rootPkg = JSON.parse(readFileSync(rootPkgPath, 'utf-8'))
const oldVersion = rootPkg.version const oldVersion = rootPkg.version
const newVersion = versionArg const newVersion = versionArg ?? rootPkg.version
if (!newVersion) {
console.log(chalk.yellow('⚠️ No version found in root package.json.\n'))
exit(1)
}
console.log(chalk.cyan.bold('\n📦 Syncing version\n')) console.log(chalk.cyan.bold('\n📦 Syncing version\n'))
@@ -35,7 +34,10 @@ console.log(chalk.cyan.bold('\n📦 Syncing version\n'))
if (versionArg) { if (versionArg) {
rootPkg.version = newVersion rootPkg.version = newVersion
writeFileSync(rootPkgPath, JSON.stringify(rootPkg, null, ' ') + '\n') writeFileSync(rootPkgPath, JSON.stringify(rootPkg, null, ' ') + '\n')
console.log(chalk.green('✓') + ` ${chalk.bold('root')}${chalk.yellow(newVersion)}`) console.log(
chalk.green('✓') +
` ${chalk.bold('root')}: ${chalk.dim(oldVersion)}${chalk.yellow(newVersion)}`
)
} else { } else {
console.log(chalk.dim(' root:') + ` ${chalk.yellow(newVersion)} ${chalk.dim('(source)')}`) console.log(chalk.dim(' root:') + ` ${chalk.yellow(newVersion)} ${chalk.dim('(source)')}`)
} }
@@ -78,11 +80,8 @@ for (const pkg of packages) {
const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf-8')) const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf-8'))
let pkgChanged = false let pkgChanged = false
// Skip extension package version (it has its own versioning) // Update package version
const isExtension = pkg === 'extension' if (pkgJson.version !== newVersion) {
// Update package version (skip extension)
if (!isExtension && pkgJson.version !== newVersion) {
pkgJson.version = newVersion pkgJson.version = newVersion
pkgChanged = true pkgChanged = true
} }