@harness-engineering/orchestrator 0.11.1 → 0.11.2

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
@@ -4084,7 +4084,7 @@ var LocalModelResolver = class {
4084
4084
  };
4085
4085
 
4086
4086
  // src/orchestrator.ts
4087
- var import_local_models4 = require("@harness-engineering/local-models");
4087
+ var import_local_models5 = require("@harness-engineering/local-models");
4088
4088
  var import_core18 = require("@harness-engineering/core");
4089
4089
 
4090
4090
  // src/agent/config-migration.ts
@@ -9188,6 +9188,7 @@ async function runForceRefresh(res, scheduler, deps) {
9188
9188
 
9189
9189
  // src/server/routes/v1/local-models-pool-mutation.ts
9190
9190
  var import_core11 = require("@harness-engineering/core");
9191
+ var import_local_models3 = require("@harness-engineering/local-models");
9191
9192
  var INSTALL_RE = /^\/api\/v1\/local-models\/pool\/install(?:\?.*)?$/;
9192
9193
  var REMOVE_RE = /^\/api\/v1\/local-models\/pool\/remove(?:\?.*)?$/;
9193
9194
  var RESOLVE_TOP = 50;
@@ -9253,9 +9254,17 @@ async function handleInstall(req, res, deps) {
9253
9254
  evidence: match.evidence,
9254
9255
  freshness: `snapshot ${match.benchmarkSnapshot}`
9255
9256
  },
9256
- // 0 the installer resolves the true on-disk size via `inspect` before the
9257
- // budget check, rather than trusting an estimate.
9258
- diskImpactGb: 0
9257
+ // Estimate the on-disk size from the candidate's params + quant (the same
9258
+ // `estimateDiskGb` the automated proposal engine uses). The pool needs a
9259
+ // size for its pre-commit budget check *before* the pull; it cannot inspect
9260
+ // the target first, because ollama `/api/show` 404s for a model that is not
9261
+ // yet pulled locally — which would surface as a spurious "no longer
9262
+ // available on HuggingFace" 404 on every operator install.
9263
+ diskImpactGb: (0, import_local_models3.estimateDiskGb)({
9264
+ sizeB: match.sizeB,
9265
+ quant: match.quant,
9266
+ ...match.activeB !== void 0 ? { activeB: match.activeB } : {}
9267
+ })
9259
9268
  };
