@r_masseater/msch 0.121.1 → 0.122.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/dist/cli.mjs +14 -3
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/msch-checks/SKILL.md +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import { Buffer } from "node:buffer";
|
|
|
47
47
|
import { createZstdDecompress } from "node:zlib";
|
|
48
48
|
// package.json
|
|
49
49
|
var name = "@r_masseater/msch";
|
|
50
|
-
var version = "0.
|
|
50
|
+
var version = "0.122.0";
|
|
51
51
|
var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
|
|
52
52
|
var repository = {
|
|
53
53
|
"type": "git",
|
|
@@ -20943,7 +20943,18 @@ const agentJudge = (query) => ({
|
|
|
20943
20943
|
});
|
|
20944
20944
|
// src/features/judge-documents/model/decision-judge.ts
|
|
20945
20945
|
const ANSWERED_YES = "The decision model answered yes.";
|
|
20946
|
-
const
|
|
20946
|
+
const OVERRIDE_PREFIX = "MSCH_JUDGE_";
|
|
20947
|
+
const OVERRIDABLE = [
|
|
20948
|
+
"CLOUDFLARE_API_TOKEN",
|
|
20949
|
+
"CLOUDFLARE_ACCOUNT_ID",
|
|
20950
|
+
"CLOUDFLARE_API_BASE_URL",
|
|
20951
|
+
"CLOUDFLARE_AI_GATEWAY_ID"
|
|
20952
|
+
];
|
|
20953
|
+
const overrideOf = (name) => Config$1.option(Config$1.NonEmptyString(`${OVERRIDE_PREFIX}${name}`)).pipe(Effect.map(Option.map(() => [name, `${OVERRIDE_PREFIX}${name}`])), Effect.orElseSucceed(Option.none));
|
|
20954
|
+
/** @internal */
|
|
20955
|
+
const decisionEnv = Effect.all(pipe(OVERRIDABLE, Array$1.map(overrideOf)), { concurrency: "unbounded" }).pipe(Effect.map((found) => Record.fromEntries(Array$1.getSomes(found))));
|
|
20956
|
+
const judgeDecision = ({ rule, target: { text } }) => Effect.gen(function* judgeDecisionWith() {
|
|
20957
|
+
const env = yield* decisionEnv;
|
|
20947
20958
|
const judged = judgeText({
|
|
20948
20959
|
rule: {
|
|
20949
20960
|
id: rule.id,
|
|
@@ -20953,7 +20964,7 @@ const judgeDecision = ({ rule, target: { text } }) => Effect.sync(() => {
|
|
|
20953
20964
|
text,
|
|
20954
20965
|
model: DECISION_MODEL,
|
|
20955
20966
|
timeoutMs: DECISION_TIMEOUT_MS,
|
|
20956
|
-
env
|
|
20967
|
+
env
|
|
20957
20968
|
});
|
|
20958
20969
|
if (judged.status === "violation") return {
|
|
20959
20970
|
status: "violation",
|