fix(FN-3433): restore workspace llama-cpp docs index integrity
- Restore workspace llama-cpp extension path resolution in CLI command handling - Add missing docs/README.md index entries and keep README/doc links aligned - Add regression coverage for docs README index completeness and docker docs references - Carry forward related workspace stability updates and test hardening from the branch Fusion-Task-Id: FN-3433
This commit is contained in:
@@ -55,8 +55,8 @@
|
||||
"test:pre-release": "pnpm test:slow-cli && pnpm test:build-exe"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-ai": "^0.72.1",
|
||||
"@mariozechner/pi-coding-agent": "^0.72.1",
|
||||
"@mariozechner/pi-ai": "^0.73.0",
|
||||
"@mariozechner/pi-coding-agent": "^0.73.0",
|
||||
"dockerode": "^4.0.12",
|
||||
"express": "^5.1.0",
|
||||
"ink": "^6.8.0",
|
||||
|
||||
26
packages/cli/src/__tests__/docs-readme-index.test.ts
Normal file
26
packages/cli/src/__tests__/docs-readme-index.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
const workspaceRoot = resolve(import.meta.dirname, "../../../..");
|
||||
const docsReadmePath = resolve(workspaceRoot, "docs", "README.md");
|
||||
|
||||
const requiredDocs = [
|
||||
"docs/beads-dolt-sync-evaluation.md",
|
||||
"docs/dev-server-modules.md",
|
||||
"docs/research/pi-autoresearch-analysis.md",
|
||||
"docs/research/research-hardening-preflight.md",
|
||||
] as const;
|
||||
|
||||
describe("docs README index", () => {
|
||||
it("includes links for required docs and those files exist", () => {
|
||||
expect(existsSync(docsReadmePath)).toBe(true);
|
||||
const docsReadme = readFileSync(docsReadmePath, "utf8");
|
||||
|
||||
for (const relativePath of requiredDocs) {
|
||||
const readmeLinkPath = `./${relativePath.replace(/^docs\//, "")}`;
|
||||
expect(docsReadme).toContain(`(${readmeLinkPath})`);
|
||||
expect(existsSync(resolve(workspaceRoot, relativePath))).toBe(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -17,7 +17,7 @@ export function resolveLlamaCppExtensionFromModuleUrl(
|
||||
let pkgJsonPath: string | undefined;
|
||||
|
||||
const here = dirname(fileURLToPath(moduleUrl));
|
||||
for (const rel of ["pi-llama-cpp", "../pi-llama-cpp", "../../pi-llama-cpp"]) {
|
||||
for (const rel of ["pi-llama-cpp", "../pi-llama-cpp", "../../pi-llama-cpp", "../../../pi-llama-cpp"]) {
|
||||
const candidate = resolve(here, rel, "package.json");
|
||||
if (existsSync(candidate)) {
|
||||
pkgJsonPath = candidate;
|
||||
|
||||
Reference in New Issue
Block a user