@harness-engineering/orchestrator 0.2.13 → 0.2.14
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/index.js +15 -3
- package/dist/index.mjs +15 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6326,6 +6326,18 @@ var MaintenanceScheduler = class {
|
|
|
6326
6326
|
// src/maintenance/reporter.ts
|
|
6327
6327
|
var fs14 = __toESM(require("fs"));
|
|
6328
6328
|
var path14 = __toESM(require("path"));
|
|
6329
|
+
var import_zod9 = require("zod");
|
|
6330
|
+
var RunResultSchema = import_zod9.z.object({
|
|
6331
|
+
taskId: import_zod9.z.string(),
|
|
6332
|
+
startedAt: import_zod9.z.string(),
|
|
6333
|
+
completedAt: import_zod9.z.string(),
|
|
6334
|
+
status: import_zod9.z.enum(["success", "failure", "skipped", "no-issues"]),
|
|
6335
|
+
findings: import_zod9.z.number(),
|
|
6336
|
+
fixed: import_zod9.z.number(),
|
|
6337
|
+
prUrl: import_zod9.z.string().nullable(),
|
|
6338
|
+
prUpdated: import_zod9.z.boolean(),
|
|
6339
|
+
error: import_zod9.z.string().optional()
|
|
6340
|
+
});
|
|
6329
6341
|
var MAX_HISTORY = 500;
|
|
6330
6342
|
var fallbackLogger = {
|
|
6331
6343
|
info: () => {
|
|
@@ -6351,9 +6363,9 @@ var MaintenanceReporter = class {
|
|
|
6351
6363
|
await fs14.promises.mkdir(this.persistDir, { recursive: true });
|
|
6352
6364
|
const filePath = path14.join(this.persistDir, "history.json");
|
|
6353
6365
|
const data = await fs14.promises.readFile(filePath, "utf-8");
|
|
6354
|
-
const parsed = JSON.parse(data);
|
|
6355
|
-
if (
|
|
6356
|
-
this.history = parsed.slice(0, MAX_HISTORY);
|
|
6366
|
+
const parsed = import_zod9.z.array(RunResultSchema).safeParse(JSON.parse(data));
|
|
6367
|
+
if (parsed.success) {
|
|
6368
|
+
this.history = parsed.data.slice(0, MAX_HISTORY);
|
|
6357
6369
|
}
|
|
6358
6370
|
} catch (err) {
|
|
6359
6371
|
if (err instanceof Error && "code" in err && err.code === "ENOENT") {
|
package/dist/index.mjs
CHANGED
|
@@ -6292,6 +6292,18 @@ var MaintenanceScheduler = class {
|
|
|
6292
6292
|
// src/maintenance/reporter.ts
|
|
6293
6293
|
import * as fs14 from "fs";
|
|
6294
6294
|
import * as path14 from "path";
|
|
6295
|
+
import { z as z9 } from "zod";
|
|
6296
|
+
var RunResultSchema = z9.object({
|
|
6297
|
+
taskId: z9.string(),
|
|
6298
|
+
startedAt: z9.string(),
|
|
6299
|
+
completedAt: z9.string(),
|
|
6300
|
+
status: z9.enum(["success", "failure", "skipped", "no-issues"]),
|
|
6301
|
+
findings: z9.number(),
|
|
6302
|
+
fixed: z9.number(),
|
|
6303
|
+
prUrl: z9.string().nullable(),
|
|
6304
|
+
prUpdated: z9.boolean(),
|
|
6305
|
+
error: z9.string().optional()
|
|
6306
|
+
});
|
|
6295
6307
|
var MAX_HISTORY = 500;
|
|
6296
6308
|
var fallbackLogger = {
|
|
6297
6309
|
info: () => {
|
|
@@ -6317,9 +6329,9 @@ var MaintenanceReporter = class {
|
|
|
6317
6329
|
await fs14.promises.mkdir(this.persistDir, { recursive: true });
|
|
6318
6330
|
const filePath = path14.join(this.persistDir, "history.json");
|
|
6319
6331
|
const data = await fs14.promises.readFile(filePath, "utf-8");
|
|
6320
|
-
const parsed = JSON.parse(data);
|
|
6321
|
-
if (
|
|
6322
|
-
this.history = parsed.slice(0, MAX_HISTORY);
|
|
6332
|
+
const parsed = z9.array(RunResultSchema).safeParse(JSON.parse(data));
|
|
6333
|
+
if (parsed.success) {
|
|
6334
|
+
this.history = parsed.data.slice(0, MAX_HISTORY);
|
|
6323
6335
|
}
|
|
6324
6336
|
} catch (err) {
|
|
6325
6337
|
if (err instanceof Error && "code" in err && err.code === "ENOENT") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harness-engineering/orchestrator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Orchestrator daemon for dispatching coding agents to issues",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"zod": "^3.25.76",
|
|
49
49
|
"@harness-engineering/graph": "0.5.0",
|
|
50
50
|
"@harness-engineering/intelligence": "0.1.2",
|
|
51
|
-
"@harness-engineering/
|
|
52
|
-
"@harness-engineering/
|
|
51
|
+
"@harness-engineering/core": "0.23.2",
|
|
52
|
+
"@harness-engineering/types": "0.10.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^22.19.15",
|