@openpond/harness 0.2.2 → 0.2.3
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/refiner.js +18 -0
- package/dist/types/refiner.d.ts +22 -0
- package/dist/types/refiner.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/refiner.js
CHANGED
|
@@ -78,6 +78,21 @@ export const LocalHarnessRefinerEvidenceSchema = z
|
|
|
78
78
|
.strict(),
|
|
79
79
|
eventExcerpts: z.array(z.record(z.string(), z.unknown())).max(20),
|
|
80
80
|
artifactDiagnostics: z.array(z.record(z.string(), z.unknown())).max(20),
|
|
81
|
+
executionProfile: z
|
|
82
|
+
.object({
|
|
83
|
+
modelRequestCount: z.number().int().nonnegative(),
|
|
84
|
+
failedModelRequestCount: z.number().int().nonnegative(),
|
|
85
|
+
promptTokens: z.number().int().nonnegative(),
|
|
86
|
+
completionTokens: z.number().int().nonnegative(),
|
|
87
|
+
totalTokens: z.number().int().nonnegative(),
|
|
88
|
+
toolFailureCount: z.number().int().nonnegative(),
|
|
89
|
+
retryCount: z.number().int().nonnegative(),
|
|
90
|
+
recoveryCount: z.number().int().nonnegative(),
|
|
91
|
+
})
|
|
92
|
+
.strict(),
|
|
93
|
+
recentObservations: z
|
|
94
|
+
.array(z.record(z.string(), z.unknown()))
|
|
95
|
+
.max(20),
|
|
81
96
|
recentOutcomes: z
|
|
82
97
|
.array(z
|
|
83
98
|
.object({
|
|
@@ -205,7 +220,10 @@ export function refinerMessages(evidence) {
|
|
|
205
220
|
"The task's assistantOutputLinkCount and artifactDiagnostics are objective observations, not decision rules. Failed artifact diagnostics can contradict a claimed successful visual check; decide whether the evidence supports a reusable Harness correction, an external route, or no action. When a user requests linked evidence, named sources without clickable links do not satisfy the request; an explicit request for links authorizes including them and must not be excused as a generic URL-formatting constraint.",
|
|
206
221
|
"For claims presented as current web verification, consider whether user-visible citations let the user inspect the supporting evidence even when the request did not literally say 'include links'. Source names and hidden retrieval metadata alone do not make a current factual claim verifiable.",
|
|
207
222
|
"A recovered error can still justify improvement when the same avoidable first attempt is likely to recur. Ordinary successful work, one-off artifact details, and continuation of the current task usually require no_action.",
|
|
223
|
+
"executionProfile is bounded cost evidence for the completed turn. Use request, token, tool-failure, retry, and recovery counts to distinguish a cheap recovery from a material recurring tax. High cost alone is not a reason to edit the Harness, but repeated repair loops supported by recentObservations can justify removing the failed first strategy for future related work.",
|
|
224
|
+
"recentObservations is a bounded window of earlier raw improvement observations from this Harness workspace. Use it to detect recurrence across distinct real turns even when an earlier Refiner outcome was no_action. Match the reusable root behavior, not merely a shared tool name, topic, artifact type, or benchmark family.",
|
|
208
225
|
"recentOutcomes is a small bounded window of earlier Refiner decisions from this Harness workspace. Use it as recurrence evidence only when you judge the underlying behavior to be related; repeated no_action decisions do not force a proposal, and differently worded incidents may still share one root behavior.",
|
|
226
|
+
"Optimize future related work, not the already completed turn. Prefer a small instruction or workflow correction that removes the repeated failed attempt, redundant search, full rewrite, or unnecessary output while preserving the requested result. Do not prescribe a library, command, file format, or subject-specific workaround unless the durable Harness already standardizes that workflow.",
|
|
209
227
|
"Propose only the reusable root behavior. Do not encode the task's subject, named entities, business facts, requested artifact outline, benchmark wording, or transient paths. A durable proposal must plausibly help materially different future tasks with the same failure class; otherwise choose no_action or route the underlying runtime/product concern.",
|
|
210
228
|
"Choose the smallest correct layer. Use memory for durable user facts or preferences, prompt for broad behavior, skill for a reusable workflow, and agent for a reusable role. Use route for runtime, product, taskset, or training concerns that this step must not mutate.",
|
|
211
229
|
"Do not confuse 'no safe Harness edit' with no_action. If the evidence exposes a durable defect owned by runtime, product, evaluation, or training, return route even when the agent recovered and completed the task.",
|
package/dist/types/refiner.d.ts
CHANGED
|
@@ -53,6 +53,17 @@ export declare const LocalHarnessRefinerEvidenceSchema: z.ZodObject<{
|
|
|
53
53
|
}, z.core.$strict>;
|
|
54
54
|
eventExcerpts: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
55
55
|
artifactDiagnostics: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
executionProfile: z.ZodObject<{
|
|
57
|
+
modelRequestCount: z.ZodNumber;
|
|
58
|
+
failedModelRequestCount: z.ZodNumber;
|
|
59
|
+
promptTokens: z.ZodNumber;
|
|
60
|
+
completionTokens: z.ZodNumber;
|
|
61
|
+
totalTokens: z.ZodNumber;
|
|
62
|
+
toolFailureCount: z.ZodNumber;
|
|
63
|
+
retryCount: z.ZodNumber;
|
|
64
|
+
recoveryCount: z.ZodNumber;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
recentObservations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
67
|
recentOutcomes: z.ZodArray<z.ZodObject<{
|
|
57
68
|
id: z.ZodString;
|
|
58
69
|
decision: z.ZodEnum<{
|
|
@@ -145,6 +156,17 @@ export declare const HostedHarnessRefinerRequestSchema: z.ZodObject<{
|
|
|
145
156
|
}, z.core.$strict>;
|
|
146
157
|
eventExcerpts: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
147
158
|
artifactDiagnostics: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
159
|
+
executionProfile: z.ZodObject<{
|
|
160
|
+
modelRequestCount: z.ZodNumber;
|
|
161
|
+
failedModelRequestCount: z.ZodNumber;
|
|
162
|
+
promptTokens: z.ZodNumber;
|
|
163
|
+
completionTokens: z.ZodNumber;
|
|
164
|
+
totalTokens: z.ZodNumber;
|
|
165
|
+
toolFailureCount: z.ZodNumber;
|
|
166
|
+
retryCount: z.ZodNumber;
|
|
167
|
+
recoveryCount: z.ZodNumber;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
recentObservations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
148
170
|
recentOutcomes: z.ZodArray<z.ZodObject<{
|
|
149
171
|
id: z.ZodString;
|
|
150
172
|
decision: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refiner.d.ts","sourceRoot":"","sources":["../../../../src/refiner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAI5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAIF,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"refiner.d.ts","sourceRoot":"","sources":["../../../../src/refiner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAI5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAIF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmEnC,CAAC;AAEZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE;IACnD,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAClC,MAAM,EAAE,WAAW,CAAC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