@skill-harness/core 0.17.0 → 0.19.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.
Files changed (95) hide show
  1. package/README.md +1 -2
  2. package/dist/adapters/types.d.ts +2 -12
  3. package/dist/capture-trace-types.d.ts +8 -102
  4. package/dist/capture-trace-types.js +0 -4
  5. package/dist/command-cost.d.ts +1 -1
  6. package/dist/command-cost.js +0 -5
  7. package/dist/execution-trace.d.ts +0 -16
  8. package/dist/execution-trace.js +31 -42
  9. package/dist/index.d.ts +3 -23
  10. package/dist/index.js +3 -23
  11. package/dist/instruction-coverage.d.ts +0 -7
  12. package/dist/instruction-coverage.js +5 -7
  13. package/dist/journal.d.ts +0 -8
  14. package/dist/metrics.d.ts +19 -0
  15. package/dist/metrics.js +28 -0
  16. package/dist/redaction.d.ts +6 -0
  17. package/dist/redaction.js +55 -0
  18. package/dist/regate.js +6 -71
  19. package/dist/regrade.d.ts +1 -3
  20. package/dist/regrade.js +1 -21
  21. package/dist/report.d.ts +1 -15
  22. package/dist/report.js +1 -13
  23. package/dist/reps.d.ts +1 -2
  24. package/dist/reps.js +33 -10
  25. package/dist/results.d.ts +10 -9
  26. package/dist/results.js +3 -19
  27. package/dist/run.js +15 -74
  28. package/dist/seeded.d.ts +1 -7
  29. package/dist/seeded.js +5 -11
  30. package/dist/sources.js +4 -9
  31. package/dist/spec.d.ts +0 -13
  32. package/dist/spec.js +6 -48
  33. package/dist/trajectory-events.d.ts +58 -0
  34. package/dist/trajectory-events.js +119 -0
  35. package/package.json +1 -1
  36. package/schemas/results-v2.schema.json +394 -75
  37. package/schemas/results-v3.schema.json +18 -0
  38. package/schemas/specification-v1.schema.json +128 -174
  39. package/dist/adjudication.d.ts +0 -219
  40. package/dist/adjudication.js +0 -422
  41. package/dist/adoption.d.ts +0 -128
  42. package/dist/adoption.js +0 -102
  43. package/dist/affected.d.ts +0 -88
  44. package/dist/affected.js +0 -222
  45. package/dist/capture.d.ts +0 -193
  46. package/dist/capture.js +0 -344
  47. package/dist/comparison.d.ts +0 -97
  48. package/dist/comparison.js +0 -189
  49. package/dist/factory-calibration.d.ts +0 -63
  50. package/dist/factory-calibration.js +0 -115
  51. package/dist/intervention-results.d.ts +0 -6
  52. package/dist/intervention-results.js +0 -52
  53. package/dist/intervention.d.ts +0 -123
  54. package/dist/intervention.js +0 -218
  55. package/dist/investigation.d.ts +0 -94
  56. package/dist/investigation.js +0 -148
  57. package/dist/judge-agreement.d.ts +0 -19
  58. package/dist/judge-agreement.js +0 -31
  59. package/dist/qualification-capture.d.ts +0 -44
  60. package/dist/qualification-capture.js +0 -163
  61. package/dist/qualification-config.d.ts +0 -233
  62. package/dist/qualification-config.js +0 -694
  63. package/dist/qualification-lock.d.ts +0 -15
  64. package/dist/qualification-lock.js +0 -87
  65. package/dist/qualification-oauth-directory.d.ts +0 -79
  66. package/dist/qualification-oauth-directory.js +0 -444
  67. package/dist/qualification-panel-store.d.ts +0 -14
  68. package/dist/qualification-panel-store.js +0 -188
  69. package/dist/qualification-panels.d.ts +0 -99
  70. package/dist/qualification-panels.js +0 -91
  71. package/dist/qualification-process.d.ts +0 -13
  72. package/dist/qualification-process.js +0 -190
  73. package/dist/qualification-runner.d.ts +0 -203
  74. package/dist/qualification-runner.js +0 -2037
  75. package/dist/qualification-store.d.ts +0 -187
  76. package/dist/qualification-store.js +0 -833
  77. package/dist/qualification-validation.d.ts +0 -12
  78. package/dist/qualification-validation.js +0 -8
  79. package/dist/screen.d.ts +0 -31
  80. package/dist/screen.js +0 -105
  81. package/dist/trajectory-gates.d.ts +0 -137
  82. package/dist/trajectory-gates.js +0 -576
  83. package/dist/trusted-host-supervision.d.ts +0 -25
  84. package/dist/trusted-host-supervision.js +0 -94
  85. package/dist/work-capture-schema.d.ts +0 -38
  86. package/dist/work-capture-schema.js +0 -33
  87. package/dist/work-capture.d.ts +0 -43
  88. package/dist/work-capture.js +0 -81
  89. package/dist/work-signals.d.ts +0 -55
  90. package/dist/work-signals.js +0 -71
  91. package/schemas/qualification-cell-result-v1.schema.json +0 -32
  92. package/schemas/qualification-config-v1.schema.json +0 -244
  93. package/schemas/qualification-invocation-request-v1.schema.json +0 -59
  94. package/schemas/qualification-judge-panel-result-v1.schema.json +0 -42
  95. package/schemas/trajectory-event-v1.schema.json +0 -80
