@imenam/mcp-documentor 1.0.89 → 1.0.91
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 +2 -2
- package/dist/src/tools/get-doc-metadata.js +2 -0
- package/dist/src/tools/git-diff-doc.js +10 -5
- package/gui/dist/assets/{arc-BSPFCwLF.js → arc-VljQAUvA.js} +1 -1
- package/gui/dist/assets/{architectureDiagram-3BPJPVTR-DHZcCdLS.js → architectureDiagram-3BPJPVTR-lbkjtvmN.js} +1 -1
- package/gui/dist/assets/{blockDiagram-GPEHLZMM-D9dTrlKM.js → blockDiagram-GPEHLZMM-G4A-rV4c.js} +1 -1
- package/gui/dist/assets/{c4Diagram-AAUBKEIU-BF3-rTSW.js → c4Diagram-AAUBKEIU-Dq3aMw8v.js} +1 -1
- package/gui/dist/assets/channel-DFvG2cZZ.js +1 -0
- package/gui/dist/assets/{chunk-2J33WTMH-B_rKbUyS.js → chunk-2J33WTMH-VSzyIJHo.js} +1 -1
- package/gui/dist/assets/{chunk-4BX2VUAB-C9w424bT.js → chunk-4BX2VUAB-DER41q8w.js} +1 -1
- package/gui/dist/assets/{chunk-55IACEB6-B2gLfiw3.js → chunk-55IACEB6-BlOGGRk4.js} +1 -1
- package/gui/dist/assets/{chunk-727SXJPM-CXLwbQzD.js → chunk-727SXJPM-Dv3Ay2KV.js} +1 -1
- package/gui/dist/assets/{chunk-AQP2D5EJ-DIEelNex.js → chunk-AQP2D5EJ-BycHHbwh.js} +1 -1
- package/gui/dist/assets/{chunk-FMBD7UC4-CKDjYi8Q.js → chunk-FMBD7UC4-DBoCiqpY.js} +1 -1
- package/gui/dist/assets/{chunk-ND2GUHAM-D5NTnoWH.js → chunk-ND2GUHAM-DGKypjhb.js} +1 -1
- package/gui/dist/assets/{chunk-QZHKN3VN-Cc9DzsoT.js → chunk-QZHKN3VN-B8Gn_mBo.js} +1 -1
- package/gui/dist/assets/classDiagram-4FO5ZUOK-B8xEoAMI.js +1 -0
- package/gui/dist/assets/classDiagram-v2-Q7XG4LA2-B8xEoAMI.js +1 -0
- package/gui/dist/assets/{cose-bilkent-S5V4N54A-zK_y1Jct.js → cose-bilkent-S5V4N54A-DyamTuYj.js} +1 -1
- package/gui/dist/assets/{dagre-BM42HDAG-D87rXs2_.js → dagre-BM42HDAG-BKC5D2WN.js} +1 -1
- package/gui/dist/assets/{diagram-2AECGRRQ-0qYWhZfZ.js → diagram-2AECGRRQ-BV2lBpwH.js} +1 -1
- package/gui/dist/assets/{diagram-5GNKFQAL-BvmrfVQ0.js → diagram-5GNKFQAL-DGwbAj4W.js} +1 -1
- package/gui/dist/assets/{diagram-KO2AKTUF-0DIH1FgX.js → diagram-KO2AKTUF-CZAde8Sg.js} +1 -1
- package/gui/dist/assets/{diagram-LMA3HP47-T8W429Io.js → diagram-LMA3HP47-fQfo0z7i.js} +1 -1
- package/gui/dist/assets/{diagram-OG6HWLK6-DJMnhtDn.js → diagram-OG6HWLK6-BlD3VAFM.js} +1 -1
- package/gui/dist/assets/{erDiagram-TEJ5UH35-CyuwcTwK.js → erDiagram-TEJ5UH35-DPUEmQfe.js} +1 -1
- package/gui/dist/assets/{flowDiagram-I6XJVG4X-xhGOn_4T.js → flowDiagram-I6XJVG4X-p2HfkBjW.js} +1 -1
- package/gui/dist/assets/{ganttDiagram-6RSMTGT7-CmkhPjbj.js → ganttDiagram-6RSMTGT7-CWfFoy4g.js} +1 -1
- package/gui/dist/assets/{gitGraphDiagram-PVQCEYII-CyMVk2nl.js → gitGraphDiagram-PVQCEYII-DkTKzmes.js} +1 -1
- package/gui/dist/assets/index-BJ4WCWig.css +1 -0
- package/gui/dist/assets/{index-CCqNIUBp.js → index-C8LVeAsA.js} +181 -181
- package/gui/dist/assets/{infoDiagram-5YYISTIA-q2gOQizR.js → infoDiagram-5YYISTIA-CXHTqZoU.js} +1 -1
- package/gui/dist/assets/{ishikawaDiagram-YF4QCWOH-C_a8ouWt.js → ishikawaDiagram-YF4QCWOH-DZ61Cc8a.js} +1 -1
- package/gui/dist/assets/{journeyDiagram-JHISSGLW-B0XgZgmz.js → journeyDiagram-JHISSGLW-qYtEmFuB.js} +1 -1
- package/gui/dist/assets/{kanban-definition-UN3LZRKU-BE1EyBT0.js → kanban-definition-UN3LZRKU-Bs-W313s.js} +1 -1
- package/gui/dist/assets/{linear-CJpiIHfp.js → linear-CU6J91M5.js} +1 -1
- package/gui/dist/assets/{mindmap-definition-RKZ34NQL-BqrhFP-W.js → mindmap-definition-RKZ34NQL-CvBqAH4c.js} +1 -1
- package/gui/dist/assets/{pieDiagram-4H26LBE5-TchMhFLa.js → pieDiagram-4H26LBE5-BD2UcQce.js} +1 -1
- package/gui/dist/assets/{quadrantDiagram-W4KKPZXB-KjwnPHRE.js → quadrantDiagram-W4KKPZXB-DEuynlP9.js} +1 -1
- package/gui/dist/assets/{requirementDiagram-4Y6WPE33-9wlFYy5z.js → requirementDiagram-4Y6WPE33-DPxfzOF3.js} +1 -1
- package/gui/dist/assets/{sankeyDiagram-5OEKKPKP-3DSwfggy.js → sankeyDiagram-5OEKKPKP-C70_cePR.js} +1 -1
- package/gui/dist/assets/{sequenceDiagram-3UESZ5HK-CeGhZql1.js → sequenceDiagram-3UESZ5HK-FDb_1B1W.js} +1 -1
- package/gui/dist/assets/{stateDiagram-AJRCARHV-DgPL6ffw.js → stateDiagram-AJRCARHV-BH1bq2it.js} +1 -1
- package/gui/dist/assets/stateDiagram-v2-BHNVJYJU-BfpDu1Qi.js +1 -0
- package/gui/dist/assets/{timeline-definition-PNZ67QCA-BUs8-FJU.js → timeline-definition-PNZ67QCA-DNUx0JIp.js} +1 -1
- package/gui/dist/assets/{vennDiagram-CIIHVFJN-Csa_wIyD.js → vennDiagram-CIIHVFJN-DEAfzbjb.js} +1 -1
- package/gui/dist/assets/{wardley-L42UT6IY-Cw3ksKPO.js → wardley-L42UT6IY-_REPWPb-.js} +1 -1
- package/gui/dist/assets/{wardleyDiagram-YWT4CUSO-C0tdxIha.js → wardleyDiagram-YWT4CUSO-CZFLXFE3.js} +1 -1
- package/gui/dist/assets/{xychartDiagram-2RQKCTM6-C6UgKrOd.js → xychartDiagram-2RQKCTM6-P2Nhif6M.js} +1 -1
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/gui/dist/assets/channel-BgXnhna2.js +0 -1
- package/gui/dist/assets/classDiagram-4FO5ZUOK-DmPDrQWl.js +0 -1
- package/gui/dist/assets/classDiagram-v2-Q7XG4LA2-DmPDrQWl.js +0 -1
- package/gui/dist/assets/index-CtPuh-0k.css +0 -1
- package/gui/dist/assets/stateDiagram-v2-BHNVJYJU-y8DOR9eQ.js +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Connect it to Cursor, Claude Desktop, or any MCP-compatible agent to let your AI
|
|
|
12
12
|
- **Track a branch, not a checkout** — point a project at a GitHub branch from its settings in the GUI and freshness is measured against *published* code: switching branches or editing without committing no longer makes docs look stale, and a server with no copy of the codebase (an MCP gateway) can still verify them
|
|
13
13
|
- **Semantic search** — find relevant docs by meaning (requires an OpenAI API key)
|
|
14
14
|
- **Multi-project support** — organize docs into separate projects; every MCP tool names the project it targets, and the GUI's project selector is a per-browser view preference
|
|
15
|
-
- **GUI** — built-in web interface, either behind the proxy (`PROXY_URL`) or served directly on a local port (`APP_PORT`); with neither, the GUI worker is not started
|
|
15
|
+
- **GUI** — built-in web interface, either behind the proxy (`PROXY_URL`) or served directly on a local port (`APP_PORT`); with neither, the GUI worker is not started. Navigation runs from an icon rail on the left: the current project's badge (click to switch projects or create one), then Documentation, Search (`Ctrl/⌘ + K`, current or all projects), Outdated, Recent, Export bundles and Logs, with Sync and Settings at the bottom. Each destination fills the panel next to the rail; the panel's hide button, or a second click on the active icon, folds it away. Drag the panel's right edge to resize it (double-click resets the width); the browser remembers the width. The details panel on the right of a document (`Ctrl/⌘ + \`) is open by default from 1280 px wide; showing or hiding it by hand is remembered across reloads until the window crosses that width. Badges show the outdated docs, pending commits and the day's failed GitHub calls
|
|
16
16
|
- **Proxy-aware** — integrates with the [proxy-setup](https://github.com/Imena/proxy-setup) for GUI exposure
|
|
17
17
|
- **Links & structure** — `check_links`, `get_doc_tree`, `move_doc`, and `git_diff_doc` for maintenance workflows
|
|
18
18
|
- **Image support** — upload images to a project's assets via `upload_image` (local file path) or directly from the GUI editor; images are stored per-project and rendered inline in the viewer and in PDF exports
|
|
@@ -127,7 +127,7 @@ that work on a whole project (`list_docs`, `get_doc_tree`, `check_freshness` wit
|
|
|
127
127
|
| `search_docs` | Semantic search over docs (natural language; requires OpenAI) |
|
|
128
128
|
| `check_freshness` | Staleness for one doc (`project` required) or a full project scan |
|
|
129
129
|
| `refresh_file_snapshot` | Mark tracked files as up-to-date without editing the doc (`project` required) |
|
|
130
|
-
| `git_diff_doc` | Diff of changed tracked files between their snapshot content and the current one (`project` required) |
|
|
130
|
+
| `git_diff_doc` | Diff of changed tracked files between their snapshot content and the current one (`project` required). Files whose tracked sections can no longer be located (anchors lost) are included and diffed whole, with a warning |
|
|
131
131
|
| `check_links` | Validate `related_docs`, `doc://` links, and `#heading` anchors (`project` required) |
|
|
132
132
|
| `list_projects` | List all documentation projects |
|
|
133
133
|
| `upload_image` | Upload an image from a local file path to a project's assets (`project` required); returns the markdown link to insert |
|
|
@@ -18,6 +18,8 @@ export async function getDocMetadata(storageEngine, args) {
|
|
|
18
18
|
return "✗ modified";
|
|
19
19
|
if (report.missing.includes(filePath))
|
|
20
20
|
return "✗ missing";
|
|
21
|
+
if (report.anchors_lost.includes(filePath))
|
|
22
|
+
return "⚠ anchors lost (re-declare the sections via update_doc)";
|
|
21
23
|
return "✓ up to date";
|
|
22
24
|
};
|
|
23
25
|
let text = `**Path:** ${doc.id}\n`;
|
|
@@ -163,15 +163,16 @@ export async function gitDiffDoc(storageEngine, args) {
|
|
|
163
163
|
docSections.push(`## ${doc.title}\n\n[INFO] No tracked files.`);
|
|
164
164
|
continue;
|
|
165
165
|
}
|
|
166
|
+
const freshness = await computeFreshness(doc.tracked_files, project);
|
|
167
|
+
const anchorsLost = new Set(freshness.anchors_lost);
|
|
166
168
|
let filesToDiff;
|
|
167
169
|
if (wanted) {
|
|
168
170
|
filesToDiff = doc.tracked_files.filter((tf) => wanted.has(tf.path));
|
|
169
171
|
}
|
|
170
172
|
else {
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
const changedPaths = new Set([...freshness.modified, ...freshness.missing, ...freshness.broken]);
|
|
173
|
+
// Broken entries (no snapshot) and files whose sections can no longer be located can't be
|
|
174
|
+
// hash-compared, but the whole-file diff is the best signal the agent has to re-assess them.
|
|
175
|
+
const changedPaths = new Set([...freshness.modified, ...freshness.missing, ...freshness.broken, ...anchorsLost]);
|
|
175
176
|
filesToDiff = doc.tracked_files.filter((tf) => changedPaths.has(tf.path));
|
|
176
177
|
}
|
|
177
178
|
if (filesToDiff.length === 0) {
|
|
@@ -194,7 +195,11 @@ export async function gitDiffDoc(storageEngine, args) {
|
|
|
194
195
|
const diffs = await mapWithConcurrency(fresh, FILE_CONCURRENCY, (tf) => diffTrackedFile(tf, project, source));
|
|
195
196
|
const fileSections = fresh.map((tf, i) => {
|
|
196
197
|
const base = tf.sourceRevision ? `\nSnapshot commit: ${short(tf.sourceRevision)}` : "";
|
|
197
|
-
|
|
198
|
+
const anchorsNote = anchorsLost.has(tf.path)
|
|
199
|
+
? ` [WARN] Anchors lost: the tracked section(s) can no longer be located, so the whole file is diffed.\n` +
|
|
200
|
+
` → Re-declare the sections in tracked_files via update_doc.\n\n`
|
|
201
|
+
: "";
|
|
202
|
+
return `### ${tf.path}\nSnapshot date: ${tf.lastModifiedAt}${base}\n\n${anchorsNote}${diffs[i]}`;
|
|
198
203
|
});
|
|
199
204
|
docSections.push(`## ${doc.title} [${docPath}]\n\nCode source: ${source.label}\n\n${fileSections.join("\n\n---\n\n")}`);
|
|
200
205
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a0 as ln,a1 as an,a2 as y,a3 as tn,a4 as H,a5 as q,a6 as _,a7 as un,a8 as rn,a9 as L,aa as o,ab as B,ac as sn,ad as on,ae as fn}from"./index-
|
|
1
|
+
import{a0 as ln,a1 as an,a2 as y,a3 as tn,a4 as H,a5 as q,a6 as _,a7 as un,a8 as rn,a9 as L,aa as o,ab as B,ac as sn,ad as on,ae as fn}from"./index-C8LVeAsA.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(fn(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,F=un(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<rn)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(on((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-rn/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|