@doubao-dev/cli 0.0.25 → 0.0.26

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 (75) hide show
  1. package/dist/2168.js +60 -0
  2. package/dist/275.js +25 -0
  3. package/dist/{4091.js → 2861.js} +14 -14
  4. package/dist/2932.js +1 -1
  5. package/dist/318.js +1 -1
  6. package/dist/3768.js +1 -0
  7. package/dist/3974.js +10 -10
  8. package/dist/4931.js +2 -2
  9. package/dist/6780.js +7 -0
  10. package/dist/{react.js → 6831.js} +1 -1
  11. package/dist/7410.js +1 -1
  12. package/dist/@byted-doubao-apps/create.js +1 -1
  13. package/dist/@byted-doubao-apps/login.js +1 -1
  14. package/dist/@byted-doubao-apps/login~1.js +1 -1
  15. package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
  16. package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
  17. package/dist/@byted-hdt/cli.js +1 -1
  18. package/dist/@inquirer/select.js +1 -1
  19. package/dist/app.js +1 -1
  20. package/dist/assets/web-sdk-debugger/index.html +1 -1
  21. package/dist/assets/web-sdk-debugger/static/css/index.cc3b255797.css +1 -0
  22. package/dist/assets/web-sdk-debugger/static/js/index.b85cbec3be.js +26 -0
  23. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
  24. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
  25. package/dist/browser.js +1 -1
  26. package/dist/dbx-demo.js +1 -1
  27. package/dist/dbx.js +2 -2
  28. package/dist/demo-server.js +2 -2
  29. package/dist/dev-config.js +2 -2
  30. package/dist/dev-service-client.js +1 -25
  31. package/dist/dev-shell.js +1 -1
  32. package/dist/dev.js +10 -10
  33. package/dist/eval.js +1 -1
  34. package/dist/gen-explore.js +1 -1
  35. package/dist/gen-trajectory.js +1 -1
  36. package/dist/get.js +1 -1
  37. package/dist/init.js +4 -4
  38. package/dist/ink.js +3 -3
  39. package/dist/json-file.js +1 -1
  40. package/dist/login.js +1 -1
  41. package/dist/main.js +1 -1
  42. package/dist/manifest-mcp-config.js +1 -1
  43. package/dist/ora.js +1 -1
  44. package/dist/portal.js +1 -1
  45. package/dist/project-layout.js +1 -1
  46. package/dist/prompt.js +7 -7
  47. package/dist/prompts.js +1 -1
  48. package/dist/report.js +1 -1
  49. package/dist/run-registry.js +1 -1
  50. package/dist/run.js +121 -121
  51. package/dist/sandbox.js +1 -1
  52. package/dist/scan.js +1 -1
  53. package/dist/sdk.js +20 -20
  54. package/dist/sdk~1.js +20 -20
  55. package/dist/server.js +4 -4
  56. package/dist/simulator-client.js +1 -1
  57. package/dist/skill.js +1 -1
  58. package/dist/skills.js +1 -1
  59. package/dist/skills~2.js +1 -1
  60. package/dist/status.js +2 -2
  61. package/dist/status~1.js +1 -1
  62. package/dist/stop.js +1 -1
  63. package/dist/update.js +1 -1
  64. package/dist/upgrade.js +1 -1
  65. package/dist/upload.js +6 -6
  66. package/dist/validate.js +1 -1
  67. package/dist/workspace.js +1 -1
  68. package/dist/yaml.js +1 -1
  69. package/package.json +2 -2
  70. package/dist/1664.js +0 -66
  71. package/dist/assets/web-sdk-debugger/static/css/index.3fba1d83fd.css +0 -1
  72. package/dist/assets/web-sdk-debugger/static/js/index.c19e6628b4.js +0 -26
  73. /package/dist/{dev-service-client.js.LICENSE.txt → 275.js.LICENSE.txt} +0 -0
  74. /package/dist/{4091.js.LICENSE.txt → 2861.js.LICENSE.txt} +0 -0
  75. /package/dist/{react.js.LICENSE.txt → 6831.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"../rslib-runtime.js";import"../1664.js";import{useEffect as t,ValidationError as i,makeTheme as r,useState as l,useKeypress as n,createPrompt as s,isUpKey as o,useMemo as d,dist as a,isBackspaceKey as u,isEnterKey as c,usePrefix as f,isNumberKey as m,usePagination as p,Separator as b,useRef as h,isDownKey as y}from"../4931.js";let S=e("node:util"),_={icon:{cursor:a.pointer},style:{disabled:e=>(0,S.styleText)("dim",e),description:e=>(0,S.styleText)("cyan",e),keysHelpTip:e=>e.map(([e,t])=>`${(0,S.styleText)("bold",e)} ${(0,S.styleText)("dim",t)}`).join((0,S.styleText)("dim"," • "))},i18n:{disabledError:"This option is disabled and cannot be selected."},indexMode:"hidden"};function x(e){return!b.isSeparator(e)&&!e.disabled}function T(e){return!b.isSeparator(e)}let $=s((e,s)=>{let{loop:a=!0,pageSize:S=7}=e,$=r(_,e.theme),{keybindings:v}=$,[g,N]=l("idle"),C=f({status:g,theme:$}),w=h(),E=!v.includes("vim"),L=d(()=>e.choices.map(e=>{if(b.isSeparator(e))return e;if("object"!=typeof e||null===e||!("value"in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),i={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(i.description=e.description),i}),[e.choices]),I=d(()=>{let e=L.findIndex(T),t=L.findLastIndex(T);if(-1===e)throw new i("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[L]),K=d(()=>"default"in e?L.findIndex(t=>x(t)&&t.value===e.default):-1,[e.default,L]),[j,A]=l(-1===K?I.first:K),H=L[j];if(null==H||b.isSeparator(H))throw Error("Active index does not point to a choice");let[M,B]=l();n((e,t)=>{if(clearTimeout(w.current),M&&B(void 0),c(e))H.disabled?B($.i18n.disabledError):(N("done"),s(H.value));else if(o(e,v)||y(e,v)){if(t.clearLine(0),a||o(e,v)&&j!==I.first||y(e,v)&&j!==I.last){let t=o(e,v)?-1:1,i=j;do i=(i+t+L.length)%L.length;while(!T(L[i]));A(i)}}else if(m(e)&&!Number.isNaN(Number(t.line))){let e=Number(t.line)-1,i=-1,r=L.findIndex(t=>!b.isSeparator(t)&&++i===e),l=L[r];null!=l&&x(l)&&A(r),w.current=setTimeout(()=>{t.clearLine(0)},700)}else if(u(e))t.clearLine(0);else if(E){let e=t.line.toLowerCase(),i=L.findIndex(t=>!b.isSeparator(t)&&!!x(t)&&t.name.toLowerCase().startsWith(e));-1!==i&&A(i),w.current=setTimeout(()=>{t.clearLine(0)},700)}}),t(()=>()=>{clearTimeout(w.current)},[]);let P=$.style.message(e.message,g),R=$.style.keysHelpTip([["↑↓","navigate"],["⏎","select"]]),U=0,k=p({items:L,active:j,renderItem({item:e,isActive:t,index:i}){if(b.isSeparator(e))return U++,` ${e.separator}`;let r=t?$.icon.cursor:" ",l="number"===$.indexMode?`${i+1-U}. `:"";if(e.disabled){let i="string"==typeof e.disabled?e.disabled:"(disabled)",r=t?$.icon.cursor:"-";return $.style.disabled(`${r} ${l}${e.name} ${i}`)}return(t?$.style.highlight:e=>e)(`${r} ${l}${e.name}`)},pageSize:S,loop:a});if("done"===g)return[C,P,$.style.answer(H.short)].filter(Boolean).join(" ");let{description:W}=H,q=[[C,P].filter(Boolean).join(" "),k," ",W?$.style.description(W):"",M?$.style.error(M):"",R].filter(Boolean).join("\n").trimEnd();return`${q}\u001b[?25l`});export{$ as dist};
1
+ import"node:module";import{__webpack_require__ as e}from"../rslib-runtime.js";import"../3768.js";import{useEffect as t,ValidationError as i,makeTheme as r,useState as l,useKeypress as n,createPrompt as o,isUpKey as s,figures_dist as d,useMemo as a,isBackspaceKey as u,isEnterKey as c,usePagination as f,usePrefix as m,isNumberKey as p,Separator as b,useRef as h,isDownKey as y}from"../4931.js";let S=e("node:util"),_={icon:{cursor:d.pointer},style:{disabled:e=>(0,S.styleText)("dim",e),description:e=>(0,S.styleText)("cyan",e),keysHelpTip:e=>e.map(([e,t])=>`${(0,S.styleText)("bold",e)} ${(0,S.styleText)("dim",t)}`).join((0,S.styleText)("dim"," • "))},i18n:{disabledError:"This option is disabled and cannot be selected."},indexMode:"hidden"};function x(e){return!b.isSeparator(e)&&!e.disabled}function T(e){return!b.isSeparator(e)}let $=o((e,o)=>{let{loop:d=!0,pageSize:S=7}=e,$=r(_,e.theme),{keybindings:v}=$,[g,N]=l("idle"),C=m({status:g,theme:$}),w=h(),E=!v.includes("vim"),L=a(()=>e.choices.map(e=>{if(b.isSeparator(e))return e;if("object"!=typeof e||null===e||!("value"in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),i={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(i.description=e.description),i}),[e.choices]),I=a(()=>{let e=L.findIndex(T),t=L.findLastIndex(T);if(-1===e)throw new i("[select prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}},[L]),K=a(()=>"default"in e?L.findIndex(t=>x(t)&&t.value===e.default):-1,[e.default,L]),[j,A]=l(-1===K?I.first:K),H=L[j];if(null==H||b.isSeparator(H))throw Error("Active index does not point to a choice");let[M,B]=l();n((e,t)=>{if(clearTimeout(w.current),M&&B(void 0),c(e))H.disabled?B($.i18n.disabledError):(N("done"),o(H.value));else if(s(e,v)||y(e,v)){if(t.clearLine(0),d||s(e,v)&&j!==I.first||y(e,v)&&j!==I.last){let t=s(e,v)?-1:1,i=j;do i=(i+t+L.length)%L.length;while(!T(L[i]));A(i)}}else if(p(e)&&!Number.isNaN(Number(t.line))){let e=Number(t.line)-1,i=-1,r=L.findIndex(t=>!b.isSeparator(t)&&++i===e),l=L[r];null!=l&&x(l)&&A(r),w.current=setTimeout(()=>{t.clearLine(0)},700)}else if(u(e))t.clearLine(0);else if(E){let e=t.line.toLowerCase(),i=L.findIndex(t=>!b.isSeparator(t)&&!!x(t)&&t.name.toLowerCase().startsWith(e));-1!==i&&A(i),w.current=setTimeout(()=>{t.clearLine(0)},700)}}),t(()=>()=>{clearTimeout(w.current)},[]);let P=$.style.message(e.message,g),R=$.style.keysHelpTip([["↑↓","navigate"],["⏎","select"]]),U=0,k=f({items:L,active:j,renderItem({item:e,isActive:t,index:i}){if(b.isSeparator(e))return U++,` ${e.separator}`;let r=t?$.icon.cursor:" ",l="number"===$.indexMode?`${i+1-U}. `:"";if(e.disabled){let i="string"==typeof e.disabled?e.disabled:"(disabled)",r=t?$.icon.cursor:"-";return $.style.disabled(`${r} ${l}${e.name} ${i}`)}return(t?$.style.highlight:e=>e)(`${r} ${l}${e.name}`)},pageSize:S,loop:d});if("done"===g)return[C,P,$.style.answer(H.short)].filter(Boolean).join(" ");let{description:W}=H,q=[[C,P].filter(Boolean).join(" "),k," ",W?$.style.description(W):"",M?$.style.error(M):"",R].filter(Boolean).join("\n").trimEnd();return`${q}\u001b[?25l`});export{$ as dist};
package/dist/app.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import{authorizedFetch as t,getApiUrl as o,configuredFetch as a}from"./1664.js";class n extends Error{operation;serviceCode;serviceMessage;httpStatus;logId;constructor(e){var t;super(void 0!==(t=e).httpStatus?`${t.operation} failed: HTTP ${t.httpStatus} ${t.httpStatusText??""}`.trim():void 0!==t.serviceCode?`${t.operation} failed: [${t.serviceCode}] ${t.serviceMessage??"unknown error"}`:`${t.operation} failed: ${t.serviceMessage??"unknown error"}`),this.name="GatewayResponseError",this.operation=e.operation,this.serviceCode=e.serviceCode,this.serviceMessage=e.serviceMessage,this.httpStatus=e.httpStatus,this.logId=e.logId}}async function i(e,t){let o=e.headers.get("x-tt-logid")??void 0;if(!e.ok)throw new n({operation:t,httpStatus:e.status,httpStatusText:e.statusText,logId:o});let a=await e.json();if("number"!=typeof a.code)throw new n({operation:t,serviceMessage:"invalid gateway response: missing numeric code",logId:a.log_id??o});if(0!==a.code)throw new n({operation:t,serviceCode:a.code,serviceMessage:a.message??"unknown error",logId:a.log_id??o});return a}async function r(e){return i(await t(o(`/app_developer/api/sandbox/app/get?sandbox_project_id=${encodeURIComponent(e)}`),{method:"GET"}),"Get sandbox app")}async function p(e,a,n="manifest"){return i(await t(o("/app_developer/api/yaml/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:e,mode:a,yaml_type:n})}),"Verify YAML")}async function s(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions`);return i(await t(a,{method:"GET"}),"List mini app versions")}async function d(a){let{readFile:n}=await import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),r=await n(a.filePath),p=o(`/app_developer/api/apps/${encodeURIComponent(a.appKey)}/draft/upload?source_type=${a.sourceType}`);return i(await t(p,{method:"POST",headers:{"Content-Type":a.contentType??"application/zip","Content-Length":String(r.byteLength)},body:new Blob([r],{type:a.contentType??"application/zip"})}),"Upload agentic service version draft package")}async function c(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/start`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sha256:e.sha256})}),"Start agentic service version draft source code uploading")}async function u(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/finish`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({upload_token:e.uploadToken,size:e.size,sha256:e.sha256})}),"Finish agentic service version draft source code uploading")}async function l(t){let[{readFile:o},{createHash:n}]=await Promise.all([import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:crypto"),22)})]),i=await o(t.filePath),r=n("sha256").update(i).digest("hex"),p=(await c({appKey:t.appKey,sha256:r})).data;if(!p?.upload_url||!p.upload_token)throw Error("Start agentic service version draft source code uploading failed: missing upload session");let s=await a(p.upload_url,{method:"PUT",headers:p.upload_headers??{},body:new Blob([i])});if(!s.ok)throw Error(`Upload agentic service version draft source code to TOS failed: HTTP ${s.status} ${s.statusText}`);return u({appKey:t.appKey,uploadToken:p.upload_token,size:i.byteLength,sha256:r})}async function f(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/draft/submit`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_config_version:process.env.PROJECT_CONFIG_VERSION})}),"Submit agentic service version draft")}async function h(e,a){let n=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions/${encodeURIComponent(a)}/artifact`);return i(await t(n,{method:"GET"}),"Get agentic service version artifact")}export{n as GatewayResponseError,h as getMiniAppVersionArtifact,r as getSandboxApp,s as listMiniAppVersions,f as submitMiniAppVersionDraft,d as uploadMiniAppVersionDraftPackage,l as uploadMiniAppVersionDraftSourceCode,p as verifyYAML};
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import{authorizedFetch as t,getApiUrl as o,configuredFetch as a}from"./2168.js";class n extends Error{operation;serviceCode;serviceMessage;httpStatus;logId;constructor(e){var t;super(void 0!==(t=e).httpStatus?`${t.operation} failed: HTTP ${t.httpStatus} ${t.httpStatusText??""}`.trim():void 0!==t.serviceCode?`${t.operation} failed: [${t.serviceCode}] ${t.serviceMessage??"unknown error"}`:`${t.operation} failed: ${t.serviceMessage??"unknown error"}`),this.name="GatewayResponseError",this.operation=e.operation,this.serviceCode=e.serviceCode,this.serviceMessage=e.serviceMessage,this.httpStatus=e.httpStatus,this.logId=e.logId}}async function i(e,t){let o=e.headers.get("x-tt-logid")??void 0;if(!e.ok)throw new n({operation:t,httpStatus:e.status,httpStatusText:e.statusText,logId:o});let a=await e.json();if("number"!=typeof a.code)throw new n({operation:t,serviceMessage:"invalid gateway response: missing numeric code",logId:a.log_id??o});if(0!==a.code)throw new n({operation:t,serviceCode:a.code,serviceMessage:a.message??"unknown error",logId:a.log_id??o});return a}async function r(e){return i(await t(o(`/app_developer/api/sandbox/app/get?sandbox_project_id=${encodeURIComponent(e)}`),{method:"GET"}),"Get sandbox app")}async function p(e,a,n="manifest"){return i(await t(o("/app_developer/api/yaml/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:e,mode:a,yaml_type:n})}),"Verify YAML")}async function s(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions`);return i(await t(a,{method:"GET"}),"List mini app versions")}async function d(a){let{readFile:n}=await import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),r=await n(a.filePath),p=o(`/app_developer/api/apps/${encodeURIComponent(a.appKey)}/draft/upload?source_type=${a.sourceType}`);return i(await t(p,{method:"POST",headers:{"Content-Type":a.contentType??"application/zip","Content-Length":String(r.byteLength)},body:new Blob([r],{type:a.contentType??"application/zip"})}),"Upload agentic service version draft package")}async function c(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/start`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sha256:e.sha256})}),"Start agentic service version draft source code uploading")}async function u(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/finish`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({upload_token:e.uploadToken,size:e.size,sha256:e.sha256})}),"Finish agentic service version draft source code uploading")}async function l(t){let[{readFile:o},{createHash:n}]=await Promise.all([import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:crypto"),22)})]),i=await o(t.filePath),r=n("sha256").update(i).digest("hex"),p=(await c({appKey:t.appKey,sha256:r})).data;if(!p?.upload_url||!p.upload_token)throw Error("Start agentic service version draft source code uploading failed: missing upload session");let s=await a(p.upload_url,{method:"PUT",headers:p.upload_headers??{},body:new Blob([i])});if(!s.ok)throw Error(`Upload agentic service version draft source code to TOS failed: HTTP ${s.status} ${s.statusText}`);return u({appKey:t.appKey,uploadToken:p.upload_token,size:i.byteLength,sha256:r})}async function f(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/draft/submit`);return i(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_config_version:process.env.PROJECT_CONFIG_VERSION})}),"Submit agentic service version draft")}async function h(e,a){let n=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions/${encodeURIComponent(a)}/artifact`);return i(await t(n,{method:"GET"}),"Get agentic service version artifact")}export{n as GatewayResponseError,h as getMiniAppVersionArtifact,r as getSandboxApp,s as listMiniAppVersions,f as submitMiniAppVersionDraft,d as uploadMiniAppVersionDraftPackage,l as uploadMiniAppVersionDraftSourceCode,p as verifyYAML};
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
7
7
  <title>豆包智能服务 Web 调试工具</title>
8
- <link rel="icon" href="/favicon.svg" type="image/svg+xml"><script type="module" src="/static/js/lib-polyfill.9daa7c863e.js"></script><script type="module" src="/static/js/lib-react.6b5c1c8899.js"></script><script type="module" src="/static/js/682.de47e82f6b.js"></script><script type="module" src="/static/js/670.8a8f0f7d57.js"></script><script type="module" src="/static/js/index.c19e6628b4.js"></script><link href="/static/css/index.3fba1d83fd.css" rel="stylesheet"></head>
8
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml"><script type="module" src="/static/js/lib-polyfill.9daa7c863e.js"></script><script type="module" src="/static/js/lib-react.6b5c1c8899.js"></script><script type="module" src="/static/js/682.de47e82f6b.js"></script><script type="module" src="/static/js/670.8a8f0f7d57.js"></script><script type="module" src="/static/js/index.b85cbec3be.js"></script><link href="/static/css/index.cc3b255797.css" rel="stylesheet"></head>
9
9
  <body>
10
10
  <main id="app"></main>
11
11
  </body>