@harness-engineering/orchestrator 0.4.0 → 0.4.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.
package/dist/index.js CHANGED
@@ -2711,7 +2711,7 @@ var PromptRenderer = class {
2711
2711
  var import_node_events = require("events");
2712
2712
  var path16 = __toESM(require("path"));
2713
2713
  var import_node_crypto7 = require("crypto");
2714
- var import_core9 = require("@harness-engineering/core");
2714
+ var import_core10 = require("@harness-engineering/core");
2715
2715
 
2716
2716
  // src/intelligence/pipeline-runner.ts
2717
2717
  var path7 = __toESM(require("path"));
@@ -3272,7 +3272,7 @@ var CompletionHandler = class {
3272
3272
  };
3273
3273
 
3274
3274
  // src/orchestrator.ts
3275
- var import_core10 = require("@harness-engineering/core");
3275
+ var import_core11 = require("@harness-engineering/core");
3276
3276
 
3277
3277
  // src/tracker/adapters/github-issues-issue-tracker.ts
3278
3278
  var import_types9 = require("@harness-engineering/types");
@@ -4804,7 +4804,6 @@ var PiBackend = class {
4804
4804
  const { session: piSession } = await piSdk.createAgentSession({
4805
4805
  cwd: params.workspacePath,
4806
4806
  ...model !== void 0 && { model },
4807
- tools: piSdk.codingTools,
4808
4807
  sessionManager: piSdk.SessionManager.inMemory()
4809
4808
  });
4810
4809
  const session = {
@@ -5669,6 +5668,7 @@ function buildExplicitProvider(provider, selModel, config) {
5669
5668
  // src/server/http.ts
5670
5669
  var http = __toESM(require("http"));
5671
5670
  var path14 = __toESM(require("path"));
5671
+ var import_core8 = require("@harness-engineering/core");
5672
5672
 
5673
5673
  // src/server/websocket.ts
5674
5674
  var import_ws = require("ws");
@@ -7104,6 +7104,7 @@ var OrchestratorServer = class {
7104
7104
  return this.broadcaster.clientCount;
7105
7105
  }
7106
7106
  async start() {
7107
+ (0, import_core8.assertPortUsable)(this.port, "orchestrator");
7107
7108
  if (this.interactionQueue) {
7108
7109
  this.planWatcher = new PlanWatcher(this.plansDir, this.interactionQueue);
7109
7110
  this.planWatcher.start();
@@ -7168,7 +7169,7 @@ var StructuredLogger = class {
7168
7169
  // src/workspace/config-scanner.ts
7169
7170
  var import_node_fs = require("fs");
7170
7171
  var import_node_path = require("path");
7171
- var import_core8 = require("@harness-engineering/core");
7172
+ var import_core9 = require("@harness-engineering/core");
7172
7173
  var CONFIG_FILES = ["CLAUDE.md", "AGENTS.md", ".gemini/settings.json", "skill.yaml"];
7173
7174
  var BLOCKING_INJECTION_PREFIXES = ["INJ-UNI-", "INJ-REROL-"];
7174
7175
  var DOWNGRADED_SECURITY_RULES = /* @__PURE__ */ new Set(["SEC-AGT-006"]);
@@ -7190,25 +7191,25 @@ async function scanSingleFile(filePath, targetDir, scanner) {
7190
7191
  } catch {
7191
7192
  return null;
7192
7193
  }
7193
- const injectionFindings = (0, import_core8.scanForInjection)(content);
7194
- const findings = (0, import_core8.mapInjectionFindings)(injectionFindings);
7194
+ const injectionFindings = (0, import_core9.scanForInjection)(content);
7195
+ const findings = (0, import_core9.mapInjectionFindings)(injectionFindings);
7195
7196
  const secFindings = await scanner.scanFile(filePath);
7196
- findings.push(...(0, import_core8.mapSecurityFindings)(secFindings, findings));
7197
+ findings.push(...(0, import_core9.mapSecurityFindings)(secFindings, findings));
7197
7198
  const adjusted = adjustFindingSeverity(findings);
7198
7199
  return {
7199
7200
  file: (0, import_node_path.relative)(targetDir, filePath).replaceAll("\\", "/"),
7200
7201
  findings: adjusted,
7201
- overallSeverity: (0, import_core8.computeOverallSeverity)(adjusted)
7202
+ overallSeverity: (0, import_core9.computeOverallSeverity)(adjusted)
7202
7203
  };
7203
7204
  }
7204
7205
  async function scanWorkspaceConfig(workspacePath) {
7205
- const scanner = new import_core8.SecurityScanner((0, import_core8.parseSecurityConfig)({}));
7206
+ const scanner = new import_core9.SecurityScanner((0, import_core9.parseSecurityConfig)({}));
7206
7207
  const results = [];
7207
7208
  for (const configFile of CONFIG_FILES) {
7208
7209
  const result = await scanSingleFile((0, import_node_path.join)(workspacePath, configFile), workspacePath, scanner);
7209
7210
  if (result) results.push(result);
7210
7211
  }
7211
- return { exitCode: (0, import_core8.computeScanExitCode)(results), results };
7212
+ return { exitCode: (0, import_core9.computeScanExitCode)(results), results };
7212
7213
  }
7213
7214
 
7214
7215
  // src/maintenance/task-registry.ts
@@ -8311,7 +8312,7 @@ var Orchestrator = class extends import_node_events.EventEmitter {
8311
8312
  ...this.config.tracker.apiKey ? { token: this.config.tracker.apiKey } : {},
8312
8313
  ...this.config.tracker.endpoint ? { apiBase: this.config.tracker.endpoint } : {}
8313
8314
  };
8314
- const clientResult = (0, import_core10.createTrackerClient)(trackerCfg);
8315
+ const clientResult = (0, import_core11.createTrackerClient)(trackerCfg);
8315
8316
  if (!clientResult.ok) throw clientResult.error;
8316
8317
  return new GitHubIssuesIssueTrackerAdapter(clientResult.value, this.config.tracker);
8317
8318
  }
@@ -8835,12 +8836,12 @@ var Orchestrator = class extends import_node_events.EventEmitter {
8835
8836
  async postLifecycleComment(identifier, externalId, event) {
8836
8837
  try {
8837
8838
  if (!externalId) return;
8838
- const trackerConfig = (0, import_core10.loadTrackerSyncConfig)(this.projectRoot);
8839
+ const trackerConfig = (0, import_core11.loadTrackerSyncConfig)(this.projectRoot);
8839
8840
  if (!trackerConfig) return;
8840
8841
  const token = process.env.GITHUB_TOKEN;
8841
8842
  if (!token) return;
8842
8843
  const orchestratorId = await this.orchestratorIdPromise;
8843
- const adapter = new import_core10.GitHubIssuesSyncAdapter({ token, config: trackerConfig });
8844
+ const adapter = new import_core11.GitHubIssuesSyncAdapter({ token, config: trackerConfig });
8844
8845
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19);
8845
8846
  const actionMap = {
8846
8847
  claimed: "Dispatching agent for autonomous execution",
@@ -8913,7 +8914,7 @@ var Orchestrator = class extends import_node_events.EventEmitter {
8913
8914
  ...f.line !== void 0 ? { line: f.line } : {}
8914
8915
  }))
8915
8916
  );
8916
- (0, import_core9.writeTaint)(
8917
+ (0, import_core10.writeTaint)(
8917
8918
  workspacePath,
8918
8919
  issue.id,
8919
8920
  "Medium-severity injection patterns found in workspace config files",
package/dist/index.mjs CHANGED
@@ -4760,7 +4760,6 @@ var PiBackend = class {
4760
4760
  const { session: piSession } = await piSdk.createAgentSession({
4761
4761
  cwd: params.workspacePath,
4762
4762
  ...model !== void 0 && { model },
4763
- tools: piSdk.codingTools,
4764
4763
  sessionManager: piSdk.SessionManager.inMemory()
4765
4764
  });
4766
4765
  const session = {
@@ -5636,6 +5635,7 @@ function buildExplicitProvider(provider, selModel, config) {
5636
5635
  // src/server/http.ts
5637
5636
  import * as http from "http";
5638
5637
  import * as path14 from "path";
5638
+ import { assertPortUsable } from "@harness-engineering/core";
5639
5639
 
5640
5640
  // src/server/websocket.ts
5641
5641
  import { WebSocketServer, WebSocket } from "ws";
@@ -7079,6 +7079,7 @@ var OrchestratorServer = class {
7079
7079
  return this.broadcaster.clientCount;
7080
7080
  }
7081
7081
  async start() {
7082
+ assertPortUsable(this.port, "orchestrator");
7082
7083
  if (this.interactionQueue) {
7083
7084
  this.planWatcher = new PlanWatcher(this.plansDir, this.interactionQueue);
7084
7085
  this.planWatcher.start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-engineering/orchestrator",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Orchestrator daemon for dispatching coding agents to issues",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "homepage": "https://github.com/Intense-Visions/harness-engineering/tree/main/packages/orchestrator#readme",
38
38
  "dependencies": {
39
- "@anthropic-ai/sdk": "^0.91.0",
39
+ "@anthropic-ai/sdk": "^0.95.1",
40
40
  "@google/generative-ai": "^0.24.0",
41
- "@mariozechner/pi-coding-agent": "^0.67.0",
41
+ "@mariozechner/pi-coding-agent": "^0.73.1",
42
42
  "ink": "^4.4.1",
43
43
  "liquidjs": "^10.25.7",
44
44
  "openai": "^6.0.0",
@@ -46,9 +46,9 @@
46
46
  "ws": "^8.20.0",
47
47
  "yaml": "^2.8.3",
48
48
  "zod": "^3.25.76",
49
- "@harness-engineering/core": "0.24.0",
50
- "@harness-engineering/graph": "0.8.0",
51
- "@harness-engineering/intelligence": "0.2.1",
49
+ "@harness-engineering/core": "0.25.0",
50
+ "@harness-engineering/graph": "0.9.0",
51
+ "@harness-engineering/intelligence": "0.2.2",
52
52
  "@harness-engineering/types": "0.11.0"
53
53
  },
54
54
  "devDependencies": {