omnius 1.0.953 → 1.0.955

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 (45) hide show
  1. package/dist/_types/execution/native-file-write-observation.d.ts +19 -0
  2. package/dist/_types/execution/native-memory-view-provider.d.ts +84 -0
  3. package/dist/_types/execution/shell-runs.d.ts +4 -0
  4. package/dist/_types/execution/tool-output-spool.d.ts +61 -0
  5. package/dist/_types/execution/tools/file-write.d.ts +53 -0
  6. package/dist/_types/execution/types.d.ts +34 -0
  7. package/dist/_types/execution/work-mode-capability.d.ts +23 -0
  8. package/dist/_types/memory/candidateCoverage.d.ts +23 -0
  9. package/dist/_types/memory/embeddings.d.ts +1 -1
  10. package/dist/_types/memory/memoryCapability.d.ts +259 -0
  11. package/dist/_types/memory/memorySourceResolver.d.ts +131 -0
  12. package/dist/_types/memory/memoryTypes.d.ts +16 -0
  13. package/dist/_types/memory/structuredMemoryStore.d.ts +63 -6
  14. package/dist/_types/memory/unifiedMemoryStore.d.ts +12 -1
  15. package/dist/_types/orchestrator/agenticRunner.d.ts +236 -48
  16. package/dist/_types/orchestrator/authored-instruction-context.d.ts +59 -0
  17. package/dist/_types/orchestrator/authored-instruction-revisions.d.ts +56 -0
  18. package/dist/_types/orchestrator/authored-instruction-sources.d.ts +60 -0
  19. package/dist/_types/orchestrator/auxiliary-context-operation.d.ts +196 -0
  20. package/dist/_types/orchestrator/brokered-tool-composition.d.ts +141 -0
  21. package/dist/_types/orchestrator/completionReadiness.d.ts +2 -2
  22. package/dist/_types/orchestrator/confined-composition-worker.d.ts +45 -0
  23. package/dist/_types/orchestrator/contentAddressedArtifactStore.d.ts +173 -0
  24. package/dist/_types/orchestrator/contextWindowDump.d.ts +4 -0
  25. package/dist/_types/orchestrator/explicit-work-mode.d.ts +92 -0
  26. package/dist/_types/orchestrator/interruption-lifecycle.d.ts +3 -0
  27. package/dist/_types/orchestrator/memory-capability-context.d.ts +49 -0
  28. package/dist/_types/orchestrator/owned-inference-wait.d.ts +123 -0
  29. package/dist/_types/orchestrator/owned-model-wait.d.ts +26 -0
  30. package/dist/_types/orchestrator/provider-context-contract.d.ts +78 -0
  31. package/dist/_types/orchestrator/request-tool-capabilities.d.ts +52 -0
  32. package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +20 -0
  33. package/dist/_types/orchestrator/structuredMemoryInference.d.ts +12 -0
  34. package/dist/_types/orchestrator/successful-procedure-memory.d.ts +35 -0
  35. package/dist/api/py-embed.js +70 -17
  36. package/dist/index.js +2 -2
  37. package/dist/library.js +115267 -108004
  38. package/dist/memory-maintenance-worker.js +486 -81
  39. package/dist/omni-setup-worker.js +83 -30
  40. package/dist/tui/native/worker.js +3 -1
  41. package/dist/update-worker-runtime.js +270 -126
  42. package/docs/DISCOVERY.json +63 -0
  43. package/docs/DISCOVERY.md +1 -0
  44. package/npm-shrinkwrap.json +2 -2
  45. package/package.json +1 -1
