omnius 1.0.991 → 1.0.992

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 (54) hide show
  1. package/.aiwg/addons/omnius-docs/README.md +3 -0
  2. package/.aiwg/addons/omnius-docs/skills/omnius-task-graph/SKILL.md +42 -0
  3. package/dist/_types/execution/native-memory-view-provider.d.ts +5 -1
  4. package/dist/_types/execution/nol/worker-assets.d.ts +2 -0
  5. package/dist/_types/memory/immutableEvidenceStore.d.ts +4 -1
  6. package/dist/_types/memory/memoryCapability.d.ts +2 -0
  7. package/dist/_types/memory/structuredMemoryStore.d.ts +3 -1
  8. package/dist/_types/orchestrator/agenticRunner.d.ts +25 -11
  9. package/dist/_types/orchestrator/completionFinalization.d.ts +19 -1
  10. package/dist/_types/orchestrator/contentAddressedArtifactStore.d.ts +1 -4
  11. package/dist/_types/orchestrator/historicalToolObservation.d.ts +36 -0
  12. package/dist/_types/orchestrator/interruption-lifecycle.d.ts +3 -0
  13. package/dist/_types/orchestrator/native-provider-delivery.d.ts +3 -0
  14. package/dist/_types/orchestrator/semanticVerification.d.ts +8 -1
  15. package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +1 -0
  16. package/dist/_types/orchestrator/successful-procedure-memory.d.ts +7 -0
  17. package/dist/_types/orchestrator/task-recall-review-evidence.d.ts +37 -0
  18. package/dist/_types/orchestrator/taskRequirementReview.d.ts +3 -0
  19. package/dist/_types/orchestrator/taskSemanticAdmission.d.ts +9 -0
  20. package/dist/_types/orchestrator/taskWorkPlan.d.ts +4 -1
  21. package/dist/api/py-embed.js +3 -0
  22. package/dist/assets/nol-task-memory-promotion-worker.py +240 -0
  23. package/dist/index.js +2 -2
  24. package/dist/library.d.ts +1 -0
  25. package/dist/library.js +22592 -20124
  26. package/dist/memory-maintenance-worker.js +4255 -4252
  27. package/dist/nol/task-memory-promotion.d.ts +240 -0
  28. package/dist/omni-setup-worker.js +3 -0
  29. package/dist/postinstall-daemon.cjs +3 -0
  30. package/dist/preinstall.cjs +5 -0
  31. package/dist/tui/native/worker.js +40 -1
  32. package/dist/update-worker-runtime.js +24374 -8901
  33. package/dist/update-worker.js +35 -9
  34. package/docs/DISCOVERY.json +637 -1
  35. package/docs/DISCOVERY.md +16 -0
  36. package/docs/guides/system-tray.md +6 -0
  37. package/docs/reference/slash-commands.md +59 -2
  38. package/docs/reference/task-observability.md +27 -0
  39. package/docs/work-orders/WO-behavioral-memory-graph-20261123.md +122 -0
  40. package/docs/work-orders/WO-native-agent-collaboration-20261124.md +96 -0
  41. package/docs/work-orders/WO-telegram-admin-command-and-artifact-20261124.md +117 -0
  42. package/docs/work-orders/WO-telegram-ellipsis-and-stale-release-20261124.md +129 -0
  43. package/docs/work-orders/WO-telegram-live-worker-view-20261124.md +114 -0
  44. package/docs/work-orders/WO-telegram-long-horizon-continuity-20261123.md +43 -0
  45. package/docs/work-orders/WO-telegram-model-source-and-broker-capacity-20261124.md +68 -0
  46. package/docs/work-orders/WO-update-publish-provenance-20261125.md +79 -0
  47. package/docs/work-orders/WO-verified-update-transaction-20261124.md +46 -0
  48. package/docs/work-orders/human-memory-task-recall/README.md +57 -0
  49. package/docs/work-orders/human-memory-task-recall/WO-01-task-board.md +320 -0
  50. package/docs/work-orders/human-memory-task-recall/WO-02-consolidation.md +95 -0
  51. package/docs/work-orders/human-memory-task-recall/WO-03-promotion.md +226 -0
  52. package/docs/work-orders/human-memory-task-recall/WO-04-qualification.md +580 -0
  53. package/npm-shrinkwrap.json +2 -2
  54. package/package.json +8 -3
@@ -303,16 +303,23 @@ function releaseMatchingUpdateLock(paths, operationId, pid) {
303
303
  function atomicPrivateJson(path, value) {
304
304
  const temp = `${path}.${process.pid}.${randomUUID()}.tmp`;
305
305
  try {
306
- writeFileSync(temp, `${JSON.stringify(value, null, 2)}
307
- `, {
308
- encoding: "utf8",
309
- mode: 384,
310
- flag: "wx"
311
- });
312
- renameSync(temp, path);
306
+ const fd = openSync(temp, "wx", 384);
313
307
  try {
314
- chmodSync(path, 384);
315
- } catch {
308
+ if (process.platform !== "win32") fchmodSync(fd, 384);
309
+ writeFileSync(fd, `${JSON.stringify(value, null, 2)}
310
+ `, "utf8");
311
+ fsyncSync(fd);
312
+ } finally {
313
+ closeSync(fd);
314
+ }
315
+ renameSync(temp, path);
316
+ if (process.platform !== "win32") {
317
+ const directory = openSync(dirname(path), constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);
318
+ try {
319
+ fsyncSync(directory);
320
+ } finally {
321
+ closeSync(directory);
322
+ }
316
323
  }
317
324
  } finally {
318
325
  try {
@@ -321,6 +328,17 @@ function atomicPrivateJson(path, value) {
321
328
  }
322
329
  }
323
330
  }
331
+ function archiveUpdateAttempt(state, paths) {
332
+ if (state.status === "running" || !/^[A-Za-z0-9_-]{1,128}$/.test(state.operation_id)) return;
333
+ const directory = join(paths.stateDir, "attempts");
334
+ mkdirSync(directory, { recursive: true, mode: 448 });
335
+ const metadata = lstatSync(directory);
336
+ if (!metadata.isDirectory() || metadata.isSymbolicLink() || process.platform !== "win32" && (metadata.uid !== process.getuid?.() || (metadata.mode & 63) !== 0)) {
337
+ throw new Error("Update attempt history requires an owner-only directory.");
338
+ }
339
+ const { automatic_handoff_token: _handoff, cancel_token_hash: _cancel, ...record } = state;
340
+ atomicPrivateJson(join(directory, `${state.operation_id}.json`), record);
341
+ }
324
342
  function readUpdateState(paths = resolveUpdatePaths()) {
325
343
  try {
326
344
  return JSON.parse(readFileSync(paths.stateFile, "utf8"));
@@ -331,6 +349,14 @@ function readUpdateState(paths = resolveUpdatePaths()) {
331
349
  function writeUpdateState(state, paths = resolveUpdatePaths()) {
332
350
  ensurePrivateDirectories(paths);
333
351
  atomicPrivateJson(paths.stateFile, state);
352
+ if (state.status !== "running") {
353
+ try {
354
+ archiveUpdateAttempt(state, paths);
355
+ } catch (error) {
356
+ process.stderr.write(`[omnius update ${state.operation_id}] Could not archive terminal receipt: ${sanitizeUpdateDiagnostic(String(error))}
357
+ `);
358
+ }
359
+ }
334
360
  }
335
361
  function isPidAlive(pid) {
336
362
  if (!pid || !Number.isInteger(pid) || pid <= 0) return false;