@minimax-ai/code 0.6.3 → 0.6.5

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +58 -2
  2. package/CHANGELOG.zh-CN.md +30 -1
  3. package/README.md +59 -0
  4. package/README.zh-CN.md +41 -0
  5. package/assets/agents/mavis/skills/minimax-code-product/SKILL.md +7 -6
  6. package/assets/agents/mavis/skills/minimax-code-product/references/account-models.md +13 -4
  7. package/assets/agents/mavis/skills/minimax-code-product/references/agents.md +1 -1
  8. package/assets/agents/mavis/skills/minimax-code-product/references/extensions.md +1 -1
  9. package/assets/agents/mavis/skills/minimax-code-product/references/workflows.md +1 -1
  10. package/chunks/{anthropic-HVUDB2UQ.js → anthropic-3PPUMUI5.js} +1 -1
  11. package/chunks/{application-JOJGAMXA.js → application-ZJ5NM3DF.js} +1 -1
  12. package/chunks/{auth-command-CO6IUQQ5.js → auth-command-OLQL7FZY.js} +1 -1
  13. package/chunks/{azure-openai-responses-2XUN7HBR.js → azure-openai-responses-TINWNAR2.js} +1 -1
  14. package/chunks/{chunk-EL5XOH23.js → chunk-2XPMNZVR.js} +541 -536
  15. package/chunks/{chunk-VN3EYAMT.js → chunk-37SOT72H.js} +1 -1
  16. package/chunks/{chunk-Z4VKGZFA.js → chunk-3FETZOUF.js} +30 -30
  17. package/chunks/{chunk-WJZDMLYV.js → chunk-3MHUE4DM.js} +1 -1
  18. package/chunks/{chunk-UJCQHSQD.js → chunk-76MC32T2.js} +1 -1
  19. package/chunks/{chunk-U7ACBEGU.js → chunk-JIWEZSQY.js} +676 -675
  20. package/chunks/{chunk-7CKVJIAL.js → chunk-JL7ZXU6T.js} +1 -1
  21. package/chunks/{chunk-YC47AWPX.js → chunk-LM3FMMAB.js} +1 -1
  22. package/chunks/{chunk-GPPNWE6W.js → chunk-LQIEYG3O.js} +8 -3
  23. package/chunks/{chunk-T6KXDH7B.js → chunk-NFVRVRCL.js} +1 -1
  24. package/chunks/{chunk-YPNDEPC5.js → chunk-NXXFMBAV.js} +1 -1
  25. package/chunks/{chunk-HVP63X6W.js → chunk-ONRKFD6S.js} +1 -1
  26. package/chunks/{chunk-T4F6MBL2.js → chunk-OSA3A5UV.js} +1 -1
  27. package/chunks/chunk-RDUENEEQ.js +2 -0
  28. package/chunks/{chunk-XYED4XTT.js → chunk-TWO6GIVD.js} +99 -99
  29. package/chunks/{chunk-5GISCO53.js → chunk-U5SHMJ7Y.js} +1 -1
  30. package/chunks/{chunk-G64EFDMH.js → chunk-UOE7W4PK.js} +1 -1
  31. package/chunks/{data-dir-4GSZVAMG.js → data-dir-KFZIXVT7.js} +1 -1
  32. package/chunks/{dist-DQKO47DC.js → dist-PBZ5PIWM.js} +1 -1
  33. package/chunks/{google-R5XVVF36.js → google-W4KKPJIU.js} +1 -1
  34. package/chunks/{google-vertex-IQCRUNEW.js → google-vertex-K2VBU5YX.js} +1 -1
  35. package/chunks/{install-source-KWOIXLTZ.js → install-source-REWTEDE3.js} +1 -1
  36. package/chunks/{launcher-ST7GNBTY.js → launcher-BK5UP7KA.js} +159 -156
  37. package/chunks/{lifecycle-MEDWAANQ.js → lifecycle-RMTLVDXY.js} +1 -1
  38. package/chunks/main-ANJ6TEDF.js +9 -0
  39. package/chunks/{mistral-YGQW5B3K.js → mistral-5IVMGNIC.js} +1 -1
  40. package/chunks/{openai-codex-responses-2JCAFRE3.js → openai-codex-responses-HMN5LXLI.js} +1 -1
  41. package/chunks/{openai-completions-HCLBIIWV.js → openai-completions-A22BIUQL.js} +1 -1
  42. package/chunks/openai-responses-7MFUVUZA.js +2 -0
  43. package/chunks/{plugin-command-EZNOWONW.js → plugin-command-AXB4A2DP.js} +1 -1
  44. package/chunks/{provider-command-OJLRQ76A.js → provider-command-2MVBCAF6.js} +1 -1
  45. package/chunks/{run-acp-command-Z5CVNHZZ.js → run-acp-command-4JFNMYRS.js} +2 -2
  46. package/chunks/{run-exec-command-MT4Y6VPF.js → run-exec-command-SAUHM46S.js} +8 -8
  47. package/chunks/{update-XSUZQSPB.js → update-HOQ5YQFF.js} +1 -1
  48. package/cli.js +2 -2
  49. package/package.json +1 -1
  50. package/chunks/chunk-22LFXEGJ.js +0 -2
  51. package/chunks/main-7X6VQMDB.js +0 -9
  52. package/chunks/openai-responses-65UFQVVM.js +0 -2