@@ -81000,13 +81000,13 @@ ${lanes.join("\n")}
81000
81000
  if (!headMessage2 && maybeSuppress) {
81001
81001
  const savedErrorState = captureErrorCalculationState();
81002
81002
  reportRelationError(headMessage2, source2, target2);
81003
- let canonical;
81003
+ let canonical2;
81004
81004
  if (errorInfo && errorInfo !== savedErrorState.errorInfo) {
81005
- canonical = { code: errorInfo.code, messageText: errorInfo.messageText };
81005
+ canonical2 = { code: errorInfo.code, messageText: errorInfo.messageText };
81006
81006
  }
81007
81007
  resetErrorInfo(savedErrorState);
81008
- if (canonical && errorInfo) {
81009
- errorInfo.canonicalHead = canonical;
81008
+ if (canonical2 && errorInfo) {
81009
+ errorInfo.canonicalHead = canonical2;
81010
81010
  }
81011
81011
  lastSkippedInfo = [source2, target2];
81012
81012
  return;
@@ -247997,7 +247997,7 @@ import {
247997
247997
  ftruncateSync
247998
247998
  } from "node:fs";
247999
247999
  import { lstat, mkdir, open, readFile, rename, unlink } from "node:fs/promises";
248000
- import { createHash as createHash3, randomUUID as randomUUID3 } from "node:crypto";
248000
+ import { createHash as createHash4, randomUUID as randomUUID4 } from "node:crypto";
248001
248001
  import { dirname as dirname7, isAbsolute as isAbsolute5, join as join13, resolve as resolve10 } from "node:path";
248002
248002
  function loopbackOllama(value) {
248003
248003
  if (typeof value !== "string") return void 0;
@@ -248235,7 +248235,7 @@ async function rejectLinkedDirectory(path3) {
248235
248235
  }
248236
248236
  async function atomic(path3, content, mode = 384) {
248237
248237
  await optionalFile(path3);
248238
- const temp = `${path3}.${randomUUID3()}.tmp`, handle = await open(
248238
+ const temp = `${path3}.${randomUUID4()}.tmp`, handle = await open(
248239
248239
  temp,
248240
248240
  constants3.O_CREAT | constants3.O_EXCL | constants3.O_WRONLY | constants3.O_NOFOLLOW,
248241
248241
  mode
@@ -249366,7 +249366,7 @@ var init_omni_setup_runtime = __esm({
249366
249366
  };
249367
249367
  BROKER_PROTOCOL = "ollama-unify-gpu-lease/v1";
249368
249368
  safeSummary = (value, max = 240) => typeof value === "string" ? value.replace(/[\x00-\x1f\x7f]/g, " ").slice(0, max) : "unknown";
249369
- hash = (value) => createHash3("sha256").update(value).digest("hex");
249369
+ hash = (value) => createHash4("sha256").update(value).digest("hex");
249370
249370
  object = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
249371
249371
  abortError = () => new DOMException(
249372
249372
  "Omni setup cancelled after owned work settled",
@@ -249376,7 +249376,7 @@ var init_omni_setup_runtime = __esm({
249376
249376
  });
249377
249377
 
249378
249378
  // packages/cli/src/omni-setup.ts
249379
- import { createHash as createHash4, randomUUID as randomUUID4 } from "node:crypto";
249379
+ import { createHash as createHash5, randomUUID as randomUUID5 } from "node:crypto";
249380
249380
  import { constants as constants4, closeSync as closeSync3, existsSync as existsSync4, fstatSync as fstatSync2, fsyncSync as fsyncSync2, lstatSync as lstatSync4, mkdirSync as mkdirSync4, openSync as openSync3, readFileSync as readFileSync5, readSync as readSync2, renameSync as renameSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync2 } from "node:fs";
249381
249381
  import { dirname as dirname8, join as join14, resolve as resolve11 } from "node:path";
249382
249382
 
@@ -250345,6 +250345,9 @@ var runContextStorage = new AsyncLocalStorage2();
250345
250345
  // packages/execution/dist/index.js
250346
250346
  init_network_egress_policy();
250347
250347
 
250348
+ // packages/execution/dist/tool-output-spool.js
250349
+ var TOOL_OUTPUT_LIMITS = Object.freeze({ perProcessBytes: 16 * 1024 * 1024, workspaceBytes: 256 * 1024 * 1024, pageBytes: 65536, entries: 4096 });
250350
+
250348
250351
  // packages/execution/dist/shell-run-control.js
250349
250352
  init_process_lifecycle();
250350
250353
  init_process_kill();
@@ -250356,6 +250359,18 @@ init_process_lifecycle();
250356
250359
  // packages/execution/dist/tools/desktop-control.js
250357
250360
  init_system_deps();
250358
250361
 
250362
+ // packages/execution/dist/tools/change-log.js
250363
+ import { randomBytes } from "node:crypto";
250364
+ var _sessionId = `session-${Date.now()}-${randomBytes(3).toString("hex")}`;
250365
+
250366
+ // packages/execution/dist/tools/text-encoding.js
250367
+ import { TextDecoder as TextDecoder2 } from "node:util";
250368
+ var UTF8_DECODER = new TextDecoder2("utf-8", { fatal: true });
250369
+
250370
+ // packages/execution/dist/tools/file-mutation.js
250371
+ import { TextDecoder as TextDecoder3 } from "node:util";
250372
+ var utf8 = new TextDecoder3("utf-8", { fatal: true, ignoreBOM: true });
250373
+
250359
250374
  // packages/execution/dist/tools/archive-extract.js
250360
250375
  init_process_async();
250361
250376
  var EXTRACT = String.raw`
@@ -250495,18 +250510,6 @@ except BaseException as error:
250495
250510
  sys.exit(1)
250496
250511
  `;
250497
250512
 
250498
- // packages/execution/dist/tools/change-log.js
250499
- import { randomBytes } from "node:crypto";
250500
- var _sessionId = `session-${Date.now()}-${randomBytes(3).toString("hex")}`;
250501
-
250502
- // packages/execution/dist/tools/text-encoding.js
250503
- import { TextDecoder as TextDecoder2 } from "node:util";
250504
- var UTF8_DECODER = new TextDecoder2("utf-8", { fatal: true });
250505
-
250506
- // packages/execution/dist/tools/file-mutation.js
250507
- import { TextDecoder as TextDecoder3 } from "node:util";
250508
- var utf8 = new TextDecoder3("utf-8", { fatal: true, ignoreBOM: true });
250509
-
250510
250513
  // packages/execution/dist/tools/grep-search.js
250511
250514
  import { execFile as execFile2 } from "node:child_process";
250512
250515
  import { promisify as promisify2 } from "node:util";
@@ -298501,6 +298504,57 @@ except Exception as exc:
298501
298504
  sys.exit(1)
298502
298505
  `;
298503
298506
 
298507
+ // packages/memory/dist/memoryCapability.js
298508
+ import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
298509
+ var MEMORY_NAMESPACES = Object.freeze({
298510
+ projectUnified: "project_unified_memory",
298511
+ projectLegacy: "project_legacy_memory",
298512
+ telegramChat: "telegram_chat",
298513
+ task: "task_evidence",
298514
+ structured: "structured_records",
298515
+ folds: "context_folds",
298516
+ procedures: "successful_procedures"
298517
+ });
298518
+ var MEMORY_CONTRACT_LIMITS = Object.freeze({
298519
+ scopes: 64,
298520
+ scopeIds: 256,
298521
+ matches: 100,
298522
+ branches: 16,
298523
+ stages: 64,
298524
+ sourceRefs: 512,
298525
+ spans: 128,
298526
+ parents: 128,
298527
+ textChars: 65536,
298528
+ fieldChars: 512,
298529
+ routes: 32,
298530
+ traceBytes: 262144
298531
+ });
298532
+ var MemoryContractError = class extends Error {
298533
+ code;
298534
+ constructor(code) {
298535
+ super(`Memory contract: ${code}`);
298536
+ this.code = code;
298537
+ this.name = "MemoryContractError";
298538
+ }
298539
+ };
298540
+ var record = (x) => !!x && typeof x === "object" && !Array.isArray(x);
298541
+ function canonical(value, depth = 0) {
298542
+ if (depth > 32)
298543
+ throw new MemoryContractError("value_depth_exceeded");
298544
+ if (value === null || typeof value === "string" || typeof value === "boolean")
298545
+ return JSON.stringify(value);
298546
+ if (typeof value === "number" && Number.isFinite(value))
298547
+ return JSON.stringify(value);
298548
+ if (Array.isArray(value))
298549
+ return `[${value.map((v) => canonical(v, depth + 1)).join(",")}]`;
298550
+ if (record(value) && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null))
298551
+ return `{${Object.keys(value).filter((k) => value[k] !== void 0).sort().map((k) => `${JSON.stringify(k)}:${canonical(value[k], depth + 1)}`).join(",")}}`;
298552
+ throw new MemoryContractError("non_json_value");
298553
+ }
298554
+ var memoryContentHash = (value) => createHash2("sha256").update(value).digest("hex");
298555
+ var stableMemoryHash = (value) => memoryContentHash(canonical(value));
298556
+ var UNBOUND = stableMemoryHash({ memoryBinding: "unavailable" });
298557
+
298504
298558
  // packages/memory/dist/virtualMemory.js
298505
298559
  var DEFAULT_CAPACITIES = {
298506
298560
  L0: 8e3,
@@ -299493,7 +299547,6 @@ var CONSTANTS = {
299493
299547
  };
299494
299548
 
299495
299549
  // packages/execution/dist/tools/repl.js
299496
- init_process_kill();
299497
299550
  init_process_lifecycle();
299498
299551
 
299499
299552
  // packages/execution/dist/index.js
@@ -300352,7 +300405,7 @@ var execFileAsync2 = promisify3(execFile3);
300352
300405
  import { constants as constants2, closeSync, existsSync, fchmodSync, fstatSync, fsyncSync, lstatSync as lstatSync2, mkdirSync as mkdirSync2, openSync, readFileSync, readSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
300353
300406
  import { homedir as homedir5 } from "node:os";
300354
300407
  import { dirname as dirname3, join as join4, resolve as resolve3 } from "node:path";
300355
- import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
300408
+ import { createHash as createHash3, randomUUID as randomUUID3 } from "node:crypto";
300356
300409
  function omniConfigurationPath() {
300357
300410
  return join4(process.env["OMNIUS_CONFIG_HOME"] ?? homedir5(), ".omnius", "omni-analysis.json");
300358
300411
  }
@@ -300414,7 +300467,7 @@ function readSavedOmniConfiguration(path3 = omniConfigurationPath()) {
300414
300467
  }
300415
300468
  }
300416
300469
  function omniConfigurationRevision(path3 = omniConfigurationPath()) {
300417
- return createHash2("sha256").update(privateFile(path3) ?? "absent").digest("hex");
300470
+ return createHash3("sha256").update(privateFile(path3) ?? "absent").digest("hex");
300418
300471
  }
300419
300472
  var INCOMPLETE_LOCK_GRACE_MS = 3e4;
300420
300473
  var UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i;
@@ -300435,7 +300488,7 @@ function ownerRecord() {
300435
300488
  } catch {
300436
300489
  }
300437
300490
  }
300438
- return { version: 1, pid: process.pid, processStart: identity2?.start ?? null, bootId: identity2?.bootId ?? null, nonce: randomUUID2(), createdAt: Date.now() };
300491
+ return { version: 1, pid: process.pid, processStart: identity2?.start ?? null, bootId: identity2?.bootId ?? null, nonce: randomUUID3(), createdAt: Date.now() };
300439
300492
  }
300440
300493
  function parseOwner(text3) {
300441
300494
  try {
@@ -300504,11 +300557,11 @@ function writeLock(path3) {
300504
300557
  }
300505
300558
  return { owned, release };
300506
300559
  }
300507
- function recoverable(record) {
300508
- const owner = parseOwner(record.text);
300560
+ function recoverable(record2) {
300561
+ const owner = parseOwner(record2.text);
300509
300562
  if (owner)
300510
300563
  return ownerState(owner) === "dead";
300511
- return Date.now() - Math.max(record.stat.mtimeMs, record.stat.ctimeMs) >= INCOMPLETE_LOCK_GRACE_MS;
300564
+ return Date.now() - Math.max(record2.stat.mtimeMs, record2.stat.ctimeMs) >= INCOMPLETE_LOCK_GRACE_MS;
300512
300565
  }
300513
300566
  function recoverLock(path3) {
300514
300567
  const initial = privateRead(path3, 4096);
@@ -300601,7 +300654,7 @@ function saveOmniConfiguration(value, expectedRevision, path3 = omniConfiguratio
300601
300654
  mkdirSync2(parent, { recursive: true, mode: 448 });
300602
300655
  privateDirectory(parent);
300603
300656
  return withConfigurationLock(path3, () => {
300604
- const temporary = path3 + "." + randomUUID2() + ".tmp";
300657
+ const temporary = path3 + "." + randomUUID3() + ".tmp";
300605
300658
  try {
300606
300659
  if (omniConfigurationRevision(path3) !== expectedRevision)
300607
300660
  throw new Error("Omni configuration changed; refresh before saving.");
@@ -302376,7 +302429,7 @@ function read(path3) {
302376
302429
  function save(path3, value) {
302377
302430
  directory(dirname8(path3), true);
302378
302431
  if (existsSync4(path3)) read(path3);
302379
- const temporary = path3 + "." + randomUUID4() + ".tmp";
302432
+ const temporary = path3 + "." + randomUUID5() + ".tmp";
302380
302433
  try {
302381
302434
  const fd = openSync3(temporary, "wx", 384);
302382
302435
  try {
@@ -302401,7 +302454,7 @@ function sameOwner(a, b) {
302401
302454
  }
302402
302455
  function withAdmission(root, mutation) {
302403
302456
  const path3 = join14(root, "admission.lock");
302404
- const owner = { pid: process.pid, start: identity(process.pid), token: randomUUID4() };
302457
+ const owner = { pid: process.pid, start: identity(process.pid), token: randomUUID5() };
302405
302458
  let fd;
302406
302459
  try {
302407
302460
  fd = openSync3(path3, constants4.O_WRONLY | constants4.O_CREAT | constants4.O_EXCL | constants4.O_NOFOLLOW, 384);
@@ -6309,6 +6309,7 @@ var InstrumentRail = class extends BoxRenderable9 {
6309
6309
 
6310
6310
  // packages/cli/src/tui/command-registry.ts
6311
6311
  var COMMAND_SIGNATURES = [
6312
+ ["/workmode plan [--artifact exact/path] | implement | default | status", "Select explicit native work permissions without automatic planning choreography"],
6312
6313
  ["/nol <action> [args]", "Control explicit project research experiments (local operator only)"],
6313
6314
  ["/enhance <prompt>", "Enhance a prompt into the input editor"],
6314
6315
  ["/model", "Select from available models"],
@@ -7144,6 +7145,7 @@ var ALIASES = {
7144
7145
  platforms: ["gateway"]
7145
7146
  };
7146
7147
  var USER_ONLY = /* @__PURE__ */ new Set([
7148
+ "workmode",
7147
7149
  "nol",
7148
7150
  "enhance",
7149
7151
  "provider",
@@ -7322,7 +7324,7 @@ var REST_BLOCKED = /* @__PURE__ */ new Set([
7322
7324
  "paste",
7323
7325
  "indicator"
7324
7326
  ]);
7325
- var LOCAL_TUI_ONLY = /* @__PURE__ */ new Set(["indicator", "compacted", "gpu", "memory", "provider", "enhance", "nol"]);
7327
+ var LOCAL_TUI_ONLY = /* @__PURE__ */ new Set(["indicator", "compacted", "gpu", "memory", "provider", "enhance", "nol", "workmode"]);
7326
7328
  var CANONICAL_BY_ALIAS = /* @__PURE__ */ new Map();
7327
7329
  for (const [canonical, aliases2] of Object.entries(ALIASES)) {
7328
7330
  for (const alias of aliases2) CANONICAL_BY_ALIAS.set(alias, canonical);