@ethan.carter/autocode 0.0.1 → 0.0.2
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/{chunk-EPSRIOBV.js → chunk-2NNMZN27.js} +2 -2
- package/dist/chunk-BHULUCLO.js +221 -0
- package/dist/{chunk-4A2CIJR7.js → chunk-D6W6GJCQ.js} +1 -1
- package/dist/{chunk-BQM4QR37.js → chunk-DN5PIQX3.js} +1 -1
- package/dist/{chunk-G3KR2EJY.js → chunk-EOSGSOQ7.js} +1 -1
- package/dist/{chunk-AQGJ4MSP.js → chunk-F7GM3KBX.js} +1 -1
- package/dist/chunk-HO3X6IFQ.js +8 -0
- package/dist/{chunk-KP52N3BI.js → chunk-IAJUZSL4.js} +3 -3
- package/dist/{chunk-4AM2FMYM.js → chunk-L4FTN2JM.js} +1 -1
- package/dist/{chunk-KTN3Q4ID.js → chunk-LOULA2VD.js} +2 -2
- package/dist/{chunk-5IDQON42.js → chunk-LVFFUKWY.js} +1 -1
- package/dist/{chunk-Z7PLBHDY.js → chunk-LVGVTFEP.js} +1 -1
- package/dist/{chunk-ABS7LDBZ.js → chunk-TFNFQXFH.js} +1 -1
- package/dist/{chunk-BHNGTTZK.js → chunk-U5QH6OX7.js} +1 -1
- package/dist/chunk-UPEQGG6F.js +1 -0
- package/dist/{chunk-7ZHLSWOM.js → chunk-WGKUZHE7.js} +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-LUAASDJ5.js +0 -1
- package/dist/chunk-RVU64VJK.js +0 -8
- package/dist/chunk-TCHTUSVC.js +0 -221
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S,b as Q,c as E}from"./chunk-G3XA757G.js";import{a as y,b as x,c as T}from"./chunk-OP2B3OCA.js";import{A as v,B as C,C as w}from"./chunk-CBLU2NBO.js";import{a as f}from"./chunk-XUSV3KOD.js";function j(e){return(o,s)=>e(o,s)}f(j,"translateWith");function B(e){let{counts:o}=e;return o.done+o.failed+o.skipped+o.deferred+o.pending===0&&e.changes.length===0&&!e.stoppedBy}f(B,"isNoop");function I(e,o){let s=e.layers;if(!s||s.total===0)return"";let t=o("agent.wiki.layers",{ready:s.ready,total:s.total,threshold:s.threshold.toFixed(2)});return s.skipped>0?t+o("agent.wiki.layersSkipped",{skipped:s.skipped}):t}f(I,"layersLine");function q(e,o,s){let t=j(s),r=e.pipeline;if(r?.empty&&e.changes.length===0)return S([{key:"result",lines:[t("agent.wiki.pipelineEmpty",{reason:r.scope.reason||"\u2014"})]},{key:"changes",lines:[]},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextEmpty")}`]}],o);if(B(e))return S([{key:"result",lines:[t("agent.wiki.noop")+I(e,t)]},{key:"changes",lines:[]},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextNoop")}`]}],o);let h=e.changes.filter(n=>n.action==="added").length,g=e.changes.filter(n=>n.action==="updated").length,p=t("agent.wiki.result",{done:e.counts.done,added:h,updated:g,failed:e.counts.failed,deferred:e.counts.deferred,calls:e.cost.calls,usd:E(e.cost.usd)});e.questionHousekeeping&&(e.questionHousekeeping.merged>0||e.questionHousekeeping.deleted>0)&&(p+=t("agent.wiki.housekeeping",e.questionHousekeeping)),e.stoppedBy&&(p+=t("agent.wiki.stopped",{reason:e.stoppedBy})),e.timing&&(p+=t("agent.wiki.timing",{duration:D(e.timing.wallMs),retries:e.timing.retries,peak:e.timing.peakConcurrency})),r&&(p+=t("agent.wiki.pipeline",{rounds:r.rounds,units:r.scope.units.length,domains:r.scope.domains.length,creates:r.scope.creates.length})),p+=I(e,t),e.heavyCoercions&&e.heavyCoercions.length>0&&(p+=t("agent.wiki.coercions",{count:e.heavyCoercions.length,targets:e.heavyCoercions.map(n=>n.taskTarget).join(", ")}));let $=[...e.changes.map(n=>{let u=r?.edits.find(k=>k.path===n.path),i=u&&u.sections.length>0?t("agent.wiki.sections",{sections:u.sections.map(k=>k.name).join("\u3001")}):"";return`- ${Q(n.path)} \xB7 ${t(`agent.action.${n.action}`)} \xB7 ${n.summary}${i}`}),...e.failures.map(n=>`- ${n.taskType} ${n.taskTarget} \xB7 ${t("agent.action.failed")} \xB7 ${n.error}`)],l=[];for(let n of e.skippedQuestions){let u=n.path?` \xB7 ${Q(n.path)}`:"";l.push(`- ${n.questionId??"?"} \xB7 ${n.subject} \xB7 ${n.severity}${u}`),n.context&&l.push(` ${t("agent.question.context",{context:n.context})}`);let i=n.options&&n.options.length>0?n.options.join(" / "):t("agent.question.free");l.push(` ${t("agent.question.options",{options:i})}`)}l.length>0&&l.push(t("agent.skipped.note"));let c=e.newQuestions.filter(n=>!e.skippedQuestions.some(u=>u.questionId===n.questionId)).map(n=>`- ${n.questionId} \xB7 ${n.subject} \xB7 ${n.severity} \xB7 ${Q(n.path)}`),a=[];for(let n of r?.review.filter(u=>!u.satisfied)??[])a.push(`- ${t("agent.wiki.unmet",{requirement:n.requirement,gap:n.gap||"\u2014"})}`);return(e.skippedQuestions.length>0||c.length>0)&&a.push(`- ${t("agent.wiki.nextAnswer")}`),a.push(`- ${t("agent.wiki.nextRerun")}`),e.graphUnavailable&&a.push(`- ${t("agent.graphUnavailable")}`),e.counts.failed>0&&a.push(`- ${t("agent.wiki.nextLogs",{runId:e.runId})}`),S([{key:"result",lines:[p]},{key:"changes",lines:$},{key:"skippedQuestions",lines:l},{key:"newQuestions",lines:c},{key:"next",lines:a}],o)}f(q,"renderWikiRun");function R(e,o,s){let t=j(s);return S([{key:"result",lines:[t("agent.wiki.dryRun",{count:e.length})]},{key:"changes",lines:e.map(r=>`- ${r} \xB7 ${t("agent.wiki.willUpdate")}`)},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextDryRun")}`]}],o)}f(R,"renderWikiDryRun");function D(e){let o=Math.round(e/1e3),s=Math.floor(o/60);return s>0?`${s}m${String(o%60).padStart(2,"0")}s`:`${o}s`}f(D,"formatDuration");async function _(e,o,s,t){let r=T(!!e.json,!!s.stdout.isTTY),h="wiki",g=await import("./chunk-
|
|
2
|
-
`),2;let{runCheckCommand:i}=await import("./chunk-
|
|
1
|
+
import{a as S,b as Q,c as E}from"./chunk-G3XA757G.js";import{a as y,b as x,c as T}from"./chunk-OP2B3OCA.js";import{A as v,B as C,C as w}from"./chunk-CBLU2NBO.js";import{a as f}from"./chunk-XUSV3KOD.js";function j(e){return(o,s)=>e(o,s)}f(j,"translateWith");function B(e){let{counts:o}=e;return o.done+o.failed+o.skipped+o.deferred+o.pending===0&&e.changes.length===0&&!e.stoppedBy}f(B,"isNoop");function I(e,o){let s=e.layers;if(!s||s.total===0)return"";let t=o("agent.wiki.layers",{ready:s.ready,total:s.total,threshold:s.threshold.toFixed(2)});return s.skipped>0?t+o("agent.wiki.layersSkipped",{skipped:s.skipped}):t}f(I,"layersLine");function q(e,o,s){let t=j(s),r=e.pipeline;if(r?.empty&&e.changes.length===0)return S([{key:"result",lines:[t("agent.wiki.pipelineEmpty",{reason:r.scope.reason||"\u2014"})]},{key:"changes",lines:[]},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextEmpty")}`]}],o);if(B(e))return S([{key:"result",lines:[t("agent.wiki.noop")+I(e,t)]},{key:"changes",lines:[]},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextNoop")}`]}],o);let h=e.changes.filter(n=>n.action==="added").length,g=e.changes.filter(n=>n.action==="updated").length,p=t("agent.wiki.result",{done:e.counts.done,added:h,updated:g,failed:e.counts.failed,deferred:e.counts.deferred,calls:e.cost.calls,usd:E(e.cost.usd)});e.questionHousekeeping&&(e.questionHousekeeping.merged>0||e.questionHousekeeping.deleted>0)&&(p+=t("agent.wiki.housekeeping",e.questionHousekeeping)),e.stoppedBy&&(p+=t("agent.wiki.stopped",{reason:e.stoppedBy})),e.timing&&(p+=t("agent.wiki.timing",{duration:D(e.timing.wallMs),retries:e.timing.retries,peak:e.timing.peakConcurrency})),r&&(p+=t("agent.wiki.pipeline",{rounds:r.rounds,units:r.scope.units.length,domains:r.scope.domains.length,creates:r.scope.creates.length})),p+=I(e,t),e.heavyCoercions&&e.heavyCoercions.length>0&&(p+=t("agent.wiki.coercions",{count:e.heavyCoercions.length,targets:e.heavyCoercions.map(n=>n.taskTarget).join(", ")}));let $=[...e.changes.map(n=>{let u=r?.edits.find(k=>k.path===n.path),i=u&&u.sections.length>0?t("agent.wiki.sections",{sections:u.sections.map(k=>k.name).join("\u3001")}):"";return`- ${Q(n.path)} \xB7 ${t(`agent.action.${n.action}`)} \xB7 ${n.summary}${i}`}),...e.failures.map(n=>`- ${n.taskType} ${n.taskTarget} \xB7 ${t("agent.action.failed")} \xB7 ${n.error}`)],l=[];for(let n of e.skippedQuestions){let u=n.path?` \xB7 ${Q(n.path)}`:"";l.push(`- ${n.questionId??"?"} \xB7 ${n.subject} \xB7 ${n.severity}${u}`),n.context&&l.push(` ${t("agent.question.context",{context:n.context})}`);let i=n.options&&n.options.length>0?n.options.join(" / "):t("agent.question.free");l.push(` ${t("agent.question.options",{options:i})}`)}l.length>0&&l.push(t("agent.skipped.note"));let c=e.newQuestions.filter(n=>!e.skippedQuestions.some(u=>u.questionId===n.questionId)).map(n=>`- ${n.questionId} \xB7 ${n.subject} \xB7 ${n.severity} \xB7 ${Q(n.path)}`),a=[];for(let n of r?.review.filter(u=>!u.satisfied)??[])a.push(`- ${t("agent.wiki.unmet",{requirement:n.requirement,gap:n.gap||"\u2014"})}`);return(e.skippedQuestions.length>0||c.length>0)&&a.push(`- ${t("agent.wiki.nextAnswer")}`),a.push(`- ${t("agent.wiki.nextRerun")}`),e.graphUnavailable&&a.push(`- ${t("agent.graphUnavailable")}`),e.counts.failed>0&&a.push(`- ${t("agent.wiki.nextLogs",{runId:e.runId})}`),S([{key:"result",lines:[p]},{key:"changes",lines:$},{key:"skippedQuestions",lines:l},{key:"newQuestions",lines:c},{key:"next",lines:a}],o)}f(q,"renderWikiRun");function R(e,o,s){let t=j(s);return S([{key:"result",lines:[t("agent.wiki.dryRun",{count:e.length})]},{key:"changes",lines:e.map(r=>`- ${r} \xB7 ${t("agent.wiki.willUpdate")}`)},{key:"skippedQuestions",lines:[]},{key:"newQuestions",lines:[]},{key:"next",lines:[`- ${t("agent.wiki.nextDryRun")}`]}],o)}f(R,"renderWikiDryRun");function D(e){let o=Math.round(e/1e3),s=Math.floor(o/60);return s>0?`${s}m${String(o%60).padStart(2,"0")}s`:`${o}s`}f(D,"formatDuration");async function _(e,o,s,t){let r=T(!!e.json,!!s.stdout.isTTY),h="wiki",g=await import("./chunk-BHULUCLO.js"),p=s.cwd(),$=(await g.loadConfig(p).catch(()=>null))?.language??"zh",l=g.translator($);if(e.check){if(o&&o.trim().length>0||e.scope!==void 0)return s.stderr.write(l("cli.usage.wikiCheck")+`
|
|
2
|
+
`),2;let{runCheckCommand:i}=await import("./chunk-LOULA2VD.js");return i({...e,check:!1,fix:!0},void 0,s)}if(e.scope!==void 0){if(o&&o.trim().length>0||t)return s.stderr.write(l("cli.usage.wikiScope")+`
|
|
3
3
|
`),2;let i=await g.resolveScopeDocuments(p,e.scope);if(i.unknown.length>0||i.documents.length===0)return s.stderr.write(l("cli.usage.wikiScopeUnknown",{items:i.unknown.join(", ")||e.scope})+`
|
|
4
4
|
`),2;t=new Set(i.documents)}let c=r==="tty"?await(await import("./chunk-JVGNBSF4.js")).mountWikiFlow(l,(await g.loadConfig(p).catch(()=>null))?.budget.max??0):null,a;try{a=await g.runWiki(p,o,t?{documents:t}:{},{onStage:c?i=>c.setStage(i):void 0,onQueue:c?i=>c.setTotal(i):void 0,onTaskStart:c?i=>c.startTask(i.id,`${i.type} ${i.target}`):void 0,onTaskFinish:c?(i,k,b)=>c.finishTask(i.id,k,b):void 0})}finally{c?.stop()}if(a.kind==="busy"){let i=a.at?new Date(a.at):null,k=l("run.busy",{owner:a.owner,pid:String(a.pid??"?"),since:i?i.toLocaleTimeString("zh-CN",{hour12:!1}):"?",minutes:i?String(Math.max(0,Math.round((Date.now()-i.getTime())/6e4))):"?"});return r==="json"?s.stdout.write(x(y(h,{problems:[{code:"run-busy",message:k}]}))+`
|
|
5
5
|
`):s.stderr.write(k+`
|