page-agent 1.0.1 → 1.1.0

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/README.md CHANGED
@@ -40,7 +40,7 @@ Fastest way to try PageAgent with our free Demo LLM:
40
40
 
41
41
  ```html
42
42
  <script
43
- src="https://cdn.jsdelivr.net/npm/page-agent@1.0.1/dist/iife/page-agent.demo.js"
43
+ src="https://cdn.jsdelivr.net/npm/page-agent@1.1.0/dist/iife/page-agent.demo.js"
44
44
  crossorigin="true"
45
45
  ></script>
46
46
  ```
@@ -50,8 +50,8 @@ Fastest way to try PageAgent with our free Demo LLM:
50
50
 
51
51
  | Mirrors | URL |
52
52
  | ------- | ---------------------------------------------------------------------------------- |
53
- | Global | https://cdn.jsdelivr.net/npm/page-agent@1.0.1/dist/iife/page-agent.demo.js |
54
- | China | https://registry.npmmirror.com/page-agent/1.0.1/files/dist/iife/page-agent.demo.js |
53
+ | Global | https://cdn.jsdelivr.net/npm/page-agent@1.1.0/dist/iife/page-agent.demo.js |
54
+ | China | https://registry.npmmirror.com/page-agent/1.1.0/files/dist/iife/page-agent.demo.js |
55
55
 
56
56
  ### NPM Installation
57
57
 
@@ -194,7 +194,7 @@ You must ALWAYS respond with a valid JSON in this exact format:
194
194
  "evaluation_previous_goal": "Concise one-sentence analysis of your last action. Clearly state success, failure, or uncertain.",
195
195
  "memory": "1-3 concise sentences of specific memory of this step and overall progress. You should put here everything that will help you track progress in future steps. Like counting pages visited, items found, etc.",
196
196
  "next_goal": "State the next immediate goal and action to achieve it, in one clear sentence."