@@ -1,233 +0,0 @@
1
- import { QUALIFICATION_JUDGE_PANEL_POLICY } from "./qualification-panels.js";
2
- export declare const QUALIFICATION_CONFIG_VERSION: "qualification-config-v1";
3
- export declare const QUALIFICATION_RUNNER_VERSION: "qualification-runner-v1";
4
- export declare const QUALIFICATION_REQUEST_VERSION: "qualification-invocation-request-v1";
5
- export declare const QUALIFICATION_BOARD_VERSION: "qualification-board-v1";
6
- export declare const QUALIFICATION_TERMINAL_RECEIPT_VERSION_V3: "qualification-terminal-receipt-v3";
7
- /** Historical configurations omit this field and retain the original closed policy. */
8
- export declare const QUALIFICATION_OAUTH_DIRECTORY_POLICY_V1: "qualification-oauth-directory-policy-v1";
9
- /** New qualification configurations select this policy explicitly. */
10
- export declare const QUALIFICATION_OAUTH_DIRECTORY_POLICY_V2: "qualification-oauth-directory-policy-v2";
11
- export type QualificationOAuthDirectoryPolicy = typeof QUALIFICATION_OAUTH_DIRECTORY_POLICY_V1 | typeof QUALIFICATION_OAUTH_DIRECTORY_POLICY_V2;
12
- export declare const PRINCIPAL_QUALIFICATION_PRODUCT_PIN: {
13
- readonly repository: "https://github.com/mojomanyana/principal-pi-skills";
14
- readonly commit: "a6596950d64a3a525f95329d5dbd3e38948be408";
15
- readonly tree: "960359d69deb6f216724b86e13eef67e2f6a6aa1";
16
- readonly package_sha256: "3677f76fb31dcaf6a28c9e8b9cf9d6358f998b78bd370f0a0f250d05e136fcc8";
17
- readonly package_bytes: 110168;
18
- };
19
- /** Immutable pi-daddy ledger-v3 producer merge head. */
20
- export declare const PI_DADDY_QUALIFICATION_PRODUCER_PIN: {
21
- readonly repository: "https://github.com/mojomanyana/pi-daddy";
22
- readonly commit: "4a9524394ca995fd74ed9bbb836dc4e73cda3b8c";
23
- readonly tree: "7c006bff213142634f0f911ba9bd6add363ecaae";
24
- readonly version: "0.21.1";
25
- readonly ledger_version: 3;
26
- readonly ledger_schema_sha256: "64e3d875e74bc32fa43fb96892605548259cd16f6ed6678646d73cc56280c511";
27
- };
28
- export declare const QUALIFICATION_ACCOUNTING_POLICY: {
29
- readonly wave_a: {
30
- readonly subject: 54;
31
- readonly judge: 54;
32
- };
33
- readonly complete_program: {
34
- readonly subject: 642;
35
- readonly judge: 642;
36
- };
37
- readonly ceilings: {
38
- readonly subject: 700;
39
- readonly judge: 700;
40
- };
41
- readonly initial: {
42
- readonly subject: 0;
43
- readonly judge: 0;
44
- };
45
- };
46
- /** Prospective call ceilings for the universal two-plus-conditional-third panel. */
47
- export declare const QUALIFICATION_PANEL_ACCOUNTING_POLICY: {
48
- readonly wave_a: {
49
- readonly subject: 54;
50
- readonly judge: 162;
51
- };
52
- readonly complete_program: {
53
- readonly subject: 642;
54
- readonly judge: 1926;
55
- };
56
- readonly ceilings: {
57
- readonly subject: 700;
58
- readonly judge: 2100;
59
- };
60
- readonly initial: {
61
- readonly subject: 0;
62
- readonly judge: 0;
63
- };
64
- };
65
- export type QualificationAccountingPolicy = typeof QUALIFICATION_ACCOUNTING_POLICY | typeof QUALIFICATION_PANEL_ACCOUNTING_POLICY;
66
- export type QualificationRole = "holdout-author" | "holdout-reviewer" | "subject" | "judge" | "calibration" | "canary";
67
- export type QualificationArmKind = "subject" | "judge";
68
- export type QualificationConfigMode = "production" | "test";
69
- export type QualificationConflictPolicy = "refuse" | "remove-and-record";
70
- export interface QualificationExecutablePin {
71
- path: string;
72
- sha256: string;
73
- }
74
- export interface QualificationRepositoryPin {
75
- repository: string;
76
- commit: string;
77
- tree: string;
78
- }
79
- export interface QualificationProductPin extends QualificationRepositoryPin {
80
- checkout_path: string;
81
- package_path: string;
82
- package_sha256: string;
83
- package_bytes: number;
84
- }
85
- export interface QualificationEnginePin extends QualificationRepositoryPin {
86
- checkout_path: string;
87
- package_paths: {
88
- core: string;
89
- adapters: string;
90
- cli: string;
91
- meta: string;
92
- };
93
- package_sha256: {
94
- core: string;
95
- adapters: string;
96
- cli: string;
97
- meta: string;
98
- };
99
- }
100
- export interface QualificationProducerPin extends QualificationRepositoryPin {
101
- checkout_path: string;
102
- version: string;
103
- ledger_version: 3;
104
- ledger_schema_sha256: string;
105
- }
106
- export interface QualificationResourcePin {
107
- kind: "extension" | "skill" | "system-prompt";
108
- path: string;
109
- sha256: string;
110
- }
111
- export interface QualificationArmV1 {
112
- id: string;
113
- kind: QualificationArmKind;
114
- provider: string;
115
- model: string;
116
- authentication: "chatgpt-oauth" | "test-oauth";
117
- executable: QualificationExecutablePin;
118
- resources: QualificationResourcePin[];
119
- arguments: string[];
120
- allowed_environment_names: string[];
121
- timeout_ms: number;
122
- output_limit_bytes: number;
123
- artifact: {
124
- type: "pi-jsonl";
125
- relative_path_template: "artifacts/{invocation_id}.jsonl";
126
- };
127
- fallback: false;
128
- metered_override: false;
129
- }
130
- export interface QualificationBoardV1 {
131
- schema_version: typeof QUALIFICATION_BOARD_VERSION;
132
- read_only: true;
133
- cells: {
134
- id: string;
135
- scenario_id: string;
136
- measurement_identity_sha256: string;
137
- scenario_version: string;
138
- stimulus_sha256: string;
139
- rubric_sha256: string;
140
- subject_input_sha256: string;
141
- subject_arm: string;
142
- judge_arms: [string, string, string];
143
- panels: {
144
- id: string;
145
- repetition: number;
146
- }[];
147
- critical: boolean;
148
- pass_threshold: number;
149
- }[];
150
- }
151
- export interface QualificationConfigV1 {
152
- schema_version: typeof QUALIFICATION_CONFIG_VERSION;
153
- /** Omission is the historical v1 policy and is preserved in canonical digests. */
154
- oauth_directory_policy?: typeof QUALIFICATION_OAUTH_DIRECTORY_POLICY_V2;
155
- /** Omission preserves historical v1/v2 terminal-receipt selection. */
156
- terminal_receipt_version?: typeof QUALIFICATION_TERMINAL_RECEIPT_VERSION_V3;
157
- /** Omission preserves the historical single-draw judge methodology. */
158
- judge_panel?: typeof QUALIFICATION_JUDGE_PANEL_POLICY;
159
- /** Externally approved board authority; required with judge_panel. */
160
- board?: QualificationBoardV1;
161
- mode: QualificationConfigMode;
162
- product: QualificationProductPin;
163
- engine: QualificationEnginePin;
164
- producer: QualificationProducerPin;
165
- runner: {
166
- version: typeof QUALIFICATION_RUNNER_VERSION;
167
- executable: QualificationExecutablePin;
168
- conflicting_parent_environment: QualificationConflictPolicy;
169
- };
170
- accounting: QualificationAccountingPolicy;
171
- arms: QualificationArmV1[];
172
- }
173
- export interface QualificationInvocationRequestV1 {
174
- schema_version: typeof QUALIFICATION_REQUEST_VERSION;
175
- measurement_identity_sha256: string;
176
- invocation_id: string;
177
- continuation_authority_sha256: string;
178
- continuation_authority_expires_at: string;
179
- scenario: {
180
- id: string;
181
- version: string;
182
- stimulus_sha256: string;
183
- rubric_sha256: string;
184
- input_path: string;
185
- input_sha256: string;
186
- working_directory: string;
187
- };
188
- role: QualificationRole;
189
- counts_as_measurement: boolean;
190
- arms: {
191
- subject: string;
192
- judge: string;
193
- };
194
- selected_arm: string;
195
- repetition: number;
196
- /** Present only for judge calls under the prospective panel policy. */
197
- panel?: {
198
- id: string;
199
- member_ordinal: 1 | 2 | 3;
200
- subject_invocation_id: string;
201
- subject_artifact_sha256: string;
202
- };
203
- }
204
- /**
205
- * Names that can alter provider credentials/routing or inject code into the child.
206
- * Qualification children start from an allow-list regardless; this predicate also
207
- * makes a dirty parent shell observable by NAME without ever retaining its value.
208
- */
209
- export declare function isQualificationConflictingEnvironmentName(name: string): boolean;
210
- export declare function sanitizeQualificationEnvironment(parent: NodeJS.ProcessEnv, allowedNames: readonly string[], conflictPolicy: QualificationConflictPolicy): {
211
- env: NodeJS.ProcessEnv;
212
- removed_names: string[];
213
- };
214
- export declare function qualificationCanonicalJson(value: unknown): string;
215
- export declare function qualificationSha256(value: string | Buffer): string;
216
- export declare function qualificationConfigDigest(config: QualificationConfigV1): string;
217
- export declare function qualificationOAuthDirectoryPolicy(config: QualificationConfigV1): QualificationOAuthDirectoryPolicy;
218
- export declare function verifyQualificationPins(config: QualificationConfigV1): void;
219
- export declare function verifyQualificationResource(pin: QualificationResourcePin): {
220
- realpath: string;
221
- bytes: number;
222
- sha256: string;
223
- };
224
- export declare function verifyQualificationExecutable(pin: QualificationExecutablePin): {
225
- realpath: string;
226
- bytes: number;
227
- sha256: string;
228
- device: number;
229
- inode: number;
230
- mtime_ms: number;
231
- };
232
- export declare function parseQualificationConfig(value: unknown): QualificationConfigV1;
233
- export declare function parseQualificationRequest(value: unknown, config: QualificationConfigV1): QualificationInvocationRequestV1;