@inflexa-ai/harness 0.35.2 → 0.35.4
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/citations/types.d.ts +2 -2
- package/dist/config/environment-stores.d.ts +10 -0
- package/dist/contracts/schemas/chat-parts.d.ts +11 -11
- package/dist/execution/run-canceler.js +20 -4
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -0
- package/dist/lib/metrics.d.ts +63 -5
- package/dist/lib/metrics.js +104 -5
- package/dist/lib/otel-spans.d.ts +77 -0
- package/dist/lib/otel-spans.js +123 -0
- package/dist/lib/otel.d.ts +12 -3
- package/dist/lib/otel.js +15 -4
- package/dist/loop/run-agent.js +13 -2
- package/dist/prompts/planner.js +6 -0
- package/dist/prompts/sandbox-standards.d.ts +1 -1
- package/dist/prompts/sandbox-standards.js +8 -3
- package/dist/runtime/dbos.d.ts +8 -7
- package/dist/sandbox/await-exec.js +16 -9
- package/dist/sandbox/notification-sweep.js +5 -2
- package/dist/sandbox/package-identity.d.ts +208 -0
- package/dist/sandbox/package-identity.js +244 -0
- package/dist/sandbox/reaper.js +5 -2
- package/dist/sandbox/submit-exec.js +6 -3
- package/dist/sandbox/types.d.ts +20 -25
- package/dist/sandbox/watchdog.js +8 -3
- package/dist/schemas/plan-schemas.d.ts +3 -3
- package/dist/schemas/validate-plan.js +32 -15
- package/dist/schemas/workflow-state.js +3 -1
- package/dist/state/data-profile.d.ts +20 -6
- package/dist/state/data-profile.js +16 -8
- package/dist/state/index.d.ts +1 -1
- package/dist/state/schema.d.ts +2 -2
- package/dist/tasks/data-profile.js +26 -12
- package/dist/tools/execute-analysis.js +37 -20
- package/dist/tools/research/inspect-run.d.ts +1 -1
- package/dist/tools/sandbox/link-packages.d.ts +6 -6
- package/dist/tools/sandbox/link-packages.js +45 -14
- package/dist/tools/sandbox/list-available-packages.d.ts +23 -1
- package/dist/tools/sandbox/list-available-packages.js +185 -43
- package/dist/workflows/execute-analysis.d.ts +4 -1
- package/dist/workflows/execute-analysis.js +40 -4
- package/dist/workflows/execute-target-assessment.js +68 -31
- package/dist/workflows/sandbox-step.js +7 -1
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import { DBOS, Error as DBOSErrors } from "@dbos-inc/dbos-sdk";
|
|
30
30
|
import { insertStepExecution, updateStepExecution } from "../state/index.js";
|
|
31
|
+
import { recordStepCompleted } from "../lib/metrics.js";
|
|
31
32
|
import { createNoopLogger } from "../lib/console-logger.js";
|
|
32
33
|
import { unwrapOrThrow } from "../lib/result.js";
|
|
33
34
|
import { isBudgetExceeded } from "../loop/budget-exceeded.js";
|
|
@@ -286,6 +287,7 @@ export async function runSandboxStepBody(input, deps) {
|
|
|
286
287
|
attempts: 1,
|
|
287
288
|
lastErrorClass: errorClass,
|
|
288
289
|
}));
|
|
290
|
+
recordStepCompleted({ agentId: input.agentId, status: "failed", durationMs });
|
|
289
291
|
}, {
|
|
290
292
|
name: errorClass === "lineage_attestation" ? "mark-failed-attestation" : "mark-failed",
|
|
291
293
|
});
|
|
@@ -468,6 +470,7 @@ export async function runSandboxStepBody(input, deps) {
|
|
|
468
470
|
finishReason,
|
|
469
471
|
hitMaxSteps,
|
|
470
472
|
}));
|
|
473
|
+
recordStepCompleted({ agentId: input.agentId, status: "failed", durationMs });
|
|
471
474
|
}, { name: "mark-blocked" });
|
|
472
475
|
await safeEmit({
|
|
473
476
|
type: "data-step-blocked",
|
|
@@ -577,7 +580,9 @@ export async function runSandboxStepBody(input, deps) {
|
|
|
577
580
|
await safeRun(logger, () => vectorIndexStepOutputs(deps, postCtx, postArtifacts), "post-step.vector-index");
|
|
578
581
|
// (9) teardown — destroy sandbox + clear sandbox_ref.
|
|
579
582
|
await DBOS.runStep(() => deps.sandboxClient.teardown(sandbox), { name: "sandbox.teardown" });
|
|
580
|
-
// (10) mark-terminal + emit.
|
|
583
|
+
// (10) mark-terminal + emit. The outcome metric is recorded inside the same
|
|
584
|
+
// step as the ledger row: a replayed body reads the cached step and records
|
|
585
|
+
// nothing again.
|
|
581
586
|
const durationMs = (await DBOS.now()) - startedAt;
|
|
582
587
|
await DBOS.runStep(async () => {
|
|
583
588
|
unwrapOrThrow(await updateStepExecution(deps.pool, input.runId, input.stepId, {
|
|
@@ -588,6 +593,7 @@ export async function runSandboxStepBody(input, deps) {
|
|
|
588
593
|
finishReason,
|
|
589
594
|
hitMaxSteps,
|
|
590
595
|
}));
|
|
596
|
+
recordStepCompleted({ agentId: input.agentId, status: "completed", durationMs });
|
|
591
597
|
}, { name: "mark-complete" });
|
|
592
598
|
// Terminal step-detail parts. file-tree + summary + output each get a
|
|
593
599
|
// stable id per step so the run-stream fold + client both treat them as
|
package/package.json
CHANGED