omnius 1.0.581 → 1.0.582

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
@@ -556306,6 +556306,7 @@ Do not edit coordinator-owned shared artifacts. The coordinator will merge and v
556306
556306
  subAgentMode: true
556307
556307
  });
556308
556308
  if (result.completed) {
556309
+ const mutatedFiles = result.filesModified?.filter((path16) => typeof path16 === "string" && path16.trim().length > 0) ?? [];
556309
556310
  const filesLine = result.filesModified && result.filesModified.length > 0 ? `
556310
556311
  Files modified: ${result.filesModified.slice(0, 8).join(", ")}${result.filesModified.length > 8 ? ` (+${result.filesModified.length - 8} more)` : ""}` : "";
556311
556312
  const artifactLine = result.artifactIds && result.artifactIds.length > 0 ? `
@@ -556316,7 +556317,12 @@ Do not edit coordinator-owned shared artifacts. The coordinator will merge and v
556316
556317
  Type: ${subagentType}
556317
556318
  Turns: ${result.turns}, Tool calls: ${result.toolCalls}
556318
556319
  Duration: ${(result.durationMs / 1e3).toFixed(1)}s` + filesLine + artifactLine,
556319
- durationMs: performance.now() - start2
556320
+ durationMs: performance.now() - start2,
556321
+ // This is host-provided structured state from the in-process child,
556322
+ // not a path scraped from its prose summary. Preserve it so the
556323
+ // parent controller can inspect and verify the actual artifacts.
556324
+ mutated: mutatedFiles.length > 0,
556325
+ mutatedFiles
556320
556326
  };
556321
556327
  }
556322
556328
  return {
@@ -568095,14 +568101,15 @@ function buildIntegrationClosure(input) {
568095
568101
  }
568096
568102
  }
568097
568103
  const unresolved = ledger?.unresolved ?? [];
568104
+ const discoveryBlocksCompletion = discovery?.requiresEvidence === true;
568098
568105
  const proofGaps = unique2([
568099
- ...(discovery?.openDeltas ?? []).map((delta) => `${delta.path}: ${delta.reason}`),
568106
+ ...(discoveryBlocksCompletion ? discovery?.openDeltas ?? [] : []).map((delta) => `${delta.path}: ${delta.reason}`),
568100
568107
  ...unresolved.map((item) => item.text),
568101
568108
  ...claims.filter((claim) => claim.status !== "supported").filter(claimRequiresClosure).map((claim) => `${claim.id}: ${claim.requiredCheck}`)
568102
568109
  ], MAX_GAPS);
568103
568110
  const blockers = unique2([
568104
- ...discovery?.survivingBlockers ?? [],
568105
- ...discovery?.unresolvedQuestions ?? [],
568111
+ ...discoveryBlocksCompletion ? discovery?.survivingBlockers ?? [] : [],
568112
+ ...discoveryBlocksCompletion ? discovery?.unresolvedQuestions ?? [] : [],
568106
568113
  ...claims.filter((claim) => claim.status === "blocked" || claim.status === "contradicted").map((claim) => `${claim.id}: ${claim.text}`)
568107
568114
  ], MAX_GAPS);
