@lore-ai/cli 0.1.6
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/README.md +178 -0
- package/dist/bin/lore.js +14666 -0
- package/dist/bin/lore.js.map +1 -0
- package/dist/ui/assets/Analytics-W2ANIC2s.js +1 -0
- package/dist/ui/assets/ConversationDetail-Ct-hROwS.js +5 -0
- package/dist/ui/assets/Conversations-iK7E6GEl.js +1 -0
- package/dist/ui/assets/MarkdownPreview-2zDiish4.js +17 -0
- package/dist/ui/assets/MarkdownPreview-ZgkIHsf0.css +1 -0
- package/dist/ui/assets/Mcps-CCT1FQ4H.js +1 -0
- package/dist/ui/assets/Overview-B_jOY8il.js +1 -0
- package/dist/ui/assets/PhaseReview-B_DDY9YB.js +1 -0
- package/dist/ui/assets/RepoScans-FxiMynYO.js +2 -0
- package/dist/ui/assets/RepoSelector-DmPRS8kf.js +1 -0
- package/dist/ui/assets/ResizablePanels-Bbb4S6Ss.js +1 -0
- package/dist/ui/assets/Review-KjvS-DNP.js +3 -0
- package/dist/ui/assets/ScanConversation-BonEB7pv.js +1 -0
- package/dist/ui/assets/Scans-DXf2sNms.js +1 -0
- package/dist/ui/assets/Skills-MvVWWoB2.js +1 -0
- package/dist/ui/assets/ToolUsage-DA5MJNwl.js +33 -0
- package/dist/ui/assets/Vetting-BRGVrtOA.js +1 -0
- package/dist/ui/assets/index-CVSL0ryk.js +12 -0
- package/dist/ui/assets/index-DYKYIfPr.css +1 -0
- package/dist/ui/assets/markdown-CZuQZQX5.js +35 -0
- package/dist/ui/index.html +15 -0
- package/package.json +96 -0
- package/prompts/analyze-feedback.md +67 -0
- package/prompts/apply-refs-update.md +149 -0
- package/prompts/apply-skill-update.md +151 -0
- package/prompts/check-relevance.md +137 -0
- package/prompts/classify-conversations.md +78 -0
- package/prompts/cluster-repo-summaries.md +76 -0
- package/prompts/detect-staleness.md +42 -0
- package/prompts/distill-changes.md +62 -0
- package/prompts/distill-decisions.md +48 -0
- package/prompts/distill-patterns.md +39 -0
- package/prompts/generate-changelog.md +42 -0
- package/prompts/generate-references.md +192 -0
- package/prompts/generate-repo-skill.md +387 -0
- package/prompts/global-summary.md +55 -0
- package/prompts/orchestrate-merge.md +70 -0
- package/prompts/pr-description.md +49 -0
- package/prompts/research-repo.md +121 -0
- package/prompts/summarize-conversation.md +64 -0
- package/prompts/test-mcp.md +62 -0
- package/prompts/test-skill.md +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as S,j as e}from"./markdown-CZuQZQX5.js";import{i as R,j as C,k as $,l as y,m as E,n as F,o as P,p as T,q as V}from"./index-CVSL0ryk.js";import{t as u}from"./Overview-B_jOY8il.js";function H(){const s=R(),{data:t,isLoading:d}=C(),[l,p]=S.useState("probation"),[x,i]=S.useState(!1),[n,m]=S.useState(null),o=()=>{s.invalidateQueries({queryKey:V.vetting})},h=async a=>{i(!0),await $(a).catch(console.error),o(),i(!1)},f=async a=>{i(!0),await y(a).catch(console.error),o(),i(!1)},j=async a=>{i(!0),await E(a).catch(console.error),o(),i(!1)},v=async()=>{i(!0),await F().catch(console.error),o(),i(!1)},b=async()=>{i(!0),await P().catch(console.error),o(),i(!1)},r=async(a,N,k)=>{i(!0),await T(a,N,k).catch(console.error),o(),i(!1)};if(d&&!t)return e.jsx("div",{className:"text-zinc-500 py-8 text-center",children:"Loading..."});const c=t?l==="probation"?t.probation:l==="approved"?t.approved:t.rejected:[];return e.jsxs("div",{className:"max-w-6xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h2",{className:"text-2xl font-bold text-white",children:"Vetting"}),t&&t.overallFreshness!=null&&e.jsx(I,{score:t.overallFreshness,label:"Freshness"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:v,disabled:x,className:"px-3 py-1.5 text-xs rounded-lg bg-purple-600/20 text-purple-400 border border-purple-500/30 hover:bg-purple-600/30 disabled:opacity-50 transition-colors",children:"Run Tests"}),e.jsx("button",{onClick:b,disabled:x,className:"px-3 py-1.5 text-xs rounded-lg bg-blue-600/20 text-blue-400 border border-blue-500/30 hover:bg-blue-600/30 disabled:opacity-50 transition-colors",children:"Run Scoring"})]})]}),e.jsx("div",{className:"flex gap-1 mb-6 bg-[#16171f] rounded-lg p-1 w-fit border border-[#27282f]",children:["probation","approved","rejected"].map(a=>{const N=t?a==="probation"?t.probation.length:a==="approved"?t.approved.length:t.rejected.length:0;return e.jsxs("button",{onClick:()=>p(a),className:`px-4 py-1.5 rounded-md text-sm transition-colors ${l===a?a==="probation"?"bg-amber-600/20 text-amber-400":a==="approved"?"bg-emerald-600/20 text-emerald-400":"bg-red-600/20 text-red-400":"text-zinc-500 hover:text-zinc-300"}`,children:[a.charAt(0).toUpperCase()+a.slice(1)," (",N,")"]},a)})}),e.jsxs("div",{className:"space-y-3",children:[c.length===0&&e.jsxs("div",{className:"text-center text-zinc-500 py-12 text-sm bg-[#16171f] border border-[#27282f] rounded-xl",children:["No entries in ",l,"."]}),c.map(a=>e.jsx(A,{entry:a,expanded:n===a.id,onToggle:()=>m(n===a.id?null:a.id),onApprove:()=>h(a.id),onReject:()=>f(a.id),onReProbate:()=>j(a.id),onRewriteAction:r,actionLoading:x,needsReview:t?.needsReview.includes(a.id)??!1},a.id))]})]})}function A({entry:s,expanded:t,onToggle:d,onApprove:l,onReject:p,onReProbate:x,onRewriteAction:i,actionLoading:n,needsReview:m}){const o=Date.now(),h=new Date(s.probationEnds).getTime(),f=Math.max(0,Math.ceil((h-o)/(1e3*60*60*24))),j=s.passiveScore.usageCount>0?Math.round(s.passiveScore.successRate*100):0,v=s.activeScore.testsRun>0?Math.round(s.activeScore.testsPassed/s.activeScore.testsRun*100):0,b=s.rewrites.filter(r=>r.status==="pending");return e.jsxs("div",{className:"bg-[#16171f] border border-[#27282f] rounded-xl overflow-hidden",children:[e.jsxs("button",{onClick:d,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-[#1e1f2a] transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-medium ${s.type==="skill"?"bg-blue-500/10 text-blue-400":"bg-purple-500/10 text-purple-400"}`,children:s.type.toUpperCase()}),e.jsx("span",{className:"text-sm font-medium text-zinc-200",children:s.name}),m&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] font-medium bg-amber-500/10 text-amber-400 border border-amber-500/20",children:"NEEDS REVIEW"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(D,{score:s.finalScore}),s.drift&&e.jsx(O,{score:s.drift.freshnessScore,status:s.drift.freshnessStatus}),s.status==="probation"&&e.jsxs("span",{className:"text-[10px] text-zinc-500",children:[f,"d remaining"]}),e.jsx("svg",{className:`w-4 h-4 text-zinc-500 transition-transform ${t?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]})]}),t&&e.jsxs("div",{className:"border-t border-[#27282f] px-4 py-4 space-y-4",children:[e.jsxs("div",{className:`grid gap-3 ${s.drift?"grid-cols-4":"grid-cols-3"}`,children:[e.jsx(g,{label:"Passive",value:j,detail:`${s.passiveScore.usageCount} uses, ${Math.round(s.passiveScore.successRate*100)}% success`}),e.jsx(g,{label:"Active",value:v,detail:`${s.activeScore.testsPassed}/${s.activeScore.testsRun} tests passed`}),s.drift&&e.jsx(g,{label:"Freshness",value:s.drift.freshnessScore,detail:`${s.drift.daysSinceUpdate}d since update`}),e.jsx(g,{label:"Final",value:s.finalScore,detail:s.status})]}),e.jsxs("div",{className:"text-xs text-zinc-500 space-y-1",children:[e.jsxs("div",{children:["Path: ",e.jsx("span",{className:"font-mono text-zinc-400",children:s.path})]}),e.jsxs("div",{children:["Detected: ",u(s.detectedAt)]}),s.activeScore.lastTestAt&&e.jsxs("div",{children:["Last tested: ",u(s.activeScore.lastTestAt)]}),s.drift?.lastUpdated&&e.jsxs("div",{children:["Skill last updated: ",u(s.drift.lastUpdated)]}),s.drift&&s.drift.postUpdateConversations>0&&e.jsxs("div",{children:["Post-update conversations: ",e.jsx("span",{className:"text-zinc-400",children:s.drift.postUpdateConversations})," of ",s.drift.totalConversations," total"]})]}),s.feedback.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider mb-2",children:["Feedback (",s.feedback.length,")"]}),e.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:s.feedback.slice(-10).map((r,c)=>e.jsxs("div",{className:"text-xs flex items-start gap-2 py-1 border-b border-[#27282f] last:border-b-0",children:[e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${r.source==="passive"?"bg-zinc-500/10 text-zinc-400":"bg-blue-500/10 text-blue-400"}`,children:r.source}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${r.category==="failure"?"bg-red-500/10 text-red-400":r.category==="conflict"?"bg-amber-500/10 text-amber-400":"bg-zinc-500/10 text-zinc-400"}`,children:r.category}),e.jsx("span",{className:"text-zinc-300 flex-1",children:r.description}),e.jsx("span",{className:"text-zinc-600 shrink-0",children:u(r.timestamp)})]},c))})]}),s.drift&&s.drift.signals.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider mb-2",children:["Drift Signals (",s.drift.signals.length,")"]}),e.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:s.drift.signals.map((r,c)=>e.jsx(_,{signal:r},c))})]}),s.drift&&(s.drift.freshnessStatus==="stale"||s.drift.freshnessStatus==="critical")&&e.jsxs("div",{className:"bg-[#0f1117] rounded-lg p-3 border border-[#27282f]",children:[e.jsx("div",{className:"text-xs font-semibold text-zinc-400 mb-1",children:"Recommendation"}),e.jsx("div",{className:"text-xs text-zinc-300",children:s.drift.freshnessStatus==="critical"?"This skill urgently needs regeneration. Run `lore skills` to update it.":"This skill is significantly outdated. Consider regenerating with `lore skills`."})]}),b.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold text-zinc-400 uppercase tracking-wider mb-2",children:["Pending Rewrites (",b.length,")"]}),e.jsx("div",{className:"space-y-2",children:b.map(r=>e.jsxs("div",{className:"bg-[#0f1117] rounded-lg p-3 border border-[#27282f]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-zinc-300",children:r.reason}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-medium ${r.severity==="minor"?"bg-blue-500/10 text-blue-400":"bg-amber-500/10 text-amber-400"}`,children:r.severity})]}),e.jsx("pre",{className:"text-[11px] text-zinc-400 font-mono bg-[#0a0b10] rounded p-2 overflow-x-auto mb-2 max-h-32 overflow-y-auto",children:r.diff}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>i(s.id,r.id,"applied"),disabled:n,className:"px-2 py-1 text-[10px] rounded bg-emerald-600/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-600/30 disabled:opacity-50",children:"Apply"}),e.jsx("button",{onClick:()=>i(s.id,r.id,"dismissed"),disabled:n,className:"px-2 py-1 text-[10px] rounded bg-zinc-600/20 text-zinc-400 border border-zinc-500/30 hover:bg-zinc-600/30 disabled:opacity-50",children:"Dismiss"})]})]},r.id))})]}),e.jsxs("div",{className:"flex gap-2 pt-2 border-t border-[#27282f]",children:[s.status==="probation"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:l,disabled:n,className:"px-3 py-1.5 text-xs rounded-lg bg-emerald-600/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-600/30 disabled:opacity-50 transition-colors",children:"Approve"}),e.jsx("button",{onClick:p,disabled:n,className:"px-3 py-1.5 text-xs rounded-lg bg-red-600/20 text-red-400 border border-red-500/30 hover:bg-red-600/30 disabled:opacity-50 transition-colors",children:"Reject"})]}),s.status==="rejected"&&e.jsx("button",{onClick:x,disabled:n,className:"px-3 py-1.5 text-xs rounded-lg bg-amber-600/20 text-amber-400 border border-amber-500/30 hover:bg-amber-600/30 disabled:opacity-50 transition-colors",children:"Re-enter Probation"}),s.status==="approved"&&m&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:l,disabled:n,className:"px-3 py-1.5 text-xs rounded-lg bg-emerald-600/20 text-emerald-400 border border-emerald-500/30 hover:bg-emerald-600/30 disabled:opacity-50 transition-colors",children:"Re-approve"}),e.jsx("button",{onClick:p,disabled:n,className:"px-3 py-1.5 text-xs rounded-lg bg-red-600/20 text-red-400 border border-red-500/30 hover:bg-red-600/30 disabled:opacity-50 transition-colors",children:"Reject"})]})]})]})]})}function D({score:s}){const t=s>=60?"text-emerald-400":s>=50?"text-amber-400":"text-red-400";return e.jsx("span",{className:`text-sm font-mono font-bold ${t}`,children:s})}function g({label:s,value:t,detail:d}){const l=t>=60?"bg-emerald-500":t>=50?"bg-amber-500":"bg-red-500";return e.jsxs("div",{className:"bg-[#0f1117] rounded-lg p-3 border border-[#27282f]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:s}),e.jsx("span",{className:"text-sm font-mono font-bold text-zinc-200",children:t})]}),e.jsx("div",{className:"h-1 bg-[#1e1f2a] rounded-full overflow-hidden mb-1.5",children:e.jsx("div",{className:`h-full ${l} rounded-full transition-all`,style:{width:`${t}%`}})}),e.jsx("span",{className:"text-[10px] text-zinc-600",children:d})]})}function I({score:s,label:t}){const d=s>=75?"text-emerald-400 bg-emerald-500/10 border-emerald-500/20":s>=50?"text-amber-400 bg-amber-500/10 border-amber-500/20":s>=25?"text-orange-400 bg-orange-500/10 border-orange-500/20":"text-red-400 bg-red-500/10 border-red-500/20";return e.jsxs("span",{className:`px-2.5 py-1 rounded-lg text-xs font-medium border ${d}`,children:[t,": ",s]})}const U={fresh:"text-emerald-400",aging:"text-amber-400",stale:"text-orange-400",critical:"text-red-400"},M={fresh:"bg-emerald-400",aging:"bg-amber-400",stale:"bg-orange-400",critical:"bg-red-400"};function O({score:s,status:t}){return e.jsxs("span",{className:`flex items-center gap-1 text-[10px] font-mono ${U[t]??"text-zinc-400"}`,children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${M[t]??"bg-zinc-400"}`}),s]})}const w={low:{bg:"bg-zinc-500/10",text:"text-zinc-400"},medium:{bg:"bg-amber-500/10",text:"text-amber-400"},high:{bg:"bg-red-500/10",text:"text-red-400"}},z={"new-pattern":{bg:"bg-purple-500/10",text:"text-purple-400"},"new-decision":{bg:"bg-blue-500/10",text:"text-blue-400"},"file-activity":{bg:"bg-cyan-500/10",text:"text-cyan-400"},"stale-age":{bg:"bg-orange-500/10",text:"text-orange-400"},"skill-referenced":{bg:"bg-zinc-500/10",text:"text-zinc-400"}};function _({signal:s}){const t=w[s.severity]??w.low,d=z[s.type]??z["stale-age"];return e.jsxs("div",{className:"text-xs flex items-start gap-2 py-1.5 border-b border-[#27282f] last:border-b-0",children:[e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${t.bg} ${t.text}`,children:s.severity}),e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[9px] font-medium shrink-0 ${d.bg} ${d.text}`,children:s.type.replace(/-/g," ")}),e.jsx("span",{className:"text-zinc-300 flex-1",children:s.description})]})}export{H as default};
|