@robota-sdk/agent-cli 3.0.0-beta.95 → 3.0.0-beta.96

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,31 @@
1
1
  # @robota-sdk/agent-cli
2
2
 
3
+ ## 3.0.0-beta.96
4
+ ### Minor Changes
5
+
6
+ - 68dda38: MCP Apps: a tool's declared view can ride its result to a surface that can host it.
7
+
8
+ `agent-mcp` declares the `io.modelcontextprotocol/ui` extension only when the host opts in
9
+ (`IMCPOpenSessionOptions.apps`), on both protocol eras. A tool's `_meta.ui` reference (a `ui://`
10
+ resource and its audience) is kept in discovery and the catalog only when the server declared the
11
+ extension and resources too; a malformed declaration is reported by a fixed reason and the tool is
12
+ still offered without a view, and a tool the server hides from the model is rejected with a reason
13
+ rather than offered. `IMCPSession` gains `readResource` (a general `resources/read`, also on
14
+ `MCPConnectionSupervisor`) and `apps`; a custom `IMCPSession` implementation must add `readResource`.
15
+ After a successful call, `DiscoveredMCPTool` reads the declared resource and, when it is one
16
+ `text/html;profile=mcp-app` document within the size bound, attaches `IToolResult.view`; otherwise the
17
+ text result is unchanged and the omission is reported. The view never enters model context.
18
+
19
+ `agent-cli` opts in only for the plain `--serve` host that the desktop app and web GUI drive, not the
20
+ TUI, print runs, `mcp serve` or the ACP agent.
21
+
22
+ ### Patch Changes
23
+
24
+ - fbb287d: Show a finished MCP tool call's app in an opaque frame with a source-bound JSON-RPC bridge. App callbacks use the session's view authority and permission prompt. Session changes and frame disposal reject pending local requests.
25
+
26
+ Hosts can provide a sandbox URL through `SessionSurface`. The web GUI serves a separate sandbox document with content restrictions and `Connection-Allowlist` enforcement. App execution requires Chromium 158 or newer and native network isolation; other browsers and hosts without the response policy show an unavailable message and retain the text result. A surface without a sandbox URL never reads the app document.
27
+ - Keep E2B out of the base Node installation and defer SDK loading until stock hosted execution is selected. Install `e2b@2.51.0` alongside the CLI in the same project or global prefix to enable that capability. A missing SDK produces installation guidance before admission requests and never falls back to host execution. Public E2B exports and injected executors remain compatible; stock native binaries retain the embedded SDK, and consumer native builds require it as explicit build tooling.
28
+
3
29
  ## 3.0.0-beta.95
4
30
  ### Minor Changes
5
31
 
