mirror of
https://github.com/SikongJueluo/pi-extensions.git
synced 2026-10-05 11:52:55 +08:00
refactor(ai-judge): group src modules into domain directories
- move evidence.ts and conversation.ts into evidence/ as bash.ts and conversation.ts - move prompt.ts and model.ts into judge/ - move highrisk.ts and judge.ts into authority/, renaming judge.ts to enforce.ts to avoid clashing with the judge/ directory - move review.ts and audit.ts into telemetry/ - move config.ts and catalog.ts into config/ as judge.ts and catalog.ts - rewrite static and dynamic imports across src, tools, and tests to the new paths - fix the models-catalog.json relative URL broken by the move (caught by fallow unresolved-import) - update the PIEXTENSIO-12 module map in the ADR to the new paths - add editorconfig for 4-space ts indentation
This commit is contained in:
@@ -29,9 +29,9 @@ import {
|
||||
MIN_TIMEOUT_MS,
|
||||
MAX_TIMEOUT_MS,
|
||||
type ModelAvailability,
|
||||
} from "../src/model";
|
||||
import type { BashJudgmentEvidence } from "../src/evidence";
|
||||
import type { ConversationEvidence } from "../src/conversation";
|
||||
} from "../src/judge/model";
|
||||
import type { BashJudgmentEvidence } from "../src/evidence/bash";
|
||||
import type { ConversationEvidence } from "../src/evidence/conversation";
|
||||
|
||||
interface CorpusCase {
|
||||
readonly id: string;
|
||||
@@ -491,7 +491,7 @@ async function resolveReplayModel(
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
const { createModelAvailability } = await import("../src/model");
|
||||
const { createModelAvailability } = await import("../src/judge/model");
|
||||
const availability: ModelAvailability = createModelAvailability(found, registry);
|
||||
if (availability.kind !== "ready") {
|
||||
process.stderr.write(
|
||||
@@ -599,7 +599,7 @@ async function main(): Promise<number> {
|
||||
asOf: new Date().toISOString(),
|
||||
provider: parsed.provider,
|
||||
model: parsed.model,
|
||||
promptVersion: (await import("../src/prompt")).PROMPT_VERSION,
|
||||
promptVersion: (await import("../src/judge/prompt")).PROMPT_VERSION,
|
||||
corpusVersion: CORPUS_VERSION,
|
||||
timeoutMs: parsed.timeoutMs,
|
||||
strict: parsed.strict,
|
||||
|
||||
Reference in New Issue
Block a user