9260
9269
  const record = await (0, import_core11.createModelProposal)(deps.projectPath, content, {
9261
9270
  proposedBy: decidedByOf(deps, req)
@@ -14080,7 +14089,7 @@ var Orchestrator = class extends import_node_events.EventEmitter {
14080
14089
  if (overrides?.poolState) {
14081
14090
  this.poolStateProvider = overrides.poolState;
14082
14091
  } else if (localModelsEnabled) {
14083
- this.poolStateStore = new import_local_models4.PoolStateStore({
14092
+ this.poolStateStore = new import_local_models5.PoolStateStore({
14084
14093
  onWarn: (message, cause) => this.logger.warn(message, cause !== void 0 ? { cause } : void 0)
14085
14094
  });
14086
14095
  this.poolStateProvider = this.poolStateStore;
@@ -15283,11 +15292,11 @@ ${messages}`);
15283
15292
  initModelPool(store) {
15284
15293
  const onWarn = (message, cause) => this.logger.warn(message, cause !== void 0 ? { cause } : void 0);
15285
15294
  const installerCfg = this.config.localModels?.installer;
15286
- this.modelInstaller = new import_local_models4.OllamaInstallAdapter({
15295
+ this.modelInstaller = new import_local_models5.OllamaInstallAdapter({
15287
15296
  baseUrl: installerCfg?.ollamaEndpoint ?? "http://localhost:11434",
15288
15297
  onWarn
15289
15298
  });
15290
- this.modelPool = new import_local_models4.PoolManager({ store, installer: this.modelInstaller, onWarn });
15299
+ this.modelPool = new import_local_models5.PoolManager({ store, installer: this.modelInstaller, onWarn });
15291
15300
  }
15292
15301
  /**
15293
15302
  * LMLM Phase 7 wiring: apply the operator's configured pool bounds (disk
@@ -15323,8 +15332,8 @@ ${messages}`);
15323
15332
  if (this.modelPool === null) return;
15324
15333
  const pool = this.modelPool;
15325
15334
  const refreshCfg = this.config.localModels?.refresh;
15326
- const frozen = (0, import_local_models4.loadFrozenCandidates)();
15327
- const candidates = (0, import_local_models4.selectCandidates)(frozen.candidates, this.config.localModels?.pool);
15335
+ const frozen = (0, import_local_models5.loadFrozenCandidates)();
15336
+ const candidates = (0, import_local_models5.selectCandidates)(frozen.candidates, this.config.localModels?.pool);
15328
15337
  for (const warning of frozen.warnings) {
15329
15338
  this.logger.warn("LMLM frozen candidate snapshot degraded", { warning });
15330
15339
  }
@@ -15334,10 +15343,10 @@ ${messages}`);
15334
15343
  allowedOrgs: this.config.localModels?.pool?.allowedOrgs ?? []
15335
15344
  });
15336
15345
  }
15337
- const recommend = (0, import_local_models4.createNativeRecommender)({ candidates });
15346
+ const recommend = (0, import_local_models5.createNativeRecommender)({ candidates });
15338
15347
  this.modelRecommender = recommend;
15339
- this.refreshScheduler = new import_local_models4.RefreshScheduler({
15340
- runTick: () => (0, import_local_models4.runRefreshTick)({
15348
+ this.refreshScheduler = new import_local_models5.RefreshScheduler({
15349
+ runTick: () => (0, import_local_models5.runRefreshTick)({
15341
15350
  detectHardware: () => this.detectLmlmHardware(),
15342
15351
  recommend,
15343
15352
  poolManager: pool,
@@ -15368,7 +15377,7 @@ ${messages}`);
15368
15377
  /** Resolve the hardware profile for a refresh tick (operator override wins). */
15369
15378
  async detectLmlmHardware() {
15370
15379
  const override = this.config.localModels?.hardware?.override;
15371
- const detector = new import_local_models4.HardwareDetector(override !== void 0 ? { override } : {});
15380
+ const detector = new import_local_models5.HardwareDetector(override !== void 0 ? { override } : {});
15372
15381
  return (await detector.detect()).profile;
15373
15382
  }
15374
15383
  /** Map the on-disk model-proposal queue to F7 dedup pairs (open→pending, rejected→rejected). */
package/dist/index.mjs CHANGED
@@ -9143,6 +9143,7 @@ async function runForceRefresh(res, scheduler, deps) {
9143
9143
 
9144
9144
  // src/server/routes/v1/local-models-pool-mutation.ts
9145
9145
  import { createModelProposal, updateProposal as updateProposal4 } from "@harness-engineering/core";
9146
+ import { estimateDiskGb } from "@harness-engineering/local-models";
9146
9147
  var INSTALL_RE = /^\/api\/v1\/local-models\/pool\/install(?:\?.*)?$/;
9147
9148
  var REMOVE_RE = /^\/api\/v1\/local-models\/pool\/remove(?:\?.*)?$/;
9148
9149
  var RESOLVE_TOP = 50;
@@ -9208,9 +9209,17 @@ async function handleInstall(req, res, deps) {
9208
9209
  evidence: match.evidence,
9209
9210
  freshness: `snapshot ${match.benchmarkSnapshot}`
9210
9211
  },
9211
- // 0 the installer resolves the true on-disk size via `inspect` before the
9212
- // budget check, rather than trusting an estimate.
9213
- diskImpactGb: 0
9212
+ // Estimate the on-disk size from the candidate's params + quant (the same
9213
+ // `estimateDiskGb` the automated proposal engine uses). The pool needs a
9214
+ // size for its pre-commit budget check *before* the pull; it cannot inspect
9215
+ // the target first, because ollama `/api/show` 404s for a model that is not
9216
+ // yet pulled locally — which would surface as a spurious "no longer
9217
+ // available on HuggingFace" 404 on every operator install.
9218
+ diskImpactGb: estimateDiskGb({
9219
+ sizeB: match.sizeB,
9220
+ quant: match.quant,
9221
+ ...match.activeB !== void 0 ? { activeB: match.activeB } : {}
9222
+ })
9214
9223
  };
9215
9224
  const record = await createModelProposal(deps.projectPath, content, {
9216
9225
  proposedBy: decidedByOf(deps, req)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-engineering/orchestrator",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Orchestrator daemon for dispatching coding agents to issues",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -50,8 +50,8 @@
50
50
  "zod": "^3.25.76",
51
51
  "@harness-engineering/core": "0.34.1",
52
52
  "@harness-engineering/graph": "0.11.5",
53
- "@harness-engineering/intelligence": "0.4.3",
54
53
  "@harness-engineering/local-models": "0.4.0",
54
+ "@harness-engineering/intelligence": "0.4.3",
55
55
  "@harness-engineering/types": "0.19.0"
56
56
  },
57
57
  "devDependencies": {