@grainulation/mill 1.0.2 → 1.0.4
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/CONTRIBUTING.md +1 -1
- package/README.md +1 -1
- package/bin/mill.js +1 -1
- package/lib/serve-mcp.js +36 -3
- package/lib/server.js +1 -1
- package/package.json +1 -1
- package/public/index.html +1 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -68,7 +68,7 @@ The key architectural principle: **mill is a pipeline.** Data flows in as struct
|
|
|
68
68
|
|
|
69
69
|
- Zero dependencies. If you need something, write it or use Node built-ins.
|
|
70
70
|
- No transpilation. Ship what you write.
|
|
71
|
-
- ESM imports (`import`/`export`). Node
|
|
71
|
+
- ESM imports (`import`/`export`). Node 20+ required.
|
|
72
72
|
- Keep functions small. If a function needs a scroll, split it.
|
|
73
73
|
- No emojis in code, CLI output, or generated formats.
|
|
74
74
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://www.npmjs.com/package/@grainulation/mill"><img src="https://img.shields.io/npm/v/@grainulation/mill" alt="npm version"></a> <a href="https://www.npmjs.com/package/@grainulation/mill"><img src="https://img.shields.io/npm/dm/@grainulation/mill" alt="npm downloads"></a> <a href="https://github.com/grainulation/mill/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a> <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@grainulation/mill" alt="node"></a> <a href="https://github.com/grainulation/mill/actions"><img src="https://github.com/grainulation/mill/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@grainulation/mill"><img src="https://img.shields.io/npm/v/@grainulation/mill?label=%40grainulation%2Fmill" alt="npm version"></a> <a href="https://www.npmjs.com/package/@grainulation/mill"><img src="https://img.shields.io/npm/dm/@grainulation/mill" alt="npm downloads"></a> <a href="https://github.com/grainulation/mill/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a> <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@grainulation/mill" alt="node"></a> <a href="https://github.com/grainulation/mill/actions"><img src="https://github.com/grainulation/mill/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
7
|
<a href="https://deepwiki.com/grainulation/mill"><img src="https://deepwiki.com/badge.svg" alt="Explore on DeepWiki"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
package/bin/mill.js
CHANGED
|
@@ -411,7 +411,7 @@ async function runCiArtifacts(args) {
|
|
|
411
411
|
for (const file of formatFiles) {
|
|
412
412
|
try {
|
|
413
413
|
const mod = await import(path.join(FORMATS_DIR, file));
|
|
414
|
-
formatMap[mod.name || file.replace(".
|
|
414
|
+
formatMap[mod.name || file.replace(".mjs", "")] = mod;
|
|
415
415
|
} catch {}
|
|
416
416
|
}
|
|
417
417
|
|
package/lib/serve-mcp.js
CHANGED
|
@@ -47,13 +47,13 @@ async function discoverFormats() {
|
|
|
47
47
|
|
|
48
48
|
const formats = [];
|
|
49
49
|
try {
|
|
50
|
-
const files = fs.readdirSync(FORMATS_DIR).filter((f) => f.endsWith(".
|
|
50
|
+
const files = fs.readdirSync(FORMATS_DIR).filter((f) => f.endsWith(".mjs"));
|
|
51
51
|
for (const file of files) {
|
|
52
52
|
try {
|
|
53
53
|
const mod = await import(path.join(FORMATS_DIR, file));
|
|
54
54
|
formats.push({
|
|
55
|
-
id: file.replace(".
|
|
56
|
-
name: mod.name || file.replace(".
|
|
55
|
+
id: file.replace(".mjs", ""),
|
|
56
|
+
name: mod.name || file.replace(".mjs", ""),
|
|
57
57
|
extension: mod.extension || "",
|
|
58
58
|
mimeType: mod.mimeType || "text/plain",
|
|
59
59
|
description: mod.description || "",
|
|
@@ -130,6 +130,39 @@ async function toolConvert(dir, args) {
|
|
|
130
130
|
data.meta = data.sprint_meta;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// Merge claim content from claims.json when compilation.json lacks it.
|
|
134
|
+
// Older compilation.json files omitted the content field from resolved_claims.
|
|
135
|
+
const claimsNeedContent =
|
|
136
|
+
data.claims &&
|
|
137
|
+
data.claims.length > 0 &&
|
|
138
|
+
data.claims.some((c) => !c.content && !c.text);
|
|
139
|
+
if (claimsNeedContent) {
|
|
140
|
+
const claimsFile = path.join(dir, "claims.json");
|
|
141
|
+
if (fs.existsSync(claimsFile)) {
|
|
142
|
+
try {
|
|
143
|
+
const raw = JSON.parse(fs.readFileSync(claimsFile, "utf8"));
|
|
144
|
+
const fullClaims = raw.claims || [];
|
|
145
|
+
const contentMap = {};
|
|
146
|
+
for (const fc of fullClaims) {
|
|
147
|
+
if (fc.id && fc.content) contentMap[fc.id] = fc;
|
|
148
|
+
}
|
|
149
|
+
for (const claim of data.claims) {
|
|
150
|
+
if (!claim.content && !claim.text && contentMap[claim.id]) {
|
|
151
|
+
claim.content = contentMap[claim.id].content;
|
|
152
|
+
if (
|
|
153
|
+
contentMap[claim.id].confidence != null &&
|
|
154
|
+
claim.confidence == null
|
|
155
|
+
) {
|
|
156
|
+
claim.confidence = contentMap[claim.id].confidence;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} catch {
|
|
161
|
+
// Best-effort merge — if claims.json is unreadable, continue without content
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
133
166
|
// Run conversion
|
|
134
167
|
let result;
|
|
135
168
|
try {
|
package/lib/server.js
CHANGED
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -203,7 +203,7 @@ body {
|
|
|
203
203
|
</div>
|
|
204
204
|
</main>
|
|
205
205
|
<footer class="footer">
|
|
206
|
-
<span>mill v1.0.
|
|
206
|
+
<span>mill v1.0.2 -- @grainulation/mill</span>
|
|
207
207
|
<div class="footer-links">
|
|
208
208
|
<a href="http://localhost:9091">wheat</a>
|
|
209
209
|
<a href="http://localhost:9093">barn</a>
|