hive-lite 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/lib/context.js +10 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hive-lite",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Local Project Map + Change Control for coding agents.",
5
5
  "keywords": [
6
6
  "codex",
@@ -308,7 +308,9 @@ function buildWritePlan(scope, intent, area) {
308
308
  item.operations.includes('create_file') && capabilityMatchesIntent(item, hypothesis)
309
309
  ));
310
310
  const genericExistingCapabilities = capabilities.filter((item) => (
311
- !item.peerIdentity && !item.operations.includes('create_file')
311
+ !item.peerIdentity
312
+ && !item.operations.includes('create_file')
313
+ && item.source === 'writable_existing'
312
314
  ));
313
315
  const referencePeers = capabilities.filter((item) => (
314
316
  item.peerIdentity
@@ -677,9 +679,10 @@ function competingHighScoringAreas(scored) {
677
679
  ));
678
680
  }
679
681
 
680
- function decompositionSignals({ map, area, confidence, intent, relevant, scope, scored, validationPlan, constrainedAreaId }) {
682
+ function decompositionSignals({ map, area, confidence, intent, relevant, scope, selectedWritableDirect, scored, validationPlan, constrainedAreaId }) {
681
683
  if (!area) return [];
682
684
  const signals = [];
685
+ const writableDirectForIntent = selectedWritableDirect || scope.writableDirect || [];
683
686
  const highAreas = highScoringAreas(scored)
684
687
  .filter((item) => !constrainedAreaId || item.area.id === constrainedAreaId);
685
688
  const competingAreas = competingHighScoringAreas(scored)
@@ -711,16 +714,16 @@ function decompositionSignals({ map, area, confidence, intent, relevant, scope,
711
714
  }));
712
715
  }
713
716
 
714
- if (scope.writableDirect.length > DECOMPOSITION_LIMITS.writableFilesBlocking) {
717
+ if (writableDirectForIntent.length > DECOMPOSITION_LIMITS.writableFilesBlocking) {
715
718
  signals.push(signal('TOO_MANY_WRITABLE_FILES', 'Direct writable files exceed the safe change boundary.', {
716
- count: scope.writableDirect.length,
719
+ count: writableDirectForIntent.length,
717
720
  threshold: DECOMPOSITION_LIMITS.writableFilesBlocking,
718
721
  }));
719
- } else if (scope.writableDirect.length > DECOMPOSITION_LIMITS.writableFilesWarning) {
722
+ } else if (writableDirectForIntent.length > DECOMPOSITION_LIMITS.writableFilesWarning) {
720
723
  signals.push(signal('TOO_MANY_WRITABLE_FILES', 'Direct writable files are high for one Change Record.', {
721
724
  severity: 'warning',
722
725
  blocking: false,
723
- count: scope.writableDirect.length,
726
+ count: writableDirectForIntent.length,
724
727
  threshold: DECOMPOSITION_LIMITS.writableFilesWarning,
725
728
  }));
726
729
  }
@@ -1403,6 +1406,7 @@ function createContextPacket(root, intent, options = {}) {
1403
1406
  intent,
1404
1407
  relevant,
1405
1408
  scope,
1409
+ selectedWritableDirect: writePlan.selectedWritableDirect,
1406
1410
  scored,
1407
1411
  validationPlan,
1408
1412
  constrainedAreaId,