package/dist/node/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  ;(function(){var v=parseInt(process.versions.node.split('.')[0],10);if(v<22){process.stderr.write('\n✗ Node.js 22+ is required (current: '+process.version+')\n\nUpgrade:\n nvm: nvm install 22 && nvm use 22\n Volta: volta install node@22\n Download: https://nodejs.org/en/download\n\n');process.exit(1);}})();
3
- import{Bt as e,J as t,Pt as n,dt as r,f as i,ht as a,n as o,xt as s}from"./node-Bxcf0vqP.js";import{A as c,C as l,D as u,E as d,F as f,M as p,N as m,O as h,P as g,R as _,S as v,T as ee,_ as te,b as ne,d as y,f as re,g as ie,h as ae,j as oe,k as se,l as ce,m as le,o as b,p as ue,s as x,t as de,u as fe,v as S,w as C,x as pe,y as me}from"./cli-core-DJIgDK0t.js";import{watch as he}from"node:fs";import{basename as ge,dirname as _e,join as ve}from"node:path";import{mkdir as ye,readFile as w,writeFile as be}from"node:fs/promises";import{Readable as xe}from"node:stream";import T,{Chalk as Se,backgroundColorNames as Ce,foregroundColorNames as E}from"chalk";import{Box as D,Static as we,Text as O,render as Te,useApp as Ee,useBoxMetrics as k,useCursor as De,useInput as Oe,usePaste as ke,useStdout as Ae,useWindowSize as je}from"ink";import A,{createContext as j,useCallback as M,useContext as N,useEffect as P,useLayoutEffect as Me,useMemo as F,useRef as I,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import Ne from"string-width";import{marked as Pe}from"marked";import Fe from"marked-terminal";let Ie=null,Le=!1,Re=`robota`;function ze(){return Le}const V=[`string-width`,`setCursorPosition`,`getStringWidth`,`slice`,`charCodeAt`];function Be(e,t){if(!t)return`rethrow`;let n=e.message??``;return V.some(e=>n.includes(e))?`ime-hint`:`guard-owned`}function Ve(e){Ie=e}function He(e,t){try{if(Ie){Ie.getSession().reportBackgroundError(e,t);return}}catch{}process.stderr.write(`\n[${Re}] ${t}: ${e.message}\n`)}function Ue(e=`robota`){Re=e,!Le&&(Le=!0,process.on(`unhandledRejection`,e=>{He(e instanceof Error?e:Error(String(e)),`unhandled rejection`)}),process.on(`uncaughtException`,e=>{He(e instanceof Error?e:Error(String(e)),`uncaught exception`)}))}let We=!1,Ge=`CLI`;function Ke(e){return`\n[${e}] CJK/IME input error — this is a known issue with macOS Terminal.app.\n Workaround: use iTerm2 (https://iterm2.com) or input your prompt in English.
3
+ import{Bt as e,J as t,Pt as n,dt as r,f as i,ht as a,n as o,xt as s}from"./node-Bxcf0vqP.js";import{A as c,C as l,D as u,E as d,F as f,M as p,N as m,O as h,P as g,R as _,S as v,T as ee,_ as te,b as ne,d as y,f as re,g as ie,h as ae,j as oe,k as se,l as ce,m as le,o as b,p as ue,s as x,t as de,u as fe,v as S,w as C,x as pe,y as me}from"./cli-core-5TE9Su2X.js";import{watch as he}from"node:fs";import{basename as ge,dirname as _e,join as ve}from"node:path";import{mkdir as ye,readFile as w,writeFile as be}from"node:fs/promises";import{Readable as xe}from"node:stream";import T,{Chalk as Se,backgroundColorNames as Ce,foregroundColorNames as E}from"chalk";import{Box as D,Static as we,Text as O,render as Te,useApp as Ee,useBoxMetrics as k,useCursor as De,useInput as Oe,usePaste as ke,useStdout as Ae,useWindowSize as je}from"ink";import A,{createContext as j,useCallback as M,useContext as N,useEffect as P,useLayoutEffect as Me,useMemo as F,useRef as I,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import Ne from"string-width";import{marked as Pe}from"marked";import Fe from"marked-terminal";let Ie=null,Le=!1,Re=`robota`;function ze(){return Le}const V=[`string-width`,`setCursorPosition`,`getStringWidth`,`slice`,`charCodeAt`];function Be(e,t){if(!t)return`rethrow`;let n=e.message??``;return V.some(e=>n.includes(e))?`ime-hint`:`guard-owned`}function Ve(e){Ie=e}function He(e,t){try{if(Ie){Ie.getSession().reportBackgroundError(e,t);return}}catch{}process.stderr.write(`\n[${Re}] ${t}: ${e.message}\n`)}function Ue(e=`robota`){Re=e,!Le&&(Le=!0,process.on(`unhandledRejection`,e=>{He(e instanceof Error?e:Error(String(e)),`unhandled rejection`)}),process.on(`uncaughtException`,e=>{He(e instanceof Error?e:Error(String(e)),`uncaught exception`)}))}let We=!1,Ge=`CLI`;function Ke(e){return`\n[${e}] CJK/IME input error — this is a known issue with macOS Terminal.app.\n Workaround: use iTerm2 (https://iterm2.com) or input your prompt in English.
4
4
  Alternatively, use headless mode: -p "your prompt here"
5
5
 
6
6
  `}function qe(e){Ge=e,!We&&(We=!0,process.on(`uncaughtException`,e=>{let t=Be(e,ze());if(t===`ime-hint`){process.stderr.write(Ke(Ge));return}if(t!==`guard-owned`)throw e}))}const Je=e=>typeof e==`string`,Ye=e=>t=>t===void 0||e(t),Xe={user:!0,"agent-wakeup":!0,peer:!0,external:!0},Ze={driverId:Ye(Je)};({...Ze}),{...Ze},{...Ze},{...Ze},{...Ze},{...Ze},{...Ze},{...Ze},{...Ze},Object.keys(Xe);const Qe=new Set([`get-messages`,`get-history`,`get-context`,`get-status`,`get-commands`,`list-models`,`get-executing`,`get-pending`,`get-execution-workspace`,`read-execution-detail`,`get-agent-definitions`,`get-usage-report`,`list-sessions`,`get-background-tasks`,`get-background-task`,`get-background-job-groups`,`get-background-job-group`,`wait-background-job-group`,`read-background-task-log`,`get-settings`,`project-status`,`project-diff`,`project-memory`]);function $e(e){return Qe.has(e)}const et=new Set([` `,`