@browserless.io/cli 0.6.1 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 (2026-11-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * use saved cloud profiles for agent sign-in with `agent --cloud-profile <name>`; the agent no longer asks for a username and password
9
+
3
10
  ## 0.6.1 (2026-11-13)
4
11
 
5
12
 
package/README.md CHANGED
@@ -303,19 +303,28 @@ browserless agent "find the opening hours of the Louvre"
303
303
 
304
304
  # Scripts: stdout carries only the final result as JSON (progress goes to stderr)
305
305
  browserless agent "find the opening hours of the Louvre" --json
306
+
307
+ # Save a signed-in local browser once, then use its cloud profile
308
+ browserless profile upload --browser chrome --profile Personal --name github
309
+ browserless agent --cloud-profile github "star browserless/browserless on GitHub"
306
310
  ```
307
311
 
308
312
  - Follow-up messages continue the same session. Ctrl-C stops the current
309
313
  turn; press it again (or send an empty line) to exit.
310
314
  - When the agent pauses for input — for example a one-time code — the CLI
311
315
  prompts you for it.
312
- - If your first message asks the agent to log in somewhere, the CLI asks
313
- for a username and password (the password is masked) and sends them to
314
- the hosted agent together with your task. Leave the prompts blank to
315
- skip.
316
+ - For signed-in tasks, upload a signed-in browser with
317
+ `browserless profile upload --name <name> --browser <browser> --profile <local-profile>` and pass that cloud name with
318
+ `browserless agent --cloud-profile <name>`. The CLI validates the name and
319
+ checks that it exists before starting the agent. Run `browserless profile list`
320
+ to see your cloud profiles. A login-looking first message without the flag
321
+ prints a tip instead of asking for credentials. The agent is instructed never
322
+ to ask for passwords or other secrets and to stop when sign-in is needed.
323
+ If the saved profile is no longer signed in, update it with
324
+ `browserless profile refresh --name <name>`.
316
325
  - Prompts you type are kept in `~/.browserless/agent_history` (mode 0600,
317
- last 200) so the up arrow recalls them across sessions; usernames,
318
- passwords and codes are never written there. `--no-history` turns the
326
+ last 200) so the up arrow recalls them across sessions; one-time codes
327
+ are never written there. `--no-history` turns the
319
328
  file off.
320
329
 
321
330
  ## ⚙️ Shared Flags
@@ -1 +1 @@
1
- var n=Object.defineProperty;var t=(e,o)=>n(e,"name",{value:o,configurable:!0});import{apiFetch as i}from"./client.js";import{UsageError as l}from"../errors.js";const c=t(async(e,o={})=>i(e,{method:"GET",path:"/profiles",query:{...o.limit!==void 0?{limit:o.limit}:{},...o.offset!==void 0?{offset:o.offset}:{}}}),"listProfiles"),r=t(e=>{if(e==="."||e==="..")throw new l(`"${e}" is not a valid profile name.`);return`/profile/${encodeURIComponent(e)}`},"profilePath"),h=t(async(e,o)=>i(e,{method:"GET",path:r(o)}),"getProfile"),m=t(async(e,o,f)=>i(e,{method:"PUT",path:r(o),body:{name:f}}),"renameProfile"),a=t(async(e,o)=>i(e,{method:"DELETE",path:r(o)}),"deleteProfile");export{a as deleteProfile,h as getProfile,c as listProfiles,m as renameProfile};
1
+ var n=Object.defineProperty;var t=(o,e)=>n(o,"name",{value:e,configurable:!0});import{apiFetch as i}from"./client.js";import{UsageError as f}from"../errors.js";import{terminalSafe as s}from"../utils/terminal.js";const a=t(o=>{if(!o||o.length>255||!/^[^\s/?#]+$/.test(o)||o==="."||o==="..")throw new f(`"${s(o)}" is not a valid cloud profile name: use 1-255 characters with no whitespace, "/", "?" or "#".`,"invalid-cloud-profile-name");return o},"assertCloudProfileName"),m=t(async(o,e={})=>i(o,{method:"GET",path:"/profiles",query:{...e.limit!==void 0?{limit:e.limit}:{},...e.offset!==void 0?{offset:e.offset}:{}}}),"listProfiles"),r=t(o=>{if(o==="."||o==="..")throw new f(`"${o}" is not a valid profile name.`);return`/profile/${encodeURIComponent(o)}`},"profilePath"),u=t(async(o,e)=>i(o,{method:"GET",path:r(e)}),"getProfile"),P=t(async(o,e,l)=>i(o,{method:"PUT",path:r(e),body:{name:l}}),"renameProfile"),w=t(async(o,e)=>i(o,{method:"DELETE",path:r(e)}),"deleteProfile");export{a as assertCloudProfileName,w as deleteProfile,u as getProfile,m as listProfiles,P as renameProfile};
@@ -1,8 +1,5 @@
1
- var d=Object.defineProperty;var s=(t,e)=>d(t,"name",{value:e,configurable:!0});import{green as m,red as p}from"../utils/ansi.js";import{isAgentEndResult as h}from"../agent/types.js";import{terminalSafe as g}from"../utils/terminal.js";const y=/\b(log[- _]?in|sign[- _]?in|sign[- _]?up|authenticate|log on)/i,A=s(t=>y.test(t),"hasLoginIntent"),R=s(t=>{if(typeof t!="string")return;const e=t.trim();return e||void 0},"normalizeRationale"),S=s((t,e)=>{const n=[];return e.username&&n.push(`USERNAME=${e.username}`),e.password&&n.push(`PASSWORD=${e.password}`),n.length===0?t:`Credentials available for this task (do not echo back):
2
- ${n.join(`
3
- `)}
4
-
5
- `+t},"withCredentials"),b=s((t,e)=>{const n=typeof t=="string"?t:t===null||typeof t!="object"?String(t):JSON.stringify(t),o=[...n];return o.length>e?`${o.slice(0,e-1).join("")}\u2026`:n},"previewValue"),_=/^(pass(word|code)?|secret|token|auth(orization)?|cookie|credentials?|api[-_]?key|otp|mfa|text|value)$/i,w=s((t,e=60)=>{if(!t||typeof t!="object")return"";const n=t;if(Array.isArray(n.commands)){const r=n.commands;return[...`${r.length} cmds: ${r.map(i=>i&&typeof i=="object"&&"method"in i&&typeof i.method=="string"?i.method:"?").join(" \u2192 ")}`].slice(0,e).join("")}const o=Object.entries(n).filter(([,r])=>r!==void 0);if(o.length===0)return"";const c=[];let l=0;for(const[r,a]of o){const i=_.test(r)?"[REDACTED]":b(a,30),u=`${r}=${i}`,f=[...u].length;if(l+f+2>e)break;c.push(u),l+=f+2}return c.join(" ")},"summarizeParams"),N=s((t,e)=>{const n=e&&typeof e=="object"?e:{};if(t==="browserless_skill")return{method:"skill",params:{id:n.id}};if(t==="browserless_agent"){const o=n.commands;return Array.isArray(o)&&o.length>0?{method:"commands",params:{commands:o}}:{method:typeof n.method=="string"?n.method:"agent",params:n.params}}return{method:typeof t=="string"?t:"?",params:e}},"unwrapToolCall"),x=s(t=>{if(!h(t.result))return"";const e=t.result,n=[`Result: ${e.success?m("success"):p("failed")}`];for(const o of["reason_code","final_url","evidence"])if(typeof e[o]=="string"){const c=` ${o}: `;n.push(c+g(e[o],{preserveLayout:o==="evidence"}).replaceAll(`
1
+ var d=Object.defineProperty;var o=(e,t)=>d(e,"name",{value:t,configurable:!0});import{green as h,red as p}from"../utils/ansi.js";import{isAgentEndResult as m}from"../agent/types.js";import{terminalSafe as g}from"../utils/terminal.js";const y=/\b(log[- _]?in|sign[- _]?in|sign[- _]?up|authenticate|log on)/i,v=o(e=>y.test(e),"hasLoginIntent"),A=o(e=>{if(typeof e!="string")return;const t=e.trim();return t||void 0},"normalizeRationale"),j="Tip: the agent can't sign in for you. Save a signed-in browser with `browserless profile upload --name <name> --browser <browser> --profile <local-profile>`, then rerun with `browserless agent --cloud-profile <name>`.",E=o((e,t={})=>{const s=JSON.stringify(t.cloudProfile),r=t.cloudProfile&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(t.cloudProfile)?`\`browserless profile refresh --name ${t.cloudProfile}\``:"`browserless profile refresh --name <name>`, quoting the profile name for their shell";return["Instructions from the Browserless CLI (not typed by the user):",...t.cloudProfile?[`- Open every new browser session with the user's saved cloud profile ${s}: pass "profile": ${s} to browserless_agent whenever you start a session without a sessionId. Keep reusing that session's sessionId afterwards.`,`- Never ask the user for a password, API key, or other secret, and never ask them to type one into this chat. If a site still asks you to sign in, stop and say the saved profile is not signed in there; the user can update it with ${r}.`]:["- Never ask the user for a password, API key, or other secret, and never ask them to type one into this chat. If a site requires signing in, stop and say sign-in is needed; the user can save a signed-in browser with `browserless profile upload --name <name> --browser <browser> --profile <local-profile>` and rerun with `browserless agent --cloud-profile <name>`."],"- You may still ask the user for a one-time verification code that a site sends during sign-in.","","User task:",e].join(`
2
+ `)},"buildFirstTurn"),w=o((e,t)=>{const s=typeof e=="string"?e:e===null||typeof e!="object"?String(e):JSON.stringify(e),r=[...s];return r.length>t?`${r.slice(0,t-1).join("")}\u2026`:s},"previewValue"),b=/^(pass(word|code)?|secret|token|auth(orization)?|cookie|credentials?|api[-_]?key|otp|mfa|text|value)$/i,P=o((e,t=60)=>{if(!e||typeof e!="object")return"";const s=e;if(Array.isArray(s.commands)){const n=s.commands;return[...`${n.length} cmds: ${n.map(i=>i&&typeof i=="object"&&"method"in i&&typeof i.method=="string"?i.method:"?").join(" \u2192 ")}`].slice(0,t).join("")}const r=Object.entries(s).filter(([,n])=>n!==void 0);if(r.length===0)return"";const a=[];let l=0;for(const[n,c]of r){const i=b.test(n)?"[REDACTED]":w(c,30),u=`${n}=${i}`,f=[...u].length;if(l+f+2>t)break;a.push(u),l+=f+2}return a.join(" ")},"summarizeParams"),N=o((e,t)=>{const s=t&&typeof t=="object"?t:{};if(e==="browserless_skill")return{method:"skill",params:{id:s.id}};if(e==="browserless_agent"){const r=s.commands;return Array.isArray(r)&&r.length>0?{method:"commands",params:{commands:r}}:{method:typeof s.method=="string"?s.method:"agent",params:s.params}}return{method:typeof e=="string"?e:"?",params:t}},"unwrapToolCall"),R=o(e=>{if(!m(e.result))return"";const t=e.result,s=[`Result: ${t.success?h("success"):p("failed")}`];for(const r of["reason_code","final_url","evidence"])if(typeof t[r]=="string"){const a=` ${r}: `;s.push(a+g(t[r],{preserveLayout:r==="evidence"}).replaceAll(`
6
3
  `,`
7
- ${" ".repeat(c.length)}`))}return n.join(`
8
- `)},"formatEndResult");export{x as formatEndResult,A as hasLoginIntent,R as normalizeRationale,w as summarizeParams,N as unwrapToolCall,S as withCredentials};
4
+ ${" ".repeat(a.length)}`))}return s.join(`
5
+ `)},"formatEndResult");export{j as LOGIN_TIP,E as buildFirstTurn,R as formatEndResult,v as hasLoginIntent,A as normalizeRationale,P as summarizeParams,N as unwrapToolCall};
@@ -1,4 +1 @@
1
- var m=Object.defineProperty;var c=(s,u)=>m(s,"name",{value:u,configurable:!0});import d from"node:readline/promises";import{stdin as E,stdout as y}from"node:process";const b=200,p="",T="\x7F",g=c((s,u,e=y,t=E)=>({async line(o){const r=d.createInterface({input:t,output:e,history:s,historySize:b,removeHistoryDuplicates:!0});try{const i=(await r.question(o)).trim();return u(s).catch(()=>{}),i}finally{r.close()}},async linePrivate(o){const r=d.createInterface({input:t,output:e});try{return(await r.question(o)).trim()}finally{r.close()}},password(o){return new Promise((r,i)=>{if(!t.isTTY){i(new Error("Password input requires an interactive terminal (TTY)."));return}e.write(o),t.setRawMode?.(!0),t.resume(),t.setEncoding("utf8");let a="";const f=c(()=>{t.off("data",l),t.setRawMode?.(!1),t.pause()},"cleanup"),l=c(w=>{for(const n of w){if(n==="\r"||n===`
2
- `){f(),e.write(`
3
- `),r(a);return}if(n===p){f(),e.write(`
4
- `),i(new Error("aborted"));return}if(n===T||n==="\b"){a.length>0&&(a=a.slice(0,-1),e.write("\b \b"));continue}a+=n,e.write("*")}},"onData");t.on("data",l)})}}),"buildPrompts");export{g as buildPrompts};
1
+ var c=Object.defineProperty;var a=(e,r)=>c(e,"name",{value:r,configurable:!0});import s from"node:readline/promises";import{stdin as l,stdout as p}from"node:process";const m=200,I=a((e,r,i=p,o=l)=>({async line(n){const t=s.createInterface({input:o,output:i,history:e,historySize:m,removeHistoryDuplicates:!0});try{const u=(await t.question(n)).trim();return r(e).catch(()=>{}),u}finally{t.close()}},async linePrivate(n){const t=s.createInterface({input:o,output:i});try{return(await t.question(n)).trim()}finally{t.close()}}}),"buildPrompts");export{I as buildPrompts};
@@ -1,14 +1,15 @@
1
- var S=Object.defineProperty;var r=(e,c)=>S(e,"name",{value:c,configurable:!0});import{stdout as x,stderr as E}from"node:process";import{buildClient as _,printJson as A}from"../../cli-utils/client.js";import{buildPrompts as P}from"../../cli-utils/prompts.js";import{ApiError as T}from"../../errors.js";import{AgentClient as $}from"../../agent/ws-client.js";import{loadHistory as L,saveHistory as v}from"../../agent/history.js";import{normalizeRationale as I,formatEndResult as R,hasLoginIntent as B,summarizeParams as z,unwrapToolCall as F,withCredentials as G}from"../../cli-utils/agent-format.js";import{colorsFor as h}from"../../utils/ansi.js";import{Spinner as H}from"../../utils/spinner.js";import{terminalSafe as k}from"../../utils/terminal.js";const M={buildClient:_,makeClient:r(e=>new $(e),"makeClient")},b=r(e=>new Promise(c=>{const n=r(()=>{e.off("end",d),e.off("awaiting_input",o),e.off("agent_error",l),e.off("close",s)},"cleanup"),d=r(p=>{n(),c({kind:"end",payload:p})},"onEnd"),o=r(p=>{n(),c({kind:"awaiting_input",payload:p})},"onAwait"),l=r(p=>{n(),c({kind:"error",payload:p})},"onErr"),s=r(()=>{n(),c({kind:"closed"})},"onClose");e.once("end",d),e.once("awaiting_input",o),e.once("agent_error",l),e.once("close",s)}),"waitForTurnEnd"),j=r((e,c)=>{const n=c?E:x,d=h(n),o=new H({out:n}),l=new Map;let s="idle";const p=r(()=>{s==="status"&&(o.clear(),n.write(`
2
- `))},"ensureTextStart"),g=r(()=>{s==="text"&&n.write(`
3
- `),s==="status"&&o.clear()},"ensureLineEndedBeforeBlock");e.on("data",t=>{typeof t.text!="string"||t.text.length===0||(p(),s="text",n.write(k(t.text.replace(/\r$/,""),{preserveLayout:!0})))});const m=r(({rationale:t,method:a,summary:w})=>{const i=[];return t&&i.push({text:`${t}: `}),a&&a!=="commands"&&(i.push({text:a,style:d.gray}),w&&i.push({text:" "})),w&&i.push({text:w,style:d.dim}),i},"formatLine");return e.on("tool_call",t=>{s==="text"&&n.write(`
4
- `);const{method:a,params:w}=F(t.method,t.params),i=I(t.rationale),u={rationale:i?k(i):void 0,summary:k(z(w)),method:k(a)};l.set(t.id??"",u),s="status",o.set(m(u))}),e.on("tool_result",t=>{const a=l.get(t.id??"")??{method:"?",summary:""};l.delete(t.id??""),s==="text"&&n.write(`
5
- `),o.done([{text:t.ok?"\u2713":"\u2717",style:t.ok?d.green:d.red},{text:" "},...m(a)]),s="idle"}),e.on("usage",()=>{}),{printEnd:r(t=>{if(g(),s="idle",c){A({type:"end",result:t.result??null});return}const a=R(t);n.write(a?`
6
- ${a}
1
+ var C=Object.defineProperty;var n=(e,c)=>C(e,"name",{value:c,configurable:!0});import{stdout as x,stderr as P}from"node:process";import{buildClient as S,printJson as _}from"../../cli-utils/client.js";import{buildPrompts as T}from"../../cli-utils/prompts.js";import{ApiError as E,UsageError as $}from"../../errors.js";import{assertCloudProfileName as A,getProfile as I}from"../../api/profiles.js";import{AgentClient as L}from"../../agent/ws-client.js";import{loadHistory as R,saveHistory as v}from"../../agent/history.js";import{normalizeRationale as B,formatEndResult as F,hasLoginIntent as G,summarizeParams as N,unwrapToolCall as z,buildFirstTurn as H,LOGIN_TIP as M}from"../../cli-utils/agent-format.js";import{colorsFor as g}from"../../utils/ansi.js";import{Spinner as U}from"../../utils/spinner.js";import{terminalSafe as w}from"../../utils/terminal.js";const j={buildClient:S,getProfile:I,makeClient:n(e=>new L(e),"makeClient")},b=n(e=>new Promise(c=>{const r=n(()=>{e.off("end",d),e.off("awaiting_input",i),e.off("agent_error",a),e.off("close",s)},"cleanup"),d=n(u=>{r(),c({kind:"end",payload:u})},"onEnd"),i=n(u=>{r(),c({kind:"awaiting_input",payload:u})},"onAwait"),a=n(u=>{r(),c({kind:"error",payload:u})},"onErr"),s=n(()=>{r(),c({kind:"closed"})},"onClose");e.once("end",d),e.once("awaiting_input",i),e.once("agent_error",a),e.once("close",s)}),"waitForTurnEnd"),D=n((e,c)=>{const r=c?P:x,d=g(r),i=new U({out:r}),a=new Map;let s="idle";const u=n(()=>{s==="status"&&(i.clear(),r.write(`
2
+ `))},"ensureTextStart"),h=n(()=>{s==="text"&&r.write(`
3
+ `),s==="status"&&i.clear()},"ensureLineEndedBeforeBlock");e.on("data",t=>{typeof t.text!="string"||t.text.length===0||(u(),s="text",r.write(w(t.text.replace(/\r$/,""),{preserveLayout:!0})))});const y=n(({rationale:t,method:l,summary:m})=>{const o=[];return t&&o.push({text:`${t}: `}),l&&l!=="commands"&&(o.push({text:l,style:d.gray}),m&&o.push({text:" "})),m&&o.push({text:m,style:d.dim}),o},"formatLine");return e.on("tool_call",t=>{s==="text"&&r.write(`
4
+ `);const{method:l,params:m}=z(t.method,t.params),o=B(t.rationale),f={rationale:o?w(o):void 0,summary:w(N(m)),method:w(l)};a.set(t.id??"",f),s="status",i.set(y(f))}),e.on("tool_result",t=>{const l=a.get(t.id??"")??{method:"?",summary:""};a.delete(t.id??""),s==="text"&&r.write(`
5
+ `),i.done([{text:t.ok?"\u2713":"\u2717",style:t.ok?d.green:d.red},{text:" "},...y(l)]),s="idle"}),e.on("usage",()=>{}),{printEnd:n(t=>{if(h(),s="idle",c){_({type:"end",result:t.result??null});return}const l=F(t);r.write(l?`
6
+ ${l}
7
7
  `:`
8
- `)},"printEnd"),clearStatus:r(()=>{g(),s="idle"},"clearStatus"),dispose:r(()=>o.clear(),"dispose")}},"createRenderer"),D=r((e,c)=>{let n=0;const d=r(()=>{if(n+=1,n===1){c(),process.stderr.write(h(process.stderr).gray(`
8
+ `)},"printEnd"),clearStatus:n(()=>{h(),s="idle"},"clearStatus"),dispose:n(()=>i.clear(),"dispose")}},"createRenderer"),J=n((e,c)=>{let r=0;const d=n(()=>{if(r+=1,r===1){c(),process.stderr.write(g(process.stderr).gray(`
9
9
  (stop sent \u2014 press Ctrl-C again to exit)
10
- `));try{e.stop()}catch{}}else process.exit(130)},"handler"),o=["SIGINT","SIGBREAK"];return o.forEach(l=>process.on(l,d)),()=>o.forEach(l=>process.off(l,d))},"installSigint"),O=r(async(e,c,n=M)=>{const d=!!e.json,o=await n.buildClient(e),l=d?E:x;l.write(h(l).dim(`agent \u2192 ${o.server} (token from ${o.source})
11
- `));const s=e.history!==!1&&!c,p=s?await L().catch(()=>[]):[],m=c??P(p,s?i=>v(i):async()=>{},l),t=n.makeClient({server:o.server,token:o.token});await t.connect();const a=j(t,d),w=D(t,a.clearStatus);try{let i=!0;for(;;){let u;if(i&&e.prompt)u=e.prompt;else{try{u=await m.line("> ")}catch{break}if(u===""){if(i)continue;break}}if(i&&B(u))try{const y=await m.linePrivate("Username (blank to skip): "),C=y?await m.password("Password (blank to skip): "):"";u=G(u,{username:y,password:C})}catch{break}i?t.start(u):t.send(u),i=!1;let f=await b(t);for(;f.kind==="awaiting_input";){const y=await m.linePrivate("Enter code: ");if(!y){f={kind:"closed"};break}t.send(y),f=await b(t)}if(f.kind==="closed")break;if(f.kind==="error"){if(a.clearStatus(),process.stderr.write(`error: ${k(f.payload.message||f.payload.code||"unknown",{preserveLayout:!0}).replaceAll(`
10
+ `));try{e.stop()}catch{}}else process.exit(130)},"handler"),i=["SIGINT","SIGBREAK"];return i.forEach(a=>process.on(a,d)),()=>i.forEach(a=>process.off(a,d))},"installSigint"),oe=n(async(e,c,r=j)=>{e.cloudProfile!==void 0&&A(e.cloudProfile);const d=!!e.json,i=await r.buildClient(e),a=d?P:x;if(a.write(g(a).dim(`agent \u2192 ${i.server} (token from ${i.source})
11
+ `)),e.cloudProfile)try{await r.getProfile(i,e.cloudProfile)}catch(o){throw o instanceof E&&o.status===404?new $(`Cloud profile "${w(e.cloudProfile)}" was not found for this token. Use the name you passed to --name when you ran \`browserless profile upload\`; run \`browserless profile list\` to see your profiles.`,"cloud-profile-not-found"):o}const s=e.history!==!1&&!c,u=s?await R().catch(()=>[]):[],y=c??T(u,s?o=>v(o):async()=>{},a),t=r.makeClient({server:i.server,token:i.token});await t.connect();const l=D(t,d),m=J(t,l.clearStatus);try{let o=!0;for(;;){let f;if(o&&e.prompt)f=e.prompt;else{try{f=await y.line("> ")}catch{break}if(f===""){if(o)continue;break}}o&&!e.cloudProfile&&G(f)&&a.write(`${M}
12
+ `),o?t.start(H(f,{cloudProfile:e.cloudProfile})):t.send(f),o=!1;let p=await b(t);for(;p.kind==="awaiting_input";){const k=await y.linePrivate("Enter code: ");if(!k){p={kind:"closed"};break}t.send(k),p=await b(t)}if(p.kind==="closed")break;if(p.kind==="error"){if(l.clearStatus(),process.stderr.write(`error: ${w(p.payload.message||p.payload.code||"unknown",{preserveLayout:!0}).replaceAll(`
12
13
  `,`
13
14
  `)}
14
- `),f.payload.retryable!==!0)throw new T("Agent session ended with an error.",0,void 0,"agent-session-error");continue}a.printEnd(f.payload)}}finally{w(),a.dispose(),t.close()}},"runAgentChat");export{O as runAgentChat};
15
+ `),p.payload.retryable!==!0)throw new E("Agent session ended with an error.",0,void 0,"agent-session-error");continue}l.printEnd(p.payload)}}finally{m(),l.dispose(),t.close()}},"runAgentChat");export{oe as runAgentChat};
@@ -1 +1 @@
1
- var i=Object.defineProperty;var r=(e,t)=>i(e,"name",{value:t,configurable:!0});import{addClientFlags as n}from"../../cli-utils/client.js";import{runAgentChat as a}from"./chat.js";const c=r(e=>{const t=e.command("agent [prompt]").description("Interactive chat with the Browserless hosted agent. The LLM runs server-side; the browser is driven for you.").option("--no-history","Disable reading + writing ~/.browserless/agent_history").action((o,s)=>a({...s,prompt:o}));n(t)},"registerAgent");export{c as registerAgent};
1
+ var i=Object.defineProperty;var o=(e,r)=>i(e,"name",{value:r,configurable:!0});import{addClientFlags as n}from"../../cli-utils/client.js";import{runAgentChat as a}from"./chat.js";const h=o(e=>{const r=e.command("agent [prompt]").description("Interactive chat with the Browserless hosted agent. The LLM runs server-side; the browser is driven for you.").option("--no-history","Disable reading + writing ~/.browserless/agent_history").option("--cloud-profile <name>","Open every browser session with this saved cloud profile (see `browserless profile list`)").action((s,t)=>a({...t,prompt:s}));n(r)},"registerAgent");export{h as registerAgent};
package/build/version.js CHANGED
@@ -1 +1 @@
1
- const o="0.6.1";export{o as version};
1
+ const o="0.7.0";export{o as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserless.io/cli",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Browserless CLI — manage authentication profiles, sessions, and other Browserless features from your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "commander": "^15.1.0",
49
- "string-width": "^8.3.0",
50
- "ws": "^8.22.2"
49
+ "string-width": "^9.0.0",
50
+ "ws": "^8.23.0"
51
51
  },
52
52
  "optionalDependencies": {
53
53
  "@napi-rs/keyring": "^2.1.2"
@@ -63,15 +63,15 @@
63
63
  "chai": "^6.3.0",
64
64
  "chrome-remote-interface": "^0.34.0",
65
65
  "esbuild": "^0.28.2",
66
- "eslint": "^10.14.0",
66
+ "eslint": "^10.15.0",
67
67
  "globals": "^17.14.0",
68
68
  "husky": "^9.1.7",
69
- "lint-staged": "^17.6.0",
69
+ "lint-staged": "^17.6.1",
70
70
  "mocha": "^12.0.3",
71
- "prettier": "3.9.10",
71
+ "prettier": "3.10.1",
72
72
  "sinon": "^22.1.0",
73
73
  "typescript": "^6.0.3",
74
- "typescript-eslint": "^8.72.2"
74
+ "typescript-eslint": "^8.73.0"
75
75
  },
76
76
  "overrides": {
77
77
  "mocha": {