nexus-agents 2.77.5 → 2.77.7

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.
@@ -70,7 +70,7 @@ import {
70
70
  clampTaskTtl,
71
71
  getAvailabilityCache,
72
72
  resolveFallback
73
- } from "./chunk-5N7JBWAD.js";
73
+ } from "./chunk-SWHR4ELI.js";
74
74
  import {
75
75
  DEFAULTS
76
76
  } from "./chunk-YQMQSJQK.js";
@@ -34041,9 +34041,8 @@ function findMatchingKeyword(text, domain) {
34041
34041
  }
34042
34042
 
34043
34043
  // src/mcp/tools/delegate-to-model.ts
34044
- function recordDelegation(task, model, usedRouter, startMs, governance) {
34044
+ function recordDelegation(task, model, usedRouter, _startMs, _governance) {
34045
34045
  recordToMemory(task, model, usedRouter);
34046
- recordToOutcomeStore2(task, model, startMs, governance);
34047
34046
  }
34048
34047
  function recordToMemory(task, model, usedRouter) {
34049
34048
  try {
@@ -34063,33 +34062,6 @@ function recordToMemory(task, model, usedRouter) {
34063
34062
  });
34064
34063
  }
34065
34064
  }
34066
- function recordToOutcomeStore2(task, model, startMs, governance) {
34067
- try {
34068
- const cli = getCliForModel(model);
34069
- if (cli === void 0) return;
34070
- const match = detectTaskCategory(task);
34071
- const qualitySignals = [];
34072
- if (governance?.promoted === true) {
34073
- qualitySignals.push(`governance:${governance.domain}`);
34074
- }
34075
- getOutcomeStore().append({
34076
- id: `del-${String(getTimeProvider().now())}-${getRandomProvider().random().toString(36).slice(2, 8)}`,
34077
- cli,
34078
- category: match?.category ?? "exploration",
34079
- model,
34080
- success: true,
34081
- durationMs: Date.now() - startMs,
34082
- timestamp: new Date(getTimeProvider().now()).toISOString(),
34083
- source: "delegate",
34084
- ...qualitySignals.length > 0 ? { qualitySignals } : {}
34085
- });
34086
- } catch (error) {
34087
- createLogger({ tool: "delegate-to-model" }).warn("Failed to record delegation outcome", {
34088
- error: getErrorMessage(error),
34089
- model
34090
- });
34091
- }
34092
- }
34093
34065
  function classifyDelegateGovernance(input, logger51) {
34094
34066
  const classification = classifyWithGovernance("delegate_to_model", { task: input.task });
34095
34067
  auditGovernancePromotion(classification, "delegate_to_model", logger51);
@@ -44755,6 +44727,10 @@ var FitnessScoreCalculator = class {
44755
44727
  audit(version) {
44756
44728
  const findings = [];
44757
44729
  const dimensions = {};
44730
+ const cliAdaptersDir = join11(SRC_ROOT, "cli-adapters");
44731
+ if (!existsSync11(cliAdaptersDir)) {
44732
+ return this.notSourceRepoResult(version);
44733
+ }
44758
44734
  for (const check of this.checks) {
44759
44735
  this.logger.debug(`Running fitness check: ${check.name}`);
44760
44736
  const result = check.check();
@@ -44782,6 +44758,35 @@ var FitnessScoreCalculator = class {
44782
44758
  version
44783
44759
  };
44784
44760
  }
44761
+ /**
44762
+ * Return when the runtime SRC_ROOT doesn't look like the nexus-agents
44763
+ * source tree (#2716). One finding, score 0 — distinct from "the source
44764
+ * tree is broken" because every existsSync would falsely report missing.
44765
+ */
44766
+ notSourceRepoResult(version) {
44767
+ const finding = {
44768
+ dimension: "governanceIntegration",
44769
+ severity: "info",
44770
+ description: `fitness-audit must run against the nexus-agents source repo, but ${SRC_ROOT}/cli-adapters does not exist. You are likely running the installed npm package via \`npx nexus-agents\`, which ships only the bundled dist/. Clone the source repo and run \`node packages/nexus-agents/dist/cli.js fitness-audit\` (or invoke \`pnpm fitness-audit\` from the workspace root).`,
44771
+ pointsDeducted: 0
44772
+ };
44773
+ return {
44774
+ score: 0,
44775
+ dimensions: {
44776
+ canonicalPaths: 0,
44777
+ explicitBehavior: 0,
44778
+ determinism: 0,
44779
+ observability: 0,
44780
+ configSimplicity: 0,
44781
+ layerSeparation: 0,
44782
+ operatorErgonomics: 0,
44783
+ governanceIntegration: 0
44784
+ },
44785
+ findings: [finding],
44786
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
44787
+ version
44788
+ };
44789
+ }
44785
44790
  // =========================================================================
44786
44791
  // Individual Checks — real filesystem analysis
44787
44792
  // =========================================================================
@@ -50018,4 +50023,4 @@ export {
50018
50023
  detectBackend,
50019
50024
  createTaskTracker
50020
50025
  };
50021
- //# sourceMappingURL=chunk-NQRC7QQL.js.map
50026
+ //# sourceMappingURL=chunk-5NYGTBGE.js.map