omnius 1.0.901 → 1.0.902

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
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/index.js
3
- size: 39011177 bytes
4
- sha256: aa20c94ffd6dd5b7c4c05db62ec87494608e39d47960e9a4fdd5b6de4562b427
3
+ size: 39011350 bytes
4
+ sha256: 89a6b1e6bf79eb8c8c8b361e3cb9de84e37135b11069729bd896d508308decdc
@@ -303961,22 +303961,31 @@ function withUpdateOwnership(paths, mutation) {
303961
303961
  closeSync4(fd);
303962
303962
  throw error;
303963
303963
  }
303964
- const owned = () => {
303964
+ const created = () => {
303965
303965
  try {
303966
303966
  const current = lstatSync2(path3);
303967
- return current.ino === original.ino && current.dev === original.dev && privateRecord(path3)?.nonce === nonce;
303967
+ return current.ino === original.ino && current.dev === original.dev;
303968
+ } catch {
303969
+ return false;
303970
+ }
303971
+ };
303972
+ const owned = () => {
303973
+ try {
303974
+ return created() && privateRecord(path3)?.nonce === nonce;
303968
303975
  } catch {
303969
303976
  return false;
303970
303977
  }
303971
303978
  };
303979
+ let recorded = false;
303972
303980
  try {
303973
303981
  writeFileSync6(fd, JSON.stringify({ pid: process.pid, process_identity: processIdentity2(process.pid), nonce }));
303974
303982
  fsyncSync2(fd);
303983
+ recorded = true;
303975
303984
  if (!owned()) throw new Error("Update ownership guard changed before the transaction");
303976
303985
  return mutation();
303977
303986
  } finally {
303978
303987
  try {
303979
- if (owned()) unlinkSync4(path3);
303988
+ if (recorded ? owned() : created()) unlinkSync4(path3);
303980
303989
  } finally {
303981
303990
  closeSync4(fd);
303982
303991
  }
@@ -182,22 +182,31 @@ function withUpdateOwnership(paths, mutation) {
182
182
  closeSync(fd);
183
183
  throw error;
184
184
  }
185
- const owned = () => {
185
+ const created = () => {
186
186
  try {
187
187
  const current = lstatSync(path);
188
- return current.ino === original.ino && current.dev === original.dev && privateRecord(path)?.nonce === nonce;
188
+ return current.ino === original.ino && current.dev === original.dev;
189
+ } catch {
190
+ return false;
191
+ }
192
+ };
193
+ const owned = () => {
194
+ try {
195
+ return created() && privateRecord(path)?.nonce === nonce;
189
196
  } catch {
190
197
  return false;
191
198
  }
192
199
  };
200
+ let recorded = false;
193
201
  try {
194
202
  writeFileSync(fd, JSON.stringify({ pid: process.pid, process_identity: processIdentity(process.pid), nonce }));
195
203
  fsyncSync(fd);
204
+ recorded = true;
196
205
  if (!owned()) throw new Error("Update ownership guard changed before the transaction");
197
206
  return mutation();
198
207
  } finally {
199
208
  try {
200
- if (owned()) unlinkSync(path);
209
+ if (recorded ? owned() : created()) unlinkSync(path);
201
210
  } finally {
202
211
  closeSync(fd);
203
212
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.901",
3
+ "version": "1.0.902",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.901",
9
+ "version": "1.0.902",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
@@ -9791,9 +9791,9 @@
9791
9791
  }
9792
9792
  },
9793
9793
  "node_modules/strtok3": {
9794
- "version": "10.6.2",
9795
- "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.6.2.tgz",
9796
- "integrity": "sha512-BkdixFFUt7r7LsX6aGNPVyYMLjW+M1USLlKPNbZsrZEmLFh5tGqhdfckKo6xgsZIJqdDD0CZGkeCJJwNWQIKQA==",
9794
+ "version": "10.6.3",
9795
+ "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.6.3.tgz",
9796
+ "integrity": "sha512-MD8mENgyXMr2mDaDfzP3RWYDSyYQxIIou7HhCiCJiBekrsoDtUG0id3vYnjDfY9ndOEbazFXe13Qw6u/1AB8ew==",
9797
9797
  "license": "MIT",
9798
9798
  "dependencies": {
9799
9799
  "@tokenizer/token": "^0.3.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.901",
3
+ "version": "1.0.902",
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/library.js",