197
- "action":{"one_action_name": {// action-specific parameter}}
197
+ "action":{"action": {// action-specific parameter}}
198
198
  }
199
199
  </output>
200
200
  `;function normalizeResponse(e){let n=null;const r=e.choices?.[0];if(!r)throw new Error("No choices in response");const o=r.message;if(!o)throw new Error("No message in choice");const t=o.tool_calls?.[0];if(t?.function?.arguments)n=safeJsonParse(t.function.arguments),t.function.name&&t.function.name!=="AgentOutput"&&(console.log(chalk.yellow("[normalizeResponse] #1: fixing tool_call")),n={action:safeJsonParse(n)});else if(o.content){const i=o.content.trim(),a=retrieveJsonFromString(i);if(a)n=safeJsonParse(a),n?.name==="AgentOutput"&&(console.log(chalk.yellow("[normalizeResponse] #2: fixing tool_call")),n=safeJsonParse(n.arguments)),n?.type==="function"&&(console.log(chalk.yellow("[normalizeResponse] #3: fixing tool_call")),n=safeJsonParse(n.function.arguments)),!n?.action&&!n?.evaluation_previous_goal&&!n?.memory&&!n?.next_goal&&!n?.thinking&&(console.log(chalk.yellow("[normalizeResponse] #4: fixing tool_call")),n={action:safeJsonParse(n)});else throw new Error("No tool_call and the message content does not contain valid JSON")}else throw new Error("No tool_call nor message content is present");return n=safeJsonParse(n),n.action&&(n.action=safeJsonParse(n.action)),n.action||(console.log(chalk.yellow("[normalizeResponse] #5: fixing tool_call")),n.action={name:"wait",input:{seconds:1}}),{...e,choices:[{...r,message:{...o,tool_calls:[{...t||{},function:{...t?.function||{},name:"AgentOutput",arguments:JSON.stringify(n)}}]}}]}}s(normalizeResponse,"normalizeResponse");function safeJsonParse(e){if(typeof e=="string")try{return JSON.parse(e.trim())}catch{return e}return e}s(safeJsonParse,"safeJsonParse");function retrieveJsonFromString(e){try{const n=/({[\s\S]*})/.exec(e)??[];return n.length===0?null:JSON.parse(n[0])}catch{return null}}s(retrieveJsonFromString,"retrieveJsonFromString");async function waitFor$1(e){await new Promise(n=>setTimeout(n,e*1e3))}s(waitFor$1,"waitFor$1");function trimLines(e){return e.split(`
@@ -244,7 +244,7 @@ ${a}
244
244
 
245
245
  ${c}
246
246
 
247
- ${u}`,f=r.pixels_below>4&&o!==-1?`... ${r.pixels_below} pixels below (${r.pages_below.toFixed(1)} pages) - scroll to see more ...`:"[End of page]";return{url:e,title:n,header:d,content:t,footer:f}}async updateTree(){this.dispatchEvent(new Event("beforeUpdate")),this.lastTimeUpdate=Date.now(),this.mask&&(this.mask.wrapper.style.pointerEvents="none"),cleanUpHighlights();const e=[...this.config.interactiveBlacklist||[],...document.querySelectorAll("[data-page-agent-not-interactive]").values()];return this.flatTree=getFlatTree({...this.config,interactiveBlacklist:e}),this.simplifiedHTML=flatTreeToString(this.flatTree,this.config.include_attributes),this.selectorMap.clear(),this.selectorMap=getSelectorMap(this.flatTree),this.elementTextMap.clear(),this.elementTextMap=getElementTextMap(this.simplifiedHTML),this.isIndexed=!0,this.mask&&(this.mask.wrapper.style.pointerEvents="auto"),this.dispatchEvent(new Event("afterUpdate")),this.simplifiedHTML}async cleanUpHighlights(){cleanUpHighlights()}assertIndexed(){if(!this.isIndexed)throw new Error("DOM tree not indexed yet. Can not perform actions on elements.")}async clickElement(e){try{this.assertIndexed();const n=getElementByIndex(this.selectorMap,e),r=this.elementTextMap.get(e);return await clickElement(n),n instanceof HTMLAnchorElement&&n.target==="_blank"?{success:!0,message:`✅ Clicked element (${r??e}). ⚠️ Link opens in a new tab. You are not capable of reading new tabs.`}:{success:!0,message:`✅ Clicked element (${r??e}).`}}catch(n){return{success:!1,message:`❌ Failed to click element: ${n}`}}}async inputText(e,n){try{this.assertIndexed();const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await inputTextElement(r,n),{success:!0,message:`✅ Input text (${n}) into element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to input text: ${r}`}}}async selectOption(e,n){try{this.assertIndexed();const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await selectOptionElement(r,n),{success:!0,message:`✅ Selected option (${n}) in element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to select option: ${r}`}}}async scroll(e){try{const{down:n,numPages:r,pixels:o,index:t}=e;this.assertIndexed();const i=o??r*(n?1:-1)*window.innerHeight,a=t!==void 0?getElementByIndex(this.selectorMap,t):null;return{success:!0,message:await scrollVertically(n,i,a)}}catch(n){return{success:!1,message:`❌ Failed to scroll: ${n}`}}}async scrollHorizontally(e){try{const{right:n,pixels:r,index:o}=e;this.assertIndexed();const t=r*(n?1:-1),i=o!==void 0?getElementByIndex(this.selectorMap,o):null;return{success:!0,message:await scrollHorizontally(n,t,i)}}catch(n){return{success:!1,message:`❌ Failed to scroll horizontally: ${n}`}}}async executeJavascript(script){try{const asyncFunction=eval(`(async () => { ${script} })`),result=await asyncFunction();return{success:!0,message:`✅ Executed JavaScript. Result: ${result}`}}catch(e){return{success:!1,message:`❌ Error executing JavaScript: ${e}`}}}async showMask(){await this.maskReady,this.mask?.show()}async hideMask(){await this.maskReady,this.mask?.hide()}dispose(){cleanUpHighlights(),this.flatTree=null,this.selectorMap.clear(),this.elementTextMap.clear(),this.simplifiedHTML="<EMPTY>",this.isIndexed=!1,this.mask?.dispose(),this.mask=null}};s(_PageController,"PageController");let PageController=_PageController;const enUS={ui:{panel:{ready:"Ready",thinking:"Thinking...",taskInput:"Enter new task, describe steps in detail, press Enter to submit",userAnswerPrompt:"Please answer the question above, press Enter to submit",taskTerminated:"Task terminated",taskCompleted:"Task completed",userAnswer:"User answer: {{input}}",question:"Question: {{question}}",waitingPlaceholder:"Waiting for task to start...",stop:"Stop",expand:"Expand history",collapse:"Collapse history",step:"Step {{number}} · {{time}}{{duration}}"},tools:{clicking:"Clicking element [{{index}}]...",inputting:"Inputting text to element [{{index}}]...",selecting:'Selecting option "{{text}}"...',scrolling:"Scrolling page...",waiting:"Waiting {{seconds}} seconds...",askingUser:"Asking user...",done:"Task done",clicked:"🖱️ Clicked element [{{index}}]",inputted:'⌨️ Inputted text "{{text}}"',selected:'☑️ Selected option "{{text}}"',scrolled:"🛞 Page scrolled",waited:"⌛️ Wait completed",executing:"Executing {{toolName}}...",resultSuccess:"success",resultFailure:"failed",resultError:"error"},errors:{elementNotFound:"No interactive element found at index {{index}}",taskRequired:"Task description is required",executionFailed:"Task execution failed",notInputElement:"Element is not an input or textarea",notSelectElement:"Element is not a select element",optionNotFound:'Option "{{text}}" not found'}}},zhCN={ui:{panel:{ready:"准备就绪",thinking:"正在思考...",taskInput:"输入新任务,详细描述步骤,回车提交",userAnswerPrompt:"请回答上面问题,回车提交",taskTerminated:"任务已终止",taskCompleted:"任务结束",userAnswer:"用户回答: {{input}}",question:"询问: {{question}}",waitingPlaceholder:"等待任务开始...",stop:"终止",expand:"展开历史",collapse:"收起历史",step:"步骤 {{number}} · {{time}}{{duration}}"},tools:{clicking:"正在点击元素 [{{index}}]...",inputting:"正在输入文本到元素 [{{index}}]...",selecting:'正在选择选项 "{{text}}"...',scrolling:"正在滚动页面...",waiting:"等待 {{seconds}} 秒...",askingUser:"正在询问用户...",done:"结束任务",clicked:"🖱️ 已点击元素 [{{index}}]",inputted:'⌨️ 已输入文本 "{{text}}"',selected:'☑️ 已选择选项 "{{text}}"',scrolled:"🛞 页面滚动完成",waited:"⌛️ 等待完成",executing:"正在执行 {{toolName}}...",resultSuccess:"成功",resultFailure:"失败",resultError:"错误"},errors:{elementNotFound:"未找到索引为 {{index}} 的交互元素",taskRequired:"任务描述不能为空",executionFailed:"任务执行失败",notInputElement:"元素不是输入框或文本域",notSelectElement:"元素不是选择框",optionNotFound:'未找到选项 "{{text}}"'}}},locales={"en-US":enUS,"zh-CN":zhCN},_t=class _t{language;translations;constructor(n="en-US"){this.language=n in locales?n:"en-US",this.translations=locales[this.language]}t(n,r){const o=this.getNestedValue(this.translations,n);return o?r?this.interpolate(o,r):o:(console.warn(`Translation key "${n}" not found for language "${this.language}"`),n)}getNestedValue(n,r){return r.split(".").reduce((o,t)=>o?.[t],n)}interpolate(n,r){return n.replace(/\{\{(\w+)\}\}/g,(o,t)=>r[t]!=null?r[t].toString():o)}getLanguage(){return this.language}};s(_t,"I18n");let I18n=_t;function truncate(e,n){return e.length>n?e.substring(0,n)+"...":e}s(truncate,"truncate");function escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}s(escapeHtml,"escapeHtml");const wrapper$1="_wrapper_gtdpc_1",background="_background_gtdpc_39",header="_header_gtdpc_99",pulse="_pulse_gtdpc_1",retryPulse="_retryPulse_gtdpc_1",statusTextFadeOut="_statusTextFadeOut_gtdpc_1",statusTextFadeIn="_statusTextFadeIn_gtdpc_1",statusSection="_statusSection_gtdpc_121",indicator="_indicator_gtdpc_128",thinking="_thinking_gtdpc_137",tool_executing="_tool_executing_gtdpc_142",retry="_retry_gtdpc_147",completed="_completed_gtdpc_153",input="_input_gtdpc_154",output="_output_gtdpc_155",error="_error_gtdpc_160",statusText="_statusText_gtdpc_166",fadeOut="_fadeOut_gtdpc_178",fadeIn="_fadeIn_gtdpc_182",controls="_controls_gtdpc_188",controlButton="_controlButton_gtdpc_193",stopButton="_stopButton_gtdpc_212",historySectionWrapper="_historySectionWrapper_gtdpc_246",shimmer="_shimmer_gtdpc_1",celebrate="_celebrate_gtdpc_1",expanded="_expanded_gtdpc_278",historySection="_historySection_gtdpc_246",historyItem="_historyItem_gtdpc_297",observation="_observation_gtdpc_355",question="_question_gtdpc_360",doneSuccess="_doneSuccess_gtdpc_366",historyContent="_historyContent_gtdpc_402",statusIcon="_statusIcon_gtdpc_403",doneError="_doneError_gtdpc_412",reflectionLines="_reflectionLines_gtdpc_462",historyMeta="_historyMeta_gtdpc_469",inputSectionWrapper="_inputSectionWrapper_gtdpc_539",hidden="_hidden_gtdpc_562",inputSection="_inputSection_gtdpc_539",taskInput="_taskInput_gtdpc_573",styles$1={wrapper:wrapper$1,"mask-running":"_mask-running_gtdpc_1",background,header,pulse,retryPulse,statusTextFadeOut,statusTextFadeIn,statusSection,indicator,thinking,tool_executing,retry,completed,input,output,error,statusText,fadeOut,fadeIn,controls,controlButton,stopButton,historySectionWrapper,shimmer,celebrate,expanded,historySection,historyItem,observation,question,doneSuccess,historyContent,statusIcon,doneError,reflectionLines,historyMeta,inputSectionWrapper,hidden,inputSection,taskInput};function createCard({icon:e,content:n,meta:r,type:o}){const t=o?styles$1[o]:"",i=Array.isArray(n)?`<div class="${styles$1.reflectionLines}">${n.join("")}</div>`:`<span>${escapeHtml(n)}</span>`;return`
247
+ ${u}`,f=r.pixels_below>4&&o!==-1?`... ${r.pixels_below} pixels below (${r.pages_below.toFixed(1)} pages) - scroll to see more ...`:"[End of page]";return{url:e,title:n,header:d,content:t,footer:f}}async updateTree(){this.dispatchEvent(new Event("beforeUpdate")),this.lastTimeUpdate=Date.now(),this.mask&&(this.mask.wrapper.style.pointerEvents="none"),cleanUpHighlights();const e=[...this.config.interactiveBlacklist||[],...document.querySelectorAll("[data-page-agent-not-interactive]").values()];return this.flatTree=getFlatTree({...this.config,interactiveBlacklist:e}),this.simplifiedHTML=flatTreeToString(this.flatTree,this.config.includeAttributes),this.selectorMap.clear(),this.selectorMap=getSelectorMap(this.flatTree),this.elementTextMap.clear(),this.elementTextMap=getElementTextMap(this.simplifiedHTML),this.isIndexed=!0,this.mask&&(this.mask.wrapper.style.pointerEvents="auto"),this.dispatchEvent(new Event("afterUpdate")),this.simplifiedHTML}async cleanUpHighlights(){cleanUpHighlights()}assertIndexed(){if(!this.isIndexed)throw new Error("DOM tree not indexed yet. Can not perform actions on elements.")}async clickElement(e){try{this.assertIndexed();const n=getElementByIndex(this.selectorMap,e),r=this.elementTextMap.get(e);return await clickElement(n),n instanceof HTMLAnchorElement&&n.target==="_blank"?{success:!0,message:`✅ Clicked element (${r??e}). ⚠️ Link opens in a new tab. You are not capable of reading new tabs.`}:{success:!0,message:`✅ Clicked element (${r??e}).`}}catch(n){return{success:!1,message:`❌ Failed to click element: ${n}`}}}async inputText(e,n){try{this.assertIndexed();const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await inputTextElement(r,n),{success:!0,message:`✅ Input text (${n}) into element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to input text: ${r}`}}}async selectOption(e,n){try{this.assertIndexed();const r=getElementByIndex(this.selectorMap,e),o=this.elementTextMap.get(e);return await selectOptionElement(r,n),{success:!0,message:`✅ Selected option (${n}) in element (${o??e}).`}}catch(r){return{success:!1,message:`❌ Failed to select option: ${r}`}}}async scroll(e){try{const{down:n,numPages:r,pixels:o,index:t}=e;this.assertIndexed();const i=o??r*(n?1:-1)*window.innerHeight,a=t!==void 0?getElementByIndex(this.selectorMap,t):null;return{success:!0,message:await scrollVertically(n,i,a)}}catch(n){return{success:!1,message:`❌ Failed to scroll: ${n}`}}}async scrollHorizontally(e){try{const{right:n,pixels:r,index:o}=e;this.assertIndexed();const t=r*(n?1:-1),i=o!==void 0?getElementByIndex(this.selectorMap,o):null;return{success:!0,message:await scrollHorizontally(n,t,i)}}catch(n){return{success:!1,message:`❌ Failed to scroll horizontally: ${n}`}}}async executeJavascript(script){try{const asyncFunction=eval(`(async () => { ${script} })`),result=await asyncFunction();return{success:!0,message:`✅ Executed JavaScript. Result: ${result}`}}catch(e){return{success:!1,message:`❌ Error executing JavaScript: ${e}`}}}async showMask(){await this.maskReady,this.mask?.show()}async hideMask(){await this.maskReady,this.mask?.hide()}dispose(){cleanUpHighlights(),this.flatTree=null,this.selectorMap.clear(),this.elementTextMap.clear(),this.simplifiedHTML="<EMPTY>",this.isIndexed=!1,this.mask?.dispose(),this.mask=null}};s(_PageController,"PageController");let PageController=_PageController;const enUS={ui:{panel:{ready:"Ready",thinking:"Thinking...",taskInput:"Enter new task, describe steps in detail, press Enter to submit",userAnswerPrompt:"Please answer the question above, press Enter to submit",taskTerminated:"Task terminated",taskCompleted:"Task completed",userAnswer:"User answer: {{input}}",question:"Question: {{question}}",waitingPlaceholder:"Waiting for task to start...",stop:"Stop",expand:"Expand history",collapse:"Collapse history",step:"Step {{number}} · {{time}}{{duration}}"},tools:{clicking:"Clicking element [{{index}}]...",inputting:"Inputting text to element [{{index}}]...",selecting:'Selecting option "{{text}}"...',scrolling:"Scrolling page...",waiting:"Waiting {{seconds}} seconds...",askingUser:"Asking user...",done:"Task done",clicked:"🖱️ Clicked element [{{index}}]",inputted:'⌨️ Inputted text "{{text}}"',selected:'☑️ Selected option "{{text}}"',scrolled:"🛞 Page scrolled",waited:"⌛️ Wait completed",executing:"Executing {{toolName}}...",resultSuccess:"success",resultFailure:"failed",resultError:"error"},errors:{elementNotFound:"No interactive element found at index {{index}}",taskRequired:"Task description is required",executionFailed:"Task execution failed",notInputElement:"Element is not an input or textarea",notSelectElement:"Element is not a select element",optionNotFound:'Option "{{text}}" not found'}}},zhCN={ui:{panel:{ready:"准备就绪",thinking:"正在思考...",taskInput:"输入新任务,详细描述步骤,回车提交",userAnswerPrompt:"请回答上面问题,回车提交",taskTerminated:"任务已终止",taskCompleted:"任务结束",userAnswer:"用户回答: {{input}}",question:"询问: {{question}}",waitingPlaceholder:"等待任务开始...",stop:"终止",expand:"展开历史",collapse:"收起历史",step:"步骤 {{number}} · {{time}}{{duration}}"},tools:{clicking:"正在点击元素 [{{index}}]...",inputting:"正在输入文本到元素 [{{index}}]...",selecting:'正在选择选项 "{{text}}"...',scrolling:"正在滚动页面...",waiting:"等待 {{seconds}} 秒...",askingUser:"正在询问用户...",done:"结束任务",clicked:"🖱️ 已点击元素 [{{index}}]",inputted:'⌨️ 已输入文本 "{{text}}"',selected:'☑️ 已选择选项 "{{text}}"',scrolled:"🛞 页面滚动完成",waited:"⌛️ 等待完成",executing:"正在执行 {{toolName}}...",resultSuccess:"成功",resultFailure:"失败",resultError:"错误"},errors:{elementNotFound:"未找到索引为 {{index}} 的交互元素",taskRequired:"任务描述不能为空",executionFailed:"任务执行失败",notInputElement:"元素不是输入框或文本域",notSelectElement:"元素不是选择框",optionNotFound:'未找到选项 "{{text}}"'}}},locales={"en-US":enUS,"zh-CN":zhCN},_t=class _t{language;translations;constructor(n="en-US"){this.language=n in locales?n:"en-US",this.translations=locales[this.language]}t(n,r){const o=this.getNestedValue(this.translations,n);return o?r?this.interpolate(o,r):o:(console.warn(`Translation key "${n}" not found for language "${this.language}"`),n)}getNestedValue(n,r){return r.split(".").reduce((o,t)=>o?.[t],n)}interpolate(n,r){return n.replace(/\{\{(\w+)\}\}/g,(o,t)=>r[t]!=null?r[t].toString():o)}getLanguage(){return this.language}};s(_t,"I18n");let I18n=_t;function truncate(e,n){return e.length>n?e.substring(0,n)+"...":e}s(truncate,"truncate");function escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}s(escapeHtml,"escapeHtml");const wrapper$1="_wrapper_gtdpc_1",background="_background_gtdpc_39",header="_header_gtdpc_99",pulse="_pulse_gtdpc_1",retryPulse="_retryPulse_gtdpc_1",statusTextFadeOut="_statusTextFadeOut_gtdpc_1",statusTextFadeIn="_statusTextFadeIn_gtdpc_1",statusSection="_statusSection_gtdpc_121",indicator="_indicator_gtdpc_128",thinking="_thinking_gtdpc_137",tool_executing="_tool_executing_gtdpc_142",retry="_retry_gtdpc_147",completed="_completed_gtdpc_153",input="_input_gtdpc_154",output="_output_gtdpc_155",error="_error_gtdpc_160",statusText="_statusText_gtdpc_166",fadeOut="_fadeOut_gtdpc_178",fadeIn="_fadeIn_gtdpc_182",controls="_controls_gtdpc_188",controlButton="_controlButton_gtdpc_193",stopButton="_stopButton_gtdpc_212",historySectionWrapper="_historySectionWrapper_gtdpc_246",shimmer="_shimmer_gtdpc_1",celebrate="_celebrate_gtdpc_1",expanded="_expanded_gtdpc_278",historySection="_historySection_gtdpc_246",historyItem="_historyItem_gtdpc_297",observation="_observation_gtdpc_355",question="_question_gtdpc_360",doneSuccess="_doneSuccess_gtdpc_366",historyContent="_historyContent_gtdpc_402",statusIcon="_statusIcon_gtdpc_403",doneError="_doneError_gtdpc_412",reflectionLines="_reflectionLines_gtdpc_462",historyMeta="_historyMeta_gtdpc_469",inputSectionWrapper="_inputSectionWrapper_gtdpc_539",hidden="_hidden_gtdpc_562",inputSection="_inputSection_gtdpc_539",taskInput="_taskInput_gtdpc_573",styles$1={wrapper:wrapper$1,"mask-running":"_mask-running_gtdpc_1",background,header,pulse,retryPulse,statusTextFadeOut,statusTextFadeIn,statusSection,indicator,thinking,tool_executing,retry,completed,input,output,error,statusText,fadeOut,fadeIn,controls,controlButton,stopButton,historySectionWrapper,shimmer,celebrate,expanded,historySection,historyItem,observation,question,doneSuccess,historyContent,statusIcon,doneError,reflectionLines,historyMeta,inputSectionWrapper,hidden,inputSection,taskInput};function createCard({icon:e,content:n,meta:r,type:o}){const t=o?styles$1[o]:"",i=Array.isArray(n)?`<div class="${styles$1.reflectionLines}">${n.join("")}</div>`:`<span>${escapeHtml(n)}</span>`;return`
248
248
  <div class="${styles$1.historyItem} ${t}">
249
249
  <div class="${styles$1.historyContent}">
250
250
  <span class="${styles$1.statusIcon}">${e}</span>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "page-agent",
3
3
  "private": false,
4
- "version": "1.0.1",
4
+ "version": "1.1.0",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/page-agent.js",
7
7
  "module": "./dist/esm/page-agent.js",
@@ -46,9 +46,9 @@
46
46
  "dependencies": {
47
47
  "chalk": "^5.6.2",
48
48
  "zod": "^4.3.5",
49
- "@page-agent/llms": "1.0.1",
50
- "@page-agent/page-controller": "1.0.1",
51
- "@page-agent/core": "1.0.1",
52
- "@page-agent/ui": "1.0.1"
49
+ "@page-agent/llms": "1.1.0",
50
+ "@page-agent/page-controller": "1.1.0",
51
+ "@page-agent/core": "1.1.0",
52
+ "@page-agent/ui": "1.1.0"
53
53
  }
54
54
  }