@minimax-ai/code 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ This changelog covers important changes that directly affect MCode TUI users. It
7
7
 
8
8
  Internal refactors, test-only changes, and changes limited to other product surfaces are excluded.
9
9
 
10
+ ## 0.3.9 · 2026-09-07
11
+
12
+ ### Fixed
13
+
14
+ - `/btw` and `/side` sessions now follow the parent session permission mode without an extra
15
+ confirmation step. Full access needs no additional approval; other modes retain their normal checks.
16
+ - Draft recovery cleanup skips missing files, preventing repeated no-op deletions from exhausting
17
+ the safety budget and disrupting later operations.
18
+
10
19
  ## 0.3.8 · 2026-09-07
11
20
 
12
21
  ### Improved
@@ -8,6 +8,13 @@ TUI 正式版中用户能直接感知的重要变化。收录范围以 TUI 用
8
8
 
9
9
  仅内部重构、测试调整,或只影响其他产品界面且不改变 TUI 行为的变化不记录。
10
10
 
11
+ ## 0.3.9 · 2026-09-07
12
+
13
+ ### 问题修复
14
+
15
+ - `/btw` 和 `/side` 侧会话沿用主会话的当前权限模式,不再追加独立确认;Full access 下无需额外确认,其他模式仍按正常权限规则处理。
16
+ - 草稿恢复清理会跳过不存在的文件,避免反复无效删除耗尽安全预算、干扰后续操作。
17
+
11
18
  ## 0.3.8 · 2026-09-07
12
19
 
13
20
  ### 体验改进
package/README.md CHANGED
@@ -80,9 +80,8 @@ Inside the TUI, use `/export` to save the current Session as Markdown.
80
80
  Use `/btw [question]` (or `/side [question]`) to fork a temporary side conversation from the latest
81
81
  committed conversation boundary without interrupting a running main task. The side conversation
82
82
  inherits the main conversation's history as read-only context, keeps normal tool permissions, and is
83
- asked not to modify anything unless you explicitly request it; a mutation-capable tool additionally
84
- asks for confirmation before running in a side conversation, regardless of the current permission
85
- mode. Press `Ctrl+/` to switch between the
83
+ asked not to modify anything unless you explicitly request it; it follows the main session's current permission mode without an additional confirmation step.
84
+ Full access does not prompt; other modes continue to apply their normal permission rules. Press `Ctrl+/` to switch between the
86
85
  side and main views without ending either (`/parent` also returns from the side view); the Composer
87
86
  footer mirrors the main task's state (for example `main needs approval` or `main finished`) while
88
87
  you are on the side view.
package/README.zh-CN.md CHANGED
@@ -75,7 +75,7 @@ Center,统一浏览最近/已归档 Session、切换当前 workspace/全部范
75
75
  在 TUI 中使用 `/export`,可以把当前 Session 导出为 Markdown。
76
76
 
77
77
  使用 `/btw [问题]`(或
78
- `/side [问题]`),可以从最近一个已提交的会话边界 fork 出一个临时侧会话,主任务继续运行且不会被中断。侧会话以只读上下文继承主会话历史,工具权限保持与当前会话一致,并被要求除非你明确请求,否则不做任何修改;具备写能力的工具在侧会话中执行前必须经你确认,无论当前权限模式是什么。按
78
+ `/side [问题]`),可以从最近一个已提交的会话边界 fork 出一个临时侧会话,主任务继续运行且不会被中断。侧会话以只读上下文继承主会话历史,工具权限保持与当前会话一致,并被要求除非你明确请求,否则不做任何修改;侧会话沿用主会话的当前权限模式,不追加独立确认;Full access 下无需额外确认,其他模式仍按正常权限规则处理。按
79
79
  `Ctrl+/` 可在侧会话与主会话视图之间来回切换而不结束任何一方(在侧会话中执行 `/parent`
80
80
  也会回到主视图);处于侧会话视图时,Composer