@@ -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{x as A}from"./chunk-22LFXEGJ.js";import{a as U}from"./chunk-HQ2U4QVQ.js";import{e as _}from"./chunk-D76SO2ME.js";var k=_(U(),1);import{createHash as $,randomUUID as O}from"node:crypto";import{cpSync as se,existsSync as u,mkdirSync as V,readdirSync as J,readFileSync as P,renameSync as L,rmSync as g,writeFileSync as M}from"node:fs";import s from"node:path";var v=".mcode-update-pending.json",I=".mcode-active",q=".mcode-update-activator.json",B=".mcode-update-activation-status.json",H=1,T=1,W=1,G=3e4,Q="MCODE_UPDATE_PARENT_PID";function w(e,r=process.platform){let t=N(r);return r==="win32"?t.join(e,"node_modules"):t.join(e,"lib","node_modules")}function K(e,r,t=process.platform){return N(t).join(w(e,t),...r.split("/"))}function z(e,r,t=process.platform){let n=N(t),o=t==="win32"?["mcode.cmd","mcode.ps1"]:["mcode"],i=t==="win32"?"":"bin";return o.map(c=>{let a=n.join(e,i,c);return{activePath:a,stagedPath:n.join(r,i,c),backupPath:`${a}.mcode-update-backup`}})}function ue(e,r,t=process.platform){let n=K(e,r,t),o=s.join(n,"package.json"),i=JSON.parse(P(o,"utf8")),c=F(i.bin,"mcode"),a=F(i.bin,"mcode-tools");if(i.name!==r||typeof i.version!="string"||!c||!a)throw new Error(`MCode package metadata is invalid at ${o}.`);return{packageRoot:n,version:i.version,binEntry:c,mcodeToolsBinEntry:a}}async function fe(e,r,t,n){await S(e,t,[s.join(r.packageRoot,...r.binEntry.split("/")),"--version"],"MCode",o=>o===n),await S(e,t,[s.join(r.packageRoot,...r.mcodeToolsBinEntry.split("/")),"--version"],"mcode-tools",o=>o.length>0),await S(e,t,["--input-type=module","--eval",`
2
+ import{x as A}from"./chunk-RDUENEEQ.js";import{a as U}from"./chunk-HQ2U4QVQ.js";import{e as _}from"./chunk-D76SO2ME.js";var k=_(U(),1);import{createHash as $,randomUUID as O}from"node:crypto";import{cpSync as se,existsSync as u,mkdirSync as V,readdirSync as J,readFileSync as P,renameSync as L,rmSync as g,writeFileSync as M}from"node:fs";import s from"node:path";var v=".mcode-update-pending.json",I=".mcode-active",q=".mcode-update-activator.json",B=".mcode-update-activation-status.json",H=1,T=1,W=1,G=3e4,Q="MCODE_UPDATE_PARENT_PID";function w(e,r=process.platform){let t=N(r);return r==="win32"?t.join(e,"node_modules"):t.join(e,"lib","node_modules")}function K(e,r,t=process.platform){return N(t).join(w(e,t),...r.split("/"))}function z(e,r,t=process.platform){let n=N(t),o=t==="win32"?["mcode.cmd","mcode.ps1"]:["mcode"],i=t==="win32"?"":"bin";return o.map(c=>{let a=n.join(e,i,c);return{activePath:a,stagedPath:n.join(r,i,c),backupPath:`${a}.mcode-update-backup`}})}function ue(e,r,t=process.platform){let n=K(e,r,t),o=s.join(n,"package.json"),i=JSON.parse(P(o,"utf8")),c=F(i.bin,"mcode"),a=F(i.bin,"mcode-tools");if(i.name!==r||typeof i.version!="string"||!c||!a)throw new Error(`MCode package metadata is invalid at ${o}.`);return{packageRoot:n,version:i.version,binEntry:c,mcodeToolsBinEntry:a}}async function fe(e,r,t,n){await S(e,t,[s.join(r.packageRoot,...r.binEntry.split("/")),"--version"],"MCode",o=>o===n),await S(e,t,[s.join(r.packageRoot,...r.mcodeToolsBinEntry.split("/")),"--version"],"mcode-tools",o=>o.length>0),await S(e,t,["--input-type=module","--eval",`
3
3
  import { createRequire } from 'node:module';
4
4
  const require = createRequire(process.argv[1]);
5
5
  const Database = require('better-sqlite3');
@@ -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{a as b}from"./chunk-PWQHCWDV.js";import{b as _}from"./chunk-II4JKPH5.js";import{d as S,h as $,k as T}from"./chunk-G64EFDMH.js";import{a as x}from"./chunk-WFWSBUYD.js";function C(i,s){let a={v:1,id:i};return s&&(a.phase=s),JSON.stringify(a)}function w(i){if(i){if(i.startsWith("{"))try{let s=JSON.parse(i);if(s.v===1&&typeof s.id=="string")return s.phase==="commentary"||s.phase==="final_answer"?{id:s.id,phase:s.phase}:{id:s.id}}catch{}return{id:i}}}function W(i,s,a,m){let l=[],c=e=>{let t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return(t.length>64?t.slice(0,64):t).replace(/_+$/,"")},g=e=>{let t=`fc_${b(e)}`;return t.length>64?t.slice(0,64):t},y=(e,t,o)=>{if(!a.has(i.provider)||!e.includes("|"))return c(e);let[h,u]=e.split("|"),p=c(h),d=o.provider!==i.provider||o.api!==i.api?g(u):c(u);return d.startsWith("fc_")||(d=c(`fc_${d}`)),`${p}|${d}`},k=T(s.messages,i,y);if((m?.includeSystemPrompt??!0)&&s.systemPrompt){let e=i.compat,t=i.reasoning&&e?.supportsDeveloperRole!==!1?"developer":"system";l.push({role:t,content:x(s.systemPrompt)})}let n=0;for(let e of k){if(e.role==="user")if(typeof e.content=="string")l.push({role:"user",content:[{type:"input_text",text:x(e.content)}]});else{let t=e.content.map(o=>o.type==="text"?{type:"input_text",text:x(o.text)}:{type:"input_image",detail:"auto",image_url:`data:${o.mimeType};base64,${o.data}`});if(t.length===0)continue;l.push({role:"user",content:t})}else if(e.role==="assistant"){let t=[],o=e,h=o.model!==i.id&&o.provider===i.provider&&o.api===i.api,u=0;for(let p of e.content)if(p.type==="thinking"){if(p.thinkingSignature){let r=JSON.parse(p.thinkingSignature);t.push(r)}}else if(p.type==="text"){let r=p,d=w(r.textSignature),I=u===0?`msg_pi_${n}`:`msg_pi_${n}_${u}`;u++;let f=d?.id;f?f.length>64&&(f=`msg_${b(f)}`):f=I,t.push({type:"message",role:"assistant",content:[{type:"output_text",text:x(r.text),annotations:[]}],status:"completed",id:f,phase:d?.phase})}else if(p.type==="toolCall"){let r=p,[d,I]=r.id.split("|"),f=I;h&&f?.startsWith("fc_")&&(f=void 0),t.push({type:"function_call",id:f,call_id:d,name:r.name,arguments:JSON.stringify(r.arguments)})}if(t.length===0)continue;l.push(...t)}else if(e.role==="toolResult"){let t=e.content.filter(r=>r.type==="text").map(r=>r.text).join(`
2
+ import{a as b}from"./chunk-PWQHCWDV.js";import{b as _}from"./chunk-II4JKPH5.js";import{d as S,i as $,l as T}from"./chunk-UOE7W4PK.js";import{a as x}from"./chunk-WFWSBUYD.js";function C(i,s){let a={v:1,id:i};return s&&(a.phase=s),JSON.stringify(a)}function w(i){if(i){if(i.startsWith("{"))try{let s=JSON.parse(i);if(s.v===1&&typeof s.id=="string")return s.phase==="commentary"||s.phase==="final_answer"?{id:s.id,phase:s.phase}:{id:s.id}}catch{}return{id:i}}}function W(i,s,a,m){let l=[],c=e=>{let t=e.replace(/[^a-zA-Z0-9_-]/g,"_");return(t.length>64?t.slice(0,64):t).replace(/_+$/,"")},g=e=>{let t=`fc_${b(e)}`;return t.length>64?t.slice(0,64):t},y=(e,t,o)=>{if(!a.has(i.provider)||!e.includes("|"))return c(e);let[h,u]=e.split("|"),p=c(h),d=o.provider!==i.provider||o.api!==i.api?g(u):c(u);return d.startsWith("fc_")||(d=c(`fc_${d}`)),`${p}|${d}`},k=T(s.messages,i,y);if((m?.includeSystemPrompt??!0)&&s.systemPrompt){let e=i.compat,t=i.reasoning&&e?.supportsDeveloperRole!==!1?"developer":"system";l.push({role:t,content:x(s.systemPrompt)})}let n=0;for(let e of k){if(e.role==="user")if(typeof e.content=="string")l.push({role:"user",content:[{type:"input_text",text:x(e.content)}]});else{let t=e.content.map(o=>o.type==="text"?{type:"input_text",text:x(o.text)}:{type:"input_image",detail:"auto",image_url:`data:${o.mimeType};base64,${o.data}`});if(t.length===0)continue;l.push({role:"user",content:t})}else if(e.role==="assistant"){let t=[],o=e,h=o.model!==i.id&&o.provider===i.provider&&o.api===i.api,u=0;for(let p of e.content)if(p.type==="thinking"){if(p.thinkingSignature){let r=JSON.parse(p.thinkingSignature);t.push(r)}}else if(p.type==="text"){let r=p,d=w(r.textSignature),I=u===0?`msg_pi_${n}`:`msg_pi_${n}_${u}`;u++;let f=d?.id;f?f.length>64&&(f=`msg_${b(f)}`):f=I,t.push({type:"message",role:"assistant",content:[{type:"output_text",text:x(r.text),annotations:[]}],status:"completed",id:f,phase:d?.phase})}else if(p.type==="toolCall"){let r=p,[d,I]=r.id.split("|"),f=I;h&&f?.startsWith("fc_")&&(f=void 0),t.push({type:"function_call",id:f,call_id:d,name:r.name,arguments:JSON.stringify(r.arguments)})}if(t.length===0)continue;l.push(...t)}else if(e.role==="toolResult"){let t=e.content.filter(r=>r.type==="text").map(r=>r.text).join(`
3
3
  `),o=e.content.some(r=>r.type==="image"),h=t.length>0,[u]=e.toolCallId.split("|"),p;if(o&&i.input.includes("image")){let r=[];h&&r.push({type:"input_text",text:x(t)});for(let d of e.content)d.type==="image"&&r.push({type:"input_image",detail:"auto",image_url:`data:${d.mimeType};base64,${d.data}`});p=r}else p=x(h?t:"(see attached image)");l.push({type:"function_call_output",call_id:u,output:p})}n++}return l}function N(i,s){let a=s?.strict===void 0?!1:s.strict;return i.map(m=>({type:"function",name:m.name,description:m.description,parameters:m.parameters,strict:a}))}async function j(i,s,a,m,l){let c=new Map,g=(n,e)=>{let t=c.get(n);return t?.type===e?t:void 0},y=(n,e)=>{if(e.type==="reasoning"){let t={type:"thinking",thinking:""};s.content.push(t);let o={type:"thinking",block:t,contentIndex:s.content.length-1};return c.set(n,o),a.push({type:"thinking_start",contentIndex:o.contentIndex,partial:s}),o}if(e.type==="message"){let t={type:"text",text:""};s.content.push(t);let o={type:"text",block:t,contentIndex:s.content.length-1};return c.set(n,o),a.push({type:"text_start",contentIndex:o.contentIndex,partial:s}),o}if(e.type==="function_call"){let t={type:"toolCall",id:`${e.call_id}|${e.id}`,name:e.name,arguments:{},partialJson:e.arguments||""};s.content.push(t);let o={type:"toolCall",block:t,contentIndex:s.content.length-1};return c.set(n,o),a.push({type:"toolcall_start",contentIndex:o.contentIndex,partial:s}),o}},k=(n,e)=>c.get(n)??y(n,e),v=$(i,l?.onProviderStreamEvent,m);for await(let n of v)if(n.type==="response.created")s.responseId=n.response.id;else if(n.type==="response.output_item.added")y(n.output_index,n.item);else if(n.type==="response.reasoning_summary_text.delta"){let e=g(n.output_index,"thinking");if(!e)continue;e.block.thinking+=n.delta,a.push({type:"thinking_delta",contentIndex:e.contentIndex,delta:n.delta,partial:s})}else if(n.type==="response.reasoning_summary_part.done"){let e=g(n.output_index,"thinking");if(!e)continue;e.block.thinking+=`
4
4
 
5
5
  `,a.push({type:"thinking_delta",contentIndex:e.contentIndex,delta:`