pinokiod 8.0.39 → 8.0.41

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 (37) hide show
  1. package/kernel/api/hf/index.js +2 -2
  2. package/kernel/api/index.js +12 -3
  3. package/kernel/connect/index.js +2 -2
  4. package/kernel/connect/providers/huggingface/index.js +14 -5
  5. package/kernel/index.js +14 -2
  6. package/kernel/shell.js +3 -2
  7. package/kernel/shells.js +6 -0
  8. package/kernel/vault/constants.js +13 -0
  9. package/kernel/vault/hash_worker.js +9 -2
  10. package/kernel/vault/index.js +1856 -316
  11. package/kernel/vault/registry.js +526 -52
  12. package/kernel/vault/snapshot.js +29 -0
  13. package/kernel/vault/sweeper.js +480 -210
  14. package/kernel/vault/walker.js +142 -0
  15. package/package.json +1 -1
  16. package/server/index.js +79 -90
  17. package/server/lib/privacy_filter_cache.js +4 -1
  18. package/server/public/storage-size.js +12 -0
  19. package/server/public/style.css +13 -0
  20. package/server/public/tab-link-popover.js +3 -0
  21. package/server/public/vault-nav.js +96 -0
  22. package/server/public/vault.css +1079 -0
  23. package/server/public/vault.js +1835 -0
  24. package/server/views/app.ejs +93 -16
  25. package/server/views/connect/huggingface.ejs +7 -9
  26. package/server/views/partials/main_sidebar.ejs +6 -1
  27. package/server/views/partials/vault_workspace.ejs +55 -0
  28. package/server/views/vault.ejs +5 -1532
  29. package/server/views/vault_app.ejs +22 -0
  30. package/test/hf-api.test.js +4 -2
  31. package/test/huggingface-connect.test.js +7 -11
  32. package/test/huggingface-token-validity.test.js +135 -0
  33. package/test/plugin-action-functions.test.js +19 -0
  34. package/test/privacy-filter-cache.test.js +1 -0
  35. package/test/vault-engine.test.js +1276 -26
  36. package/test/vault-sweep.test.js +1043 -35
  37. package/test/vault-ui.test.js +2184 -65
@@ -0,0 +1,29 @@
1
+ const fileSnapshot = (st) => ({
2
+ dev: st.dev,
3
+ ino: st.ino,
4
+ size: st.size,
5
+ mtime: st.mtimeMs,
6
+ ctime: st.ctimeMs
7
+ })
8
+
9
+ const sameSnapshot = (snapshot, st) => !!(
10
+ snapshot && st &&
11
+ snapshot.dev === st.dev &&
12
+ snapshot.ino === st.ino &&
13
+ snapshot.size === st.size &&
14
+ snapshot.mtime === st.mtimeMs &&
15
+ snapshot.ctime === st.ctimeMs
16
+ )
17
+
18
+ // Adding or removing a hardlink legitimately changes ctime without changing
19
+ // the file identity or bytes. Use this only across Vault's own link updates;
20
+ // hashing and externally visible mutations still require sameSnapshot().
21
+ const sameContentState = (snapshot, st) => !!(
22
+ snapshot && st &&
23
+ snapshot.dev === st.dev &&
24
+ snapshot.ino === st.ino &&
25
+ snapshot.size === st.size &&
26
+ snapshot.mtime === st.mtimeMs
27
+ )
28
+
29
+ module.exports = { fileSnapshot, sameSnapshot, sameContentState }