81
81
  底部会同步主任务状态(例如 `main needs approval`、`main finished`)。在空 Composer 中按
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __mavis_cR } from "module"; import { basename as __mavis_basename, dirname as __mavis_dirname, join as __mavis_join } from "path"; import { fileURLToPath as __mavis_fileURLToPath, pathToFileURL as __mavis_pathToFileURL } from "url"; const __mavis_tuiCurrentModuleDir = __mavis_dirname(__mavis_fileURLToPath(import.meta.url)); const __mavis_tuiPackageRoot = __mavis_basename(__mavis_tuiCurrentModuleDir) === "chunks" ? __mavis_dirname(__mavis_tuiCurrentModuleDir) : __mavis_tuiCurrentModuleDir; const __mavis_tuiPackageEntryUrl = __mavis_pathToFileURL(__mavis_join(__mavis_tuiPackageRoot, "cli.js")).href; const require = __mavis_cR(__mavis_tuiPackageEntryUrl); const __dirname = __mavis_tuiPackageRoot;
2
- import{c as d,i as f}from"./chunk-676PV6PV.js";var h=/<(?:deliver[-_]assets|media|publish[_-]artifact|preview_card|genui-|mavis-widget|mavis-thinking|mavis-progress|think|final|permission-(?:ask|response)|questionnaire-(?:ask|response))\b|^\s*preview_cards?:\s*$/imu;function L(t){let n=k(t);return n.assets.length===0?n.text:[n.text,T(n.assets)].filter(Boolean).join(`
2
+ import{c as d,i as f}from"./chunk-U2NOFGEC.js";var h=/<(?:deliver[-_]assets|media|publish[_-]artifact|preview_card|genui-|mavis-widget|mavis-thinking|mavis-progress|think|final|permission-(?:ask|response)|questionnaire-(?:ask|response))\b|^\s*preview_cards?:\s*$/imu;function L(t){let n=k(t);return n.assets.length===0?n.text:[n.text,T(n.assets)].filter(Boolean).join(`
3
3
 
4
4
  `)}function k(t){if(!t||!h.test(t))return{text:t,assets:[]};let n=d(t),e=[],s=[],r="\uE000mcode-protected";for(;t.includes(r);)r+="-";let i=!1,o=n.map(a=>{if(a.type==="protected"){let c=e.push(a.content)-1;return`${r}-${c}\uE001`}return h.test(a.content)?(i=!0,A(a.content,s)):a.content}).join("");if(!i)return{text:t,assets:[]};let u=_(o);e.forEach((a,c)=>{u=u.replace(`${r}-${c}\uE001`,a)});let l=[...new Map(s.map(a=>[a.path.trim(),a])).values()];return{text:u,assets:l.map(a=>({path:a.path.trim(),...a.name?.trim()?{name:a.name.trim()}:{}}))}}function A(t,n){let e=t;return e=p(e,"mavis-thinking"),e=p(e,"think"),e=w(e,"mavis-progress"),e=p(e,"permission-ask"),e=p(e,"permission-response"),e=p(e,"questionnaire-ask"),e=p(e,"questionnaire-response"),e=e.replace(/<\/?final\b[^>]*>/giu,""),e=y(e),e=$(e),e=D(e),e=E(e),e=I(e,n),e=e.replace(/<\/?(?:deliver-assets|deliver_assets)\b[^>]*>/giu,"file attachment").replace(/<media\b[^>]*\/?>/giu,"file attachment").replace(/<media\b[^>]*$/iu,""),e}function p(t,n){let e=new RegExp(`<${n}\\b[^>]*>((?:(?!<${n}\\b)[\\s\\S])*?)<\\/${n}\\s*>`,"giu"),s=t,r=t.replace(e,"");for(;r!==s;)s=r,r=r.replace(e,"");return r}function w(t,n){let e=new RegExp(`<${n}\\b[^>]*>((?:(?!<${n}\\b)[\\s\\S])*?)<\\/${n}\\s*>`,"giu"),s=t,r=t.replace(e,(i,o)=>o.trim());for(;r!==s;)s=r,r=r.replace(e,(i,o)=>o.trim());return r}function y(t){let n=/<mavis-widget\b([^>]*)>([\s\S]*?)<\/mavis-widget\s*>/giu,e=t.replace(n,(s,r,i)=>{let o=/<mavis-fallback\b[^>]*>([\s\S]*?)<\/mavis-fallback\s*>/iu.exec(i)?.[1];return o?.trim()?o.trim():v(g(r))});return e=e.replace(/<mavis-widget\b([^>]*)>[\s\S]*$/iu,(s,r)=>v(g(r))),e.replace(/<mavis-widget\b[^>]*$/iu,"Interactive content is loading\u2026")}function v(t){let n=t.kind?.trim(),e=t.title?.trim();return n&&e?`Interactive ${n}: ${e} (open in Desktop).`:e?`Interactive content: ${e} (open in Desktop).`:"Interactive content available in Desktop."}function $(t){let n=/<genui-([\w-]+)\b([^>]*)>[\s\S]*?<\/genui-\1\s*>/giu,e=/<genui-([\w-]+)\b([^>]*?)\/\s*>/giu,s=t.replace(n,(r,i,o)=>b(i,g(o)));return s=s.replace(e,(r,i,o)=>b(i,g(o))),s.replace(/<genui-[\w-]*\b[^>]*$/iu,"Interactive content is loading\u2026")}function b(t,n){if(t.toLocaleLowerCase()==="mcp-auth"){let e=n.label?.trim()||n["server-id"]?.trim();return e?`MCP authorization required: ${e} (open in Desktop).`:"MCP authorization required (open in Desktop)."}if(t.toLocaleLowerCase()==="agent-team-recommendation"){let e=n.status?.trim().toLocaleLowerCase();return e==="accepted"?"Team recommendation accepted.":e==="skipped"?"Team recommendation skipped.":"Team recommendation available in Desktop."}return"Interactive content available in Desktop."}function g(t){let n={},e=/([\w-]+)\s*=\s*(["'])(.*?)\2/gu,s;for(;(s=e.exec(t))!==null;){let r=s[1],i=s[3];r&&i!==void 0&&(n[r]=C(i))}return n}function D(t){let n=/<(deliver-assets|deliver_assets)\b[^>]*>\s*<\/\1\s*>/giu,e=t,s=t.replace(n,"");for(;s!==e;)e=s,s=s.replace(n,"");return s}function C(t){return t.replace(/&quot;/gu,'"').replace(/&apos;|&#39;/gu,"'").replace(/&lt;/gu,"<").replace(/&gt;/gu,">").replace(/&amp;/gu,"&")}function E(t){let n=/<\/?(deliver-assets|deliver_assets)\b[^>]*>/giu,e=[],s;for(;(s=n.exec(t))!==null;)e.push({start:s.index,end:n.lastIndex,name:s[1]?.toLocaleLowerCase()??"",closing:s[0].startsWith("</")});if(e.length===0)return t;let r=[],i=new Set;if(e.forEach((l,a)=>{if(!l.closing){r.push(a);return}for(let c=r.length-1;c>=0;c-=1){let m=r[c];if(!(m===void 0||e[m]?.name!==l.name)){r.splice(c,1),i.add(m),i.add(a);return}}}),i.size===e.length)return t;let o=0,u="";return e.forEach((l,a)=>{u+=t.slice(o,l.start),u+=i.has(a)?t.slice(l.start,l.end):"file attachment",o=l.end}),u+t.slice(o)}function I(t,n){let e=t;for(let s=0;s<3;s+=1){let r=f(e),i=R(r);if(i.assets.length===0)break;n.push(...i.assets),e=i.text}return e}function R(t){let n=[],e=[];for(let s of t)s.type==="deliver-assets"||s.type==="image-gallery"?e.push(...s.items):s.content.trim()&&n.push(s.content.trim());return{text:n.join(`
5
5