@doubao-dev/cli 0.0.33 → 0.0.34
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/2168.js +2 -2
- package/dist/4931.js +1 -1
- package/dist/{8079.js → 6427.js} +3 -3
- package/dist/{9667.js → 8981.js} +2 -2
- package/dist/@byted-doubao-apps/kit.js +1 -1
- package/dist/@byted-doubao-apps/login.js +1 -1
- package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
- package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
- package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
- package/dist/assets/web-sdk-debugger/index.html +1 -1
- package/dist/assets/web-sdk-debugger/static/js/index.9f626ba3a2.js +44 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
- package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
- package/dist/check.js +1 -1
- package/dist/dev-shell.js +1 -1
- package/dist/dev.js +4 -4
- package/dist/init.js +1 -1
- package/dist/ink.js +1 -1
- package/dist/prompt.js +1 -1
- package/dist/run.js +1 -1
- package/dist/sdk.js +42 -42
- package/dist/sdk~1.js +28 -28
- package/package.json +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +2 -2
- package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/08-/344/272/244/344/272/222.md +2 -2
- package/dist/assets/web-sdk-debugger/static/js/index.d1bb36b355.js +0 -44
- /package/dist/{9091.js → 3688.js} +0 -0
- /package/dist/{9667.js.LICENSE.txt → 8981.js.LICENSE.txt} +0 -0
package/dist/prompt.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"node:module";import{ignoreUpdateVersion as r,runtime_packageName as e}from"./2168.js";import{formatError as t,updateCli as n}from"./update.js";import{source as i}from"./
|
|
1
|
+
import"node:module";import{ignoreUpdateVersion as r,runtime_packageName as e}from"./2168.js";import{formatError as t,updateCli as n}from"./update.js";import{source as i}from"./3688.js";import{dist as o}from"./@inquirer/select.js";async function s(s){let a;process.stderr.write(`
|
|
2
2
|
${i.bold.yellow("✨ Update available!")} ${i.dim(s.current)} -> ${i.green(s.latest)}
|
|
3
3
|
|
|
4
4
|
Release notes: ${i.underline("https://developer.doubao.com/docs/resources/changelog")}
|
package/dist/run.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";import"./6831.js";import"./yaml.js";import{writeStructuredOutputDiagnostic as t,formatReferenceTimeContext as r,formatMs as i,isAppQuotaExhausted as a,parseJSONObject as s,classifyAttemptExecution as n,numberValue as o,LLMClient as l,shared_stringValue as c,getActiveBrowserStrategy as d,logger as u,LLMResponseError as p,requestStructuredOutput as m,parseMCPHTTPBody as f,setTerminalMuted as _,fetchMCPDescriptor as h,EvalDevRuntimeProcessError as g,genExplore as y,acquireEvalSandboxSession as v,limitedIntentCount as b,writeProjectEvalConfig as $,DEFAULT_EVAL_MODEL_ALIAS as k,genDirectTrajectory as x,isPostHookFailure as w,mergeEvalConfigs as S,timed as j,limitedEvalConcurrency as A,validateMCPHeaders as E,readManifestMcpUrl as M,limitedMaxRounds as C,StructuredOutputError as I,startEvalDevRuntime as P,registerStructuredOutputDiagnostics as N,buildAutoStartPayload as O,loadGlobalConfig as D,project_config_readEvalConfigFile as R,booleanValue as L,DEFAULT_EVAL_GATEWAY_ORIGIN as T,resolveProjectEvalConfig as F,LLMRequestTimeoutError as J,genTrajectory as q,launchHeadlessBrowser as z,isGatewayAuthFailure as K,validateProjectEvalConfig as U,limitPipelineRunConfig as H,integerConfigValue as B,projectEvalConfigReadPath as G,createReferenceTime as V}from"./3974.js";import{createKitDevOptions as Y}from"./kit-dev-options.js";import{readJsonIfExists as W,atomicWriteJson as X}from"./json-file.js";import{option_Option as Z,flushEvents as Q,sanitizeDetailField as ee,getAuthStatus as et,classifyError as er,setEventTrackingUid as ei,sanitizeProgressFailure as ea,reportEvalRun as es,reportCommand as en,command_Command as eo,sanitizeLogText as el,runCommand as ec,summarizeLogError as ed,reportEvalPhase as eu,classifyEventStatus as ep,isRecord as em}from"./2168.js";import{Text as ef,build_render as e_,Static as eh,components_Box as eg,render_to_string as ey}from"./ink.js";import{Chalk as ev}from"./
|
|
1
|
+
import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";import"./6831.js";import"./yaml.js";import{writeStructuredOutputDiagnostic as t,formatReferenceTimeContext as r,formatMs as i,isAppQuotaExhausted as a,parseJSONObject as s,classifyAttemptExecution as n,numberValue as o,LLMClient as l,shared_stringValue as c,getActiveBrowserStrategy as d,logger as u,LLMResponseError as p,requestStructuredOutput as m,parseMCPHTTPBody as f,setTerminalMuted as _,fetchMCPDescriptor as h,EvalDevRuntimeProcessError as g,genExplore as y,acquireEvalSandboxSession as v,limitedIntentCount as b,writeProjectEvalConfig as $,DEFAULT_EVAL_MODEL_ALIAS as k,genDirectTrajectory as x,isPostHookFailure as w,mergeEvalConfigs as S,timed as j,limitedEvalConcurrency as A,validateMCPHeaders as E,readManifestMcpUrl as M,limitedMaxRounds as C,StructuredOutputError as I,startEvalDevRuntime as P,registerStructuredOutputDiagnostics as N,buildAutoStartPayload as O,loadGlobalConfig as D,project_config_readEvalConfigFile as R,booleanValue as L,DEFAULT_EVAL_GATEWAY_ORIGIN as T,resolveProjectEvalConfig as F,LLMRequestTimeoutError as J,genTrajectory as q,launchHeadlessBrowser as z,isGatewayAuthFailure as K,validateProjectEvalConfig as U,limitPipelineRunConfig as H,integerConfigValue as B,projectEvalConfigReadPath as G,createReferenceTime as V}from"./3974.js";import{createKitDevOptions as Y}from"./kit-dev-options.js";import{readJsonIfExists as W,atomicWriteJson as X}from"./json-file.js";import{option_Option as Z,flushEvents as Q,sanitizeDetailField as ee,getAuthStatus as et,classifyError as er,setEventTrackingUid as ei,sanitizeProgressFailure as ea,reportEvalRun as es,reportCommand as en,command_Command as eo,sanitizeLogText as el,runCommand as ec,summarizeLogError as ed,reportEvalPhase as eu,classifyEventStatus as ep,isRecord as em}from"./2168.js";import{Text as ef,build_render as e_,Static as eh,components_Box as eg,render_to_string as ey}from"./ink.js";import{Chalk as ev}from"./3688.js";import{lookupRun as eb,registerRun as e$}from"./run-registry.js";import{resolveAppKey as ek}from"./workspace.js";import{requireRuntimeSkillEntries as ex}from"./project-layout.js";var ew={};e.r(ew),e.d(ew,{buildFreshConfig:()=>ot,configureEvalRunOptions:()=>n5,default:()=>n4,resolveEvalDevConfig:()=>oi,resolvePipelineRunConfig:()=>n7});let eS="dbx-eval-wasm-template-encoder";async function ej(e,t){let r=(await e())._encode(JSON.stringify(t)),i=r.buffer;try{if(0!==r.status)throw Error(`encode error: ${String(r.error_msg)}`);let e=Buffer.allocUnsafe(i.size());for(let t=0;t<e.length;t+=1)e[t]=i.get(t)??0;return{buffer:e,debugInfo:r.lepus_debug}}finally{eA(i),eA(r)}}function eA(e){"function"==typeof e.delete&&e.delete()}class eE{lynxTemplatePlugin;constructor(e){this.lynxTemplatePlugin=e}apply(t){t.hooks.thisCompilation.tap(eS,t=>{this.lynxTemplatePlugin.getLynxTemplatePluginHooks(t).encode.tapPromise({name:eS,stage:254},async({encodeOptions:t})=>ej((await import("./lepus.js").then(e.t.bind(e,"../../../node_modules/.pnpm/@byted-lynx+tasm@4.4.40_debug@4.4.3/node_modules/@byted-lynx/tasm/lepus.js",23))).default,t))})}}let eM=e("node:fs");async function eC(e){let t;process.env.DISABLE_APP_TEMPLATE_JS="1";let r=JSON.parse((0,eM.readFileSync)(e,"utf8")),i=!1,a=async()=>{i||(i=!0,t&&await t.stop(),eF({type:"stopped"}))},s=()=>{a().finally(()=>process.exit(0))};process.once("SIGINT",s),process.once("SIGTERM",s),process.on("message",e=>{var t;"object"==typeof(t=e)&&null!==t&&"type"in t&&"stop"===t.type&&s()});try{t=await eI(r),eF({type:"ready",webDebuggerUrl:t.webDebuggerUrl,sandboxSessionId:t.sandboxSessionId}),await new Promise(()=>void 0)}catch(t){let e=t instanceof Error?t:Error(String(t));eF({type:"failure",message:e.message,stack:e.stack}),await a().catch(()=>void 0),process.disconnect?.(),process.exitCode=1}finally{process.removeListener("SIGINT",s),process.removeListener("SIGTERM",s)}}async function eI(e){var t,r;let i,a,s,n=process.env.WATCHPACK_POLLING;n||(process.env.WATCHPACK_POLLING="1000");try{let r=await import("./sdk.js"),a=(t=r.DoubaoAppsSDK,class{delegate;constructor(e){let r=new t(e);this.delegate=r.launcher}dev(e){return this.delegate.dev({...e,rsbuildPlugins:[...e.rsbuildPlugins??[],{name:eS,setup(e){e.modifyBundlerChain((t,r)=>{if(r?.environment?.name==="web")return;let i=e.useExposed(Symbol.for("LynxTemplatePlugin"));t.plugin(eS).use(eE,[i.LynxTemplatePlugin])})}}]})}}),s=new r.DoubaoAppsSDK(e.miniappDir,a);eL("Launching isolated Kit dev runtime with WASM template encoding ..."),i=await s.dev(Y({appId:e.appId,mcpEndpoint:e.mcpEndpoint,simulatorManifestPath:e.simulatorManifestPath,skillsDirectory:e.skillsDirectory}))}finally{void 0===n?delete process.env.WATCHPACK_POLLING:process.env.WATCHPACK_POLLING=n}if(!i.webDebugger)throw await i.closeServer().catch(()=>void 0),Error("kit sdk.dev did not return webDebugger; simulator options may be misconfigured");let o=eR(i.webDebugger.url),l=(r=i.webDebugger).debuggerMcpEndpoint?eR(r.debuggerMcpEndpoint):eR(new URL("/__wsd_mcp",r.url).toString()),c=i.webDebugger.sandboxSessionId?.trim();if(!c)throw await eP(i),Error("Kit dev runtime did not return a Sandbox Session ID");eL(`Web debugger SPA: ${o}`),eL(`Debugger MCP: ${l}`);try{({browser:a,page:s}=await eN(o,l))}catch(e){throw eT(`Headless SDK attach failed; rolling back dev runtime: ${e.message}`),await eP(i),e}let d=!1;return{webDebuggerUrl:l,sandboxSessionId:c,stop:async()=>{d||(d=!0,eL("stop: closing playwright page ..."),await eD(s.close(),5e3,"page.close").catch(e=>{eT(`page.close: ${e.message}`)}),eL("stop: closing playwright browser ..."),await eD(a.close(),5e3,"browser.close").catch(e=>{eT(`browser.close: ${e.message}`)}),await eP(i),eL("stop: done."))}}}async function eP(e){eL("stop: closing dev server ..."),await eD(e.closeServer(),1e4,"devHandle.closeServer").catch(e=>{eT(`closeServer failed: ${e.message}`)})}async function eN(e,t){let r,i=await z();try{if(r=await i.newPage(),await r.goto(e,{waitUntil:"domcontentloaded",timeout:3e4}),!await eO(t,3e4))throw Error(`SDK debugger did not attach at ${e} within 30s; widget bundle may not have loaded`);return await new Promise(e=>setTimeout(e,3e3)),eL("Headless SDK attached; widgets registered."),{browser:i,page:r}}catch(e){throw r&&await r.close().catch(()=>void 0),await i.close().catch(()=>void 0),e}}async function eO(e,t){let r=Date.now()+t,i=0;for(;Date.now()<r;){try{i+=1;let t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify({jsonrpc:"2.0",id:i,method:"tools/call",params:{name:"list_render_targets",arguments:{type:"all"}}})});if(t.ok){let e=f(await t.text(),t.headers.get("content-type"),i),r=e.result?.structuredContent?.widgets;if(Array.isArray(r)&&r.length>0)return!0}}catch{}await new Promise(e=>setTimeout(e,800))}return!1}function eD(e,t,r){return new Promise((i,a)=>{let s=setTimeout(()=>a(Error(`${r} timed out after ${t}ms`)),t);e.then(e=>{clearTimeout(s),i(e)},e=>{clearTimeout(s),a(e)})})}function eR(e){try{let t=new URL(e);return"localhost"===t.hostname&&(t.hostname="127.0.0.1"),t.toString()}catch{return e}}function eL(e){eF({type:"log",level:"log",message:e})}function eT(e){eF({type:"log",level:"warn",message:e})}function eF(e){process.send?.(e)}let eJ={L1_platform:{shortLabel:"L1",promptName:"Sandbox 问题",legendLabel:"平台/环境",description:"工具可用性、时间上下文、状态隔离与注入或能力模拟失败。"},L2_tool:{shortLabel:"L2",promptName:"工具问题",legendLabel:"工具执行",description:"工具执行、结果、协议转换、参数传递或时间处理失败。"},L3_skill:{shortLabel:"L3",promptName:"Skill/模型能力问题",legendLabel:"Skill/模型能力",description:"任务理解、Skill 召回或遵循、结果核验、推理计算、模型幻觉编造或 Skill 定义失败。"},case_quality:{shortLabel:"CQ",promptName:"用例质量问题",legendLabel:"Case Quality",description:"用例剧本、前置条件或成功标准存在冲突。"},other_intent:{shortLabel:"O",promptName:"其他意图问题",legendLabel:"Other Intent",description:"任务路由错误或请求不属于当前 Skill 能力边界。"}},eq=Object.keys(eJ),ez={sandbox:new Set(["工具可用性","时间上下文","状态隔离与注入","能力模拟"]),tool:new Set(["执行稳定性","结果正确性","协议转换正确性","参数传递完整性","时间处理正确性"]),skill:new Set(["任务理解","Skill召回或选择","Skill遵循","结果核验","模型幻觉编造","推理计算","能力边界描述缺失或模糊","工具契约描述错误","规则冲突或不可执行","skill过拟合"]),case_quality:new Set(["剧本冲突"]),other_intent:new Set(["路由与任务交接","非当前 Skill 能力边界"])};function eK(e){return ez["platform"===e?"sandbox":e]}function eU(e){switch(e){case"L1_platform":case"L2_tool":case"L3_skill":case"case_quality":case"other_intent":return e;case"L3_model":case"L4_skill":return"L3_skill";default:return}}function eH(e){switch(e){case"sandbox":case"tool":case"case_quality":case"other_intent":return e;case"model":case"skill":return"skill";default:return}}function eB(e){return Array.isArray(e.skill_documents)?e.skill_documents:"string"==typeof e.skill_document?[e.skill_document]:[]}function eG(e){let t=eB(e);return t.length<=1?t[0]??"":t.map((e,t)=>`## Skill document ${t+1}
|
|
2
2
|
${e}`).join("\n\n")}let eV=["0.0","0.5","1.0"],eY=["0.0","1.0"],eW=new Set(["killer","strong","weak"]),eX=new Set(["tool_chain","constraint","terminal_state","text_quality","safety_boundary"]),eZ=new Set(["复合前置检索","根本性指代歧义","直接写操作","定时/预约"]);function eQ(e){if((0,eM.readFileSync)(e).byteLength>0x1400000)throw Error(`--eval-bundle exceeds 20 MiB: ${e}`);let t=W(e);if(!t)throw Error(`--eval-bundle is not valid JSON: ${e}`);if(1!==t.version)throw Error(`unsupported eval bundle version: ${String(t.version)}`);if(!Number.isFinite(new Date(t.reference_time).getTime()))throw Error("eval bundle reference_time must be an ISO timestamp");if(!Number.isInteger(t.pass_k)||t.pass_k<=0)throw Error("eval bundle pass_k must be a positive integer");if("string"!=typeof t.app_id||!t.app_id.trim())throw Error("eval bundle app_id must be a non-empty string");return function(e){for(let[t,r]of(delete e.global_principles,Object.entries(e.checklists||{})))e.checklists[t]=r.filter(e=>"principle"!==e.evaluator_type)}(t),function(e){if(!e1(e)||!e.name||!Array.isArray(e.tools))throw Error("eval bundle skill snapshot is invalid")}(t.skill),t.skill.skill_documents=eB(t.skill),delete t.skill.skill_document,function(e){if(!Array.isArray(e)||0===e.length)throw Error("eval bundle cases must be a non-empty array");let t=new Set;for(let r of e){if(!r.case_id||t.has(r.case_id))throw Error(`eval bundle has invalid or duplicate case_id: ${r.case_id}`);t.add(r.case_id)}}(t.cases),function(e,t){if(!e1(e))throw Error("eval bundle checklists must be an object");for(let r of t){let t=e[r];if(!Array.isArray(t)||0===t.length)throw Error(`eval bundle is missing checklists for case ${r}`);for(let e of t){if(!e1(e)||e.case_id!==r)throw Error(`eval bundle checklist case_id does not match key ${r}`);!function(e,t){if("string"!=typeof e.checklist_ref||!/^[A-Za-z0-9_-]{1,64}$/.test(e.checklist_ref))throw Error(`eval bundle checklist_ref is invalid for case ${t}`);if("rule"!==e.evaluator_type&&"rubric"!==e.evaluator_type&&"behavior"!==e.evaluator_type)throw Error(`eval bundle evaluator_type is invalid for case ${t}`);if(!Array.isArray(e.content)||0===e.content.length)throw Error(`eval bundle checklist content is empty for case ${t}`);if("rubric"===e.evaluator_type)return e0(e.content,`eval bundle rubric ${e.checklist_ref}`);for(let[r,i]of e.content.entries()){if(!e1(i))throw Error(`eval bundle ${e.evaluator_type} item ${r} must be an object`);if("string"!=typeof i.method||!i.method.trim()||!e1(i.params)||"string"!=typeof i.description||!i.description.trim())throw Error(`eval bundle ${e.evaluator_type} item ${r} is invalid for case ${t}`)}}(e,r)}}for(let r of Object.keys(e))if(!t.has(r))throw Error(`eval bundle has checklists for unknown case ${r}`)}(t.checklists,new Set(t.cases.map(e=>e.case_id))),function(e,t){if(!e1(e))throw Error("eval bundle trajectories must be an object");for(let r of t){let t=e[r.case_id];if(!Array.isArray(t)||0===t.length)throw Error(`eval bundle is missing trajectories for case ${r.case_id}`);for(let e=0;e<t.length;e++){let i=t[e];if(!e1(i)||!e1(i.metadata)||void 0!==i.metadata.case_id&&i.metadata.case_id!==r.case_id)throw Error(`eval bundle trajectory case_id does not match ${r.case_id}`);if(void 0!==i.metadata.attempt_k&&i.metadata.attempt_k!==e+1)throw Error(`eval bundle trajectory attempt_k for ${r.case_id} must be ${e+1}`)}}for(let r of Object.keys(e))if(!t.some(e=>e.case_id===r))throw Error(`eval bundle has trajectories for unknown case ${r}`)}(t.trajectories,t.cases),function(e){if(!e1(e.attempt_counts))throw Error("eval bundle attempt_counts must be an object");for(let t of e.cases){let r=e.trajectories[t.case_id].length,i=e.attempt_counts[t.case_id];if(!Number.isInteger(i)||i<=0||i!==r)throw Error(`eval bundle attempt_counts.${t.case_id} must equal ${r}`);if(i>e.pass_k)throw Error(`eval bundle attempt_counts.${t.case_id} exceeds pass_k ${e.pass_k}`)}}(t),t}function e0(e,t){let r=e.map((e,t)=>(function(e,t){if(!e1(e))throw Error(`injected rubrics[${t}] must be an object`);if(Buffer.byteLength(JSON.stringify(e))>32768)throw Error(`injected rubrics[${t}] exceeds 32768 bytes`);let r=e.step_index;if(!Number.isInteger(r)||0>=Number(r))throw Error(`injected rubrics[${t}].step_index must be positive`);if("string"!=typeof e.evidence||!e.evidence.trim())throw Error(`injected rubrics[${t}].evidence must be non-empty`);if(!e1(e.scoring_criteria))throw Error(`injected rubrics[${t}].scoring_criteria must be an object`);let i=Object.fromEntries(Object.entries(e.scoring_criteria).filter(([e,t])=>eV.includes(e)&&"string"==typeof t&&t.trim().length>0).map(([e,t])=>[e,t.trim()]));if(!eY.every(e=>i[e]))throw Error(`injected rubrics[${t}].scoring_criteria must contain non-empty 1.0 and 0.0 (0.5 is optional)`);let a=e.constraint_level;if(void 0!==a&&!eW.has(a))throw Error(`injected rubrics[${t}].constraint_level is invalid`);let s=function(e,t){if(void 0===e)return;if(!e1(e))throw Error(`injected rubrics[${t}].dimension_capacity must be an object`);let r="model"===e.l1?"skill":e.l1,i="回复忠实性"===e.atomic?"模型幻觉编造":"skill工具描述错误"===e.atomic?"工具契约描述错误":e.atomic;if("string"!=typeof i||!eK(r)?.has(i))throw Error(`injected rubrics[${t}].dimension_capacity is invalid`);return{l1:r,atomic:i}}(e.dimension_capacity,t),n="string"==typeof e.dimension&&e.dimension.trim()?e.dimension.trim():void 0;if(n&&!eX.has(n))throw Error(`injected rubrics[${t}].dimension is invalid`);let o=function(e,t){if(void 0===e)return[];if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||!e.trim()))throw Error(`${t} must contain non-empty strings`);return e.map(e=>e.trim())}(e.dimension_biz_scene,`injected rubrics[${t}].dimension_biz_scene`);for(let e of o)if(!eZ.has(e))throw Error(`injected rubrics[${t}].dimension_biz_scene is invalid`);if(void 0!==e.weight&&("number"!=typeof e.weight||!Number.isFinite(e.weight)||e.weight<=0))throw Error(`injected rubrics[${t}].weight must be positive`);return{step_index:Number(r),evidence:e.evidence.trim(),scoring_criteria:i,...n?{dimension:n}:{},...a?{constraint_level:a}:{},...s?{dimension_capacity:s}:{},...o.length>0?{dimension_biz_scene:o}:{},..."number"==typeof e.weight&&Number.isFinite(e.weight)&&e.weight>0?{weight:e.weight}:{}}})(e,t)),i=new Set;for(let e of r){if(i.has(e.step_index))throw Error(`${t} contains duplicate step_index ${e.step_index}`);i.add(e.step_index)}return r}function e1(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function e2(e){try{e()}catch{}}let e3=/^后台剧本(?:描述)?\s*[::]\s*/u,e6=/(?:[。;;]\s*|\r?\n+\s*)(?=(?:初始态|关键约束|系统需(?:要)?|用户可能|成功终态))/u,e8=/[。;;\s]+$/u;function e4(e){let t=e.trim();if(!t)return"";let r=t.replace(e3,"").trim();if(!r)return t;let i=e6.exec(r);return(i?r.slice(0,i.index):r).replace(e8,"").trim()||t}let e5=e("node:path");function e7(e){return e.length?`<ul>${e.map(e=>`<li>${tK(e)}</li>`).join("")}</ul>`:"—"}function e9(e){let t=function(e){let t=/^pass_rate ([\d.]+) < threshold ([\d.]+)/.exec(e);if(t)return{label:"通过率低于阈值",detail:`实际 ${tT(Number(t[1]))},阈值 ${tT(Number(t[2]))}`};if("pass_rate is not a finite number"===e)return{label:"通过率无效",detail:"报告中的通过率不是有效数字,需要检查评分产物。"};let r=/^hard failure:\s*(.+)$/.exec(e);if(r){let e=r[1],t=/^user_experience veto:\s*(.+)$/.exec(e);return t?{label:"用户体验否决",detail:t[1]}:{label:"硬失败",detail:e}}let i=/^(\d+) L1_platform attribution item\(s\) indicate environment failures$/.exec(e);if(i)return{label:"平台/环境归因",detail:`${i[1]} 个失败项被归因为平台、环境或基础依赖问题。`};let a=/^skill_review score ([\d.]+) < ([\d.]+)/.exec(e);if(a)return{label:"Skill 审查低分",detail:`实际 ${a[1]},阈值 ${a[2]}`};if("skill description 与实际 tool 行为不匹配"===e)return{label:"Skill 描述不匹配",detail:"Skill 文档描述与实际工具行为不一致。"};let s=/^max_attempts (\d+) > (\d+)$/.exec(e);return s?{label:"重试次数过多",detail:`当前 ${s[1]} 次,准出上限 ${s[2]} 次。`}:{label:"准出规则命中",detail:e}}(e);return`<li>
|
|
3
3
|
<strong>${tK(t.label)}</strong>
|
|
4
4
|
<span>${tK(t.detail)}</span>
|