@hir4ta/mneme 0.25.3 → 0.25.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/public/assets/index-BL-68Hbg.css +1 -0
- package/dist/public/assets/{index-D5cmxusP.js → index-tR2LCHxV.js} +47 -47
- package/dist/public/assets/{react-force-graph-2d-DblYYNfu.js → react-force-graph-2d-mQiBB_hU.js} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/server.js +55 -3
- package/dist/servers/db-server.js +26 -26
- package/package.json +1 -1
- package/servers/db/save.ts +4 -30
- package/dist/public/assets/index-DsMvdGSy.css +0 -1
package/dist/public/assets/{react-force-graph-2d-DblYYNfu.js → react-force-graph-2d-mQiBB_hU.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as zt,r as ot,R as Di,c as On,a as En,b as $i,o as ji,m as zn,d as Rn,g as Fi}from"./index-
|
|
1
|
+
import{i as zt,r as ot,R as Di,c as On,a as En,b as $i,o as ji,m as zn,d as Rn,g as Fi}from"./index-tR2LCHxV.js";function Ui(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var In=180/Math.PI,Xe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Pr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i<n*r&&(e=-e,n=-n,f=-f,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*In,skewX:Math.atan(f)*In,scaleX:s,scaleY:u}}var fe;function Li(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?Xe:Pr(n.a,n.b,n.c,n.d,n.e,n.f)}function qi(e){return e==null||(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",e),!(e=fe.transform.baseVal.consolidate()))?Xe:(e=e.matrix,Pr(e.a,e.b,e.c,e.d,e.e,e.f))}function Or(e,n,r,i){function o(l){return l.length?l.pop()+" ":""}function a(l,h,c,d,p,y){if(l!==c||h!==d){var m=p.push("translate(",null,n,null,r);y.push({i:m-4,x:zt(l,c)},{i:m-2,x:zt(h,d)})}else(c||d)&&p.push("translate("+c+n+d+r)}function s(l,h,c,d){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),d.push({i:c.push(o(c)+"rotate(",null,i)-2,x:zt(l,h)})):h&&c.push(o(c)+"rotate("+h+i)}function u(l,h,c,d){l!==h?d.push({i:c.push(o(c)+"skewX(",null,i)-2,x:zt(l,h)}):h&&c.push(o(c)+"skewX("+h+i)}function f(l,h,c,d,p,y){if(l!==c||h!==d){var m=p.push(o(p)+"scale(",null,",",null,")");y.push({i:m-4,x:zt(l,c)},{i:m-2,x:zt(h,d)})}else(c!==1||d!==1)&&p.push(o(p)+"scale("+c+","+d+")")}return function(l,h){var c=[],d=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,c,d),s(l.rotate,h.rotate,c,d),u(l.skewX,h.skewX,c,d),f(l.scaleX,l.scaleY,h.scaleX,h.scaleY,c,d),l=h=null,function(p){for(var y=-1,m=d.length,_;++y<m;)c[(_=d[y]).i]=_.x(p);return c.join("")}}}var Hi=Or(Li,"px, ","px)","deg)"),Vi=Or(qi,", ",")",")"),Gi=1e-12;function Nn(e){return((e=Math.exp(e))+1/e)/2}function Wi(e){return((e=Math.exp(e))-1/e)/2}function Bi(e){return((e=Math.exp(2*e))-1)/(e+1)}const Xi=(function e(n,r,i){function o(a,s){var u=a[0],f=a[1],l=a[2],h=s[0],c=s[1],d=s[2],p=h-u,y=c-f,m=p*p+y*y,_,g;if(m<Gi)g=Math.log(d/l)/n,_=function(S){return[u+S*p,f+S*y,l*Math.exp(n*S*g)]};else{var w=Math.sqrt(m),C=(d*d-l*l+i*m)/(2*l*r*w),b=(d*d-l*l-i*m)/(2*d*r*w),x=Math.log(Math.sqrt(C*C+1)-C),A=Math.log(Math.sqrt(b*b+1)-b);g=(A-x)/n,_=function(S){var T=S*g,R=Nn(x),O=l/(r*w)*(R*Bi(n*T+x)-Wi(x));return[u+O*p,f+O*y,l*R/Nn(n*T+x)]}}return _.duration=g*1e3*n/Math.SQRT2,_}return o.rho=function(a){var s=Math.max(.001,+a),u=s*s,f=u*u;return e(s,u,f)},o})(Math.SQRT2,2,4);function Yi(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function Zi(e,n,r){return n=io(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Dn(e,n){return Ji(e)||Yi(e,n)||Er(e,n)||no()}function Ki(e){return Qi(e)||to(e)||Er(e)||eo()}function Qi(e){if(Array.isArray(e))return Ye(e)}function Ji(e){if(Array.isArray(e))return e}function to(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Er(e,n){if(e){if(typeof e=="string")return Ye(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ye(e,n)}}function Ye(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=new Array(n);r<n;r++)i[r]=e[r];return i}function eo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function no(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ro(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function io(e){var n=ro(e,"string");return typeof n=="symbol"?n:String(n)}var oo=function(n,r){var i=new Set(r);return Object.assign.apply(Object,[{}].concat(Ki(Object.entries(n).filter(function(o){var a=Dn(o,1),s=a[0];return!i.has(s)}).map(function(o){var a=Dn(o,2),s=a[0],u=a[1];return Zi({},s,u)}))))};function Ze(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function ao(e){if(Array.isArray(e))return e}function so(e){if(Array.isArray(e))return Ze(e)}function uo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lo(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,a,s,u=[],f=!0,l=!1;try{if(a=(r=r.call(e)).next,n!==0)for(;!(f=(i=a.call(r)).done)&&(u.push(i.value),u.length!==n);f=!0);}catch(h){l=!0,o=h}finally{try{if(!f&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return u}}function fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function co(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
package/dist/public/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>mneme - Dashboard</title>
|
|
7
7
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32-max.png" />
|
|
8
8
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-tR2LCHxV.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BL-68Hbg.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/dist/server.js
CHANGED
|
@@ -4496,7 +4496,7 @@ misc.get("/project", (c) => {
|
|
|
4496
4496
|
}
|
|
4497
4497
|
} catch {
|
|
4498
4498
|
}
|
|
4499
|
-
const version = "0.25.
|
|
4499
|
+
const version = "0.25.5";
|
|
4500
4500
|
return c.json({
|
|
4501
4501
|
name: projectName,
|
|
4502
4502
|
path: projectRoot,
|
|
@@ -5189,8 +5189,36 @@ function buildGroupedInteractions(interactions) {
|
|
|
5189
5189
|
};
|
|
5190
5190
|
} else if (interaction.role === "assistant") {
|
|
5191
5191
|
if (current) {
|
|
5192
|
-
|
|
5193
|
-
current.
|
|
5192
|
+
const assistantMeta = parseInteractionMetadata(interaction.tool_calls);
|
|
5193
|
+
if (current.assistant && assistantMeta.isContinuation) {
|
|
5194
|
+
grouped.push(current);
|
|
5195
|
+
current = {
|
|
5196
|
+
id: `int-${String(grouped.length + 1).padStart(3, "0")}`,
|
|
5197
|
+
timestamp: interaction.timestamp,
|
|
5198
|
+
user: "",
|
|
5199
|
+
assistant: interaction.content,
|
|
5200
|
+
thinking: interaction.thinking || null,
|
|
5201
|
+
isCompactSummary: !!interaction.is_compact_summary,
|
|
5202
|
+
isContinuation: true,
|
|
5203
|
+
...assistantMeta,
|
|
5204
|
+
...interaction.agent_id && { agentId: interaction.agent_id },
|
|
5205
|
+
...interaction.agent_type && {
|
|
5206
|
+
agentType: interaction.agent_type
|
|
5207
|
+
}
|
|
5208
|
+
};
|
|
5209
|
+
} else if (current.assistant) {
|
|
5210
|
+
current.assistant += `
|
|
5211
|
+
|
|
5212
|
+
${interaction.content}`;
|
|
5213
|
+
if (interaction.thinking) {
|
|
5214
|
+
current.thinking = current.thinking ? `${current.thinking}
|
|
5215
|
+
|
|
5216
|
+
${interaction.thinking}` : interaction.thinking;
|
|
5217
|
+
}
|
|
5218
|
+
} else {
|
|
5219
|
+
current.assistant = interaction.content;
|
|
5220
|
+
current.thinking = interaction.thinking || null;
|
|
5221
|
+
}
|
|
5194
5222
|
} else {
|
|
5195
5223
|
const meta = parseInteractionMetadata(interaction.tool_calls);
|
|
5196
5224
|
current = {
|
|
@@ -5544,6 +5572,30 @@ team.get("/quality", async (c) => {
|
|
|
5544
5572
|
}
|
|
5545
5573
|
}
|
|
5546
5574
|
}
|
|
5575
|
+
const patDir = patternsDir();
|
|
5576
|
+
if (fs16.existsSync(patDir)) {
|
|
5577
|
+
for (const filePath of listJsonFiles(patDir)) {
|
|
5578
|
+
const doc = safeParseJsonFile(filePath);
|
|
5579
|
+
const entries = doc?.items || doc?.patterns || [];
|
|
5580
|
+
for (const item of entries) {
|
|
5581
|
+
totalRules++;
|
|
5582
|
+
if (item.status === "approved") approvedRules++;
|
|
5583
|
+
}
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
const decDir = path15.join(getMnemeDir(), "decisions");
|
|
5587
|
+
if (fs16.existsSync(decDir)) {
|
|
5588
|
+
for (const filePath of listDatedJsonFiles(decDir)) {
|
|
5589
|
+
const doc = safeParseJsonFile(filePath);
|
|
5590
|
+
if (!doc) continue;
|
|
5591
|
+
const raw2 = doc;
|
|
5592
|
+
const entries = Array.isArray(raw2.items) ? raw2.items : raw2.id ? [raw2] : [];
|
|
5593
|
+
for (const item of entries) {
|
|
5594
|
+
totalRules++;
|
|
5595
|
+
if (item.status === "approved") approvedRules++;
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5547
5599
|
topRules.sort((a, b) => {
|
|
5548
5600
|
const rateA = a.appliedCount > 0 ? a.acceptedCount / a.appliedCount : 0;
|
|
5549
5601
|
const rateB = b.appliedCount > 0 ? b.acceptedCount / b.appliedCount : 0;
|