anpord 0.1.11 → 0.1.13
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/README.md +56 -78
- package/dist/bin.cjs +211 -204
- package/dist/bin.mjs +211 -204
- package/dist/cli-runtime.cjs +2 -2
- package/dist/cli-runtime.d.cts +1 -1
- package/dist/cli-runtime.d.mts +1 -1
- package/dist/cli-runtime.mjs +2 -2
- package/dist/client-BfdjFtlV.mjs +305 -0
- package/dist/{client-C9m0uLCz.d.cts → client-BgRs8JvW.d.mts} +2150 -174
- package/dist/{client-TFCLuMv8.d.mts → client-BirFO3jz.d.cts} +2150 -174
- package/dist/client-C-P2I00z.cjs +346 -0
- package/dist/{compiler-DXlpU_In.mjs → compiler-D96wI7UP.mjs} +108 -75
- package/dist/{compiler-Ap8DM-JU.cjs → compiler-uwb1pkdK.cjs} +116 -83
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/{errors-C9bQUcA3.mjs → errors-B0YknR5V.mjs} +3 -19
- package/dist/{errors-Boum34f5.cjs → errors-BX1wry8K.cjs} +3 -19
- package/dist/{errors-BK3f7Rdr.d.cts → errors-aGrd21jy.d.cts} +0 -3
- package/dist/{errors-BK3f7Rdr.d.mts → errors-aGrd21jy.d.mts} +0 -3
- package/dist/eval-judges-BkmiVLLq.cjs +59 -0
- package/dist/eval-judges-CwTvTq7N.mjs +42 -0
- package/dist/eval-judges-DPPUftbh.d.cts +48 -0
- package/dist/eval-judges-DPPUftbh.d.mts +48 -0
- package/dist/eval-validations-BRdoZrTQ.mjs +113 -0
- package/dist/eval-validations-_MlnQ_uv.cjs +148 -0
- package/dist/eval.cjs +1 -1
- package/dist/eval.d.cts +60 -6
- package/dist/eval.d.mts +60 -6
- package/dist/eval.mjs +1 -1
- package/dist/evals-B6aT3xgH.d.cts +1364 -0
- package/dist/evals-B6aT3xgH.d.mts +1364 -0
- package/dist/evals-Dcc_x6jW.mjs +582 -0
- package/dist/evals-DouMsrsM.cjs +737 -0
- package/dist/index.cjs +23 -99
- package/dist/index.d.cts +138 -34
- package/dist/index.d.mts +138 -34
- package/dist/index.mjs +23 -99
- package/dist/source.d.cts +1 -1
- package/dist/source.d.mts +1 -1
- package/dist/{types-oaMF6-E1.d.mts → types-Codjaq-o.d.mts} +146 -45
- package/dist/{types-H9L450Iu.d.cts → types-ISsteq95.d.cts} +146 -45
- package/dist/validator-runtime.cjs +238 -0
- package/dist/validator-runtime.d.cts +9 -0
- package/dist/validator-runtime.d.mts +9 -0
- package/dist/validator-runtime.mjs +237 -0
- package/dist/validators.cjs +10 -0
- package/dist/validators.d.cts +8 -0
- package/dist/validators.d.mts +8 -0
- package/dist/validators.mjs +9 -0
- package/package.json +11 -1
- package/dist/client-5K3dMI5Q.mjs +0 -849
- package/dist/client-Ci0woWLW.cjs +0 -890
- package/dist/evals-BEgEmfiO.d.cts +0 -603
- package/dist/evals-BEgEmfiO.d.mts +0 -603
- package/dist/harness-profile-BMjsN460.mjs +0 -43
- package/dist/harness-profile-CDQpPLPd.cjs +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
let effect = require("effect");
|
|
2
|
-
//#region ../schema/src/domain/harness-profile.ts
|
|
3
|
-
const PROFILE_LIMITS = {
|
|
4
|
-
fileChars: 96e3,
|
|
5
|
-
files: 256,
|
|
6
|
-
totalChars: 2e6
|
|
7
|
-
};
|
|
8
|
-
const ProfileName = effect.Schema.String.pipe(effect.Schema.pattern(/^[a-z0-9][a-z0-9-]{0,63}$/), effect.Schema.annotations({
|
|
9
|
-
description: "Lowercase letters, digits and hyphens, at most 64 characters, starting with a letter or digit.",
|
|
10
|
-
identifier: "ProfileName"
|
|
11
|
-
}));
|
|
12
|
-
const ProfilePath = effect.Schema.String.pipe(effect.Schema.pattern(/^(home|workspace)(?:\/(?!\.\.?(?:\/|$))[^/\0]+)+$/), effect.Schema.maxLength(512), effect.Schema.annotations({
|
|
13
|
-
description: "A relative path under home/ or workspace/, without a .. segment.",
|
|
14
|
-
identifier: "ProfilePath"
|
|
15
|
-
}));
|
|
16
|
-
const EnvName = effect.Schema.String.pipe(effect.Schema.pattern(/^[A-Z_][A-Z0-9_]*$/), effect.Schema.annotations({
|
|
17
|
-
description: "An environment variable name.",
|
|
18
|
-
identifier: "EnvName"
|
|
19
|
-
}));
|
|
20
|
-
const ProfileFiles = effect.Schema.Record({
|
|
21
|
-
key: ProfilePath,
|
|
22
|
-
value: effect.Schema.String.pipe(effect.Schema.maxLength(PROFILE_LIMITS.fileChars))
|
|
23
|
-
}).pipe(effect.Schema.filter((files) => Object.keys(files).length <= PROFILE_LIMITS.files, { message: () => `A profile holds at most ${PROFILE_LIMITS.files} files.` }), effect.Schema.filter((files) => Object.values(files).reduce((sum, content) => sum + content.length, 0) <= PROFILE_LIMITS.totalChars, { message: () => `A profile's files hold at most ${PROFILE_LIMITS.totalChars} characters in total.` }));
|
|
24
|
-
const HarnessProfile = effect.Schema.Struct({
|
|
25
|
-
env: effect.Schema.optional(effect.Schema.Record({
|
|
26
|
-
key: EnvName,
|
|
27
|
-
value: effect.Schema.String
|
|
28
|
-
})),
|
|
29
|
-
files: ProfileFiles,
|
|
30
|
-
install: effect.Schema.optional(effect.Schema.String),
|
|
31
|
-
name: ProfileName,
|
|
32
|
-
run: effect.Schema.optional(effect.Schema.String),
|
|
33
|
-
systemPrompt: effect.Schema.optional(effect.Schema.String)
|
|
34
|
-
}).annotations({
|
|
35
|
-
description: "Configuration layered on a harness: files written under the sandbox home and workspace, a system prompt, environment, an install command run before the harness, and for the command harness the run command.",
|
|
36
|
-
identifier: "HarnessProfile"
|
|
37
|
-
});
|
|
38
|
-
/** The one rule the wire schema cannot express in JSON Schema, so every tool
|
|
39
|
-
* description repeats it. */
|
|
40
|
-
const profileFitsHarness = (task) => task.harness === "command" ? task.profile?.run !== void 0 : task.profile?.run === void 0;
|
|
41
|
-
const PROFILE_HARNESS_RULE = "The command harness needs a profile with a run command; other harnesses take no run. Any harness may take an install command.";
|
|
42
|
-
//#endregion
|
|
43
|
-
Object.defineProperty(exports, "EnvName", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function() {
|
|
46
|
-
return EnvName;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
Object.defineProperty(exports, "HarnessProfile", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function() {
|
|
52
|
-
return HarnessProfile;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(exports, "PROFILE_HARNESS_RULE", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function() {
|
|
58
|
-
return PROFILE_HARNESS_RULE;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "PROFILE_LIMITS", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function() {
|
|
64
|
-
return PROFILE_LIMITS;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "ProfilePath", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function() {
|
|
70
|
-
return ProfilePath;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(exports, "profileFitsHarness", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function() {
|
|
76
|
-
return profileFitsHarness;
|
|
77
|
-
}
|
|
78
|
-
});
|