@dev-anywhere/relay 0.6.1 → 0.6.3

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.
@@ -44,8 +44,8 @@
44
44
  <link rel="icon" type="image/svg+xml" href="/brand-icon.svg" />
45
45
  <link rel="icon" type="image/png" sizes="64x64" href="/pwa-64x64.png" />
46
46
  <link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
47
- <script type="module" crossorigin src="/assets/index-CXT4gEaR.js"></script>
48
- <link rel="stylesheet" crossorigin href="/assets/index-Dmm_ocq_.css">
47
+ <script type="module" crossorigin src="/assets/index-BwXMl6yi.js"></script>
48
+ <link rel="stylesheet" crossorigin href="/assets/index-DaV7Gwjf.css">
49
49
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
50
50
  <body class="bg-background text-foreground">
51
51
  <div id="root"></div>
package/assets/web/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const c=e=>i(e,t),f={module:{uri:t},exports:o,require:c};s[t]=Promise.all(n.map(e=>f[e]||c(e))).then(e=>(r(...e),o))}}define(["./workbox-10a3128e"],function(e){"use strict";importScripts("notification-sw.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"notification-sw.js",revision:"ee0be62f4c1f36625b92680b3060becb"},{url:"index.html",revision:"aa5f2f91104adcc66cc14f85c755800f"},{url:"assets/index-Dmm_ocq_.css",revision:null},{url:"assets/index-CXT4gEaR.js",revision:null},{url:"assets/fvad-mBAhtF0y.js",revision:null},{url:"assets/fvad-DYxbW2my.wasm",revision:null},{url:"assets/__vite-browser-external-BIHI7g3E.js",revision:null},{url:"brand-icon.svg",revision:"efe8505a7b7ef12cbb3a4bcd286254bd"},{url:"maskable-icon-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-192x192.png",revision:"4e4603ce0f22528eded553ba7f2ffbc5"},{url:"pwa-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-64x64.png",revision:"d322160ad1dc08ba9e133cb3d296ae63"},{url:"manifest.webmanifest",revision:"4daa295c44052f4ce59a1fcfd6f06ab8"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/proxy(\/|$|\?)/,/^\/client(\/|$|\?)/,/^\/voice(\/|$|\?)/,/^\/fonts\//,/^\/health/,/^\/status/,/^\/api\//]})),e.registerRoute(/^\/fonts\/.*\.(woff2|woff|ttf|otf|css)$/,new e.CacheFirst({cacheName:"dev-anywhere-fonts",plugins:[new e.ExpirationPlugin({maxEntries:40,maxAgeSeconds:15552e3})]}),"GET")});
1
+ if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const f=e=>i(e,t),l={module:{uri:t},exports:o,require:f};s[t]=Promise.all(n.map(e=>l[e]||f(e))).then(e=>(r(...e),o))}}define(["./workbox-10a3128e"],function(e){"use strict";importScripts("notification-sw.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"notification-sw.js",revision:"ee0be62f4c1f36625b92680b3060becb"},{url:"index.html",revision:"18bc98b5e0ee053b75bd46f8233b4f36"},{url:"assets/index-DaV7Gwjf.css",revision:null},{url:"assets/index-BwXMl6yi.js",revision:null},{url:"assets/fvad-DYxbW2my.wasm",revision:null},{url:"assets/fvad-BQ0eMlem.js",revision:null},{url:"assets/__vite-browser-external-BIHI7g3E.js",revision:null},{url:"brand-icon.svg",revision:"efe8505a7b7ef12cbb3a4bcd286254bd"},{url:"maskable-icon-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-192x192.png",revision:"4e4603ce0f22528eded553ba7f2ffbc5"},{url:"pwa-512x512.png",revision:"e762ff07cdedcd78f8650f59c6881727"},{url:"pwa-64x64.png",revision:"d322160ad1dc08ba9e133cb3d296ae63"},{url:"manifest.webmanifest",revision:"4daa295c44052f4ce59a1fcfd6f06ab8"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/proxy(\/|$|\?)/,/^\/client(\/|$|\?)/,/^\/voice(\/|$|\?)/,/^\/fonts\//,/^\/health/,/^\/status/,/^\/api\//]})),e.registerRoute(/^\/fonts\/.*\.(woff2|woff|ttf|otf|css)$/,new e.CacheFirst({cacheName:"dev-anywhere-fonts",plugins:[new e.ExpirationPlugin({maxEntries:40,maxAgeSeconds:15552e3})]}),"GET")});
@@ -542,7 +542,9 @@ var ControlErrorCode = {
542
542
  PATH_ACCESS_DENIED: "PATH_ACCESS_DENIED",
543
543
  PROXY_OFFLINE: "PROXY_OFFLINE",
544
544
  SESSION_NOT_FOUND: "SESSION_NOT_FOUND",
545
+ SESSION_ALREADY_ACTIVE: "SESSION_ALREADY_ACTIVE",
545
546
  PROVIDER_UNSUPPORTED: "PROVIDER_UNSUPPORTED",
547
+ APPROVAL_POLICY_UNSUPPORTED: "APPROVAL_POLICY_UNSUPPORTED",
546
548
  WORKER_START_FAILED: "WORKER_START_FAILED",
547
549
  PROCESS_START_FAILED: "PROCESS_START_FAILED",
548
550
  UNKNOWN: "UNKNOWN"
@@ -951,7 +953,8 @@ var relayControlDefinitions = [
951
953
  // 重连或换设备不会隐式重排既有终端内容。
952
954
  cols: z9.number().int().positive().max(PTY_INITIAL_MAX_COLS).optional(),
953
955
  rows: z9.number().int().positive().max(PTY_INITIAL_MAX_ROWS).optional(),
954
- // 透传给 claude CLI --permission-mode, undefined 时 proxy 兜底为 "default"
956
+ // Provider 级审批策略。Claude 未提供时仍使用其 default;Codex 未提供时尊重
957
+ // 用户本机配置,不由 DEV Anywhere 注入覆盖值。
955
958
  permissionMode: z9.enum(["default", "auto", "acceptEdits", "plan", "bypassPermissions", "dontAsk"]).optional()
956
959
  }, "client_to_proxy"),
957
960
  control("session_create_response", {
@@ -964,8 +967,18 @@ var relayControlDefinitions = [
964
967
  mode: z9.enum(sessionModeValues).optional(),
965
968
  provider: z9.enum(providerValues).optional(),
966
969
  ptyOwner: z9.enum(ptyOwnerValues).optional(),
970
+ // Codex 原生 thread 被其他进程持有时返回真实锁持有 PID;无法探测时省略。
971
+ activeWriterPid: z9.number().int().positive().optional(),
967
972
  ...RequestErrorShape
968
973
  }, "proxy_to_client"),
974
+ // 会话创建响应已经成功返回、页面已进入终端后,Provider 仍可能在 bootstrap 阶段
975
+ // 非零退出。把可识别的运行时错误结构化推给 Web,避免关键错误只留在终端闪屏里。
976
+ control("session_runtime_error", {
977
+ sessionId: IdSchema,
978
+ error: z9.string(),
979
+ errorCode: ControlErrorCodeSchema,
980
+ activeWriterPid: z9.number().int().positive().optional()
981
+ }, "proxy_to_client"),
969
982
  // 客户端请求会话历史消息,client -> proxy
970
983
  control("session_messages_request", {
971
984
  ...RequestIdShape,
@@ -5230,4 +5243,4 @@ export {
5230
5243
  parseRelayChaosFromEnv,
5231
5244
  createRelayServer
5232
5245
  };
5233
- //# sourceMappingURL=chunk-TWQN6HNC.js.map
5246
+ //# sourceMappingURL=chunk-SDL4V2RE.js.map