@hyperdrive.bot/paseo-server 0.3.15 → 0.3.18
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/dist/server/server/agent/providers/claude/transport/pty-query.d.ts +22 -0
- package/dist/server/server/agent/providers/claude/transport/pty-query.js +135 -2
- package/dist/server/web-ui/_expo/static/js/web/{index-638e4dd51cc8b1802850f1fd8ad63b97.js → index-7ee29557905442c87b453da378ef2286.js} +7 -7
- package/dist/server/web-ui/_expo/static/js/web/index-7ee29557905442c87b453da378ef2286.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-7ee29557905442c87b453da378ef2286.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-638e4dd51cc8b1802850f1fd8ad63b97.js.map.br → index-7ee29557905442c87b453da378ef2286.js.map.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-638e4dd51cc8b1802850f1fd8ad63b97.js.map.gz → index-7ee29557905442c87b453da378ef2286.js.map.gz} +0 -0
- package/dist/server/web-ui/index.html +1 -1
- package/dist/server/web-ui/index.html.br +0 -0
- package/dist/server/web-ui/index.html.gz +0 -0
- package/package.json +6 -6
- package/dist/server/web-ui/_expo/static/js/web/index-638e4dd51cc8b1802850f1fd8ad63b97.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-638e4dd51cc8b1802850f1fd8ad63b97.js.gz +0 -0
|
@@ -1103,7 +1103,7 @@ __d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?
|
|
|
1103
1103
|
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"AppOwnership",{enumerable:!0,get:function(){return l.AppOwnership}}),Object.defineProperty(_e,"ExecutionEnvironment",{enumerable:!0,get:function(){return l.ExecutionEnvironment}}),Object.defineProperty(_e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return l.UserInterfaceIdiom}});var n=e(r(d[0])),t=r(d[1]);r(d[2]);var u=e(r(d[3])),l=r(d[4]),o=e(r(d[5]));o.default||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const s=(0,t.requireOptionalNativeModule)('ExpoUpdates');let f=null;if(s){let e;s.manifest?e=s.manifest:s.manifestString&&(e=JSON.parse(s.manifestString)),e&&Object.keys(e).length>0&&(f=e)}let c=null;if(u.default.EXDevLauncher){let e;u.default.EXDevLauncher.manifestString&&(e=JSON.parse(u.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(c=e)}let p=null;if(o.default&&o.default.manifest){const e=o.default.manifest;p='string'==typeof e?JSON.parse(e):e}let b=f??c??p;const E=o.default||{},{appOwnership:O}=E,x=(0,n.default)(E,["name","appOwnership"]),v=Object.assign({},x,{appOwnership:O??null});function _(e){return!h(e)}function h(e){return'metadata'in e}function S(e=!1){if(!b){const e=null===b?'null':'undefined';if(x.executionEnvironment,l.ExecutionEnvironment.Bare,x.executionEnvironment===l.ExecutionEnvironment.StoreClient||x.executionEnvironment===l.ExecutionEnvironment.Standalone)throw new t.CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE',`Constants.manifest is ${e}, must be an object.`)}return b}Object.defineProperties(v,{__unsafeNoWarnManifest:{get(){const e=S(!0);return e&&_(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=S(!0);return e&&h(e)?e:null},enumerable:!1},manifest:{get(){const e=S();return e&&_(e)?e:null},enumerable:!0},manifest2:{get(){const e=S();return e&&h(e)?e:null},enumerable:!0},expoConfig:{get(){const e=S(!0);return e?s&&s.isEmbeddedLaunch?p:h(e)?e.extra?.expoClient??null:_(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.expoGo??null:_(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.eas??null:_(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>b,set(e){b=e},enumerable:!1}});var N=v},1006,[35,4,25,1007,1008,1009]);
|
|
1104
1104
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u={UIManager:((e=t)&&e.__esModule?e:{default:e}).default}},1007,[159]);
|
|
1105
1105
|
__d(function(g,r,i,a,m,e,d){"use strict";var t,n,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AppOwnership",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ExecutionEnvironment",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return o}}),(function(t){t.Expo="expo"})(t||(t={})),(function(t){t.Bare="bare",t.Standalone="standalone",t.StoreClient="storeClient"})(n||(n={})),(function(t){t.Handset="handset",t.Tablet="tablet",t.Desktop="desktop",t.TV="tv",t.Unsupported="unsupported"})(o||(o={}))},1008,[]);
|
|
1106
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var t=r(d[0]);const n=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const t=navigator.userAgent.toLowerCase();if(t.includes('edge'))return'Edge';if(t.includes('edg'))return'Chromium Edge';if(t.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(t.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(t.includes('trident'))return'IE';if(t.includes('firefox'))return'Firefox';if(t.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return t.ExecutionEnvironment.Bare},get sessionId(){return n},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"paseo-hyperdrive\",\"version\":\"0.3.
|
|
1106
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var t=r(d[0]);const n=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const t=navigator.userAgent.toLowerCase();if(t.includes('edge'))return'Edge';if(t.includes('edg'))return'Chromium Edge';if(t.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(t.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(t.includes('trident'))return'IE';if(t.includes('firefox'))return'Firefox';if(t.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return t.ExecutionEnvironment.Bare},get sessionId(){return n},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"paseo-hyperdrive\",\"version\":\"0.3.18\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"paseo\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"Paseo\",\"orientation\":\"portrait\",\"name\":\"Paseo\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"router\":{},\"eas\":{\"build\":{\"experimental\":{\"ios\":{\"appExtensions\":[{\"bundleIdentifier\":\"bot.hyperdrive.paseo.AgentActivity\",\"targetName\":\"AgentActivity\"}]}}}}},\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},1009,[1008]);
|
|
1107
1107
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e};async function u(){if(!o.default.unregisterForNotificationsAsync)throw new t.UnavailabilityError('ExpoNotifications','unregisterForNotificationsAsync');return o.default.unregisterForNotificationsAsync()}},1010,[4,1011]);
|
|
1108
1108
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}}),r(d[0]);let t=!1;var n={addListener:()=>(t||(console.warn("[expo-notifications] Listening to push token changes is not yet fully supported on web. Adding a listener will have no effect."),t=!0),{remove:()=>{}}),removeListener:()=>{},removeAllListeners:()=>{},emit:()=>{},listenerCount:()=>0}},1011,[4]);
|
|
1109
1109
|
__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[0])),o=e(r(_d[1])),n=r(_d[2]),c=r(_d[3]),s=e(r(_d[4])),d=e(r(_d[5]));const p='https://exp.host/--/api/v2/';async function u(e={}){const s=e.devicePushToken||await(0,d.default)(),u=e.deviceId||await h(),R=e.projectId||o.default.easConfig?.projectId||o.default.expoConfig?.extra?.eas?.projectId;if(!R)throw new n.CodedError('ERR_NOTIFICATIONS_NO_EXPERIENCE_ID',"No \"projectId\" found. If \"projectId\" can't be inferred from the manifest (for instance, in bare workflow), you have to pass it in yourself.");const w=e.applicationId||t.applicationId;if(!w)throw new n.CodedError('ERR_NOTIFICATIONS_NO_APPLICATION_ID',"No \"applicationId\" found. If it can't be inferred from native configuration by expo-application, you have to pass it in yourself.");const O=e.type||y(s),_=e.development||await I(),v=e.baseUrl??p,N=e.url??`${v}push/getExpoPushToken`,x={type:O,deviceId:u.toLowerCase(),development:_,appId:w,deviceToken:E(s),projectId:R},T=await fetch(N,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify(x)}).catch(e=>{throw new n.CodedError('ERR_NOTIFICATIONS_NETWORK_ERROR',`Error encountered while fetching Expo token: ${e}.`)});if(!T.ok){const e=T.statusText||T.status;let t;try{t=await T.text()}catch{}throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Error encountered while fetching Expo token, expected an OK response, received: ${e} (body: "${t}").`)}const b=l(await f(T));try{e.url||e.baseUrl?console.debug("[expo-notifications] Since the URL endpoint to register in has been customized in the options, expo-notifications won't try to auto-update the device push token on the server."):await(0,c.setAutoServerRegistrationEnabledAsync)(!0)}catch(e){console.warn('[expo-notifications] Could not enable automatically registering new device tokens with the Expo notification service',e)}return{type:'expo',data:b}}async function f(e){try{return await e.json()}catch{try{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received body: ${JSON.stringify(await e.text())}.`)}catch{throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Expected a JSON response from server when fetching Expo token, received response: ${JSON.stringify(e)}.`)}}}function l(e){if(!e||'object'!=typeof e||!e.data||'object'!=typeof e.data||!e.data.expoPushToken||'string'!=typeof e.data.expoPushToken)throw new n.CodedError('ERR_NOTIFICATIONS_SERVER_ERROR',`Malformed response from server, expected "{ data: { expoPushToken: string } }", received: ${JSON.stringify(e,null,2)}.`);return e.data.expoPushToken}async function h(){try{if(!s.default.getInstallationIdAsync)throw new n.UnavailabilityError('ExpoServerRegistrationModule','getInstallationIdAsync');return await s.default.getInstallationIdAsync()}catch(e){throw new n.CodedError('ERR_NOTIF_DEVICE_ID',`Could not have fetched installation ID of the application: ${e}.`)}}function E(e){return'string'==typeof e.data?e.data:JSON.stringify(e.data)}async function I(){return!1}function y(e){switch(e.type){case'ios':return'apns';case'android':return'fcm';default:return e.type}}},1012,[1013,1006,4,1016,1020,1005]);
|
|
@@ -14923,7 +14923,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',
|
|
|
14923
14923
|
__d(function(g,r,_i,_a,m,e,d){'use strict';m.exports=function t(n,f){if(n===f)return!0;if(n&&f&&'object'==typeof n&&'object'==typeof f){if(n.constructor!==f.constructor)return!1;var i,o,u;if(Array.isArray(n)){if((i=n.length)!=f.length)return!1;for(o=i;0!==o--;)if(!t(n[o],f[o]))return!1;return!0}if(n instanceof Map&&f instanceof Map){if(n.size!==f.size)return!1;for(o of n.entries())if(!f.has(o[0]))return!1;for(o of n.entries())if(!t(o[1],f.get(o[0])))return!1;return!0}if(n instanceof Set&&f instanceof Set){if(n.size!==f.size)return!1;for(o of n.entries())if(!f.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(f)){if((i=n.length)!=f.length)return!1;for(o=i;0!==o--;)if(n[o]!==f[o])return!1;return!0}if(n.constructor===RegExp)return n.source===f.source&&n.flags===f.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===f.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===f.toString();if((i=(u=Object.keys(n)).length)!==Object.keys(f).length)return!1;for(o=i;0!==o--;)if(!Object.prototype.hasOwnProperty.call(f,u[o]))return!1;for(o=i;0!==o--;){var s=u[o];if(!t(n[s],f[s]))return!1}return!0}return n!=n&&f!=f}},3278,[]);
|
|
14924
14924
|
__d(function(e,s,t,r,n,o,a){"use strict";const i=["config","provider","cwd","env","workspaceId","initialPrompt","images","git","worktreeName","requestId","labels"];Object.defineProperty(o,'__esModule',{value:!0}),Object.defineProperty(o,"UploadCancelledError",{enumerable:!0,get:function(){return C}}),Object.defineProperty(o,"UploadCapExceededError",{enumerable:!0,get:function(){return M}}),Object.defineProperty(o,"UploadFailedError",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"DaemonClient",{enumerable:!0,get:function(){return W}});var c,d=s(a[0]),u=(c=d)&&c.__esModule?c:{default:c},p=s(a[1]),l=s(a[2]),h=s(a[3]),m=s(a[4]),g=s(a[5]),y=s(a[6]),I=s(a[7]),q=s(a[8]),f=s(a[9]),w=s(a[10]),_=s(a[11]);const S={debug:()=>{},info:(e,s)=>console.log(s,e),warn:(e,s)=>console.warn(s,e),error:(e,s)=>console.error(s,e)},b="undefined"!=typeof performance&&"function"==typeof performance.now?()=>performance.now():()=>Date.now();function v(e){return"string"!=typeof e?null:e.length>0?e:null}function k(e,s){return"string"!=typeof e?e:"string"==typeof s?{agentId:e,requestId:s}:Object.assign({agentId:e},s)}function R(e,s){return"string"!=typeof e?e:"string"==typeof s?{agentId:e,requestId:s}:Object.assign({agentId:e},s)}class T extends Error{constructor(e){const s=[e.error];e.requestType&&s.push(`requestType=${e.requestType}`),e.code&&s.push(`code=${e.code}`),super(s.join(" ")),this.name="DaemonRpcError",this.requestId=e.requestId,this.requestType=e.requestType,this.code=e.code}}class C extends Error{constructor(e){super("Upload cancelled"),this.name="UploadCancelledError",this.uploadId=e}}class M extends Error{constructor(e,s){super(s??"Upload exceeds the size cap"),this.name="UploadCapExceededError",this.uploadId=e,this.code="too_large"}}class E extends Error{constructor(e,s,t){super(s),this.name="UploadFailedError",this.uploadId=e,t&&(this.code=t)}}function P(e,s,t){return"too_large"===s?new M(e,t):new E(e,t??`Upload failed: ${s}`,s)}class A extends Error{constructor(e){super(`Ping timed out (${e}ms)`),this.timeoutMs=e,this.name="PingTimeoutError"}}function j(e,s,t){return e instanceof A?new Error(`${s} timed out (${t}ms)`):e instanceof Error?e:new Error(String(e))}const O=6e4;function F(e){return e instanceof Error&&e.message.startsWith("Timeout waiting for message")}function L(e){if("string"!=typeof e)return null;const s=e.trim();return s.length>0?s:null}function D(e){const s=globalThis.atob(e),t=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)t[e]=s.charCodeAt(e);return t}function x(e){let s="";for(let t=0;t<e.length;t+=32768)s+=String.fromCharCode.apply(null,e.subarray(t,t+32768));return globalThis.btoa(s)}function Q(e){let s;return s="base64"===e.encoding&&e.content?D(e.content):"utf-8"===e.encoding&&e.content?(new TextEncoder).encode(e.content):new Uint8Array,{bytes:s,mime:e.mimeType??"application/octet-stream",size:e.size,path:e.path,kind:e.kind,modifiedAt:e.modifiedAt}}function H(e,s){const t=new Uint8Array(s);let r=0;for(const s of e)t.set(s,r),r+=s.byteLength;return t}function N(e){let s=0;for(let t=0;t<e.length;t+=1)s=31*s+e.charCodeAt(t)|0;return`h_${Math.abs(s).toString(16)}`}function U(e){if(!e)return null;const s=e.toLowerCase();return s.includes("timed out")?"connect_timeout":s.includes("disposed")?"disposed":s.includes("client closed")?"client_closed":s.includes("transport")?"transport_error":s.includes("failed to connect")?"connect_failed":"unknown"}class W{constructor(e){this.config=e,this.transport=null,this.transportCleanup=[],this.rawMessageListeners=new Set,this.messageHandlers=new Map,this.eventListeners=new Set,this.waiters=new Set,this.checkoutStatusInFlight=new Map,this.connectionListeners=new Set,this.reconnectTimeout=null,this.connectTimeout=null,this.pendingGenericTransportErrorTimeout=null,this.reconnectAttempt=0,this.shouldReconnect=!0,this.connectPromise=null,this.connectResolve=null,this.connectReject=null,this.lastErrorValue=null,this.connectionState={status:"idle"},this.checkoutDiffSubscriptions=new Map,this.terminalDirectorySubscriptions=new Map,this.terminalStreams=new _.TerminalStreamRouter,this.pendingBinaryFileReads=new Map,this.activeBinaryFileTransfers=new Map,this.completedBinaryFileReads=new Map,this.pendingSendQueue=[],this.lastServerInfoMessage=null,this.runtimeMetricsInterval=null,this.runtimeMetrics=null,this.pingProbe=null,this.livenessHeartbeatTimer=null,this.lastLivenessRttMs=null,this.consecutiveLivenessFailures=0,this.logger=e.logger??S,this.logConnectionPath=(0,m.isRelayClientWebSocketUrl)(this.config.url)?"relay":"direct";let s=null;try{s=new URL(this.config.url)}catch{s=null}const t=L(s?.searchParams.get("serverId"));this.logServerId=t??s?.host??null;const r=L(this.config.clientId);if(!r)throw new Error("Daemon client requires a non-empty clientId");this.config.clientId=r,this.logClientIdHash=N(r),this.logGeneration="number"==typeof this.config.runtimeGeneration&&Number.isFinite(this.config.runtimeGeneration)?this.config.runtimeGeneration:null;const n="number"==typeof e.runtimeMetricsIntervalMs&&e.runtimeMetricsIntervalMs>0?e.runtimeMetricsIntervalMs:0;if(n>0){const s="number"==typeof e.runtimeMetricsWindowMs&&e.runtimeMetricsWindowMs>0?Math.max(e.runtimeMetricsWindowMs,n):void 0;this.runtimeMetrics=new f.DaemonClientRuntimeMetrics(this.logger,{connectionPath:this.logConnectionPath,serverId:this.logServerId,getConnectionStatus:()=>this.connectionState.status},s?{windowMs:s}:void 0),this.runtimeMetricsInterval=setInterval(()=>{this.runtimeMetrics?.flush()},n)}}async connect(){if("disposed"===this.connectionState.status)throw new Error("Daemon client is disposed");if("connected"!==this.connectionState.status)return this.connectPromise||(this.shouldReconnect=!0,this.connectPromise=new Promise((e,s)=>{this.connectResolve=e,this.connectReject=s,this.attemptConnect()})),this.connectPromise}attemptConnect(){if("disposed"===this.connectionState.status)return void this.rejectConnect(new Error("Daemon client is disposed"));if(!this.shouldReconnect)return void this.rejectConnect(new Error("Daemon client is closed"));if("connecting"===this.connectionState.status)return;const e={},s=v(this.config.password);s?e.Authorization=`Bearer ${s}`:this.config.authHeader&&(e.Authorization=this.config.authHeader);const t=s?[`paseo.bearer.${s}`]:void 0;try{this.disposeTransport();const s=this.config.transportFactory??(0,q.createWebSocketTransportFactory)(this.config.webSocketFactory??q.defaultWebSocketFactory),r=!0===this.config.e2ee?.enabled&&(0,m.isRelayClientWebSocketUrl)(this.config.url);let n=s;if(r){const e=this.config.e2ee?.daemonPublicKeyB64;if(!e)throw new Error("daemonPublicKeyB64 is required for relay E2EE");n=(0,q.createRelayE2eeTransportFactory)({baseFactory:s,daemonPublicKeyB64:e,logger:this.logger})}const o=this.resolveTransportUrlForAttempt(),a=n(Object.assign({url:o,headers:e},t?{protocols:t}:{}));this.transport=a,this.lastServerInfoMessage=null,this.updateConnectionState({status:"connecting",attempt:this.reconnectAttempt},{event:"CONNECT_REQUEST"}),this.resetConnectTimeout();const i=Math.max(1,this.config.connectTimeoutMs??15e3);this.connectTimeout=setTimeout(()=>{"connecting"===this.connectionState.status&&(this.lastErrorValue="Connection timed out",this.disposeTransport(1001,"Connection timed out"),this.scheduleReconnect({reason:"Connection timed out",event:"CONNECT_TIMEOUT",reasonCode:"connect_timeout"}))},i),this.transportCleanup=[a.onOpen(()=>{this.pendingGenericTransportErrorTimeout&&(clearTimeout(this.pendingGenericTransportErrorTimeout),this.pendingGenericTransportErrorTimeout=null),this.lastErrorValue=null,this.sendHelloMessage()}),a.onClose(e=>{this.resetConnectTimeout(),this.pendingGenericTransportErrorTimeout&&(clearTimeout(this.pendingGenericTransportErrorTimeout),this.pendingGenericTransportErrorTimeout=null);const s=(0,q.describeTransportClose)(e);s&&(this.lastErrorValue=s),this.scheduleReconnect({reason:s,event:"TRANSPORT_CLOSE",reasonCode:"transport_closed"})}),a.onError(e=>{this.resetConnectTimeout();const s=(0,q.describeTransportError)(e);if("Transport error"===s)return this.lastErrorValue??(this.lastErrorValue=s),void(this.pendingGenericTransportErrorTimeout||(this.pendingGenericTransportErrorTimeout=setTimeout(()=>{this.pendingGenericTransportErrorTimeout=null,"connected"!==this.connectionState.status&&"connecting"!==this.connectionState.status||(this.lastErrorValue=s,this.scheduleReconnect({reason:s,event:"TRANSPORT_ERROR",reasonCode:"transport_error"}))},250)));this.pendingGenericTransportErrorTimeout&&(clearTimeout(this.pendingGenericTransportErrorTimeout),this.pendingGenericTransportErrorTimeout=null),this.lastErrorValue=s,this.scheduleReconnect({reason:s,event:"TRANSPORT_ERROR",reasonCode:"transport_error"})}),a.onMessage(e=>this.handleTransportMessage(e))]}catch(e){this.resetConnectTimeout();const s=e instanceof Error?e.message:"Failed to connect";this.lastErrorValue=s,this.scheduleReconnect({reason:s,event:"CONNECT_FAILED",reasonCode:"connect_failed"}),this.rejectConnect(e instanceof Error?e:new Error(s))}}resolveConnect(){this.connectResolve&&this.connectResolve(),this.connectPromise=null,this.connectResolve=null,this.connectReject=null}rejectConnect(e){this.connectReject&&this.connectReject(e),this.connectPromise=null,this.connectResolve=null,this.connectReject=null}async close(){"disposed"!==this.connectionState.status&&(this.shouldReconnect=!1,this.connectPromise=null,this.connectResolve=null,this.connectReject=null,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.resetConnectTimeout(),this.disposeTransport(1e3,"Client closed"),this.clearWaiters(new Error("Daemon client closed")),this.rejectPendingSendQueue(new Error("Daemon client closed")),this.rejectPingProbe(new Error("Daemon client closed")),this.terminalStreams.clearSlots(),this.lastServerInfoMessage=null,this.runtimeMetricsInterval&&(clearInterval(this.runtimeMetricsInterval),this.runtimeMetricsInterval=null,this.runtimeMetrics?.flush({final:!0}),this.runtimeMetrics=null),this.updateConnectionState({status:"disposed"},{event:"DISPOSE",reason:"Client closed",reasonCode:"disposed"}))}ensureConnected(){"disposed"!==this.connectionState.status&&(this.shouldReconnect||(this.shouldReconnect=!0),"connected"!==this.connectionState.status&&"connecting"!==this.connectionState.status&&this.connect())}getConnectionState(){return this.connectionState}subscribeConnectionStatus(e){return this.connectionListeners.add(e),e(this.connectionState),()=>{this.connectionListeners.delete(e)}}get isConnected(){return"connected"===this.connectionState.status}get isConnecting(){return"connecting"===this.connectionState.status}get lastError(){return this.lastErrorValue}getLastLivenessRttMs(){return this.lastLivenessRttMs}subscribe(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}subscribeRawMessages(e){return this.rawMessageListeners.add(e),()=>{this.rawMessageListeners.delete(e)}}on(e,s){if("function"==typeof e)return this.subscribe(e);const t=e,r=s;return this.messageHandlers.has(t)||this.messageHandlers.set(t,new Set),this.messageHandlers.get(t).add(r),()=>{const e=this.messageHandlers.get(t);e&&(e.delete(r),0===e.size&&this.messageHandlers.delete(t))}}sendSessionMessage(e){if(!this.transport||"connected"!==this.connectionState.status){if(this.config.suppressSendErrors)return;throw new Error(`Transport not connected (status: ${this.connectionState.status})`)}const s=l.SessionInboundMessageSchema.parse(e);try{this.transport.send(JSON.stringify({type:"session",message:s}))}catch(e){if(this.config.suppressSendErrors)return;throw e instanceof Error?e:new Error(String(e))}}sendBinaryFrame(e){if(!this.transport||"connected"!==this.connectionState.status){if(this.config.suppressSendErrors)return;throw new Error(`Transport not connected (status: ${this.connectionState.status})`)}try{this.transport.send(e)}catch(e){if(this.config.suppressSendErrors)return;throw e instanceof Error?e:new Error(String(e))}}sendSessionMessageOrThrow(e){const s=this.connectionState.status;if(this.transport&&"connected"===s){const s=l.SessionInboundMessageSchema.parse(e);return this.transport.send(JSON.stringify({type:"session",message:s})),Promise.resolve()}return"connecting"===s?new Promise((s,t)=>{const r=setTimeout(()=>{const e=this.pendingSendQueue.findIndex(e=>e.resolve===s);-1!==e&&this.pendingSendQueue.splice(e,1),t(new Error("Timed out waiting for connection to send message"))},this.config.defaultSendQueueTimeoutMs??6e4);this.pendingSendQueue.push({message:e,resolve:s,reject:t,timeoutHandle:r})}):Promise.reject(new Error(`Transport not connected (status: ${s})`))}flushPendingSendQueue(){const e=this.pendingSendQueue;this.pendingSendQueue=[];for(const s of e){clearTimeout(s.timeoutHandle);try{if(this.transport&&"connected"===this.connectionState.status){const e=l.SessionInboundMessageSchema.parse(s.message);this.transport.send(JSON.stringify({type:"session",message:e})),s.resolve()}else s.reject(new Error("Connection lost before message could be sent"))}catch(e){s.reject(e instanceof Error?e:new Error(String(e)))}}}rejectPendingSendQueue(e){const s=this.pendingSendQueue;this.pendingSendQueue=[];for(const t of s)clearTimeout(t.timeoutHandle),t.reject(e)}async sendRequest(e){const s=e.timeout??O,{promise:t,cancel:r}=this.waitForWithCancel(s=>{if("rpc_error"===s.type&&s.payload.requestId===e.requestId)return{kind:"error",error:new T({requestId:s.payload.requestId,error:s.payload.error,requestType:s.payload.requestType,code:s.payload.code})};const t=e.select(s);return null===t?null:{kind:"ok",value:t}},s,e.options);try{await this.sendSessionMessageOrThrow(e.message)}catch(e){const s=e instanceof Error?e:new Error(String(e));throw r(s),t.catch(()=>{}),s}const n=await t;if("error"===n.kind)throw n.error;return n.value}async sendCorrelatedRequest(e){return this.sendRequest({requestId:e.requestId,message:e.message,timeout:e.timeout,options:e.options,select:s=>{const t=s;if(t.type!==e.responseType)return null;const r=t.payload;return r.requestId!==e.requestId?null:e.selectPayload?e.selectPayload(r):r}})}sendCorrelatedSessionRequest(e){const s=this.createRequestId(e.requestId),t=l.SessionInboundMessageSchema.parse(Object.assign({},e.message,{requestId:s}));return this.sendCorrelatedRequest(Object.assign({requestId:s,message:t,responseType:e.responseType,timeout:e.timeout,options:{skipQueue:!0}},e.selectPayload?{selectPayload:e.selectPayload}:{}))}sendNamespacedCorrelatedSessionRequest(e){const s=e.message.type.replace(/\.request$/,".response");return this.sendCorrelatedSessionRequest(Object.assign({},e,{responseType:s}))}sendSessionMessageStrict(e){if(!this.transport||"connected"!==this.connectionState.status)throw new Error("Transport not connected");const s=l.SessionInboundMessageSchema.parse(e);try{this.transport.send(JSON.stringify({type:"session",message:s}))}catch(e){throw e instanceof Error?e:new Error(String(e))}}async clearAgentAttention(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"clear_agent_attention",agentId:e,requestId:s});await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"clear_agent_attention_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async clearWorkspaceAttention(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"workspace.clear_attention.request",workspaceId:e,requestId:s}),r=await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"workspace.clear_attention.response"!==e.type||e.payload.requestId!==s?null:e.payload});if(!r.success)throw new Error(r.error??"Failed to clear workspace attention")}sendHeartbeat(e){this.sendSessionMessage({type:"client_heartbeat",deviceType:e.deviceType,focusedAgentId:e.focusedAgentId,focusedTerminalId:e.focusedTerminalId??null,lastActivityAt:e.lastActivityAt,appVisible:e.appVisible,appVisibilityChangedAt:e.appVisibilityChangedAt})}registerPushToken(e){this.sendSessionMessage({type:"register_push_token",token:e})}sendWatchAction(e){this.sendSessionMessage(e)}async ping(e){const s=e?.requestId??`ping-${Date.now()}-${Math.random().toString(36).slice(2)}`,t=Date.now(),r=await this.sendRequest({requestId:s,message:{type:"ping",requestId:s,clientSentAt:t},timeout:e?.timeoutMs??5e3,select:e=>"pong"!==e.type||e.payload.requestId!==s||"number"!=typeof e.payload.serverReceivedAt||"number"!=typeof e.payload.serverSentAt?null:e.payload});return{requestId:s,clientSentAt:t,serverReceivedAt:r.serverReceivedAt,serverSentAt:r.serverSentAt,rttMs:Date.now()-t}}measureLatency(e){const s=Math.max(1,e?.timeoutMs??5e3);return this.sendPingAwaitRtt({timeoutMs:s,drivesLivenessFailure:!1}).catch(e=>{throw j(e,"Latency measurement",s)})}async livenessPing(e){const s=Math.max(1,e?.timeoutMs??5e3);try{const e=await this.sendPingAwaitRtt({timeoutMs:s,drivesLivenessFailure:!0});return this.lastLivenessRttMs=e,e}catch(e){throw j(e,"Liveness check",s)}}sendPingAwaitRtt(e){if("connected"!==this.connectionState.status||!this.transport)return Promise.reject(new Error(`Transport not connected (status: ${this.connectionState.status})`));if(this.pingProbe)return this.pingProbe.promise;const s=b(),t=e.timeoutMs;let r=null,n=null;const o=new Promise((e,s)=>{r=e,n=s}),a={promise:o,resolve:e=>r?.(e),reject:e=>n?.(e),timeoutHandle:setTimeout(()=>{if(this.pingProbe!==a)return;this.pingProbe=null;const e=new A(t);a.reject(e),a.drivesLivenessFailure&&this.recordLivenessFailure(j(e,"Liveness check",t))},t),startedAt:s,drivesLivenessFailure:e.drivesLivenessFailure};this.pingProbe=a;try{this.transport.send(JSON.stringify({type:"ping"}))}catch(e){this.clearPingProbe();const s=e instanceof Error?e:new Error(String(e));return a.drivesLivenessFailure&&this.recordLivenessFailure(s),Promise.reject(s)}return o}startLivenessHeartbeat(){this.stopLivenessHeartbeat(),this.lastLivenessRttMs=null,this.scheduleNextLivenessHeartbeat()}stopLivenessHeartbeat(){this.livenessHeartbeatTimer&&(clearTimeout(this.livenessHeartbeatTimer),this.livenessHeartbeatTimer=null)}scheduleNextLivenessHeartbeat(){"connected"!==this.connectionState.status||this.livenessHeartbeatTimer||(this.livenessHeartbeatTimer=setTimeout(()=>{this.livenessHeartbeatTimer=null,this.livenessPing({timeoutMs:15e3}).catch(()=>{}).finally(()=>{this.scheduleNextLivenessHeartbeat()})},1e4))}async fetchAgents(e){const s=this.createRequestId(e?.requestId),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"fetch_agents_request",requestId:s},e?.scope?{scope:e.scope}:{},e?.filter?{filter:e.filter}:{},e?.sort?{sort:e.sort}:{},e?.page?{page:e.page}:{},e?.subscribe?{subscribe:e.subscribe}:{}));return this.sendRequest({requestId:s,message:t,timeout:e?.timeout,options:{skipQueue:!0},select:e=>"fetch_agents_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async fetchAgentHistory(e){const s=this.createRequestId(e?.requestId),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"fetch_agent_history_request",requestId:s},e?.filter?{filter:e.filter}:{},e?.sort?{sort:e.sort}:{},e?.page?{page:e.page}:{}));return this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"fetch_agent_history_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async fetchRecentProviderSessions(e){const s=this.createRequestId(e?.requestId),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"fetch_recent_provider_sessions_request",requestId:s},e?.cwd?{cwd:e.cwd}:{},e?.providers?{providers:e.providers}:{},e?.since?{since:e.since}:{},e?.limit?{limit:e.limit}:{}));return this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"fetch_recent_provider_sessions_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async fetchWorkspaces(e){const s=this.createRequestId(e?.requestId),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"fetch_workspaces_request",requestId:s},e?.filter?{filter:e.filter}:{},e?.sort?{sort:e.sort}:{},e?.page?{page:e.page}:{},e?.subscribe?{subscribe:e.subscribe}:{}));return this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"fetch_workspaces_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async openProject(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"open_project_request",cwd:e},responseType:"open_project_response"})}async addProject(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"project.add.request",cwd:e},responseType:"project.add.response"})}async startWorkspaceScript(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"start_workspace_script_request",workspaceId:e,scriptName:s},responseType:"start_workspace_script_response"})}async archiveWorkspace(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"archive_workspace_request",workspaceId:e},responseType:"archive_workspace_response"})}async renameProject(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"project.rename.request",projectId:e,customName:s},responseType:"project.rename.response",timeout:1e4})}async fetchWorkspaceSetupStatus(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"workspace_setup_status_request",workspaceId:e},responseType:"workspace_setup_status_response"})}async fetchAgent(e,s){const t=k(e,s),r=this.createRequestId(t.requestId),n=l.SessionInboundMessageSchema.parse({type:"fetch_agent_request",requestId:r,agentId:t.agentId}),o=await this.sendRequest({requestId:r,message:n,timeout:t.timeout,options:{skipQueue:!0},select:e=>"fetch_agent_response"!==e.type||e.payload.requestId!==r?null:e.payload});if(o.error)throw new Error(o.error);return o.agent?{agent:o.agent,project:o.project??null}:null}resubscribeCheckoutDiffSubscriptions(){if(0!==this.checkoutDiffSubscriptions.size)for(const[e,s]of this.checkoutDiffSubscriptions){const t=l.SessionInboundMessageSchema.parse({type:"subscribe_checkout_diff_request",subscriptionId:e,cwd:s.cwd,compare:s.compare,requestId:this.createRequestId()});this.sendSessionMessage(t)}}resubscribeTerminalDirectorySubscriptions(){if(0!==this.terminalDirectorySubscriptions.size)for(const e of this.terminalDirectorySubscriptions.values())this.sendSessionMessage(Object.assign({type:"subscribe_terminals_request",cwd:e.cwd},void 0!==e.workspaceId?{workspaceId:e.workspaceId}:{}))}async createAgent(e){const s=this.createRequestId(e.requestId),t=B(e),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"create_agent_request",requestId:s,config:t},e.env?{env:e.env}:{},void 0!==e.workspaceId?{workspaceId:e.workspaceId}:{},e.initialPrompt?{initialPrompt:e.initialPrompt}:{},e.clientMessageId?{clientMessageId:e.clientMessageId}:{},e.outputSchema?{outputSchema:e.outputSchema}:{},e.images&&e.images.length>0?{images:e.images}:{},e.attachments&&e.attachments.length>0?{attachments:e.attachments}:{},e.git?{git:e.git}:{},e.worktree?{worktree:e.worktree}:{},void 0!==e.autoArchive?{autoArchive:e.autoArchive}:{},e.worktreeName?{worktreeName:e.worktreeName}:{},e.labels&&Object.keys(e.labels).length>0?{labels:e.labels}:{},e.resumeSessionId?{resumeSessionId:e.resumeSessionId}:{})),n=await this.sendRequest({requestId:s,message:r,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const t=l.AgentCreatedStatusPayloadSchema.safeParse(e.payload);if(t.success&&t.data.requestId===s)return t.data;const r=l.AgentCreateFailedStatusPayloadSchema.safeParse(e.payload);return r.success&&r.data.requestId===s?r.data:null}});if("agent_create_failed"===n.status)throw new Error(n.error);return n.agent}async deleteAgent(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"delete_agent_request",agentId:e,requestId:s});await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"agent_deleted"!==e.type||e.payload.requestId!==s?null:e.payload})}async archiveAgent(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"archive_agent_request",agentId:e,requestId:s});return{archivedAt:(await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"agent_archived"!==e.type||e.payload.requestId!==s?null:e.payload})).archivedAt}}async dismissBackgroundTask(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"dismiss_background_task_request",agentId:e,taskId:s,requestId:t});return{dismissed:(await this.sendRequest({requestId:t,message:r,timeout:1e4,options:{skipQueue:!0},select:e=>"background_task_dismissed"!==e.type||e.payload.requestId!==t?null:e.payload})).dismissed}}async detachAgent(e){const s=await this.sendNamespacedCorrelatedSessionRequest({message:{type:"agent.detach.request",agentId:e}});if(!s.accepted)throw new Error(s.error??"detachAgent rejected")}async updateAgent(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"update_agent_request",agentId:e},void 0!==s.name?{name:s.name}:{},s.labels&&Object.keys(s.labels).length>0?{labels:s.labels}:{},{requestId:t})),n=await this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>"update_agent_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.accepted)throw new Error(n.error??"updateAgent rejected")}async rewindSession(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"rewind_session_request",requestId:t,agentId:e,turnId:s}),n=await this.sendRequest({requestId:t,message:r,timeout:3e4,options:{skipQueue:!0},select:e=>"rewind_session_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(n.error||!n.newSessionId)throw new Error(n.error??"rewind: daemon response missing newSessionId");return{newSessionId:n.newSessionId}}async editMessage(e,s,t){const r=this.createRequestId(),n=l.SessionInboundMessageSchema.parse(Object.assign({type:"edit_message_request",requestId:r,agentId:e,turnId:s},"string"==typeof t?{newContent:t}:{})),o=await this.sendRequest({requestId:r,message:n,timeout:3e4,options:{skipQueue:!0},select:e=>"edit_message_response"!==e.type||e.payload.requestId!==r?null:e.payload});if(o.error||!o.newSessionId)throw new Error(o.error??"editMessage: daemon response missing newSessionId");return{newSessionId:o.newSessionId}}async listWorkspaceSessions(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"list_workspace_sessions_request",requestId:t,workspaceId:e}),n=await this.sendRequest({requestId:t,message:r,timeout:3e4,options:{skipQueue:!0},select:e=>"list_workspace_sessions_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(n.error)throw new Error(n.error);return Array.isArray(n.sessions)?n.sessions:[]}async subscribePush(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"subscribe_push_request",requestId:s,subscription:e}),r=await this.sendRequest({requestId:s,message:t,timeout:15e3,options:{skipQueue:!0},select:e=>"subscribe_push_response"!==e.type||e.payload.requestId!==s?null:e.payload});if(!r.ok||r.error)throw new Error(r.error??"subscribePush rejected");return Object.assign({ok:r.ok},r.vapidPublicKey?{vapidPublicKey:r.vapidPublicKey}:{})}async getVapidPublicKey(){const e=this.createRequestId(),s=l.SessionInboundMessageSchema.parse({type:"get_vapid_public_key_request",requestId:e});return(await this.sendRequest({requestId:e,message:s,timeout:15e3,options:{skipQueue:!0},select:s=>"get_vapid_public_key_response"!==s.type||s.payload.requestId!==e?null:s.payload})).publicKey}async listAllSessions(e){if(this.lastServerInfoMessage?.features?.sessionsListRpc||(0,m.isRelayClientWebSocketUrl)(this.config.url)){const e=this.createRequestId(),s=l.SessionInboundMessageSchema.parse({type:"list_all_sessions_request",requestId:e}),t=await this.sendRequest({requestId:e,message:s,timeout:15e3,options:{skipQueue:!0},select:s=>"list_all_sessions_response"!==s.type||s.payload.requestId!==e?null:s.payload});if(t.error)throw new Error(`list_all_sessions failed: ${t.error}`);return Array.isArray(t.sessions)?t.sessions:[]}const s=await this.daemonHttpJson({method:"GET",path:"/sessions",signal:e?.signal});return Array.isArray(s.sessions)?s.sessions:[]}async listWorkflows(){if(!0!==this.lastServerInfoMessage?.features?.workflows)return[];const e=this.createRequestId(),s=l.SessionInboundMessageSchema.parse({type:"workflow.list.request",requestId:e});return this.sendRequest({requestId:e,message:s,timeout:15e3,options:{skipQueue:!0},select:s=>"workflow.list.response"!==s.type||s.payload.requestId!==e?null:s.payload.workflows})}async getWorkflow(e){if(!0!==this.lastServerInfoMessage?.features?.workflows)return null;const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"workflow.get.request",requestId:s,workflowId:e});return this.sendRequest({requestId:s,message:t,timeout:15e3,options:{skipQueue:!0},select:e=>"workflow.get.response"!==e.type||e.payload.requestId!==s?null:e.payload.workflow})}async cancelWorkflow(e){if(!0!==this.lastServerInfoMessage?.features?.workflows)throw new Error("This host does not support workflows. Update the host to use this.");const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"workflow.cancel.request",requestId:s,workflowId:e});return this.sendRequest({requestId:s,message:t,timeout:15e3,options:{skipQueue:!0},select:e=>"workflow.cancel.response"!==e.type||e.payload.requestId!==s?null:e.payload.workflow})}async startWorkflow(e){if(!0!==this.lastServerInfoMessage?.features?.workflows)throw new Error("This host does not support workflows. Update the host to use this.");const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"workflow.start.request",requestId:s,graph:e.graph,provider:e.provider,cwd:e.cwd},e.model?{model:e.model}:{},e.title?{title:e.title}:{},e.labels?{labels:e.labels}:{}));return this.sendRequest({requestId:s,message:t,timeout:3e4,options:{skipQueue:!0},select:e=>"workflow.start.response"!==e.type||e.payload.requestId!==s?null:{workflowId:e.payload.workflowId,childAgentIds:e.payload.childAgentIds,status:e.payload.status}})}async listExtensions(){if(!this.lastServerInfoMessage?.features?.extensions)return[];const e=this.createRequestId(),s=l.SessionInboundMessageSchema.parse({type:"extensions.list.request",requestId:e}),t=await this.sendRequest({requestId:e,message:s,timeout:15e3,options:{skipQueue:!0},select:s=>"extensions.list.response"!==s.type||s.payload.requestId!==e?null:s.payload});if(t.error)throw new Error(`extensions.list failed: ${t.error}`);return t.extensions}async executeExtensionCommand(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"extensions.command.execute.request",requestId:t,commandId:e,args:s}),n=await this.sendRequest({requestId:t,message:r,timeout:3e4,options:{skipQueue:!0},select:e=>"extensions.command.execute.response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.ok)throw new Error(n.error??"extension command failed");return n.result}async searchSessions(e){if(this.lastServerInfoMessage?.features?.sessionsListRpc||(0,m.isRelayClientWebSocketUrl)(this.config.url)){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"search_sessions_request",requestId:s,query:e.query},"number"==typeof e.limit?{limit:e.limit}:{},e.sources&&e.sources.length>0?{sources:[...e.sources]}:{})),r=await this.sendRequest({requestId:s,message:t,timeout:15e3,options:{skipQueue:!0},select:e=>"search_sessions_response"!==e.type||e.payload.requestId!==s?null:e.payload});if(r.error)throw new Error(`search_sessions failed: ${r.error}`);return Array.isArray(r.results)?r.results:[]}const s=new URLSearchParams;s.set("q",e.query),"number"==typeof e.limit&&s.set("limit",String(e.limit)),e.sources&&e.sources.length>0&&s.set("source",e.sources.join(","));const t=await this.daemonHttpJson({method:"GET",path:`/sessions/search?${s.toString()}`,signal:e.signal});return Array.isArray(t.results)?t.results:[]}getHttpBaseUrl(){const e=this.config.url;if((0,m.isRelayClientWebSocketUrl)(e))throw new Error("HTTP routes are not available over relay transport");let s;try{s=new URL(e)}catch{throw new Error(`Cannot derive HTTP base from WS url: ${e}`)}return"ws:"===s.protocol?s.protocol="http:":"wss:"===s.protocol&&(s.protocol="https:"),s.username="",s.password="",s.pathname=s.pathname.replace(/\/ws\/?$/,"/"),s.search="",s.hash="",s.origin}buildAuthHeader(){const e=v(this.config.password);return e?`Bearer ${e}`:this.config.authHeader?this.config.authHeader:null}async daemonHttpJson(e){const s=this.getHttpBaseUrl(),t=new URL(e.path,s).toString(),r={},n=this.buildAuthHeader();let o;n&&(r.Authorization=n),void 0!==e.body&&(r["Content-Type"]="application/json");try{o=await fetch(t,Object.assign({method:e.method,headers:r},void 0!==e.body?{body:JSON.stringify(e.body)}:{},e.signal?{signal:e.signal}:{}))}catch(s){const t=s instanceof Error?s.message:String(s);throw new Error(`daemon HTTP ${e.method} ${e.path} failed: ${t}`,{cause:s})}if(!o.ok){let s=null;try{s=await o.json()}catch{s=null}const t=s&&"object"==typeof s&&"error"in s?String(s.error):`http_${o.status}`;throw new Error(`daemon HTTP ${e.method} ${e.path} ${o.status}: ${t}`)}return await o.json()}async removeProject(e,s){const t=await this.sendNamespacedCorrelatedSessionRequest({requestId:s,message:{type:"project.remove.request",projectId:e}});if(!t.accepted)throw new Error(t.error??"removeProject rejected");return{removedWorkspaceIds:t.removedWorkspaceIds}}async setWorkspaceTitle(e,s,t){const r=await this.sendCorrelatedSessionRequest({requestId:t,message:{type:"workspace.title.set.request",workspaceId:e,title:s},responseType:"workspace.title.set.response"});if(!r.accepted)throw new Error(r.error??"setWorkspaceTitle rejected");return{title:r.title}}async resumeAgent(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"resume_agent_request",requestId:t,handle:e},s?{overrides:s}:{}));return(await this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const s=l.AgentResumedStatusPayloadSchema.safeParse(e.payload);return s.success&&s.data.requestId===t?s.data:null}})).agent}async importAgent(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse(Object.assign({type:"import_agent_request",requestId:s},"providerId"in e?{providerId:e.providerId,providerHandleId:e.providerHandleId}:{provider:e.provider,sessionId:e.sessionId},e.cwd?{cwd:e.cwd}:{},e.labels&&Object.keys(e.labels).length>0?{labels:e.labels}:{})),r=await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const t=l.AgentResumedStatusPayloadSchema.safeParse(e.payload);if(t.success&&t.data.requestId===s)return t.data;const r=l.AgentCreateFailedStatusPayloadSchema.safeParse(e.payload);return r.success&&r.data.requestId===s?r.data:null}});if("agent_create_failed"===r.status)throw new Error(r.error);return r.agent}async refreshAgent(e,s){const t=this.createRequestId(s),r=l.SessionInboundMessageSchema.parse({type:"refresh_agent_request",agentId:e,requestId:t});return this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const s=l.AgentRefreshedStatusPayloadSchema.safeParse(e.payload);return s.success&&s.data.requestId===t?s.data:null}})}async fetchAgentTimeline(e,s={}){const t=this.createRequestId(s.requestId),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"fetch_agent_timeline_request",agentId:e,requestId:t},s.direction?{direction:s.direction}:{},s.cursor?{cursor:s.cursor}:{},"number"==typeof s.limit?{limit:s.limit}:{},s.projection?{projection:s.projection}:{})),n=await this.sendRequest({requestId:t,message:r,timeout:s.timeout,options:{skipQueue:!0},select:e=>"fetch_agent_timeline_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(n.error)throw new Error(n.error);return n}async buildAgentForkContext(e,s={}){const t=this.createRequestId(s.requestId),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"agent.fork_context.request",agentId:e,requestId:t},s.boundaryMessageId?{boundaryMessageId:s.boundaryMessageId}:{})),n=await this.sendRequest({requestId:t,message:r,timeout:15e3,options:{skipQueue:!0},select:e=>"agent.fork_context.response"!==e.type||e.payload.requestId!==t?null:e.payload});if(n.error)throw new Error(n.error);return n}async sendAgentMessage(e,s,t){const r=this.createRequestId(),n=t?.messageId??crypto.randomUUID(),o=l.SessionInboundMessageSchema.parse(Object.assign({type:"send_agent_message_request",requestId:r,agentId:e,text:s},n?{messageId:n}:{},t?.images?{images:t.images}:{},t?.attachments?{attachments:t.attachments}:{})),a=await this.sendRequest({requestId:r,message:o,options:{skipQueue:!0},select:e=>"send_agent_message_response"!==e.type||e.payload.requestId!==r?null:e.payload});if(!a.accepted)throw new Error(a.error??"sendAgentMessage rejected")}async sendMessage(e,s,t){await this.sendAgentMessage(e,s,t)}async rewindAgent(e,s,t){const r=this.createRequestId(),n=l.SessionInboundMessageSchema.parse({type:"agent.rewind.request",requestId:r,agentId:e,messageId:s,mode:t}),o=await this.sendRequest({requestId:r,message:n,options:{skipQueue:!0},select:e=>"agent.rewind.response"!==e.type||e.payload.requestId!==r?null:e.payload});if(!o.ok)throw new Error(o.error??"Agent rewind failed");return o}async cancelAgent(e){const s=this.createRequestId(),t=l.SessionInboundMessageSchema.parse({type:"cancel_agent_request",agentId:e,requestId:s});await this.sendRequest({requestId:s,message:t,options:{skipQueue:!0},select:e=>"cancel_agent_response"!==e.type||e.payload.requestId!==s?null:e.payload})}async setAgentMode(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"set_agent_mode_request",agentId:e,modeId:s,requestId:t}),n=await this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>"set_agent_mode_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.accepted)throw new Error(n.error??"setAgentMode rejected");return n.notice??null}async setAgentModel(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"set_agent_model_request",agentId:e,modelId:s,requestId:t}),n=await this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>"set_agent_model_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.accepted)throw new Error(n.error??"setAgentModel rejected")}async swapAgentProvider(e,s,t){const r=this.createRequestId(),n=l.SessionInboundMessageSchema.parse(Object.assign({type:"swap_agent_provider_request",agentId:e,newProviderId:s,requestId:r},t?{overrides:t}:{})),o=await this.sendRequest({requestId:r,message:n,timeout:3e4,options:{skipQueue:!0},select:e=>"swap_agent_provider_response"!==e.type||e.payload.requestId!==r?null:e.payload});if(!o.accepted)throw new Error(o.error??"swapAgentProvider rejected")}async setAgentFeature(e,s,t){const r=this.createRequestId(),n=l.SessionInboundMessageSchema.parse({type:"set_agent_feature_request",agentId:e,featureId:s,value:t,requestId:r}),o=await this.sendRequest({requestId:r,message:n,options:{skipQueue:!0},select:e=>"set_agent_feature_response"!==e.type||e.payload.requestId!==r?null:e.payload});if(!o.accepted)throw new Error(o.error??"setAgentFeature rejected")}async setAgentThinkingOption(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse({type:"set_agent_thinking_request",agentId:e,thinkingOptionId:s,requestId:t}),n=await this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>"set_agent_thinking_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.accepted)throw new Error(n.error??"setAgentThinkingOption rejected");return n.notice??null}async restartServer(e,s){const t=this.createRequestId(s),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"restart_server_request"},e&&e.trim().length>0?{reason:e}:{},{requestId:t}));return this.sendRequest({requestId:t,message:r,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const s=l.RestartRequestedStatusPayloadSchema.safeParse(e.payload);return s.success?s.data.requestId!==t?null:s.data:null}})}async shutdownServer(e){const s=this.createRequestId(e?.requestId),t=l.SessionInboundMessageSchema.parse({type:"shutdown_server_request",requestId:s});return this.sendRequest({requestId:s,message:t,timeout:e?.timeout,options:{skipQueue:!0},select:e=>{if("status"!==e.type)return null;const t=l.ShutdownRequestedStatusPayloadSchema.safeParse(e.payload);return t.success?t.data.requestId!==s?null:t.data:null}})}async updateDaemon(e){const s=this.createRequestId(e),t=l.SessionInboundMessageSchema.parse({type:"daemon.update.request",requestId:s});return this.sendRequest({requestId:s,message:t,timeout:3e5,options:{skipQueue:!0},select:e=>{const t=l.DaemonUpdateResponseSchema.safeParse(e);return t.success?t.data.payload.requestId!==s?null:t.data.payload:null}})}async setVoiceMode(e,s){const t=this.createRequestId(),r=l.SessionInboundMessageSchema.parse(Object.assign({type:"set_voice_mode",enabled:e},s?{agentId:s}:{},{requestId:t})),n=await this.sendRequest({requestId:t,message:r,select:e=>"set_voice_mode_response"!==e.type||e.payload.requestId!==t?null:e.payload});if(!n.accepted){const e="string"==typeof n.reasonCode&&n.reasonCode.trim().length>0?` (${n.reasonCode})`:"";throw new Error((n.error??"Failed to set voice mode")+e)}return n}async sendVoiceAudioChunk(e,s,t=!1){this.sendSessionMessage({type:"voice_audio_chunk",audio:e,format:s,isLast:t})}async startDictationStream(e,s){const t=this.waitForWithCancel(s=>"dictation_stream_ack"!==s.type||s.payload.dictationId!==e||-1!==s.payload.ackSeq?null:s.payload,3e4,{skipQueue:!0}),r=t.promise.then(()=>{}),n=this.waitForWithCancel(s=>"dictation_stream_error"!==s.type||s.payload.dictationId!==e?null:s.payload,3e4,{skipQueue:!0}),o=n.promise.then(e=>{throw new Error(e.error)}),a=new Error("Cancelled dictation start waiter");try{this.sendSessionMessageStrict({type:"dictation_stream_start",dictationId:e,format:s}),await Promise.race([r,o])}finally{t.cancel(a),n.cancel(a),r.catch(()=>{}),o.catch(()=>{})}}sendDictationStreamChunk(e,s,t,r){this.sendSessionMessageStrict({type:"dictation_stream_chunk",dictationId:e,seq:s,audio:t,format:r})}async finishDictationStream(e,s){const t=this.waitForWithCancel(s=>"dictation_stream_final"!==s.type||s.payload.dictationId!==e?null:s.payload,0,{skipQueue:!0}),r=this.waitForWithCancel(s=>"dictation_stream_error"!==s.type||s.payload.dictationId!==e?null:s.payload,0,{skipQueue:!0}),n=this.waitForWithCancel(s=>"dictation_stream_finish_accepted"!==s.type||s.payload.dictationId!==e?null:s.payload,6e4,{skipQueue:!0}),o=t.promise,a=r.promise.then(e=>{throw new Error(e.error)}),i=n.promise,c=o.then(e=>({kind:"final",payload:e})),d=a.then(()=>({kind:"error",error:new Error("Unexpected dictation stream error state")}),e=>({kind:"error",error:e instanceof Error?e:new Error(String(e))})),u=i.then(e=>({kind:"accepted",payload:e}),e=>F(e)?{kind:"accepted_timeout"}:{kind:"accepted_error",error:e instanceof Error?e:new Error(String(e))}),p=async e=>{if(!Number.isFinite(e)||e<=0){const e=await Promise.race([c,d]);if("error"===e.kind)throw e.error;return e.payload}let s=null;const t=new Promise(t=>{s=setTimeout(()=>t({kind:"timeout"}),e)}),r=await Promise.race([c,d,t]);if(s&&clearTimeout(s),"timeout"===r.kind)throw new Error(`Timeout waiting for dictation finalization (${e}ms)`);if("error"===r.kind)throw r.error;return r.payload},l=new Error("Cancelled dictation finish waiter");try{this.sendSessionMessageStrict({type:"dictation_stream_finish",dictationId:e,finalSeq:s});const t=await Promise.race([c,d,u]);if("final"===t.kind)return t.payload;if("error"===t.kind)throw t.error;return"accepted"===t.kind?await p(t.payload.timeoutMs+5e3):await p(3e5)}finally{t.cancel(l),r.cancel(l),n.cancel(l),o.catch(()=>{}),a.catch(()=>{}),i.catch(()=>{})}}cancelDictationStream(e){this.sendSessionMessageStrict({type:"dictation_stream_cancel",dictationId:e})}async abortRequest(){this.sendSessionMessage({type:"abort_request"})}async audioPlayed(e){this.sendSessionMessage({type:"audio_played",id:e})}async getCheckoutStatus(e,s){const t=s?.requestId;if(!t){const s=this.checkoutStatusInFlight.get(e);if(s)return s}const r=this.createRequestId(t),n=l.SessionInboundMessageSchema.parse({type:"checkout_status_request",cwd:e,requestId:r}),o=this.sendRequest({requestId:r,message:n,options:{skipQueue:!0},select:e=>"checkout_status_response"!==e.type||e.payload.requestId!==r?null:e.payload});return t||(this.checkoutStatusInFlight.set(e,o),o.finally(()=>{this.checkoutStatusInFlight.get(e)===o&&this.checkoutStatusInFlight.delete(e)}).catch(()=>{})),o}normalizeCheckoutDiffCompare(e){if("uncommitted"===e.mode)return!0===e.ignoreWhitespace?{mode:"uncommitted",ignoreWhitespace:!0}:{mode:"uncommitted"};const s=e.baseRef?.trim();return s?!0===e.ignoreWhitespace?{mode:"base",baseRef:s,ignoreWhitespace:!0}:{mode:"base",baseRef:s}:!0===e.ignoreWhitespace?{mode:"base",ignoreWhitespace:!0}:{mode:"base"}}async getCheckoutDiff(e,s,t){const r=`oneshot-checkout-diff:${crypto.randomUUID()}`;try{const n=await this.subscribeCheckoutDiff(e,s,{subscriptionId:r,requestId:t});return{cwd:n.cwd,files:n.files,error:n.error,requestId:n.requestId}}finally{try{this.unsubscribeCheckoutDiff(r)}catch{}}}async subscribeCheckoutDiff(e,s,t){const r=t?.subscriptionId??crypto.randomUUID(),n=this.normalizeCheckoutDiffCompare(s),o=this.checkoutDiffSubscriptions.get(r)??null;this.checkoutDiffSubscriptions.set(r,{cwd:e,compare:n});const a=this.createRequestId(t?.requestId),i=l.SessionInboundMessageSchema.parse({type:"subscribe_checkout_diff_request",subscriptionId:r,cwd:e,compare:n,requestId:a});try{return await this.sendCorrelatedRequest({requestId:a,message:i,responseType:"subscribe_checkout_diff_response",options:{skipQueue:!0},selectPayload:e=>e.subscriptionId!==r?null:e})}catch(e){throw o?this.checkoutDiffSubscriptions.set(r,o):this.checkoutDiffSubscriptions.delete(r),e}}unsubscribeCheckoutDiff(e){this.checkoutDiffSubscriptions.delete(e),this.sendSessionMessage({type:"unsubscribe_checkout_diff_request",subscriptionId:e})}async checkoutCommit(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_commit_request",cwd:e,message:s.message,addAll:s.addAll},responseType:"checkout_commit_response"})}async checkoutMerge(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_merge_request",cwd:e,baseRef:s.baseRef,strategy:s.strategy,requireCleanTarget:s.requireCleanTarget},responseType:"checkout_merge_response"})}async checkoutMergeFromBase(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_merge_from_base_request",cwd:e,baseRef:s.baseRef,requireCleanTarget:s.requireCleanTarget},responseType:"checkout_merge_from_base_response"})}async checkoutPull(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"checkout_pull_request",cwd:e},responseType:"checkout_pull_response"})}async checkoutPush(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"checkout_push_request",cwd:e},responseType:"checkout_push_response"})}async checkoutRefresh(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"checkout.refresh.request",cwd:e},responseType:"checkout.refresh.response"})}async checkoutPrCreate(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_pr_create_request",cwd:e,title:s.title,body:s.body,baseRef:s.baseRef},responseType:"checkout_pr_create_response"})}async checkoutPrMerge(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_pr_merge_request",cwd:e,mergeMethod:s.method},responseType:"checkout_pr_merge_response"})}async checkoutGithubSetAutoMerge(e,s,t){return this.sendNamespacedCorrelatedSessionRequest({requestId:t,message:Object.assign({type:"checkout.github.set_auto_merge.request",cwd:e,enabled:s.enabled},s.enabled?{mergeMethod:s.method}:{})})}async checkoutGithubGetCheckDetails(e,s){return this.sendNamespacedCorrelatedSessionRequest({requestId:s,message:{type:"checkout.github.get_check_details.request",cwd:e.cwd,repoOwner:e.repoOwner,repoName:e.repoName,checkRunId:e.checkRunId,workflowRunId:e.workflowRunId}})}async checkoutPrStatus(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"checkout_pr_status_request",cwd:e},responseType:"checkout_pr_status_response"})}async pullRequestTimeline(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"pull_request_timeline_request",cwd:e.cwd,prNumber:e.prNumber,repoOwner:e.repoOwner,repoName:e.repoName},responseType:"pull_request_timeline_response"})}async checkoutSwitchBranch(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"checkout_switch_branch_request",cwd:e,branch:s},responseType:"checkout_switch_branch_response"})}async renameBranch(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"checkout.rename_branch.request",cwd:e.cwd,branch:e.branch},responseType:"checkout.rename_branch.response"})}async stashSave(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"stash_save_request",cwd:e,branch:s?.branch},responseType:"stash_save_response"})}async stashPop(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"stash_pop_request",cwd:e,stashIndex:s},responseType:"stash_pop_response"})}async stashList(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"stash_list_request",cwd:e,paseoOnly:s?.paseoOnly},responseType:"stash_list_response"})}async getPaseoWorktreeList(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"paseo_worktree_list_request",cwd:e.cwd,repoRoot:e.repoRoot},responseType:"paseo_worktree_list_response"})}async archivePaseoWorktree(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:Object.assign({type:"paseo_worktree_archive_request",worktreePath:e.worktreePath,repoRoot:e.repoRoot,branchName:e.branchName},void 0!==e.workspaceId?{workspaceId:e.workspaceId}:{},void 0!==e.scope?{scope:e.scope}:{}),responseType:"paseo_worktree_archive_response"})}async createPaseoWorktree(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:Object.assign({type:"create_paseo_worktree_request",cwd:e.cwd},void 0!==e.projectId?{projectId:e.projectId}:{},{worktreeSlug:e.worktreeSlug},void 0!==e.firstAgentContext?{firstAgentContext:e.firstAgentContext}:{},void 0!==e.refName?{refName:e.refName}:{},void 0!==e.action?{action:e.action}:{},void 0!==e.githubPrNumber?{githubPrNumber:e.githubPrNumber}:{}),responseType:"create_paseo_worktree_response"})}async createWorkspace(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:Object.assign({type:"workspace.create.request",source:e.source},void 0!==e.title?{title:e.title}:{},void 0!==e.firstAgentContext?{firstAgentContext:e.firstAgentContext}:{}),responseType:"workspace.create.response"})}async validateBranch(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"validate_branch_request",cwd:e.cwd,branchName:e.branchName},responseType:"validate_branch_response"})}async getBranchSuggestions(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"branch_suggestions_request",cwd:e.cwd,query:e.query,limit:e.limit},responseType:"branch_suggestions_response"})}async searchGitHub(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"github_search_request",cwd:e.cwd,query:e.query,limit:e.limit,kinds:e.kinds},responseType:"github_search_response"})}async getDirectorySuggestions(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"directory_suggestions_request",query:e.query,cwd:e.cwd,includeFiles:e.includeFiles,includeDirectories:e.includeDirectories,matchMode:e.matchMode,limit:e.limit},responseType:"directory_suggestions_response"})}async requestFileExplorer(e,s,t,r,n=!1){return this.sendCorrelatedSessionRequest({requestId:r,message:Object.assign({type:"file_explorer_request",cwd:e,path:s,mode:t},n?{acceptBinary:!0}:{}),responseType:"file_explorer_response"})}async listDirectory(e,s,t){const r=await this.requestFileExplorer(e,s,"list",t);if(r.error)throw new Error(r.error);if(!r.directory)throw new Error("Directory listing unavailable.");return r.directory}async readFile(e,s,t){const r=this.createRequestId(t);this.pendingBinaryFileReads.set(r,{cwd:e,path:s});try{const t=await this.requestFileExplorer(e,s,"file",r,!0);if(t.error)throw new Error(t.error);const n=this.completedBinaryFileReads.get(r);if(n)return this.completedBinaryFileReads.delete(r),n;if(!t.file)throw new Error("File unavailable.");return Q(t.file)}finally{this.pendingBinaryFileReads.delete(r),this.activeBinaryFileTransfers.delete(r)}}async requestDownloadToken(e,s,t){return this.sendCorrelatedSessionRequest({requestId:t,message:{type:"file_download_token_request",cwd:e,path:s},responseType:"file_download_token_response"})}async requestProjectIcon(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"project_icon_request",cwd:e},responseType:"project_icon_response"})}async listProviderModels(e,s){const t=await this.sendCorrelatedSessionRequest({requestId:s?.requestId,message:{type:"list_provider_models_request",provider:e,cwd:s?.cwd},responseType:"list_provider_models_response",timeout:9e4});return(0,w.normalizeListProviderModelsPayload)(t)}async listProviderModes(e,s){return this.sendCorrelatedSessionRequest({requestId:s?.requestId,message:{type:"list_provider_modes_request",provider:e,cwd:s?.cwd},responseType:"list_provider_modes_response",timeout:9e4})}async listProviderFeatures(e,s){return this.sendCorrelatedSessionRequest({requestId:s?.requestId,message:{type:"list_provider_features_request",draftConfig:e},responseType:"list_provider_features_response",timeout:9e4})}async listAvailableProviders(e){return this.sendCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"list_available_providers_request"},responseType:"list_available_providers_response"})}async getProvidersSnapshot(e){const s=await this.sendCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"get_providers_snapshot_request",cwd:e?.cwd},responseType:"get_providers_snapshot_response"});return(0,w.normalizeProvidersSnapshotPayload)(s)}async getDaemonConfig(e){return this.sendCorrelatedSessionRequest({requestId:e,message:{type:"get_daemon_config_request"},responseType:"get_daemon_config_response"})}async getDaemonStatus(e){return this.sendCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"daemon.get_status.request"},responseType:"daemon.get_status.response",timeout:e?.timeout})}async getDaemonPairingOffer(e){return this.sendCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"daemon.get_pairing_offer.request"},responseType:"daemon.get_pairing_offer.response",timeout:e?.timeout})}async collectDiagnostics(e){return this.sendNamespacedCorrelatedSessionRequest({requestId:e,message:{type:"diagnostics.request"}})}async patchDaemonConfig(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"set_daemon_config_request",config:e},responseType:"set_daemon_config_response"})}sendBrowserAutomationExecuteResponse(e){this.sendSessionMessageStrict(e)}async readProjectConfig(e,s){return this.sendCorrelatedSessionRequest({requestId:s,message:{type:"read_project_config_request",repoRoot:e},responseType:"read_project_config_response"})}async writeProjectConfig(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"write_project_config_request",repoRoot:e.repoRoot,config:e.config,expectedRevision:e.expectedRevision},responseType:"write_project_config_response"})}async refreshProvidersSnapshot(e){return this.sendCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"refresh_providers_snapshot_request",cwd:e?.cwd,providers:e?.providers},responseType:"refresh_providers_snapshot_response",timeout:12e4})}async getProviderDiagnostic(e,s){return this.sendCorrelatedSessionRequest({requestId:s?.requestId,message:{type:"provider_diagnostic_request",provider:e},responseType:"provider_diagnostic_response",timeout:18e4})}async listProviderUsage(e){return this.sendNamespacedCorrelatedSessionRequest({requestId:e?.requestId,message:{type:"provider.usage.list.request"}})}async listCommands(e,s){const t=R(e,s);return this.sendCorrelatedSessionRequest({requestId:t.requestId,message:Object.assign({type:"list_commands_request",agentId:t.agentId},t.draftConfig?{draftConfig:t.draftConfig}:{}),responseType:"list_commands_response"})}async respondToPermission(e,s,t){this.sendSessionMessage({type:"agent_permission_response",agentId:e,requestId:s,response:t})}async respondToPermissionAndWait(e,s,t,r=15e3){const n=l.SessionInboundMessageSchema.parse({type:"agent_permission_response",agentId:e,requestId:s,response:t});return this.sendRequest({requestId:s,message:n,timeout:r,options:{skipQueue:!0},select:t=>"agent_permission_resolved"!==t.type||t.payload.requestId!==s||t.payload.agentId!==e?null:t.payload})}async waitForAgentUpsert(e,s,t=6e4){const r=Date.now()+t,n=()=>new Error(`Timed out waiting for agent ${e}`),o=()=>this.fetchAgent({agentId:e,timeout:Math.max(1,r-Date.now())}).catch(()=>null),a=await o();if(a&&s(a.agent))return a.agent;if(Date.now()>=r)throw n();return await new Promise((t,a)=>{let i=!1,c=!1,d=null,u=null,p=null;const l=e=>{i||(i=!0,u&&(clearTimeout(u),u=null),d&&(clearInterval(d),d=null),p&&(p(),p=null),"ok"!==e.kind?a(e.error):t(e.snapshot))},h=e=>!!e&&(!!s(e)&&(l({kind:"ok",snapshot:e}),!0)),m=async()=>{if(!i&&!c){c=!0;try{const e=await o();h(e?.agent??null)}finally{c=!1}}};p=this.on("agent_update",s=>{if(i)return;if("upsert"!==s.payload.kind)return;const t=s.payload.agent;t.id===e&&h(t)});const g=Math.max(1,r-Date.now());u=setTimeout(()=>{l({kind:"error",error:n()})},g),d=setInterval(()=>{m()},250),m()})}async waitForFinish(e,s=6e4){const t=this.createRequestId(),r=Number.isFinite(s)&&s>0,n=l.SessionInboundMessageSchema.parse(Object.assign({type:"wait_for_finish_request",requestId:t,agentId:e},r?{timeoutMs:s}:{})),o=await this.sendCorrelatedRequest({requestId:t,message:n,responseType:"wait_for_finish_response",timeout:r?s+5e3:0,options:{skipQueue:!0}});return{status:o.status,final:o.final,error:o.error,lastMessage:o.lastMessage}}subscribeTerminals(e){this.terminalDirectorySubscriptions.set((0,g.terminalSubscriptionKey)(e.cwd,e.workspaceId),{cwd:e.cwd,workspaceId:e.workspaceId}),this.transport&&"connected"===this.connectionState.status&&this.sendSessionMessage(Object.assign({type:"subscribe_terminals_request",cwd:e.cwd},void 0!==e.workspaceId?{workspaceId:e.workspaceId}:{}))}unsubscribeTerminals(e){this.terminalDirectorySubscriptions.delete((0,g.terminalSubscriptionKey)(e.cwd,e.workspaceId)),this.transport&&"connected"===this.connectionState.status&&this.sendSessionMessage(Object.assign({type:"unsubscribe_terminals_request",cwd:e.cwd},void 0!==e.workspaceId?{workspaceId:e.workspaceId}:{}))}async listTerminals(e,s,t){const r=this.createRequestId(s),n=l.SessionInboundMessageSchema.parse(Object.assign({type:"list_terminals_request"},void 0===e?{}:{cwd:e},void 0!==t?.workspaceId?{workspaceId:t.workspaceId}:{},{requestId:r}));return this.sendCorrelatedRequest({requestId:r,message:n,responseType:"list_terminals_response",options:{skipQueue:!0}})}async createTerminal(e,s,t,r){const n=this.createRequestId(t),o=l.SessionInboundMessageSchema.parse(Object.assign({type:"create_terminal_request",cwd:e,name:s,agentId:r?.agentId,command:r?.command,args:r?.args},void 0!==r?.workspaceId?{workspaceId:r.workspaceId}:{},{requestId:n}));return this.sendCorrelatedRequest({requestId:n,message:o,responseType:"create_terminal_response",options:{skipQueue:!0}})}async renameTerminal(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"terminal.rename.request",terminalId:e.terminalId,title:e.title},responseType:"terminal.rename.response"})}async subscribeTerminal(e,s){const t="object"==typeof s?s.restore:void 0,r="object"==typeof s?s.requestId:s,n=this.createRequestId(r),o=l.SessionInboundMessageSchema.parse(Object.assign({type:"subscribe_terminal_request",terminalId:e,requestId:n},t?{restore:t}:{})),a=await this.sendCorrelatedRequest({requestId:n,message:o,responseType:"subscribe_terminal_response",options:{skipQueue:!0}});return null===a.error&&this.terminalStreams.setSlot(e,a.slot),a}unsubscribeTerminal(e){this.terminalStreams.removeTerminal(e),this.sendSessionMessage({type:"unsubscribe_terminal_request",terminalId:e})}sendTerminalInput(e,s){const t=this.terminalStreams.encodeInput(e,s);t?this.sendBinaryFrame(t):this.sendSessionMessage({type:"terminal_input",terminalId:e,message:s})}async killTerminal(e,s){const t=this.createRequestId(s),r=l.SessionInboundMessageSchema.parse({type:"kill_terminal_request",terminalId:e,requestId:t});return this.sendCorrelatedRequest({requestId:t,message:r,responseType:"kill_terminal_response",options:{skipQueue:!0}})}async closeItems(e,s){const t=this.createRequestId(s),r=l.SessionInboundMessageSchema.parse({type:"close_items_request",agentIds:e.agentIds??[],terminalIds:e.terminalIds??[],requestId:t});return this.sendCorrelatedRequest({requestId:t,message:r,responseType:"close_items_response",options:{skipQueue:!0}})}async captureTerminal(e,s,t){const r=this.createRequestId(t),n=l.SessionInboundMessageSchema.parse(Object.assign({type:"capture_terminal_request",terminalId:e},void 0===s?.start?{}:{start:s.start},void 0===s?.end?{}:{end:s.end},void 0===s?.stripAnsi?{}:{stripAnsi:s.stripAnsi},{requestId:r}));return this.sendCorrelatedRequest({requestId:r,message:n,responseType:"capture_terminal_response",options:{skipQueue:!0}})}async createChatRoom(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"chat/create",name:e.name},e.purpose?{purpose:e.purpose}:{}),responseType:"chat/create/response"})}async listChatRooms(e){return this.sendCorrelatedSessionRequest({requestId:e,message:{type:"chat/list"},responseType:"chat/list/response"})}async inspectChatRoom(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"chat/inspect",room:e.room},responseType:"chat/inspect/response"})}async deleteChatRoom(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"chat/delete",room:e.room},responseType:"chat/delete/response"})}async postChatMessage(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"chat/post",room:e.room,body:e.body},e.authorAgentId?{authorAgentId:e.authorAgentId}:{},e.replyToMessageId?{replyToMessageId:e.replyToMessageId}:{}),responseType:"chat/post/response"})}async readChatMessages(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"chat/read",room:e.room},"number"==typeof e.limit?{limit:e.limit}:{},e.since?{since:e.since}:{},e.authorAgentId?{authorAgentId:e.authorAgentId}:{}),responseType:"chat/read/response",timeout:e.timeout})}async waitForChatMessages(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"chat/wait",room:e.room},e.afterMessageId?{afterMessageId:e.afterMessageId}:{},"number"==typeof e.timeoutMs?{timeoutMs:e.timeoutMs}:{}),responseType:"chat/wait/response",timeout:(e.timeoutMs??0)+1e4})}async scheduleCreate(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"schedule/create",prompt:e.prompt,cadence:e.cadence,target:e.target},e.name?{name:e.name}:{},"number"==typeof e.maxRuns?{maxRuns:e.maxRuns}:{},e.expiresAt?{expiresAt:e.expiresAt}:{},"boolean"==typeof e.runOnCreate?{runOnCreate:e.runOnCreate}:{}),responseType:"schedule/create/response"})}async scheduleList(e){return this.sendCorrelatedSessionRequest({requestId:e,message:{type:"schedule/list"},responseType:"schedule/list/response"})}async scheduleInspect(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/inspect",scheduleId:e.id},responseType:"schedule/inspect/response"})}async scheduleLogs(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/logs",scheduleId:e.id},responseType:"schedule/logs/response"})}async schedulePause(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/pause",scheduleId:e.id},responseType:"schedule/pause/response"})}async scheduleResume(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/resume",scheduleId:e.id},responseType:"schedule/resume/response"})}async scheduleDelete(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/delete",scheduleId:e.id},responseType:"schedule/delete/response"})}async scheduleRunOnce(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:{type:"schedule/run-once",scheduleId:e.id},responseType:"schedule/run-once/response"})}async scheduleUpdate(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"schedule/update",scheduleId:e.id},void 0!==e.name?{name:e.name}:{},void 0!==e.prompt?{prompt:e.prompt}:{},void 0!==e.cadence?{cadence:e.cadence}:{},void 0!==e.newAgentConfig?{newAgentConfig:e.newAgentConfig}:{},void 0!==e.maxRuns?{maxRuns:e.maxRuns}:{},void 0!==e.expiresAt?{expiresAt:e.expiresAt}:{}),responseType:"schedule/update/response"})}async loopRun(e){return this.sendCorrelatedSessionRequest({requestId:e.requestId,message:Object.assign({type:"loop/run",prompt:e.prompt,cwd:e.cwd},e.provider?{provider:e.provider}:{},e.model?{model:e.model}:{},e.modeId?{modeId:e.modeId}:{},e.verifierProvider?{verifierProvider:e.verifierProvider}:{},e.verifierModel?{verifierModel:e.verifierModel}:{},e.verifierModeId?{verifierModeId:e.verifierModeId}:{},e.verifyPrompt?{verifyPrompt:e.verifyPrompt}:{},e.verifyChecks&&e.verifyChecks.length>0?{verifyChecks:e.verifyChecks}:{},e.name?{name:e.name}:{},"number"==typeof e.sleepMs?{sleepMs:e.sleepMs}:{},"number"==typeof e.maxIterations?{maxIterations:e.maxIterations}:{},"number"==typeof e.maxTimeMs?{maxTimeMs:e.maxTimeMs}:{}),responseType:"loop/run/response"})}async loopList(e){return this.sendCorrelatedSessionRequest({requestId:e,message:{type:"loop/list"},responseType:"loop/list/response"})}async loopInspect(e){const s="string"==typeof e?{id:e}:e;return this.sendCorrelatedSessionRequest({requestId:s.requestId,message:{type:"loop/inspect",id:s.id},responseType:"loop/inspect/response"})}async loopLogs(e,s){const t="string"==typeof e?{id:e,afterSeq:s}:e;return this.sendCorrelatedSessionRequest({requestId:t.requestId,message:Object.assign({type:"loop/logs",id:t.id},"number"==typeof t.afterSeq?{afterSeq:t.afterSeq}:{}),responseType:"loop/logs/response"})}async loopStop(e){const s="string"==typeof e?{id:e}:e;return this.sendCorrelatedSessionRequest({requestId:s.requestId,message:{type:"loop/stop",id:s.id},responseType:"loop/stop/response"})}onTerminalStreamEvent(e){return this.terminalStreams.onEvent(e)}async waitForTerminalStreamEvent(e,s=5e3){return new Promise((t,r)=>{const n=setTimeout(()=>{o(),r(new Error(`Timeout waiting for terminal stream event (${s}ms)`))},s),o=this.onTerminalStreamEvent(s=>{e(s)&&(clearTimeout(n),o(),t(s))})})}async uploadFile(e,s){const t=this.createRequestId(),r=crypto.randomUUID(),n=e.bytes.byteLength,o=s.signal;if(o?.aborted)throw new C(r);const a=[];for(let s=0;s<n;s+=I.UPLOAD_CHUNK_SIZE_BYTES)a.push(e.bytes.subarray(s,Math.min(s+I.UPLOAD_CHUNK_SIZE_BYTES,n)));const i=a.length;let c;try{c=await this.sendCorrelatedRequest({requestId:t,message:l.SessionInboundMessageSchema.parse({type:"files.upload.begin.request",requestId:t,agentId:s.agentId,uploadId:r,metadata:{mime:e.mime,size:n,encoding:"binary",modifiedAt:e.modifiedAt,fileName:e.path.split(/[\\/]/).at(-1)||e.path}}),responseType:"files.upload.begin.response",timeout:3e4,options:{skipQueue:!0}})}catch(e){throw new E(r,e instanceof Error?e.message:String(e))}if(!c.accepted||c.error)throw P(r,c.error??"write_failed");const d=new Map;let u=0,p=0,h=0,m=!1,g=!1;const y=[],q=()=>{for(const e of y.splice(0))try{e()}catch{}d.clear()};let f;await new Promise((e,c)=>{const l=()=>{g||(g=!0,q(),e())},I=e=>{g||(g=!0,q(),c(e))},f=()=>{for(;d.size<8&&u<i;){if(m||g)return;const e=u,s=a[e];if(u+=1,d.set(e,s.byteLength),d.size>8)return void I(new E(r,`upload window invariant violated: ${d.size} chunks in flight`));try{this.sendSessionMessage({type:"files.upload.chunk",payload:{requestId:t,uploadId:r,chunkIndex:e,data:x(s)}})}catch(e){return void I(new E(r,e instanceof Error?e.message:String(e)))}}};y.push(this.on("files.upload.chunk.ack",e=>{if(e.payload.requestId!==t)return;const r=e.payload.chunkIndex,o=d.get(r);void 0!==o&&(d.delete(r),h+=1,p+=o,s.onProgress?.(p,n),h>=i?l():f())})),y.push(this.on("files.upload.error",e=>{e.payload.requestId!==t&&e.payload.uploadId!==r||I(P(r,e.payload.code,e.payload.message))}));const w=()=>{m=!0;try{this.sendSessionMessage({type:"files.upload.error",payload:{requestId:t,uploadId:r,code:"aborted"}})}catch{}I(new C(r))};o&&(o.addEventListener("abort",w,{once:!0}),y.push(()=>o.removeEventListener("abort",w))),0!==i?o?.aborted?w():f():l()});try{f=await this.sendCorrelatedRequest({requestId:t,message:l.SessionInboundMessageSchema.parse({type:"files.upload.complete.request",requestId:t,uploadId:r,totalChunks:i}),responseType:"files.upload.complete.response",timeout:3e4,options:{skipQueue:!0}})}catch(e){throw new E(r,e instanceof Error?e.message:String(e))}if(f.error)throw P(r,f.error);return{fileId:f.fileId,path:f.path,size:f.size,mimeType:f.mimeType}}createRequestId(e){return e??crypto.randomUUID()}getLastServerInfoMessage(){return this.lastServerInfoMessage}getFileUploadsCapability(){return this.lastServerInfoMessage?.features?.fileUploads??!1}resolveTransportUrlForAttempt(){return this.config.url}sendHelloMessage(){if(this.transport)try{this.transport.send(JSON.stringify(Object.assign({type:"hello",clientId:this.config.clientId,clientType:this.config.clientType??"cli",protocolVersion:1,capabilities:Object.assign({[p.CLIENT_CAPS.customModeIcons]:!0,[p.CLIENT_CAPS.reasoningMergeEnum]:!0,[p.CLIENT_CAPS.terminalReflowableSnapshot]:!0},this.config.capabilities)},this.config.appVersion?{appVersion:this.config.appVersion}:{})))}catch(e){const s=e instanceof Error?e.message:"Failed to send hello message";this.lastErrorValue=s,this.scheduleReconnect({reason:s,event:"HELLO_SEND_FAILED",reasonCode:"transport_error"})}else this.scheduleReconnect({reason:"Transport unavailable before hello",event:"HELLO_TRANSPORT_MISSING",reasonCode:"transport_error"})}disposeTransport(e=1001,s="Reconnecting"){if(this.stopLivenessHeartbeat(),this.cleanupTransport(),this.transport){try{this.transport.close(e,s)}catch{}this.transport=null}}cleanupTransport(){this.resetConnectTimeout(),this.pendingGenericTransportErrorTimeout&&(clearTimeout(this.pendingGenericTransportErrorTimeout),this.pendingGenericTransportErrorTimeout=null);for(const e of this.transportCleanup)try{e()}catch{}this.transportCleanup=[]}resetConnectTimeout(){this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=null)}handleTransportMessage(e){const s=e&&"object"==typeof e&&"data"in e?e.data:e;if("undefined"!=typeof Blob&&s instanceof Blob&&"function"==typeof s.arrayBuffer)return void s.arrayBuffer().then(e=>{this.handleTransportMessage(e)}).catch(()=>{});const t=(0,y.asUint8Array)(s);if(t&&this.tryHandleBinaryFrame(t))return;const r=(0,q.decodeMessageData)(s);r&&this.handleJsonPayload(r,t?.byteLength)}handleJsonPayload(e,s){const t=s??e.length,r=b();let n;try{n=JSON.parse(e)}catch{return}const o=(0,h.validateWSOutboundMessage)(n);if(!o.success){const e=null!=n&&"object"==typeof n&&"type"in n&&"string"==typeof n.type?n.type:"unknown";return void this.logger.warn({msgType:e,error:o.error.message},"Message validation failed")}if(this.consecutiveLivenessFailures=0,"pong"===o.data.type)return this.resolvePingProbe(),void this.runtimeMetrics?.recordMessage("pong",t,b()-r);this.handleSessionMessage(o.data.message);const a=o.data.message.type;this.runtimeMetrics?.recordMessage(a,t,b()-r),"agent_stream"===o.data.message.type&&this.runtimeMetrics?.recordAgentStream(o.data.message.payload)}tryHandleBinaryFrame(e){const s=(0,y.decodeFileTransferFrame)(e);if(s)return this.consecutiveLivenessFailures=0,this.handleFileTransferFrame(s),this.runtimeMetrics?.recordBinaryFrame("other",e.byteLength,0),!0;const t=(0,y.decodeTerminalStreamFrame)(e);if(!t)return!1;this.consecutiveLivenessFailures=0;const r=b();this.terminalStreams.handleFrame(t);let n="other";return t.opcode===y.TerminalStreamOpcode.Output?n="output":t.opcode===y.TerminalStreamOpcode.Snapshot?n="snapshot":t.opcode===y.TerminalStreamOpcode.Restore&&(n="output"),this.runtimeMetrics?.recordBinaryFrame(n,e.byteLength,b()-r),!0}handleFileTransferFrame(e){if(e.opcode===y.FileTransferOpcode.FileBegin){const s=this.pendingBinaryFileReads.get(e.requestId);if(!s)return;return void this.activeBinaryFileTransfers.set(e.requestId,Object.assign({},s,{mime:e.metadata.mime,size:e.metadata.size,encoding:e.metadata.encoding,modifiedAt:e.metadata.modifiedAt,chunks:[]}))}const s=this.activeBinaryFileTransfers.get(e.requestId);if(!s)return;if(e.opcode===y.FileTransferOpcode.FileChunk)return void s.chunks.push(e.payload);const t=H(s.chunks,s.size);var r,n;this.activeBinaryFileTransfers.delete(e.requestId),this.completedBinaryFileReads.set(e.requestId,{bytes:t,mime:s.mime,size:s.size,path:s.path,kind:(r=s.mime,n=s.encoding,r.startsWith("image/")?"image":"utf-8"===n||r.startsWith("text/")||"application/json"===r?"text":"binary"),modifiedAt:s.modifiedAt}),this.handleSessionMessage({type:"file_explorer_response",payload:{cwd:s.cwd,path:s.path,mode:"file",directory:null,file:null,error:null,requestId:e.requestId}})}updateConnectionState(e,s){const t=this.connectionState;this.connectionState=e;const r="disconnected"===e.status&&"string"==typeof e.reason?e.reason:null,n=s?.reason??r,o=s?.reasonCode??U(n);this.logger.debug({serverId:this.logServerId,clientIdHash:this.logClientIdHash,from:t.status,to:e.status,event:s?.event??"STATE_UPDATE",connectionPath:this.logConnectionPath,generation:this.logGeneration,reasonCode:o,reason:n},"DaemonClientTransition");for(const s of this.connectionListeners)try{s(e)}catch{}}setReconnectEnabled(e){this.config=Object.assign({},this.config,{reconnect:Object.assign({},this.config.reconnect,{enabled:e})})}scheduleReconnect(e){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null);const s="disposed"===this.connectionState.status,t=e?.reason;"string"==typeof t&&t.trim().length>0&&(this.lastErrorValue=t.trim()),this.clearWaiters(new Error(t??"Connection lost")),this.rejectPendingSendQueue(new Error(t??"Connection lost")),this.rejectPingProbe(new Error(t??"Connection lost")),this.terminalStreams.clearSlots(),this.lastServerInfoMessage=null,s?this.rejectConnect(new Error(t??"Daemon client is disposed")):(this.emitDisconnectedStateForReconnect(t,e),this.shouldReconnect&&!1!==this.config.reconnect?.enabled?this.armReconnectTimer():this.rejectConnect(new Error(t??"Transport disconnected before connect")))}emitDisconnectedStateForReconnect(e,s){this.updateConnectionState(Object.assign({status:"disconnected"},e?{reason:e}:{}),Object.assign({event:s?.event??"TRANSPORT_CLOSE"},e?{reason:e}:{},s?.reasonCode?{reasonCode:s.reasonCode}:{}))}armReconnectTimer(){const e=this.reconnectAttempt,s=this.config.reconnect?.baseDelayMs??1500,t=this.config.reconnect?.maxDelayMs??3e4,r=Math.min(s*2**e,t);this.reconnectAttempt=e+1,this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,this.shouldReconnect&&this.attemptConnect()},r)}resolvePingProbe(){const e=this.pingProbe;e&&(this.pingProbe=null,clearTimeout(e.timeoutHandle),e.resolve(b()-e.startedAt))}clearPingProbe(){const e=this.pingProbe;e&&(this.pingProbe=null,clearTimeout(e.timeoutHandle))}rejectPingProbe(e){const s=this.pingProbe;s&&(this.pingProbe=null,clearTimeout(s.timeoutHandle),s.reject(e))}recordLivenessFailure(e){this.consecutiveLivenessFailures+=1,this.consecutiveLivenessFailures<2||(this.consecutiveLivenessFailures=0,this.lastErrorValue=e.message,this.disposeTransport(1001,"Liveness check timed out"),this.scheduleReconnect({reason:e.message,event:"LIVENESS_TIMEOUT",reasonCode:"liveness_timeout"}))}handleSessionMessage(e){const s=(0,w.normalizeProviderSnapshotUpdateMessage)(e);if("status"===s.type){const e=(0,l.parseServerInfoStatusPayload)(s.payload);e&&(this.lastServerInfoMessage=e,"connecting"===this.connectionState.status&&(this.resetConnectTimeout(),this.reconnectAttempt=0,this.updateConnectionState({status:"connected"},{event:"HELLO_SERVER_INFO"}),this.startLivenessHeartbeat(),this.resubscribeCheckoutDiffSubscriptions(),this.resubscribeTerminalDirectorySubscriptions(),this.flushPendingSendQueue(),this.resolveConnect()))}if("terminal_stream_exit"===s.type&&this.terminalStreams.removeTerminal(s.payload.terminalId),this.rawMessageListeners.size>0)for(const e of this.rawMessageListeners)try{e(s)}catch{}const t=this.messageHandlers.get(s.type);if(t)for(const e of t)try{e(s)}catch{}const r=this.toEvent(s);if(r)for(const e of this.eventListeners)e(r);this.resolveWaiters(s)}resolveWaiters(e){for(const s of Array.from(this.waiters)){const t=s.predicate(e);null!==t&&(this.waiters.delete(s),s.timeoutHandle&&clearTimeout(s.timeoutHandle),s.resolve(t))}}clearWaiters(e){for(const s of Array.from(this.waiters))s.timeoutHandle&&clearTimeout(s.timeoutHandle),s.reject(e);this.waiters.clear()}toEvent(e){switch(e.type){case"agent_update":return{type:"agent_update",agentId:"upsert"===e.payload.kind?e.payload.agent.id:e.payload.agentId,payload:e.payload};case"workspace_update":return{type:"workspace_update",workspaceId:"upsert"===e.payload.kind?e.payload.workspace.id:e.payload.id,payload:e.payload};case"workspace_setup_progress":return{type:"workspace_setup_progress",workspaceId:e.payload.workspaceId,payload:e.payload};case"agent_stream":return Object.assign({type:"agent_stream",agentId:e.payload.agentId,event:e.payload.event,timestamp:e.payload.timestamp},"number"==typeof e.payload.seq?{seq:e.payload.seq}:{},"string"==typeof e.payload.epoch?{epoch:e.payload.epoch}:{});case"status":return{type:"status",payload:e.payload};case"agent_deleted":return{type:"agent_deleted",agentId:e.payload.agentId};case"agent_permission_request":return{type:"agent_permission_request",agentId:e.payload.agentId,request:e.payload.request};case"agent_permission_resolved":return{type:"agent_permission_resolved",agentId:e.payload.agentId,requestId:e.payload.requestId,resolution:e.payload.resolution};case"providers_snapshot_update":return{type:"providers_snapshot_update",payload:e.payload};default:return null}}waitForWithCancel(e,s=3e4,t){const r=new Error(`Timeout waiting for message (${s}ms)`);let n=null,o=!1,a=null;return{promise:new Promise((t,i)=>{const c=e=>{o||(o=!0,i(e))};a=c;const d=s>0?setTimeout(()=>{n&&this.waiters.delete(n),c(r)},s):null;n={predicate:e,resolve:e=>{o||(o=!0,t(e))},reject:c,timeoutHandle:d},this.waiters.add(n)}),cancel:e=>{o||(n&&(this.waiters.delete(n),n.timeoutHandle&&clearTimeout(n.timeoutHandle)),a?a(e):queueMicrotask(()=>{!o&&a&&a(e)}))}}}}function B(e){const{config:s,provider:t,cwd:r}=e,n=(0,u.default)(e,i),o=Object.assign({},t?{provider:t}:{},r?{cwd:r}:{},n),a=s?Object.assign({},o,s):o;if(!a.provider||!a.cwd)throw new Error("createAgent requires provider and cwd");return Object.assign({},a,{provider:a.provider,cwd:a.cwd})}},3279,[35,3280,3281,3376,3379,3380,3381,3383,3384,3394,3395,3396]);
|
|
14925
14925
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CLIENT_CAPS",{enumerable:!0,get:function(){return o}});const o={reasoningMergeEnum:"reasoning_merge_enum",customModeIcons:"custom_mode_icons",terminalReflowableSnapshot:"terminal_reflowable_snapshot",browserHost:"browser_host"}},3280,[]);
|
|
14926
|
-
__d(function(e,t,n,r,o,i,a){"use strict";const s=["contextKind"];Object.defineProperty(i,'__esModule',{value:!0}),Object.defineProperty(i,"PaseoConfigRawSchema",{enumerable:!0,get:function(){return q.PaseoConfigRawSchema}}),Object.defineProperty(i,"PaseoLifecycleCommandRawSchema",{enumerable:!0,get:function(){return q.PaseoLifecycleCommandRawSchema}}),Object.defineProperty(i,"PaseoMetadataGenerationEntrySchema",{enumerable:!0,get:function(){return q.PaseoMetadataGenerationEntrySchema}}),Object.defineProperty(i,"PaseoMetadataGenerationSchema",{enumerable:!0,get:function(){return q.PaseoMetadataGenerationSchema}}),Object.defineProperty(i,"PaseoScriptEntryRawSchema",{enumerable:!0,get:function(){return q.PaseoScriptEntryRawSchema}}),Object.defineProperty(i,"PaseoWorktreeConfigRawSchema",{enumerable:!0,get:function(){return q.PaseoWorktreeConfigRawSchema}}),Object.defineProperty(i,"TerminalProfileSchema",{enumerable:!0,get:function(){return w}}),Object.defineProperty(i,"KanbanBucketDefSchema",{enumerable:!0,get:function(){return v}}),Object.defineProperty(i,"KanbanBoardConfigSchema",{enumerable:!0,get:function(){return A}}),Object.defineProperty(i,"MutableDaemonConfigSchema",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"MutableDaemonConfigPatchSchema",{enumerable:!0,get:function(){return T}}),Object.defineProperty(i,"AgentStatusSchema",{enumerable:!0,get:function(){return x}}),Object.defineProperty(i,"WORKFLOW_STATUSES",{enumerable:!0,get:function(){return L}}),Object.defineProperty(i,"WorkflowStatusSchema",{enumerable:!0,get:function(){return W}}),Object.defineProperty(i,"WorkflowPhaseSchema",{enumerable:!0,get:function(){return D}}),Object.defineProperty(i,"WorkflowSnapshotSchema",{enumerable:!0,get:function(){return E}}),Object.defineProperty(i,"STORED_WORKFLOW_SCHEMA",{enumerable:!0,get:function(){return N}}),Object.defineProperty(i,"WORKFLOW_EVENT_TYPES",{enumerable:!0,get:function(){return U}}),Object.defineProperty(i,"WorkflowEventTypeSchema",{enumerable:!0,get:function(){return F}}),Object.defineProperty(i,"WorkflowLifecycleEventSchema",{enumerable:!0,get:function(){return G}}),Object.defineProperty(i,"WorkflowListRequestSchema",{enumerable:!0,get:function(){return B}}),Object.defineProperty(i,"WorkflowListResponseSchema",{enumerable:!0,get:function(){return H}}),Object.defineProperty(i,"WorkflowGetRequestSchema",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"WorkflowGetResponseSchema",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"WorkflowCancelRequestSchema",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(i,"WorkflowCancelResponseSchema",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(i,"WorkflowEventsRequestSchema",{enumerable:!0,get:function(){return X}}),Object.defineProperty(i,"WorkflowEventsResponseSchema",{enumerable:!0,get:function(){return J}}),Object.defineProperty(i,"WorkflowTaskNodeSchema",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(i,"WorkflowTaskGraphSchema",{enumerable:!0,get:function(){return $}}),Object.defineProperty(i,"WorkflowStartRequestSchema",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(i,"WorkflowStartResponseSchema",{enumerable:!0,get:function(){return te}}),Object.defineProperty(i,"AgentFeatureToggleSchema",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(i,"AgentFeatureSelectSchema",{enumerable:!0,get:function(){return se}}),Object.defineProperty(i,"AgentFeatureSchema",{enumerable:!0,get:function(){return le}}),Object.defineProperty(i,"ProviderSnapshotEntrySchema",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(i,"AgentPermissionResponseSchema",{enumerable:!0,get:function(){return je}}),Object.defineProperty(i,"AgentPermissionRequestPayloadSchema",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(i,"AgentTimelineItemPayloadSchema",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(i,"AgentStreamEventPayloadSchema",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(i,"SessionDigestLinkSchema",{enumerable:!0,get:function(){return We}}),Object.defineProperty(i,"SessionDigestSchema",{enumerable:!0,get:function(){return De}}),Object.defineProperty(i,"AgentSnapshotPayloadSchema",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(i,"AgentListItemPayloadSchema",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(i,"RecentProviderSessionDescriptorPayloadSchema",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(i,"VoiceAudioChunkMessageSchema",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(i,"AbortRequestMessageSchema",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(i,"AudioPlayedMessageSchema",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(i,"DeleteAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(i,"ArchiveAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(i,"DismissBackgroundTaskRequestMessageSchema",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(i,"BackgroundTaskDismissedMessageSchema",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(i,"CloseItemsRequestMessageSchema",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(i,"UpdateAgentRequestMessageSchema",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(i,"ProjectRenameRequestSchema",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(i,"ProjectRemoveRequestSchema",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(i,"WorkspaceTitleSetRequestSchema",{enumerable:!0,get:function(){return et}}),Object.defineProperty(i,"SetVoiceModeMessageSchema",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(i,"GitHubPrAttachmentSchema",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(i,"GitHubIssueAttachmentSchema",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(i,"TextAttachmentSchema",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(i,"ReviewAttachmentContextLineSchema",{enumerable:!0,get:function(){return it}}),Object.defineProperty(i,"ReviewAttachmentCommentSchema",{enumerable:!0,get:function(){return at}}),Object.defineProperty(i,"ReviewAttachmentSchema",{enumerable:!0,get:function(){return st}}),Object.defineProperty(i,"FileAttachmentSchema",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(i,"UploadedFileAttachmentSchema",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(i,"AgentAttachmentSchema",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(i,"SendAgentMessageSchema",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(i,"FetchAgentsRequestMessageSchema",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(i,"FetchWorkspacesRequestMessageSchema",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(i,"FetchAgentHistoryRequestMessageSchema",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(i,"FetchRecentProviderSessionsRequestMessageSchema",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(i,"FetchAgentRequestMessageSchema",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(i,"SendAgentMessageRequestSchema",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(i,"WaitForFinishRequestSchema",{enumerable:!0,get:function(){return St}}),Object.defineProperty(i,"DaemonGetStatusRequestSchema",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(i,"DaemonGetPairingOfferRequestSchema",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(i,"DiagnosticsRequestSchema",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(i,"GetDaemonConfigRequestMessageSchema",{enumerable:!0,get:function(){return It}}),Object.defineProperty(i,"SetDaemonConfigRequestMessageSchema",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(i,"ReadProjectConfigRequestMessageSchema",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(i,"WriteProjectConfigRequestMessageSchema",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(i,"DictationStreamStartMessageSchema",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(i,"DictationStreamChunkMessageSchema",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(i,"DictationStreamFinishMessageSchema",{enumerable:!0,get:function(){return At}}),Object.defineProperty(i,"DictationStreamCancelMessageSchema",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(i,"CreateAgentWorktreeTargetSchema",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(i,"CreateAgentRequestMessageSchema",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(i,"ListProviderModelsRequestMessageSchema",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(i,"ListProviderModesRequestMessageSchema",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(i,"ListAvailableProvidersRequestMessageSchema",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(i,"GetProvidersSnapshotRequestMessageSchema",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(i,"RefreshProvidersSnapshotRequestMessageSchema",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(i,"ProviderDiagnosticRequestMessageSchema",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(i,"ProviderUsageListRequestMessageSchema",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(i,"ResumeAgentRequestMessageSchema",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(i,"ImportAgentRequestMessageSchema",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(i,"RefreshAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(i,"CancelAgentRequestMessageSchema",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(i,"RestartServerRequestMessageSchema",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(i,"ShutdownServerRequestMessageSchema",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(i,"DaemonUpdateRequestMessageSchema",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(i,"AgentTimelineCursorSchema",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(i,"FetchAgentTimelineRequestMessageSchema",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(i,"AgentForkContextRequestMessageSchema",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(i,"SetAgentModeRequestMessageSchema",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(i,"SetAgentModeResponseMessageSchema",{enumerable:!0,get:function(){return tn}}),Object.defineProperty(i,"SetAgentModelRequestMessageSchema",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(i,"SetAgentModelResponseMessageSchema",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(i,"SwapAgentProviderRequestMessageSchema",{enumerable:!0,get:function(){return on}}),Object.defineProperty(i,"SwapAgentProviderResponseMessageSchema",{enumerable:!0,get:function(){return an}}),Object.defineProperty(i,"AgentProviderSwappedEventSchema",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(i,"SetAgentThinkingRequestMessageSchema",{enumerable:!0,get:function(){return ln}}),Object.defineProperty(i,"SetAgentThinkingResponseMessageSchema",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(i,"SetAgentFeatureRequestMessageSchema",{enumerable:!0,get:function(){return un}}),Object.defineProperty(i,"SetAgentFeatureResponseMessageSchema",{enumerable:!0,get:function(){return zn}}),Object.defineProperty(i,"AgentDetachRequestMessageSchema",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(i,"AgentDetachResponseMessageSchema",{enumerable:!0,get:function(){return gn}}),Object.defineProperty(i,"AgentRewindModeSchema",{enumerable:!0,get:function(){return bn}}),Object.defineProperty(i,"AgentRewindRequestMessageSchema",{enumerable:!0,get:function(){return dn}}),Object.defineProperty(i,"AgentRewindResponseMessageSchema",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(i,"UpdateAgentResponseMessageSchema",{enumerable:!0,get:function(){return fn}}),Object.defineProperty(i,"ProjectRenameResponsePayloadSchema",{enumerable:!0,get:function(){return yn}}),Object.defineProperty(i,"ProjectRenameResponseSchema",{enumerable:!0,get:function(){return hn}}),Object.defineProperty(i,"ProjectRemoveResponsePayloadSchema",{enumerable:!0,get:function(){return jn}}),Object.defineProperty(i,"ProjectRemoveResponseSchema",{enumerable:!0,get:function(){return Sn}}),Object.defineProperty(i,"WorkspaceTitleSetResponsePayloadSchema",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(i,"WorkspaceTitleSetResponseSchema",{enumerable:!0,get:function(){return _n}}),Object.defineProperty(i,"SetVoiceModeResponseMessageSchema",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(i,"AgentPermissionResponseMessageSchema",{enumerable:!0,get:function(){return In}}),Object.defineProperty(i,"WatchNotificationActionMessageSchema",{enumerable:!0,get:function(){return On}}),Object.defineProperty(i,"WatchSessionSearchMessageSchema",{enumerable:!0,get:function(){return kn}}),Object.defineProperty(i,"WatchComposerDictateMessageSchema",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(i,"CheckoutStatusRequestSchema",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(i,"SubscribeCheckoutDiffRequestSchema",{enumerable:!0,get:function(){return Cn}}),Object.defineProperty(i,"UnsubscribeCheckoutDiffRequestSchema",{enumerable:!0,get:function(){return Tn}}),Object.defineProperty(i,"CheckoutCommitRequestSchema",{enumerable:!0,get:function(){return xn}}),Object.defineProperty(i,"CheckoutMergeRequestSchema",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(i,"CheckoutMergeFromBaseRequestSchema",{enumerable:!0,get:function(){return Wn}}),Object.defineProperty(i,"CheckoutPullRequestSchema",{enumerable:!0,get:function(){return Dn}}),Object.defineProperty(i,"CheckoutPushRequestSchema",{enumerable:!0,get:function(){return En}}),Object.defineProperty(i,"CheckoutRefreshRequestSchema",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(i,"CheckoutPrCreateRequestSchema",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(i,"CheckoutPrMergeRequestSchema",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(i,"CheckoutGithubSetAutoMergeRequestSchema",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(i,"FileUploadErrorCodeSchema",{enumerable:!0,get:function(){return Bn}}),Object.defineProperty(i,"FilesUploadBeginRequestSchema",{enumerable:!0,get:function(){return Hn}}),Object.defineProperty(i,"FilesUploadCompleteRequestSchema",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(i,"FilesUploadChunkSchema",{enumerable:!0,get:function(){return Vn}}),Object.defineProperty(i,"FilesUploadErrorSchema",{enumerable:!0,get:function(){return Yn}}),Object.defineProperty(i,"CheckoutGithubGetCheckDetailsRequestSchema",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(i,"CheckoutPrStatusRequestSchema",{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(i,"PullRequestTimelineRequestSchema",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(i,"ValidateBranchRequestSchema",{enumerable:!0,get:function(){return $n}}),Object.defineProperty(i,"CheckoutSwitchBranchRequestSchema",{enumerable:!0,get:function(){return er}}),Object.defineProperty(i,"CheckoutRenameBranchRequestSchema",{enumerable:!0,get:function(){return tr}}),Object.defineProperty(i,"StashSaveRequestSchema",{enumerable:!0,get:function(){return nr}}),Object.defineProperty(i,"StashPopRequestSchema",{enumerable:!0,get:function(){return rr}}),Object.defineProperty(i,"StashListRequestSchema",{enumerable:!0,get:function(){return or}}),Object.defineProperty(i,"BranchSuggestionsRequestSchema",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(i,"GitHubSearchItemSchema",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(i,"GitHubSearchKindSchema",{enumerable:!0,get:function(){return sr}}),Object.defineProperty(i,"GitHubSearchRequestSchema",{enumerable:!0,get:function(){return lr}}),Object.defineProperty(i,"DirectorySuggestionsRequestSchema",{enumerable:!0,get:function(){return cr}}),Object.defineProperty(i,"PaseoWorktreeListRequestSchema",{enumerable:!0,get:function(){return ur}}),Object.defineProperty(i,"PaseoWorktreeArchiveRequestSchema",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(i,"FirstAgentContextSchema",{enumerable:!0,get:function(){return pr}}),Object.defineProperty(i,"CreatePaseoWorktreeRequestSchema",{enumerable:!0,get:function(){return gr}}),Object.defineProperty(i,"WorkspaceSetupStatusRequestSchema",{enumerable:!0,get:function(){return br}}),Object.defineProperty(i,"LEGACY_EDITOR_TARGET_IDS",{enumerable:!0,get:function(){return dr}}),Object.defineProperty(i,"KNOWN_EDITOR_TARGET_IDS",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(i,"KnownEditorTargetIdSchema",{enumerable:!0,get:function(){return fr}}),Object.defineProperty(i,"LegacyEditorTargetIdSchema",{enumerable:!0,get:function(){return yr}}),Object.defineProperty(i,"EditorTargetIdSchema",{enumerable:!0,get:function(){return hr}}),i.isKnownEditorTargetId=function(e){return jr.has(e)},i.isLegacyEditorTargetId=function(e){return Sr.has(e)},Object.defineProperty(i,"EditorTargetDescriptorPayloadSchema",{enumerable:!0,get:function(){return Pr}}),Object.defineProperty(i,"LegacyListAvailableEditorsRequestSchema",{enumerable:!0,get:function(){return _r}}),Object.defineProperty(i,"LegacyOpenInEditorRequestSchema",{enumerable:!0,get:function(){return qr}}),Object.defineProperty(i,"OpenProjectRequestSchema",{enumerable:!0,get:function(){return Ir}}),Object.defineProperty(i,"ProjectAddRequestSchema",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(i,"ArchiveWorkspaceRequestSchema",{enumerable:!0,get:function(){return kr}}),Object.defineProperty(i,"WorkspaceCreateRequestSchema",{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(i,"WorkspaceClearAttentionRequestSchema",{enumerable:!0,get:function(){return wr}}),Object.defineProperty(i,"FileExplorerRequestSchema",{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(i,"ProjectIconRequestSchema",{enumerable:!0,get:function(){return Dr}}),Object.defineProperty(i,"FileDownloadTokenRequestSchema",{enumerable:!0,get:function(){return Er}}),Object.defineProperty(i,"FileUploadRequestSchema",{enumerable:!0,get:function(){return Nr}}),Object.defineProperty(i,"ClearAgentAttentionMessageSchema",{enumerable:!0,get:function(){return Ur}}),Object.defineProperty(i,"ClientHeartbeatMessageSchema",{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(i,"PingMessageSchema",{enumerable:!0,get:function(){return Gr}}),Object.defineProperty(i,"ListProviderFeaturesRequestMessageSchema",{enumerable:!0,get:function(){return Hr}}),Object.defineProperty(i,"ListCommandsRequestSchema",{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(i,"RegisterPushTokenMessageSchema",{enumerable:!0,get:function(){return Vr}}),Object.defineProperty(i,"RewindSessionRequestMessageSchema",{enumerable:!0,get:function(){return Yr}}),Object.defineProperty(i,"RewindSessionResponseMessageSchema",{enumerable:!0,get:function(){return Qr}}),Object.defineProperty(i,"EditMessageRequestMessageSchema",{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(i,"EditMessageResponseMessageSchema",{enumerable:!0,get:function(){return Jr}}),Object.defineProperty(i,"ListWorkspaceSessionsRequestMessageSchema",{enumerable:!0,get:function(){return Zr}}),Object.defineProperty(i,"ListWorkspaceSessionsResponseMessageSchema",{enumerable:!0,get:function(){return eo}}),Object.defineProperty(i,"ListAllSessionsRequestMessageSchema",{enumerable:!0,get:function(){return to}}),Object.defineProperty(i,"ListAllSessionsResponseMessageSchema",{enumerable:!0,get:function(){return ro}}),Object.defineProperty(i,"ListExtensionsRequestMessageSchema",{enumerable:!0,get:function(){return lo}}),Object.defineProperty(i,"ListExtensionsResponseMessageSchema",{enumerable:!0,get:function(){return co}}),Object.defineProperty(i,"ExecuteExtensionCommandRequestMessageSchema",{enumerable:!0,get:function(){return uo}}),Object.defineProperty(i,"ExecuteExtensionCommandResponseMessageSchema",{enumerable:!0,get:function(){return zo}}),Object.defineProperty(i,"SearchSessionsRequestMessageSchema",{enumerable:!0,get:function(){return po}}),Object.defineProperty(i,"SearchSessionsResponseMessageSchema",{enumerable:!0,get:function(){return bo}}),Object.defineProperty(i,"SubscribePushRequestMessageSchema",{enumerable:!0,get:function(){return yo}}),Object.defineProperty(i,"SubscribePushResponseMessageSchema",{enumerable:!0,get:function(){return ho}}),Object.defineProperty(i,"GetVapidPublicKeyRequestMessageSchema",{enumerable:!0,get:function(){return jo}}),Object.defineProperty(i,"GetVapidPublicKeyResponseMessageSchema",{enumerable:!0,get:function(){return So}}),Object.defineProperty(i,"ListTerminalsRequestSchema",{enumerable:!0,get:function(){return Po}}),Object.defineProperty(i,"SubscribeTerminalsRequestSchema",{enumerable:!0,get:function(){return _o}}),Object.defineProperty(i,"UnsubscribeTerminalsRequestSchema",{enumerable:!0,get:function(){return qo}}),Object.defineProperty(i,"CreateTerminalRequestSchema",{enumerable:!0,get:function(){return Io}}),Object.defineProperty(i,"RenameTerminalRequestSchema",{enumerable:!0,get:function(){return Oo}}),Object.defineProperty(i,"StartWorkspaceScriptRequestSchema",{enumerable:!0,get:function(){return ko}}),Object.defineProperty(i,"SubscribeTerminalRequestSchema",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(i,"UnsubscribeTerminalRequestSchema",{enumerable:!0,get:function(){return wo}}),Object.defineProperty(i,"TerminalInputSchema",{enumerable:!0,get:function(){return Ao}}),Object.defineProperty(i,"KillTerminalRequestSchema",{enumerable:!0,get:function(){return Mo}}),Object.defineProperty(i,"CaptureTerminalRequestSchema",{enumerable:!0,get:function(){return Co}}),Object.defineProperty(i,"SessionInboundMessageSchema",{enumerable:!0,get:function(){return To}}),Object.defineProperty(i,"ActivityLogPayloadSchema",{enumerable:!0,get:function(){return xo}}),Object.defineProperty(i,"ActivityLogMessageSchema",{enumerable:!0,get:function(){return Lo}}),Object.defineProperty(i,"AssistantChunkMessageSchema",{enumerable:!0,get:function(){return Wo}}),Object.defineProperty(i,"AudioOutputMessageSchema",{enumerable:!0,get:function(){return Do}}),Object.defineProperty(i,"TranscriptionResultMessageSchema",{enumerable:!0,get:function(){return Eo}}),Object.defineProperty(i,"VoiceInputStateMessageSchema",{enumerable:!0,get:function(){return No}}),Object.defineProperty(i,"DictationStreamAckMessageSchema",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(i,"DictationStreamFinishAcceptedMessageSchema",{enumerable:!0,get:function(){return Fo}}),Object.defineProperty(i,"DictationStreamPartialMessageSchema",{enumerable:!0,get:function(){return Go}}),Object.defineProperty(i,"DictationStreamFinalMessageSchema",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(i,"DictationStreamErrorMessageSchema",{enumerable:!0,get:function(){return Ho}}),Object.defineProperty(i,"ServerCapabilityStateSchema",{enumerable:!0,get:function(){return Ko}}),Object.defineProperty(i,"ServerVoiceCapabilitiesSchema",{enumerable:!0,get:function(){return Vo}}),Object.defineProperty(i,"ServerCapabilitiesSchema",{enumerable:!0,get:function(){return Yo}}),Object.defineProperty(i,"ServerInfoStatusPayloadSchema",{enumerable:!0,get:function(){return Zo}}),Object.defineProperty(i,"StatusMessageSchema",{enumerable:!0,get:function(){return $o}}),Object.defineProperty(i,"PongMessageSchema",{enumerable:!0,get:function(){return ei}}),Object.defineProperty(i,"RpcErrorMessageSchema",{enumerable:!0,get:function(){return ti}}),Object.defineProperty(i,"AgentCreatedStatusPayloadSchema",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(i,"AgentCreateFailedStatusPayloadSchema",{enumerable:!0,get:function(){return ii}}),Object.defineProperty(i,"AgentResumedStatusPayloadSchema",{enumerable:!0,get:function(){return ai}}),Object.defineProperty(i,"AgentRefreshedStatusPayloadSchema",{enumerable:!0,get:function(){return si}}),Object.defineProperty(i,"RestartRequestedStatusPayloadSchema",{enumerable:!0,get:function(){return li}}),Object.defineProperty(i,"ShutdownRequestedStatusPayloadSchema",{enumerable:!0,get:function(){return ci}}),Object.defineProperty(i,"DaemonConfigChangedStatusPayloadSchema",{enumerable:!0,get:function(){return ui}}),Object.defineProperty(i,"KnownStatusPayloadSchema",{enumerable:!0,get:function(){return zi}}),Object.defineProperty(i,"ArtifactMessageSchema",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(i,"ProjectCheckoutLiteNotGitPayloadSchema",{enumerable:!0,get:function(){return gi}}),Object.defineProperty(i,"ProjectCheckoutLiteGitNonPaseoPayloadSchema",{enumerable:!0,get:function(){return bi}}),Object.defineProperty(i,"ProjectCheckoutLiteGitPaseoPayloadSchema",{enumerable:!0,get:function(){return di}}),Object.defineProperty(i,"ProjectCheckoutLitePayloadSchema",{enumerable:!0,get:function(){return mi}}),Object.defineProperty(i,"ProjectPlacementPayloadSchema",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(i,"WorkspaceScriptLifecycleSchema",{enumerable:!0,get:function(){return yi}}),Object.defineProperty(i,"WorkspaceScriptHealthSchema",{enumerable:!0,get:function(){return hi}}),Object.defineProperty(i,"WorkspaceScriptPayloadSchema",{enumerable:!0,get:function(){return ji}}),Object.defineProperty(i,"WorkspaceDescriptorPayloadSchema",{enumerable:!0,get:function(){return _i}}),Object.defineProperty(i,"AgentUpdateMessageSchema",{enumerable:!0,get:function(){return qi}}),Object.defineProperty(i,"OpenUrlMessageSchema",{enumerable:!0,get:function(){return Ii}}),Object.defineProperty(i,"AgentStreamMessageSchema",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(i,"AgentStatusMessageSchema",{enumerable:!0,get:function(){return ki}}),Object.defineProperty(i,"AgentListMessageSchema",{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(i,"FetchAgentsResponseMessageSchema",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(i,"FetchAgentHistoryResponseMessageSchema",{enumerable:!0,get:function(){return Mi}}),Object.defineProperty(i,"FetchRecentProviderSessionsResponseMessageSchema",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(i,"WorkspaceProjectDescriptorPayloadSchema",{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(i,"FetchWorkspacesResponseMessageSchema",{enumerable:!0,get:function(){return xi}}),Object.defineProperty(i,"WorkspaceUpdateMessageSchema",{enumerable:!0,get:function(){return Li}}),Object.defineProperty(i,"ScriptStatusUpdateMessageSchema",{enumerable:!0,get:function(){return Wi}}),Object.defineProperty(i,"WorkspaceSetupProgressMessageSchema",{enumerable:!0,get:function(){return Di}}),Object.defineProperty(i,"WorkspaceSetupSnapshotSchema",{enumerable:!0,get:function(){return Ei}}),Object.defineProperty(i,"WorkspaceSetupStatusResponseMessageSchema",{enumerable:!0,get:function(){return Ni}}),Object.defineProperty(i,"OpenProjectResponseMessageSchema",{enumerable:!0,get:function(){return Ui}}),Object.defineProperty(i,"ProjectAddResponseSchema",{enumerable:!0,get:function(){return Fi}}),Object.defineProperty(i,"StartWorkspaceScriptResponseMessageSchema",{enumerable:!0,get:function(){return Gi}}),Object.defineProperty(i,"LegacyListAvailableEditorsResponseMessageSchema",{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(i,"LegacyOpenInEditorResponseMessageSchema",{enumerable:!0,get:function(){return Hi}}),Object.defineProperty(i,"ArchiveWorkspaceResponseMessageSchema",{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(i,"FetchAgentResponseMessageSchema",{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(i,"AgentTimelineEntryPayloadSchema",{enumerable:!0,get:function(){return Qi}}),Object.defineProperty(i,"FetchAgentTimelineResponseMessageSchema",{enumerable:!0,get:function(){return Xi}}),Object.defineProperty(i,"AgentForkContextResponseMessageSchema",{enumerable:!0,get:function(){return Ji}}),Object.defineProperty(i,"CancelAgentResponseMessageSchema",{enumerable:!0,get:function(){return Zi}}),Object.defineProperty(i,"ClearAgentAttentionResponseMessageSchema",{enumerable:!0,get:function(){return $i}}),Object.defineProperty(i,"WorkspaceCreateResponseSchema",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(i,"WorkspaceClearAttentionResponseSchema",{enumerable:!0,get:function(){return ta}}),Object.defineProperty(i,"SendAgentMessageResponseMessageSchema",{enumerable:!0,get:function(){return na}}),Object.defineProperty(i,"WaitForFinishResponseMessageSchema",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(i,"GetDaemonConfigResponseMessageSchema",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(i,"DaemonGetStatusResponseSchema",{enumerable:!0,get:function(){return ia}}),Object.defineProperty(i,"DaemonGetPairingOfferResponseSchema",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(i,"DiagnosticsResponseSchema",{enumerable:!0,get:function(){return sa}}),Object.defineProperty(i,"SetDaemonConfigResponseMessageSchema",{enumerable:!0,get:function(){return la}}),Object.defineProperty(i,"ReadProjectConfigResponseMessageSchema",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(i,"WriteProjectConfigResponseMessageSchema",{enumerable:!0,get:function(){return ua}}),Object.defineProperty(i,"AgentPermissionRequestMessageSchema",{enumerable:!0,get:function(){return za}}),Object.defineProperty(i,"WatchActionSchema",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(i,"WatchActionablePushMessageSchema",{enumerable:!0,get:function(){return ga}}),Object.defineProperty(i,"WatchActionableResolvedMessageSchema",{enumerable:!0,get:function(){return ba}}),Object.defineProperty(i,"WatchSessionMatchSchema",{enumerable:!0,get:function(){return da}}),Object.defineProperty(i,"WatchSessionSearchResultMessageSchema",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(i,"AgentPermissionResolvedMessageSchema",{enumerable:!0,get:function(){return fa}}),Object.defineProperty(i,"AgentDeletedMessageSchema",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(i,"AgentArchivedMessageSchema",{enumerable:!0,get:function(){return ha}}),Object.defineProperty(i,"CloseItemsResponseSchema",{enumerable:!0,get:function(){return Pa}}),Object.defineProperty(i,"CheckoutStatusResponseSchema",{enumerable:!0,get:function(){return Ra}}),Object.defineProperty(i,"CheckoutPrStatusSchema",{enumerable:!0,get:function(){return Ma}}),Object.defineProperty(i,"CheckoutStatusUpdateSchema",{enumerable:!0,get:function(){return xa}}),Object.defineProperty(i,"SubscribeCheckoutDiffResponseSchema",{enumerable:!0,get:function(){return Wa}}),Object.defineProperty(i,"CheckoutDiffUpdateSchema",{enumerable:!0,get:function(){return Da}}),Object.defineProperty(i,"CheckoutCommitResponseSchema",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(i,"CheckoutMergeResponseSchema",{enumerable:!0,get:function(){return Na}}),Object.defineProperty(i,"CheckoutMergeFromBaseResponseSchema",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(i,"CheckoutPullResponseSchema",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(i,"CheckoutPushResponseSchema",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(i,"CheckoutRefreshResponseSchema",{enumerable:!0,get:function(){return Ba}}),Object.defineProperty(i,"CheckoutPrCreateResponseSchema",{enumerable:!0,get:function(){return Ha}}),Object.defineProperty(i,"CheckoutPrMergeResponseSchema",{enumerable:!0,get:function(){return Ka}}),Object.defineProperty(i,"CheckoutGithubSetAutoMergeResponseSchema",{enumerable:!0,get:function(){return Va}}),Object.defineProperty(i,"FilesUploadBeginResponseSchema",{enumerable:!0,get:function(){return Ya}}),Object.defineProperty(i,"FilesUploadChunkAckSchema",{enumerable:!0,get:function(){return Qa}}),Object.defineProperty(i,"FilesUploadCompleteResponseSchema",{enumerable:!0,get:function(){return Xa}}),Object.defineProperty(i,"CheckoutGithubCheckDetailsSchema",{enumerable:!0,get:function(){return $a}}),Object.defineProperty(i,"CheckoutGithubGetCheckDetailsResponseSchema",{enumerable:!0,get:function(){return es}}),Object.defineProperty(i,"CheckoutPrStatusResponseSchema",{enumerable:!0,get:function(){return ts}}),Object.defineProperty(i,"PullRequestTimelineItemSchema",{enumerable:!0,get:function(){return as}}),Object.defineProperty(i,"PullRequestTimelineResponseSchema",{enumerable:!0,get:function(){return ss}}),Object.defineProperty(i,"CheckoutSwitchBranchResponseSchema",{enumerable:!0,get:function(){return ls}}),Object.defineProperty(i,"CheckoutRenameBranchResponseSchema",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(i,"StashSaveResponseSchema",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(i,"StashPopResponseSchema",{enumerable:!0,get:function(){return ps}}),Object.defineProperty(i,"StashListResponseSchema",{enumerable:!0,get:function(){return gs}}),Object.defineProperty(i,"ValidateBranchResponseSchema",{enumerable:!0,get:function(){return bs}}),Object.defineProperty(i,"BranchSuggestionsResponseSchema",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(i,"GitHubSearchResponseSchema",{enumerable:!0,get:function(){return ms}}),Object.defineProperty(i,"DirectorySuggestionsResponseSchema",{enumerable:!0,get:function(){return fs}}),Object.defineProperty(i,"PaseoWorktreeListResponseSchema",{enumerable:!0,get:function(){return hs}}),Object.defineProperty(i,"PaseoWorktreeArchiveResponseSchema",{enumerable:!0,get:function(){return js}}),Object.defineProperty(i,"CreatePaseoWorktreeResponseSchema",{enumerable:!0,get:function(){return Ss}}),Object.defineProperty(i,"FileExplorerResponseSchema",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(i,"ProjectIconResponseSchema",{enumerable:!0,get:function(){return qs}}),Object.defineProperty(i,"FileDownloadTokenResponseSchema",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(i,"FileUploadResponseSchema",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(i,"ListProviderModelsResponseMessageSchema",{enumerable:!0,get:function(){return ks}}),Object.defineProperty(i,"ListProviderModesResponseMessageSchema",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(i,"ListProviderFeaturesResponseMessageSchema",{enumerable:!0,get:function(){return ws}}),Object.defineProperty(i,"ListAvailableProvidersResponseSchema",{enumerable:!0,get:function(){return As}}),Object.defineProperty(i,"GetProvidersSnapshotResponseMessageSchema",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(i,"ProvidersSnapshotUpdateMessageSchema",{enumerable:!0,get:function(){return Cs}}),Object.defineProperty(i,"RefreshProvidersSnapshotResponseMessageSchema",{enumerable:!0,get:function(){return Ts}}),Object.defineProperty(i,"ProviderDiagnosticResponseMessageSchema",{enumerable:!0,get:function(){return xs}}),Object.defineProperty(i,"ProviderUsageToneSchema",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(i,"ProviderUsageStatusSchema",{enumerable:!0,get:function(){return Ws}}),Object.defineProperty(i,"ProviderUsageWindowSchema",{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(i,"ProviderUsageBalanceSchema",{enumerable:!0,get:function(){return Es}}),Object.defineProperty(i,"ProviderUsageDetailSchema",{enumerable:!0,get:function(){return Ns}}),Object.defineProperty(i,"ProviderUsageSchema",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(i,"ProviderUsageListResponseMessageSchema",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(i,"ListCommandsResponseSchema",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(i,"TerminalCellSchema",{enumerable:!0,get:function(){return Ks}}),Object.defineProperty(i,"TerminalCursorStyleSchema",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(i,"TerminalCursorSchema",{enumerable:!0,get:function(){return Ys}}),Object.defineProperty(i,"TerminalStateSchema",{enumerable:!0,get:function(){return Qs}}),Object.defineProperty(i,"ListTerminalsResponseSchema",{enumerable:!0,get:function(){return Xs}}),Object.defineProperty(i,"TerminalsChangedSchema",{enumerable:!0,get:function(){return Js}}),Object.defineProperty(i,"CreateTerminalResponseSchema",{enumerable:!0,get:function(){return Zs}}),Object.defineProperty(i,"RenameTerminalResponseSchema",{enumerable:!0,get:function(){return $s}}),Object.defineProperty(i,"SubscribeTerminalResponseSchema",{enumerable:!0,get:function(){return el}}),Object.defineProperty(i,"KillTerminalResponseSchema",{enumerable:!0,get:function(){return tl}}),Object.defineProperty(i,"CaptureTerminalResponseSchema",{enumerable:!0,get:function(){return nl}}),Object.defineProperty(i,"TerminalStreamExitSchema",{enumerable:!0,get:function(){return rl}}),Object.defineProperty(i,"TerminalAttentionRequiredSchema",{enumerable:!0,get:function(){return ol}}),Object.defineProperty(i,"DaemonUpdateResponseSchema",{enumerable:!0,get:function(){return il}}),Object.defineProperty(i,"DaemonUpdateProgressMessageSchema",{enumerable:!0,get:function(){return al}}),Object.defineProperty(i,"SessionOutboundMessageSchema",{enumerable:!0,get:function(){return sl}}),Object.defineProperty(i,"WSPingMessageSchema",{enumerable:!0,get:function(){return ll}}),Object.defineProperty(i,"WSPongMessageSchema",{enumerable:!0,get:function(){return cl}}),Object.defineProperty(i,"WSHelloMessageSchema",{enumerable:!0,get:function(){return ul}}),Object.defineProperty(i,"WSRecordingStateMessageSchema",{enumerable:!0,get:function(){return zl}}),Object.defineProperty(i,"WSSessionInboundSchema",{enumerable:!0,get:function(){return pl}}),Object.defineProperty(i,"WSSessionOutboundSchema",{enumerable:!0,get:function(){return gl}}),Object.defineProperty(i,"WSInboundMessageSchema",{enumerable:!0,get:function(){return bl}}),Object.defineProperty(i,"WSOutboundMessageSchema",{enumerable:!0,get:function(){return dl}}),i.extractSessionMessage=function(e){if("session"===e.type)return e.message;return null},i.wrapSessionMessage=function(e){return{type:"session",message:e}},i.parseServerInfoStatusPayload=function(e){const t=Zo.safeParse(e);if(!t.success)return null;return t.data},Object.defineProperty(i,"PermissionHookEventSchema",{enumerable:!0,get:function(){return ml}}),Object.defineProperty(i,"PreToolHookEventSchema",{enumerable:!0,get:function(){return fl}}),Object.defineProperty(i,"PostToolHookEventSchema",{enumerable:!0,get:function(){return yl}}),Object.defineProperty(i,"StatusLineHookEventSchema",{enumerable:!0,get:function(){return hl}}),Object.defineProperty(i,"SessionStartHookEventSchema",{enumerable:!0,get:function(){return jl}}),Object.defineProperty(i,"SessionEndHookEventSchema",{enumerable:!0,get:function(){return Sl}}),Object.defineProperty(i,"AssistantMessageDeltaHookEventSchema",{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(i,"UsageUpdateHookEventSchema",{enumerable:!0,get:function(){return _l}}),Object.defineProperty(i,"HookEventSchema",{enumerable:!0,get:function(){return ql}});var l,c=t(a[0]),u=(l=c)&&l.__esModule?l:{default:l},z=t(a[1]),p=t(a[2]),g=t(a[3]),b=t(a[4]),d=t(a[5]),m=t(a[6]),f=t(a[7]),y=t(a[8]),h=t(a[9]),j=t(a[10]),S=t(a[11]),P=t(a[12]),_=t(a[13]),q=t(a[14]);const I=z.z.object({id:z.z.string().min(1),label:z.z.string().min(1),description:z.z.string().optional(),isDefault:z.z.boolean().optional()}).passthrough(),O=z.z.object({enabled:z.z.boolean().optional(),additionalModels:z.z.array(I).optional()}).passthrough(),k=z.z.object({provider:z.z.string().min(1),model:z.z.string().min(1).optional(),thinkingOptionId:z.z.string().min(1).optional()}).passthrough(),R=z.z.object({providers:z.z.array(k).default([])}).passthrough(),w=z.z.object({id:z.z.string(),name:z.z.string(),command:z.z.string(),args:z.z.array(z.z.string()).optional(),icon:z.z.string().optional()}).passthrough(),v=z.z.object({id:z.z.string().min(1),label:z.z.string().min(1),limit:z.z.number().int().positive().optional()}).passthrough(),A=z.z.object({buckets:z.z.array(v).default([]),defaultBucketId:z.z.string().nullable().default(null)}).passthrough(),M=z.z.object({enabled:z.z.boolean().default(!1)}).passthrough(),C=z.z.object({mcp:z.z.object({injectIntoAgents:z.z.boolean()}).passthrough(),browserTools:M.default({enabled:!1}),providers:z.z.record(z.z.string(),O).default({}),metadataGeneration:R.default({providers:[]}),autoArchiveAfterMerge:z.z.boolean().default(!1),enableTerminalAgentHooks:z.z.boolean().default(!1),appendSystemPrompt:z.z.string().default(""),terminalProfiles:z.z.array(w).optional(),kanbanBoard:A.optional()}).passthrough(),T=z.z.object({mcp:C.shape.mcp.partial().optional(),browserTools:M.partial().optional(),providers:z.z.record(z.z.string(),O.partial().passthrough()).optional(),metadataGeneration:R.partial().optional(),autoArchiveAfterMerge:z.z.boolean().optional(),enableTerminalAgentHooks:z.z.boolean().optional(),appendSystemPrompt:z.z.string().optional(),terminalProfiles:z.z.array(w).optional(),kanbanBoard:A.optional()}).partial().passthrough(),x=z.z.enum(b.AGENT_LIFECYCLE_STATUSES),L=["pending","running","completed","failed","cancelled"],W=z.z.enum(L),D=z.z.object({id:z.z.string(),title:z.z.string(),status:W,storyCount:z.z.number().int().nonnegative().optional(),completedStoryCount:z.z.number().int().nonnegative().optional()}),E=z.z.object({id:z.z.string(),cwd:z.z.string(),status:W,title:z.z.string().nullable().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),phases:z.z.array(D).default([]),childAgentIds:z.z.array(z.z.string()).default([]),totalStoryCount:z.z.number().int().nonnegative().optional(),completedStoryCount:z.z.number().int().nonnegative().default(0),createdAt:z.z.string(),updatedAt:z.z.string(),startedAt:z.z.string().nullable().optional(),completedAt:z.z.string().nullable().optional(),archivedAt:z.z.string().nullable().optional()}),N=E,U=["created","started","completed","failed","cancelled","archived"],F=z.z.enum(U),G=z.z.object({workflowId:z.z.string(),type:F,status:W,at:z.z.string()}),B=z.z.object({type:z.z.literal("workflow.list.request"),requestId:z.z.string()}),H=z.z.object({type:z.z.literal("workflow.list.response"),payload:z.z.object({requestId:z.z.string(),workflows:z.z.array(E)})}),K=z.z.object({type:z.z.literal("workflow.get.request"),requestId:z.z.string(),workflowId:z.z.string()}),V=z.z.object({type:z.z.literal("workflow.get.response"),payload:z.z.object({requestId:z.z.string(),workflow:E.nullable()})}),Y=z.z.object({type:z.z.literal("workflow.cancel.request"),requestId:z.z.string(),workflowId:z.z.string()}),Q=z.z.object({type:z.z.literal("workflow.cancel.response"),payload:z.z.object({requestId:z.z.string(),workflow:E})}),X=z.z.object({type:z.z.literal("workflow.events.request"),requestId:z.z.string(),workflowId:z.z.string()}),J=z.z.object({type:z.z.literal("workflow.events.response"),payload:z.z.object({requestId:z.z.string(),workflowId:z.z.string(),events:z.z.array(G)})}),Z=z.z.object({id:z.z.string(),dependencies:z.z.array(z.z.string()),description:z.z.string(),prompt:z.z.string(),title:z.z.string(),outputFile:z.z.string(),parallelizable:z.z.boolean(),estimatedMinutes:z.z.number(),agentType:z.z.string().optional(),targetFiles:z.z.array(z.z.string()).optional()}),$=z.z.object({goal:z.z.string(),masterPrompt:z.z.string(),metadata:z.z.object({executionLayers:z.z.array(z.z.array(z.z.string())),maxParallelism:z.z.number(),totalTasks:z.z.number(),estimatedDuration:z.z.number(),perFileMode:z.z.boolean(),storyFormat:z.z.boolean().optional(),totalFiles:z.z.number().optional()}),session:z.z.object({id:z.z.string(),createdAt:z.z.string(),outputDirectory:z.z.string()}),tasks:z.z.array(Z)}),ee=z.z.object({type:z.z.literal("workflow.start.request"),requestId:z.z.string(),graph:$,provider:z.z.string(),cwd:z.z.string(),model:z.z.string().optional(),title:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional()}),te=z.z.object({type:z.z.literal("workflow.start.response"),payload:z.z.object({requestId:z.z.string(),workflowId:z.z.string(),childAgentIds:z.z.array(z.z.string()),status:W})}),ne=z.z.object({id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),icon:z.z.string().optional(),colorTier:z.z.string().optional()}),re=z.z.enum(["ready","loading","error","unavailable"]),oe=z.z.object({id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),isDefault:z.z.boolean().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),ie=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("info"),message:z.z.string()}),z.z.object({type:z.z.literal("warning"),message:z.z.string()}),z.z.object({type:z.z.literal("error"),message:z.z.string()})]),ae=z.z.object({type:z.z.literal("toggle"),id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),tooltip:z.z.string().optional(),icon:z.z.string().optional(),value:z.z.boolean()}),se=z.z.object({type:z.z.literal("select"),id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),tooltip:z.z.string().optional(),icon:z.z.string().optional(),value:z.z.string().nullable(),options:z.z.array(oe)}),le=z.z.discriminatedUnion("type",[ae,se]),ce=z.z.object({provider:m.AgentProviderSchema,id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),isDefault:z.z.boolean().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional(),contextWindowMaxTokens:z.z.number().optional(),thinkingOptions:z.z.array(oe).optional(),defaultThinkingOptionId:z.z.string().optional()}),ue=z.z.object({provider:m.AgentProviderSchema,status:re,enabled:z.z.boolean().optional().default(!0),error:z.z.string().optional(),models:z.z.array(ce).optional(),modes:z.z.array(ne).optional(),fetchedAt:z.z.string().optional(),label:z.z.string().optional(),description:z.z.string().optional(),defaultModeId:z.z.string().nullable().optional(),wireFamily:z.z.enum(["anthropic-messages","openai-compatible","generic-acp"]).optional(),compatibleProviders:z.z.array(z.z.string()).optional()}),ze=z.z.object({supportsStreaming:z.z.boolean(),supportsSessionPersistence:z.z.boolean(),supportsSessionListing:z.z.boolean().optional(),supportsDynamicModes:z.z.boolean(),supportsMcpServers:z.z.boolean(),supportsReasoningStream:z.z.boolean(),supportsToolInvocations:z.z.boolean(),supportsRewindConversation:z.z.boolean().optional().default(!1),supportsRewindFiles:z.z.boolean().optional().default(!1),supportsRewindBoth:z.z.boolean().optional().default(!1)}).catchall(z.z.boolean()),pe=z.z.object({inputTokens:z.z.number().optional(),cachedInputTokens:z.z.number().optional(),outputTokens:z.z.number().optional(),totalCostUsd:z.z.number().optional(),contextWindowMaxTokens:z.z.number().optional(),contextWindowUsedTokens:z.z.number().optional()}),ge=z.z.object({type:z.z.literal("stdio"),command:z.z.string(),args:z.z.array(z.z.string()).optional(),env:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),be=z.z.object({type:z.z.literal("http"),url:z.z.string(),headers:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),de=z.z.object({type:z.z.literal("sse"),url:z.z.string(),headers:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),me=z.z.discriminatedUnion("type",[ge,be,de]),fe=z.z.object({provider:m.AgentProviderSchema,cwd:z.z.string(),modeId:z.z.string().optional(),model:z.z.string().optional(),thinkingOptionId:z.z.string().optional(),featureValues:z.z.record(z.z.string(),z.z.unknown()).optional(),title:z.z.string().trim().min(1).max(d.MAX_EXPLICIT_AGENT_TITLE_CHARS).optional().nullable(),approvalPolicy:z.z.string().optional(),sandboxMode:z.z.string().optional(),networkAccess:z.z.boolean().optional(),webSearch:z.z.boolean().optional(),extra:z.z.object({codex:z.z.record(z.z.string(),z.z.unknown()).optional(),claude:z.z.record(z.z.string(),z.z.unknown()).optional()}).partial().optional(),systemPrompt:z.z.string().optional(),mcpServers:z.z.record(z.z.string(),me).optional()}),ye=z.z.record(z.z.string(),z.z.unknown()),he=z.z.object({id:z.z.string(),label:z.z.string(),behavior:z.z.enum(["allow","deny"]),variant:z.z.enum(["primary","secondary","danger"]).optional(),intent:z.z.enum(["implement","implement_resume","dismiss"]).optional()}),je=z.z.discriminatedUnion("behavior",[z.z.object({behavior:z.z.literal("allow"),selectedActionId:z.z.string().optional(),updatedInput:z.z.record(z.z.string(),z.z.unknown()).optional(),updatedPermissions:z.z.array(ye).optional()}),z.z.object({behavior:z.z.literal("deny"),selectedActionId:z.z.string().optional(),message:z.z.string().optional(),interrupt:z.z.boolean().optional()})]),Se=z.z.object({id:z.z.string(),provider:m.AgentProviderSchema,name:z.z.string(),kind:z.z.enum(["tool","plan","question","mode","other"]),title:z.z.string().optional(),description:z.z.string().optional(),input:z.z.record(z.z.string(),z.z.unknown()).optional(),detail:z.z.lazy(()=>Oe).optional(),suggestions:z.z.array(ye).optional(),actions:z.z.array(he).optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Pe=z.z.union([z.z.null(),z.z.boolean(),z.z.number(),z.z.string(),z.z.array(z.z.unknown()),z.z.object({}).passthrough()]),_e=z.z.union([z.z.boolean(),z.z.number(),z.z.string(),z.z.array(z.z.unknown()),z.z.object({}).passthrough()]),qe=z.z.object({index:z.z.number().int().positive(),command:z.z.string(),cwd:z.z.string(),log:z.z.string().optional().default(""),status:z.z.enum(["running","completed","failed"]),exitCode:z.z.number().nullable(),durationMs:z.z.number().nonnegative().optional()}),Ie=z.z.object({type:z.z.literal("worktree_setup"),worktreePath:z.z.string(),branchName:z.z.string(),log:z.z.string(),commands:z.z.array(qe),truncated:z.z.boolean().optional()}),Oe=z.z.discriminatedUnion("type",[Ie,z.z.object({type:z.z.literal("shell"),command:z.z.string(),cwd:z.z.string().optional(),output:z.z.string().optional(),exitCode:z.z.number().nullable().optional()}),z.z.object({type:z.z.literal("read"),filePath:z.z.string(),content:z.z.string().optional(),offset:z.z.number().optional(),limit:z.z.number().optional()}),z.z.object({type:z.z.literal("edit"),filePath:z.z.string(),oldString:z.z.string().optional(),newString:z.z.string().optional(),unifiedDiff:z.z.string().optional()}),z.z.object({type:z.z.literal("write"),filePath:z.z.string(),content:z.z.string().optional()}),z.z.object({type:z.z.literal("search"),query:z.z.string(),toolName:z.z.enum(["search","grep","glob","web_search"]).optional(),content:z.z.string().optional(),filePaths:z.z.array(z.z.string()).optional(),webResults:z.z.array(z.z.object({title:z.z.string(),url:z.z.string()})).optional(),annotations:z.z.array(z.z.string()).optional(),numFiles:z.z.number().optional(),numMatches:z.z.number().optional(),durationMs:z.z.number().optional(),durationSeconds:z.z.number().optional(),truncated:z.z.boolean().optional(),mode:z.z.enum(["content","files_with_matches","count"]).optional()}),z.z.object({type:z.z.literal("fetch"),url:z.z.string(),prompt:z.z.string().optional(),result:z.z.string().optional(),code:z.z.number().optional(),codeText:z.z.string().optional(),bytes:z.z.number().optional(),durationMs:z.z.number().optional()}),z.z.object({type:z.z.literal("sub_agent"),subAgentType:z.z.string().optional(),description:z.z.string().optional(),childSessionId:z.z.string().optional(),log:z.z.string(),actions:z.z.array(z.z.object({index:z.z.number().int().positive(),toolName:z.z.string(),summary:z.z.string().optional()})).optional()}),z.z.object({type:z.z.literal("plain_text"),label:z.z.string().optional(),text:z.z.string().optional(),icon:z.z.enum(f.TOOL_CALL_ICON_NAMES).optional()}),z.z.object({type:z.z.literal("plan"),text:z.z.string()}),z.z.object({type:z.z.literal("unknown"),input:Pe,output:Pe})]),ke=z.z.object({type:z.z.literal("tool_call"),callId:z.z.string(),name:z.z.string(),detail:Oe,metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Re=ke.extend({status:z.z.literal("running"),error:z.z.null()}),we=ke.extend({status:z.z.literal("completed"),error:z.z.null()}),ve=ke.extend({status:z.z.literal("failed"),error:_e}),Ae=ke.extend({status:z.z.literal("canceled"),error:z.z.null()}),Me=z.z.discriminatedUnion("status",[Re,we,ve,Ae]),Ce=z.z.union([z.z.object({type:z.z.literal("user_message"),text:z.z.string(),messageId:z.z.string().optional()}),z.z.object({type:z.z.literal("assistant_message"),text:z.z.string(),messageId:z.z.string().optional()}),z.z.object({type:z.z.literal("reasoning"),text:z.z.string()}),Me,z.z.object({type:z.z.literal("todo"),items:z.z.array(z.z.object({text:z.z.string(),completed:z.z.boolean()}))}),z.z.object({type:z.z.literal("error"),message:z.z.string()}),z.z.object({type:z.z.literal("compaction"),status:z.z.enum(["loading","completed"]),trigger:z.z.enum(["auto","manual"]).optional(),preTokens:z.z.number().optional()})]),Te=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("thread_started"),sessionId:z.z.string(),provider:m.AgentProviderSchema}),z.z.object({type:z.z.literal("turn_started"),provider:m.AgentProviderSchema}),z.z.object({type:z.z.literal("turn_completed"),provider:m.AgentProviderSchema,usage:pe.optional()}),z.z.object({type:z.z.literal("turn_failed"),provider:m.AgentProviderSchema,error:z.z.string(),code:z.z.string().optional(),diagnostic:z.z.string().optional()}),z.z.object({type:z.z.literal("turn_canceled"),provider:m.AgentProviderSchema,reason:z.z.string()}),z.z.object({type:z.z.literal("timeline"),provider:m.AgentProviderSchema,item:Ce}),z.z.object({type:z.z.literal("permission_requested"),provider:m.AgentProviderSchema,request:Se}),z.z.object({type:z.z.literal("permission_resolved"),provider:m.AgentProviderSchema,requestId:z.z.string(),resolution:je}),z.z.object({type:z.z.literal("attention_required"),provider:m.AgentProviderSchema,reason:z.z.enum(["finished","error","permission"]),timestamp:z.z.string(),shouldNotify:z.z.boolean(),notification:z.z.object({title:z.z.string(),body:z.z.string(),data:z.z.object({serverId:z.z.string(),agentId:z.z.string(),reason:z.z.enum(["finished","error","permission"])})}).optional()})]),xe=z.z.object({provider:m.AgentProviderSchema,sessionId:z.z.string(),nativeHandle:z.z.string().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}).nullable(),Le=z.z.object({provider:m.AgentProviderSchema,sessionId:z.z.string().nullable(),model:z.z.string().nullable().optional(),thinkingOptionId:z.z.string().nullable().optional(),modeId:z.z.string().nullable().optional(),extra:z.z.record(z.z.string(),z.z.unknown()).optional()}),We=z.z.object({kind:z.z.enum(["pr","mr","issue","deploy","preview","doc","other"]),url:z.z.string(),label:z.z.string().optional()}),De=z.z.object({goal:z.z.string().optional(),nextStep:z.z.string().optional(),blockers:z.z.array(z.z.string()).optional(),links:z.z.array(We).optional(),keyFiles:z.z.array(z.z.string()).optional(),summary:z.z.string().optional(),accomplishments:z.z.array(z.z.string()).optional(),selfReportedAt:z.z.string().optional(),generatedAt:z.z.string().optional(),derivedNextStep:z.z.string().optional(),derivedBlockers:z.z.array(z.z.string()).optional(),urgency:z.z.enum(["low","normal","high"]).optional(),deadline:z.z.string().optional(),derivedDeadline:z.z.string().optional()}),Ee=z.z.object({id:z.z.string(),provider:m.AgentProviderSchema,cwd:z.z.string(),workspaceId:z.z.string().optional(),model:z.z.string().nullable(),features:z.z.array(le).optional(),thinkingOptionId:z.z.string().nullable().optional(),effectiveThinkingOptionId:z.z.string().nullable().optional(),createdAt:z.z.string(),updatedAt:z.z.string(),lastUserMessageAt:z.z.string().nullable(),status:x,capabilities:ze,currentModeId:z.z.string().nullable(),availableModes:z.z.array(ne),pendingPermissions:z.z.array(Se),persistence:xe.nullable(),runtimeInfo:Le.optional(),lastUsage:pe.optional(),lastError:z.z.string().optional(),title:z.z.string().nullable(),labels:z.z.record(z.z.string(),z.z.string()).default({}),digest:De.optional(),requiresAttention:z.z.boolean().optional(),attentionReason:z.z.enum(["finished","error","permission"]).nullable().optional(),attentionTimestamp:z.z.string().nullable().optional(),archivedAt:z.z.string().nullable().optional(),activeBackgroundTaskCount:z.z.number().int().nonnegative().optional(),providerUnavailable:z.z.boolean().optional()}),Ne=z.z.object({id:z.z.string(),shortId:z.z.string(),title:z.z.string().nullable(),provider:m.AgentProviderSchema,model:z.z.string().nullable(),thinkingOptionId:z.z.string().nullable().optional(),effectiveThinkingOptionId:z.z.string().nullable().optional(),status:x,cwd:z.z.string(),createdAt:z.z.string(),updatedAt:z.z.string(),lastUserMessageAt:z.z.string().nullable(),archivedAt:z.z.string().nullable().optional(),requiresAttention:z.z.boolean().optional(),attentionReason:z.z.enum(["finished","error","permission"]).nullable().optional(),attentionTimestamp:z.z.string().nullable().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),digest:De.optional(),activeBackgroundTaskCount:z.z.number().int().nonnegative().optional(),providerUnavailable:z.z.boolean().optional()}),Ue=z.z.object({providerId:z.z.string(),providerLabel:z.z.string(),providerHandleId:z.z.string(),cwd:z.z.string(),title:z.z.string().nullable(),firstPromptPreview:z.z.string().nullable(),lastPromptPreview:z.z.string().nullable(),lastActivityAt:z.z.string()}),Fe=z.z.object({type:z.z.literal("voice_audio_chunk"),audio:z.z.string(),format:z.z.string(),isLast:z.z.boolean()}),Ge=z.z.object({type:z.z.literal("abort_request")}),Be=z.z.object({type:z.z.literal("audio_played"),id:z.z.string()}),He=z.z.object({labels:z.z.record(z.z.string(),z.z.string()).optional(),projectKeys:z.z.array(z.z.string()).optional(),statuses:z.z.array(x).optional(),includeArchived:z.z.boolean().optional(),requiresAttention:z.z.boolean().optional(),thinkingOptionId:z.z.string().nullable().optional()}),Ke=z.z.object({type:z.z.literal("delete_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Ve=z.z.object({type:z.z.literal("archive_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Ye=z.z.object({type:z.z.literal("dismiss_background_task_request"),agentId:z.z.string(),taskId:z.z.string(),requestId:z.z.string()}),Qe=z.z.object({type:z.z.literal("background_task_dismissed"),payload:z.z.object({agentId:z.z.string(),taskId:z.z.string(),dismissed:z.z.boolean(),requestId:z.z.string()})}),Xe=z.z.object({type:z.z.literal("close_items_request"),agentIds:z.z.array(z.z.string()).default([]),terminalIds:z.z.array(z.z.string()).default([]),requestId:z.z.string()}),Je=z.z.object({type:z.z.literal("update_agent_request"),agentId:z.z.string(),name:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional(),requestId:z.z.string()}),Ze=z.z.object({type:z.z.literal("project.rename.request"),projectId:z.z.string(),customName:z.z.string().nullable(),requestId:z.z.string()}),$e=z.z.object({type:z.z.literal("project.remove.request"),projectId:z.z.string(),requestId:z.z.string()}),et=z.z.object({type:z.z.literal("workspace.title.set.request"),workspaceId:z.z.string(),title:z.z.string().nullable(),requestId:z.z.string()}),tt=z.z.object({type:z.z.literal("set_voice_mode"),enabled:z.z.boolean(),agentId:z.z.string().optional(),requestId:z.z.string().optional()}),nt=z.z.object({type:z.z.literal("github_pr"),mimeType:z.z.literal("application/github-pr"),number:z.z.number().int().positive(),title:z.z.string(),url:z.z.string(),body:z.z.string().nullable().optional(),baseRefName:z.z.string().nullable().optional(),headRefName:z.z.string().nullable().optional()}),rt=z.z.object({type:z.z.literal("github_issue"),mimeType:z.z.literal("application/github-issue"),number:z.z.number().int().positive(),title:z.z.string(),url:z.z.string(),body:z.z.string().nullable().optional()}),ot=z.z.object({type:z.z.literal("text"),mimeType:z.z.literal("text/plain"),contextKind:z.z.string().optional(),title:z.z.string().nullable().optional(),text:z.z.string()}).transform(e=>{let{contextKind:t}=e,n=(0,u.default)(e,s);return Object.assign({},n,"chat_history"===t?{contextKind:t}:{})}),it=z.z.object({oldLineNumber:z.z.number().int().positive().nullable(),newLineNumber:z.z.number().int().positive().nullable(),type:z.z.enum(["add","remove","context"]),content:z.z.string()}),at=z.z.object({filePath:z.z.string(),side:z.z.enum(["old","new"]),lineNumber:z.z.number().int().positive(),body:z.z.string(),context:z.z.object({hunkHeader:z.z.string(),targetLine:it,lines:z.z.array(it)})}),st=z.z.object({type:z.z.literal("review"),mimeType:z.z.literal("application/paseo-review"),cwd:z.z.string(),mode:z.z.enum(["uncommitted","base"]),baseRef:z.z.string().nullable().optional(),comments:z.z.array(at)}),lt=z.z.object({type:z.z.literal("file"),name:z.z.string(),mimeType:z.z.string(),size:z.z.number().int().nonnegative(),fileId:z.z.string(),path:z.z.string()}),ct=z.z.object({type:z.z.literal("uploaded_file"),id:z.z.string(),fileName:z.z.string(),mimeType:z.z.string(),size:z.z.number().int().nonnegative(),path:z.z.string()}),ut=z.z.discriminatedUnion("type",[nt,rt,ot,st,lt,ct]);const zt=z.z.unknown().transform(function(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){const e=ut.safeParse(n);e.success&&t.push(e.data)}return t}).optional(),pt=z.z.object({data:z.z.string(),mimeType:z.z.string()}),gt=z.z.object({type:z.z.literal("send_agent_message"),agentId:z.z.string(),text:z.z.string(),messageId:z.z.string().optional(),images:z.z.array(pt).optional(),attachments:zt}),bt=z.z.object({type:z.z.literal("fetch_agents_request"),requestId:z.z.string(),scope:z.z.enum(["active"]).optional(),filter:He.optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","created_at","updated_at","title"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional(),subscribe:z.z.object({subscriptionId:z.z.string().optional()}).optional()}),dt=z.z.enum(["needs_input","failed","running","attention","done"]),mt=z.z.object({type:z.z.literal("fetch_workspaces_request"),requestId:z.z.string(),filter:z.z.object({query:z.z.string().optional(),projectId:z.z.string().optional(),idPrefix:z.z.string().optional()}).optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","activity_at","name","project_id"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional(),subscribe:z.z.object({subscriptionId:z.z.string().optional()}).optional()}),ft=z.z.object({type:z.z.literal("fetch_agent_history_request"),requestId:z.z.string(),filter:He.optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","created_at","updated_at","title"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional()}),yt=z.z.object({type:z.z.literal("fetch_recent_provider_sessions_request"),requestId:z.z.string(),cwd:z.z.string().optional(),providers:z.z.array(z.z.string()).optional(),since:z.z.string().optional(),limit:z.z.number().int().positive().max(200).optional()}),ht=z.z.object({type:z.z.literal("fetch_agent_request"),requestId:z.z.string(),agentId:z.z.string()}),jt=z.z.object({type:z.z.literal("send_agent_message_request"),requestId:z.z.string(),agentId:z.z.string(),text:z.z.string(),messageId:z.z.string().optional(),images:z.z.array(pt).optional(),attachments:zt}),St=z.z.object({type:z.z.literal("wait_for_finish_request"),requestId:z.z.string(),agentId:z.z.string(),timeoutMs:z.z.number().int().positive().optional()}),Pt=z.z.object({type:z.z.literal("daemon.get_status.request"),requestId:z.z.string()}),_t=z.z.object({type:z.z.literal("daemon.get_pairing_offer.request"),requestId:z.z.string()}),qt=z.z.object({type:z.z.literal("diagnostics.request"),requestId:z.z.string()}),It=z.z.object({type:z.z.literal("get_daemon_config_request"),requestId:z.z.string()}),Ot=z.z.object({type:z.z.literal("set_daemon_config_request"),requestId:z.z.string(),config:T}),kt=z.z.object({type:z.z.literal("read_project_config_request"),requestId:z.z.string(),repoRoot:z.z.string()}),Rt=z.z.object({type:z.z.literal("write_project_config_request"),requestId:z.z.string(),repoRoot:z.z.string(),config:q.PaseoConfigRawSchema,expectedRevision:q.PaseoConfigRevisionSchema.nullable()}),wt=z.z.object({type:z.z.literal("dictation_stream_start"),dictationId:z.z.string(),format:z.z.string()}),vt=z.z.object({type:z.z.literal("dictation_stream_chunk"),dictationId:z.z.string(),seq:z.z.number().int().nonnegative(),audio:z.z.string(),format:z.z.string()}),At=z.z.object({type:z.z.literal("dictation_stream_finish"),dictationId:z.z.string(),finalSeq:z.z.number().int().nonnegative()}),Mt=z.z.object({type:z.z.literal("dictation_stream_cancel"),dictationId:z.z.string()}),Ct=z.z.object({baseBranch:z.z.string().optional(),createNewBranch:z.z.boolean().optional(),newBranchName:z.z.string().optional(),createWorktree:z.z.boolean().optional(),worktreeSlug:z.z.string().optional(),refName:z.z.string().min(1).optional(),action:z.z.enum(["branch-off","checkout"]).optional(),githubPrNumber:z.z.number().int().positive().optional()}),Tt=z.z.discriminatedUnion("mode",[z.z.object({mode:z.z.literal("branch-off"),newBranch:z.z.string().min(1),base:z.z.string().min(1).optional()}),z.z.object({mode:z.z.literal("checkout-branch"),branch:z.z.string().min(1)}),z.z.object({mode:z.z.literal("checkout-pr"),prNumber:z.z.number().int().positive()})]),xt=z.z.object({type:z.z.literal("create_agent_request"),config:fe,env:z.z.record(z.z.string(),z.z.string()).optional(),workspaceId:z.z.string().optional(),worktreeName:z.z.string().optional(),initialPrompt:z.z.string().optional(),clientMessageId:z.z.string().optional(),outputSchema:z.z.record(z.z.string(),z.z.unknown()).optional(),images:z.z.array(pt).optional(),attachments:zt,git:Ct.optional(),worktree:Tt.optional(),autoArchive:z.z.boolean().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),resumeSessionId:z.z.string().min(1).optional(),requestId:z.z.string()}),Lt=z.z.object({type:z.z.literal("list_provider_models_request"),provider:m.AgentProviderSchema,cwd:z.z.string().optional(),requestId:z.z.string()}),Wt=z.z.object({type:z.z.literal("list_provider_modes_request"),provider:m.AgentProviderSchema,cwd:z.z.string().optional(),requestId:z.z.string()}),Dt=z.z.object({type:z.z.literal("list_available_providers_request"),requestId:z.z.string()}),Et=z.z.object({type:z.z.literal("get_providers_snapshot_request"),cwd:z.z.string().optional(),requestId:z.z.string()}),Nt=z.z.object({type:z.z.literal("refresh_providers_snapshot_request"),cwd:z.z.string().optional(),providers:z.z.array(m.AgentProviderSchema).optional(),requestId:z.z.string()}),Ut=z.z.object({type:z.z.literal("provider_diagnostic_request"),provider:m.AgentProviderSchema,requestId:z.z.string()}),Ft=z.z.object({type:z.z.literal("provider.usage.list.request"),requestId:z.z.string()}),Gt=z.z.object({type:z.z.literal("resume_agent_request"),handle:xe,overrides:fe.partial().optional(),requestId:z.z.string()}),Bt=z.z.object({type:z.z.literal("import_agent_request"),provider:m.AgentProviderSchema.optional(),providerId:z.z.string().optional(),sessionId:z.z.string().optional(),providerHandleId:z.z.string().optional(),cwd:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional(),requestId:z.z.string()}),Ht=z.z.object({type:z.z.literal("refresh_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Kt=z.z.object({type:z.z.literal("cancel_agent_request"),agentId:z.z.string(),requestId:z.z.string().optional()}),Vt=z.z.object({type:z.z.literal("restart_server_request"),reason:z.z.string().optional(),requestId:z.z.string()}),Yt=z.z.object({type:z.z.literal("shutdown_server_request"),requestId:z.z.string()}),Qt=z.z.object({type:z.z.literal("daemon.update.request"),requestId:z.z.string()}),Xt=z.z.object({epoch:z.z.string(),seq:z.z.number().int().nonnegative()}),Jt=z.z.object({type:z.z.literal("fetch_agent_timeline_request"),agentId:z.z.string(),requestId:z.z.string(),direction:z.z.enum(["tail","before","after"]).optional(),cursor:Xt.optional(),limit:z.z.number().int().nonnegative().optional(),projection:z.z.enum(["projected","canonical"]).optional()}),Zt=z.z.object({type:z.z.literal("agent.fork_context.request"),agentId:z.z.string(),boundaryMessageId:z.z.string().optional(),requestId:z.z.string()}),$t=z.z.object({type:z.z.literal("set_agent_mode_request"),agentId:z.z.string(),modeId:z.z.string(),requestId:z.z.string()}),en=z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable(),notice:ie.nullable().optional()}),tn=z.z.object({type:z.z.literal("set_agent_mode_response"),payload:en}),nn=z.z.object({type:z.z.literal("set_agent_model_request"),agentId:z.z.string(),modelId:z.z.string().nullable(),requestId:z.z.string()}),rn=z.z.object({type:z.z.literal("set_agent_model_response"),payload:en}),on=z.z.object({type:z.z.literal("swap_agent_provider_request"),requestId:z.z.string(),agentId:z.z.string(),newProviderId:z.z.string(),overrides:z.z.object({model:z.z.string().nullable().optional(),modeId:z.z.string().optional()}).optional()}),an=z.z.object({type:z.z.literal("swap_agent_provider_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable(),oldProvider:z.z.string().optional(),newProvider:z.z.string().optional()})}),sn=z.z.object({type:z.z.literal("agent_provider_swapped"),payload:z.z.object({agentId:z.z.string(),oldProvider:z.z.string(),newProvider:z.z.string(),timestamp:z.z.string()})}),ln=z.z.object({type:z.z.literal("set_agent_thinking_request"),agentId:z.z.string(),thinkingOptionId:z.z.string().nullable(),requestId:z.z.string()}),cn=z.z.object({type:z.z.literal("set_agent_thinking_response"),payload:en}),un=z.z.object({type:z.z.literal("set_agent_feature_request"),agentId:z.z.string(),featureId:z.z.string(),value:z.z.unknown(),requestId:z.z.string()}),zn=z.z.object({type:z.z.literal("set_agent_feature_response"),payload:en}),pn=z.z.object({type:z.z.literal("agent.detach.request"),agentId:z.z.string(),requestId:z.z.string()}),gn=z.z.object({type:z.z.literal("agent.detach.response"),payload:en}),bn=z.z.enum(["conversation","files","both"]),dn=z.z.object({type:z.z.literal("agent.rewind.request"),agentId:z.z.string(),messageId:z.z.string(),mode:bn,requestId:z.z.string()}),mn=z.z.object({type:z.z.literal("agent.rewind.response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),ok:z.z.boolean(),error:z.z.string().nullable()})}),fn=z.z.object({type:z.z.literal("update_agent_response"),payload:en}),yn=z.z.object({requestId:z.z.string(),projectId:z.z.string(),accepted:z.z.boolean(),customName:z.z.string().nullable(),error:z.z.string().nullable()}),hn=z.z.object({type:z.z.literal("project.rename.response"),payload:yn}),jn=z.z.object({requestId:z.z.string(),projectId:z.z.string(),accepted:z.z.boolean(),removedWorkspaceIds:z.z.array(z.z.string()).default([]),error:z.z.string().nullable()}),Sn=z.z.object({type:z.z.literal("project.remove.response"),payload:jn}),Pn=z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),accepted:z.z.boolean(),title:z.z.string().nullable(),error:z.z.string().nullable()}),_n=z.z.object({type:z.z.literal("workspace.title.set.response"),payload:Pn}),qn=z.z.object({type:z.z.literal("set_voice_mode_response"),payload:z.z.object({requestId:z.z.string(),enabled:z.z.boolean(),agentId:z.z.string().nullable(),accepted:z.z.boolean(),error:z.z.string().nullable(),reasonCode:z.z.string().optional(),retryable:z.z.boolean().optional(),missingModelIds:z.z.array(z.z.string()).optional()})}),In=z.z.object({type:z.z.literal("agent_permission_response"),agentId:z.z.string(),requestId:z.z.string(),response:je}),On=z.z.object({type:z.z.literal("watch.notificationAction"),notificationId:z.z.string(),action:z.z.enum(["approve","deny","reply"]),replyText:z.z.string().optional()}),kn=z.z.object({type:z.z.literal("watch.sessionSearch"),requestId:z.z.string(),query:z.z.string()}),Rn=z.z.object({type:z.z.literal("watch.composerDictate"),sessionId:z.z.string(),text:z.z.string()}),wn=z.z.enum(["NOT_GIT_REPO","NOT_ALLOWED","MERGE_CONFLICT","UNKNOWN"]),vn=z.z.object({code:wn,message:z.z.string()}),An=z.z.object({mode:z.z.enum(["uncommitted","base"]),baseRef:z.z.string().optional(),ignoreWhitespace:z.z.boolean().optional()}),Mn=z.z.object({type:z.z.literal("checkout_status_request"),cwd:z.z.string(),requestId:z.z.string()}),Cn=z.z.object({type:z.z.literal("subscribe_checkout_diff_request"),subscriptionId:z.z.string(),cwd:z.z.string(),compare:An,requestId:z.z.string()}),Tn=z.z.object({type:z.z.literal("unsubscribe_checkout_diff_request"),subscriptionId:z.z.string()}),xn=z.z.object({type:z.z.literal("checkout_commit_request"),cwd:z.z.string(),message:z.z.string().optional(),addAll:z.z.boolean().optional(),requestId:z.z.string()}),Ln=z.z.object({type:z.z.literal("checkout_merge_request"),cwd:z.z.string(),baseRef:z.z.string().optional(),strategy:z.z.enum(["merge","squash"]).optional(),requireCleanTarget:z.z.boolean().optional(),requestId:z.z.string()}),Wn=z.z.object({type:z.z.literal("checkout_merge_from_base_request"),cwd:z.z.string(),baseRef:z.z.string().optional(),requireCleanTarget:z.z.boolean().optional(),requestId:z.z.string()}),Dn=z.z.object({type:z.z.literal("checkout_pull_request"),cwd:z.z.string(),requestId:z.z.string()}),En=z.z.object({type:z.z.literal("checkout_push_request"),cwd:z.z.string(),requestId:z.z.string()}),Nn=z.z.object({type:z.z.literal("checkout.refresh.request"),cwd:z.z.string(),requestId:z.z.string()}),Un=z.z.object({type:z.z.literal("checkout_pr_create_request"),cwd:z.z.string(),title:z.z.string().optional(),body:z.z.string().optional(),baseRef:z.z.string().optional(),requestId:z.z.string()}),Fn=z.z.object({type:z.z.literal("checkout_pr_merge_request"),cwd:z.z.string(),mergeMethod:z.z.enum(["merge","squash","rebase"]),requestId:z.z.string()}),Gn=z.z.object({type:z.z.literal("checkout.github.set_auto_merge.request"),cwd:z.z.string(),enabled:z.z.boolean(),mergeMethod:z.z.enum(["merge","squash","rebase"]).optional(),requestId:z.z.string()}),Bn=z.z.enum(["too_large","checksum_mismatch","aborted","write_failed","unsupported"]),Hn=z.z.object({type:z.z.literal("files.upload.begin.request"),requestId:z.z.string(),agentId:z.z.string(),uploadId:z.z.string(),metadata:z.z.lazy(()=>y.FileBeginMetadataSchema)}),Kn=z.z.object({type:z.z.literal("files.upload.complete.request"),requestId:z.z.string(),uploadId:z.z.string(),totalChunks:z.z.number().int().nonnegative()}),Vn=z.z.object({type:z.z.literal("files.upload.chunk"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),chunkIndex:z.z.number().int().nonnegative(),data:z.z.string()})}),Yn=z.z.object({type:z.z.literal("files.upload.error"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),code:Bn,message:z.z.string().optional()})}),Qn=z.z.string().regex(/^[A-Za-z0-9._-]+$/),Xn=z.z.object({type:z.z.literal("checkout.github.get_check_details.request"),cwd:z.z.string(),repoOwner:Qn,repoName:Qn,checkRunId:z.z.number().int().positive(),workflowRunId:z.z.number().int().positive().optional(),requestId:z.z.string()}),Jn=z.z.object({type:z.z.literal("checkout_pr_status_request"),cwd:z.z.string(),requestId:z.z.string()}),Zn=z.z.object({type:z.z.literal("pull_request_timeline_request"),cwd:z.z.string(),prNumber:z.z.number(),repoOwner:z.z.string(),repoName:z.z.string(),requestId:z.z.string()}),$n=z.z.object({type:z.z.literal("validate_branch_request"),cwd:z.z.string(),branchName:z.z.string(),requestId:z.z.string()}),er=z.z.object({type:z.z.literal("checkout_switch_branch_request"),cwd:z.z.string(),branch:z.z.string(),requestId:z.z.string()}),tr=z.z.object({type:z.z.literal("checkout.rename_branch.request"),cwd:z.z.string(),branch:z.z.string(),requestId:z.z.string()}),nr=z.z.object({type:z.z.literal("stash_save_request"),cwd:z.z.string(),branch:z.z.string().optional(),requestId:z.z.string()}),rr=z.z.object({type:z.z.literal("stash_pop_request"),cwd:z.z.string(),stashIndex:z.z.number().int().min(0),requestId:z.z.string()}),or=z.z.object({type:z.z.literal("stash_list_request"),cwd:z.z.string(),paseoOnly:z.z.boolean().optional(),requestId:z.z.string()}),ir=z.z.object({type:z.z.literal("branch_suggestions_request"),cwd:z.z.string(),query:z.z.string().optional(),limit:z.z.number().int().min(1).max(200).optional(),requestId:z.z.string()}),ar=z.z.object({kind:z.z.enum(["issue","pr"]),number:z.z.number(),title:z.z.string(),url:z.z.string(),state:z.z.string(),body:z.z.string().nullable(),labels:z.z.array(z.z.string()),baseRefName:z.z.string().nullable().optional(),headRefName:z.z.string().nullable().optional(),updatedAt:z.z.string().optional()}),sr=z.z.enum(["github-issue","github-pr"]),lr=z.z.object({type:z.z.literal("github_search_request"),cwd:z.z.string(),query:z.z.string(),limit:z.z.number().int().min(1).max(50).optional(),kinds:z.z.array(sr).optional(),requestId:z.z.string()}),cr=z.z.object({type:z.z.literal("directory_suggestions_request"),query:z.z.string(),cwd:z.z.string().optional(),includeFiles:z.z.boolean().optional(),includeDirectories:z.z.boolean().optional(),matchMode:z.z.enum(["fuzzy","suffix"]).optional(),limit:z.z.number().int().min(1).max(100).optional(),requestId:z.z.string()}),ur=z.z.object({type:z.z.literal("paseo_worktree_list_request"),cwd:z.z.string().optional(),repoRoot:z.z.string().optional(),requestId:z.z.string()}),zr=z.z.object({type:z.z.literal("paseo_worktree_archive_request"),worktreePath:z.z.string().optional(),repoRoot:z.z.string().optional(),branchName:z.z.string().optional(),workspaceId:z.z.string().optional(),scope:z.z.enum(["workspace","worktree"]).optional().default("workspace"),deleteWorktreeFromDisk:z.z.boolean().optional().default(!1),requestId:z.z.string()}),pr=z.z.object({prompt:z.z.string().optional(),attachments:zt}),gr=z.z.object({type:z.z.literal("create_paseo_worktree_request"),cwd:z.z.string(),projectId:z.z.string().optional(),worktreeSlug:z.z.string().optional(),nameContext:z.z.string().optional(),attachments:zt.optional(),firstAgentContext:pr.optional(),refName:z.z.string().min(1).optional(),action:z.z.enum(["branch-off","checkout"]).optional(),githubPrNumber:z.z.number().int().positive().optional(),requestId:z.z.string()}),br=z.z.object({type:z.z.literal("workspace_setup_status_request"),workspaceId:z.z.string(),requestId:z.z.string()}),dr=["cursor","vscode","zed","finder","explorer","file-manager"],mr=[...dr,"webstorm"],fr=z.z.enum(mr),yr=z.z.enum(dr),hr=z.z.string().trim().min(1),jr=new Set(mr),Sr=new Set(dr);const Pr=z.z.object({id:hr,label:z.z.string()}),_r=z.z.object({type:z.z.literal("list_available_editors_request"),requestId:z.z.string()}),qr=z.z.object({type:z.z.literal("open_in_editor_request"),path:z.z.string(),editorId:z.z.string().trim().min(1),mode:z.z.enum(["open","reveal"]).optional(),cwd:z.z.string().optional(),requestId:z.z.string()}),Ir=z.z.object({type:z.z.literal("open_project_request"),cwd:z.z.string(),requestId:z.z.string()}),Or=z.z.object({type:z.z.literal("project.add.request"),cwd:z.z.string(),requestId:z.z.string()}),kr=z.z.object({type:z.z.literal("archive_workspace_request"),workspaceId:z.z.string(),requestId:z.z.string()}),Rr=z.z.object({type:z.z.literal("workspace.create.request"),requestId:z.z.string(),title:z.z.string().optional(),firstAgentContext:pr.optional(),source:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("directory"),path:z.z.string(),projectId:z.z.string().optional()}),z.z.object({kind:z.z.literal("worktree"),cwd:z.z.string().optional(),projectId:z.z.string().optional(),action:z.z.enum(["branch-off","checkout"]).optional(),refName:z.z.string().min(1).optional(),baseBranch:z.z.string().optional(),githubPrNumber:z.z.number().int().positive().optional(),worktreeSlug:z.z.string().optional()})])}),wr=z.z.object({type:z.z.literal("workspace.clear_attention.request"),workspaceId:z.z.union([z.z.string(),z.z.array(z.z.string())]),requestId:z.z.string()}),vr=z.z.object({text:z.z.string(),style:z.z.string().nullable()}),Ar=z.z.object({type:z.z.enum(["add","remove","context","header"]),content:z.z.string(),tokens:z.z.array(vr).optional()}),Mr=z.z.object({oldStart:z.z.number(),oldCount:z.z.number(),newStart:z.z.number(),newCount:z.z.number(),lines:z.z.array(Ar)}),Cr=z.z.object({path:z.z.string(),isNew:z.z.boolean(),isDeleted:z.z.boolean(),additions:z.z.number(),deletions:z.z.number(),hunks:z.z.array(Mr),status:z.z.enum(["ok","too_large","binary"]).optional()}),Tr=z.z.object({name:z.z.string(),path:z.z.string(),kind:z.z.enum(["file","directory"]),size:z.z.number(),modifiedAt:z.z.string()}),xr=z.z.object({path:z.z.string(),kind:z.z.enum(["text","image","binary"]),encoding:z.z.enum(["utf-8","base64","none"]),content:z.z.string().optional(),mimeType:z.z.string().optional(),size:z.z.number(),modifiedAt:z.z.string()}),Lr=z.z.object({path:z.z.string(),entries:z.z.array(Tr)}),Wr=z.z.object({type:z.z.literal("file_explorer_request"),cwd:z.z.string(),path:z.z.string().optional(),mode:z.z.enum(["list","file"]),requestId:z.z.string(),acceptBinary:z.z.boolean().optional()}),Dr=z.z.object({type:z.z.literal("project_icon_request"),cwd:z.z.string(),requestId:z.z.string()}),Er=z.z.object({type:z.z.literal("file_download_token_request"),cwd:z.z.string(),path:z.z.string(),requestId:z.z.string()}),Nr=z.z.object({type:z.z.literal("file.upload.request"),fileName:z.z.string().min(1),mimeType:z.z.string().min(1),size:z.z.number().int().nonnegative(),modifiedAt:z.z.string(),requestId:z.z.string()}),Ur=z.z.object({type:z.z.literal("clear_agent_attention"),agentId:z.z.union([z.z.string(),z.z.array(z.z.string())]),requestId:z.z.string().optional()}),Fr=z.z.object({type:z.z.literal("client_heartbeat"),deviceType:z.z.enum(["web","mobile"]),focusedAgentId:z.z.string().nullable(),focusedTerminalId:z.z.string().nullable().optional().default(null),lastActivityAt:z.z.string(),appVisible:z.z.boolean(),appVisibilityChangedAt:z.z.string().optional()}),Gr=z.z.object({type:z.z.literal("ping"),requestId:z.z.string(),clientSentAt:z.z.number().int().optional()}),Br=z.z.object({provider:m.AgentProviderSchema,cwd:z.z.string(),modeId:z.z.string().optional(),model:z.z.string().optional(),thinkingOptionId:z.z.string().optional(),featureValues:z.z.record(z.z.string(),z.z.unknown()).optional()}),Hr=z.z.object({type:z.z.literal("list_provider_features_request"),draftConfig:Br,requestId:z.z.string()}),Kr=z.z.object({type:z.z.literal("list_commands_request"),agentId:z.z.string(),draftConfig:Br.optional(),requestId:z.z.string()}),Vr=z.z.object({type:z.z.literal("register_push_token"),token:z.z.string()}),Yr=z.z.object({type:z.z.literal("rewind_session_request"),requestId:z.z.string(),agentId:z.z.string(),turnId:z.z.string()}),Qr=z.z.object({type:z.z.literal("rewind_session_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),newSessionId:z.z.string().optional(),linesCopied:z.z.number().int().nonnegative().optional(),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),Xr=z.z.object({type:z.z.literal("edit_message_request"),requestId:z.z.string(),agentId:z.z.string(),turnId:z.z.string(),newContent:z.z.string().optional()}),Jr=z.z.object({type:z.z.literal("edit_message_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),newSessionId:z.z.string().optional(),linesCopied:z.z.number().int().nonnegative().optional(),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),Zr=z.z.object({type:z.z.literal("list_workspace_sessions_request"),requestId:z.z.string(),workspaceId:z.z.string()}),$r=z.z.object({sid:z.z.string(),title:z.z.string().nullable(),lastActivity:z.z.string(),cwd:z.z.string(),agentName:z.z.string().nullable()}),eo=z.z.object({type:z.z.literal("list_workspace_sessions_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),sessions:z.z.array($r),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),to=z.z.object({type:z.z.literal("list_all_sessions_request"),requestId:z.z.string()}),no=z.z.object({sid:z.z.string(),title:z.z.string().nullable(),lastActivity:z.z.string(),cwd:z.z.string(),agentName:z.z.string().nullable()}),ro=z.z.object({type:z.z.literal("list_all_sessions_response"),payload:z.z.object({requestId:z.z.string(),sessions:z.z.array(no),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),oo=z.z.object({id:z.z.string(),title:z.z.string(),icon:z.z.string().optional()}),io=z.z.object({id:z.z.string(),title:z.z.string(),icon:z.z.string().optional(),command:z.z.string().optional(),view:z.z.string().optional(),order:z.z.number().optional()}),ao=z.z.object({id:z.z.string(),title:z.z.string(),location:z.z.enum(["sidebar","panel"]).optional(),ui:z.z.string(),uiUrl:z.z.string().optional()}),so=z.z.object({id:z.z.string(),name:z.z.string(),version:z.z.string(),commands:z.z.array(oo),sidebarItems:z.z.array(io),views:z.z.array(ao)}),lo=z.z.object({type:z.z.literal("extensions.list.request"),requestId:z.z.string()}),co=z.z.object({type:z.z.literal("extensions.list.response"),payload:z.z.object({requestId:z.z.string(),extensions:z.z.array(so),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),uo=z.z.object({type:z.z.literal("extensions.command.execute.request"),requestId:z.z.string(),commandId:z.z.string(),args:z.z.array(z.z.unknown()).optional()}),zo=z.z.object({type:z.z.literal("extensions.command.execute.response"),payload:z.z.object({requestId:z.z.string(),ok:z.z.boolean(),result:z.z.unknown().optional(),error:z.z.string().optional()})}),po=z.z.object({type:z.z.literal("search_sessions_request"),requestId:z.z.string(),query:z.z.string(),limit:z.z.number().int().positive().optional(),sources:z.z.array(z.z.string()).optional()}),go=z.z.object({sid:z.z.string(),source:z.z.string(),cwd:z.z.string(),timestamp:z.z.string(),snippet:z.z.string(),resumeCommand:z.z.string()}),bo=z.z.object({type:z.z.literal("search_sessions_response"),payload:z.z.object({requestId:z.z.string(),query:z.z.string(),results:z.z.array(go),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),mo=z.z.object({endpoint:z.z.string(),keys:z.z.object({p256dh:z.z.string(),auth:z.z.string()}),expirationTime:z.z.union([z.z.number(),z.z.null()]).optional()}),fo=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("expo"),token:z.z.string().min(1)}),z.z.object({type:z.z.literal("web"),subscription:mo})]),yo=z.z.object({type:z.z.literal("subscribe_push_request"),requestId:z.z.string(),subscription:fo}),ho=z.z.object({type:z.z.literal("subscribe_push_response"),payload:z.z.object({requestId:z.z.string(),ok:z.z.boolean(),error:z.z.string().optional(),errorCode:z.z.string().optional(),vapidPublicKey:z.z.string().optional()})}),jo=z.z.object({type:z.z.literal("get_vapid_public_key_request"),requestId:z.z.string()}),So=z.z.object({type:z.z.literal("get_vapid_public_key_response"),payload:z.z.object({requestId:z.z.string(),publicKey:z.z.string().nullable(),error:z.z.string().optional()})}),Po=z.z.object({type:z.z.literal("list_terminals_request"),cwd:z.z.string().optional(),workspaceId:z.z.string().optional(),requestId:z.z.string()}),_o=z.z.object({type:z.z.literal("subscribe_terminals_request"),cwd:z.z.string(),workspaceId:z.z.string().optional()}),qo=z.z.object({type:z.z.literal("unsubscribe_terminals_request"),cwd:z.z.string(),workspaceId:z.z.string().optional()}),Io=z.z.object({type:z.z.literal("create_terminal_request"),cwd:z.z.string(),workspaceId:z.z.string().optional(),name:z.z.string().optional(),agentId:z.z.string().optional(),command:z.z.string().optional(),args:z.z.array(z.z.string()).optional(),requestId:z.z.string()}),Oo=z.z.object({type:z.z.literal("terminal.rename.request"),terminalId:z.z.string(),title:z.z.string(),requestId:z.z.string()}),ko=z.z.object({type:z.z.literal("start_workspace_script_request"),workspaceId:z.z.string(),scriptName:z.z.string(),requestId:z.z.string()}),Ro=z.z.object({type:z.z.literal("subscribe_terminal_request"),terminalId:z.z.string(),requestId:z.z.string(),restore:z.z.object({mode:z.z.enum(["live","visible-snapshot","full-snapshot"]),scrollbackLines:z.z.number().int().nonnegative().optional(),size:z.z.object({rows:z.z.number().int().positive(),cols:z.z.number().int().positive()}).optional()}).optional()}),wo=z.z.object({type:z.z.literal("unsubscribe_terminal_request"),terminalId:z.z.string()}),vo=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("input"),data:z.z.string()}),z.z.object({type:z.z.literal("resize"),rows:z.z.number(),cols:z.z.number()}),z.z.object({type:z.z.literal("mouse"),row:z.z.number(),col:z.z.number(),button:z.z.number(),action:z.z.enum(["down","up","move"])})]),Ao=z.z.object({type:z.z.literal("terminal_input"),terminalId:z.z.string(),message:vo}),Mo=z.z.object({type:z.z.literal("kill_terminal_request"),terminalId:z.z.string(),requestId:z.z.string()}),Co=z.z.object({type:z.z.literal("capture_terminal_request"),terminalId:z.z.string(),start:z.z.number().int().optional(),end:z.z.number().int().optional(),stripAnsi:z.z.boolean().default(!0),requestId:z.z.string()}),To=z.z.discriminatedUnion("type",[P.BrowserAutomationExecuteResponseSchema,Fe,Ge,Be,bt,ft,yt,mt,ht,Ke,Ve,Ye,Xe,Je,Ze,$e,et,tt,jt,St,Pt,_t,B,K,Y,X,ee,qt,It,Ot,kt,Rt,wt,vt,At,Mt,xt,Lt,Wt,Hr,Dt,Et,Nt,Ut,Ft,Gt,Bt,Ht,Kt,Yt,Vt,Qt,Jt,Zt,$t,nn,on,ln,un,pn,dn,In,Mn,Cn,Tn,xn,Ln,Wn,Dn,En,Nn,Un,Fn,Gn,Hn,Kn,Vn,Yn,Xn,Jn,Zn,er,tr,nr,rr,or,$n,ir,lr,cr,ur,zr,gr,br,_r,qr,Ir,Or,kr,Rr,wr,Wr,Dr,Er,Nr,Ur,Fr,Gr,Kr,Vr,Yr,Xr,Zr,to,lo,uo,po,yo,jo,Po,_o,qo,Io,Oo,ko,Ro,wo,Ao,Mo,Co,h.ChatCreateRequestSchema,h.ChatListRequestSchema,h.ChatInspectRequestSchema,h.ChatDeleteRequestSchema,h.ChatPostRequestSchema,h.ChatReadRequestSchema,h.ChatWaitRequestSchema,j.ScheduleCreateRequestSchema,j.ScheduleListRequestSchema,j.ScheduleInspectRequestSchema,j.ScheduleLogsRequestSchema,j.SchedulePauseRequestSchema,j.ScheduleResumeRequestSchema,j.ScheduleDeleteRequestSchema,j.ScheduleRunOnceRequestSchema,j.ScheduleUpdateRequestSchema,S.LoopRunRequestSchema,S.LoopListRequestSchema,S.LoopInspectRequestSchema,S.LoopLogsRequestSchema,S.LoopStopRequestSchema,On,kn,Rn]),xo=z.z.object({id:z.z.string(),timestamp:z.z.coerce.date(),type:z.z.enum(["transcript","assistant","tool_call","tool_result","error","system"]),content:z.z.string(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Lo=z.z.object({type:z.z.literal("activity_log"),payload:xo}),Wo=z.z.object({type:z.z.literal("assistant_chunk"),payload:z.z.object({chunk:z.z.string()})}),Do=z.z.object({type:z.z.literal("audio_output"),payload:z.z.object({audio:z.z.string(),format:z.z.string(),id:z.z.string(),isVoiceMode:z.z.boolean(),groupId:z.z.string().optional(),chunkIndex:z.z.number().int().nonnegative().optional(),isLastChunk:z.z.boolean().optional()})}),Eo=z.z.object({type:z.z.literal("transcription_result"),payload:z.z.object({text:z.z.string(),language:z.z.string().optional(),duration:z.z.number().optional(),requestId:z.z.string(),avgLogprob:z.z.number().optional(),isLowConfidence:z.z.boolean().optional(),byteLength:z.z.number().optional(),format:z.z.string().optional(),debugRecordingPath:z.z.string().optional()})}),No=z.z.object({type:z.z.literal("voice_input_state"),payload:z.z.object({isSpeaking:z.z.boolean()})}),Uo=z.z.object({type:z.z.literal("dictation_stream_ack"),payload:z.z.object({dictationId:z.z.string(),ackSeq:z.z.number().int()})}),Fo=z.z.object({type:z.z.literal("dictation_stream_finish_accepted"),payload:z.z.object({dictationId:z.z.string(),timeoutMs:z.z.number().int().positive()})}),Go=z.z.object({type:z.z.literal("dictation_stream_partial"),payload:z.z.object({dictationId:z.z.string(),text:z.z.string()})}),Bo=z.z.object({type:z.z.literal("dictation_stream_final"),payload:z.z.object({dictationId:z.z.string(),text:z.z.string(),debugRecordingPath:z.z.string().optional()})}),Ho=z.z.object({type:z.z.literal("dictation_stream_error"),payload:z.z.object({dictationId:z.z.string(),error:z.z.string(),retryable:z.z.boolean(),reasonCode:z.z.string().optional(),missingModelIds:z.z.array(z.z.string()).optional(),debugRecordingPath:z.z.string().optional()})}),Ko=z.z.object({enabled:z.z.boolean(),reason:z.z.string()}),Vo=z.z.object({dictation:Ko,voice:Ko}),Yo=z.z.object({voice:Vo.optional()}).passthrough(),Qo=z.z.unknown().transform(e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}),Xo=z.z.unknown().transform(e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}),Jo=z.z.unknown().optional().transform(e=>{if(void 0===e)return;const t=Yo.safeParse(e);return t.success?t.data:void 0}),Zo=z.z.object({status:z.z.literal("server_info"),serverId:z.z.string().trim().min(1),hostname:Qo.optional(),version:Xo.optional(),capabilities:Jo.optional(),features:z.z.object({providersSnapshot:z.z.boolean().optional(),checkoutGithubSetAutoMerge:z.z.boolean().optional(),githubCheckDetails:z.z.boolean().optional(),daemonStatusRpc:z.z.boolean().optional(),"terminal-restore-modes":z.z.boolean().optional(),rewind:z.z.boolean().optional(),checkoutRefresh:z.z.boolean().optional(),recallSearch:z.z.boolean().optional(),fileUploads:z.z.boolean().optional(),sessionsListRpc:z.z.boolean().optional(),workflows:z.z.boolean().optional(),extensions:z.z.boolean().optional(),sessionDigest:z.z.boolean().optional(),workspaceMultiplicity:z.z.boolean().optional(),projectRemove:z.z.boolean().optional(),projectAdd:z.z.boolean().optional(),worktreeRestore:z.z.boolean().optional(),providerUsageList:z.z.boolean().optional(),agentDetach:z.z.boolean().optional(),daemonDiagnostics:z.z.boolean().optional(),daemonSelfUpdate:z.z.boolean().optional(),agentForkContext:z.z.boolean().optional(),meetingsLiveCapture:z.z.boolean().optional(),kanbanBoardConfig:z.z.boolean().optional()}).optional()}).passthrough().transform(e=>Object.assign({},e,{hostname:e.hostname??null,version:e.version??null})),$o=z.z.object({type:z.z.literal("status"),payload:z.z.object({status:z.z.string()}).passthrough()}),ei=z.z.object({type:z.z.literal("pong"),payload:z.z.object({requestId:z.z.string(),clientSentAt:z.z.number().int().optional(),serverReceivedAt:z.z.number().int(),serverSentAt:z.z.number().int()})}),ti=z.z.object({type:z.z.literal("rpc_error"),payload:z.z.object({requestId:z.z.string(),requestType:z.z.string().optional(),error:z.z.string(),code:z.z.string().optional()})}),ni=z.z.object({agentId:z.z.string(),requestId:z.z.string()}),ri=ni.extend({timelineSize:z.z.number().optional()}),oi=z.z.object({status:z.z.literal("agent_created"),agent:Ee}).extend(ni.shape),ii=z.z.object({status:z.z.literal("agent_create_failed"),requestId:z.z.string(),error:z.z.string(),errorCode:z.z.string().optional()}),ai=z.z.object({status:z.z.literal("agent_resumed"),agent:Ee}).extend(ri.shape),si=z.z.object({status:z.z.literal("agent_refreshed")}).extend(ri.shape),li=z.z.object({status:z.z.literal("restart_requested"),clientId:z.z.string(),reason:z.z.string().optional(),requestId:z.z.string()}),ci=z.z.object({status:z.z.literal("shutdown_requested"),clientId:z.z.string(),requestId:z.z.string()}),ui=z.z.object({status:z.z.literal("daemon_config_changed"),config:C}).passthrough(),zi=z.z.discriminatedUnion("status",[oi,ii,ai,si,ci,li,ui]),pi=z.z.object({type:z.z.literal("artifact"),payload:z.z.object({type:z.z.enum(["markdown","diff","image","code"]),id:z.z.string(),title:z.z.string(),content:z.z.string(),isBase64:z.z.boolean()})}),gi=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!1),currentBranch:z.z.null(),remoteUrl:z.z.null(),worktreeRoot:z.z.null().optional(),isPaseoOwnedWorktree:z.z.literal(!1),mainRepoRoot:z.z.null()}).transform(e=>Object.assign({},e,{worktreeRoot:null})),bi=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!0),currentBranch:z.z.string().nullable(),remoteUrl:z.z.string().nullable(),worktreeRoot:z.z.string().optional(),isPaseoOwnedWorktree:z.z.literal(!1),mainRepoRoot:z.z.string().nullable().optional().default(null)}).transform(e=>Object.assign({},e,{worktreeRoot:e.worktreeRoot??e.cwd})),di=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!0),currentBranch:z.z.string().nullable(),remoteUrl:z.z.string().nullable(),worktreeRoot:z.z.string().optional(),isPaseoOwnedWorktree:z.z.literal(!0),mainRepoRoot:z.z.string()}).transform(e=>Object.assign({},e,{worktreeRoot:e.worktreeRoot??e.cwd})),mi=z.z.union([gi,bi,di]),fi=z.z.object({projectKey:z.z.string(),projectName:z.z.string(),workspaceName:z.z.string().nullable().optional(),checkout:mi}),yi=z.z.enum(["running","stopped"]),hi=z.z.enum(["healthy","unhealthy"]),ji=z.z.object({scriptName:z.z.string(),type:z.z.enum(["script","service"]).optional().default("service"),hostname:z.z.string(),port:z.z.number().int().positive().nullable(),localProxyUrl:z.z.string().nullable().optional(),publicProxyUrl:z.z.string().nullable().optional(),proxyUrl:z.z.string().nullable().optional().default(null),lifecycle:yi,health:hi.nullable(),exitCode:z.z.number().nullable().optional().default(null),terminalId:z.z.string().nullable().optional().default(null)}),Si=z.z.object({currentBranch:z.z.string().nullable().optional(),remoteUrl:z.z.string().nullable().optional(),isPaseoOwnedWorktree:z.z.boolean().optional(),isDirty:z.z.boolean().nullable().optional(),aheadBehind:z.z.object({ahead:z.z.number(),behind:z.z.number()}).nullable().optional(),aheadOfOrigin:z.z.number().nullable().optional(),behindOfOrigin:z.z.number().nullable().optional()}).optional().nullable(),Pi=z.z.object({featuresEnabled:z.z.boolean().optional(),pullRequest:z.z.object({number:z.z.number().optional(),url:z.z.string(),title:z.z.string(),state:z.z.string(),baseRefName:z.z.string(),headRefName:z.z.string(),isMerged:z.z.boolean(),isDraft:z.z.boolean().optional(),mergeable:z.z.enum(["MERGEABLE","CONFLICTING","UNKNOWN"]).catch("UNKNOWN").optional(),checks:z.z.array(z.z.object({name:z.z.string(),status:z.z.enum(["success","failure","pending","skipped","cancelled"]),url:z.z.string().nullable(),workflow:z.z.string().optional(),duration:z.z.string().optional()})).optional(),checksStatus:z.z.enum(["none","pending","success","failure"]).optional(),reviewDecision:z.z.enum(["approved","changes_requested","pending"]).nullable().optional(),repoOwner:z.z.string().optional(),repoName:z.z.string().optional(),github:z.z.unknown().optional()}).nullable().optional(),error:z.z.object({message:z.z.string()}).nullable().optional(),refreshedAt:z.z.string().nullable().optional()}).optional().nullable(),_i=z.z.object({id:z.z.string(),projectId:z.z.string(),projectDisplayName:z.z.string(),projectCustomName:z.z.string().nullable().optional(),projectRootPath:z.z.string(),workspaceDirectory:z.z.string().optional(),projectKind:z.z.enum(["git","non_git","directory"]),workspaceKind:z.z.enum(["directory","local_checkout","checkout","worktree"]),name:z.z.string(),title:z.z.string().nullable().optional(),archivingAt:z.z.string().nullable().optional().default(null),status:dt,statusEnteredAt:z.z.string().nullish().transform(e=>e??null),activityAt:z.z.string().nullable(),diffStat:z.z.object({additions:z.z.number(),deletions:z.z.number()}).nullable().optional(),scripts:z.z.array(ji).default([]),gitRuntime:Si,githubRuntime:Pi,project:fi.optional()}).transform(e=>Object.assign({},e,{workspaceDirectory:e.workspaceDirectory??e.projectRootPath})),qi=z.z.object({type:z.z.literal("agent_update"),payload:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("upsert"),agent:Ee,project:fi.nullable().optional()}),z.z.object({kind:z.z.literal("remove"),agentId:z.z.string()})])}),Ii=z.z.object({type:z.z.literal("open_url"),payload:z.z.object({url:z.z.string(),agentId:z.z.string().optional()})}),Oi=z.z.object({type:z.z.literal("agent_stream"),payload:z.z.object({agentId:z.z.string(),event:Te,timestamp:z.z.string(),seq:z.z.number().int().nonnegative().optional(),epoch:z.z.string().optional()})}),ki=z.z.object({type:z.z.literal("agent_status"),payload:z.z.object({agentId:z.z.string(),status:z.z.string(),info:Ee})}),Ri=z.z.object({type:z.z.literal("agent_list"),payload:z.z.object({agents:z.z.array(Ee)})}),wi=z.z.object({agent:Ee,project:fi}),vi=z.z.object({nextCursor:z.z.string().nullable(),prevCursor:z.z.string().nullable(),hasMore:z.z.boolean()}),Ai=z.z.object({type:z.z.literal("fetch_agents_response"),payload:z.z.object({requestId:z.z.string(),subscriptionId:z.z.string().nullable().optional(),entries:z.z.array(wi),pageInfo:vi})}),Mi=z.z.object({type:z.z.literal("fetch_agent_history_response"),payload:z.z.object({requestId:z.z.string(),entries:z.z.array(wi),pageInfo:vi})}),Ci=z.z.object({type:z.z.literal("fetch_recent_provider_sessions_response"),payload:z.z.object({requestId:z.z.string(),entries:z.z.array(Ue),filteredAlreadyImportedCount:z.z.number().int().nonnegative().optional()})}),Ti=z.z.object({projectId:z.z.string(),projectDisplayName:z.z.string(),projectCustomName:z.z.string().nullable().optional(),projectRootPath:z.z.string(),projectKind:z.z.enum(["git","non_git","directory"])}),xi=z.z.object({type:z.z.literal("fetch_workspaces_response"),payload:z.z.object({requestId:z.z.string(),subscriptionId:z.z.string().nullable().optional(),entries:z.z.array(_i),emptyProjects:z.z.array(Ti).optional().default([]),pageInfo:z.z.object({nextCursor:z.z.string().nullable(),prevCursor:z.z.string().nullable(),hasMore:z.z.boolean()})})}),Li=z.z.object({type:z.z.literal("workspace_update"),payload:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("upsert"),workspace:_i}),z.z.object({kind:z.z.literal("remove"),id:z.z.string(),emptyProject:Ti.optional(),removedProjectId:z.z.string().optional()})])}),Wi=z.z.object({type:z.z.literal("script_status_update"),payload:z.z.object({workspaceId:z.z.string(),scripts:z.z.array(ji)})}),Di=z.z.object({type:z.z.literal("workspace_setup_progress"),payload:z.z.object({workspaceId:z.z.string(),status:z.z.enum(["running","completed","failed"]),detail:Ie,error:z.z.string().nullable()})}),Ei=z.z.object({status:z.z.enum(["running","completed","failed"]),detail:Ie,error:z.z.string().nullable()}),Ni=z.z.object({type:z.z.literal("workspace_setup_status_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),snapshot:Ei.nullable()})}),Ui=z.z.object({type:z.z.literal("open_project_response"),payload:z.z.object({requestId:z.z.string(),workspace:_i.nullable(),error:z.z.string().nullable(),errorCode:z.z.enum(["directory_not_found"]).nullish().catch(null)})}),Fi=z.z.object({type:z.z.literal("project.add.response"),payload:z.z.object({requestId:z.z.string(),project:Ti.nullable(),error:z.z.string().nullable(),errorCode:z.z.enum(["directory_not_found"]).nullish().catch(null)})}),Gi=z.z.object({type:z.z.literal("start_workspace_script_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),scriptName:z.z.string(),terminalId:z.z.string().nullable(),error:z.z.string().nullable()})}),Bi=z.z.object({type:z.z.literal("list_available_editors_response"),payload:z.z.object({requestId:z.z.string(),editors:z.z.array(z.z.object({id:z.z.string().trim().min(1),label:z.z.string()})),error:z.z.string().nullable()})}),Hi=z.z.object({type:z.z.literal("open_in_editor_response"),payload:z.z.object({requestId:z.z.string(),error:z.z.string().nullable()})}),Ki=z.z.object({type:z.z.literal("archive_workspace_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),archivedAt:z.z.string().nullable(),error:z.z.string().nullable()})}),Vi=z.z.object({type:z.z.literal("fetch_agent_response"),payload:z.z.object({requestId:z.z.string(),agent:Ee.nullable(),project:fi.nullable().optional(),error:z.z.string().nullable()})}),Yi=z.z.object({startSeq:z.z.number().int().nonnegative(),endSeq:z.z.number().int().nonnegative()}),Qi=z.z.object({provider:m.AgentProviderSchema,item:Ce,timestamp:z.z.string(),seqStart:z.z.number().int().nonnegative(),seqEnd:z.z.number().int().nonnegative(),sourceSeqRanges:z.z.array(Yi),collapsed:z.z.array(z.z.enum(["assistant_merge","reasoning_merge","tool_lifecycle"]))}),Xi=z.z.object({type:z.z.literal("fetch_agent_timeline_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),agent:Ee.nullable(),direction:z.z.enum(["tail","before","after"]),projection:z.z.enum(["projected","canonical"]),epoch:z.z.string(),reset:z.z.boolean(),staleCursor:z.z.boolean(),gap:z.z.boolean(),window:z.z.object({minSeq:z.z.number().int().nonnegative(),maxSeq:z.z.number().int().nonnegative(),nextSeq:z.z.number().int().nonnegative()}),startCursor:Xt.nullable(),endCursor:Xt.nullable(),hasOlder:z.z.boolean(),hasNewer:z.z.boolean(),entries:z.z.array(Qi),error:z.z.string().nullable()})}),Ji=z.z.object({type:z.z.literal("agent.fork_context.response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),attachment:ot.nullable(),itemCount:z.z.number().int().nonnegative(),boundaryMessageId:z.z.string().nullable(),error:z.z.string().nullable()})}),Zi=z.z.object({type:z.z.literal("cancel_agent_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),agent:Ee.nullable()})}),$i=z.z.object({type:z.z.literal("clear_agent_attention_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string().or(z.z.array(z.z.string())),agents:z.z.array(Ee)})}),ea=z.z.object({type:z.z.literal("workspace.create.response"),payload:z.z.object({workspace:_i.nullable(),setupTerminalId:z.z.string().nullable(),error:z.z.string().nullable(),errorCode:z.z.string().optional(),requestId:z.z.string()})}),ta=z.z.object({type:z.z.literal("workspace.clear_attention.response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.union([z.z.string(),z.z.array(z.z.string())]),clearedAgentIds:z.z.array(z.z.string()),results:z.z.array(z.z.object({workspaceId:z.z.string(),clearedAgentIds:z.z.array(z.z.string()),success:z.z.boolean(),error:z.z.string().nullable()})),success:z.z.boolean(),error:z.z.string().nullable()})}),na=z.z.object({type:z.z.literal("send_agent_message_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable()})}),ra=z.z.object({type:z.z.literal("wait_for_finish_response"),payload:z.z.object({requestId:z.z.string(),status:z.z.enum(["idle","error","permission","timeout"]),final:Ee.nullable(),error:z.z.string().nullable(),lastMessage:z.z.string().nullable()})}),oa=z.z.object({type:z.z.literal("get_daemon_config_response"),payload:z.z.object({requestId:z.z.string(),config:C}).passthrough()}),ia=z.z.object({type:z.z.literal("daemon.get_status.response"),payload:z.z.object({requestId:z.z.string(),serverId:z.z.string(),version:z.z.string().nullable().optional(),pid:z.z.number(),nodePath:z.z.string(),startedAt:z.z.string().nullable().optional(),listen:z.z.string().nullable(),relay:z.z.object({enabled:z.z.boolean(),endpoint:z.z.string(),publicEndpoint:z.z.string(),useTls:z.z.boolean(),publicUseTls:z.z.boolean()}).nullable().optional(),providers:z.z.array(z.z.object({provider:z.z.string(),available:z.z.boolean(),error:z.z.string().nullable().optional()}))}).passthrough()}),aa=z.z.object({type:z.z.literal("daemon.get_pairing_offer.response"),payload:z.z.object({requestId:z.z.string(),url:z.z.string(),qr:z.z.string().nullable().optional(),relayEnabled:z.z.boolean()}).passthrough()}),sa=z.z.object({type:z.z.literal("diagnostics.response"),payload:z.z.object({requestId:z.z.string(),diagnostic:z.z.string()}).passthrough()}),la=z.z.object({type:z.z.literal("set_daemon_config_response"),payload:z.z.object({requestId:z.z.string(),config:C}).passthrough()}),ca=z.z.object({type:z.z.literal("read_project_config_response"),payload:z.z.union([z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!0),config:q.PaseoConfigRawSchema.nullable(),revision:q.PaseoConfigRevisionSchema.nullable()}),z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!1),error:q.ProjectConfigRpcErrorSchema})])}),ua=z.z.object({type:z.z.literal("write_project_config_response"),payload:z.z.union([z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!0),config:q.PaseoConfigRawSchema,revision:q.PaseoConfigRevisionSchema}),z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!1),error:q.ProjectConfigRpcErrorSchema})])}),za=z.z.object({type:z.z.literal("agent_permission_request"),payload:z.z.object({agentId:z.z.string(),request:Se})}),pa=z.z.object({id:z.z.string(),label:z.z.string(),action:z.z.enum(["approve","deny","reply"])}),ga=z.z.object({type:z.z.literal("watch.actionablePush"),notificationId:z.z.string(),sessionId:z.z.string(),kind:z.z.string(),summary:z.z.string(),actions:z.z.array(pa)}),ba=z.z.object({type:z.z.literal("watch.actionableResolved"),notificationId:z.z.string()}),da=z.z.object({id:z.z.string(),title:z.z.string(),lastActivity:z.z.string(),snippet:z.z.string()}),ma=z.z.object({type:z.z.literal("watch.sessionSearchResult"),requestId:z.z.string(),results:z.z.array(da),error:z.z.string().optional()}),fa=z.z.object({type:z.z.literal("agent_permission_resolved"),payload:z.z.object({agentId:z.z.string(),requestId:z.z.string(),resolution:je})}),ya=z.z.object({type:z.z.literal("agent_deleted"),payload:z.z.object({agentId:z.z.string(),requestId:z.z.string()})}),ha=z.z.object({type:z.z.literal("agent_archived"),payload:z.z.object({agentId:z.z.string(),archivedAt:z.z.string(),requestId:z.z.string()})}),ja=z.z.object({agentId:z.z.string(),archivedAt:z.z.string()}),Sa=z.z.object({terminalId:z.z.string(),success:z.z.boolean()}),Pa=z.z.object({type:z.z.literal("close_items_response"),payload:z.z.object({agents:z.z.array(ja),terminals:z.z.array(Sa),requestId:z.z.string()})}),_a=z.z.object({ahead:z.z.number(),behind:z.z.number()}),qa=z.z.object({cwd:z.z.string(),error:vn.nullable(),requestId:z.z.string()}),Ia=qa.extend({isGit:z.z.literal(!1),isPaseoOwnedWorktree:z.z.literal(!1),repoRoot:z.z.null(),currentBranch:z.z.null(),isDirty:z.z.null(),baseRef:z.z.null(),aheadBehind:z.z.null(),aheadOfOrigin:z.z.null(),behindOfOrigin:z.z.null(),hasRemote:z.z.boolean(),remoteUrl:z.z.null()}),Oa=qa.extend({isGit:z.z.literal(!0),isPaseoOwnedWorktree:z.z.literal(!1),repoRoot:z.z.string(),mainRepoRoot:z.z.string().nullable().optional().default(null),currentBranch:z.z.string().nullable(),isDirty:z.z.boolean(),baseRef:z.z.string().nullable(),aheadBehind:_a.nullable(),aheadOfOrigin:z.z.number().nullable(),behindOfOrigin:z.z.number().nullable(),hasRemote:z.z.boolean(),remoteUrl:z.z.string().nullable()}),ka=qa.extend({isGit:z.z.literal(!0),isPaseoOwnedWorktree:z.z.literal(!0),repoRoot:z.z.string(),mainRepoRoot:z.z.string(),currentBranch:z.z.string().nullable(),isDirty:z.z.boolean(),baseRef:z.z.string(),aheadBehind:_a.nullable(),aheadOfOrigin:z.z.number().nullable(),behindOfOrigin:z.z.number().nullable(),hasRemote:z.z.boolean(),remoteUrl:z.z.string().nullable()}),Ra=z.z.object({type:z.z.literal("checkout_status_response"),payload:z.z.union([Ia,Oa,ka])}),wa=z.z.object({enabledAt:z.z.string().nullable().optional().default(null),mergeMethod:z.z.string().nullable().optional().default(null),enabledBy:z.z.string().nullable().optional().default(null)}).nullable().optional().default(null),va=z.z.object({autoMergeAllowed:z.z.boolean().optional().default(!1),mergeCommitAllowed:z.z.boolean().optional().default(!1),squashMergeAllowed:z.z.boolean().optional().default(!1),rebaseMergeAllowed:z.z.boolean().optional().default(!1),viewerDefaultMergeMethod:z.z.string().nullable().optional().default(null)}).optional().default({autoMergeAllowed:!1,mergeCommitAllowed:!1,squashMergeAllowed:!1,rebaseMergeAllowed:!1,viewerDefaultMergeMethod:null}),Aa=z.z.object({mergeStateStatus:z.z.string().nullable().optional().default(null),autoMergeRequest:wa,viewerCanEnableAutoMerge:z.z.boolean().optional().default(!1),viewerCanDisableAutoMerge:z.z.boolean().optional().default(!1),viewerCanMergeAsAdmin:z.z.boolean().optional().default(!1),viewerCanUpdateBranch:z.z.boolean().optional().default(!1),repository:va,isMergeQueueEnabled:z.z.boolean().optional().default(!1),isInMergeQueue:z.z.boolean().optional().default(!1)}).optional(),Ma=z.z.object({number:z.z.number().optional(),url:z.z.string(),title:z.z.string(),state:z.z.string(),baseRefName:z.z.string(),headRefName:z.z.string(),isMerged:z.z.boolean(),isDraft:z.z.boolean().optional().default(!1),mergeable:z.z.enum(["MERGEABLE","CONFLICTING","UNKNOWN"]).catch("UNKNOWN").optional().default("UNKNOWN"),checks:z.z.array(z.z.object({name:z.z.string(),status:z.z.string(),url:z.z.string().nullable(),workflow:z.z.string().optional(),duration:z.z.string().optional(),checkRunId:z.z.number().optional(),workflowRunId:z.z.number().optional()})).optional().default([]),checksStatus:z.z.string().optional(),reviewDecision:z.z.string().nullable().optional(),repoOwner:z.z.string().optional(),repoName:z.z.string().optional(),github:Aa}),Ca=z.z.object({cwd:z.z.string(),status:Ma.nullable(),githubFeaturesEnabled:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()}),Ta=z.z.object({prStatus:Ca.optional()}),xa=z.z.object({type:z.z.literal("checkout_status_update"),payload:z.z.union([Ia,Oa,ka]).and(Ta)}),La=z.z.object({subscriptionId:z.z.string(),cwd:z.z.string(),files:z.z.array(Cr),error:vn.nullable()}),Wa=z.z.object({type:z.z.literal("subscribe_checkout_diff_response"),payload:La.extend({requestId:z.z.string()})}),Da=z.z.object({type:z.z.literal("checkout_diff_update"),payload:La}),Ea=z.z.object({type:z.z.literal("checkout_commit_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Na=z.z.object({type:z.z.literal("checkout_merge_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ua=z.z.object({type:z.z.literal("checkout_merge_from_base_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Fa=z.z.object({type:z.z.literal("checkout_pull_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ga=z.z.object({type:z.z.literal("checkout_push_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ba=z.z.object({type:z.z.literal("checkout.refresh.response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ha=z.z.object({type:z.z.literal("checkout_pr_create_response"),payload:z.z.object({cwd:z.z.string(),url:z.z.string().nullable(),number:z.z.number().nullable(),error:vn.nullable(),requestId:z.z.string()})}),Ka=z.z.object({type:z.z.literal("checkout_pr_merge_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Va=z.z.object({type:z.z.literal("checkout.github.set_auto_merge.response"),payload:z.z.object({cwd:z.z.string(),enabled:z.z.boolean(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ya=z.z.object({type:z.z.literal("files.upload.begin.response"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),accepted:z.z.boolean(),chunkSize:z.z.number().int().positive(),error:Bn.nullable()})}),Qa=z.z.object({type:z.z.literal("files.upload.chunk.ack"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),chunkIndex:z.z.number().int().nonnegative(),bytesReceived:z.z.number().int().nonnegative()})}),Xa=z.z.object({type:z.z.literal("files.upload.complete.response"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),fileId:z.z.string(),path:z.z.string(),size:z.z.number().int().nonnegative(),mimeType:z.z.string(),error:Bn.nullable()})}),Ja=z.z.object({path:z.z.string().optional(),startLine:z.z.number().optional(),endLine:z.z.number().optional(),annotationLevel:z.z.string().optional(),message:z.z.string().optional(),title:z.z.string().optional(),rawDetails:z.z.string().optional()}),Za=z.z.object({jobId:z.z.number(),name:z.z.string(),status:z.z.string().nullable().optional(),conclusion:z.z.string().nullable().optional(),url:z.z.string().nullable().optional(),logTail:z.z.string().optional(),logTruncated:z.z.boolean().optional()}),$a=z.z.object({checkRunId:z.z.number(),workflowRunId:z.z.number().nullable().optional(),name:z.z.string(),status:z.z.string().nullable().optional(),conclusion:z.z.string().nullable().optional(),url:z.z.string().nullable().optional(),detailsUrl:z.z.string().nullable().optional(),output:z.z.object({title:z.z.string().nullable().optional(),summary:z.z.string().nullable().optional(),text:z.z.string().nullable().optional()}).nullable().optional(),annotations:z.z.array(Ja).optional().default([]),failedJobs:z.z.array(Za).optional().default([]),truncated:z.z.boolean().optional().default(!1)}),es=z.z.object({type:z.z.literal("checkout.github.get_check_details.response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),details:$a.nullable().optional().default(null),error:vn.nullable(),requestId:z.z.string()})}),ts=z.z.object({type:z.z.literal("checkout_pr_status_response"),payload:Ca}),ns=z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("not_found"),message:z.z.string().optional().default("")}),z.z.object({kind:z.z.literal("forbidden"),message:z.z.string().optional().default("")}),z.z.object({kind:z.z.literal("unknown"),message:z.z.string().optional().default("")})]),rs=z.z.preprocess(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return{kind:"unknown",message:""};const t=e;return"not_found"===t.kind||"forbidden"===t.kind||"unknown"===t.kind?t:Object.assign({},t,{kind:"unknown"})},ns),os=z.z.object({id:z.z.string().optional().default(""),kind:z.z.literal("review"),author:z.z.string().optional().default("unknown"),authorUrl:z.z.string().nullable().optional(),avatarUrl:z.z.string().nullable().optional(),body:z.z.string().optional().default(""),createdAt:z.z.number().optional().default(0),url:z.z.string().optional().default(""),reviewState:z.z.enum(["approved","changes_requested","commented"]).optional().default("commented")}),is=z.z.object({id:z.z.string().optional().default(""),kind:z.z.literal("comment"),author:z.z.string().optional().default("unknown"),authorUrl:z.z.string().nullable().optional(),avatarUrl:z.z.string().nullable().optional(),body:z.z.string().optional().default(""),createdAt:z.z.number().optional().default(0),url:z.z.string().optional().default(""),reviewId:z.z.string().optional(),location:z.z.object({path:z.z.string(),line:z.z.number().optional(),startLine:z.z.number().optional(),threadId:z.z.string().optional(),isResolved:z.z.boolean().optional(),isOutdated:z.z.boolean().optional()}).optional()}),as=z.z.preprocess(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return e;const t=e;return"review"===t.kind||"comment"===t.kind?t:Object.assign({},t,{kind:"comment"})},z.z.discriminatedUnion("kind",[os,is])),ss=z.z.object({type:z.z.literal("pull_request_timeline_response"),payload:z.z.object({cwd:z.z.string().optional().default(""),prNumber:z.z.number().nullable().optional().default(null),items:z.z.array(as).optional().default([]),truncated:z.z.boolean().optional().default(!1),error:rs.nullable().optional().default(null),requestId:z.z.string().optional().default(""),githubFeaturesEnabled:z.z.boolean().optional().default(!0)}).optional().prefault({})}),ls=z.z.object({type:z.z.literal("checkout_switch_branch_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),branch:z.z.string(),source:z.z.enum(["local","remote"]).optional(),error:vn.nullable(),requestId:z.z.string()})}),cs=z.z.object({type:z.z.literal("checkout.rename_branch.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),cwd:z.z.string(),currentBranch:z.z.string().nullable(),error:vn.nullable()})}),us=z.z.object({index:z.z.number().int().min(0),message:z.z.string(),branch:z.z.string().nullable(),isPaseo:z.z.boolean()}),zs=z.z.object({type:z.z.literal("stash_save_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),ps=z.z.object({type:z.z.literal("stash_pop_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),gs=z.z.object({type:z.z.literal("stash_list_response"),payload:z.z.object({cwd:z.z.string(),entries:z.z.array(us),error:vn.nullable(),requestId:z.z.string()})}),bs=z.z.object({type:z.z.literal("validate_branch_response"),payload:z.z.object({exists:z.z.boolean(),resolvedRef:z.z.string().nullable(),isRemote:z.z.boolean(),error:z.z.string().nullable(),requestId:z.z.string()})}),ds=z.z.object({type:z.z.literal("branch_suggestions_response"),payload:z.z.object({branches:z.z.array(z.z.string()),branchDetails:z.z.array(z.z.object({name:z.z.string(),committerDate:z.z.number(),hasLocal:z.z.boolean().optional(),hasRemote:z.z.boolean().optional()})).optional(),error:z.z.string().nullable(),requestId:z.z.string()})}),ms=z.z.object({type:z.z.literal("github_search_response"),payload:z.z.object({items:z.z.array(ar),githubFeaturesEnabled:z.z.boolean(),error:z.z.string().nullable(),requestId:z.z.string()})}),fs=z.z.object({type:z.z.literal("directory_suggestions_response"),payload:z.z.object({directories:z.z.array(z.z.string()),entries:z.z.array(z.z.object({path:z.z.string(),kind:z.z.enum(["file","directory"])})).optional().default([]),error:z.z.string().nullable(),requestId:z.z.string()})}),ys=z.z.object({worktreePath:z.z.string(),createdAt:z.z.string(),branchName:z.z.string().nullable().optional(),head:z.z.string().nullable().optional()}),hs=z.z.object({type:z.z.literal("paseo_worktree_list_response"),payload:z.z.object({worktrees:z.z.array(ys),error:vn.nullable(),requestId:z.z.string()})}),js=z.z.object({type:z.z.literal("paseo_worktree_archive_response"),payload:z.z.object({success:z.z.boolean(),removedAgents:z.z.array(z.z.string()).optional(),error:vn.nullable(),requestId:z.z.string()})}),Ss=z.z.object({type:z.z.literal("create_paseo_worktree_response"),payload:z.z.object({workspace:_i.nullable(),error:z.z.string().nullable(),errorCode:z.z.string().optional(),setupTerminalId:z.z.string().nullable(),requestId:z.z.string()})}),Ps=z.z.object({type:z.z.literal("file_explorer_response"),payload:z.z.object({cwd:z.z.string(),path:z.z.string(),mode:z.z.enum(["list","file"]),directory:Lr.nullable(),file:xr.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),_s=z.z.object({data:z.z.string(),mimeType:z.z.string()}),qs=z.z.object({type:z.z.literal("project_icon_response"),payload:z.z.object({cwd:z.z.string(),icon:_s.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),Is=z.z.object({type:z.z.literal("file_download_token_response"),payload:z.z.object({cwd:z.z.string(),path:z.z.string(),token:z.z.string().nullable(),fileName:z.z.string().nullable(),mimeType:z.z.string().nullable(),size:z.z.number().nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),Os=z.z.object({type:z.z.literal("file.upload.response"),payload:z.z.object({requestId:z.z.string(),file:ct.nullable(),error:z.z.string().nullable()})}),ks=z.z.object({type:z.z.literal("list_provider_models_response"),payload:z.z.object({provider:m.AgentProviderSchema,models:z.z.array(ce).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),Rs=z.z.object({type:z.z.literal("list_provider_modes_response"),payload:z.z.object({provider:m.AgentProviderSchema,modes:z.z.array(ne).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),ws=z.z.object({type:z.z.literal("list_provider_features_response"),payload:z.z.object({provider:m.AgentProviderSchema,features:z.z.array(le).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),vs=z.z.object({provider:m.AgentProviderSchema,available:z.z.boolean(),error:z.z.string().nullable().optional()}),As=z.z.object({type:z.z.literal("list_available_providers_response"),payload:z.z.object({providers:z.z.array(vs),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),Ms=z.z.object({type:z.z.literal("get_providers_snapshot_response"),payload:z.z.object({entries:z.z.array(ue),generatedAt:z.z.string(),requestId:z.z.string()})}),Cs=z.z.object({type:z.z.literal("providers_snapshot_update"),payload:z.z.object({cwd:z.z.string().optional(),entries:z.z.array(ue),generatedAt:z.z.string()})}),Ts=z.z.object({type:z.z.literal("refresh_providers_snapshot_response"),payload:z.z.object({requestId:z.z.string(),acknowledged:z.z.boolean()})}),xs=z.z.object({type:z.z.literal("provider_diagnostic_response"),payload:z.z.object({provider:m.AgentProviderSchema,diagnostic:z.z.string(),requestId:z.z.string()})}),Ls=z.z.enum(["default","ok","warning","danger"]),Ws=z.z.enum(["available","unavailable","error"]),Ds=z.z.object({id:z.z.string(),label:z.z.string(),usedPct:z.z.number().nullable().optional(),remainingPct:z.z.number().nullable().optional(),resetsAt:z.z.string().nullable().optional(),runsOutAt:z.z.string().nullable().optional(),shortfallPct:z.z.number().nullable().optional(),tone:Ls.optional()}),Es=z.z.object({id:z.z.string(),label:z.z.string(),used:z.z.number().nullable().optional(),remaining:z.z.number().nullable().optional(),limit:z.z.number().nullable().optional(),unit:z.z.enum(["usd","credits","requests","tokens"]),resetsAt:z.z.string().nullable().optional(),tone:Ls.optional()}),Ns=z.z.object({id:z.z.string(),label:z.z.string(),value:z.z.string(),tone:Ls.optional()}),Us=z.z.object({providerId:z.z.string(),displayName:z.z.string(),status:Ws,planLabel:z.z.string().nullable(),sourceLabel:z.z.string().nullable().optional(),fetchedAt:z.z.string().nullable().optional(),nextRefreshAt:z.z.string().nullable().optional(),windows:z.z.array(Ds),balances:z.z.array(Es).optional(),details:z.z.array(Ns).optional(),error:z.z.string().nullable().optional()}),Fs=z.z.object({type:z.z.literal("provider.usage.list.response"),payload:z.z.object({requestId:z.z.string(),fetchedAt:z.z.string(),providers:z.z.array(Us)})}),Gs=z.z.object({name:z.z.string(),description:z.z.string(),argumentHint:z.z.string(),kind:z.z.enum(["command","skill"]).optional().catch("command")}),Bs=z.z.object({type:z.z.literal("list_commands_response"),payload:z.z.object({agentId:z.z.string(),commands:z.z.array(Gs),error:z.z.string().nullable(),requestId:z.z.string()})}),Hs=z.z.object({id:z.z.string(),name:z.z.string(),cwd:z.z.string(),workspaceId:z.z.string().optional(),title:z.z.string().optional(),activity:p.TerminalActivitySchema.nullable().optional()}),Ks=z.z.object({char:z.z.string(),fg:z.z.number().optional(),bg:z.z.number().optional(),fgMode:z.z.number().optional(),bgMode:z.z.number().optional(),bold:z.z.boolean().optional(),italic:z.z.boolean().optional(),underline:z.z.boolean().optional(),dim:z.z.boolean().optional(),inverse:z.z.boolean().optional(),strikethrough:z.z.boolean().optional()}),Vs=z.z.enum(["block","underline","bar"]),Ys=z.z.object({row:z.z.number(),col:z.z.number(),hidden:z.z.boolean().optional(),style:Vs.optional(),blink:z.z.boolean().optional()}),Qs=z.z.object({rows:z.z.number(),cols:z.z.number(),grid:z.z.array(z.z.array(Ks)),scrollback:z.z.array(z.z.array(Ks)),cursor:Ys,title:z.z.string().optional(),gridWrapped:z.z.array(z.z.boolean()).optional(),scrollbackWrapped:z.z.array(z.z.boolean()).optional()}),Xs=z.z.object({type:z.z.literal("list_terminals_response"),payload:z.z.object({cwd:z.z.string().optional(),terminals:z.z.array(Hs.omit({cwd:!0})),requestId:z.z.string()})}),Js=z.z.object({type:z.z.literal("terminals_changed"),payload:z.z.object({cwd:z.z.string(),terminals:z.z.array(Hs.omit({cwd:!0}))})}),Zs=z.z.object({type:z.z.literal("create_terminal_response"),payload:z.z.object({terminal:Hs.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),$s=z.z.object({type:z.z.literal("terminal.rename.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),error:z.z.string().nullable()})}),el=z.z.object({type:z.z.literal("subscribe_terminal_response"),payload:z.z.union([z.z.object({terminalId:z.z.string(),slot:z.z.number().int().min(0).max(255),error:z.z.null(),requestId:z.z.string()}),z.z.object({terminalId:z.z.string(),error:z.z.string(),requestId:z.z.string()})])}),tl=z.z.object({type:z.z.literal("kill_terminal_response"),payload:z.z.object({terminalId:z.z.string(),success:z.z.boolean(),requestId:z.z.string()})}),nl=z.z.object({type:z.z.literal("capture_terminal_response"),payload:z.z.object({terminalId:z.z.string(),lines:z.z.array(z.z.string()),totalLines:z.z.number().int().nonnegative(),requestId:z.z.string()})}),rl=z.z.object({type:z.z.literal("terminal_stream_exit"),payload:z.z.object({terminalId:z.z.string()})}),ol=z.z.object({type:z.z.literal("terminal_attention_required"),payload:z.z.object({serverId:z.z.string().optional(),terminalId:z.z.string(),cwd:z.z.string(),workspaceId:z.z.string().optional(),reason:z.z.enum(["finished","needs_input"]),title:z.z.string(),body:z.z.string(),shouldNotify:z.z.boolean()})}),il=z.z.object({type:z.z.literal("daemon.update.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),error:z.z.string().nullable(),previousVersion:z.z.string().nullable(),newVersion:z.z.string().nullable()})}),al=z.z.object({type:z.z.literal("daemon.update.progress"),payload:z.z.object({requestId:z.z.string(),phase:z.z.enum(["starting","downloading","installing","complete"])})}),sl=z.z.discriminatedUnion("type",[P.BrowserAutomationExecuteRequestSchema,Lo,Wo,Do,Eo,No,Uo,Fo,Go,Bo,Ho,$o,ei,ti,pi,qi,Ii,Li,Wi,Di,Ni,Oi,ki,Ai,Mi,Ci,xi,Fi,Ui,Gi,Bi,Hi,Ki,Vi,Xi,Ji,Zi,$i,ea,ta,na,qn,ia,aa,H,V,Q,J,te,sa,oa,la,ca,ua,tn,rn,an,sn,cn,zn,gn,mn,fn,hn,Sn,_n,ra,za,fa,ya,ha,Qe,Pa,Ra,xa,Wa,Da,Ea,Na,Ua,Fa,Ga,Ba,Ha,Ka,Va,Ya,Qa,Xa,Yn,es,ts,ss,ls,cs,zs,ps,gs,bs,ds,ms,fs,hs,js,Ss,Ps,qs,Is,Os,ks,Rs,ws,As,Ms,Cs,Ts,xs,Fs,Bs,Xs,Js,Zs,$s,el,tl,nl,rl,ol,h.ChatCreateResponseSchema,h.ChatListResponseSchema,h.ChatInspectResponseSchema,h.ChatDeleteResponseSchema,h.ChatPostResponseSchema,h.ChatReadResponseSchema,h.ChatWaitResponseSchema,j.ScheduleCreateResponseSchema,j.ScheduleListResponseSchema,j.ScheduleInspectResponseSchema,j.ScheduleLogsResponseSchema,j.SchedulePauseResponseSchema,j.ScheduleResumeResponseSchema,j.ScheduleDeleteResponseSchema,j.ScheduleRunOnceResponseSchema,j.ScheduleUpdateResponseSchema,S.LoopRunResponseSchema,S.LoopListResponseSchema,S.LoopInspectResponseSchema,S.LoopLogsResponseSchema,S.LoopStopResponseSchema,Qr,Jr,eo,ro,co,zo,bo,ho,So,ga,ba,ma,al,il]),ll=z.z.object({type:z.z.literal("ping")}),cl=z.z.object({type:z.z.literal("pong")}),ul=z.z.object({type:z.z.literal("hello"),clientId:z.z.string().min(1),clientType:z.z.enum(["mobile","browser","cli","mcp"]),protocolVersion:z.z.number().int(),appVersion:z.z.string().optional(),capabilities:z.z.object({voice:z.z.boolean().optional(),pushNotifications:z.z.boolean().optional(),[g.CLIENT_CAPS.reasoningMergeEnum]:z.z.boolean().optional(),[g.CLIENT_CAPS.customModeIcons]:z.z.boolean().optional(),[g.CLIENT_CAPS.terminalReflowableSnapshot]:z.z.boolean().optional(),[g.CLIENT_CAPS.browserHost]:_.BrowserAutomationHostCapabilitySchema.optional()}).passthrough().optional()}),zl=z.z.object({type:z.z.literal("recording_state"),isRecording:z.z.boolean()}),pl=z.z.object({type:z.z.literal("session"),message:To}),gl=z.z.object({type:z.z.literal("session"),message:sl}),bl=z.z.discriminatedUnion("type",[ll,ul,zl,pl]),dl=z.z.discriminatedUnion("type",[cl,gl]);const ml=z.z.object({kind:z.z.literal("permission"),tool_name:z.z.string(),tool_input:z.z.unknown(),agent_id:z.z.string()}),fl=z.z.object({kind:z.z.literal("pre-tool"),tool_name:z.z.string(),tool_input:z.z.unknown(),agent_id:z.z.string()}),yl=z.z.object({kind:z.z.literal("post-tool"),tool_name:z.z.string(),tool_input:z.z.unknown(),tool_response:z.z.unknown(),agent_id:z.z.string()}),hl=z.z.object({kind:z.z.literal("status-line"),statusText:z.z.string(),agent_id:z.z.string()}),jl=z.z.object({kind:z.z.literal("session-start"),session_id:z.z.string(),transcript_path:z.z.string(),agent_id:z.z.string()}),Sl=z.z.object({kind:z.z.literal("session-end"),session_id:z.z.string(),transcript_path:z.z.string(),agent_id:z.z.string()}),Pl=z.z.object({kind:z.z.literal("assistant_message_delta"),delta:z.z.object({text:z.z.string()})}),_l=z.z.object({kind:z.z.literal("usage_update"),usage:z.z.object({input_tokens:z.z.number().optional(),output_tokens:z.z.number().optional(),cache_creation_input_tokens:z.z.number().optional(),cache_read_input_tokens:z.z.number().optional(),total_cost_usd:z.z.number().optional()})}),ql=z.z.discriminatedUnion("kind",[ml,fl,yl,hl,jl,Sl,Pl,_l])},3281,[35,3282,3361,3280,3362,3363,3364,3365,3366,3368,3370,3372,3373,3374,3375]);
|
|
14926
|
+
__d(function(e,t,n,r,o,i,a){"use strict";const s=["contextKind"];Object.defineProperty(i,'__esModule',{value:!0}),Object.defineProperty(i,"PaseoConfigRawSchema",{enumerable:!0,get:function(){return q.PaseoConfigRawSchema}}),Object.defineProperty(i,"PaseoLifecycleCommandRawSchema",{enumerable:!0,get:function(){return q.PaseoLifecycleCommandRawSchema}}),Object.defineProperty(i,"PaseoMetadataGenerationEntrySchema",{enumerable:!0,get:function(){return q.PaseoMetadataGenerationEntrySchema}}),Object.defineProperty(i,"PaseoMetadataGenerationSchema",{enumerable:!0,get:function(){return q.PaseoMetadataGenerationSchema}}),Object.defineProperty(i,"PaseoScriptEntryRawSchema",{enumerable:!0,get:function(){return q.PaseoScriptEntryRawSchema}}),Object.defineProperty(i,"PaseoWorktreeConfigRawSchema",{enumerable:!0,get:function(){return q.PaseoWorktreeConfigRawSchema}}),Object.defineProperty(i,"TerminalProfileSchema",{enumerable:!0,get:function(){return w}}),Object.defineProperty(i,"KanbanBucketDefSchema",{enumerable:!0,get:function(){return v}}),Object.defineProperty(i,"KanbanBoardConfigSchema",{enumerable:!0,get:function(){return A}}),Object.defineProperty(i,"MutableDaemonConfigSchema",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"MutableDaemonConfigPatchSchema",{enumerable:!0,get:function(){return T}}),Object.defineProperty(i,"AgentStatusSchema",{enumerable:!0,get:function(){return x}}),Object.defineProperty(i,"WORKFLOW_STATUSES",{enumerable:!0,get:function(){return L}}),Object.defineProperty(i,"WorkflowStatusSchema",{enumerable:!0,get:function(){return W}}),Object.defineProperty(i,"WorkflowPhaseSchema",{enumerable:!0,get:function(){return D}}),Object.defineProperty(i,"WorkflowSnapshotSchema",{enumerable:!0,get:function(){return E}}),Object.defineProperty(i,"STORED_WORKFLOW_SCHEMA",{enumerable:!0,get:function(){return N}}),Object.defineProperty(i,"WORKFLOW_EVENT_TYPES",{enumerable:!0,get:function(){return U}}),Object.defineProperty(i,"WorkflowEventTypeSchema",{enumerable:!0,get:function(){return F}}),Object.defineProperty(i,"WorkflowLifecycleEventSchema",{enumerable:!0,get:function(){return G}}),Object.defineProperty(i,"WorkflowListRequestSchema",{enumerable:!0,get:function(){return B}}),Object.defineProperty(i,"WorkflowListResponseSchema",{enumerable:!0,get:function(){return H}}),Object.defineProperty(i,"WorkflowGetRequestSchema",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"WorkflowGetResponseSchema",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"WorkflowCancelRequestSchema",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(i,"WorkflowCancelResponseSchema",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(i,"WorkflowEventsRequestSchema",{enumerable:!0,get:function(){return X}}),Object.defineProperty(i,"WorkflowEventsResponseSchema",{enumerable:!0,get:function(){return $}}),Object.defineProperty(i,"WorkflowTaskNodeSchema",{enumerable:!0,get:function(){return J}}),Object.defineProperty(i,"WorkflowTaskGraphSchema",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(i,"WorkflowStartRequestSchema",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(i,"WorkflowStartResponseSchema",{enumerable:!0,get:function(){return te}}),Object.defineProperty(i,"AgentFeatureToggleSchema",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(i,"AgentFeatureSelectSchema",{enumerable:!0,get:function(){return se}}),Object.defineProperty(i,"AgentFeatureSchema",{enumerable:!0,get:function(){return le}}),Object.defineProperty(i,"ProviderSnapshotEntrySchema",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(i,"AgentPermissionResponseSchema",{enumerable:!0,get:function(){return je}}),Object.defineProperty(i,"AgentPermissionRequestPayloadSchema",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(i,"AgentTimelineItemPayloadSchema",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(i,"AgentStreamEventPayloadSchema",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(i,"SessionDigestLinkSchema",{enumerable:!0,get:function(){return We}}),Object.defineProperty(i,"SessionDigestSchema",{enumerable:!0,get:function(){return De}}),Object.defineProperty(i,"AgentSnapshotPayloadSchema",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(i,"AgentListItemPayloadSchema",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(i,"RecentProviderSessionDescriptorPayloadSchema",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(i,"VoiceAudioChunkMessageSchema",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(i,"AbortRequestMessageSchema",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(i,"AudioPlayedMessageSchema",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(i,"DeleteAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(i,"ArchiveAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(i,"DismissBackgroundTaskRequestMessageSchema",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(i,"BackgroundTaskDismissedMessageSchema",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(i,"CloseItemsRequestMessageSchema",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(i,"UpdateAgentRequestMessageSchema",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(i,"ProjectRenameRequestSchema",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(i,"ProjectRemoveRequestSchema",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(i,"WorkspaceTitleSetRequestSchema",{enumerable:!0,get:function(){return et}}),Object.defineProperty(i,"SetVoiceModeMessageSchema",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(i,"GitHubPrAttachmentSchema",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(i,"GitHubIssueAttachmentSchema",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(i,"TextAttachmentSchema",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(i,"ReviewAttachmentContextLineSchema",{enumerable:!0,get:function(){return it}}),Object.defineProperty(i,"ReviewAttachmentCommentSchema",{enumerable:!0,get:function(){return at}}),Object.defineProperty(i,"ReviewAttachmentSchema",{enumerable:!0,get:function(){return st}}),Object.defineProperty(i,"FileAttachmentSchema",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(i,"UploadedFileAttachmentSchema",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(i,"AgentAttachmentSchema",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(i,"SendAgentMessageSchema",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(i,"FetchAgentsRequestMessageSchema",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(i,"FetchWorkspacesRequestMessageSchema",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(i,"FetchAgentHistoryRequestMessageSchema",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(i,"FetchRecentProviderSessionsRequestMessageSchema",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(i,"FetchAgentRequestMessageSchema",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(i,"SendAgentMessageRequestSchema",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(i,"WaitForFinishRequestSchema",{enumerable:!0,get:function(){return St}}),Object.defineProperty(i,"DaemonGetStatusRequestSchema",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(i,"DaemonGetPairingOfferRequestSchema",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(i,"DiagnosticsRequestSchema",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(i,"GetDaemonConfigRequestMessageSchema",{enumerable:!0,get:function(){return It}}),Object.defineProperty(i,"SetDaemonConfigRequestMessageSchema",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(i,"ReadProjectConfigRequestMessageSchema",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(i,"WriteProjectConfigRequestMessageSchema",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(i,"DictationStreamStartMessageSchema",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(i,"DictationStreamChunkMessageSchema",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(i,"DictationStreamFinishMessageSchema",{enumerable:!0,get:function(){return At}}),Object.defineProperty(i,"DictationStreamCancelMessageSchema",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(i,"CreateAgentWorktreeTargetSchema",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(i,"CreateAgentRequestMessageSchema",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(i,"ListProviderModelsRequestMessageSchema",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(i,"ListProviderModesRequestMessageSchema",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(i,"ListAvailableProvidersRequestMessageSchema",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(i,"GetProvidersSnapshotRequestMessageSchema",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(i,"RefreshProvidersSnapshotRequestMessageSchema",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(i,"ProviderDiagnosticRequestMessageSchema",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(i,"ProviderUsageListRequestMessageSchema",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(i,"ResumeAgentRequestMessageSchema",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(i,"ImportAgentRequestMessageSchema",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(i,"RefreshAgentRequestMessageSchema",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(i,"CancelAgentRequestMessageSchema",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(i,"RestartServerRequestMessageSchema",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(i,"ShutdownServerRequestMessageSchema",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(i,"DaemonUpdateRequestMessageSchema",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(i,"AgentTimelineCursorSchema",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(i,"FetchAgentTimelineRequestMessageSchema",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(i,"AgentForkContextRequestMessageSchema",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(i,"SetAgentModeRequestMessageSchema",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(i,"SetAgentModeResponseMessageSchema",{enumerable:!0,get:function(){return tn}}),Object.defineProperty(i,"SetAgentModelRequestMessageSchema",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(i,"SetAgentModelResponseMessageSchema",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(i,"SwapAgentProviderRequestMessageSchema",{enumerable:!0,get:function(){return on}}),Object.defineProperty(i,"SwapAgentProviderResponseMessageSchema",{enumerable:!0,get:function(){return an}}),Object.defineProperty(i,"AgentProviderSwappedEventSchema",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(i,"SetAgentThinkingRequestMessageSchema",{enumerable:!0,get:function(){return ln}}),Object.defineProperty(i,"SetAgentThinkingResponseMessageSchema",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(i,"SetAgentFeatureRequestMessageSchema",{enumerable:!0,get:function(){return un}}),Object.defineProperty(i,"SetAgentFeatureResponseMessageSchema",{enumerable:!0,get:function(){return zn}}),Object.defineProperty(i,"AgentDetachRequestMessageSchema",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(i,"AgentDetachResponseMessageSchema",{enumerable:!0,get:function(){return gn}}),Object.defineProperty(i,"AgentRewindModeSchema",{enumerable:!0,get:function(){return bn}}),Object.defineProperty(i,"AgentRewindRequestMessageSchema",{enumerable:!0,get:function(){return dn}}),Object.defineProperty(i,"AgentRewindResponseMessageSchema",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(i,"UpdateAgentResponseMessageSchema",{enumerable:!0,get:function(){return fn}}),Object.defineProperty(i,"ProjectRenameResponsePayloadSchema",{enumerable:!0,get:function(){return yn}}),Object.defineProperty(i,"ProjectRenameResponseSchema",{enumerable:!0,get:function(){return hn}}),Object.defineProperty(i,"ProjectRemoveResponsePayloadSchema",{enumerable:!0,get:function(){return jn}}),Object.defineProperty(i,"ProjectRemoveResponseSchema",{enumerable:!0,get:function(){return Sn}}),Object.defineProperty(i,"WorkspaceTitleSetResponsePayloadSchema",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(i,"WorkspaceTitleSetResponseSchema",{enumerable:!0,get:function(){return _n}}),Object.defineProperty(i,"SetVoiceModeResponseMessageSchema",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(i,"AgentPermissionResponseMessageSchema",{enumerable:!0,get:function(){return In}}),Object.defineProperty(i,"WatchNotificationActionMessageSchema",{enumerable:!0,get:function(){return On}}),Object.defineProperty(i,"WatchSessionSearchMessageSchema",{enumerable:!0,get:function(){return kn}}),Object.defineProperty(i,"WatchComposerDictateMessageSchema",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(i,"CheckoutStatusRequestSchema",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(i,"SubscribeCheckoutDiffRequestSchema",{enumerable:!0,get:function(){return Cn}}),Object.defineProperty(i,"UnsubscribeCheckoutDiffRequestSchema",{enumerable:!0,get:function(){return Tn}}),Object.defineProperty(i,"CheckoutCommitRequestSchema",{enumerable:!0,get:function(){return xn}}),Object.defineProperty(i,"CheckoutMergeRequestSchema",{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(i,"CheckoutMergeFromBaseRequestSchema",{enumerable:!0,get:function(){return Wn}}),Object.defineProperty(i,"CheckoutPullRequestSchema",{enumerable:!0,get:function(){return Dn}}),Object.defineProperty(i,"CheckoutPushRequestSchema",{enumerable:!0,get:function(){return En}}),Object.defineProperty(i,"CheckoutRefreshRequestSchema",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(i,"CheckoutPrCreateRequestSchema",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(i,"CheckoutPrMergeRequestSchema",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(i,"CheckoutGithubSetAutoMergeRequestSchema",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(i,"FileUploadErrorCodeSchema",{enumerable:!0,get:function(){return Bn}}),Object.defineProperty(i,"FilesUploadBeginRequestSchema",{enumerable:!0,get:function(){return Hn}}),Object.defineProperty(i,"FilesUploadCompleteRequestSchema",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(i,"FilesUploadChunkSchema",{enumerable:!0,get:function(){return Vn}}),Object.defineProperty(i,"FilesUploadErrorSchema",{enumerable:!0,get:function(){return Yn}}),Object.defineProperty(i,"CheckoutGithubGetCheckDetailsRequestSchema",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(i,"CheckoutPrStatusRequestSchema",{enumerable:!0,get:function(){return $n}}),Object.defineProperty(i,"PullRequestTimelineRequestSchema",{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(i,"ValidateBranchRequestSchema",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(i,"CheckoutSwitchBranchRequestSchema",{enumerable:!0,get:function(){return er}}),Object.defineProperty(i,"CheckoutRenameBranchRequestSchema",{enumerable:!0,get:function(){return tr}}),Object.defineProperty(i,"StashSaveRequestSchema",{enumerable:!0,get:function(){return nr}}),Object.defineProperty(i,"StashPopRequestSchema",{enumerable:!0,get:function(){return rr}}),Object.defineProperty(i,"StashListRequestSchema",{enumerable:!0,get:function(){return or}}),Object.defineProperty(i,"BranchSuggestionsRequestSchema",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(i,"GitHubSearchItemSchema",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(i,"GitHubSearchKindSchema",{enumerable:!0,get:function(){return sr}}),Object.defineProperty(i,"GitHubSearchRequestSchema",{enumerable:!0,get:function(){return lr}}),Object.defineProperty(i,"DirectorySuggestionsRequestSchema",{enumerable:!0,get:function(){return cr}}),Object.defineProperty(i,"PaseoWorktreeListRequestSchema",{enumerable:!0,get:function(){return ur}}),Object.defineProperty(i,"PaseoWorktreeArchiveRequestSchema",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(i,"FirstAgentContextSchema",{enumerable:!0,get:function(){return pr}}),Object.defineProperty(i,"CreatePaseoWorktreeRequestSchema",{enumerable:!0,get:function(){return gr}}),Object.defineProperty(i,"WorkspaceSetupStatusRequestSchema",{enumerable:!0,get:function(){return br}}),Object.defineProperty(i,"LEGACY_EDITOR_TARGET_IDS",{enumerable:!0,get:function(){return dr}}),Object.defineProperty(i,"KNOWN_EDITOR_TARGET_IDS",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(i,"KnownEditorTargetIdSchema",{enumerable:!0,get:function(){return fr}}),Object.defineProperty(i,"LegacyEditorTargetIdSchema",{enumerable:!0,get:function(){return yr}}),Object.defineProperty(i,"EditorTargetIdSchema",{enumerable:!0,get:function(){return hr}}),i.isKnownEditorTargetId=function(e){return jr.has(e)},i.isLegacyEditorTargetId=function(e){return Sr.has(e)},Object.defineProperty(i,"EditorTargetDescriptorPayloadSchema",{enumerable:!0,get:function(){return Pr}}),Object.defineProperty(i,"LegacyListAvailableEditorsRequestSchema",{enumerable:!0,get:function(){return _r}}),Object.defineProperty(i,"LegacyOpenInEditorRequestSchema",{enumerable:!0,get:function(){return qr}}),Object.defineProperty(i,"OpenProjectRequestSchema",{enumerable:!0,get:function(){return Ir}}),Object.defineProperty(i,"ProjectAddRequestSchema",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(i,"ArchiveWorkspaceRequestSchema",{enumerable:!0,get:function(){return kr}}),Object.defineProperty(i,"WorkspaceCreateRequestSchema",{enumerable:!0,get:function(){return Rr}}),Object.defineProperty(i,"WorkspaceClearAttentionRequestSchema",{enumerable:!0,get:function(){return wr}}),Object.defineProperty(i,"FileExplorerRequestSchema",{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(i,"ProjectIconRequestSchema",{enumerable:!0,get:function(){return Dr}}),Object.defineProperty(i,"FileDownloadTokenRequestSchema",{enumerable:!0,get:function(){return Er}}),Object.defineProperty(i,"FileUploadRequestSchema",{enumerable:!0,get:function(){return Nr}}),Object.defineProperty(i,"ClearAgentAttentionMessageSchema",{enumerable:!0,get:function(){return Ur}}),Object.defineProperty(i,"ClientHeartbeatMessageSchema",{enumerable:!0,get:function(){return Fr}}),Object.defineProperty(i,"PingMessageSchema",{enumerable:!0,get:function(){return Gr}}),Object.defineProperty(i,"ListProviderFeaturesRequestMessageSchema",{enumerable:!0,get:function(){return Hr}}),Object.defineProperty(i,"ListCommandsRequestSchema",{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(i,"RegisterPushTokenMessageSchema",{enumerable:!0,get:function(){return Vr}}),Object.defineProperty(i,"RewindSessionRequestMessageSchema",{enumerable:!0,get:function(){return Yr}}),Object.defineProperty(i,"RewindSessionResponseMessageSchema",{enumerable:!0,get:function(){return Qr}}),Object.defineProperty(i,"EditMessageRequestMessageSchema",{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(i,"EditMessageResponseMessageSchema",{enumerable:!0,get:function(){return $r}}),Object.defineProperty(i,"ListWorkspaceSessionsRequestMessageSchema",{enumerable:!0,get:function(){return Jr}}),Object.defineProperty(i,"ListWorkspaceSessionsResponseMessageSchema",{enumerable:!0,get:function(){return eo}}),Object.defineProperty(i,"ListAllSessionsRequestMessageSchema",{enumerable:!0,get:function(){return to}}),Object.defineProperty(i,"ListAllSessionsResponseMessageSchema",{enumerable:!0,get:function(){return ro}}),Object.defineProperty(i,"ListExtensionsRequestMessageSchema",{enumerable:!0,get:function(){return lo}}),Object.defineProperty(i,"ListExtensionsResponseMessageSchema",{enumerable:!0,get:function(){return co}}),Object.defineProperty(i,"ExecuteExtensionCommandRequestMessageSchema",{enumerable:!0,get:function(){return uo}}),Object.defineProperty(i,"ExecuteExtensionCommandResponseMessageSchema",{enumerable:!0,get:function(){return zo}}),Object.defineProperty(i,"SearchSessionsRequestMessageSchema",{enumerable:!0,get:function(){return po}}),Object.defineProperty(i,"SearchSessionsResponseMessageSchema",{enumerable:!0,get:function(){return bo}}),Object.defineProperty(i,"SubscribePushRequestMessageSchema",{enumerable:!0,get:function(){return yo}}),Object.defineProperty(i,"SubscribePushResponseMessageSchema",{enumerable:!0,get:function(){return ho}}),Object.defineProperty(i,"GetVapidPublicKeyRequestMessageSchema",{enumerable:!0,get:function(){return jo}}),Object.defineProperty(i,"GetVapidPublicKeyResponseMessageSchema",{enumerable:!0,get:function(){return So}}),Object.defineProperty(i,"ListTerminalsRequestSchema",{enumerable:!0,get:function(){return Po}}),Object.defineProperty(i,"SubscribeTerminalsRequestSchema",{enumerable:!0,get:function(){return _o}}),Object.defineProperty(i,"UnsubscribeTerminalsRequestSchema",{enumerable:!0,get:function(){return qo}}),Object.defineProperty(i,"CreateTerminalRequestSchema",{enumerable:!0,get:function(){return Io}}),Object.defineProperty(i,"RenameTerminalRequestSchema",{enumerable:!0,get:function(){return Oo}}),Object.defineProperty(i,"StartWorkspaceScriptRequestSchema",{enumerable:!0,get:function(){return ko}}),Object.defineProperty(i,"SubscribeTerminalRequestSchema",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(i,"UnsubscribeTerminalRequestSchema",{enumerable:!0,get:function(){return wo}}),Object.defineProperty(i,"TerminalInputSchema",{enumerable:!0,get:function(){return Ao}}),Object.defineProperty(i,"KillTerminalRequestSchema",{enumerable:!0,get:function(){return Mo}}),Object.defineProperty(i,"CaptureTerminalRequestSchema",{enumerable:!0,get:function(){return Co}}),Object.defineProperty(i,"SessionInboundMessageSchema",{enumerable:!0,get:function(){return To}}),Object.defineProperty(i,"ActivityLogPayloadSchema",{enumerable:!0,get:function(){return xo}}),Object.defineProperty(i,"ActivityLogMessageSchema",{enumerable:!0,get:function(){return Lo}}),Object.defineProperty(i,"AssistantChunkMessageSchema",{enumerable:!0,get:function(){return Wo}}),Object.defineProperty(i,"AudioOutputMessageSchema",{enumerable:!0,get:function(){return Do}}),Object.defineProperty(i,"TranscriptionResultMessageSchema",{enumerable:!0,get:function(){return Eo}}),Object.defineProperty(i,"VoiceInputStateMessageSchema",{enumerable:!0,get:function(){return No}}),Object.defineProperty(i,"DictationStreamAckMessageSchema",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(i,"DictationStreamFinishAcceptedMessageSchema",{enumerable:!0,get:function(){return Fo}}),Object.defineProperty(i,"DictationStreamPartialMessageSchema",{enumerable:!0,get:function(){return Go}}),Object.defineProperty(i,"DictationStreamFinalMessageSchema",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(i,"DictationStreamErrorMessageSchema",{enumerable:!0,get:function(){return Ho}}),Object.defineProperty(i,"ServerCapabilityStateSchema",{enumerable:!0,get:function(){return Ko}}),Object.defineProperty(i,"ServerVoiceCapabilitiesSchema",{enumerable:!0,get:function(){return Vo}}),Object.defineProperty(i,"ServerCapabilitiesSchema",{enumerable:!0,get:function(){return Yo}}),Object.defineProperty(i,"ServerInfoStatusPayloadSchema",{enumerable:!0,get:function(){return Jo}}),Object.defineProperty(i,"StatusMessageSchema",{enumerable:!0,get:function(){return Zo}}),Object.defineProperty(i,"PongMessageSchema",{enumerable:!0,get:function(){return ei}}),Object.defineProperty(i,"RpcErrorMessageSchema",{enumerable:!0,get:function(){return ti}}),Object.defineProperty(i,"AgentCreatedStatusPayloadSchema",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(i,"AgentCreateFailedStatusPayloadSchema",{enumerable:!0,get:function(){return ii}}),Object.defineProperty(i,"AgentResumedStatusPayloadSchema",{enumerable:!0,get:function(){return ai}}),Object.defineProperty(i,"AgentRefreshedStatusPayloadSchema",{enumerable:!0,get:function(){return si}}),Object.defineProperty(i,"RestartRequestedStatusPayloadSchema",{enumerable:!0,get:function(){return li}}),Object.defineProperty(i,"ShutdownRequestedStatusPayloadSchema",{enumerable:!0,get:function(){return ci}}),Object.defineProperty(i,"DaemonConfigChangedStatusPayloadSchema",{enumerable:!0,get:function(){return ui}}),Object.defineProperty(i,"KnownStatusPayloadSchema",{enumerable:!0,get:function(){return zi}}),Object.defineProperty(i,"ArtifactMessageSchema",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(i,"ProjectCheckoutLiteNotGitPayloadSchema",{enumerable:!0,get:function(){return gi}}),Object.defineProperty(i,"ProjectCheckoutLiteGitNonPaseoPayloadSchema",{enumerable:!0,get:function(){return bi}}),Object.defineProperty(i,"ProjectCheckoutLiteGitPaseoPayloadSchema",{enumerable:!0,get:function(){return di}}),Object.defineProperty(i,"ProjectCheckoutLitePayloadSchema",{enumerable:!0,get:function(){return mi}}),Object.defineProperty(i,"ProjectPlacementPayloadSchema",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(i,"WorkspaceScriptLifecycleSchema",{enumerable:!0,get:function(){return yi}}),Object.defineProperty(i,"WorkspaceScriptHealthSchema",{enumerable:!0,get:function(){return hi}}),Object.defineProperty(i,"WorkspaceScriptPayloadSchema",{enumerable:!0,get:function(){return ji}}),Object.defineProperty(i,"WorkspaceDescriptorPayloadSchema",{enumerable:!0,get:function(){return _i}}),Object.defineProperty(i,"AgentUpdateMessageSchema",{enumerable:!0,get:function(){return qi}}),Object.defineProperty(i,"OpenUrlMessageSchema",{enumerable:!0,get:function(){return Ii}}),Object.defineProperty(i,"AgentStreamMessageSchema",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(i,"AgentStatusMessageSchema",{enumerable:!0,get:function(){return ki}}),Object.defineProperty(i,"AgentListMessageSchema",{enumerable:!0,get:function(){return Ri}}),Object.defineProperty(i,"FetchAgentsResponseMessageSchema",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(i,"FetchAgentHistoryResponseMessageSchema",{enumerable:!0,get:function(){return Mi}}),Object.defineProperty(i,"FetchRecentProviderSessionsResponseMessageSchema",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(i,"WorkspaceProjectDescriptorPayloadSchema",{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(i,"FetchWorkspacesResponseMessageSchema",{enumerable:!0,get:function(){return xi}}),Object.defineProperty(i,"WorkspaceUpdateMessageSchema",{enumerable:!0,get:function(){return Li}}),Object.defineProperty(i,"ScriptStatusUpdateMessageSchema",{enumerable:!0,get:function(){return Wi}}),Object.defineProperty(i,"WorkspaceSetupProgressMessageSchema",{enumerable:!0,get:function(){return Di}}),Object.defineProperty(i,"WorkspaceSetupSnapshotSchema",{enumerable:!0,get:function(){return Ei}}),Object.defineProperty(i,"WorkspaceSetupStatusResponseMessageSchema",{enumerable:!0,get:function(){return Ni}}),Object.defineProperty(i,"OpenProjectResponseMessageSchema",{enumerable:!0,get:function(){return Ui}}),Object.defineProperty(i,"ProjectAddResponseSchema",{enumerable:!0,get:function(){return Fi}}),Object.defineProperty(i,"StartWorkspaceScriptResponseMessageSchema",{enumerable:!0,get:function(){return Gi}}),Object.defineProperty(i,"LegacyListAvailableEditorsResponseMessageSchema",{enumerable:!0,get:function(){return Bi}}),Object.defineProperty(i,"LegacyOpenInEditorResponseMessageSchema",{enumerable:!0,get:function(){return Hi}}),Object.defineProperty(i,"ArchiveWorkspaceResponseMessageSchema",{enumerable:!0,get:function(){return Ki}}),Object.defineProperty(i,"FetchAgentResponseMessageSchema",{enumerable:!0,get:function(){return Vi}}),Object.defineProperty(i,"AgentTimelineEntryPayloadSchema",{enumerable:!0,get:function(){return Qi}}),Object.defineProperty(i,"FetchAgentTimelineResponseMessageSchema",{enumerable:!0,get:function(){return Xi}}),Object.defineProperty(i,"AgentForkContextResponseMessageSchema",{enumerable:!0,get:function(){return $i}}),Object.defineProperty(i,"CancelAgentResponseMessageSchema",{enumerable:!0,get:function(){return Ji}}),Object.defineProperty(i,"ClearAgentAttentionResponseMessageSchema",{enumerable:!0,get:function(){return Zi}}),Object.defineProperty(i,"WorkspaceCreateResponseSchema",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(i,"WorkspaceClearAttentionResponseSchema",{enumerable:!0,get:function(){return ta}}),Object.defineProperty(i,"SendAgentMessageResponseMessageSchema",{enumerable:!0,get:function(){return na}}),Object.defineProperty(i,"WaitForFinishResponseMessageSchema",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(i,"GetDaemonConfigResponseMessageSchema",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(i,"DaemonGetStatusResponseSchema",{enumerable:!0,get:function(){return ia}}),Object.defineProperty(i,"DaemonGetPairingOfferResponseSchema",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(i,"DiagnosticsResponseSchema",{enumerable:!0,get:function(){return sa}}),Object.defineProperty(i,"SetDaemonConfigResponseMessageSchema",{enumerable:!0,get:function(){return la}}),Object.defineProperty(i,"ReadProjectConfigResponseMessageSchema",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(i,"WriteProjectConfigResponseMessageSchema",{enumerable:!0,get:function(){return ua}}),Object.defineProperty(i,"AgentPermissionRequestMessageSchema",{enumerable:!0,get:function(){return za}}),Object.defineProperty(i,"WatchActionSchema",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(i,"WatchActionablePushMessageSchema",{enumerable:!0,get:function(){return ga}}),Object.defineProperty(i,"WatchActionableResolvedMessageSchema",{enumerable:!0,get:function(){return ba}}),Object.defineProperty(i,"WatchSessionMatchSchema",{enumerable:!0,get:function(){return da}}),Object.defineProperty(i,"WatchSessionSearchResultMessageSchema",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(i,"AgentPermissionResolvedMessageSchema",{enumerable:!0,get:function(){return fa}}),Object.defineProperty(i,"AgentDeletedMessageSchema",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(i,"AgentArchivedMessageSchema",{enumerable:!0,get:function(){return ha}}),Object.defineProperty(i,"CloseItemsResponseSchema",{enumerable:!0,get:function(){return Pa}}),Object.defineProperty(i,"CheckoutStatusResponseSchema",{enumerable:!0,get:function(){return Ra}}),Object.defineProperty(i,"CheckoutPrStatusSchema",{enumerable:!0,get:function(){return Ma}}),Object.defineProperty(i,"CheckoutStatusUpdateSchema",{enumerable:!0,get:function(){return xa}}),Object.defineProperty(i,"SubscribeCheckoutDiffResponseSchema",{enumerable:!0,get:function(){return Wa}}),Object.defineProperty(i,"CheckoutDiffUpdateSchema",{enumerable:!0,get:function(){return Da}}),Object.defineProperty(i,"CheckoutCommitResponseSchema",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(i,"CheckoutMergeResponseSchema",{enumerable:!0,get:function(){return Na}}),Object.defineProperty(i,"CheckoutMergeFromBaseResponseSchema",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(i,"CheckoutPullResponseSchema",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(i,"CheckoutPushResponseSchema",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(i,"CheckoutRefreshResponseSchema",{enumerable:!0,get:function(){return Ba}}),Object.defineProperty(i,"CheckoutPrCreateResponseSchema",{enumerable:!0,get:function(){return Ha}}),Object.defineProperty(i,"CheckoutPrMergeResponseSchema",{enumerable:!0,get:function(){return Ka}}),Object.defineProperty(i,"CheckoutGithubSetAutoMergeResponseSchema",{enumerable:!0,get:function(){return Va}}),Object.defineProperty(i,"FilesUploadBeginResponseSchema",{enumerable:!0,get:function(){return Ya}}),Object.defineProperty(i,"FilesUploadChunkAckSchema",{enumerable:!0,get:function(){return Qa}}),Object.defineProperty(i,"FilesUploadCompleteResponseSchema",{enumerable:!0,get:function(){return Xa}}),Object.defineProperty(i,"CheckoutGithubCheckDetailsSchema",{enumerable:!0,get:function(){return Za}}),Object.defineProperty(i,"CheckoutGithubGetCheckDetailsResponseSchema",{enumerable:!0,get:function(){return es}}),Object.defineProperty(i,"CheckoutPrStatusResponseSchema",{enumerable:!0,get:function(){return ts}}),Object.defineProperty(i,"PullRequestTimelineItemSchema",{enumerable:!0,get:function(){return as}}),Object.defineProperty(i,"PullRequestTimelineResponseSchema",{enumerable:!0,get:function(){return ss}}),Object.defineProperty(i,"CheckoutSwitchBranchResponseSchema",{enumerable:!0,get:function(){return ls}}),Object.defineProperty(i,"CheckoutRenameBranchResponseSchema",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(i,"StashSaveResponseSchema",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(i,"StashPopResponseSchema",{enumerable:!0,get:function(){return ps}}),Object.defineProperty(i,"StashListResponseSchema",{enumerable:!0,get:function(){return gs}}),Object.defineProperty(i,"ValidateBranchResponseSchema",{enumerable:!0,get:function(){return bs}}),Object.defineProperty(i,"BranchSuggestionsResponseSchema",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(i,"GitHubSearchResponseSchema",{enumerable:!0,get:function(){return ms}}),Object.defineProperty(i,"DirectorySuggestionsResponseSchema",{enumerable:!0,get:function(){return fs}}),Object.defineProperty(i,"PaseoWorktreeListResponseSchema",{enumerable:!0,get:function(){return hs}}),Object.defineProperty(i,"PaseoWorktreeArchiveResponseSchema",{enumerable:!0,get:function(){return js}}),Object.defineProperty(i,"CreatePaseoWorktreeResponseSchema",{enumerable:!0,get:function(){return Ss}}),Object.defineProperty(i,"FileExplorerResponseSchema",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(i,"ProjectIconResponseSchema",{enumerable:!0,get:function(){return qs}}),Object.defineProperty(i,"FileDownloadTokenResponseSchema",{enumerable:!0,get:function(){return Is}}),Object.defineProperty(i,"FileUploadResponseSchema",{enumerable:!0,get:function(){return Os}}),Object.defineProperty(i,"ListProviderModelsResponseMessageSchema",{enumerable:!0,get:function(){return ks}}),Object.defineProperty(i,"ListProviderModesResponseMessageSchema",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(i,"ListProviderFeaturesResponseMessageSchema",{enumerable:!0,get:function(){return ws}}),Object.defineProperty(i,"ListAvailableProvidersResponseSchema",{enumerable:!0,get:function(){return As}}),Object.defineProperty(i,"GetProvidersSnapshotResponseMessageSchema",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(i,"ProvidersSnapshotUpdateMessageSchema",{enumerable:!0,get:function(){return Cs}}),Object.defineProperty(i,"RefreshProvidersSnapshotResponseMessageSchema",{enumerable:!0,get:function(){return Ts}}),Object.defineProperty(i,"ProviderDiagnosticResponseMessageSchema",{enumerable:!0,get:function(){return xs}}),Object.defineProperty(i,"ProviderUsageToneSchema",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(i,"ProviderUsageStatusSchema",{enumerable:!0,get:function(){return Ws}}),Object.defineProperty(i,"ProviderUsageWindowSchema",{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(i,"ProviderUsageBalanceSchema",{enumerable:!0,get:function(){return Es}}),Object.defineProperty(i,"ProviderUsageDetailSchema",{enumerable:!0,get:function(){return Ns}}),Object.defineProperty(i,"ProviderUsageSchema",{enumerable:!0,get:function(){return Us}}),Object.defineProperty(i,"ProviderUsageListResponseMessageSchema",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(i,"ListCommandsResponseSchema",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(i,"TerminalCellSchema",{enumerable:!0,get:function(){return Ks}}),Object.defineProperty(i,"TerminalCursorStyleSchema",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(i,"TerminalCursorSchema",{enumerable:!0,get:function(){return Ys}}),Object.defineProperty(i,"TerminalStateSchema",{enumerable:!0,get:function(){return Qs}}),Object.defineProperty(i,"ListTerminalsResponseSchema",{enumerable:!0,get:function(){return Xs}}),Object.defineProperty(i,"TerminalsChangedSchema",{enumerable:!0,get:function(){return $s}}),Object.defineProperty(i,"CreateTerminalResponseSchema",{enumerable:!0,get:function(){return Js}}),Object.defineProperty(i,"RenameTerminalResponseSchema",{enumerable:!0,get:function(){return Zs}}),Object.defineProperty(i,"SubscribeTerminalResponseSchema",{enumerable:!0,get:function(){return el}}),Object.defineProperty(i,"KillTerminalResponseSchema",{enumerable:!0,get:function(){return tl}}),Object.defineProperty(i,"CaptureTerminalResponseSchema",{enumerable:!0,get:function(){return nl}}),Object.defineProperty(i,"TerminalStreamExitSchema",{enumerable:!0,get:function(){return rl}}),Object.defineProperty(i,"TerminalAttentionRequiredSchema",{enumerable:!0,get:function(){return ol}}),Object.defineProperty(i,"DaemonUpdateResponseSchema",{enumerable:!0,get:function(){return il}}),Object.defineProperty(i,"DaemonUpdateProgressMessageSchema",{enumerable:!0,get:function(){return al}}),Object.defineProperty(i,"SessionOutboundMessageSchema",{enumerable:!0,get:function(){return sl}}),Object.defineProperty(i,"WSPingMessageSchema",{enumerable:!0,get:function(){return ll}}),Object.defineProperty(i,"WSPongMessageSchema",{enumerable:!0,get:function(){return cl}}),Object.defineProperty(i,"WSHelloMessageSchema",{enumerable:!0,get:function(){return ul}}),Object.defineProperty(i,"WSRecordingStateMessageSchema",{enumerable:!0,get:function(){return zl}}),Object.defineProperty(i,"WSSessionInboundSchema",{enumerable:!0,get:function(){return pl}}),Object.defineProperty(i,"WSSessionOutboundSchema",{enumerable:!0,get:function(){return gl}}),Object.defineProperty(i,"WSInboundMessageSchema",{enumerable:!0,get:function(){return bl}}),Object.defineProperty(i,"WSOutboundMessageSchema",{enumerable:!0,get:function(){return dl}}),i.extractSessionMessage=function(e){if("session"===e.type)return e.message;return null},i.wrapSessionMessage=function(e){return{type:"session",message:e}},i.parseServerInfoStatusPayload=function(e){const t=Jo.safeParse(e);if(!t.success)return null;return t.data},Object.defineProperty(i,"PermissionHookEventSchema",{enumerable:!0,get:function(){return ml}}),Object.defineProperty(i,"PreToolHookEventSchema",{enumerable:!0,get:function(){return fl}}),Object.defineProperty(i,"PostToolHookEventSchema",{enumerable:!0,get:function(){return yl}}),Object.defineProperty(i,"StatusLineHookEventSchema",{enumerable:!0,get:function(){return hl}}),Object.defineProperty(i,"SessionStartHookEventSchema",{enumerable:!0,get:function(){return jl}}),Object.defineProperty(i,"SessionEndHookEventSchema",{enumerable:!0,get:function(){return Sl}}),Object.defineProperty(i,"AssistantMessageDeltaHookEventSchema",{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(i,"UsageUpdateHookEventSchema",{enumerable:!0,get:function(){return _l}}),Object.defineProperty(i,"HookEventSchema",{enumerable:!0,get:function(){return ql}});var l,c=t(a[0]),u=(l=c)&&l.__esModule?l:{default:l},z=t(a[1]),p=t(a[2]),g=t(a[3]),b=t(a[4]),d=t(a[5]),m=t(a[6]),f=t(a[7]),y=t(a[8]),h=t(a[9]),j=t(a[10]),S=t(a[11]),P=t(a[12]),_=t(a[13]),q=t(a[14]);const I=z.z.object({id:z.z.string().min(1),label:z.z.string().min(1),description:z.z.string().optional(),isDefault:z.z.boolean().optional()}).passthrough(),O=z.z.object({enabled:z.z.boolean().optional(),additionalModels:z.z.array(I).optional()}).passthrough(),k=z.z.object({provider:z.z.string().min(1),model:z.z.string().min(1).optional(),thinkingOptionId:z.z.string().min(1).optional()}).passthrough(),R=z.z.object({providers:z.z.array(k).default([])}).passthrough(),w=z.z.object({id:z.z.string(),name:z.z.string(),command:z.z.string(),args:z.z.array(z.z.string()).optional(),icon:z.z.string().optional()}).passthrough(),v=z.z.object({id:z.z.string().min(1),label:z.z.string().min(1),limit:z.z.number().int().positive().optional()}).passthrough(),A=z.z.object({buckets:z.z.array(v).default([]),defaultBucketId:z.z.string().nullable().default(null)}).passthrough(),M=z.z.object({enabled:z.z.boolean().default(!1)}).passthrough(),C=z.z.object({mcp:z.z.object({injectIntoAgents:z.z.boolean()}).passthrough(),browserTools:M.default({enabled:!1}),providers:z.z.record(z.z.string(),O).default({}),metadataGeneration:R.default({providers:[]}),autoArchiveAfterMerge:z.z.boolean().default(!1),enableTerminalAgentHooks:z.z.boolean().default(!1),appendSystemPrompt:z.z.string().default(""),terminalProfiles:z.z.array(w).optional(),kanbanBoard:A.optional()}).passthrough(),T=z.z.object({mcp:C.shape.mcp.partial().optional(),browserTools:M.partial().optional(),providers:z.z.record(z.z.string(),O.partial().passthrough()).optional(),metadataGeneration:R.partial().optional(),autoArchiveAfterMerge:z.z.boolean().optional(),enableTerminalAgentHooks:z.z.boolean().optional(),appendSystemPrompt:z.z.string().optional(),terminalProfiles:z.z.array(w).optional(),kanbanBoard:A.optional()}).partial().passthrough(),x=z.z.enum(b.AGENT_LIFECYCLE_STATUSES),L=["pending","running","completed","failed","cancelled"],W=z.z.enum(L),D=z.z.object({id:z.z.string(),title:z.z.string(),status:W,storyCount:z.z.number().int().nonnegative().optional(),completedStoryCount:z.z.number().int().nonnegative().optional()}),E=z.z.object({id:z.z.string(),cwd:z.z.string(),status:W,title:z.z.string().nullable().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),phases:z.z.array(D).default([]),childAgentIds:z.z.array(z.z.string()).default([]),totalStoryCount:z.z.number().int().nonnegative().optional(),completedStoryCount:z.z.number().int().nonnegative().default(0),createdAt:z.z.string(),updatedAt:z.z.string(),startedAt:z.z.string().nullable().optional(),completedAt:z.z.string().nullable().optional(),archivedAt:z.z.string().nullable().optional()}),N=E,U=["created","started","completed","failed","cancelled","archived"],F=z.z.enum(U),G=z.z.object({workflowId:z.z.string(),type:F,status:W,at:z.z.string()}),B=z.z.object({type:z.z.literal("workflow.list.request"),requestId:z.z.string()}),H=z.z.object({type:z.z.literal("workflow.list.response"),payload:z.z.object({requestId:z.z.string(),workflows:z.z.array(E)})}),K=z.z.object({type:z.z.literal("workflow.get.request"),requestId:z.z.string(),workflowId:z.z.string()}),V=z.z.object({type:z.z.literal("workflow.get.response"),payload:z.z.object({requestId:z.z.string(),workflow:E.nullable()})}),Y=z.z.object({type:z.z.literal("workflow.cancel.request"),requestId:z.z.string(),workflowId:z.z.string()}),Q=z.z.object({type:z.z.literal("workflow.cancel.response"),payload:z.z.object({requestId:z.z.string(),workflow:E})}),X=z.z.object({type:z.z.literal("workflow.events.request"),requestId:z.z.string(),workflowId:z.z.string()}),$=z.z.object({type:z.z.literal("workflow.events.response"),payload:z.z.object({requestId:z.z.string(),workflowId:z.z.string(),events:z.z.array(G)})}),J=z.z.object({id:z.z.string(),dependencies:z.z.array(z.z.string()),description:z.z.string(),prompt:z.z.string(),title:z.z.string(),outputFile:z.z.string(),parallelizable:z.z.boolean(),estimatedMinutes:z.z.number(),agentType:z.z.string().optional(),targetFiles:z.z.array(z.z.string()).optional()}),Z=z.z.object({goal:z.z.string(),masterPrompt:z.z.string(),metadata:z.z.object({executionLayers:z.z.array(z.z.array(z.z.string())),maxParallelism:z.z.number(),totalTasks:z.z.number(),estimatedDuration:z.z.number(),perFileMode:z.z.boolean(),storyFormat:z.z.boolean().optional(),totalFiles:z.z.number().optional()}),session:z.z.object({id:z.z.string(),createdAt:z.z.string(),outputDirectory:z.z.string()}),tasks:z.z.array(J)}),ee=z.z.object({type:z.z.literal("workflow.start.request"),requestId:z.z.string(),graph:Z,provider:z.z.string(),cwd:z.z.string(),model:z.z.string().optional(),title:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional()}),te=z.z.object({type:z.z.literal("workflow.start.response"),payload:z.z.object({requestId:z.z.string(),workflowId:z.z.string(),childAgentIds:z.z.array(z.z.string()),status:W})}),ne=z.z.object({id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),icon:z.z.string().optional(),colorTier:z.z.string().optional()}),re=z.z.enum(["ready","loading","error","unavailable"]),oe=z.z.object({id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),isDefault:z.z.boolean().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),ie=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("info"),message:z.z.string()}),z.z.object({type:z.z.literal("warning"),message:z.z.string()}),z.z.object({type:z.z.literal("error"),message:z.z.string()})]),ae=z.z.object({type:z.z.literal("toggle"),id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),tooltip:z.z.string().optional(),icon:z.z.string().optional(),value:z.z.boolean()}),se=z.z.object({type:z.z.literal("select"),id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),tooltip:z.z.string().optional(),icon:z.z.string().optional(),value:z.z.string().nullable(),options:z.z.array(oe)}),le=z.z.discriminatedUnion("type",[ae,se]),ce=z.z.object({provider:m.AgentProviderSchema,id:z.z.string(),label:z.z.string(),description:z.z.string().optional(),isDefault:z.z.boolean().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional(),contextWindowMaxTokens:z.z.number().optional(),thinkingOptions:z.z.array(oe).optional(),defaultThinkingOptionId:z.z.string().optional()}),ue=z.z.object({provider:m.AgentProviderSchema,status:re,enabled:z.z.boolean().optional().default(!0),error:z.z.string().optional(),models:z.z.array(ce).optional(),modes:z.z.array(ne).optional(),fetchedAt:z.z.string().optional(),label:z.z.string().optional(),description:z.z.string().optional(),defaultModeId:z.z.string().nullable().optional(),wireFamily:z.z.enum(["anthropic-messages","openai-compatible","generic-acp"]).optional(),compatibleProviders:z.z.array(z.z.string()).optional()}),ze=z.z.object({supportsStreaming:z.z.boolean(),supportsSessionPersistence:z.z.boolean(),supportsSessionListing:z.z.boolean().optional(),supportsDynamicModes:z.z.boolean(),supportsMcpServers:z.z.boolean(),supportsReasoningStream:z.z.boolean(),supportsToolInvocations:z.z.boolean(),supportsRewindConversation:z.z.boolean().optional().default(!1),supportsRewindFiles:z.z.boolean().optional().default(!1),supportsRewindBoth:z.z.boolean().optional().default(!1)}).catchall(z.z.boolean()),pe=z.z.object({inputTokens:z.z.number().optional(),cachedInputTokens:z.z.number().optional(),outputTokens:z.z.number().optional(),totalCostUsd:z.z.number().optional(),contextWindowMaxTokens:z.z.number().optional(),contextWindowUsedTokens:z.z.number().optional()}),ge=z.z.object({type:z.z.literal("stdio"),command:z.z.string(),args:z.z.array(z.z.string()).optional(),env:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),be=z.z.object({type:z.z.literal("http"),url:z.z.string(),headers:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),de=z.z.object({type:z.z.literal("sse"),url:z.z.string(),headers:z.z.record(z.z.string(),z.z.string()).optional(),alwaysLoad:z.z.boolean().optional()}),me=z.z.discriminatedUnion("type",[ge,be,de]),fe=z.z.object({provider:m.AgentProviderSchema,cwd:z.z.string(),modeId:z.z.string().optional(),model:z.z.string().optional(),thinkingOptionId:z.z.string().optional(),featureValues:z.z.record(z.z.string(),z.z.unknown()).optional(),title:z.z.string().trim().min(1).max(d.MAX_EXPLICIT_AGENT_TITLE_CHARS).optional().nullable(),approvalPolicy:z.z.string().optional(),sandboxMode:z.z.string().optional(),networkAccess:z.z.boolean().optional(),webSearch:z.z.boolean().optional(),extra:z.z.object({codex:z.z.record(z.z.string(),z.z.unknown()).optional(),claude:z.z.record(z.z.string(),z.z.unknown()).optional()}).partial().optional(),systemPrompt:z.z.string().optional(),mcpServers:z.z.record(z.z.string(),me).optional()}),ye=z.z.record(z.z.string(),z.z.unknown()),he=z.z.object({id:z.z.string(),label:z.z.string(),behavior:z.z.enum(["allow","deny"]),variant:z.z.enum(["primary","secondary","danger"]).optional(),intent:z.z.enum(["implement","implement_resume","dismiss"]).optional()}),je=z.z.discriminatedUnion("behavior",[z.z.object({behavior:z.z.literal("allow"),selectedActionId:z.z.string().optional(),updatedInput:z.z.record(z.z.string(),z.z.unknown()).optional(),updatedPermissions:z.z.array(ye).optional()}),z.z.object({behavior:z.z.literal("deny"),selectedActionId:z.z.string().optional(),message:z.z.string().optional(),interrupt:z.z.boolean().optional()})]),Se=z.z.object({id:z.z.string(),provider:m.AgentProviderSchema,name:z.z.string(),kind:z.z.enum(["tool","plan","question","mode","other"]),title:z.z.string().optional(),description:z.z.string().optional(),input:z.z.record(z.z.string(),z.z.unknown()).optional(),detail:z.z.lazy(()=>Oe).optional(),suggestions:z.z.array(ye).optional(),actions:z.z.array(he).optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Pe=z.z.union([z.z.null(),z.z.boolean(),z.z.number(),z.z.string(),z.z.array(z.z.unknown()),z.z.object({}).passthrough()]),_e=z.z.union([z.z.boolean(),z.z.number(),z.z.string(),z.z.array(z.z.unknown()),z.z.object({}).passthrough()]),qe=z.z.object({index:z.z.number().int().positive(),command:z.z.string(),cwd:z.z.string(),log:z.z.string().optional().default(""),status:z.z.enum(["running","completed","failed"]),exitCode:z.z.number().nullable(),durationMs:z.z.number().nonnegative().optional()}),Ie=z.z.object({type:z.z.literal("worktree_setup"),worktreePath:z.z.string(),branchName:z.z.string(),log:z.z.string(),commands:z.z.array(qe),truncated:z.z.boolean().optional()}),Oe=z.z.discriminatedUnion("type",[Ie,z.z.object({type:z.z.literal("shell"),command:z.z.string(),cwd:z.z.string().optional(),output:z.z.string().optional(),exitCode:z.z.number().nullable().optional()}),z.z.object({type:z.z.literal("read"),filePath:z.z.string(),content:z.z.string().optional(),offset:z.z.number().optional(),limit:z.z.number().optional()}),z.z.object({type:z.z.literal("edit"),filePath:z.z.string(),oldString:z.z.string().optional(),newString:z.z.string().optional(),unifiedDiff:z.z.string().optional()}),z.z.object({type:z.z.literal("write"),filePath:z.z.string(),content:z.z.string().optional()}),z.z.object({type:z.z.literal("search"),query:z.z.string(),toolName:z.z.enum(["search","grep","glob","web_search"]).optional(),content:z.z.string().optional(),filePaths:z.z.array(z.z.string()).optional(),webResults:z.z.array(z.z.object({title:z.z.string(),url:z.z.string()})).optional(),annotations:z.z.array(z.z.string()).optional(),numFiles:z.z.number().optional(),numMatches:z.z.number().optional(),durationMs:z.z.number().optional(),durationSeconds:z.z.number().optional(),truncated:z.z.boolean().optional(),mode:z.z.enum(["content","files_with_matches","count"]).optional()}),z.z.object({type:z.z.literal("fetch"),url:z.z.string(),prompt:z.z.string().optional(),result:z.z.string().optional(),code:z.z.number().optional(),codeText:z.z.string().optional(),bytes:z.z.number().optional(),durationMs:z.z.number().optional()}),z.z.object({type:z.z.literal("sub_agent"),subAgentType:z.z.string().optional(),description:z.z.string().optional(),childSessionId:z.z.string().optional(),log:z.z.string(),actions:z.z.array(z.z.object({index:z.z.number().int().positive(),toolName:z.z.string(),summary:z.z.string().optional()})).optional()}),z.z.object({type:z.z.literal("plain_text"),label:z.z.string().optional(),text:z.z.string().optional(),icon:z.z.enum(f.TOOL_CALL_ICON_NAMES).optional()}),z.z.object({type:z.z.literal("plan"),text:z.z.string()}),z.z.object({type:z.z.literal("unknown"),input:Pe,output:Pe})]),ke=z.z.object({type:z.z.literal("tool_call"),callId:z.z.string(),name:z.z.string(),detail:Oe,metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Re=ke.extend({status:z.z.literal("running"),error:z.z.null()}),we=ke.extend({status:z.z.literal("completed"),error:z.z.null()}),ve=ke.extend({status:z.z.literal("failed"),error:_e}),Ae=ke.extend({status:z.z.literal("canceled"),error:z.z.null()}),Me=z.z.discriminatedUnion("status",[Re,we,ve,Ae]),Ce=z.z.union([z.z.object({type:z.z.literal("user_message"),text:z.z.string(),messageId:z.z.string().optional()}),z.z.object({type:z.z.literal("assistant_message"),text:z.z.string(),messageId:z.z.string().optional()}),z.z.object({type:z.z.literal("reasoning"),text:z.z.string()}),Me,z.z.object({type:z.z.literal("todo"),items:z.z.array(z.z.object({text:z.z.string(),completed:z.z.boolean()}))}),z.z.object({type:z.z.literal("error"),message:z.z.string()}),z.z.object({type:z.z.literal("compaction"),status:z.z.enum(["loading","completed"]),trigger:z.z.enum(["auto","manual"]).optional(),preTokens:z.z.number().optional()})]),Te=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("thread_started"),sessionId:z.z.string(),provider:m.AgentProviderSchema}),z.z.object({type:z.z.literal("turn_started"),provider:m.AgentProviderSchema}),z.z.object({type:z.z.literal("turn_completed"),provider:m.AgentProviderSchema,usage:pe.optional()}),z.z.object({type:z.z.literal("turn_failed"),provider:m.AgentProviderSchema,error:z.z.string(),code:z.z.string().optional(),diagnostic:z.z.string().optional()}),z.z.object({type:z.z.literal("turn_canceled"),provider:m.AgentProviderSchema,reason:z.z.string()}),z.z.object({type:z.z.literal("timeline"),provider:m.AgentProviderSchema,item:Ce}),z.z.object({type:z.z.literal("permission_requested"),provider:m.AgentProviderSchema,request:Se}),z.z.object({type:z.z.literal("permission_resolved"),provider:m.AgentProviderSchema,requestId:z.z.string(),resolution:je}),z.z.object({type:z.z.literal("attention_required"),provider:m.AgentProviderSchema,reason:z.z.enum(["finished","error","permission"]),timestamp:z.z.string(),shouldNotify:z.z.boolean(),notification:z.z.object({title:z.z.string(),body:z.z.string(),data:z.z.object({serverId:z.z.string(),agentId:z.z.string(),reason:z.z.enum(["finished","error","permission"])})}).optional()})]),xe=z.z.object({provider:m.AgentProviderSchema,sessionId:z.z.string(),nativeHandle:z.z.string().optional(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}).nullable(),Le=z.z.object({provider:m.AgentProviderSchema,sessionId:z.z.string().nullable(),model:z.z.string().nullable().optional(),thinkingOptionId:z.z.string().nullable().optional(),modeId:z.z.string().nullable().optional(),extra:z.z.record(z.z.string(),z.z.unknown()).optional()}),We=z.z.object({kind:z.z.enum(["pr","mr","issue","deploy","preview","doc","other"]),url:z.z.string(),label:z.z.string().optional()}),De=z.z.object({goal:z.z.string().optional(),nextStep:z.z.string().optional(),blockers:z.z.array(z.z.string()).optional(),links:z.z.array(We).optional(),keyFiles:z.z.array(z.z.string()).optional(),summary:z.z.string().optional(),accomplishments:z.z.array(z.z.string()).optional(),selfReportedAt:z.z.string().optional(),generatedAt:z.z.string().optional(),derivedNextStep:z.z.string().optional(),derivedBlockers:z.z.array(z.z.string()).optional(),urgency:z.z.enum(["low","normal","high"]).optional(),deadline:z.z.string().optional(),derivedDeadline:z.z.string().optional()}),Ee=z.z.object({id:z.z.string(),provider:m.AgentProviderSchema,cwd:z.z.string(),workspaceId:z.z.string().optional(),model:z.z.string().nullable(),features:z.z.array(le).optional(),thinkingOptionId:z.z.string().nullable().optional(),effectiveThinkingOptionId:z.z.string().nullable().optional(),createdAt:z.z.string(),updatedAt:z.z.string(),lastUserMessageAt:z.z.string().nullable(),status:x,capabilities:ze,currentModeId:z.z.string().nullable(),availableModes:z.z.array(ne),pendingPermissions:z.z.array(Se),persistence:xe.nullable(),runtimeInfo:Le.optional(),lastUsage:pe.optional(),lastError:z.z.string().optional(),title:z.z.string().nullable(),labels:z.z.record(z.z.string(),z.z.string()).default({}),digest:De.optional(),requiresAttention:z.z.boolean().optional(),attentionReason:z.z.enum(["finished","error","permission"]).nullable().optional(),attentionTimestamp:z.z.string().nullable().optional(),archivedAt:z.z.string().nullable().optional(),activeBackgroundTaskCount:z.z.number().int().nonnegative().optional(),providerUnavailable:z.z.boolean().optional()}),Ne=z.z.object({id:z.z.string(),shortId:z.z.string(),title:z.z.string().nullable(),provider:m.AgentProviderSchema,model:z.z.string().nullable(),thinkingOptionId:z.z.string().nullable().optional(),effectiveThinkingOptionId:z.z.string().nullable().optional(),status:x,cwd:z.z.string(),createdAt:z.z.string(),updatedAt:z.z.string(),lastUserMessageAt:z.z.string().nullable(),archivedAt:z.z.string().nullable().optional(),requiresAttention:z.z.boolean().optional(),attentionReason:z.z.enum(["finished","error","permission"]).nullable().optional(),attentionTimestamp:z.z.string().nullable().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),digest:De.optional(),activeBackgroundTaskCount:z.z.number().int().nonnegative().optional(),providerUnavailable:z.z.boolean().optional()}),Ue=z.z.object({providerId:z.z.string(),providerLabel:z.z.string(),providerHandleId:z.z.string(),cwd:z.z.string(),title:z.z.string().nullable(),firstPromptPreview:z.z.string().nullable(),lastPromptPreview:z.z.string().nullable(),lastActivityAt:z.z.string()}),Fe=z.z.object({type:z.z.literal("voice_audio_chunk"),audio:z.z.string(),format:z.z.string(),isLast:z.z.boolean()}),Ge=z.z.object({type:z.z.literal("abort_request")}),Be=z.z.object({type:z.z.literal("audio_played"),id:z.z.string()}),He=z.z.object({labels:z.z.record(z.z.string(),z.z.string()).optional(),projectKeys:z.z.array(z.z.string()).optional(),statuses:z.z.array(x).optional(),includeArchived:z.z.boolean().optional(),requiresAttention:z.z.boolean().optional(),thinkingOptionId:z.z.string().nullable().optional()}),Ke=z.z.object({type:z.z.literal("delete_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Ve=z.z.object({type:z.z.literal("archive_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Ye=z.z.object({type:z.z.literal("dismiss_background_task_request"),agentId:z.z.string(),taskId:z.z.string(),requestId:z.z.string()}),Qe=z.z.object({type:z.z.literal("background_task_dismissed"),payload:z.z.object({agentId:z.z.string(),taskId:z.z.string(),dismissed:z.z.boolean(),requestId:z.z.string()})}),Xe=z.z.object({type:z.z.literal("close_items_request"),agentIds:z.z.array(z.z.string()).default([]),terminalIds:z.z.array(z.z.string()).default([]),requestId:z.z.string()}),$e=z.z.object({type:z.z.literal("update_agent_request"),agentId:z.z.string(),name:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional(),requestId:z.z.string()}),Je=z.z.object({type:z.z.literal("project.rename.request"),projectId:z.z.string(),customName:z.z.string().nullable(),requestId:z.z.string()}),Ze=z.z.object({type:z.z.literal("project.remove.request"),projectId:z.z.string(),requestId:z.z.string()}),et=z.z.object({type:z.z.literal("workspace.title.set.request"),workspaceId:z.z.string(),title:z.z.string().nullable(),requestId:z.z.string()}),tt=z.z.object({type:z.z.literal("set_voice_mode"),enabled:z.z.boolean(),agentId:z.z.string().optional(),requestId:z.z.string().optional()}),nt=z.z.object({type:z.z.literal("github_pr"),mimeType:z.z.literal("application/github-pr"),number:z.z.number().int().positive(),title:z.z.string(),url:z.z.string(),body:z.z.string().nullable().optional(),baseRefName:z.z.string().nullable().optional(),headRefName:z.z.string().nullable().optional()}),rt=z.z.object({type:z.z.literal("github_issue"),mimeType:z.z.literal("application/github-issue"),number:z.z.number().int().positive(),title:z.z.string(),url:z.z.string(),body:z.z.string().nullable().optional()}),ot=z.z.object({type:z.z.literal("text"),mimeType:z.z.literal("text/plain"),contextKind:z.z.string().optional(),title:z.z.string().nullable().optional(),text:z.z.string()}).transform(e=>{let{contextKind:t}=e,n=(0,u.default)(e,s);return Object.assign({},n,"chat_history"===t?{contextKind:t}:{})}),it=z.z.object({oldLineNumber:z.z.number().int().positive().nullable(),newLineNumber:z.z.number().int().positive().nullable(),type:z.z.enum(["add","remove","context"]),content:z.z.string()}),at=z.z.object({filePath:z.z.string(),side:z.z.enum(["old","new"]),lineNumber:z.z.number().int().positive(),body:z.z.string(),context:z.z.object({hunkHeader:z.z.string(),targetLine:it,lines:z.z.array(it)})}),st=z.z.object({type:z.z.literal("review"),mimeType:z.z.literal("application/paseo-review"),cwd:z.z.string(),mode:z.z.enum(["uncommitted","base"]),baseRef:z.z.string().nullable().optional(),comments:z.z.array(at)}),lt=z.z.object({type:z.z.literal("file"),name:z.z.string(),mimeType:z.z.string(),size:z.z.number().int().nonnegative(),fileId:z.z.string(),path:z.z.string()}),ct=z.z.object({type:z.z.literal("uploaded_file"),id:z.z.string(),fileName:z.z.string(),mimeType:z.z.string(),size:z.z.number().int().nonnegative(),path:z.z.string()}),ut=z.z.discriminatedUnion("type",[nt,rt,ot,st,lt,ct]);const zt=z.z.unknown().transform(function(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){const e=ut.safeParse(n);if(e.success){t.push(e.data);continue}const r="object"==typeof n&&null!==n&&"type"in n?String(n.type):"<missing>";console.warn(`[protocol] dropping unparseable agent attachment (type: ${r}):`,e.error.issues)}return t}).optional(),pt=z.z.object({data:z.z.string(),mimeType:z.z.string()}),gt=z.z.object({type:z.z.literal("send_agent_message"),agentId:z.z.string(),text:z.z.string(),messageId:z.z.string().optional(),images:z.z.array(pt).optional(),attachments:zt}),bt=z.z.object({type:z.z.literal("fetch_agents_request"),requestId:z.z.string(),scope:z.z.enum(["active"]).optional(),filter:He.optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","created_at","updated_at","title"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional(),subscribe:z.z.object({subscriptionId:z.z.string().optional()}).optional()}),dt=z.z.enum(["needs_input","failed","running","attention","done"]),mt=z.z.object({type:z.z.literal("fetch_workspaces_request"),requestId:z.z.string(),filter:z.z.object({query:z.z.string().optional(),projectId:z.z.string().optional(),idPrefix:z.z.string().optional()}).optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","activity_at","name","project_id"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional(),subscribe:z.z.object({subscriptionId:z.z.string().optional()}).optional()}),ft=z.z.object({type:z.z.literal("fetch_agent_history_request"),requestId:z.z.string(),filter:He.optional(),sort:z.z.array(z.z.object({key:z.z.enum(["status_priority","created_at","updated_at","title"]),direction:z.z.enum(["asc","desc"])})).optional(),page:z.z.object({limit:z.z.number().int().positive().max(200),cursor:z.z.string().min(1).optional()}).optional()}),yt=z.z.object({type:z.z.literal("fetch_recent_provider_sessions_request"),requestId:z.z.string(),cwd:z.z.string().optional(),providers:z.z.array(z.z.string()).optional(),since:z.z.string().optional(),limit:z.z.number().int().positive().max(200).optional()}),ht=z.z.object({type:z.z.literal("fetch_agent_request"),requestId:z.z.string(),agentId:z.z.string()}),jt=z.z.object({type:z.z.literal("send_agent_message_request"),requestId:z.z.string(),agentId:z.z.string(),text:z.z.string(),messageId:z.z.string().optional(),images:z.z.array(pt).optional(),attachments:zt}),St=z.z.object({type:z.z.literal("wait_for_finish_request"),requestId:z.z.string(),agentId:z.z.string(),timeoutMs:z.z.number().int().positive().optional()}),Pt=z.z.object({type:z.z.literal("daemon.get_status.request"),requestId:z.z.string()}),_t=z.z.object({type:z.z.literal("daemon.get_pairing_offer.request"),requestId:z.z.string()}),qt=z.z.object({type:z.z.literal("diagnostics.request"),requestId:z.z.string()}),It=z.z.object({type:z.z.literal("get_daemon_config_request"),requestId:z.z.string()}),Ot=z.z.object({type:z.z.literal("set_daemon_config_request"),requestId:z.z.string(),config:T}),kt=z.z.object({type:z.z.literal("read_project_config_request"),requestId:z.z.string(),repoRoot:z.z.string()}),Rt=z.z.object({type:z.z.literal("write_project_config_request"),requestId:z.z.string(),repoRoot:z.z.string(),config:q.PaseoConfigRawSchema,expectedRevision:q.PaseoConfigRevisionSchema.nullable()}),wt=z.z.object({type:z.z.literal("dictation_stream_start"),dictationId:z.z.string(),format:z.z.string()}),vt=z.z.object({type:z.z.literal("dictation_stream_chunk"),dictationId:z.z.string(),seq:z.z.number().int().nonnegative(),audio:z.z.string(),format:z.z.string()}),At=z.z.object({type:z.z.literal("dictation_stream_finish"),dictationId:z.z.string(),finalSeq:z.z.number().int().nonnegative()}),Mt=z.z.object({type:z.z.literal("dictation_stream_cancel"),dictationId:z.z.string()}),Ct=z.z.object({baseBranch:z.z.string().optional(),createNewBranch:z.z.boolean().optional(),newBranchName:z.z.string().optional(),createWorktree:z.z.boolean().optional(),worktreeSlug:z.z.string().optional(),refName:z.z.string().min(1).optional(),action:z.z.enum(["branch-off","checkout"]).optional(),githubPrNumber:z.z.number().int().positive().optional()}),Tt=z.z.discriminatedUnion("mode",[z.z.object({mode:z.z.literal("branch-off"),newBranch:z.z.string().min(1),base:z.z.string().min(1).optional()}),z.z.object({mode:z.z.literal("checkout-branch"),branch:z.z.string().min(1)}),z.z.object({mode:z.z.literal("checkout-pr"),prNumber:z.z.number().int().positive()})]),xt=z.z.object({type:z.z.literal("create_agent_request"),config:fe,env:z.z.record(z.z.string(),z.z.string()).optional(),workspaceId:z.z.string().optional(),worktreeName:z.z.string().optional(),initialPrompt:z.z.string().optional(),clientMessageId:z.z.string().optional(),outputSchema:z.z.record(z.z.string(),z.z.unknown()).optional(),images:z.z.array(pt).optional(),attachments:zt,git:Ct.optional(),worktree:Tt.optional(),autoArchive:z.z.boolean().optional(),labels:z.z.record(z.z.string(),z.z.string()).default({}),resumeSessionId:z.z.string().min(1).optional(),requestId:z.z.string()}),Lt=z.z.object({type:z.z.literal("list_provider_models_request"),provider:m.AgentProviderSchema,cwd:z.z.string().optional(),requestId:z.z.string()}),Wt=z.z.object({type:z.z.literal("list_provider_modes_request"),provider:m.AgentProviderSchema,cwd:z.z.string().optional(),requestId:z.z.string()}),Dt=z.z.object({type:z.z.literal("list_available_providers_request"),requestId:z.z.string()}),Et=z.z.object({type:z.z.literal("get_providers_snapshot_request"),cwd:z.z.string().optional(),requestId:z.z.string()}),Nt=z.z.object({type:z.z.literal("refresh_providers_snapshot_request"),cwd:z.z.string().optional(),providers:z.z.array(m.AgentProviderSchema).optional(),requestId:z.z.string()}),Ut=z.z.object({type:z.z.literal("provider_diagnostic_request"),provider:m.AgentProviderSchema,requestId:z.z.string()}),Ft=z.z.object({type:z.z.literal("provider.usage.list.request"),requestId:z.z.string()}),Gt=z.z.object({type:z.z.literal("resume_agent_request"),handle:xe,overrides:fe.partial().optional(),requestId:z.z.string()}),Bt=z.z.object({type:z.z.literal("import_agent_request"),provider:m.AgentProviderSchema.optional(),providerId:z.z.string().optional(),sessionId:z.z.string().optional(),providerHandleId:z.z.string().optional(),cwd:z.z.string().optional(),labels:z.z.record(z.z.string(),z.z.string()).optional(),requestId:z.z.string()}),Ht=z.z.object({type:z.z.literal("refresh_agent_request"),agentId:z.z.string(),requestId:z.z.string()}),Kt=z.z.object({type:z.z.literal("cancel_agent_request"),agentId:z.z.string(),requestId:z.z.string().optional()}),Vt=z.z.object({type:z.z.literal("restart_server_request"),reason:z.z.string().optional(),requestId:z.z.string()}),Yt=z.z.object({type:z.z.literal("shutdown_server_request"),requestId:z.z.string()}),Qt=z.z.object({type:z.z.literal("daemon.update.request"),requestId:z.z.string()}),Xt=z.z.object({epoch:z.z.string(),seq:z.z.number().int().nonnegative()}),$t=z.z.object({type:z.z.literal("fetch_agent_timeline_request"),agentId:z.z.string(),requestId:z.z.string(),direction:z.z.enum(["tail","before","after"]).optional(),cursor:Xt.optional(),limit:z.z.number().int().nonnegative().optional(),projection:z.z.enum(["projected","canonical"]).optional()}),Jt=z.z.object({type:z.z.literal("agent.fork_context.request"),agentId:z.z.string(),boundaryMessageId:z.z.string().optional(),requestId:z.z.string()}),Zt=z.z.object({type:z.z.literal("set_agent_mode_request"),agentId:z.z.string(),modeId:z.z.string(),requestId:z.z.string()}),en=z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable(),notice:ie.nullable().optional()}),tn=z.z.object({type:z.z.literal("set_agent_mode_response"),payload:en}),nn=z.z.object({type:z.z.literal("set_agent_model_request"),agentId:z.z.string(),modelId:z.z.string().nullable(),requestId:z.z.string()}),rn=z.z.object({type:z.z.literal("set_agent_model_response"),payload:en}),on=z.z.object({type:z.z.literal("swap_agent_provider_request"),requestId:z.z.string(),agentId:z.z.string(),newProviderId:z.z.string(),overrides:z.z.object({model:z.z.string().nullable().optional(),modeId:z.z.string().optional()}).optional()}),an=z.z.object({type:z.z.literal("swap_agent_provider_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable(),oldProvider:z.z.string().optional(),newProvider:z.z.string().optional()})}),sn=z.z.object({type:z.z.literal("agent_provider_swapped"),payload:z.z.object({agentId:z.z.string(),oldProvider:z.z.string(),newProvider:z.z.string(),timestamp:z.z.string()})}),ln=z.z.object({type:z.z.literal("set_agent_thinking_request"),agentId:z.z.string(),thinkingOptionId:z.z.string().nullable(),requestId:z.z.string()}),cn=z.z.object({type:z.z.literal("set_agent_thinking_response"),payload:en}),un=z.z.object({type:z.z.literal("set_agent_feature_request"),agentId:z.z.string(),featureId:z.z.string(),value:z.z.unknown(),requestId:z.z.string()}),zn=z.z.object({type:z.z.literal("set_agent_feature_response"),payload:en}),pn=z.z.object({type:z.z.literal("agent.detach.request"),agentId:z.z.string(),requestId:z.z.string()}),gn=z.z.object({type:z.z.literal("agent.detach.response"),payload:en}),bn=z.z.enum(["conversation","files","both"]),dn=z.z.object({type:z.z.literal("agent.rewind.request"),agentId:z.z.string(),messageId:z.z.string(),mode:bn,requestId:z.z.string()}),mn=z.z.object({type:z.z.literal("agent.rewind.response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),ok:z.z.boolean(),error:z.z.string().nullable()})}),fn=z.z.object({type:z.z.literal("update_agent_response"),payload:en}),yn=z.z.object({requestId:z.z.string(),projectId:z.z.string(),accepted:z.z.boolean(),customName:z.z.string().nullable(),error:z.z.string().nullable()}),hn=z.z.object({type:z.z.literal("project.rename.response"),payload:yn}),jn=z.z.object({requestId:z.z.string(),projectId:z.z.string(),accepted:z.z.boolean(),removedWorkspaceIds:z.z.array(z.z.string()).default([]),error:z.z.string().nullable()}),Sn=z.z.object({type:z.z.literal("project.remove.response"),payload:jn}),Pn=z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),accepted:z.z.boolean(),title:z.z.string().nullable(),error:z.z.string().nullable()}),_n=z.z.object({type:z.z.literal("workspace.title.set.response"),payload:Pn}),qn=z.z.object({type:z.z.literal("set_voice_mode_response"),payload:z.z.object({requestId:z.z.string(),enabled:z.z.boolean(),agentId:z.z.string().nullable(),accepted:z.z.boolean(),error:z.z.string().nullable(),reasonCode:z.z.string().optional(),retryable:z.z.boolean().optional(),missingModelIds:z.z.array(z.z.string()).optional()})}),In=z.z.object({type:z.z.literal("agent_permission_response"),agentId:z.z.string(),requestId:z.z.string(),response:je}),On=z.z.object({type:z.z.literal("watch.notificationAction"),notificationId:z.z.string(),action:z.z.enum(["approve","deny","reply"]),replyText:z.z.string().optional()}),kn=z.z.object({type:z.z.literal("watch.sessionSearch"),requestId:z.z.string(),query:z.z.string()}),Rn=z.z.object({type:z.z.literal("watch.composerDictate"),sessionId:z.z.string(),text:z.z.string()}),wn=z.z.enum(["NOT_GIT_REPO","NOT_ALLOWED","MERGE_CONFLICT","UNKNOWN"]),vn=z.z.object({code:wn,message:z.z.string()}),An=z.z.object({mode:z.z.enum(["uncommitted","base"]),baseRef:z.z.string().optional(),ignoreWhitespace:z.z.boolean().optional()}),Mn=z.z.object({type:z.z.literal("checkout_status_request"),cwd:z.z.string(),requestId:z.z.string()}),Cn=z.z.object({type:z.z.literal("subscribe_checkout_diff_request"),subscriptionId:z.z.string(),cwd:z.z.string(),compare:An,requestId:z.z.string()}),Tn=z.z.object({type:z.z.literal("unsubscribe_checkout_diff_request"),subscriptionId:z.z.string()}),xn=z.z.object({type:z.z.literal("checkout_commit_request"),cwd:z.z.string(),message:z.z.string().optional(),addAll:z.z.boolean().optional(),requestId:z.z.string()}),Ln=z.z.object({type:z.z.literal("checkout_merge_request"),cwd:z.z.string(),baseRef:z.z.string().optional(),strategy:z.z.enum(["merge","squash"]).optional(),requireCleanTarget:z.z.boolean().optional(),requestId:z.z.string()}),Wn=z.z.object({type:z.z.literal("checkout_merge_from_base_request"),cwd:z.z.string(),baseRef:z.z.string().optional(),requireCleanTarget:z.z.boolean().optional(),requestId:z.z.string()}),Dn=z.z.object({type:z.z.literal("checkout_pull_request"),cwd:z.z.string(),requestId:z.z.string()}),En=z.z.object({type:z.z.literal("checkout_push_request"),cwd:z.z.string(),requestId:z.z.string()}),Nn=z.z.object({type:z.z.literal("checkout.refresh.request"),cwd:z.z.string(),requestId:z.z.string()}),Un=z.z.object({type:z.z.literal("checkout_pr_create_request"),cwd:z.z.string(),title:z.z.string().optional(),body:z.z.string().optional(),baseRef:z.z.string().optional(),requestId:z.z.string()}),Fn=z.z.object({type:z.z.literal("checkout_pr_merge_request"),cwd:z.z.string(),mergeMethod:z.z.enum(["merge","squash","rebase"]),requestId:z.z.string()}),Gn=z.z.object({type:z.z.literal("checkout.github.set_auto_merge.request"),cwd:z.z.string(),enabled:z.z.boolean(),mergeMethod:z.z.enum(["merge","squash","rebase"]).optional(),requestId:z.z.string()}),Bn=z.z.enum(["too_large","checksum_mismatch","aborted","write_failed","unsupported"]),Hn=z.z.object({type:z.z.literal("files.upload.begin.request"),requestId:z.z.string(),agentId:z.z.string(),uploadId:z.z.string(),metadata:z.z.lazy(()=>y.FileBeginMetadataSchema)}),Kn=z.z.object({type:z.z.literal("files.upload.complete.request"),requestId:z.z.string(),uploadId:z.z.string(),totalChunks:z.z.number().int().nonnegative()}),Vn=z.z.object({type:z.z.literal("files.upload.chunk"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),chunkIndex:z.z.number().int().nonnegative(),data:z.z.string()})}),Yn=z.z.object({type:z.z.literal("files.upload.error"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),code:Bn,message:z.z.string().optional()})}),Qn=z.z.string().regex(/^[A-Za-z0-9._-]+$/),Xn=z.z.object({type:z.z.literal("checkout.github.get_check_details.request"),cwd:z.z.string(),repoOwner:Qn,repoName:Qn,checkRunId:z.z.number().int().positive(),workflowRunId:z.z.number().int().positive().optional(),requestId:z.z.string()}),$n=z.z.object({type:z.z.literal("checkout_pr_status_request"),cwd:z.z.string(),requestId:z.z.string()}),Jn=z.z.object({type:z.z.literal("pull_request_timeline_request"),cwd:z.z.string(),prNumber:z.z.number(),repoOwner:z.z.string(),repoName:z.z.string(),requestId:z.z.string()}),Zn=z.z.object({type:z.z.literal("validate_branch_request"),cwd:z.z.string(),branchName:z.z.string(),requestId:z.z.string()}),er=z.z.object({type:z.z.literal("checkout_switch_branch_request"),cwd:z.z.string(),branch:z.z.string(),requestId:z.z.string()}),tr=z.z.object({type:z.z.literal("checkout.rename_branch.request"),cwd:z.z.string(),branch:z.z.string(),requestId:z.z.string()}),nr=z.z.object({type:z.z.literal("stash_save_request"),cwd:z.z.string(),branch:z.z.string().optional(),requestId:z.z.string()}),rr=z.z.object({type:z.z.literal("stash_pop_request"),cwd:z.z.string(),stashIndex:z.z.number().int().min(0),requestId:z.z.string()}),or=z.z.object({type:z.z.literal("stash_list_request"),cwd:z.z.string(),paseoOnly:z.z.boolean().optional(),requestId:z.z.string()}),ir=z.z.object({type:z.z.literal("branch_suggestions_request"),cwd:z.z.string(),query:z.z.string().optional(),limit:z.z.number().int().min(1).max(200).optional(),requestId:z.z.string()}),ar=z.z.object({kind:z.z.enum(["issue","pr"]),number:z.z.number(),title:z.z.string(),url:z.z.string(),state:z.z.string(),body:z.z.string().nullable(),labels:z.z.array(z.z.string()),baseRefName:z.z.string().nullable().optional(),headRefName:z.z.string().nullable().optional(),updatedAt:z.z.string().optional()}),sr=z.z.enum(["github-issue","github-pr"]),lr=z.z.object({type:z.z.literal("github_search_request"),cwd:z.z.string(),query:z.z.string(),limit:z.z.number().int().min(1).max(50).optional(),kinds:z.z.array(sr).optional(),requestId:z.z.string()}),cr=z.z.object({type:z.z.literal("directory_suggestions_request"),query:z.z.string(),cwd:z.z.string().optional(),includeFiles:z.z.boolean().optional(),includeDirectories:z.z.boolean().optional(),matchMode:z.z.enum(["fuzzy","suffix"]).optional(),limit:z.z.number().int().min(1).max(100).optional(),requestId:z.z.string()}),ur=z.z.object({type:z.z.literal("paseo_worktree_list_request"),cwd:z.z.string().optional(),repoRoot:z.z.string().optional(),requestId:z.z.string()}),zr=z.z.object({type:z.z.literal("paseo_worktree_archive_request"),worktreePath:z.z.string().optional(),repoRoot:z.z.string().optional(),branchName:z.z.string().optional(),workspaceId:z.z.string().optional(),scope:z.z.enum(["workspace","worktree"]).optional().default("workspace"),deleteWorktreeFromDisk:z.z.boolean().optional().default(!1),requestId:z.z.string()}),pr=z.z.object({prompt:z.z.string().optional(),attachments:zt}),gr=z.z.object({type:z.z.literal("create_paseo_worktree_request"),cwd:z.z.string(),projectId:z.z.string().optional(),worktreeSlug:z.z.string().optional(),nameContext:z.z.string().optional(),attachments:zt.optional(),firstAgentContext:pr.optional(),refName:z.z.string().min(1).optional(),action:z.z.enum(["branch-off","checkout"]).optional(),githubPrNumber:z.z.number().int().positive().optional(),requestId:z.z.string()}),br=z.z.object({type:z.z.literal("workspace_setup_status_request"),workspaceId:z.z.string(),requestId:z.z.string()}),dr=["cursor","vscode","zed","finder","explorer","file-manager"],mr=[...dr,"webstorm"],fr=z.z.enum(mr),yr=z.z.enum(dr),hr=z.z.string().trim().min(1),jr=new Set(mr),Sr=new Set(dr);const Pr=z.z.object({id:hr,label:z.z.string()}),_r=z.z.object({type:z.z.literal("list_available_editors_request"),requestId:z.z.string()}),qr=z.z.object({type:z.z.literal("open_in_editor_request"),path:z.z.string(),editorId:z.z.string().trim().min(1),mode:z.z.enum(["open","reveal"]).optional(),cwd:z.z.string().optional(),requestId:z.z.string()}),Ir=z.z.object({type:z.z.literal("open_project_request"),cwd:z.z.string(),requestId:z.z.string()}),Or=z.z.object({type:z.z.literal("project.add.request"),cwd:z.z.string(),requestId:z.z.string()}),kr=z.z.object({type:z.z.literal("archive_workspace_request"),workspaceId:z.z.string(),requestId:z.z.string()}),Rr=z.z.object({type:z.z.literal("workspace.create.request"),requestId:z.z.string(),title:z.z.string().optional(),firstAgentContext:pr.optional(),source:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("directory"),path:z.z.string(),projectId:z.z.string().optional()}),z.z.object({kind:z.z.literal("worktree"),cwd:z.z.string().optional(),projectId:z.z.string().optional(),action:z.z.enum(["branch-off","checkout"]).optional(),refName:z.z.string().min(1).optional(),baseBranch:z.z.string().optional(),githubPrNumber:z.z.number().int().positive().optional(),worktreeSlug:z.z.string().optional()})])}),wr=z.z.object({type:z.z.literal("workspace.clear_attention.request"),workspaceId:z.z.union([z.z.string(),z.z.array(z.z.string())]),requestId:z.z.string()}),vr=z.z.object({text:z.z.string(),style:z.z.string().nullable()}),Ar=z.z.object({type:z.z.enum(["add","remove","context","header"]),content:z.z.string(),tokens:z.z.array(vr).optional()}),Mr=z.z.object({oldStart:z.z.number(),oldCount:z.z.number(),newStart:z.z.number(),newCount:z.z.number(),lines:z.z.array(Ar)}),Cr=z.z.object({path:z.z.string(),isNew:z.z.boolean(),isDeleted:z.z.boolean(),additions:z.z.number(),deletions:z.z.number(),hunks:z.z.array(Mr),status:z.z.enum(["ok","too_large","binary"]).optional()}),Tr=z.z.object({name:z.z.string(),path:z.z.string(),kind:z.z.enum(["file","directory"]),size:z.z.number(),modifiedAt:z.z.string()}),xr=z.z.object({path:z.z.string(),kind:z.z.enum(["text","image","binary"]),encoding:z.z.enum(["utf-8","base64","none"]),content:z.z.string().optional(),mimeType:z.z.string().optional(),size:z.z.number(),modifiedAt:z.z.string()}),Lr=z.z.object({path:z.z.string(),entries:z.z.array(Tr)}),Wr=z.z.object({type:z.z.literal("file_explorer_request"),cwd:z.z.string(),path:z.z.string().optional(),mode:z.z.enum(["list","file"]),requestId:z.z.string(),acceptBinary:z.z.boolean().optional()}),Dr=z.z.object({type:z.z.literal("project_icon_request"),cwd:z.z.string(),requestId:z.z.string()}),Er=z.z.object({type:z.z.literal("file_download_token_request"),cwd:z.z.string(),path:z.z.string(),requestId:z.z.string()}),Nr=z.z.object({type:z.z.literal("file.upload.request"),fileName:z.z.string().min(1),mimeType:z.z.string().min(1),size:z.z.number().int().nonnegative(),modifiedAt:z.z.string(),requestId:z.z.string()}),Ur=z.z.object({type:z.z.literal("clear_agent_attention"),agentId:z.z.union([z.z.string(),z.z.array(z.z.string())]),requestId:z.z.string().optional()}),Fr=z.z.object({type:z.z.literal("client_heartbeat"),deviceType:z.z.enum(["web","mobile"]),focusedAgentId:z.z.string().nullable(),focusedTerminalId:z.z.string().nullable().optional().default(null),lastActivityAt:z.z.string(),appVisible:z.z.boolean(),appVisibilityChangedAt:z.z.string().optional()}),Gr=z.z.object({type:z.z.literal("ping"),requestId:z.z.string(),clientSentAt:z.z.number().int().optional()}),Br=z.z.object({provider:m.AgentProviderSchema,cwd:z.z.string(),modeId:z.z.string().optional(),model:z.z.string().optional(),thinkingOptionId:z.z.string().optional(),featureValues:z.z.record(z.z.string(),z.z.unknown()).optional()}),Hr=z.z.object({type:z.z.literal("list_provider_features_request"),draftConfig:Br,requestId:z.z.string()}),Kr=z.z.object({type:z.z.literal("list_commands_request"),agentId:z.z.string(),draftConfig:Br.optional(),requestId:z.z.string()}),Vr=z.z.object({type:z.z.literal("register_push_token"),token:z.z.string()}),Yr=z.z.object({type:z.z.literal("rewind_session_request"),requestId:z.z.string(),agentId:z.z.string(),turnId:z.z.string()}),Qr=z.z.object({type:z.z.literal("rewind_session_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),newSessionId:z.z.string().optional(),linesCopied:z.z.number().int().nonnegative().optional(),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),Xr=z.z.object({type:z.z.literal("edit_message_request"),requestId:z.z.string(),agentId:z.z.string(),turnId:z.z.string(),newContent:z.z.string().optional()}),$r=z.z.object({type:z.z.literal("edit_message_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),newSessionId:z.z.string().optional(),linesCopied:z.z.number().int().nonnegative().optional(),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),Jr=z.z.object({type:z.z.literal("list_workspace_sessions_request"),requestId:z.z.string(),workspaceId:z.z.string()}),Zr=z.z.object({sid:z.z.string(),title:z.z.string().nullable(),lastActivity:z.z.string(),cwd:z.z.string(),agentName:z.z.string().nullable()}),eo=z.z.object({type:z.z.literal("list_workspace_sessions_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),sessions:z.z.array(Zr),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),to=z.z.object({type:z.z.literal("list_all_sessions_request"),requestId:z.z.string()}),no=z.z.object({sid:z.z.string(),title:z.z.string().nullable(),lastActivity:z.z.string(),cwd:z.z.string(),agentName:z.z.string().nullable()}),ro=z.z.object({type:z.z.literal("list_all_sessions_response"),payload:z.z.object({requestId:z.z.string(),sessions:z.z.array(no),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),oo=z.z.object({id:z.z.string(),title:z.z.string(),icon:z.z.string().optional()}),io=z.z.object({id:z.z.string(),title:z.z.string(),icon:z.z.string().optional(),command:z.z.string().optional(),view:z.z.string().optional(),order:z.z.number().optional()}),ao=z.z.object({id:z.z.string(),title:z.z.string(),location:z.z.enum(["sidebar","panel"]).optional(),ui:z.z.string(),uiUrl:z.z.string().optional()}),so=z.z.object({id:z.z.string(),name:z.z.string(),version:z.z.string(),commands:z.z.array(oo),sidebarItems:z.z.array(io),views:z.z.array(ao)}),lo=z.z.object({type:z.z.literal("extensions.list.request"),requestId:z.z.string()}),co=z.z.object({type:z.z.literal("extensions.list.response"),payload:z.z.object({requestId:z.z.string(),extensions:z.z.array(so),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),uo=z.z.object({type:z.z.literal("extensions.command.execute.request"),requestId:z.z.string(),commandId:z.z.string(),args:z.z.array(z.z.unknown()).optional()}),zo=z.z.object({type:z.z.literal("extensions.command.execute.response"),payload:z.z.object({requestId:z.z.string(),ok:z.z.boolean(),result:z.z.unknown().optional(),error:z.z.string().optional()})}),po=z.z.object({type:z.z.literal("search_sessions_request"),requestId:z.z.string(),query:z.z.string(),limit:z.z.number().int().positive().optional(),sources:z.z.array(z.z.string()).optional()}),go=z.z.object({sid:z.z.string(),source:z.z.string(),cwd:z.z.string(),timestamp:z.z.string(),snippet:z.z.string(),resumeCommand:z.z.string()}),bo=z.z.object({type:z.z.literal("search_sessions_response"),payload:z.z.object({requestId:z.z.string(),query:z.z.string(),results:z.z.array(go),error:z.z.string().optional(),errorCode:z.z.string().optional()})}),mo=z.z.object({endpoint:z.z.string(),keys:z.z.object({p256dh:z.z.string(),auth:z.z.string()}),expirationTime:z.z.union([z.z.number(),z.z.null()]).optional()}),fo=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("expo"),token:z.z.string().min(1)}),z.z.object({type:z.z.literal("web"),subscription:mo})]),yo=z.z.object({type:z.z.literal("subscribe_push_request"),requestId:z.z.string(),subscription:fo}),ho=z.z.object({type:z.z.literal("subscribe_push_response"),payload:z.z.object({requestId:z.z.string(),ok:z.z.boolean(),error:z.z.string().optional(),errorCode:z.z.string().optional(),vapidPublicKey:z.z.string().optional()})}),jo=z.z.object({type:z.z.literal("get_vapid_public_key_request"),requestId:z.z.string()}),So=z.z.object({type:z.z.literal("get_vapid_public_key_response"),payload:z.z.object({requestId:z.z.string(),publicKey:z.z.string().nullable(),error:z.z.string().optional()})}),Po=z.z.object({type:z.z.literal("list_terminals_request"),cwd:z.z.string().optional(),workspaceId:z.z.string().optional(),requestId:z.z.string()}),_o=z.z.object({type:z.z.literal("subscribe_terminals_request"),cwd:z.z.string(),workspaceId:z.z.string().optional()}),qo=z.z.object({type:z.z.literal("unsubscribe_terminals_request"),cwd:z.z.string(),workspaceId:z.z.string().optional()}),Io=z.z.object({type:z.z.literal("create_terminal_request"),cwd:z.z.string(),workspaceId:z.z.string().optional(),name:z.z.string().optional(),agentId:z.z.string().optional(),command:z.z.string().optional(),args:z.z.array(z.z.string()).optional(),requestId:z.z.string()}),Oo=z.z.object({type:z.z.literal("terminal.rename.request"),terminalId:z.z.string(),title:z.z.string(),requestId:z.z.string()}),ko=z.z.object({type:z.z.literal("start_workspace_script_request"),workspaceId:z.z.string(),scriptName:z.z.string(),requestId:z.z.string()}),Ro=z.z.object({type:z.z.literal("subscribe_terminal_request"),terminalId:z.z.string(),requestId:z.z.string(),restore:z.z.object({mode:z.z.enum(["live","visible-snapshot","full-snapshot"]),scrollbackLines:z.z.number().int().nonnegative().optional(),size:z.z.object({rows:z.z.number().int().positive(),cols:z.z.number().int().positive()}).optional()}).optional()}),wo=z.z.object({type:z.z.literal("unsubscribe_terminal_request"),terminalId:z.z.string()}),vo=z.z.discriminatedUnion("type",[z.z.object({type:z.z.literal("input"),data:z.z.string()}),z.z.object({type:z.z.literal("resize"),rows:z.z.number(),cols:z.z.number()}),z.z.object({type:z.z.literal("mouse"),row:z.z.number(),col:z.z.number(),button:z.z.number(),action:z.z.enum(["down","up","move"])})]),Ao=z.z.object({type:z.z.literal("terminal_input"),terminalId:z.z.string(),message:vo}),Mo=z.z.object({type:z.z.literal("kill_terminal_request"),terminalId:z.z.string(),requestId:z.z.string()}),Co=z.z.object({type:z.z.literal("capture_terminal_request"),terminalId:z.z.string(),start:z.z.number().int().optional(),end:z.z.number().int().optional(),stripAnsi:z.z.boolean().default(!0),requestId:z.z.string()}),To=z.z.discriminatedUnion("type",[P.BrowserAutomationExecuteResponseSchema,Fe,Ge,Be,bt,ft,yt,mt,ht,Ke,Ve,Ye,Xe,$e,Je,Ze,et,tt,jt,St,Pt,_t,B,K,Y,X,ee,qt,It,Ot,kt,Rt,wt,vt,At,Mt,xt,Lt,Wt,Hr,Dt,Et,Nt,Ut,Ft,Gt,Bt,Ht,Kt,Yt,Vt,Qt,$t,Jt,Zt,nn,on,ln,un,pn,dn,In,Mn,Cn,Tn,xn,Ln,Wn,Dn,En,Nn,Un,Fn,Gn,Hn,Kn,Vn,Yn,Xn,$n,Jn,er,tr,nr,rr,or,Zn,ir,lr,cr,ur,zr,gr,br,_r,qr,Ir,Or,kr,Rr,wr,Wr,Dr,Er,Nr,Ur,Fr,Gr,Kr,Vr,Yr,Xr,Jr,to,lo,uo,po,yo,jo,Po,_o,qo,Io,Oo,ko,Ro,wo,Ao,Mo,Co,h.ChatCreateRequestSchema,h.ChatListRequestSchema,h.ChatInspectRequestSchema,h.ChatDeleteRequestSchema,h.ChatPostRequestSchema,h.ChatReadRequestSchema,h.ChatWaitRequestSchema,j.ScheduleCreateRequestSchema,j.ScheduleListRequestSchema,j.ScheduleInspectRequestSchema,j.ScheduleLogsRequestSchema,j.SchedulePauseRequestSchema,j.ScheduleResumeRequestSchema,j.ScheduleDeleteRequestSchema,j.ScheduleRunOnceRequestSchema,j.ScheduleUpdateRequestSchema,S.LoopRunRequestSchema,S.LoopListRequestSchema,S.LoopInspectRequestSchema,S.LoopLogsRequestSchema,S.LoopStopRequestSchema,On,kn,Rn]),xo=z.z.object({id:z.z.string(),timestamp:z.z.coerce.date(),type:z.z.enum(["transcript","assistant","tool_call","tool_result","error","system"]),content:z.z.string(),metadata:z.z.record(z.z.string(),z.z.unknown()).optional()}),Lo=z.z.object({type:z.z.literal("activity_log"),payload:xo}),Wo=z.z.object({type:z.z.literal("assistant_chunk"),payload:z.z.object({chunk:z.z.string()})}),Do=z.z.object({type:z.z.literal("audio_output"),payload:z.z.object({audio:z.z.string(),format:z.z.string(),id:z.z.string(),isVoiceMode:z.z.boolean(),groupId:z.z.string().optional(),chunkIndex:z.z.number().int().nonnegative().optional(),isLastChunk:z.z.boolean().optional()})}),Eo=z.z.object({type:z.z.literal("transcription_result"),payload:z.z.object({text:z.z.string(),language:z.z.string().optional(),duration:z.z.number().optional(),requestId:z.z.string(),avgLogprob:z.z.number().optional(),isLowConfidence:z.z.boolean().optional(),byteLength:z.z.number().optional(),format:z.z.string().optional(),debugRecordingPath:z.z.string().optional()})}),No=z.z.object({type:z.z.literal("voice_input_state"),payload:z.z.object({isSpeaking:z.z.boolean()})}),Uo=z.z.object({type:z.z.literal("dictation_stream_ack"),payload:z.z.object({dictationId:z.z.string(),ackSeq:z.z.number().int()})}),Fo=z.z.object({type:z.z.literal("dictation_stream_finish_accepted"),payload:z.z.object({dictationId:z.z.string(),timeoutMs:z.z.number().int().positive()})}),Go=z.z.object({type:z.z.literal("dictation_stream_partial"),payload:z.z.object({dictationId:z.z.string(),text:z.z.string()})}),Bo=z.z.object({type:z.z.literal("dictation_stream_final"),payload:z.z.object({dictationId:z.z.string(),text:z.z.string(),debugRecordingPath:z.z.string().optional()})}),Ho=z.z.object({type:z.z.literal("dictation_stream_error"),payload:z.z.object({dictationId:z.z.string(),error:z.z.string(),retryable:z.z.boolean(),reasonCode:z.z.string().optional(),missingModelIds:z.z.array(z.z.string()).optional(),debugRecordingPath:z.z.string().optional()})}),Ko=z.z.object({enabled:z.z.boolean(),reason:z.z.string()}),Vo=z.z.object({dictation:Ko,voice:Ko}),Yo=z.z.object({voice:Vo.optional()}).passthrough(),Qo=z.z.unknown().transform(e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}),Xo=z.z.unknown().transform(e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null}),$o=z.z.unknown().optional().transform(e=>{if(void 0===e)return;const t=Yo.safeParse(e);return t.success?t.data:void 0}),Jo=z.z.object({status:z.z.literal("server_info"),serverId:z.z.string().trim().min(1),hostname:Qo.optional(),version:Xo.optional(),capabilities:$o.optional(),features:z.z.object({providersSnapshot:z.z.boolean().optional(),checkoutGithubSetAutoMerge:z.z.boolean().optional(),githubCheckDetails:z.z.boolean().optional(),daemonStatusRpc:z.z.boolean().optional(),"terminal-restore-modes":z.z.boolean().optional(),rewind:z.z.boolean().optional(),checkoutRefresh:z.z.boolean().optional(),recallSearch:z.z.boolean().optional(),fileUploads:z.z.boolean().optional(),sessionsListRpc:z.z.boolean().optional(),workflows:z.z.boolean().optional(),extensions:z.z.boolean().optional(),sessionDigest:z.z.boolean().optional(),workspaceMultiplicity:z.z.boolean().optional(),projectRemove:z.z.boolean().optional(),projectAdd:z.z.boolean().optional(),worktreeRestore:z.z.boolean().optional(),providerUsageList:z.z.boolean().optional(),agentDetach:z.z.boolean().optional(),daemonDiagnostics:z.z.boolean().optional(),daemonSelfUpdate:z.z.boolean().optional(),agentForkContext:z.z.boolean().optional(),meetingsLiveCapture:z.z.boolean().optional(),kanbanBoardConfig:z.z.boolean().optional()}).optional()}).passthrough().transform(e=>Object.assign({},e,{hostname:e.hostname??null,version:e.version??null})),Zo=z.z.object({type:z.z.literal("status"),payload:z.z.object({status:z.z.string()}).passthrough()}),ei=z.z.object({type:z.z.literal("pong"),payload:z.z.object({requestId:z.z.string(),clientSentAt:z.z.number().int().optional(),serverReceivedAt:z.z.number().int(),serverSentAt:z.z.number().int()})}),ti=z.z.object({type:z.z.literal("rpc_error"),payload:z.z.object({requestId:z.z.string(),requestType:z.z.string().optional(),error:z.z.string(),code:z.z.string().optional()})}),ni=z.z.object({agentId:z.z.string(),requestId:z.z.string()}),ri=ni.extend({timelineSize:z.z.number().optional()}),oi=z.z.object({status:z.z.literal("agent_created"),agent:Ee}).extend(ni.shape),ii=z.z.object({status:z.z.literal("agent_create_failed"),requestId:z.z.string(),error:z.z.string(),errorCode:z.z.string().optional()}),ai=z.z.object({status:z.z.literal("agent_resumed"),agent:Ee}).extend(ri.shape),si=z.z.object({status:z.z.literal("agent_refreshed")}).extend(ri.shape),li=z.z.object({status:z.z.literal("restart_requested"),clientId:z.z.string(),reason:z.z.string().optional(),requestId:z.z.string()}),ci=z.z.object({status:z.z.literal("shutdown_requested"),clientId:z.z.string(),requestId:z.z.string()}),ui=z.z.object({status:z.z.literal("daemon_config_changed"),config:C}).passthrough(),zi=z.z.discriminatedUnion("status",[oi,ii,ai,si,ci,li,ui]),pi=z.z.object({type:z.z.literal("artifact"),payload:z.z.object({type:z.z.enum(["markdown","diff","image","code"]),id:z.z.string(),title:z.z.string(),content:z.z.string(),isBase64:z.z.boolean()})}),gi=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!1),currentBranch:z.z.null(),remoteUrl:z.z.null(),worktreeRoot:z.z.null().optional(),isPaseoOwnedWorktree:z.z.literal(!1),mainRepoRoot:z.z.null()}).transform(e=>Object.assign({},e,{worktreeRoot:null})),bi=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!0),currentBranch:z.z.string().nullable(),remoteUrl:z.z.string().nullable(),worktreeRoot:z.z.string().optional(),isPaseoOwnedWorktree:z.z.literal(!1),mainRepoRoot:z.z.string().nullable().optional().default(null)}).transform(e=>Object.assign({},e,{worktreeRoot:e.worktreeRoot??e.cwd})),di=z.z.object({cwd:z.z.string(),isGit:z.z.literal(!0),currentBranch:z.z.string().nullable(),remoteUrl:z.z.string().nullable(),worktreeRoot:z.z.string().optional(),isPaseoOwnedWorktree:z.z.literal(!0),mainRepoRoot:z.z.string()}).transform(e=>Object.assign({},e,{worktreeRoot:e.worktreeRoot??e.cwd})),mi=z.z.union([gi,bi,di]),fi=z.z.object({projectKey:z.z.string(),projectName:z.z.string(),workspaceName:z.z.string().nullable().optional(),checkout:mi}),yi=z.z.enum(["running","stopped"]),hi=z.z.enum(["healthy","unhealthy"]),ji=z.z.object({scriptName:z.z.string(),type:z.z.enum(["script","service"]).optional().default("service"),hostname:z.z.string(),port:z.z.number().int().positive().nullable(),localProxyUrl:z.z.string().nullable().optional(),publicProxyUrl:z.z.string().nullable().optional(),proxyUrl:z.z.string().nullable().optional().default(null),lifecycle:yi,health:hi.nullable(),exitCode:z.z.number().nullable().optional().default(null),terminalId:z.z.string().nullable().optional().default(null)}),Si=z.z.object({currentBranch:z.z.string().nullable().optional(),remoteUrl:z.z.string().nullable().optional(),isPaseoOwnedWorktree:z.z.boolean().optional(),isDirty:z.z.boolean().nullable().optional(),aheadBehind:z.z.object({ahead:z.z.number(),behind:z.z.number()}).nullable().optional(),aheadOfOrigin:z.z.number().nullable().optional(),behindOfOrigin:z.z.number().nullable().optional()}).optional().nullable(),Pi=z.z.object({featuresEnabled:z.z.boolean().optional(),pullRequest:z.z.object({number:z.z.number().optional(),url:z.z.string(),title:z.z.string(),state:z.z.string(),baseRefName:z.z.string(),headRefName:z.z.string(),isMerged:z.z.boolean(),isDraft:z.z.boolean().optional(),mergeable:z.z.enum(["MERGEABLE","CONFLICTING","UNKNOWN"]).catch("UNKNOWN").optional(),checks:z.z.array(z.z.object({name:z.z.string(),status:z.z.enum(["success","failure","pending","skipped","cancelled"]),url:z.z.string().nullable(),workflow:z.z.string().optional(),duration:z.z.string().optional()})).optional(),checksStatus:z.z.enum(["none","pending","success","failure"]).optional(),reviewDecision:z.z.enum(["approved","changes_requested","pending"]).nullable().optional(),repoOwner:z.z.string().optional(),repoName:z.z.string().optional(),github:z.z.unknown().optional()}).nullable().optional(),error:z.z.object({message:z.z.string()}).nullable().optional(),refreshedAt:z.z.string().nullable().optional()}).optional().nullable(),_i=z.z.object({id:z.z.string(),projectId:z.z.string(),projectDisplayName:z.z.string(),projectCustomName:z.z.string().nullable().optional(),projectRootPath:z.z.string(),workspaceDirectory:z.z.string().optional(),projectKind:z.z.enum(["git","non_git","directory"]),workspaceKind:z.z.enum(["directory","local_checkout","checkout","worktree"]),name:z.z.string(),title:z.z.string().nullable().optional(),archivingAt:z.z.string().nullable().optional().default(null),status:dt,statusEnteredAt:z.z.string().nullish().transform(e=>e??null),activityAt:z.z.string().nullable(),diffStat:z.z.object({additions:z.z.number(),deletions:z.z.number()}).nullable().optional(),scripts:z.z.array(ji).default([]),gitRuntime:Si,githubRuntime:Pi,project:fi.optional()}).transform(e=>Object.assign({},e,{workspaceDirectory:e.workspaceDirectory??e.projectRootPath})),qi=z.z.object({type:z.z.literal("agent_update"),payload:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("upsert"),agent:Ee,project:fi.nullable().optional()}),z.z.object({kind:z.z.literal("remove"),agentId:z.z.string()})])}),Ii=z.z.object({type:z.z.literal("open_url"),payload:z.z.object({url:z.z.string(),agentId:z.z.string().optional()})}),Oi=z.z.object({type:z.z.literal("agent_stream"),payload:z.z.object({agentId:z.z.string(),event:Te,timestamp:z.z.string(),seq:z.z.number().int().nonnegative().optional(),epoch:z.z.string().optional()})}),ki=z.z.object({type:z.z.literal("agent_status"),payload:z.z.object({agentId:z.z.string(),status:z.z.string(),info:Ee})}),Ri=z.z.object({type:z.z.literal("agent_list"),payload:z.z.object({agents:z.z.array(Ee)})}),wi=z.z.object({agent:Ee,project:fi}),vi=z.z.object({nextCursor:z.z.string().nullable(),prevCursor:z.z.string().nullable(),hasMore:z.z.boolean()}),Ai=z.z.object({type:z.z.literal("fetch_agents_response"),payload:z.z.object({requestId:z.z.string(),subscriptionId:z.z.string().nullable().optional(),entries:z.z.array(wi),pageInfo:vi})}),Mi=z.z.object({type:z.z.literal("fetch_agent_history_response"),payload:z.z.object({requestId:z.z.string(),entries:z.z.array(wi),pageInfo:vi})}),Ci=z.z.object({type:z.z.literal("fetch_recent_provider_sessions_response"),payload:z.z.object({requestId:z.z.string(),entries:z.z.array(Ue),filteredAlreadyImportedCount:z.z.number().int().nonnegative().optional()})}),Ti=z.z.object({projectId:z.z.string(),projectDisplayName:z.z.string(),projectCustomName:z.z.string().nullable().optional(),projectRootPath:z.z.string(),projectKind:z.z.enum(["git","non_git","directory"])}),xi=z.z.object({type:z.z.literal("fetch_workspaces_response"),payload:z.z.object({requestId:z.z.string(),subscriptionId:z.z.string().nullable().optional(),entries:z.z.array(_i),emptyProjects:z.z.array(Ti).optional().default([]),pageInfo:z.z.object({nextCursor:z.z.string().nullable(),prevCursor:z.z.string().nullable(),hasMore:z.z.boolean()})})}),Li=z.z.object({type:z.z.literal("workspace_update"),payload:z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("upsert"),workspace:_i}),z.z.object({kind:z.z.literal("remove"),id:z.z.string(),emptyProject:Ti.optional(),removedProjectId:z.z.string().optional()})])}),Wi=z.z.object({type:z.z.literal("script_status_update"),payload:z.z.object({workspaceId:z.z.string(),scripts:z.z.array(ji)})}),Di=z.z.object({type:z.z.literal("workspace_setup_progress"),payload:z.z.object({workspaceId:z.z.string(),status:z.z.enum(["running","completed","failed"]),detail:Ie,error:z.z.string().nullable()})}),Ei=z.z.object({status:z.z.enum(["running","completed","failed"]),detail:Ie,error:z.z.string().nullable()}),Ni=z.z.object({type:z.z.literal("workspace_setup_status_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),snapshot:Ei.nullable()})}),Ui=z.z.object({type:z.z.literal("open_project_response"),payload:z.z.object({requestId:z.z.string(),workspace:_i.nullable(),error:z.z.string().nullable(),errorCode:z.z.enum(["directory_not_found"]).nullish().catch(null)})}),Fi=z.z.object({type:z.z.literal("project.add.response"),payload:z.z.object({requestId:z.z.string(),project:Ti.nullable(),error:z.z.string().nullable(),errorCode:z.z.enum(["directory_not_found"]).nullish().catch(null)})}),Gi=z.z.object({type:z.z.literal("start_workspace_script_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),scriptName:z.z.string(),terminalId:z.z.string().nullable(),error:z.z.string().nullable()})}),Bi=z.z.object({type:z.z.literal("list_available_editors_response"),payload:z.z.object({requestId:z.z.string(),editors:z.z.array(z.z.object({id:z.z.string().trim().min(1),label:z.z.string()})),error:z.z.string().nullable()})}),Hi=z.z.object({type:z.z.literal("open_in_editor_response"),payload:z.z.object({requestId:z.z.string(),error:z.z.string().nullable()})}),Ki=z.z.object({type:z.z.literal("archive_workspace_response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.string(),archivedAt:z.z.string().nullable(),error:z.z.string().nullable()})}),Vi=z.z.object({type:z.z.literal("fetch_agent_response"),payload:z.z.object({requestId:z.z.string(),agent:Ee.nullable(),project:fi.nullable().optional(),error:z.z.string().nullable()})}),Yi=z.z.object({startSeq:z.z.number().int().nonnegative(),endSeq:z.z.number().int().nonnegative()}),Qi=z.z.object({provider:m.AgentProviderSchema,item:Ce,timestamp:z.z.string(),seqStart:z.z.number().int().nonnegative(),seqEnd:z.z.number().int().nonnegative(),sourceSeqRanges:z.z.array(Yi),collapsed:z.z.array(z.z.enum(["assistant_merge","reasoning_merge","tool_lifecycle"]))}),Xi=z.z.object({type:z.z.literal("fetch_agent_timeline_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),agent:Ee.nullable(),direction:z.z.enum(["tail","before","after"]),projection:z.z.enum(["projected","canonical"]),epoch:z.z.string(),reset:z.z.boolean(),staleCursor:z.z.boolean(),gap:z.z.boolean(),window:z.z.object({minSeq:z.z.number().int().nonnegative(),maxSeq:z.z.number().int().nonnegative(),nextSeq:z.z.number().int().nonnegative()}),startCursor:Xt.nullable(),endCursor:Xt.nullable(),hasOlder:z.z.boolean(),hasNewer:z.z.boolean(),entries:z.z.array(Qi),error:z.z.string().nullable()})}),$i=z.z.object({type:z.z.literal("agent.fork_context.response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),attachment:ot.nullable(),itemCount:z.z.number().int().nonnegative(),boundaryMessageId:z.z.string().nullable(),error:z.z.string().nullable()})}),Ji=z.z.object({type:z.z.literal("cancel_agent_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),agent:Ee.nullable()})}),Zi=z.z.object({type:z.z.literal("clear_agent_attention_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string().or(z.z.array(z.z.string())),agents:z.z.array(Ee)})}),ea=z.z.object({type:z.z.literal("workspace.create.response"),payload:z.z.object({workspace:_i.nullable(),setupTerminalId:z.z.string().nullable(),error:z.z.string().nullable(),errorCode:z.z.string().optional(),requestId:z.z.string()})}),ta=z.z.object({type:z.z.literal("workspace.clear_attention.response"),payload:z.z.object({requestId:z.z.string(),workspaceId:z.z.union([z.z.string(),z.z.array(z.z.string())]),clearedAgentIds:z.z.array(z.z.string()),results:z.z.array(z.z.object({workspaceId:z.z.string(),clearedAgentIds:z.z.array(z.z.string()),success:z.z.boolean(),error:z.z.string().nullable()})),success:z.z.boolean(),error:z.z.string().nullable()})}),na=z.z.object({type:z.z.literal("send_agent_message_response"),payload:z.z.object({requestId:z.z.string(),agentId:z.z.string(),accepted:z.z.boolean(),error:z.z.string().nullable()})}),ra=z.z.object({type:z.z.literal("wait_for_finish_response"),payload:z.z.object({requestId:z.z.string(),status:z.z.enum(["idle","error","permission","timeout"]),final:Ee.nullable(),error:z.z.string().nullable(),lastMessage:z.z.string().nullable()})}),oa=z.z.object({type:z.z.literal("get_daemon_config_response"),payload:z.z.object({requestId:z.z.string(),config:C}).passthrough()}),ia=z.z.object({type:z.z.literal("daemon.get_status.response"),payload:z.z.object({requestId:z.z.string(),serverId:z.z.string(),version:z.z.string().nullable().optional(),pid:z.z.number(),nodePath:z.z.string(),startedAt:z.z.string().nullable().optional(),listen:z.z.string().nullable(),relay:z.z.object({enabled:z.z.boolean(),endpoint:z.z.string(),publicEndpoint:z.z.string(),useTls:z.z.boolean(),publicUseTls:z.z.boolean()}).nullable().optional(),providers:z.z.array(z.z.object({provider:z.z.string(),available:z.z.boolean(),error:z.z.string().nullable().optional()}))}).passthrough()}),aa=z.z.object({type:z.z.literal("daemon.get_pairing_offer.response"),payload:z.z.object({requestId:z.z.string(),url:z.z.string(),qr:z.z.string().nullable().optional(),relayEnabled:z.z.boolean()}).passthrough()}),sa=z.z.object({type:z.z.literal("diagnostics.response"),payload:z.z.object({requestId:z.z.string(),diagnostic:z.z.string()}).passthrough()}),la=z.z.object({type:z.z.literal("set_daemon_config_response"),payload:z.z.object({requestId:z.z.string(),config:C}).passthrough()}),ca=z.z.object({type:z.z.literal("read_project_config_response"),payload:z.z.union([z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!0),config:q.PaseoConfigRawSchema.nullable(),revision:q.PaseoConfigRevisionSchema.nullable()}),z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!1),error:q.ProjectConfigRpcErrorSchema})])}),ua=z.z.object({type:z.z.literal("write_project_config_response"),payload:z.z.union([z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!0),config:q.PaseoConfigRawSchema,revision:q.PaseoConfigRevisionSchema}),z.z.object({requestId:z.z.string(),repoRoot:z.z.string(),ok:z.z.literal(!1),error:q.ProjectConfigRpcErrorSchema})])}),za=z.z.object({type:z.z.literal("agent_permission_request"),payload:z.z.object({agentId:z.z.string(),request:Se})}),pa=z.z.object({id:z.z.string(),label:z.z.string(),action:z.z.enum(["approve","deny","reply"])}),ga=z.z.object({type:z.z.literal("watch.actionablePush"),notificationId:z.z.string(),sessionId:z.z.string(),kind:z.z.string(),summary:z.z.string(),actions:z.z.array(pa)}),ba=z.z.object({type:z.z.literal("watch.actionableResolved"),notificationId:z.z.string()}),da=z.z.object({id:z.z.string(),title:z.z.string(),lastActivity:z.z.string(),snippet:z.z.string()}),ma=z.z.object({type:z.z.literal("watch.sessionSearchResult"),requestId:z.z.string(),results:z.z.array(da),error:z.z.string().optional()}),fa=z.z.object({type:z.z.literal("agent_permission_resolved"),payload:z.z.object({agentId:z.z.string(),requestId:z.z.string(),resolution:je})}),ya=z.z.object({type:z.z.literal("agent_deleted"),payload:z.z.object({agentId:z.z.string(),requestId:z.z.string()})}),ha=z.z.object({type:z.z.literal("agent_archived"),payload:z.z.object({agentId:z.z.string(),archivedAt:z.z.string(),requestId:z.z.string()})}),ja=z.z.object({agentId:z.z.string(),archivedAt:z.z.string()}),Sa=z.z.object({terminalId:z.z.string(),success:z.z.boolean()}),Pa=z.z.object({type:z.z.literal("close_items_response"),payload:z.z.object({agents:z.z.array(ja),terminals:z.z.array(Sa),requestId:z.z.string()})}),_a=z.z.object({ahead:z.z.number(),behind:z.z.number()}),qa=z.z.object({cwd:z.z.string(),error:vn.nullable(),requestId:z.z.string()}),Ia=qa.extend({isGit:z.z.literal(!1),isPaseoOwnedWorktree:z.z.literal(!1),repoRoot:z.z.null(),currentBranch:z.z.null(),isDirty:z.z.null(),baseRef:z.z.null(),aheadBehind:z.z.null(),aheadOfOrigin:z.z.null(),behindOfOrigin:z.z.null(),hasRemote:z.z.boolean(),remoteUrl:z.z.null()}),Oa=qa.extend({isGit:z.z.literal(!0),isPaseoOwnedWorktree:z.z.literal(!1),repoRoot:z.z.string(),mainRepoRoot:z.z.string().nullable().optional().default(null),currentBranch:z.z.string().nullable(),isDirty:z.z.boolean(),baseRef:z.z.string().nullable(),aheadBehind:_a.nullable(),aheadOfOrigin:z.z.number().nullable(),behindOfOrigin:z.z.number().nullable(),hasRemote:z.z.boolean(),remoteUrl:z.z.string().nullable()}),ka=qa.extend({isGit:z.z.literal(!0),isPaseoOwnedWorktree:z.z.literal(!0),repoRoot:z.z.string(),mainRepoRoot:z.z.string(),currentBranch:z.z.string().nullable(),isDirty:z.z.boolean(),baseRef:z.z.string(),aheadBehind:_a.nullable(),aheadOfOrigin:z.z.number().nullable(),behindOfOrigin:z.z.number().nullable(),hasRemote:z.z.boolean(),remoteUrl:z.z.string().nullable()}),Ra=z.z.object({type:z.z.literal("checkout_status_response"),payload:z.z.union([Ia,Oa,ka])}),wa=z.z.object({enabledAt:z.z.string().nullable().optional().default(null),mergeMethod:z.z.string().nullable().optional().default(null),enabledBy:z.z.string().nullable().optional().default(null)}).nullable().optional().default(null),va=z.z.object({autoMergeAllowed:z.z.boolean().optional().default(!1),mergeCommitAllowed:z.z.boolean().optional().default(!1),squashMergeAllowed:z.z.boolean().optional().default(!1),rebaseMergeAllowed:z.z.boolean().optional().default(!1),viewerDefaultMergeMethod:z.z.string().nullable().optional().default(null)}).optional().default({autoMergeAllowed:!1,mergeCommitAllowed:!1,squashMergeAllowed:!1,rebaseMergeAllowed:!1,viewerDefaultMergeMethod:null}),Aa=z.z.object({mergeStateStatus:z.z.string().nullable().optional().default(null),autoMergeRequest:wa,viewerCanEnableAutoMerge:z.z.boolean().optional().default(!1),viewerCanDisableAutoMerge:z.z.boolean().optional().default(!1),viewerCanMergeAsAdmin:z.z.boolean().optional().default(!1),viewerCanUpdateBranch:z.z.boolean().optional().default(!1),repository:va,isMergeQueueEnabled:z.z.boolean().optional().default(!1),isInMergeQueue:z.z.boolean().optional().default(!1)}).optional(),Ma=z.z.object({number:z.z.number().optional(),url:z.z.string(),title:z.z.string(),state:z.z.string(),baseRefName:z.z.string(),headRefName:z.z.string(),isMerged:z.z.boolean(),isDraft:z.z.boolean().optional().default(!1),mergeable:z.z.enum(["MERGEABLE","CONFLICTING","UNKNOWN"]).catch("UNKNOWN").optional().default("UNKNOWN"),checks:z.z.array(z.z.object({name:z.z.string(),status:z.z.string(),url:z.z.string().nullable(),workflow:z.z.string().optional(),duration:z.z.string().optional(),checkRunId:z.z.number().optional(),workflowRunId:z.z.number().optional()})).optional().default([]),checksStatus:z.z.string().optional(),reviewDecision:z.z.string().nullable().optional(),repoOwner:z.z.string().optional(),repoName:z.z.string().optional(),github:Aa}),Ca=z.z.object({cwd:z.z.string(),status:Ma.nullable(),githubFeaturesEnabled:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()}),Ta=z.z.object({prStatus:Ca.optional()}),xa=z.z.object({type:z.z.literal("checkout_status_update"),payload:z.z.union([Ia,Oa,ka]).and(Ta)}),La=z.z.object({subscriptionId:z.z.string(),cwd:z.z.string(),files:z.z.array(Cr),error:vn.nullable()}),Wa=z.z.object({type:z.z.literal("subscribe_checkout_diff_response"),payload:La.extend({requestId:z.z.string()})}),Da=z.z.object({type:z.z.literal("checkout_diff_update"),payload:La}),Ea=z.z.object({type:z.z.literal("checkout_commit_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Na=z.z.object({type:z.z.literal("checkout_merge_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ua=z.z.object({type:z.z.literal("checkout_merge_from_base_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Fa=z.z.object({type:z.z.literal("checkout_pull_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ga=z.z.object({type:z.z.literal("checkout_push_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ba=z.z.object({type:z.z.literal("checkout.refresh.response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ha=z.z.object({type:z.z.literal("checkout_pr_create_response"),payload:z.z.object({cwd:z.z.string(),url:z.z.string().nullable(),number:z.z.number().nullable(),error:vn.nullable(),requestId:z.z.string()})}),Ka=z.z.object({type:z.z.literal("checkout_pr_merge_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Va=z.z.object({type:z.z.literal("checkout.github.set_auto_merge.response"),payload:z.z.object({cwd:z.z.string(),enabled:z.z.boolean(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),Ya=z.z.object({type:z.z.literal("files.upload.begin.response"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),accepted:z.z.boolean(),chunkSize:z.z.number().int().positive(),error:Bn.nullable()})}),Qa=z.z.object({type:z.z.literal("files.upload.chunk.ack"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),chunkIndex:z.z.number().int().nonnegative(),bytesReceived:z.z.number().int().nonnegative()})}),Xa=z.z.object({type:z.z.literal("files.upload.complete.response"),payload:z.z.object({requestId:z.z.string(),uploadId:z.z.string(),fileId:z.z.string(),path:z.z.string(),size:z.z.number().int().nonnegative(),mimeType:z.z.string(),error:Bn.nullable()})}),$a=z.z.object({path:z.z.string().optional(),startLine:z.z.number().optional(),endLine:z.z.number().optional(),annotationLevel:z.z.string().optional(),message:z.z.string().optional(),title:z.z.string().optional(),rawDetails:z.z.string().optional()}),Ja=z.z.object({jobId:z.z.number(),name:z.z.string(),status:z.z.string().nullable().optional(),conclusion:z.z.string().nullable().optional(),url:z.z.string().nullable().optional(),logTail:z.z.string().optional(),logTruncated:z.z.boolean().optional()}),Za=z.z.object({checkRunId:z.z.number(),workflowRunId:z.z.number().nullable().optional(),name:z.z.string(),status:z.z.string().nullable().optional(),conclusion:z.z.string().nullable().optional(),url:z.z.string().nullable().optional(),detailsUrl:z.z.string().nullable().optional(),output:z.z.object({title:z.z.string().nullable().optional(),summary:z.z.string().nullable().optional(),text:z.z.string().nullable().optional()}).nullable().optional(),annotations:z.z.array($a).optional().default([]),failedJobs:z.z.array(Ja).optional().default([]),truncated:z.z.boolean().optional().default(!1)}),es=z.z.object({type:z.z.literal("checkout.github.get_check_details.response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),details:Za.nullable().optional().default(null),error:vn.nullable(),requestId:z.z.string()})}),ts=z.z.object({type:z.z.literal("checkout_pr_status_response"),payload:Ca}),ns=z.z.discriminatedUnion("kind",[z.z.object({kind:z.z.literal("not_found"),message:z.z.string().optional().default("")}),z.z.object({kind:z.z.literal("forbidden"),message:z.z.string().optional().default("")}),z.z.object({kind:z.z.literal("unknown"),message:z.z.string().optional().default("")})]),rs=z.z.preprocess(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return{kind:"unknown",message:""};const t=e;return"not_found"===t.kind||"forbidden"===t.kind||"unknown"===t.kind?t:Object.assign({},t,{kind:"unknown"})},ns),os=z.z.object({id:z.z.string().optional().default(""),kind:z.z.literal("review"),author:z.z.string().optional().default("unknown"),authorUrl:z.z.string().nullable().optional(),avatarUrl:z.z.string().nullable().optional(),body:z.z.string().optional().default(""),createdAt:z.z.number().optional().default(0),url:z.z.string().optional().default(""),reviewState:z.z.enum(["approved","changes_requested","commented"]).optional().default("commented")}),is=z.z.object({id:z.z.string().optional().default(""),kind:z.z.literal("comment"),author:z.z.string().optional().default("unknown"),authorUrl:z.z.string().nullable().optional(),avatarUrl:z.z.string().nullable().optional(),body:z.z.string().optional().default(""),createdAt:z.z.number().optional().default(0),url:z.z.string().optional().default(""),reviewId:z.z.string().optional(),location:z.z.object({path:z.z.string(),line:z.z.number().optional(),startLine:z.z.number().optional(),threadId:z.z.string().optional(),isResolved:z.z.boolean().optional(),isOutdated:z.z.boolean().optional()}).optional()}),as=z.z.preprocess(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return e;const t=e;return"review"===t.kind||"comment"===t.kind?t:Object.assign({},t,{kind:"comment"})},z.z.discriminatedUnion("kind",[os,is])),ss=z.z.object({type:z.z.literal("pull_request_timeline_response"),payload:z.z.object({cwd:z.z.string().optional().default(""),prNumber:z.z.number().nullable().optional().default(null),items:z.z.array(as).optional().default([]),truncated:z.z.boolean().optional().default(!1),error:rs.nullable().optional().default(null),requestId:z.z.string().optional().default(""),githubFeaturesEnabled:z.z.boolean().optional().default(!0)}).optional().prefault({})}),ls=z.z.object({type:z.z.literal("checkout_switch_branch_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),branch:z.z.string(),source:z.z.enum(["local","remote"]).optional(),error:vn.nullable(),requestId:z.z.string()})}),cs=z.z.object({type:z.z.literal("checkout.rename_branch.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),cwd:z.z.string(),currentBranch:z.z.string().nullable(),error:vn.nullable()})}),us=z.z.object({index:z.z.number().int().min(0),message:z.z.string(),branch:z.z.string().nullable(),isPaseo:z.z.boolean()}),zs=z.z.object({type:z.z.literal("stash_save_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),ps=z.z.object({type:z.z.literal("stash_pop_response"),payload:z.z.object({cwd:z.z.string(),success:z.z.boolean(),error:vn.nullable(),requestId:z.z.string()})}),gs=z.z.object({type:z.z.literal("stash_list_response"),payload:z.z.object({cwd:z.z.string(),entries:z.z.array(us),error:vn.nullable(),requestId:z.z.string()})}),bs=z.z.object({type:z.z.literal("validate_branch_response"),payload:z.z.object({exists:z.z.boolean(),resolvedRef:z.z.string().nullable(),isRemote:z.z.boolean(),error:z.z.string().nullable(),requestId:z.z.string()})}),ds=z.z.object({type:z.z.literal("branch_suggestions_response"),payload:z.z.object({branches:z.z.array(z.z.string()),branchDetails:z.z.array(z.z.object({name:z.z.string(),committerDate:z.z.number(),hasLocal:z.z.boolean().optional(),hasRemote:z.z.boolean().optional()})).optional(),error:z.z.string().nullable(),requestId:z.z.string()})}),ms=z.z.object({type:z.z.literal("github_search_response"),payload:z.z.object({items:z.z.array(ar),githubFeaturesEnabled:z.z.boolean(),error:z.z.string().nullable(),requestId:z.z.string()})}),fs=z.z.object({type:z.z.literal("directory_suggestions_response"),payload:z.z.object({directories:z.z.array(z.z.string()),entries:z.z.array(z.z.object({path:z.z.string(),kind:z.z.enum(["file","directory"])})).optional().default([]),error:z.z.string().nullable(),requestId:z.z.string()})}),ys=z.z.object({worktreePath:z.z.string(),createdAt:z.z.string(),branchName:z.z.string().nullable().optional(),head:z.z.string().nullable().optional()}),hs=z.z.object({type:z.z.literal("paseo_worktree_list_response"),payload:z.z.object({worktrees:z.z.array(ys),error:vn.nullable(),requestId:z.z.string()})}),js=z.z.object({type:z.z.literal("paseo_worktree_archive_response"),payload:z.z.object({success:z.z.boolean(),removedAgents:z.z.array(z.z.string()).optional(),error:vn.nullable(),requestId:z.z.string()})}),Ss=z.z.object({type:z.z.literal("create_paseo_worktree_response"),payload:z.z.object({workspace:_i.nullable(),error:z.z.string().nullable(),errorCode:z.z.string().optional(),setupTerminalId:z.z.string().nullable(),requestId:z.z.string()})}),Ps=z.z.object({type:z.z.literal("file_explorer_response"),payload:z.z.object({cwd:z.z.string(),path:z.z.string(),mode:z.z.enum(["list","file"]),directory:Lr.nullable(),file:xr.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),_s=z.z.object({data:z.z.string(),mimeType:z.z.string()}),qs=z.z.object({type:z.z.literal("project_icon_response"),payload:z.z.object({cwd:z.z.string(),icon:_s.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),Is=z.z.object({type:z.z.literal("file_download_token_response"),payload:z.z.object({cwd:z.z.string(),path:z.z.string(),token:z.z.string().nullable(),fileName:z.z.string().nullable(),mimeType:z.z.string().nullable(),size:z.z.number().nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),Os=z.z.object({type:z.z.literal("file.upload.response"),payload:z.z.object({requestId:z.z.string(),file:ct.nullable(),error:z.z.string().nullable()})}),ks=z.z.object({type:z.z.literal("list_provider_models_response"),payload:z.z.object({provider:m.AgentProviderSchema,models:z.z.array(ce).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),Rs=z.z.object({type:z.z.literal("list_provider_modes_response"),payload:z.z.object({provider:m.AgentProviderSchema,modes:z.z.array(ne).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),ws=z.z.object({type:z.z.literal("list_provider_features_response"),payload:z.z.object({provider:m.AgentProviderSchema,features:z.z.array(le).optional(),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),vs=z.z.object({provider:m.AgentProviderSchema,available:z.z.boolean(),error:z.z.string().nullable().optional()}),As=z.z.object({type:z.z.literal("list_available_providers_response"),payload:z.z.object({providers:z.z.array(vs),error:z.z.string().nullable().optional(),fetchedAt:z.z.string(),requestId:z.z.string()})}),Ms=z.z.object({type:z.z.literal("get_providers_snapshot_response"),payload:z.z.object({entries:z.z.array(ue),generatedAt:z.z.string(),requestId:z.z.string()})}),Cs=z.z.object({type:z.z.literal("providers_snapshot_update"),payload:z.z.object({cwd:z.z.string().optional(),entries:z.z.array(ue),generatedAt:z.z.string()})}),Ts=z.z.object({type:z.z.literal("refresh_providers_snapshot_response"),payload:z.z.object({requestId:z.z.string(),acknowledged:z.z.boolean()})}),xs=z.z.object({type:z.z.literal("provider_diagnostic_response"),payload:z.z.object({provider:m.AgentProviderSchema,diagnostic:z.z.string(),requestId:z.z.string()})}),Ls=z.z.enum(["default","ok","warning","danger"]),Ws=z.z.enum(["available","unavailable","error"]),Ds=z.z.object({id:z.z.string(),label:z.z.string(),usedPct:z.z.number().nullable().optional(),remainingPct:z.z.number().nullable().optional(),resetsAt:z.z.string().nullable().optional(),runsOutAt:z.z.string().nullable().optional(),shortfallPct:z.z.number().nullable().optional(),tone:Ls.optional()}),Es=z.z.object({id:z.z.string(),label:z.z.string(),used:z.z.number().nullable().optional(),remaining:z.z.number().nullable().optional(),limit:z.z.number().nullable().optional(),unit:z.z.enum(["usd","credits","requests","tokens"]),resetsAt:z.z.string().nullable().optional(),tone:Ls.optional()}),Ns=z.z.object({id:z.z.string(),label:z.z.string(),value:z.z.string(),tone:Ls.optional()}),Us=z.z.object({providerId:z.z.string(),displayName:z.z.string(),status:Ws,planLabel:z.z.string().nullable(),sourceLabel:z.z.string().nullable().optional(),fetchedAt:z.z.string().nullable().optional(),nextRefreshAt:z.z.string().nullable().optional(),windows:z.z.array(Ds),balances:z.z.array(Es).optional(),details:z.z.array(Ns).optional(),error:z.z.string().nullable().optional()}),Fs=z.z.object({type:z.z.literal("provider.usage.list.response"),payload:z.z.object({requestId:z.z.string(),fetchedAt:z.z.string(),providers:z.z.array(Us)})}),Gs=z.z.object({name:z.z.string(),description:z.z.string(),argumentHint:z.z.string(),kind:z.z.enum(["command","skill"]).optional().catch("command")}),Bs=z.z.object({type:z.z.literal("list_commands_response"),payload:z.z.object({agentId:z.z.string(),commands:z.z.array(Gs),error:z.z.string().nullable(),requestId:z.z.string()})}),Hs=z.z.object({id:z.z.string(),name:z.z.string(),cwd:z.z.string(),workspaceId:z.z.string().optional(),title:z.z.string().optional(),activity:p.TerminalActivitySchema.nullable().optional()}),Ks=z.z.object({char:z.z.string(),fg:z.z.number().optional(),bg:z.z.number().optional(),fgMode:z.z.number().optional(),bgMode:z.z.number().optional(),bold:z.z.boolean().optional(),italic:z.z.boolean().optional(),underline:z.z.boolean().optional(),dim:z.z.boolean().optional(),inverse:z.z.boolean().optional(),strikethrough:z.z.boolean().optional()}),Vs=z.z.enum(["block","underline","bar"]),Ys=z.z.object({row:z.z.number(),col:z.z.number(),hidden:z.z.boolean().optional(),style:Vs.optional(),blink:z.z.boolean().optional()}),Qs=z.z.object({rows:z.z.number(),cols:z.z.number(),grid:z.z.array(z.z.array(Ks)),scrollback:z.z.array(z.z.array(Ks)),cursor:Ys,title:z.z.string().optional(),gridWrapped:z.z.array(z.z.boolean()).optional(),scrollbackWrapped:z.z.array(z.z.boolean()).optional()}),Xs=z.z.object({type:z.z.literal("list_terminals_response"),payload:z.z.object({cwd:z.z.string().optional(),terminals:z.z.array(Hs.omit({cwd:!0})),requestId:z.z.string()})}),$s=z.z.object({type:z.z.literal("terminals_changed"),payload:z.z.object({cwd:z.z.string(),terminals:z.z.array(Hs.omit({cwd:!0}))})}),Js=z.z.object({type:z.z.literal("create_terminal_response"),payload:z.z.object({terminal:Hs.nullable(),error:z.z.string().nullable(),requestId:z.z.string()})}),Zs=z.z.object({type:z.z.literal("terminal.rename.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),error:z.z.string().nullable()})}),el=z.z.object({type:z.z.literal("subscribe_terminal_response"),payload:z.z.union([z.z.object({terminalId:z.z.string(),slot:z.z.number().int().min(0).max(255),error:z.z.null(),requestId:z.z.string()}),z.z.object({terminalId:z.z.string(),error:z.z.string(),requestId:z.z.string()})])}),tl=z.z.object({type:z.z.literal("kill_terminal_response"),payload:z.z.object({terminalId:z.z.string(),success:z.z.boolean(),requestId:z.z.string()})}),nl=z.z.object({type:z.z.literal("capture_terminal_response"),payload:z.z.object({terminalId:z.z.string(),lines:z.z.array(z.z.string()),totalLines:z.z.number().int().nonnegative(),requestId:z.z.string()})}),rl=z.z.object({type:z.z.literal("terminal_stream_exit"),payload:z.z.object({terminalId:z.z.string()})}),ol=z.z.object({type:z.z.literal("terminal_attention_required"),payload:z.z.object({serverId:z.z.string().optional(),terminalId:z.z.string(),cwd:z.z.string(),workspaceId:z.z.string().optional(),reason:z.z.enum(["finished","needs_input"]),title:z.z.string(),body:z.z.string(),shouldNotify:z.z.boolean()})}),il=z.z.object({type:z.z.literal("daemon.update.response"),payload:z.z.object({requestId:z.z.string(),success:z.z.boolean(),error:z.z.string().nullable(),previousVersion:z.z.string().nullable(),newVersion:z.z.string().nullable()})}),al=z.z.object({type:z.z.literal("daemon.update.progress"),payload:z.z.object({requestId:z.z.string(),phase:z.z.enum(["starting","downloading","installing","complete"])})}),sl=z.z.discriminatedUnion("type",[P.BrowserAutomationExecuteRequestSchema,Lo,Wo,Do,Eo,No,Uo,Fo,Go,Bo,Ho,Zo,ei,ti,pi,qi,Ii,Li,Wi,Di,Ni,Oi,ki,Ai,Mi,Ci,xi,Fi,Ui,Gi,Bi,Hi,Ki,Vi,Xi,$i,Ji,Zi,ea,ta,na,qn,ia,aa,H,V,Q,$,te,sa,oa,la,ca,ua,tn,rn,an,sn,cn,zn,gn,mn,fn,hn,Sn,_n,ra,za,fa,ya,ha,Qe,Pa,Ra,xa,Wa,Da,Ea,Na,Ua,Fa,Ga,Ba,Ha,Ka,Va,Ya,Qa,Xa,Yn,es,ts,ss,ls,cs,zs,ps,gs,bs,ds,ms,fs,hs,js,Ss,Ps,qs,Is,Os,ks,Rs,ws,As,Ms,Cs,Ts,xs,Fs,Bs,Xs,$s,Js,Zs,el,tl,nl,rl,ol,h.ChatCreateResponseSchema,h.ChatListResponseSchema,h.ChatInspectResponseSchema,h.ChatDeleteResponseSchema,h.ChatPostResponseSchema,h.ChatReadResponseSchema,h.ChatWaitResponseSchema,j.ScheduleCreateResponseSchema,j.ScheduleListResponseSchema,j.ScheduleInspectResponseSchema,j.ScheduleLogsResponseSchema,j.SchedulePauseResponseSchema,j.ScheduleResumeResponseSchema,j.ScheduleDeleteResponseSchema,j.ScheduleRunOnceResponseSchema,j.ScheduleUpdateResponseSchema,S.LoopRunResponseSchema,S.LoopListResponseSchema,S.LoopInspectResponseSchema,S.LoopLogsResponseSchema,S.LoopStopResponseSchema,Qr,$r,eo,ro,co,zo,bo,ho,So,ga,ba,ma,al,il]),ll=z.z.object({type:z.z.literal("ping")}),cl=z.z.object({type:z.z.literal("pong")}),ul=z.z.object({type:z.z.literal("hello"),clientId:z.z.string().min(1),clientType:z.z.enum(["mobile","browser","cli","mcp"]),protocolVersion:z.z.number().int(),appVersion:z.z.string().optional(),capabilities:z.z.object({voice:z.z.boolean().optional(),pushNotifications:z.z.boolean().optional(),[g.CLIENT_CAPS.reasoningMergeEnum]:z.z.boolean().optional(),[g.CLIENT_CAPS.customModeIcons]:z.z.boolean().optional(),[g.CLIENT_CAPS.terminalReflowableSnapshot]:z.z.boolean().optional(),[g.CLIENT_CAPS.browserHost]:_.BrowserAutomationHostCapabilitySchema.optional()}).passthrough().optional()}),zl=z.z.object({type:z.z.literal("recording_state"),isRecording:z.z.boolean()}),pl=z.z.object({type:z.z.literal("session"),message:To}),gl=z.z.object({type:z.z.literal("session"),message:sl}),bl=z.z.discriminatedUnion("type",[ll,ul,zl,pl]),dl=z.z.discriminatedUnion("type",[cl,gl]);const ml=z.z.object({kind:z.z.literal("permission"),tool_name:z.z.string(),tool_input:z.z.unknown(),agent_id:z.z.string()}),fl=z.z.object({kind:z.z.literal("pre-tool"),tool_name:z.z.string(),tool_input:z.z.unknown(),agent_id:z.z.string()}),yl=z.z.object({kind:z.z.literal("post-tool"),tool_name:z.z.string(),tool_input:z.z.unknown(),tool_response:z.z.unknown(),agent_id:z.z.string()}),hl=z.z.object({kind:z.z.literal("status-line"),statusText:z.z.string(),agent_id:z.z.string()}),jl=z.z.object({kind:z.z.literal("session-start"),session_id:z.z.string(),transcript_path:z.z.string(),agent_id:z.z.string()}),Sl=z.z.object({kind:z.z.literal("session-end"),session_id:z.z.string(),transcript_path:z.z.string(),agent_id:z.z.string()}),Pl=z.z.object({kind:z.z.literal("assistant_message_delta"),delta:z.z.object({text:z.z.string()})}),_l=z.z.object({kind:z.z.literal("usage_update"),usage:z.z.object({input_tokens:z.z.number().optional(),output_tokens:z.z.number().optional(),cache_creation_input_tokens:z.z.number().optional(),cache_read_input_tokens:z.z.number().optional(),total_cost_usd:z.z.number().optional()})}),ql=z.z.discriminatedUnion("kind",[ml,fl,yl,hl,jl,Sl,Pl,_l])},3281,[35,3282,3361,3280,3362,3363,3364,3365,3366,3368,3370,3372,3373,3374,3375]);
|
|
14927
14927
|
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}}),Object.defineProperty(_e,"z",{enumerable:!0,get:function(){return t}});var e=r(_d[0]);Object.keys(e).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(_e,t)||Object.defineProperty(_e,t,{enumerable:!0,get:function(){return e[t]}})});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(e),n=t},3282,[3283]);
|
|
14928
14928
|
__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"globalRegistry",{enumerable:!0,get:function(){return t.globalRegistry}}),Object.defineProperty(_e,"registry",{enumerable:!0,get:function(){return t.registry}}),Object.defineProperty(_e,"config",{enumerable:!0,get:function(){return t.config}}),Object.defineProperty(_e,"$output",{enumerable:!0,get:function(){return t.$output}}),Object.defineProperty(_e,"$input",{enumerable:!0,get:function(){return t.$input}}),Object.defineProperty(_e,"$brand",{enumerable:!0,get:function(){return t.$brand}}),Object.defineProperty(_e,"clone",{enumerable:!0,get:function(){return t.clone}}),Object.defineProperty(_e,"regexes",{enumerable:!0,get:function(){return t.regexes}}),Object.defineProperty(_e,"treeifyError",{enumerable:!0,get:function(){return t.treeifyError}}),Object.defineProperty(_e,"prettifyError",{enumerable:!0,get:function(){return t.prettifyError}}),Object.defineProperty(_e,"formatError",{enumerable:!0,get:function(){return t.formatError}}),Object.defineProperty(_e,"flattenError",{enumerable:!0,get:function(){return t.flattenError}}),Object.defineProperty(_e,"TimePrecision",{enumerable:!0,get:function(){return t.TimePrecision}}),Object.defineProperty(_e,"util",{enumerable:!0,get:function(){return t.util}}),Object.defineProperty(_e,"NEVER",{enumerable:!0,get:function(){return t.NEVER}}),Object.defineProperty(_e,"toJSONSchema",{enumerable:!0,get:function(){return p.toJSONSchema}}),Object.defineProperty(_e,"fromJSONSchema",{enumerable:!0,get:function(){return d.fromJSONSchema}}),Object.defineProperty(_e,"ZodISODateTime",{enumerable:!0,get:function(){return P.ZodISODateTime}}),Object.defineProperty(_e,"ZodISODate",{enumerable:!0,get:function(){return P.ZodISODate}}),Object.defineProperty(_e,"ZodISOTime",{enumerable:!0,get:function(){return P.ZodISOTime}}),Object.defineProperty(_e,"ZodISODuration",{enumerable:!0,get:function(){return P.ZodISODuration}}),Object.defineProperty(_e,"core",{enumerable:!0,get:function(){return n}}),Object.defineProperty(_e,"locales",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"iso",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"coerce",{enumerable:!0,get:function(){return E}});var t=r(_d[0]),n=e(t),o=r(_d[1]);Object.keys(o).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return o[e]}})});var u=r(_d[2]);Object.keys(u).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return u[e]}})});var c=r(_d[3]);Object.keys(c).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return c[e]}})});var f=r(_d[4]);Object.keys(f).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return f[e]}})});var b=r(_d[5]);Object.keys(b).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return b[e]}})});var l,O=r(_d[6]),y=(l=O)&&l.__esModule?l:{default:l},p=r(_d[7]),d=r(_d[8]),j=e(r(_d[9])),P=r(_d[10]),s=e(P),E=e(r(_d[11]));(0,t.config)((0,y.default)())},3283,[3284,3353,3354,3357,3356,3358,3304,3350,3359,3294,3355,3360]);
|
|
14929
14929
|
__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,c.get?c:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"toJSONSchema",{enumerable:!0,get:function(){return P.toJSONSchema}}),Object.defineProperty(_e,"JSONSchemaGenerator",{enumerable:!0,get:function(){return s.JSONSchemaGenerator}}),Object.defineProperty(_e,"util",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"regexes",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"locales",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"JSONSchema",{enumerable:!0,get:function(){return h}});var t=r(_d[0]);Object.keys(t).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return t[e]}})});var n=r(_d[1]);Object.keys(n).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return n[e]}})});var c=r(_d[2]);Object.keys(c).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return c[e]}})});var o=r(_d[3]);Object.keys(o).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return o[e]}})});var u=r(_d[4]);Object.keys(u).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return u[e]}})});var f=r(_d[5]);Object.keys(f).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return f[e]}})});var b=e(r(_d[6])),O=e(r(_d[7])),l=e(r(_d[8])),p=r(_d[9]);Object.keys(p).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return p[e]}})});var y=r(_d[10]);Object.keys(y).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return y[e]}})});var j=r(_d[11]);Object.keys(j).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return j[e]}})});var d=r(_d[12]);Object.keys(d).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return d[e]}})});var P=r(_d[13]),s=r(_d[14]),h=e(r(_d[15]))},3284,[3285,3286,3287,3289,3290,3293,3288,3291,3294,3347,3292,3348,3349,3350,3351,3352]);
|
|
@@ -15044,7 +15044,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15044
15044
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"decodeOfferFragmentPayload",{enumerable:!0,get:function(){return n.decodeOfferFragmentPayload}}),Object.defineProperty(e,"buildDaemonWebSocketUrl",{enumerable:!0,get:function(){return t.buildDaemonWebSocketUrl}}),Object.defineProperty(e,"deriveLabelFromEndpoint",{enumerable:!0,get:function(){return t.deriveLabelFromEndpoint}}),Object.defineProperty(e,"extractHostPortFromWebSocketUrl",{enumerable:!0,get:function(){return t.extractHostPortFromWebSocketUrl}}),Object.defineProperty(e,"normalizeHostPort",{enumerable:!0,get:function(){return t.normalizeHostPort}}),Object.defineProperty(e,"parseConnectionUri",{enumerable:!0,get:function(){return t.parseConnectionUri}}),Object.defineProperty(e,"parseHostPort",{enumerable:!0,get:function(){return t.parseHostPort}}),Object.defineProperty(e,"serializeConnectionUri",{enumerable:!0,get:function(){return t.serializeConnectionUri}}),Object.defineProperty(e,"serializeConnectionUriForStorage",{enumerable:!0,get:function(){return t.serializeConnectionUriForStorage}}),Object.defineProperty(e,"shouldUseTlsForDefaultHostedRelay",{enumerable:!0,get:function(){return t.shouldUseTlsForDefaultHostedRelay}}),e.buildRelayWebSocketUrl=function(n){return(0,t.buildRelayWebSocketUrl)(Object.assign({},n,{role:"client"}))};var t=r(d[0]),n=r(d[1])},3399,[3379,3400]);
|
|
15045
15045
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ConnectionOfferV2Schema",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ConnectionOfferSchema",{enumerable:!0,get:function(){return o}}),e.decodeOfferFragmentPayload=l,e.parseConnectionOfferFromUrl=function(n){const t=f(n);if(!t)return null;const c=l(t);return o.parse(c)};var n=r(d[0]);const t=n.z.object({v:n.z.literal(2),serverId:n.z.string().min(1),daemonPublicKeyB64:n.z.string().min(1),relay:n.z.object({endpoint:n.z.string().min(1),useTls:n.z.boolean().optional()})}),o=t;function c(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),o=t.padEnd(t.length+(4-t.length%4)%4,"="),c=globalThis.atob(o),l=Uint8Array.from(c,n=>n.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(l)}function l(n){const t=c(n);return JSON.parse(t)}const u="#offer=";function f(n){const t=n.trim();if(!t)return null;const o=t.indexOf(u);if(-1===o)return null;const c=t.slice(o+u.length).trim();return c.length>0?c:null}},3400,[3282]);
|
|
15046
15046
|
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.resolveAppVersion=function(){const e=u(t.default?.version);if(e)return e;const o=u(n.default.expoConfig?.version);if(o)return o;const f=u(n.default.manifest?.version);if(f)return f;return null};var n=e(r(d[0])),t=e(r(d[1]));function u(e){if("string"!=typeof e)return null;const n=e.trim();return 0===n.length?null:n}},3401,[1006,3402]);
|
|
15047
|
-
__d(function(e,t,r,a,o,i,n){o.exports={name:"@hyperdrive.bot/paseo-app",version:"0.3.
|
|
15047
|
+
__d(function(e,t,r,a,o,i,n){o.exports={name:"@hyperdrive.bot/paseo-app",version:"0.3.18",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs","eas-build-post-install":"npm --prefix ../.. run build:app-deps && npm run build:terminal-webview",android:"npm run android:development","android:development":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=development expo run:android --variant=debug","android:production":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=production expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=production expo run:android --variant=release","android:release":"npm run android:production","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",ios:"npm --prefix ../.. run build:client && expo run:ios","ios:release":"npm --prefix ../.. run build:client && expo run:ios --configuration Release",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project='Desktop Chrome'","test:e2e:real":"cross-env E2E_FORK_PASEO_HOME_FROM=../../.dev/paseo-home playwright test --project=real-provider","test:e2e:ui":"playwright test --ui","test:coverage":"vitest run --project unit --coverage",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && expo export --platform web --source-maps","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name paseo-app --branch main"},dependencies:{"@bacons/apple-targets":"4.0.6","@datadog/browser-rum":"^6.23.0","@datadog/browser-rum-react":"^6.23.0","@datadog/mobile-react-native":"^2.7.0","@datadog/mobile-react-native-session-replay":"^2.14.8","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@expo/image-utils":"0.8.8","@expo/plist":"0.4.9","@expo/prebuild-config":"54.0.8","@floating-ui/react-native":"^0.10.7","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@hyperdrive.bot/paseo-client":"*","@hyperdrive.bot/paseo-expo-two-way-audio":"*","@hyperdrive.bot/paseo-extension-sdk":"*","@hyperdrive.bot/paseo-highlight":"*","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@sentry/electron":"^6.11.0","@sentry/react-native":"^6.20.0","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-background-fetch":"~14.0.9","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-speech":"~14.0.8","expo-speech-recognition":"^56.0.1","expo-splash-screen":"~31.0.10","expo-system-ui":"~6.0.7","expo-task-manager":"~14.0.9","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"^1.21.7","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-uitextview":"^2.2.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3","use-sync-external-store":"^1.6.0",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/chai":"^5.2.2","@types/markdown-it":"^14.1.2","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@vitest/coverage-v8":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3",eslint:"^9.25.0","eslint-config-expo":"~10.0.0",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"}}},3402,[]);
|
|
15048
15048
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldUseDesktopDaemon=function(){return(0,n.isElectronRuntime)()},e.getDesktopDaemonStatus=async function(){return c(await(0,t.invokeDesktopCommand)("desktop_daemon_status"))},e.startDesktopDaemon=async function(){return c(await(0,t.invokeDesktopCommand)("start_desktop_daemon"))},e.stopDesktopDaemon=async function(n="manual_ipc"){return c(await(0,t.invokeDesktopCommand)("stop_desktop_daemon",{reason:n}))},e.restartDesktopDaemon=async function(){return c(await(0,t.invokeDesktopCommand)("restart_desktop_daemon"))},e.getDesktopDaemonLogs=async function(){return p(await(0,t.invokeDesktopCommand)("desktop_daemon_logs"))},e.getDesktopDaemonPairing=async function(){return k(await(0,t.invokeDesktopCommand)("desktop_daemon_pairing"))},e.getCliDaemonStatus=async function(){const n=await(0,t.invokeDesktopCommand)("cli_daemon_status");if("string"!=typeof n)throw new Error("Unexpected CLI daemon status response.");return n},e.listenToLocalTransportEvents=async function(t){const u=(0,n.getDesktopHost)()?.events?.on;if("function"!=typeof u)throw new Error("Desktop events API is unavailable.");const c=await u("local-daemon-transport-event",n=>{o(n)&&t({sessionId:s(n.sessionId)??"",kind:s(n.kind)??"error",text:s(n.text),binaryBase64:s(n.binaryBase64),code:l(n.code),reason:s(n.reason),error:s(n.error)})});return"function"==typeof c?c:()=>{}},e.openLocalTransportSession=async function(n){const o=await(0,t.invokeDesktopCommand)("open_local_daemon_transport",n);if("string"!=typeof o||0===o.trim().length)throw new Error("Unexpected local transport session response.");return o},e.sendLocalTransportMessage=async function(n){await(0,t.invokeDesktopCommand)("send_local_daemon_transport_message",Object.assign({sessionId:n.sessionId},n.text?{text:n.text}:{},n.binaryBase64?{binaryBase64:n.binaryBase64}:{}))},e.closeLocalTransportSession=async function(n){await(0,t.invokeDesktopCommand)("close_local_daemon_transport",{sessionId:n})},e.getCliInstallStatus=async function(){return f(await(0,t.invokeDesktopCommand)("get_cli_install_status"))},e.installCli=async function(){return f(await(0,t.invokeDesktopCommand)("install_cli"))},e.getSkillsStatus=async function(){return y(await(0,t.invokeDesktopCommand)("get_skills_status"))},e.installSkills=async function(){return y(await(0,t.invokeDesktopCommand)("install_skills"))},e.updateSkills=async function(){return y(await(0,t.invokeDesktopCommand)("update_skills"))},e.uninstallSkills=async function(){return y(await(0,t.invokeDesktopCommand)("uninstall_skills"))};var n=r(d[0]),t=r(d[1]);function o(n){return"object"==typeof n&&null!==n}function s(n){return"string"==typeof n&&n.trim().length>0?n:null}function l(n){return"number"==typeof n&&Number.isFinite(n)?n:null}function u(n){const t=s(n)?.toLowerCase();switch(t){case"starting":return"starting";case"running":return"running";case"errored":case"error":return"errored";default:return"stopped"}}function c(n){if(!o(n))throw new Error("Unexpected desktop daemon status response.");return{serverId:s(n.serverId)??"",status:u(n.status),listen:s(n.listen),hostname:s(n.hostname),pid:l(n.pid),home:s(n.home)??"",version:s(n.version),desktopManaged:!0===n.desktopManaged,error:s(n.error)}}function p(n){if(!o(n))throw new Error("Unexpected desktop daemon logs response.");return{logPath:s(n.logPath)??"",contents:"string"==typeof n.contents?n.contents:""}}function k(n){if(!o(n))throw new Error("Unexpected desktop daemon pairing response.");return{relayEnabled:!0===n.relayEnabled,url:s(n.url),qr:s(n.qr)}}function f(n){if(!o(n))throw new Error("Unexpected install status response.");return{installed:!0===n.installed}}function w(n){switch(n){case"not-installed":case"up-to-date":case"drift":return n;default:throw new Error(`Unexpected skills status state: ${String(n)}`)}}function _(n){if(!o(n))throw new Error("Unexpected skill op response.");const t=s(n.name);if(!t)throw new Error("Skill op missing name.");switch(n.kind){case"add":return{kind:"add",name:t};case"update":return{kind:"update",name:t};case"delete":return{kind:"delete",name:t};default:throw new Error(`Unexpected skill op kind: ${String(n.kind)}`)}}function y(n){if(!o(n))throw new Error("Unexpected skills status response.");const t=Array.isArray(n.ops)?n.ops.map(_):[];return{state:w(n.state),ops:t}}},3403,[3404,3406]);
|
|
15049
15049
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getDesktopHost=n,e.isElectronRuntime=o,e.isElectronRuntimeMac=function(){if(!o())return!1;if("undefined"==typeof navigator)return!1;const t=n()?.platform?.toLowerCase();if("darwin"===t||"mac"===t||"macos"===t)return!0;const u=navigator.userAgent;return u.includes("Mac OS")||u.includes("Macintosh")},r(d[0]);var t=r(d[1]);function n(){return(0,t.getElectronHost)()}function o(){return null!==n()}},3404,[25,3405]);
|
|
15050
15050
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getElectronHost=function(){if("undefined"==typeof window)return null;const t=window.paseoDesktop;if(!t||"object"!=typeof t)return null;return t}},3405,[]);
|
|
@@ -15663,7 +15663,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15663
15663
|
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){if(!/\s/.test(t))return t;return`'${t.replace(/'/g,"'\\''")}'`}Object.defineProperty(e,'__esModule',{value:!0}),e.formatDroppedPathsForInsertion=function(n){return n.map(t=>t.trim()).filter(t=>t.length>0).map(t).join(" ")},e.appendToDraft=function(t,n){if(!n)return t;if(0===t.length)return n;const o=!/\s$/.test(t);return`${t}${o?" ":""}${n}`}},4008,[]);
|
|
15664
15664
|
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pickAndPersistImages=async function(t){const n=await t.pickImages();return n?.length?await Promise.all(n.map(async n=>{const i=n.fileName??null,s=n.mimeType||"image/jpeg";return"blob"===n.source.kind?await t.persister.persistFromBlob({blob:n.source.blob,mimeType:s,fileName:i}):await t.persister.persistFromFileUri({uri:n.source.uri,mimeType:s,fileName:i})})):[]},e.pickAndPersistFiles=async function(t){const n=await t.pickFiles();return n?.length?n.map(n=>t.startUpload(n)):[]},e.removeComposerAttachmentAtIndex=function(t){const n=t.attachments[t.index];"image"===n?.kind?t.deleteAttachments([n.metadata]):"file"===n?.kind&&t.cancelUpload?.(n.file);return t.attachments.filter((n,i)=>i!==t.index)},e.cancelComposerAgent=function(t){return!(!t.isAgentRunning||t.isCancellingAgent)&&(!(!t.isConnected||!t.client)&&(t.client.cancelAgent(t.agentId),!0))},e.dispatchComposerAgentMessage=async function(t){const s=(0,n.splitComposerAttachmentsForSubmit)(t.attachments),u=(0,i.generateMessageId)(),o=(0,i.buildOptimisticUserMessage)({id:u,text:t.text,timestamp:new Date,images:s.images,attachments:s.attachments});c(t.agentId,o,t.stream);const l=await t.encodeImages(s.images);await t.client.sendAgentMessage(t.agentId,t.text,{messageId:u,images:l??[],attachments:s.attachments})},e.queueComposerMessage=function(t){const n=t.text.trim();if(!n&&0===t.attachments.length)return{queued:null};const s={id:(0,i.generateMessageId)(),text:n,attachments:t.attachments};return t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,[...n.get(t.agentId)??[],s]),i}),{queued:s}},e.editQueuedComposerMessage=function(n){const i=n.queue.read(n.agentId).find(t=>t.id===n.messageId);return i?(n.queue.write(t=>{const i=new Map(t);return i.set(n.agentId,(t.get(n.agentId)??[]).filter(t=>t.id!==n.messageId)),i}),{text:i.text,attachments:(0,t.userAttachmentsOnly)(i.attachments)}):null},e.sendQueuedComposerMessageNow=async function(t){const n=t.queue.read(t.agentId).find(n=>n.id===t.messageId);if(!n)return{status:"missing"};t.queue.write(n=>{const i=new Map(n);return i.set(t.agentId,(n.get(t.agentId)??[]).filter(n=>n.id!==t.messageId)),i});try{return await t.submitMessage({text:n.text,attachments:n.attachments}),{status:"submitted"}}catch(i){return t.queue.write(i=>{const s=new Map(i);return s.set(t.agentId,[n,...i.get(t.agentId)??[]]),s}),{status:"failed",errorMessage:i instanceof Error?i.message:t.failedToSendMessage??s.i18n.t("composer.errors.failedToSend")}}},e.openComposerAttachment=function(n){if("image"===n.attachment.kind)return void n.setLightboxMetadata(n.attachment.metadata);if("file"===n.attachment.kind)return;if((0,t.isWorkspaceAttachment)(n.attachment))return void n.openWorkspaceAttachment({attachment:n.attachment});n.openExternalUrl(n.attachment.item.url)},e.buildGithubAttachment=u,e.toggleGithubAttachment=l,e.toggleGithubAttachmentFromPicker=function({current:t,item:n,markGithubAttachmentRemoved:i}){const s=t.find(t=>o(t)&&t.item.kind===n.kind&&t.item.number===n.number);s&&i(s);return l(t,n)},e.findGithubItemByOption=function(t,n){return t.find(t=>`${t.kind}:${t.number}`===n)},e.isAttachmentSelectedForGithubItem=function(n,i){return(0,t.userAttachmentsOnly)(n).some(t=>o(t)&&t.item.kind===i.kind&&t.item.number===i.number)};var t=r(d[0]),n=r(d[1]),i=r(d[2]),s=r(d[3]);function c(t,n,s){const c=(0,i.appendOptimisticUserMessageToStream)({tail:s.getTail(t)??[],head:s.getHead(t)??[],message:n,placement:"active-head"});c.changedHead&&s.setHead(n=>{const i=new Map(n);return i.set(t,c.head),i}),c.changedTail&&s.setTail(n=>{const i=new Map(n);return i.set(t,c.tail),i})}function u(t){return"pr"===t.kind?{kind:"github_pr",item:t}:{kind:"github_issue",item:t}}function o(t){return"github_issue"===t.kind||"github_pr"===t.kind}function l(t,n){const i=t=>o(t)&&t.item.kind===n.kind&&t.item.number===n.number;return t.some(i)?t.filter(t=>!i(t)):[...t,u(n)]}},4009,[4010,4011,3416,3534]);
|
|
15665
15665
|
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return"github.pull_request_comment"===t?.kind||"github.pull_request_review"===t?.kind||"github.pull_request_check"===t?.kind}Object.defineProperty(e,'__esModule',{value:!0}),e.isPullRequestContextAttachment=t,e.isWorkspaceAttachment=function(n){return"review"===n?.kind||"browser_element"===n?.kind||"chat_history"===n?.kind||t(n)},e.userAttachmentsOnly=function(n){return n.filter(n=>"review"!==n.kind&&"browser_element"!==n.kind&&"chat_history"!==n.kind&&!t(n))},e.workspaceAttachmentToSubmitAttachment=function(n){if("browser_element"===n.kind)return{type:"text",mimeType:"text/plain",title:`Browser element \xb7 ${n.attachment.tag}`,text:n.attachment.formatted};if(t(n))return{type:"text",mimeType:"text/plain",title:n.title,text:n.text};if("chat_history"===n.kind)return n.attachment;return"review"===n.kind?n.attachment:null}},4010,[]);
|
|
15666
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.splitComposerAttachmentsForSubmit=function(
|
|
15666
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.splitComposerAttachmentsForSubmit=function(s){const o=[],c=[];for(const u of s){if("image"===u.kind){o.push(u.metadata);continue}if((0,t.isWorkspaceAttachment)(u)){"browser_element"===u.kind&&u.attachment.screenshot&&o.push(u.attachment.screenshot);const n=(0,t.workspaceAttachmentToSubmitAttachment)(u);n&&c.push(n);continue}if("file"===u.kind){const{file:t}=u,{status:n,fileId:s,path:o}=t.upload;"uploaded"===n&&s&&o&&c.push({type:"file",name:t.fileName,mimeType:t.mimeType,size:t.size,fileId:s,path:o});continue}const s=(0,n.buildGitHubAttachmentFromSearchItem)(u.item);s&&c.push(s)}return{images:o,attachments:c}};var t=r(d[0]),n=r(d[1])},4011,[4010,4012]);
|
|
15667
15667
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildGitHubAttachmentFromSearchItem=function(t){if(!t)return null;if("pr"===t.kind)return Object.assign({type:"github_pr",mimeType:"application/github-pr",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{},t.baseRefName?{baseRefName:t.baseRefName}:{},t.headRefName?{headRefName:t.headRefName}:{});return Object.assign({type:"github_issue",mimeType:"application/github-issue",number:t.number,title:t.title,url:t.url},t.body?{body:t.body}:{})}},4012,[]);
|
|
15668
15668
|
__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AutocompletePopover=function({visible:e,anchorRef:c,options:v,selectedIndex:b,onSelect:A,isLoading:H,errorMessage:M,loadingText:j,emptyText:k}){const[F,I]=(0,o.useState)(null),T=(0,s.default)(),D=(0,p.useFloatingPanelPortalHostName)(),{shift:L}=(0,_.useKeyboardShift)(),N=(0,u.useSharedValue)(0);(0,o.useEffect)(()=>{if(!e||v.length>0&&b<0)return void I(null);let t=!1;const o=()=>{const e=c.current;var o;e&&Promise.all([(o=e,new Promise(e=>{o.measureInWindow((t,o,n,s)=>{e({x:t,y:o,width:n,height:s})})})),(0,p.measureFloatingPanelPortalHost)(D)]).then(([e,o])=>{!t&&o&&(I({x:e.x-o.x,y:e.y-o.y,width:e.width,hostHeight:o.height}),N.value=L.value)})};o();const s=requestAnimationFrame(o),l=["keyboardDidShow","keyboardDidHide"].map(e=>n.default.addListener(e,()=>requestAnimationFrame(o)));return()=>{t=!0,cancelAnimationFrame(s);for(const e of l)e.remove()}},[e,v.length,b,c,D,N,L,T.width,T.height]);const V=(0,o.useMemo)(()=>F?(0,y.inlineUnistylesStyle)({position:"absolute",bottom:F.hostHeight-F.y+S,left:F.x,width:F.width}):null,[F]),q=(0,u.useAnimatedStyle)((function({_worklet_538743382738_init_data:e,openShift:t,shift:o}){const n=()=>({transform:[{translateY:t.value-o.value}]});return n.__closure={openShift:t,shift:o},n.__workletHash=538743382738,n.__initData=e,n})({_worklet_538743382738_init_data:w,openShift:N,shift:L})),E=(0,o.useMemo)(()=>[V,q],[V,q]);return e&&F&&V?v.length>0&&b<0?null:(0,x.jsx)(l.Portal,{hostName:D,children:(0,x.jsx)(t.View,{style:P.overlay,pointerEvents:"box-none",children:(0,x.jsx)(h.default.View,{testID:"composer-autocomplete-popover",style:E,children:(0,x.jsx)(f.Autocomplete,{options:v,selectedIndex:b,onSelect:A,isLoading:H,errorMessage:M,loadingText:j,emptyText:k})})})}):null};var t=r(d[0]),o=r(d[1]),n=e(r(d[2]));r(d[3]);var s=e(r(d[4])),l=r(d[5]),u=r(d[6]),h=e(u),c=r(d[7]),f=r(d[8]),p=r(d[9]),_=r(d[10]),v=r(d[11]),y=r(d[12]),x=r(d[13]);const S=v.SPACING[3];const w={code:"function autocompletePopoverTsx1(){const{openShift,shift}=this.__closure;return{transform:[{translateY:openShift.value-shift.value}]};}"};const P=c.StyleSheet.create(()=>({overlay:{position:"absolute",top:0,right:0,bottom:0,left:0}}))},4013,[348,36,811,146,1426,875,444,56,4014,4016,3884,305,3471,279]);
|
|
15669
15669
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Autocomplete=function(t){const f=(0,s.c)(66),{options:y,selectedIndex:S,onSelect:w,isLoading:T,errorMessage:z,loadingText:v,emptyText:V,maxHeight:C}=t,M=void 0!==T&&T,L=void 0===C?220:C,{t:R}=(0,p.useTranslation)(),{theme:E}=(0,u.useUnistyles)();let H;f[0]!==v||f[1]!==R?(H=v??R("common.states.loading"),f[0]=v,f[1]=R,f[2]=H):H=f[2];const W=H;let k;f[3]!==V||f[4]!==R?(k=V??R("common.empty.noResults"),f[3]=V,f[4]=R,f[5]=k):k=f[5];const D=k,I=(0,c.useRef)(null);let A;f[6]===Symbol.for("react.memo_cache_sentinel")?(A=new Map,f[6]=A):A=f[6];const F=(0,c.useRef)(A),O=(0,c.useRef)(0),P=(0,c.useRef)(0);let q;f[7]!==S?(q=()=>{if(S<0)return;const t=F.current.get(S);if(!t)return;const n=(0,h.getAutocompleteScrollOffset)({currentOffset:P.current,viewportHeight:O.current,itemTop:t.top,itemHeight:t.height});Math.abs(n-P.current)<1||(P.current=n,I.current?.scrollTo({y:n,animated:!1}))},f[7]=S,f[8]=q):q=f[8];const G=q;let U;f[9]===Symbol.for("react.memo_cache_sentinel")?(U=()=>{I.current?.scrollToEnd({animated:!1}),requestAnimationFrame(()=>{I.current?.scrollToEnd({animated:!1})})},f[9]=U):U=f[9];const B=U;let J,K,N,Q,X,Y,Z;f[10]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{F.current.clear(),P.current=0},f[10]=J):J=f[10];f[11]!==y?(K=[y],f[11]=y,f[12]=K):K=f[12];(0,c.useEffect)(J,K),f[13]!==y.length?(N=()=>{0!==y.length&&B()},f[13]=y.length,f[14]=N):N=f[14];f[15]!==y?(Q=[y,B],f[15]=y,f[16]=Q):Q=f[16];(0,c.useEffect)(N,Q),f[17]!==G?(X=()=>{const t=requestAnimationFrame(G);return()=>{cancelAnimationFrame(t)}},f[17]=G,f[18]=X):X=f[18];f[19]!==G||f[20]!==y.length?(Y=[G,y.length],f[19]=G,f[20]=y.length,f[21]=Y):Y=f[21];(0,c.useEffect)(X,Y),f[22]!==G?(Z=t=>{O.current=t.nativeEvent.layout.height,G()},f[22]=G,f[23]=Z):Z=f[23];const $=Z;let ee;f[24]===Symbol.for("react.memo_cache_sentinel")?(ee=t=>{P.current=t.nativeEvent.contentOffset.y},f[24]=ee):ee=f[24];const te=ee;let ne;f[25]!==G?(ne=(t,n)=>{F.current.set(t,{top:n.nativeEvent.layout.y,height:n.nativeEvent.layout.height}),G()},f[25]=G,f[26]=ne):ne=f[26];const ie=ne,oe=y[S];let re;f[27]!==L?(re=[j.container,{maxHeight:L}],f[27]=L,f[28]=re):re=f[28];const le=re;if(M){let t,l;return f[29]!==W?(t=(0,x.jsx)(n.View,{style:j.emptyItem,children:(0,x.jsx)(o.Text,{style:j.emptyText,children:W})}),f[29]=W,f[30]=t):t=f[30],f[31]!==le||f[32]!==t?(l=(0,x.jsx)(n.View,{style:le,children:t}),f[31]=le,f[32]=t,f[33]=l):l=f[33],l}if(z){let t,l;return f[34]!==z?(t=(0,x.jsx)(n.View,{style:j.emptyItem,children:(0,x.jsxs)(o.Text,{style:j.emptyText,children:["Error: ",z]})}),f[34]=z,f[35]=t):t=f[35],f[36]!==le||f[37]!==t?(l=(0,x.jsx)(n.View,{style:le,children:t}),f[36]=le,f[37]=t,f[38]=l):l=f[38],l}if(0===y.length){let t,l;return f[39]!==D?(t=(0,x.jsx)(n.View,{style:j.emptyItem,children:(0,x.jsx)(o.Text,{style:j.emptyText,children:D})}),f[39]=D,f[40]=t):t=f[40],f[41]!==le||f[42]!==t?(l=(0,x.jsx)(n.View,{style:le,children:t}),f[41]=le,f[42]=t,f[43]=l):l=f[43],l}let se,ce,de,ae,ue;f[44]!==oe?(se="command"===oe?.kind&&oe.description?(0,x.jsxs)(n.View,{style:j.detailCard,children:[(0,x.jsx)(o.Text,{style:j.detailLabel,children:_(oe.label)??oe.label}),(0,x.jsx)(o.Text,{style:j.detailDescription,children:_(oe.description)}),oe.detail?(0,x.jsx)(o.Text,{style:j.detailHint,children:_(oe.detail)}):null]}):null,f[44]=oe,f[45]=se):se=f[45];if(f[46]!==ie||f[47]!==w||f[48]!==y||f[49]!==S||f[50]!==E){let t;f[52]!==ie||f[53]!==w||f[54]!==S||f[55]!==E?(t=(t,n)=>(0,x.jsx)(b,{index:n,option:t,isSelected:n===S,mutedColor:E.colors.foregroundMuted,onSelect:w,onRowLayout:ie},t.id),f[52]=ie,f[53]=w,f[54]=S,f[55]=E,f[56]=t):t=f[56],ce=y.map(t),f[46]=ie,f[47]=w,f[48]=y,f[49]=S,f[50]=E,f[51]=ce}else ce=f[51];f[57]!==$||f[58]!==ce?(de=(0,x.jsx)(l.ScrollView,{ref:I,onLayout:$,onContentSizeChange:B,onScroll:te,scrollEventThrottle:16,style:j.scrollView,contentContainerStyle:j.scrollContent,keyboardShouldPersistTaps:"always",children:ce}),f[57]=$,f[58]=ce,f[59]=de):de=f[59];f[60]!==le||f[61]!==de?(ae=(0,x.jsx)(n.View,{style:le,children:de}),f[60]=le,f[61]=de,f[62]=ae):ae=f[62];f[63]!==se||f[64]!==ae?(ue=(0,x.jsxs)(n.View,{style:j.outerWrapper,children:[se,ae]}),f[63]=se,f[64]=ae,f[65]=ue):ue=f[65];return ue};var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var u=r(d[10]),p=r(d[11]),f=r(d[12]),h=r(d[13]),x=r(d[14]);const y=/\u26A1|\uFE0F/gu;function _(t){if(!t)return t;const n=t.replace(y,"").trim();return n.length>0?n:void 0}function b(l){const c=(0,s.c)(24),{index:u,option:p,isSelected:h,mutedColor:y,onSelect:b,onRowLayout:S}=l;let w;c[0]!==p.label?(w=_(p.label)??p.label,c[0]=p.label,c[1]=w):w=c[1];const T=w;let z;c[2]!==p.description?(z=_(p.description),c[2]=p.description,c[3]=z):z=c[3];const v=z,V="directory"===p.kind||"file"===p.kind;let C;c[4]!==u||c[5]!==S?(C=t=>S(u,t),c[4]=u,c[5]=S,c[6]=C):C=c[6];const M=C;let L;c[7]!==b||c[8]!==p?(L=()=>b(p),c[7]=b,c[8]=p,c[9]=L):L=c[9];const R=L;let E;c[10]!==h?(E=t=>{const{hovered:n,pressed:o}=t,l=void 0!==n&&n;return[j.item,(l||o||h)&&j.itemActive]},c[10]=h,c[11]=E):E=c[11];const H=E;let W,k;return c[12]!==V||c[13]!==y||c[14]!==p.detail||c[15]!==p.kind||c[16]!==v||c[17]!==T?(W=V?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.View,{style:j.itemLeading,children:"directory"===p.kind?(0,x.jsx)(f.Folder,{size:14,color:y}):(0,x.jsx)(f.File,{size:14,color:y})}),(0,x.jsxs)(n.View,{style:j.itemMain,children:[(0,x.jsxs)(n.View,{style:j.itemHeader,children:[(0,x.jsx)(o.Text,{style:j.itemLabel,children:T}),_(p.detail)?(0,x.jsx)(o.Text,{style:j.itemDetail,children:_(p.detail)}):null]}),v?(0,x.jsx)(o.Text,{style:j.itemDescription,numberOfLines:1,children:v}):null]})]}):(0,x.jsxs)(n.View,{style:j.itemMainRow,children:[(0,x.jsx)(o.Text,{style:j.itemLabel,children:T}),v?(0,x.jsx)(o.Text,{style:j.itemDescriptionInline,numberOfLines:1,children:v}):null]}),c[12]=V,c[13]=y,c[14]=p.detail,c[15]=p.kind,c[16]=v,c[17]=T,c[18]=W):W=c[18],c[19]!==M||c[20]!==R||c[21]!==H||c[22]!==W?(k=(0,x.jsx)(t.Pressable,{onLayout:M,onPress:R,style:H,children:W}),c[19]=M,c[20]=R,c[21]=H,c[22]=W,c[23]=k):k=c[23],k}const j=u.StyleSheet.create(t=>({outerWrapper:{gap:t.spacing[1],uni__dependencies:[0]},detailCard:Object.assign({backgroundColor:t.colors.surface1,borderWidth:t.borderWidth[1],borderColor:t.colors.borderAccent,borderRadius:t.borderRadius.lg,paddingHorizontal:t.spacing[3],paddingVertical:t.spacing[3]},t.shadow.md,{uni__dependencies:[0]}),detailLabel:{color:t.colors.foreground,fontSize:t.fontSize.sm,fontWeight:t.fontWeight.normal,uni__dependencies:[0]},detailDescription:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,marginTop:t.spacing[1],uni__dependencies:[0]},detailHint:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,marginTop:t.spacing[1],uni__dependencies:[0]},container:Object.assign({backgroundColor:t.colors.surface1,borderWidth:t.borderWidth[1],borderColor:t.colors.borderAccent,borderRadius:t.borderRadius.lg,overflow:"hidden"},t.shadow.md,{uni__dependencies:[0]}),scrollView:{flexGrow:0,flexShrink:1},scrollContent:{paddingVertical:t.spacing[1],uni__dependencies:[0]},item:{flexDirection:"row",alignItems:"center",minHeight:36,paddingHorizontal:t.spacing[3],paddingVertical:t.spacing[2],uni__dependencies:[0]},itemLeading:{width:18,alignItems:"center",justifyContent:"center",marginRight:t.spacing[1],uni__dependencies:[0]},itemActive:{backgroundColor:t.colors.surface2,uni__dependencies:[0]},itemMain:{flex:1,minWidth:0},itemMainRow:{flex:1,minWidth:0,flexDirection:"row",alignItems:"center",gap:t.spacing[2],uni__dependencies:[0]},itemHeader:{flexDirection:"row",alignItems:"center",gap:t.spacing[2],uni__dependencies:[0]},itemLabel:{color:t.colors.foreground,fontSize:t.fontSize.sm,fontWeight:t.fontWeight.normal,uni__dependencies:[0]},itemDetail:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},itemDescription:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,marginTop:2,uni__dependencies:[0]},itemDescriptionInline:{flex:1,color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},emptyItem:{paddingHorizontal:t.spacing[3],paddingVertical:t.spacing[3],uni__dependencies:[0]},emptyText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.sm,uni__dependencies:[0]}}))},4014,[1572,348,711,690,349,36,182,234,146,1308,56,1573,1600,4015,279]);
|
|
@@ -15681,7 +15681,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15681
15681
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AttachmentPill=function(o){const l=(0,s.c)(21),{onOpen:b,onRemove:u,openAccessibilityLabel:y,removeAccessibilityLabel:j,disabled:w,testID:v,children:I}=o,P=void 0!==w&&w,C=(0,f.useIsCompactFormFactor)(),[L,A]=(0,c.useState)(!1),[z,H]=(0,c.useState)(!1),R=h.isNative||C,T=!(R||L||z)&&S.closeButtonHidden;let B;l[0]!==T?(B=[S.closeButton,T],l[0]=T,l[1]=B):B=l[1];const D=B;let O;l[2]===Symbol.for("react.memo_cache_sentinel")?(O=()=>A(!0),l[2]=O):O=l[2];const V=O;let W;l[3]===Symbol.for("react.memo_cache_sentinel")?(W=()=>A(!1),l[3]=W):W=l[3];const k=W;let F;l[4]===Symbol.for("react.memo_cache_sentinel")?(F=()=>H(!0),l[4]=F):F=l[4];const M=F;let U;l[5]===Symbol.for("react.memo_cache_sentinel")?(U=()=>H(!1),l[5]=U):U=l[5];const E=U;let N,X,q,G;l[6]!==I||l[7]!==P||l[8]!==b||l[9]!==y||l[10]!==v?(N=(0,_.jsx)(n.Pressable,{testID:v,onPress:b,disabled:P,onHoverIn:V,onHoverOut:k,accessibilityRole:"button",accessibilityLabel:y,style:S.frame,children:I}),l[6]=I,l[7]=P,l[8]=b,l[9]=y,l[10]=v,l[11]=N):N=l[11];l[12]===Symbol.for("react.memo_cache_sentinel")?(X=(0,_.jsx)(p,{size:12,uniProps:x}),l[12]=X):X=l[12];l[13]!==D||l[14]!==P||l[15]!==u||l[16]!==j?(q=(0,_.jsx)(n.Pressable,{onPress:u,disabled:P,onHoverIn:M,onHoverOut:E,hitSlop:8,accessibilityRole:"button",accessibilityLabel:j,style:D,children:X}),l[13]=D,l[14]=P,l[15]=u,l[16]=j,l[17]=q):q=l[17];l[18]!==q||l[19]!==N?(G=(0,_.jsxs)(t.View,{style:S.wrapper,children:[N,q]}),l[18]=q,l[19]=N,l[20]=G):G=l[20];return G},e.AttachmentFrame=function(o){const l=(0,s.c)(8),{onPress:c,accessibilityLabel:b,testID:u,children:h}=o;if(!c){let o;return l[0]!==h||l[1]!==u?(o=(0,_.jsx)(t.View,{testID:u,style:S.frame,children:h}),l[0]=h,l[1]=u,l[2]=o):o=l[2],o}let f;l[3]!==b||l[4]!==h||l[5]!==c||l[6]!==u?(f=(0,_.jsx)(n.Pressable,{testID:u,onPress:c,accessibilityRole:"button",accessibilityLabel:b,style:S.frame,children:h}),l[3]=b,l[4]=h,l[5]=c,l[6]=u,l[7]=f):f=l[7];return f},e.AttachmentLabel=function(n){const l=(0,s.c)(12),{icon:c,title:b,subtitle:u}=n;let h,f,y,p,x;l[0]!==c?(h=c?(0,_.jsx)(t.View,{style:S.labelIcon,children:c}):null,l[0]=c,l[1]=h):h=l[1];l[2]!==b?(f=(0,_.jsx)(o.Text,{style:S.labelTitle,numberOfLines:1,children:b}),l[2]=b,l[3]=f):f=l[3];l[4]!==u?(y=(0,_.jsx)(o.Text,{style:S.labelSubtitle,numberOfLines:1,children:u}),l[4]=u,l[5]=y):y=l[5];l[6]!==f||l[7]!==y?(p=(0,_.jsxs)(t.View,{style:S.labelTextColumn,children:[f,y]}),l[6]=f,l[7]=y,l[8]=p):p=l[8];l[9]!==h||l[10]!==p?(x=(0,_.jsxs)(t.View,{style:S.labelBody,children:[h,p]}),l[9]=h,l[10]=p,l[11]=x):x=l[11];return x},e.AttachmentThumbnail=function(o){const n=(0,s.c)(5),{metadata:c}=o,b=(0,y.useAttachmentPreviewUrl)(c),u=b??"";let h;n[0]!==u?(h={uri:u},n[0]=u,n[1]=h):h=n[1];const f=h;if(!b){let o;return n[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,_.jsx)(t.View,{style:S.thumbnailPlaceholder}),n[2]=o):o=n[2],o}let p;n[3]!==f?(p=(0,_.jsx)(l.Image,{source:f,style:S.thumbnail}),n[3]=f,n[4]=p):p=n[4];return p};var t=r(d[0]),o=r(d[1]),n=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var b=r(d[10]),u=r(d[11]),h=r(d[12]),f=r(d[13]),y=r(d[14]),_=r(d[15]);const p=(0,b.withUnistyles)(u.X),x=t=>({color:t.colors.foregroundMuted}),S=b.StyleSheet.create(t=>({wrapper:{position:"relative"},frame:{borderRadius:t.borderRadius.md,borderWidth:t.borderWidth[1],borderColor:t.colors.borderAccent,overflow:"hidden",uni__dependencies:[0]},labelBody:{height:48,maxWidth:260,flexDirection:"row",alignItems:"center",gap:t.spacing[2],paddingHorizontal:t.spacing[3],backgroundColor:t.colors.surface1,uni__dependencies:[0]},labelIcon:{width:18,alignItems:"center",justifyContent:"center"},labelTextColumn:{minWidth:0,flexShrink:1},labelTitle:{color:t.colors.foreground,fontSize:t.fontSize.sm,uni__dependencies:[0]},labelSubtitle:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},thumbnail:{width:48,height:48},thumbnailPlaceholder:{width:48,height:48,backgroundColor:t.colors.surface1,uni__dependencies:[0]},closeButton:{position:"absolute",top:-8,left:-8,width:24,height:24,borderRadius:12,backgroundColor:t.colors.surface2,borderWidth:t.borderWidth[1],borderColor:t.colors.border,alignItems:"center",justifyContent:"center",zIndex:1,uni__dependencies:[0]},closeButtonHidden:{opacity:0,pointerEvents:"none"}}))},4026,[348,711,1572,688,349,36,224,1308,234,146,56,1600,3407,3457,4027,279]);
|
|
15682
15682
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useAttachmentPreviewUrl=function(l){const[c,u]=(0,t.useState)(null),s=(0,t.useRef)(null),o=(0,t.useRef)(l);o.current=l;const v=l?.id,f=l?.storageType,h=l?.storageKey,w=l?.mimeType;return(0,t.useEffect)(()=>{let t=!1,l=null;const c=o.current;if(s.current=c??null,c)return(async()=>{try{const s=await(0,n.resolveAttachmentPreviewUrl)(c);if(t)return void await(0,n.releaseAttachmentPreviewUrl)({attachment:c,url:s});l=s,u(s)}catch(n){console.error("[attachments] Failed to resolve preview URL",{attachmentId:c.id,error:n}),t||u(null)}})(),()=>{t=!0;const c=s.current;l&&c&&(0,n.releaseAttachmentPreviewUrl)({attachment:c,url:l})};u(null)},[v,f,h,w]),c};var t=r(d[0]),n=r(d[1])},4027,[36,3920]);
|
|
15683
15683
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getAttachmentKey=c,e.removeWorkspaceAttachmentsMatching=o,e.removeSentContextAttachments=function(t){const n=t.filter(s).map(c);for(const t of n)o(t)};var t=r(d[0]),n=r(d[1]);function c(t){return"browser_element"===t.kind?JSON.stringify({type:"browser_element",url:t.attachment.url,selector:t.attachment.selector,tag:t.attachment.tag,text:t.attachment.text,html:t.attachment.outerHTML,comment:t.attachment.comment??null}):(0,n.isPullRequestContextAttachment)(t)||"chat_history"===t.kind?JSON.stringify({kind:t.kind,id:t.id}):JSON.stringify({type:"review",cwd:t.attachment.cwd,mode:t.attachment.mode,baseRef:t.attachment.baseRef??null,reviewDraftKey:t.reviewDraftKey,comments:t.attachment.comments.map(t=>({filePath:t.filePath,side:t.side,lineNumber:t.lineNumber,body:t.body}))})}function o(n){const{attachmentsByScope:o,setWorkspaceAttachments:s}=t.useWorkspaceAttachmentsStore.getState();for(const[t,h]of Object.entries(o)){const o=h.filter(t=>c(t)!==n);o.length!==h.length&&s({scopeKey:t,attachments:o})}}function s(t){return"browser_element"===t.kind||"chat_history"===t.kind||(0,n.isPullRequestContextAttachment)(t)}},4028,[3841,4010]);
|
|
15684
|
-
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){
|
|
15684
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){if("file"!==t.kind)return!0;const{status:n,fileId:l,path:o}=t.file.upload;return"uploaded"===n&&Boolean(l)&&Boolean(o)}Object.defineProperty(e,'__esModule',{value:!0}),e.isFileAttachmentUploaded=t,e.areAllAttachmentsUploaded=function(n){return n.every(t)},e.hasUploadsInFlight=function(t){return t.some(t=>"file"===t.kind&&"uploading"===t.file.upload.status)}},4029,[]);
|
|
15685
15685
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.FileAttachmentPill=function(s){const c=(0,n.c)(42),{attachment:u,index:_,disabled:j,onOpen:w,onRemove:C,onRetry:N}=s,P=u.file;let v;c[0]!==u||c[1]!==w?(v=()=>{w(u)},c[0]=u,c[1]=w,c[2]=v):v=c[2];const O=v;let R;c[3]!==_||c[4]!==C?(R=()=>{C(_)},c[3]=_,c[4]=C,c[5]=R):R=c[5];const M=R;let B;c[6]!==_||c[7]!==N?(B=()=>{N(_)},c[6]=_,c[7]=N,c[8]=B):B=c[8];const $=B,k=P.upload.status;let A;c[9]!==P.size||c[10]!==P.upload.error||c[11]!==k?(A="error"===k&&P.upload.error?`${(0,f.formatBytes)(P.size)} \xb7 ${P.upload.error}`:(0,f.formatBytes)(P.size),c[9]=P.size,c[10]=P.upload.error,c[11]=k,c[12]=A):A=c[12];const E=A;let L;c[13]!==P?(L=x(P),c[13]=P,c[14]=L):L=c[14];const U=`Remove file attachment ${P.fileName}`;let W,F,T;c[15]!==P?(W=b(P),c[15]=P,c[16]=W):W=c[16];c[17]!==W?(F=(0,y.jsx)(t.View,{style:S.pillIcon,children:W}),c[17]=W,c[18]=F):F=c[18];c[19]!==P.fileName?(T=(0,y.jsx)(l.Text,{style:S.pillFileName,numberOfLines:1,children:P.fileName}),c[19]=P.fileName,c[20]=T):T=c[20];const V="error"===k?S.pillMetaError:S.pillMeta;let D,Z,H,q,G;c[21]!==E||c[22]!==V?(D=(0,y.jsx)(l.Text,{style:V,numberOfLines:1,children:E}),c[21]=E,c[22]=V,c[23]=D):D=c[23];c[24]!==D||c[25]!==T?(Z=(0,y.jsxs)(t.View,{style:S.pillTextColumn,children:[T,D]}),c[24]=D,c[25]=T,c[26]=Z):Z=c[26];c[27]!==j||c[28]!==$||c[29]!==k?(H="error"===k?(0,y.jsx)(o.Pressable,{testID:"composer-file-attachment-retry",onPress:$,disabled:j,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Retry upload",style:S.retryButton,children:(0,y.jsx)(z,{size:h.ICON_SIZE.sm,uniProps:I})}):null,c[27]=j,c[28]=$,c[29]=k,c[30]=H):H=c[30];c[31]!==Z||c[32]!==H||c[33]!==F?(q=(0,y.jsxs)(t.View,{style:S.pillBody,children:[F,Z,H]}),c[31]=Z,c[32]=H,c[33]=F,c[34]=q):q=c[34];c[35]!==j||c[36]!==O||c[37]!==M||c[38]!==q||c[39]!==L||c[40]!==U?(G=(0,y.jsx)(p.AttachmentPill,{testID:"composer-file-attachment-pill",onOpen:O,onRemove:M,openAccessibilityLabel:L,removeAccessibilityLabel:U,disabled:j,children:q}),c[35]=j,c[36]=O,c[37]=M,c[38]=q,c[39]=L,c[40]=U,c[41]=G):G=c[41];return G};var t=r(d[0]),l=r(d[1]),o=r(d[2]),n=r(d[3]);r(d[4]),r(d[5]),r(d[6]),r(d[7]);var s=r(d[8]),c=r(d[9]),p=r(d[10]),u=r(d[11]),f=r(d[12]),h=r(d[13]),y=r(d[14]);function x(t){const l=`Open file attachment ${t.fileName}`;return"error"===t.upload.status&&t.upload.error?`${l}. Upload failed: ${t.upload.error}`:l}function b(t){return"uploading"===t.upload.status?(0,y.jsx)(u.FileUploadProgressRing,{progress:t.upload.progress}):"uploaded"===t.upload.status?(0,y.jsx)(_,{size:h.ICON_SIZE.sm,uniProps:I}):(0,y.jsx)(j,{size:h.ICON_SIZE.sm,uniProps:w})}const S=s.StyleSheet.create(t=>({pillBody:{minHeight:32,maxWidth:260,flexDirection:"row",alignItems:"center",gap:t.spacing[2],paddingHorizontal:t.spacing[3],paddingVertical:t.spacing[2],backgroundColor:t.colors.surface1,uni__dependencies:[0]},pillIcon:{width:18,alignItems:"center",justifyContent:"center"},pillTextColumn:{minWidth:0,flexShrink:1},pillFileName:{minWidth:0,flexShrink:1,color:t.colors.foreground,fontSize:t.fontSize.sm,uni__dependencies:[0]},pillMeta:{minWidth:0,flexShrink:1,color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},pillMetaError:{minWidth:0,flexShrink:1,color:t.colors.destructive,fontSize:t.fontSize.xs,uni__dependencies:[0]},retryButton:{width:20,height:20,alignItems:"center",justifyContent:"center"}})),_=(0,s.withUnistyles)(c.Paperclip),j=(0,s.withUnistyles)(c.CircleAlert),z=(0,s.withUnistyles)(c.RotateCw),I=t=>({color:t.colors.foregroundMuted}),w=t=>({color:t.colors.destructive})},4030,[348,711,1572,349,36,1308,234,146,56,1600,4026,4031,4032,305,279]);
|
|
15686
15686
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"PROGRESS_RING_CIRCUMFERENCE",{enumerable:!0,get:function(){return y}}),_e.clampUnitInterval=p,_e.progressRingDashoffset=_,_e.FileUploadProgressRing=function(t){const s=(0,e.c)(5),{progress:o}=t;let p;s[0]!==o?(p=_(o),s[0]=o,s[1]=p):p=s[1];const M=p;let P,R;s[2]===Symbol.for("react.memo_cache_sentinel")?(P=(0,c.jsx)(k,{cx:u,cy:u,r:f,fill:"none",strokeWidth:h,uniProps:v}),s[2]=P):P=s[2];s[3]!==M?(R=(0,c.jsxs)(n.default,{width:l,height:l,viewBox:`0 0 ${l} ${l}`,style:b.svg,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[P,(0,c.jsx)(k,{cx:u,cy:u,r:f,fill:"none",strokeWidth:h,strokeLinecap:"round",strokeDasharray:y,strokeDashoffset:M,uniProps:x})]}),s[3]=M,s[4]=R):R=s[4];return R};var e=r(d[0]);r(d[1]);var t,s=r(d[2]),n=(t=s)&&t.__esModule?t:{default:t},o=r(d[3]),c=r(d[4]);const l=18,u=9,f=7,h=2,y=2*Math.PI*f;function p(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):0}function _(e){return y*(1-p(e))}const b=o.StyleSheet.create({svg:{transform:[{rotate:"-90deg"}]}}),k=(0,o.withUnistyles)(s.Circle),v=e=>({stroke:e.colors.surface3}),x=e=>({stroke:e.colors.foregroundMuted})},4031,[349,36,1604,56,279]);
|
|
15687
15687
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatBytes=function(t){if(!Number.isFinite(t)||t<=0)return"0 B";if(t<1024)return`${t} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;return`${(t/1048576).toFixed(1)} MB`}},4032,[]);
|
|
@@ -16538,5 +16538,5 @@ __d(function(g,r,_i,a,_m,_e,d){"use strict";var e,t=r(d[0]),n=this&&this.__creat
|
|
|
16538
16538
|
__r(975);
|
|
16539
16539
|
__r(341);
|
|
16540
16540
|
__r(0);
|
|
16541
|
-
//# sourceMappingURL=/_expo/static/js/web/index-
|
|
16542
|
-
//# debugId=
|
|
16541
|
+
//# sourceMappingURL=/_expo/static/js/web/index-7ee29557905442c87b453da378ef2286.js.map
|
|
16542
|
+
//# debugId=ee9c011b-e94f-48c1-a8be-9449511e26fb
|