@pipemd-core/pipemd 1.0.0 → 1.1.0
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/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +73 -0
- package/README.md +192 -408
- package/dist/index.js +727 -32
- package/dist/plugins/opencode-server.js +23 -1
- package/package.json +9 -4
|
@@ -8,9 +8,31 @@
|
|
|
8
8
|
// event(session.idle / session.status) → heartbeat + worker cleanup
|
|
9
9
|
// experimental.chat.system.transform → sub-agent detection + LLM context injection
|
|
10
10
|
import { execFile, execFileSync } from "node:child_process";
|
|
11
|
-
import { existsSync, writeFileSync, readFileSync, mkdirSync, renameSync, appendFileSync } from "node:fs";
|
|
11
|
+
import { existsSync, writeFileSync, readFileSync, mkdirSync, renameSync, appendFileSync, statSync, unlinkSync } from "node:fs";
|
|
12
12
|
import { resolve as resolvePath, join as joinPath } from "node:path";
|
|
13
13
|
|
|
14
|
+
const FIFO_TEMP = joinPath("/tmp", "pmd-fifo-read-" + process.pid + ".md");
|
|
15
|
+
|
|
16
|
+
function isFifoFile(filePath) {
|
|
17
|
+
if (!filePath) return false;
|
|
18
|
+
try { return statSync(resolvePath(filePath)).isFIFO(); } catch { return false; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function resolveFifoRead(args) {
|
|
22
|
+
const filePath = extractFilePath(args);
|
|
23
|
+
if (!isFifoFile(filePath)) return;
|
|
24
|
+
try {
|
|
25
|
+
execFileSync(getPmdBin(), ["run", "-o", FIFO_TEMP], { encoding: "utf-8", timeout: 10000, stdio: "ignore" });
|
|
26
|
+
if ("filePath" in args) args.filePath = FIFO_TEMP;
|
|
27
|
+
if ("path" in args) args.path = FIFO_TEMP;
|
|
28
|
+
if ("file_path" in args) args.file_path = FIFO_TEMP;
|
|
29
|
+
} catch (e) { logPluginError("resolveFifoRead", e); }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function cleanupFifoTemp() {
|
|
33
|
+
try { unlinkSync(FIFO_TEMP); } catch {}
|
|
34
|
+
}
|
|
35
|
+
|
|
14
36
|
function resolvePmd() {
|
|
15
37
|
const local = resolvePath(process.cwd(), "node_modules/.bin/pmd");
|
|
16
38
|
if (existsSync(local)) return local;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipemd-core/pipemd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The Dynamic Context Harness for AI Coding Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"test:compose": "bash tests/e2e-compose.sh",
|
|
19
19
|
"test:crew": "bash tests/e2e-crew.sh",
|
|
20
20
|
"test:inject": "bash tests/e2e-inject.sh",
|
|
21
|
-
"test:unit": "node tests/test-reverse-inject.mjs",
|
|
22
|
-
"test": "
|
|
21
|
+
"test:unit": "node tests/test-reverse-inject.mjs && node tests/test-link.mjs",
|
|
22
|
+
"test:link": "bash tests/e2e-link.sh",
|
|
23
|
+
"test": "pnpm test:unit && pnpm test:e2e && pnpm test:bidir && pnpm test:scripts && pnpm test:arch && pnpm test:compose && pnpm test:crew && pnpm test:inject && pnpm test:link"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|
|
25
26
|
"node": ">=18.0.0"
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
"AI_SETUP_PIPEMD.md",
|
|
31
32
|
"README.md",
|
|
32
33
|
"LICENSE",
|
|
33
|
-
"CHANGELOG.md"
|
|
34
|
+
"CHANGELOG.md",
|
|
35
|
+
"CONTRIBUTING.md"
|
|
34
36
|
],
|
|
35
37
|
"author": "PipeMD Contributors",
|
|
36
38
|
"license": "ISC",
|
|
@@ -64,5 +66,8 @@
|
|
|
64
66
|
"@types/prompts": "^2.4.9",
|
|
65
67
|
"tsup": "^8.5.1",
|
|
66
68
|
"typescript": "^6.0.3"
|
|
69
|
+
},
|
|
70
|
+
"pnpm": {
|
|
71
|
+
"onlyBuiltDependencies": ["esbuild"]
|
|
67
72
|
}
|
|
68
73
|
}
|