@lesliechan721/agent-skill-eval 0.1.0-beta.1

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.
Files changed (50) hide show
  1. package/dist/bin.d.ts +2 -0
  2. package/dist/bin.js +80 -0
  3. package/dist/bin.js.map +1 -0
  4. package/dist/bundle.d.ts +93 -0
  5. package/dist/bundle.js +216 -0
  6. package/dist/bundle.js.map +1 -0
  7. package/dist/capabilities.d.ts +2 -0
  8. package/dist/capabilities.js +38 -0
  9. package/dist/capabilities.js.map +1 -0
  10. package/dist/common.d.ts +8 -0
  11. package/dist/common.js +22 -0
  12. package/dist/common.js.map +1 -0
  13. package/dist/corpus-digest.d.ts +3 -0
  14. package/dist/corpus-digest.js +19 -0
  15. package/dist/corpus-digest.js.map +1 -0
  16. package/dist/index.d.ts +16 -0
  17. package/dist/index.js +11 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/json-schema.d.ts +3 -0
  20. package/dist/json-schema.js +70 -0
  21. package/dist/json-schema.js.map +1 -0
  22. package/dist/output-path.d.ts +1 -0
  23. package/dist/output-path.js +34 -0
  24. package/dist/output-path.js.map +1 -0
  25. package/dist/plan.d.ts +79 -0
  26. package/dist/plan.js +285 -0
  27. package/dist/plan.js.map +1 -0
  28. package/dist/process-tree.d.ts +25 -0
  29. package/dist/process-tree.js +385 -0
  30. package/dist/process-tree.js.map +1 -0
  31. package/dist/process.d.ts +14 -0
  32. package/dist/process.js +301 -0
  33. package/dist/process.js.map +1 -0
  34. package/dist/run.d.ts +2 -0
  35. package/dist/run.js +592 -0
  36. package/dist/run.js.map +1 -0
  37. package/dist/runtime-skill.d.ts +18 -0
  38. package/dist/runtime-skill.js +135 -0
  39. package/dist/runtime-skill.js.map +1 -0
  40. package/dist/schemas/aw-skill-eval-execution-plan.schema.json +220 -0
  41. package/dist/schemas/digests.json +5 -0
  42. package/dist/schemas/eval-run-bundle.schema.json +408 -0
  43. package/dist/schemas/eval-runtime-capabilities.schema.json +85 -0
  44. package/dist/schemas.d.ts +5 -0
  45. package/dist/schemas.js +27 -0
  46. package/dist/schemas.js.map +1 -0
  47. package/dist/types.d.ts +86 -0
  48. package/dist/types.js +2 -0
  49. package/dist/types.js.map +1 -0
  50. package/package.json +34 -0
