{"_id":"@allourthings/core","_rev":"6-552a3d1d1c1a2ae8853b4adc5d247db5","name":"@allourthings/core","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@allourthings/core","version":"0.1.0","license":"MIT","_id":"@allourthings/core@0.1.0","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"homepage":"https://github.com/matt-harding/allourthings-core#readme","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"dist":{"shasum":"0299809c18a07cee8ed03c23db1114ea08cf069c","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-0.1.0.tgz","fileCount":9,"integrity":"sha512-SmnO1GwDnnQ+waDT5MVcKE51b9U1ewiEK8TIHbvGDBPCvbws1cOqAU3Q82vzSx29A2HJvytYX4wyFqgZGdeJcw==","signatures":[{"sig":"MEUCICvXvvpm2Nmdnib/NCx27rtgKlQKR2pLLUHBJZtGDu3DAiEA2qKBaqHDHNuxJa0AL1upz86gZvCsFzfugKLthV8PX7g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3523642},"main":"index.js","napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","gitHead":"7f4b300770a5e2d857089ad4170215b6194ab186","scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"repository":{"url":"git+https://github.com/matt-harding/allourthings-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Native storage core for All Our Things","directories":{},"_nodeVersion":"20.20.1","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1774805599326_0.7638734311235609","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@allourthings/core","version":"0.1.9","license":"MIT","_id":"@allourthings/core@0.1.9","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"homepage":"https://github.com/matt-harding/allourthings-core#readme","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"dist":{"shasum":"79921901525c1d3be45fd6b23d61b1a5dabfe5d2","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-0.1.9.tgz","fileCount":9,"integrity":"sha512-jODBpsaikRM4mGTrbw3px+hBBiqV8YdLaAtLtmSWuFL1q0raaimepj0NzyiTtfXhgpaJzy2nyJBt1NpbtoyH5w==","signatures":[{"sig":"MEUCIQDZi/7HDUc9Ul9lblS6V9EAOO3LthVB8e5UznUESjq4sgIgeryrqvShJ/vxISSj9+VAGmPScN9yxjv4WUBPDN1tUag=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3524775},"main":"index.js","napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","gitHead":"60581eacc402c0f12496849430701025874ffe02","scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"repository":{"url":"git+https://github.com/matt-harding/allourthings-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Native storage core for All Our Things","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.9_1775298058868_0.908859319636198","host":"s3://npm-registry-packages-npm-production"}},"0.1.10":{"name":"@allourthings/core","version":"0.1.10","license":"MIT","_id":"@allourthings/core@0.1.10","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"homepage":"https://github.com/matt-harding/allourthings-core#readme","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"dist":{"shasum":"975c57153e7358511bffef9b858bb79a4482a046","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-0.1.10.tgz","fileCount":9,"integrity":"sha512-AKT/qrqlc/wMkDnEfe5UQXnOYA1XeytbU9Sh90PeFUuIdutzgONGR3+3abKPFbE1NwQLF/fMKl2ENg+tq4gBCw==","signatures":[{"sig":"MEUCID7/2oBmO6eVktSzwSf+uODHVV0eIiyLXqGlK+TsigxJAiEAhAtWd5Pk2WGhg1sXCJbuEAYOAcTRun8GEQxz2VvXrvU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3654720},"main":"index.js","napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","gitHead":"1eff7ff31d63f10ccb63e60acd37bc1286d98f11","scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"repository":{"url":"git+https://github.com/matt-harding/allourthings-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Native storage core for All Our Things","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.10_1775470016683_0.5827185451990584","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@allourthings/core","version":"0.1.11","license":"MIT","_id":"@allourthings/core@0.1.11","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"homepage":"https://github.com/matt-harding/allourthings-core#readme","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"dist":{"shasum":"f961cc6d99e8060e3cbb13e2c66fec168d732716","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-0.1.11.tgz","fileCount":9,"integrity":"sha512-81jrGDcsWn84sOCaTBhPyTFe0dhgrdMDsmYC5ByZYM7lro/Cx7hTiuJ+vfj9BxyUepXBPk2c8ySjQyUgAocvww==","signatures":[{"sig":"MEUCIEJ7qBcq/xjmhCwvFGQa+Y9tdBWBXZPo91f8mDFD3ty9AiEAh5YH2O+xs9RVfStF6O404KxUPYg8hDNxCS1t1mMfTP0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3788103},"main":"index.js","napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","gitHead":"4c15e5a1f6366bc9f630579287dfb8294d73ba1f","scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"repository":{"url":"git+https://github.com/matt-harding/allourthings-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Native storage core for All Our Things","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.11_1776144009347_0.24137262179223828","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@allourthings/core","version":"1.0.0","license":"MIT","_id":"@allourthings/core@1.0.0","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"homepage":"https://github.com/matt-harding/allourthings-core#readme","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"dist":{"shasum":"96df4dc79fa697a01e1aba68c1797b115d49a333","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-1.0.0.tgz","fileCount":9,"integrity":"sha512-1O63iGKaf3SgdQlyeMvyejLFcKoioM4vQ4qX2rk+xTyGQS/gOoNq0qTG8xtlsayBUE3LF0+Y8oSMayeAhSj7Sw==","signatures":[{"sig":"MEQCIFtHJGwzYOP5MOrNnCevZnAB0wTXtg+R/5v+aiShu0TiAiBZrara1c7M4dyRvkkwWuQE2D5eta8Oy/qlYnoxGOUr0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11329987},"main":"index.js","napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"types":"index.d.ts","gitHead":"fa4f28f3407315e3d6e724ec572f2bd257b5c8a7","scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"repository":{"url":"git+https://github.com/matt-harding/allourthings-core.git","type":"git"},"_npmVersion":"10.8.2","description":"Native storage core for All Our Things","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"@napi-rs/cli":"^2"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0_1777319923427_0.9996168221072657","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@allourthings/core","version":"1.0.1","description":"Native storage core for All Our Things","main":"index.js","types":"index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/matt-harding/allourthings-core.git"},"napi":{"name":"allourthings-core","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc"]}},"scripts":{"build":"napi build --platform --release --features napi","build:debug":"napi build --platform --features napi"},"devDependencies":{"@napi-rs/cli":"^2"},"_id":"@allourthings/core@1.0.1","gitHead":"1e0cdd1e01b77a03eed0bc76c0daa4756f59eb8f","bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"homepage":"https://github.com/matt-harding/allourthings-core#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-wo8MRvLnUltdqX0EA8aQ/53TzB8OLbjtvD7CMh8hgIYOFFnGdKoBzF6kt438OBM4Vqd3geyg2boo0pIN1MO3OQ==","shasum":"c9be11a3cdba367d600f56d592de31228db671aa","tarball":"https://registry.npmjs.org/@allourthings/core/-/core-1.0.1.tgz","fileCount":9,"unpackedSize":11406467,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDb8s4Z6QtFcDZUllzhkafjNpXzF/zTOZOP9NFodxKjGAIhAO4kCZVksqZhEpUf4fQ1X2Xi2AKIUg+0Hg9Kzz06SmtC"}]},"_npmUser":{"name":"allourthings-matt","email":"matthewrharding@icloud.com"},"directories":{},"maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.0.1_1777891931584_0.05664887013295661"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-29T17:33:19.239Z","modified":"2026-05-04T10:52:12.039Z","0.1.0":"2026-03-29T17:33:19.536Z","0.1.9":"2026-04-04T10:20:59.063Z","0.1.10":"2026-04-06T10:06:56.967Z","0.1.11":"2026-04-14T05:20:09.589Z","1.0.0":"2026-04-27T19:58:43.947Z","1.0.1":"2026-05-04T10:52:11.895Z"},"bugs":{"url":"https://github.com/matt-harding/allourthings-core/issues"},"license":"MIT","homepage":"https://github.com/matt-harding/allourthings-core#readme","repository":{"type":"git","url":"git+https://github.com/matt-harding/allourthings-core.git"},"description":"Native storage core for All Our Things","maintainers":[{"name":"allourthings-matt","email":"matthewrharding@icloud.com"}],"readme":"# allourthings-core\n\nRust storage library for [AllOurThings](https://allourthings.io) — an AI-powered inventory system.\n\n\n## Storage format\n\nEach item is a directory containing a single JSON file:\n\n```\n<data-dir>/items/<slug>-<id>/item.json\n```\n\nThe directory name is `<slug>-<id>` where `<slug>` is a URL-safe lowercase version of the item name (max 50 chars) and `<id>` is an 8-character lowercase hex string. \n\nRequired fields: `id`, `name`, `created_at`, `updated_at`. Well-known optional fields include `category`, `subcategory`, `tags`, and `attachments`. Any additional fields are preserved and round-trip without modification.\n\nAttachment files (PDFs, images, etc.) are stored alongside `item.json` in the same directory.\n\n\n## Query cache\n\n`CatalogStore` supports an optional SQLite query cache for efficient filtering.\n\nThe cache is write-through — every mutation (`add_item`, `update_item`, `delete_item`, and the attachment operations) updates the cache immediately. Call `refresh()` to sync changes written externally (e.g. by another process or a mobile app), and `rebuild_cache()` to fully repopulate from disk if the cache becomes corrupt.\n\n| Platform | Default location |\n|---|---|\n| macOS | `~/Library/Caches/allourthings/<hash>/` |\n| Windows | `%LOCALAPPDATA%\\allourthings\\<hash>\\` |\n| Linux | `~/.cache/allourthings/<hash>/` |\n\nThe `<hash>` is a SHA-256 of the data directory path, so multiple vaults each get their own isolated cache.\n\nThe cache schema indexes `category`, `subcategory`, and `tags` for SQL filtering, and stores the full item as a JSON blob for everything else. All three are optional on any item — items missing them are stored and returned normally, they just won't appear when those specific filters are applied. Keeping the indexed columns to only those actually queried means new well-known fields can be added without any schema migration.\n\n## Running tests\n\n```bash\ncargo test\n```\n\nThis runs two test suites:\n\n- **Unit tests** (in `src/`) — cover the item schema, slug generation, ID generation, storage CRUD, attachments, and cache write-through behaviour\n- **Conformance tests** (`tests/conformance.rs`) — assert against the shared fixtures in `test-fixtures/catalog/`. These define the canonical storage format that all AllOurThings clients (MCP server, iOS app, etc.) must honour\n\n\n## License\n\nMIT\n","readmeFilename":"README.md"}