568108
568115
  for (const blocker of blockers) {
@@ -568125,7 +568132,7 @@ function buildIntegrationClosure(input) {
568125
568132
  }
568126
568133
  const nextEvidence = unique2([
568127
568134
  ...claims.filter((claim) => claim.status !== "supported").filter(claimRequiresClosure).map((claim) => claim.requiredCheck),
568128
- ...(discovery?.openDeltas ?? []).map((delta) => `Inspect ${delta.path} from authoritative source: ${delta.reason}`)
568135
+ ...(discoveryBlocksCompletion ? discovery?.openDeltas ?? [] : []).map((delta) => `Inspect ${delta.path} from authoritative source: ${delta.reason}`)
568129
568136
  ], 6);
568130
568137
  const closure = {
568131
568138
  schema: INTEGRATION_CLOSURE_SCHEMA,
@@ -568436,7 +568443,8 @@ function claimDiscoveryStateFromSurvey(input) {
568436
568443
  const blockers = Array.isArray(input.survivingBlockers) ? input.survivingBlockers.map((item) => cleanText(item, 220)).filter(Boolean) : [];
568437
568444
  const hasBlockers = blockers.length > 0;
568438
568445
  const hasQuestions = unresolved.length > 0;
568439
- const resolvedStatus = requiredArtifactPaths.length === 0 ? hasBlockers || hasQuestions ? "blocked" : "skipped" : hasBlockers || hasQuestions ? "blocked" : "active";
568446
+ const requiresEvidence = typeof input.requiresEvidence === "boolean" ? input.requiresEvidence : requiredArtifactPaths.length > 0;
568447
+ const resolvedStatus = !requiresEvidence ? "skipped" : requiredArtifactPaths.length === 0 ? hasBlockers || hasQuestions ? "blocked" : "skipped" : hasBlockers || hasQuestions ? "blocked" : "active";
568440
568448
  return {
568441
568449
  status: resolvedStatus,
568442
568450
  generatedAtIso: nowIso3(),
@@ -568451,7 +568459,7 @@ function claimDiscoveryStateFromSurvey(input) {
568451
568459
  survivingBlockers: blockers.slice(0, 8),
568452
568460
  evidenceHandles: [...new Set(requiredArtifactPaths.map((path16) => `workspace:${path16}`))],
568453
568461
  resolvedEvidenceHandles: [],
568454
- requiresEvidence: typeof input.requiresEvidence === "boolean" ? input.requiresEvidence : requiredArtifactPaths.length > 0
568462
+ requiresEvidence
568455
568463
  };
568456
568464
  }
568457
568465
  function nowIso3(now2 = /* @__PURE__ */ new Date()) {
@@ -568919,17 +568927,19 @@ function buildCriticPacketFromLedger(ledger) {
568919
568927
  lines.push(`Status: ${ledger.status}`);
568920
568928
  lines.push(`Claims discovered: ${ledger.proposedClaims.length}`);
568921
568929
  if (ledger.claimDiscovery) {
568930
+ const discoveryRequiresEvidence = ledger.claimDiscovery.requiresEvidence === true;
568922
568931
  lines.push("");
568923
568932
  lines.push("Claim Discovery:");
568924
- lines.push(` status=${ledger.claimDiscovery.status}`);
568933
+ lines.push(` status=${discoveryRequiresEvidence ? ledger.claimDiscovery.status : "skipped"}`);
568934
+ lines.push(` evidence_bearing=${discoveryRequiresEvidence ? "true" : "false"}`);
568925
568935
  lines.push(` generated_at=${ledger.claimDiscovery.generatedAtIso}`);
568926
568936
  const requiredArtifactPaths = ledger.claimDiscovery.requiredArtifactPaths ?? ledger.claimDiscovery.candidatePaths;
568927
568937
  const exploratoryPaths = ledger.claimDiscovery.candidatePaths.filter((path16) => !requiredArtifactPaths.includes(path16));
568928
568938
  lines.push(` exploratory_paths=${exploratoryPaths.join(",") || "none"}`);
568929
568939
  lines.push(` required_artifact_paths=${requiredArtifactPaths.join(",") || "none"}`);
568930
- lines.push(` open_deltas=${ledger.claimDiscovery.openDeltas.map((delta) => `${delta.path} :: ${delta.reason}`).slice(0, 10).join(" | ") || "none"}`);
568931
- lines.push(` surviving_blockers=${ledger.claimDiscovery.survivingBlockers.join(" | ") || "none"}`);
568932
- lines.push(` unresolved_questions=${ledger.claimDiscovery.unresolvedQuestions.join(" | ") || "none"}`);
568940
+ lines.push(` open_deltas=${discoveryRequiresEvidence ? ledger.claimDiscovery.openDeltas.map((delta) => `${delta.path} :: ${delta.reason}`).slice(0, 10).join(" | ") || "none" : "none (advisory discovery)"}`);
568941
+ lines.push(` surviving_blockers=${discoveryRequiresEvidence ? ledger.claimDiscovery.survivingBlockers.join(" | ") || "none" : "none (advisory discovery)"}`);
568942
+ lines.push(` unresolved_questions=${discoveryRequiresEvidence ? ledger.claimDiscovery.unresolvedQuestions.join(" | ") || "none" : "none (advisory discovery)"}`);
568933
568943
  lines.push(` evidence_handles=${ledger.claimDiscovery.evidenceHandles.join(",") || "none"}`);
568934
568944
  lines.push(` resolved_evidence_handles=${ledger.claimDiscovery.resolvedEvidenceHandles.join(",") || "none"}`);
568935
568945
  }
@@ -594303,7 +594313,14 @@ command_receipts=${record.commandReceipts.length}
594303
594313
  }
594304
594314
  /** Set the working directory for session checkpointing */
594305
594315
  setWorkingDirectory(dir) {
594306
- this._workingDirectory = _pathResolve(dir);
594316
+ const next = _pathResolve(dir);
594317
+ if (next === this._workingDirectory)
594318
+ return;
594319
+ this._workingDirectory = next;
594320
+ if (this._completionLedger?.claimDiscovery) {
594321
+ const task = this._taskState.originalGoal || this._taskState.goal || this._completionLedger.claimDiscovery.request || this._completionLedger.goal;
594322
+ this._completionLedger = setClaimDiscoveryState(this._completionLedger, this._resolveClaimDiscoverySurvey(task, 0));
594323
+ }
594307
594324
  }
594308
594325
  authoritativeWorkingDirectory() {
594309
594326
  return _pathResolve(this._workingDirectory || process.cwd());
@@ -597747,10 +597764,13 @@ ${extras.join("\n")}`;
597747
597764
  return typeof p2 === "string" && p2.trim().length > 0 ? [p2.trim()] : [];
597748
597765
  }
597749
597766
  _isRealProjectMutation(toolName, result) {
597750
- if (!this._isProjectEditTool(toolName))
597751
- return false;
597752
597767
  if (!result || result.success === false)
597753
597768
  return false;
597769
+ if (toolName === "agent" || toolName === "sub_agent") {
597770
+ return result.mutated === true && (result.mutatedFiles?.length ?? 0) > 0;
597771
+ }
597772
+ if (!this._isProjectEditTool(toolName))
597773
+ return false;
597754
597774
  if (typeof result.mutated === "boolean")
597755
597775
  return result.mutated;
597756
597776
  if (result.dryRun || result.noop || result.partial)
@@ -597890,9 +597910,6 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
597890
597910
  metrics: input.result.completionEvidenceMetrics,
597891
597911
  receipt
597892
597912
  });
597893
- if (this._completionLedger?.claimDiscovery) {
597894
- this._refreshClaimDiscoveryStateFromEvidence();
597895
- }
597896
597913
  if (realFileMutation && realMutationPaths.length > 0) {
597897
597914
  for (const filePath of realMutationPaths) {
597898
597915
  this._completionLedger = recordCompletionEvidence(this._completionLedger, {
@@ -597907,6 +597924,9 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
597907
597924
  });
597908
597925
  }
597909
597926
  }
597927
+ if (this._completionLedger?.claimDiscovery) {
597928
+ this._refreshClaimDiscoveryStateFromEvidence();
597929
+ }
597910
597930
  if (this._completionLedger) {
597911
597931
  this._completionLedger = reconcileClaimsWithEvidence(this._completionLedger);
597912
597932
  }
@@ -597937,12 +597957,20 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
597937
597957
  _refreshClaimDiscoveryStateFromEvidence() {
597938
597958
  if (!this._completionLedger?.claimDiscovery)
597939
597959
  return;
597940
- const state = this._completionLedger.claimDiscovery;
597960
+ let state = this._completionLedger.claimDiscovery;
597961
+ const surveyHadNoFiles = (state.boundedInventory?.files.length ?? 0) === 0;
597962
+ const hasPathBoundEvidence = this._completionLedger.evidence.some((entry) => entry.success === true && evidenceTargetPaths(entry).length > 0);
597963
+ if (surveyHadNoFiles && hasPathBoundEvidence) {
597964
+ const refreshed = this._resolveClaimDiscoverySurvey(state.request || this._taskState.originalGoal || this._taskState.goal, 0);
597965
+ this._completionLedger = setClaimDiscoveryState(this._completionLedger, refreshed);
597966
+ state = this._completionLedger.claimDiscovery;
597967
+ }
597941
597968
  const legacyUnclassifiedCandidates = !Array.isArray(state.requiredArtifactPaths);
597942
597969
  const requiredArtifactPaths = legacyUnclassifiedCandidates ? [] : state.requiredArtifactPaths;
597943
597970
  const evidenceHandles = legacyUnclassifiedCandidates ? [] : state.evidenceHandles ?? [];
597944
- const survivingBlockers = state.survivingBlockers ?? [];
597945
- const unresolvedQuestions = state.unresolvedQuestions ?? [];
597971
+ const advisoryDiscovery = state.requiresEvidence !== true;
597972
+ const survivingBlockers = advisoryDiscovery ? [] : state.survivingBlockers ?? [];
597973
+ const unresolvedQuestions = advisoryDiscovery ? [] : state.unresolvedQuestions ?? [];
597946
597974
  const openDeltas = legacyUnclassifiedCandidates ? [] : state.openDeltas ?? [];
597947
597975
  const resolved = claimDiscoveryResolvedHandles(this._completionLedger, state);
597948
597976
  const unresolvedEvidence = evidenceHandles.filter((handle2) => !resolved.includes(handle2));
@@ -604099,7 +604127,7 @@ ${rawTask}`;
604099
604127
  * inference. Candidate grounding is deterministic from task + bounded inventory
604100
604128
  * signals only.
604101
604129
  */
604102
- async _resolveClaimDiscoverySurvey(task, turn) {
604130
+ _resolveClaimDiscoverySurvey(task, turn) {
604103
604131
  if (process.env["OMNIUS_FEATURE_SURVEY_GROUNDING"] === "0") {
604104
604132
  return claimDiscoveryStateFromSurvey({
604105
604133
  request: task,
@@ -604126,6 +604154,10 @@ ${rawTask}`;
604126
604154
  const maxDirs = Math.max(60, Math.min(1200, Number.parseInt(process.env["OMNIUS_CLAIM_DISCOVERY_MAX_DIRS"] || "300", 10) || 300));
604127
604155
  let boundedInventory = null;
604128
604156
  try {
604157
+ if (!_fsStatSync(root).isDirectory()) {
604158
+ throw new Error(`Workspace root is not a directory: ${root}`);
604159
+ }
604160
+ _fsReaddirSync(root);
604129
604161
  const workspace = scanWorkspace({ root, maxFiles, maxDirs });
604130
604162
  const files = workspace.files.slice(0, maxFiles).map((file) => ({
604131
604163
  path: file.rel,
@@ -776141,6 +776173,7 @@ function createCli(options2) {
776141
776173
  maxTurns: 0
776142
776174
  // 0 = unlimited; halt only on task_complete or abort
776143
776175
  });
776176
+ runner.setWorkingDirectory(options2.projectRoot);
776144
776177
  runner.onEvent((event) => {
776145
776178
  switch (event.type) {
776146
776179
  case "tool_call":
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.581",
3
+ "version": "1.0.582",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.581",
9
+ "version": "1.0.582",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.581",
3
+ "version": "1.0.582",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",