@@ -0,0 +1,135 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { chmod, copyFile, lstat, mkdir, readFile, readdir, realpath, stat, writeFile } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { pathsOverlap } from './common.js';
5
+ const alwaysIgnored = new Set(['.git', 'node_modules', '.DS_Store']);
6
+ const authorOnlyRoots = new Set(['evals', 'reports']);
7
+ const productionDigestDomain = 'aw-production-records-v1';
8
+ function normalizedRegularFileMode(mode, platform) {
9
+ // Windows does not expose a portable executable bit, so its stable runtime mode is 100644.
10
+ return platform !== 'win32' && (mode & 0o111) !== 0 ? '100755' : '100644';
11
+ }
12
+ function comparePosixPaths(left, right) {
13
+ return left < right ? -1 : left > right ? 1 : 0;
14
+ }
15
+ function updateLengthPrefixed(hash, value) {
16
+ const bytes = typeof value === 'string' ? Buffer.from(value, 'utf8') : value;
17
+ const length = Buffer.allocUnsafe(8);
18
+ length.writeBigUInt64BE(BigInt(bytes.length));
19
+ hash.update(length);
20
+ hash.update(bytes);
21
+ }
22
+ function digestProductionRecords(files) {
23
+ const hash = createHash('sha256');
24
+ updateLengthPrefixed(hash, productionDigestDomain);
25
+ for (const file of [...files].sort((left, right) => comparePosixPaths(left.relativePath, right.relativePath))) {
26
+ updateLengthPrefixed(hash, file.relativePath);
27
+ updateLengthPrefixed(hash, file.mode);
28
+ updateLengthPrefixed(hash, createHash('sha256').update(file.bytes).digest());
29
+ }
30
+ return `sha256:${hash.digest('hex')}`;
31
+ }
32
+ async function runtimeSkillFiles(root, platform) {
33
+ const rootStat = await stat(root);
34
+ if (rootStat.isFile()) {
35
+ return [{
36
+ absolutePath: root,
37
+ relativePath: path.basename(root),
38
+ mode: normalizedRegularFileMode(rootStat.mode, platform),
39
+ }];
40
+ }
41
+ if (!rootStat.isDirectory())
42
+ throw new Error(`Skill target is not a file or directory: ${root}`);
43
+ const files = [];
44
+ async function walk(directory, relativeDirectory = '') {
45
+ const entries = await readdir(directory, { withFileTypes: true });
46
+ entries.sort((left, right) => left.name.localeCompare(right.name));
47
+ for (const entry of entries) {
48
+ if (alwaysIgnored.has(entry.name))
49
+ continue;
50
+ if (relativeDirectory === '' && authorOnlyRoots.has(entry.name))
51
+ continue;
52
+ const absolutePath = path.join(directory, entry.name);
53
+ const relativePath = path.join(relativeDirectory, entry.name);
54
+ if (entry.isSymbolicLink())
55
+ throw new Error(`Skill target cannot contain symlinks: ${relativePath}`);
56
+ if (entry.isDirectory())
57
+ await walk(absolutePath, relativePath);
58
+ else if (entry.isFile()) {
59
+ const fileStat = await stat(absolutePath);
60
+ files.push({
61
+ absolutePath,
62
+ relativePath: relativePath.split(path.sep).join('/'),
63
+ mode: normalizedRegularFileMode(fileStat.mode, platform),
64
+ });
65
+ }
66
+ }
67
+ }
68
+ await walk(root);
69
+ return files;
70
+ }
71
+ export async function computeSkillDigest(skillPath, options = {}) {
72
+ if ((await lstat(skillPath)).isSymbolicLink())
73
+ throw new Error('Skill target cannot be a symlink');
74
+ const canonicalRoot = await realpath(skillPath);
75
+ const files = await Promise.all((await runtimeSkillFiles(canonicalRoot, options.platform ?? process.platform)).map(async (file) => ({
76
+ relativePath: file.relativePath,
77
+ mode: file.mode,
78
+ bytes: await readFile(file.absolutePath),
79
+ })));
80
+ return digestProductionRecords(files);
81
+ }
82
+ function digestCapturedRuntimeSkill(files) {
83
+ return digestProductionRecords(files);
84
+ }
85
+ export async function captureRuntimeSkill(skillPath, options = {}) {
86
+ if ((await lstat(skillPath)).isSymbolicLink())
87
+ throw new Error('Skill target cannot be a symlink');
88
+ const sourceRoot = await realpath(skillPath);
89
+ const files = await Promise.all((await runtimeSkillFiles(sourceRoot, options.platform ?? process.platform)).map(async (file) => ({
90
+ relativePath: file.relativePath,
91
+ mode: file.mode,
92
+ bytes: await readFile(file.absolutePath),
93
+ })));
94
+ return { sourceRoot, digest: digestCapturedRuntimeSkill(files), files };
95
+ }
96
+ export async function materializeCapturedRuntimeSkill(captured, destinationPath, options = {}) {
97
+ const resolvedDestination = path.resolve(destinationPath);
98
+ if (pathsOverlap(captured.sourceRoot, resolvedDestination))
99
+ throw new Error('Runtime Skill snapshot destination must not overlap the source Skill');
100
+ await mkdir(destinationPath, { recursive: true });
101
+ const platform = options.platform ?? process.platform;
102
+ for (const file of captured.files) {
103
+ const destination = path.join(destinationPath, ...file.relativePath.split('/'));
104
+ await mkdir(path.dirname(destination), { recursive: true });
105
+ await writeFile(destination, file.bytes, { flag: 'wx', mode: file.mode === '100755' ? 0o755 : 0o644 });
106
+ if (platform !== 'win32')
107
+ await chmod(destination, file.mode === '100755' ? 0o755 : 0o644);
108
+ }
109
+ const digest = await computeSkillDigest(destinationPath, options);
110
+ if (digest !== captured.digest)
111
+ throw new Error('Runtime Skill snapshot digest does not match captured Skill bytes');
112
+ return { root: await realpath(destinationPath), digest };
113
+ }
114
+ export async function createRuntimeSkillSnapshot(sourcePath, destinationPath, options = {}) {
115
+ if ((await lstat(sourcePath)).isSymbolicLink())
116
+ throw new Error('Skill target cannot be a symlink');
117
+ const canonicalSource = await realpath(sourcePath);
118
+ const resolvedDestination = path.resolve(destinationPath);
119
+ if (pathsOverlap(canonicalSource, resolvedDestination))
120
+ throw new Error('Runtime Skill snapshot destination must not overlap the source Skill');
121
+ await mkdir(destinationPath, { recursive: true });
122
+ const platform = options.platform ?? process.platform;
123
+ for (const file of await runtimeSkillFiles(canonicalSource, platform)) {
124
+ const destination = path.join(destinationPath, ...file.relativePath.split('/'));
125
+ await mkdir(path.dirname(destination), { recursive: true });
126
+ await copyFile(file.absolutePath, destination);
127
+ if (platform !== 'win32')
128
+ await chmod(destination, file.mode === '100755' ? 0o755 : 0o644);
129
+ }
130
+ return {
131
+ root: await realpath(destinationPath),
132
+ digest: await computeSkillDigest(destinationPath, options),
133
+ };
134
+ }
135
+ //# sourceMappingURL=runtime-skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-skill.js","sourceRoot":"","sources":["../src/runtime-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC9G,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1C,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAA;AACpE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AACrD,MAAM,sBAAsB,GAAG,0BAA0B,CAAA;AAwBzD,SAAS,yBAAyB,CAAC,IAAY,EAAE,QAAyB;IACxE,2FAA2F;IAC3F,OAAO,QAAQ,KAAK,OAAO,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;AAC3E,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY,EAAE,KAAa;IACpD,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAmC,EAAE,KAAsB;IACvF,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,M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F,MAAM,KAAK,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAA;IACrD,KAAK,MAAM,IAAI,IAAI,MAAM,iBAAiB,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,CAAC;QACtE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;QAC/E,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QAC3D,MAAM,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAA;QAC9C,IAAI,QAAQ,KAAK,OAAO;YAAE,MAAM,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IAC5F,CAAC;IACD,OAAO;QACL,IAAI,EAAE,MAAM,QAAQ,CAAC,eAAe,CAAC;QACrC,MAAM,EAAE,MAAM,kBAAkB,CAAC,eAAe,EAAE,OAAO,CAAC;KAC3D,CAAA;AACH,CAAC"}
@@ -0,0 +1,220 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-skill-toolkit.invalid/schemas/aw-skill-eval-execution-plan.schema.json",
4
+ "title": "AwSkillEvalExecutionPlan",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "planId",
9
+ "target",
10
+ "cases",
11
+ "provider",
12
+ "configurations",
13
+ "runsPerCase",
14
+ "timeoutMs",
15
+ "outputRoot",
16
+ "capture"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": {
20
+ "const": 3
21
+ },
22
+ "planId": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
26
+ },
27
+ "minimumEvidenceLevel": {
28
+ "enum": [
29
+ "executed",
30
+ "comparative"
31
+ ]
32
+ },
33
+ "target": {
34
+ "type": "object",
35
+ "required": [
36
+ "name",
37
+ "path",
38
+ "digest"
39
+ ],
40
+ "properties": {
41
+ "name": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "path": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ },
49
+ "digest": {
50
+ "type": "string",
51
+ "pattern": "^sha256:[0-9a-f]{64}$"
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ },
56
+ "cases": {
57
+ "type": "object",
58
+ "required": [
59
+ "paths",
60
+ "corpusDigest"
61
+ ],
62
+ "properties": {
63
+ "paths": {
64
+ "type": "array",
65
+ "minItems": 1,
66
+ "items": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ },
70
+ "uniqueItems": true
71
+ },
72
+ "corpusDigest": {
73
+ "type": "string",
74
+ "pattern": "^sha256:[0-9a-f]{64}$"
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ },
79
+ "provider": {
80
+ "type": "object",
81
+ "required": [
82
+ "id",
83
+ "command",
84
+ "capabilitiesPath",
85
+ "capabilitiesDigest",
86
+ "inheritEnvironment"
87
+ ],
88
+ "properties": {
89
+ "id": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "command": {
94
+ "type": "array",
95
+ "minItems": 1,
96
+ "items": {
97
+ "type": "string",
98
+ "minLength": 1
99
+ }
100
+ },
101
+ "cwd": {
102
+ "type": [
103
+ "string",
104
+ "null"
105
+ ]
106
+ },
107
+ "env": {
108
+ "type": "object",
109
+ "additionalProperties": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "capabilitiesPath": {
114
+ "type": "string",
115
+ "minLength": 1
116
+ },
117
+ "capabilitiesDigest": {
118
+ "type": "string",
119
+ "pattern": "^sha256:[0-9a-f]{64}$"
120
+ },
121
+ "inheritEnvironment": {
122
+ "type": "boolean"
123
+ }
124
+ },
125
+ "additionalProperties": false
126
+ },
127
+ "configurations": {
128
+ "type": "array",
129
+ "minItems": 1,
130
+ "items": {
131
+ "type": "object",
132
+ "required": [
133
+ "id",
134
+ "skillMode",
135
+ "comparisonId"
136
+ ],
137
+ "properties": {
138
+ "id": {
139
+ "type": "string",
140
+ "minLength": 1,
141
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
142
+ },
143
+ "skillMode": {
144
+ "enum": [
145
+ "with-skill",
146
+ "without-skill",
147
+ "previous-version"
148
+ ]
149
+ },
150
+ "comparisonId": {
151
+ "type": [
152
+ "string",
153
+ "null"
154
+ ],
155
+ "minLength": 1,
156
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
157
+ },
158
+ "skillPath": {
159
+ "type": [
160
+ "string",
161
+ "null"
162
+ ]
163
+ },
164
+ "skillDigest": {
165
+ "type": [
166
+ "string",
167
+ "null"
168
+ ],
169
+ "pattern": "^sha256:[0-9a-f]{64}$"
170
+ },
171
+ "env": {
172
+ "type": "object",
173
+ "additionalProperties": {
174
+ "type": "string"
175
+ }
176
+ }
177
+ },
178
+ "additionalProperties": false
179
+ }
180
+ },
181
+ "runsPerCase": {
182
+ "type": "integer",
183
+ "minimum": 1
184
+ },
185
+ "timeoutMs": {
186
+ "type": "integer",
187
+ "minimum": 1000
188
+ },
189
+ "outputRoot": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
193
+ },
194
+ "capture": {
195
+ "type": "object",
196
+ "required": [
197
+ "outputs",
198
+ "trace",
199
+ "timing",
200
+ "usage"
201
+ ],
202
+ "properties": {
203
+ "outputs": {
204
+ "type": "boolean"
205
+ },
206
+ "trace": {
207
+ "type": "boolean"
208
+ },
209
+ "timing": {
210
+ "type": "boolean"
211
+ },
212
+ "usage": {
213
+ "type": "boolean"
214
+ }
215
+ },
216
+ "additionalProperties": false
217
+ }
218
+ },
219
+ "additionalProperties": false
220
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "aw-skill-eval-execution-plan": "sha256:39ffdc4d731c5d98927f130e3c728e31b34dbc538eb8676a17ca3be8d54bd1ef",
3
+ "eval-run-bundle": "sha256:eb245510b130141ec129f13c5e18b44679e2a3d77e071c30d0b614ef052b35ed",
4
+ "eval-runtime-capabilities": "sha256:a63f1a1f4be0339253566050496b40cc9d42f4d1664f20205cb2614343455bd5"
5
+ }