opentasks 0.0.1 → 0.0.2
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/README.md +344 -1
- package/dist/__tests__/cli-tools.test.d.ts +8 -0
- package/dist/__tests__/cli-tools.test.d.ts.map +1 -0
- package/dist/__tests__/cli-tools.test.js +546 -0
- package/dist/__tests__/cli-tools.test.js.map +1 -0
- package/dist/__tests__/cli.test.d.ts +5 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/cli.test.js +77 -0
- package/dist/__tests__/cli.test.js.map +1 -0
- package/dist/__tests__/p1-p3-gaps.test.d.ts +2 -0
- package/dist/__tests__/p1-p3-gaps.test.d.ts.map +1 -0
- package/dist/__tests__/p1-p3-gaps.test.js +463 -0
- package/dist/__tests__/p1-p3-gaps.test.js.map +1 -0
- package/dist/cli.d.ts +19 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +702 -23
- package/dist/cli.js.map +1 -1
- package/dist/client/__tests__/client-crud.test.d.ts +7 -0
- package/dist/client/__tests__/client-crud.test.d.ts.map +1 -0
- package/dist/client/__tests__/client-crud.test.js +404 -0
- package/dist/client/__tests__/client-crud.test.js.map +1 -0
- package/dist/client/__tests__/client.test.d.ts +5 -0
- package/dist/client/__tests__/client.test.d.ts.map +1 -0
- package/dist/client/__tests__/client.test.js +518 -0
- package/dist/client/__tests__/client.test.js.map +1 -0
- package/dist/client/client.d.ts +228 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +393 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +9 -0
- package/dist/client/index.js.map +1 -0
- package/dist/config/__tests__/defaults.test.d.ts +2 -0
- package/dist/config/__tests__/defaults.test.d.ts.map +1 -0
- package/dist/config/__tests__/defaults.test.js +57 -0
- package/dist/config/__tests__/defaults.test.js.map +1 -0
- package/dist/config/__tests__/env.test.d.ts +2 -0
- package/dist/config/__tests__/env.test.d.ts.map +1 -0
- package/dist/config/__tests__/env.test.js +136 -0
- package/dist/config/__tests__/env.test.js.map +1 -0
- package/dist/config/__tests__/index.test.d.ts +2 -0
- package/dist/config/__tests__/index.test.d.ts.map +1 -0
- package/dist/config/__tests__/index.test.js +113 -0
- package/dist/config/__tests__/index.test.js.map +1 -0
- package/dist/config/__tests__/loader.test.d.ts +2 -0
- package/dist/config/__tests__/loader.test.d.ts.map +1 -0
- package/dist/config/__tests__/loader.test.js +128 -0
- package/dist/config/__tests__/loader.test.js.map +1 -0
- package/dist/config/__tests__/merge.test.d.ts +2 -0
- package/dist/config/__tests__/merge.test.d.ts.map +1 -0
- package/dist/config/__tests__/merge.test.js +79 -0
- package/dist/config/__tests__/merge.test.js.map +1 -0
- package/dist/config/__tests__/schema.test.d.ts +2 -0
- package/dist/config/__tests__/schema.test.d.ts.map +1 -0
- package/dist/config/__tests__/schema.test.js +300 -0
- package/dist/config/__tests__/schema.test.js.map +1 -0
- package/dist/config/defaults.d.ts +13 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +15 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/env.d.ts +14 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +130 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/errors.d.ts +21 -0
- package/dist/config/errors.d.ts.map +1 -0
- package/dist/config/errors.js +30 -0
- package/dist/config/errors.js.map +1 -0
- package/dist/config/index.d.ts +21 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +41 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +87 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/merge.d.ts +12 -0
- package/dist/config/merge.d.ts.map +1 -0
- package/dist/config/merge.js +54 -0
- package/dist/config/merge.js.map +1 -0
- package/dist/config/schema.d.ts +644 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +491 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/core/__tests__/conditional-redirects.test.d.ts +2 -0
- package/dist/core/__tests__/conditional-redirects.test.d.ts.map +1 -0
- package/dist/core/__tests__/conditional-redirects.test.js +83 -0
- package/dist/core/__tests__/conditional-redirects.test.js.map +1 -0
- package/dist/core/__tests__/connections.test.d.ts +2 -0
- package/dist/core/__tests__/connections.test.d.ts.map +1 -0
- package/dist/core/__tests__/connections.test.js +158 -0
- package/dist/core/__tests__/connections.test.js.map +1 -0
- package/dist/core/__tests__/hash.test.d.ts +2 -0
- package/dist/core/__tests__/hash.test.d.ts.map +1 -0
- package/dist/core/__tests__/hash.test.js +139 -0
- package/dist/core/__tests__/hash.test.js.map +1 -0
- package/dist/core/__tests__/id.test.d.ts +2 -0
- package/dist/core/__tests__/id.test.d.ts.map +1 -0
- package/dist/core/__tests__/id.test.js +142 -0
- package/dist/core/__tests__/id.test.js.map +1 -0
- package/dist/core/__tests__/location.test.d.ts +2 -0
- package/dist/core/__tests__/location.test.d.ts.map +1 -0
- package/dist/core/__tests__/location.test.js +77 -0
- package/dist/core/__tests__/location.test.js.map +1 -0
- package/dist/core/__tests__/merge-driver.test.d.ts +2 -0
- package/dist/core/__tests__/merge-driver.test.d.ts.map +1 -0
- package/dist/core/__tests__/merge-driver.test.js +218 -0
- package/dist/core/__tests__/merge-driver.test.js.map +1 -0
- package/dist/core/__tests__/redirects.test.d.ts +2 -0
- package/dist/core/__tests__/redirects.test.d.ts.map +1 -0
- package/dist/core/__tests__/redirects.test.js +123 -0
- package/dist/core/__tests__/redirects.test.js.map +1 -0
- package/dist/core/__tests__/resolve-location-target.test.d.ts +8 -0
- package/dist/core/__tests__/resolve-location-target.test.d.ts.map +1 -0
- package/dist/core/__tests__/resolve-location-target.test.js +303 -0
- package/dist/core/__tests__/resolve-location-target.test.js.map +1 -0
- package/dist/core/__tests__/uri.test.d.ts +2 -0
- package/dist/core/__tests__/uri.test.d.ts.map +1 -0
- package/dist/core/__tests__/uri.test.js +159 -0
- package/dist/core/__tests__/uri.test.js.map +1 -0
- package/dist/core/__tests__/worktree.test.d.ts +2 -0
- package/dist/core/__tests__/worktree.test.d.ts.map +1 -0
- package/dist/core/__tests__/worktree.test.js +120 -0
- package/dist/core/__tests__/worktree.test.js.map +1 -0
- package/dist/core/conditional-redirects.d.ts +42 -0
- package/dist/core/conditional-redirects.d.ts.map +1 -0
- package/dist/core/conditional-redirects.js +59 -0
- package/dist/core/conditional-redirects.js.map +1 -0
- package/dist/core/connections.d.ts +87 -0
- package/dist/core/connections.d.ts.map +1 -0
- package/dist/core/connections.js +160 -0
- package/dist/core/connections.js.map +1 -0
- package/dist/core/discover.d.ts +39 -0
- package/dist/core/discover.d.ts.map +1 -0
- package/dist/core/discover.js +136 -0
- package/dist/core/discover.js.map +1 -0
- package/dist/core/hash.d.ts +25 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/hash.js +62 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/id.d.ts +79 -0
- package/dist/core/id.d.ts.map +1 -0
- package/dist/core/id.js +141 -0
- package/dist/core/id.js.map +1 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +24 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/location.d.ts +70 -0
- package/dist/core/location.d.ts.map +1 -0
- package/dist/core/location.js +121 -0
- package/dist/core/location.js.map +1 -0
- package/dist/core/merge-driver.d.ts +50 -0
- package/dist/core/merge-driver.d.ts.map +1 -0
- package/dist/core/merge-driver.js +258 -0
- package/dist/core/merge-driver.js.map +1 -0
- package/dist/core/redirects.d.ts +91 -0
- package/dist/core/redirects.d.ts.map +1 -0
- package/dist/core/redirects.js +113 -0
- package/dist/core/redirects.js.map +1 -0
- package/dist/core/uri.d.ts +105 -0
- package/dist/core/uri.d.ts.map +1 -0
- package/dist/core/uri.js +190 -0
- package/dist/core/uri.js.map +1 -0
- package/dist/core/worktree.d.ts +106 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +394 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/daemon/__tests__/flush.test.d.ts +5 -0
- package/dist/daemon/__tests__/flush.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/flush.test.js +213 -0
- package/dist/daemon/__tests__/flush.test.js.map +1 -0
- package/dist/daemon/__tests__/integration.test.d.ts +7 -0
- package/dist/daemon/__tests__/integration.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/integration.test.js +276 -0
- package/dist/daemon/__tests__/integration.test.js.map +1 -0
- package/dist/daemon/__tests__/ipc.test.d.ts +5 -0
- package/dist/daemon/__tests__/ipc.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/ipc.test.js +314 -0
- package/dist/daemon/__tests__/ipc.test.js.map +1 -0
- package/dist/daemon/__tests__/lifecycle.test.d.ts +5 -0
- package/dist/daemon/__tests__/lifecycle.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/lifecycle.test.js +301 -0
- package/dist/daemon/__tests__/lifecycle.test.js.map +1 -0
- package/dist/daemon/__tests__/lock.test.d.ts +5 -0
- package/dist/daemon/__tests__/lock.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/lock.test.js +192 -0
- package/dist/daemon/__tests__/lock.test.js.map +1 -0
- package/dist/daemon/__tests__/methods/graph.test.d.ts +5 -0
- package/dist/daemon/__tests__/methods/graph.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/methods/graph.test.js +309 -0
- package/dist/daemon/__tests__/methods/graph.test.js.map +1 -0
- package/dist/daemon/__tests__/methods/provider.test.d.ts +7 -0
- package/dist/daemon/__tests__/methods/provider.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/methods/provider.test.js +181 -0
- package/dist/daemon/__tests__/methods/provider.test.js.map +1 -0
- package/dist/daemon/__tests__/methods/tools.test.d.ts +5 -0
- package/dist/daemon/__tests__/methods/tools.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/methods/tools.test.js +587 -0
- package/dist/daemon/__tests__/methods/tools.test.js.map +1 -0
- package/dist/daemon/__tests__/multi-location.test.d.ts +8 -0
- package/dist/daemon/__tests__/multi-location.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/multi-location.test.js +669 -0
- package/dist/daemon/__tests__/multi-location.test.js.map +1 -0
- package/dist/daemon/__tests__/registry.test.d.ts +5 -0
- package/dist/daemon/__tests__/registry.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/registry.test.js +208 -0
- package/dist/daemon/__tests__/registry.test.js.map +1 -0
- package/dist/daemon/__tests__/watcher.test.d.ts +5 -0
- package/dist/daemon/__tests__/watcher.test.d.ts.map +1 -0
- package/dist/daemon/__tests__/watcher.test.js +234 -0
- package/dist/daemon/__tests__/watcher.test.js.map +1 -0
- package/dist/daemon/entire-linker.d.ts +68 -0
- package/dist/daemon/entire-linker.d.ts.map +1 -0
- package/dist/daemon/entire-linker.js +439 -0
- package/dist/daemon/entire-linker.js.map +1 -0
- package/dist/daemon/entire-watcher.d.ts +66 -0
- package/dist/daemon/entire-watcher.d.ts.map +1 -0
- package/dist/daemon/entire-watcher.js +258 -0
- package/dist/daemon/entire-watcher.js.map +1 -0
- package/dist/daemon/factory.d.ts +59 -0
- package/dist/daemon/factory.d.ts.map +1 -0
- package/dist/daemon/factory.js +72 -0
- package/dist/daemon/factory.js.map +1 -0
- package/dist/daemon/flush.d.ts +51 -0
- package/dist/daemon/flush.d.ts.map +1 -0
- package/dist/daemon/flush.js +89 -0
- package/dist/daemon/flush.js.map +1 -0
- package/dist/daemon/index.d.ts +39 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +24 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/ipc.d.ts +97 -0
- package/dist/daemon/ipc.d.ts.map +1 -0
- package/dist/daemon/ipc.js +304 -0
- package/dist/daemon/ipc.js.map +1 -0
- package/dist/daemon/lifecycle.d.ts +85 -0
- package/dist/daemon/lifecycle.d.ts.map +1 -0
- package/dist/daemon/lifecycle.js +754 -0
- package/dist/daemon/lifecycle.js.map +1 -0
- package/dist/daemon/location-state.d.ts +85 -0
- package/dist/daemon/location-state.d.ts.map +1 -0
- package/dist/daemon/location-state.js +291 -0
- package/dist/daemon/location-state.js.map +1 -0
- package/dist/daemon/lock.d.ts +29 -0
- package/dist/daemon/lock.d.ts.map +1 -0
- package/dist/daemon/lock.js +131 -0
- package/dist/daemon/lock.js.map +1 -0
- package/dist/daemon/methods/__tests__/graph.test.d.ts +5 -0
- package/dist/daemon/methods/__tests__/graph.test.d.ts.map +1 -0
- package/dist/daemon/methods/__tests__/graph.test.js +274 -0
- package/dist/daemon/methods/__tests__/graph.test.js.map +1 -0
- package/dist/daemon/methods/__tests__/provider.test.d.ts +5 -0
- package/dist/daemon/methods/__tests__/provider.test.d.ts.map +1 -0
- package/dist/daemon/methods/__tests__/provider.test.js +184 -0
- package/dist/daemon/methods/__tests__/provider.test.js.map +1 -0
- package/dist/daemon/methods/__tests__/tools.test.d.ts +5 -0
- package/dist/daemon/methods/__tests__/tools.test.d.ts.map +1 -0
- package/dist/daemon/methods/__tests__/tools.test.js +295 -0
- package/dist/daemon/methods/__tests__/tools.test.js.map +1 -0
- package/dist/daemon/methods/archive.d.ts +22 -0
- package/dist/daemon/methods/archive.d.ts.map +1 -0
- package/dist/daemon/methods/archive.js +107 -0
- package/dist/daemon/methods/archive.js.map +1 -0
- package/dist/daemon/methods/graph.d.ts +26 -0
- package/dist/daemon/methods/graph.d.ts.map +1 -0
- package/dist/daemon/methods/graph.js +157 -0
- package/dist/daemon/methods/graph.js.map +1 -0
- package/dist/daemon/methods/lifecycle.d.ts +54 -0
- package/dist/daemon/methods/lifecycle.d.ts.map +1 -0
- package/dist/daemon/methods/lifecycle.js +46 -0
- package/dist/daemon/methods/lifecycle.js.map +1 -0
- package/dist/daemon/methods/location.d.ts +24 -0
- package/dist/daemon/methods/location.d.ts.map +1 -0
- package/dist/daemon/methods/location.js +72 -0
- package/dist/daemon/methods/location.js.map +1 -0
- package/dist/daemon/methods/provider.d.ts +22 -0
- package/dist/daemon/methods/provider.d.ts.map +1 -0
- package/dist/daemon/methods/provider.js +72 -0
- package/dist/daemon/methods/provider.js.map +1 -0
- package/dist/daemon/methods/tools.d.ts +23 -0
- package/dist/daemon/methods/tools.d.ts.map +1 -0
- package/dist/daemon/methods/tools.js +111 -0
- package/dist/daemon/methods/tools.js.map +1 -0
- package/dist/daemon/registry.d.ts +35 -0
- package/dist/daemon/registry.d.ts.map +1 -0
- package/dist/daemon/registry.js +189 -0
- package/dist/daemon/registry.js.map +1 -0
- package/dist/daemon/types.d.ts +101 -0
- package/dist/daemon/types.d.ts.map +1 -0
- package/dist/daemon/types.js +19 -0
- package/dist/daemon/types.js.map +1 -0
- package/dist/daemon/watcher.d.ts +62 -0
- package/dist/daemon/watcher.d.ts.map +1 -0
- package/dist/daemon/watcher.js +142 -0
- package/dist/daemon/watcher.js.map +1 -0
- package/dist/graph/EdgeTypeRegistry.d.ts +134 -0
- package/dist/graph/EdgeTypeRegistry.d.ts.map +1 -0
- package/dist/graph/EdgeTypeRegistry.js +255 -0
- package/dist/graph/EdgeTypeRegistry.js.map +1 -0
- package/dist/graph/FederatedGraph.d.ts +296 -0
- package/dist/graph/FederatedGraph.d.ts.map +1 -0
- package/dist/graph/FederatedGraph.js +406 -0
- package/dist/graph/FederatedGraph.js.map +1 -0
- package/dist/graph/GraphologyAdapter.d.ts +151 -0
- package/dist/graph/GraphologyAdapter.d.ts.map +1 -0
- package/dist/graph/GraphologyAdapter.js +209 -0
- package/dist/graph/GraphologyAdapter.js.map +1 -0
- package/dist/graph/HydratingFederatedGraph.d.ts +151 -0
- package/dist/graph/HydratingFederatedGraph.d.ts.map +1 -0
- package/dist/graph/HydratingFederatedGraph.js +327 -0
- package/dist/graph/HydratingFederatedGraph.js.map +1 -0
- package/dist/graph/__tests__/EdgeTypeRegistry.test.d.ts +2 -0
- package/dist/graph/__tests__/EdgeTypeRegistry.test.d.ts.map +1 -0
- package/dist/graph/__tests__/EdgeTypeRegistry.test.js +212 -0
- package/dist/graph/__tests__/EdgeTypeRegistry.test.js.map +1 -0
- package/dist/graph/__tests__/FederatedGraph.test.d.ts +2 -0
- package/dist/graph/__tests__/FederatedGraph.test.d.ts.map +1 -0
- package/dist/graph/__tests__/FederatedGraph.test.js +661 -0
- package/dist/graph/__tests__/FederatedGraph.test.js.map +1 -0
- package/dist/graph/__tests__/GraphologyAdapter.test.d.ts +2 -0
- package/dist/graph/__tests__/GraphologyAdapter.test.d.ts.map +1 -0
- package/dist/graph/__tests__/GraphologyAdapter.test.js +326 -0
- package/dist/graph/__tests__/GraphologyAdapter.test.js.map +1 -0
- package/dist/graph/__tests__/HydratingFederatedGraph.test.d.ts +2 -0
- package/dist/graph/__tests__/HydratingFederatedGraph.test.d.ts.map +1 -0
- package/dist/graph/__tests__/HydratingFederatedGraph.test.js +587 -0
- package/dist/graph/__tests__/HydratingFederatedGraph.test.js.map +1 -0
- package/dist/graph/__tests__/debounce.test.d.ts +5 -0
- package/dist/graph/__tests__/debounce.test.d.ts.map +1 -0
- package/dist/graph/__tests__/debounce.test.js +195 -0
- package/dist/graph/__tests__/debounce.test.js.map +1 -0
- package/dist/graph/__tests__/edge-cases.test.d.ts +8 -0
- package/dist/graph/__tests__/edge-cases.test.d.ts.map +1 -0
- package/dist/graph/__tests__/edge-cases.test.js +472 -0
- package/dist/graph/__tests__/edge-cases.test.js.map +1 -0
- package/dist/graph/__tests__/expansion.test.d.ts +2 -0
- package/dist/graph/__tests__/expansion.test.d.ts.map +1 -0
- package/dist/graph/__tests__/expansion.test.js +105 -0
- package/dist/graph/__tests__/expansion.test.js.map +1 -0
- package/dist/graph/__tests__/provider-store.test.d.ts +5 -0
- package/dist/graph/__tests__/provider-store.test.d.ts.map +1 -0
- package/dist/graph/__tests__/provider-store.test.js +791 -0
- package/dist/graph/__tests__/provider-store.test.js.map +1 -0
- package/dist/graph/__tests__/query.test.d.ts +5 -0
- package/dist/graph/__tests__/query.test.d.ts.map +1 -0
- package/dist/graph/__tests__/query.test.js +774 -0
- package/dist/graph/__tests__/query.test.js.map +1 -0
- package/dist/graph/__tests__/store.test.d.ts +5 -0
- package/dist/graph/__tests__/store.test.d.ts.map +1 -0
- package/dist/graph/__tests__/store.test.js +489 -0
- package/dist/graph/__tests__/store.test.js.map +1 -0
- package/dist/graph/__tests__/sync.test.d.ts +5 -0
- package/dist/graph/__tests__/sync.test.d.ts.map +1 -0
- package/dist/graph/__tests__/sync.test.js +129 -0
- package/dist/graph/__tests__/sync.test.js.map +1 -0
- package/dist/graph/__tests__/validation.test.d.ts +2 -0
- package/dist/graph/__tests__/validation.test.d.ts.map +1 -0
- package/dist/graph/__tests__/validation.test.js +521 -0
- package/dist/graph/__tests__/validation.test.js.map +1 -0
- package/dist/graph/coordination.d.ts +190 -0
- package/dist/graph/coordination.d.ts.map +1 -0
- package/dist/graph/coordination.js +180 -0
- package/dist/graph/coordination.js.map +1 -0
- package/dist/graph/debounce.d.ts +47 -0
- package/dist/graph/debounce.d.ts.map +1 -0
- package/dist/graph/debounce.js +95 -0
- package/dist/graph/debounce.js.map +1 -0
- package/dist/graph/expansion.d.ts +64 -0
- package/dist/graph/expansion.d.ts.map +1 -0
- package/dist/graph/expansion.js +205 -0
- package/dist/graph/expansion.js.map +1 -0
- package/dist/graph/history.d.ts +186 -0
- package/dist/graph/history.d.ts.map +1 -0
- package/dist/graph/history.js +155 -0
- package/dist/graph/history.js.map +1 -0
- package/dist/graph/index.d.ts +35 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +22 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/provider-store.d.ts +211 -0
- package/dist/graph/provider-store.d.ts.map +1 -0
- package/dist/graph/provider-store.js +568 -0
- package/dist/graph/provider-store.js.map +1 -0
- package/dist/graph/query.d.ts +90 -0
- package/dist/graph/query.d.ts.map +1 -0
- package/dist/graph/query.js +463 -0
- package/dist/graph/query.js.map +1 -0
- package/dist/graph/store.d.ts +71 -0
- package/dist/graph/store.d.ts.map +1 -0
- package/dist/graph/store.js +530 -0
- package/dist/graph/store.js.map +1 -0
- package/dist/graph/sync.d.ts +48 -0
- package/dist/graph/sync.d.ts.map +1 -0
- package/dist/graph/sync.js +60 -0
- package/dist/graph/sync.js.map +1 -0
- package/dist/graph/types.d.ts +289 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +19 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/validation.d.ts +26 -0
- package/dist/graph/validation.d.ts.map +1 -0
- package/dist/graph/validation.js +338 -0
- package/dist/graph/validation.js.map +1 -0
- package/dist/index.d.ts +25 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -25
- package/dist/index.js.map +1 -1
- package/dist/materialization/archiver.d.ts +12 -0
- package/dist/materialization/archiver.d.ts.map +1 -0
- package/dist/materialization/archiver.js +273 -0
- package/dist/materialization/archiver.js.map +1 -0
- package/dist/materialization/git-archive-store.d.ts +17 -0
- package/dist/materialization/git-archive-store.d.ts.map +1 -0
- package/dist/materialization/git-archive-store.js +509 -0
- package/dist/materialization/git-archive-store.js.map +1 -0
- package/dist/materialization/git-remote-store.d.ts +22 -0
- package/dist/materialization/git-remote-store.d.ts.map +1 -0
- package/dist/materialization/git-remote-store.js +448 -0
- package/dist/materialization/git-remote-store.js.map +1 -0
- package/dist/materialization/graph-id.d.ts +53 -0
- package/dist/materialization/graph-id.d.ts.map +1 -0
- package/dist/materialization/graph-id.js +163 -0
- package/dist/materialization/graph-id.js.map +1 -0
- package/dist/materialization/http-remote-store.d.ts +12 -0
- package/dist/materialization/http-remote-store.d.ts.map +1 -0
- package/dist/materialization/http-remote-store.js +143 -0
- package/dist/materialization/http-remote-store.js.map +1 -0
- package/dist/materialization/index.d.ts +15 -0
- package/dist/materialization/index.d.ts.map +1 -0
- package/dist/materialization/index.js +17 -0
- package/dist/materialization/index.js.map +1 -0
- package/dist/materialization/remote-store-factory.d.ts +17 -0
- package/dist/materialization/remote-store-factory.d.ts.map +1 -0
- package/dist/materialization/remote-store-factory.js +46 -0
- package/dist/materialization/remote-store-factory.js.map +1 -0
- package/dist/materialization/snapshot.d.ts +34 -0
- package/dist/materialization/snapshot.d.ts.map +1 -0
- package/dist/materialization/snapshot.js +177 -0
- package/dist/materialization/snapshot.js.map +1 -0
- package/dist/materialization/types.d.ts +300 -0
- package/dist/materialization/types.d.ts.map +1 -0
- package/dist/materialization/types.js +17 -0
- package/dist/materialization/types.js.map +1 -0
- package/dist/providers/__tests__/beads.test.d.ts +5 -0
- package/dist/providers/__tests__/beads.test.d.ts.map +1 -0
- package/dist/providers/__tests__/beads.test.js +591 -0
- package/dist/providers/__tests__/beads.test.js.map +1 -0
- package/dist/providers/__tests__/claude-tasks.test.d.ts +5 -0
- package/dist/providers/__tests__/claude-tasks.test.d.ts.map +1 -0
- package/dist/providers/__tests__/claude-tasks.test.js +392 -0
- package/dist/providers/__tests__/claude-tasks.test.js.map +1 -0
- package/dist/providers/__tests__/from-config.test.d.ts +5 -0
- package/dist/providers/__tests__/from-config.test.d.ts.map +1 -0
- package/dist/providers/__tests__/from-config.test.js +152 -0
- package/dist/providers/__tests__/from-config.test.js.map +1 -0
- package/dist/providers/__tests__/materialization.test.d.ts +5 -0
- package/dist/providers/__tests__/materialization.test.d.ts.map +1 -0
- package/dist/providers/__tests__/materialization.test.js +407 -0
- package/dist/providers/__tests__/materialization.test.js.map +1 -0
- package/dist/providers/__tests__/native.test.d.ts +5 -0
- package/dist/providers/__tests__/native.test.d.ts.map +1 -0
- package/dist/providers/__tests__/native.test.js +566 -0
- package/dist/providers/__tests__/native.test.js.map +1 -0
- package/dist/providers/__tests__/registry.test.d.ts +5 -0
- package/dist/providers/__tests__/registry.test.d.ts.map +1 -0
- package/dist/providers/__tests__/registry.test.js +183 -0
- package/dist/providers/__tests__/registry.test.js.map +1 -0
- package/dist/providers/beads.d.ts +46 -0
- package/dist/providers/beads.d.ts.map +1 -0
- package/dist/providers/beads.js +865 -0
- package/dist/providers/beads.js.map +1 -0
- package/dist/providers/claude-tasks.d.ts +56 -0
- package/dist/providers/claude-tasks.d.ts.map +1 -0
- package/dist/providers/claude-tasks.js +282 -0
- package/dist/providers/claude-tasks.js.map +1 -0
- package/dist/providers/entire.d.ts +88 -0
- package/dist/providers/entire.d.ts.map +1 -0
- package/dist/providers/entire.js +409 -0
- package/dist/providers/entire.js.map +1 -0
- package/dist/providers/from-config.d.ts +47 -0
- package/dist/providers/from-config.d.ts.map +1 -0
- package/dist/providers/from-config.js +150 -0
- package/dist/providers/from-config.js.map +1 -0
- package/dist/providers/index.d.ts +26 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +29 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/location.d.ts +44 -0
- package/dist/providers/location.d.ts.map +1 -0
- package/dist/providers/location.js +157 -0
- package/dist/providers/location.js.map +1 -0
- package/dist/providers/materialization.d.ts +46 -0
- package/dist/providers/materialization.d.ts.map +1 -0
- package/dist/providers/materialization.js +237 -0
- package/dist/providers/materialization.js.map +1 -0
- package/dist/providers/native.d.ts +32 -0
- package/dist/providers/native.d.ts.map +1 -0
- package/dist/providers/native.js +552 -0
- package/dist/providers/native.js.map +1 -0
- package/dist/providers/registry.d.ts +11 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +97 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/sudocode.d.ts +49 -0
- package/dist/providers/sudocode.d.ts.map +1 -0
- package/dist/providers/sudocode.js +945 -0
- package/dist/providers/sudocode.js.map +1 -0
- package/dist/providers/sync.d.ts +299 -0
- package/dist/providers/sync.d.ts.map +1 -0
- package/dist/providers/sync.js +93 -0
- package/dist/providers/sync.js.map +1 -0
- package/dist/providers/traits/RelationshipQueryable.d.ts +129 -0
- package/dist/providers/traits/RelationshipQueryable.d.ts.map +1 -0
- package/dist/providers/traits/RelationshipQueryable.js +68 -0
- package/dist/providers/traits/RelationshipQueryable.js.map +1 -0
- package/dist/providers/traits/TaskManageable.d.ts +157 -0
- package/dist/providers/traits/TaskManageable.d.ts.map +1 -0
- package/dist/providers/traits/TaskManageable.js +37 -0
- package/dist/providers/traits/TaskManageable.js.map +1 -0
- package/dist/providers/traits/Watchable.d.ts +216 -0
- package/dist/providers/traits/Watchable.d.ts.map +1 -0
- package/dist/providers/traits/Watchable.js +37 -0
- package/dist/providers/traits/Watchable.js.map +1 -0
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.d.ts +2 -0
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.d.ts.map +1 -0
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.js +169 -0
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.js.map +1 -0
- package/dist/providers/traits/__tests__/TaskManageable.test.d.ts +2 -0
- package/dist/providers/traits/__tests__/TaskManageable.test.d.ts.map +1 -0
- package/dist/providers/traits/__tests__/TaskManageable.test.js +172 -0
- package/dist/providers/traits/__tests__/TaskManageable.test.js.map +1 -0
- package/dist/providers/traits/index.d.ts +13 -0
- package/dist/providers/traits/index.d.ts.map +1 -0
- package/dist/providers/traits/index.js +10 -0
- package/dist/providers/traits/index.js.map +1 -0
- package/dist/providers/types.d.ts +284 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +30 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/schema/__tests__/validation.test.d.ts +2 -0
- package/dist/schema/__tests__/validation.test.d.ts.map +1 -0
- package/dist/schema/__tests__/validation.test.js +241 -0
- package/dist/schema/__tests__/validation.test.js.map +1 -0
- package/dist/schema/base.d.ts +68 -0
- package/dist/schema/base.d.ts.map +1 -0
- package/dist/schema/base.js +5 -0
- package/dist/schema/base.js.map +1 -0
- package/dist/schema/edges.d.ts +49 -0
- package/dist/schema/edges.d.ts.map +1 -0
- package/dist/schema/edges.js +9 -0
- package/dist/schema/edges.js.map +1 -0
- package/dist/schema/index.d.ts +11 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +8 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/nodes.d.ts +97 -0
- package/dist/schema/nodes.d.ts.map +1 -0
- package/dist/schema/nodes.js +5 -0
- package/dist/schema/nodes.js.map +1 -0
- package/dist/schema/storage.d.ts +107 -0
- package/dist/schema/storage.d.ts.map +1 -0
- package/dist/schema/storage.js +10 -0
- package/dist/schema/storage.js.map +1 -0
- package/dist/schema/validation.d.ts +61 -0
- package/dist/schema/validation.d.ts.map +1 -0
- package/dist/schema/validation.js +170 -0
- package/dist/schema/validation.js.map +1 -0
- package/dist/storage/__tests__/atomic-write.test.d.ts +5 -0
- package/dist/storage/__tests__/atomic-write.test.d.ts.map +1 -0
- package/dist/storage/__tests__/atomic-write.test.js +170 -0
- package/dist/storage/__tests__/atomic-write.test.js.map +1 -0
- package/dist/storage/__tests__/file-lock.test.d.ts +2 -0
- package/dist/storage/__tests__/file-lock.test.d.ts.map +1 -0
- package/dist/storage/__tests__/file-lock.test.js +89 -0
- package/dist/storage/__tests__/file-lock.test.js.map +1 -0
- package/dist/storage/__tests__/jsonl.test.d.ts +2 -0
- package/dist/storage/__tests__/jsonl.test.d.ts.map +1 -0
- package/dist/storage/__tests__/jsonl.test.js +228 -0
- package/dist/storage/__tests__/jsonl.test.js.map +1 -0
- package/dist/storage/__tests__/locked-writer.test.d.ts +2 -0
- package/dist/storage/__tests__/locked-writer.test.d.ts.map +1 -0
- package/dist/storage/__tests__/locked-writer.test.js +109 -0
- package/dist/storage/__tests__/locked-writer.test.js.map +1 -0
- package/dist/storage/__tests__/sqlite.test.d.ts +2 -0
- package/dist/storage/__tests__/sqlite.test.d.ts.map +1 -0
- package/dist/storage/__tests__/sqlite.test.js +470 -0
- package/dist/storage/__tests__/sqlite.test.js.map +1 -0
- package/dist/storage/atomic-write.d.ts +38 -0
- package/dist/storage/atomic-write.d.ts.map +1 -0
- package/dist/storage/atomic-write.js +83 -0
- package/dist/storage/atomic-write.js.map +1 -0
- package/dist/storage/file-lock.d.ts +66 -0
- package/dist/storage/file-lock.d.ts.map +1 -0
- package/dist/storage/file-lock.js +176 -0
- package/dist/storage/file-lock.js.map +1 -0
- package/dist/storage/index.d.ts +11 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +13 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/interface.d.ts +219 -0
- package/dist/storage/interface.d.ts.map +1 -0
- package/dist/storage/interface.js +22 -0
- package/dist/storage/interface.js.map +1 -0
- package/dist/storage/jsonl.d.ts +106 -0
- package/dist/storage/jsonl.d.ts.map +1 -0
- package/dist/storage/jsonl.js +218 -0
- package/dist/storage/jsonl.js.map +1 -0
- package/dist/storage/locked-writer.d.ts +67 -0
- package/dist/storage/locked-writer.d.ts.map +1 -0
- package/dist/storage/locked-writer.js +105 -0
- package/dist/storage/locked-writer.js.map +1 -0
- package/dist/storage/sqlite-schema.d.ts +48 -0
- package/dist/storage/sqlite-schema.d.ts.map +1 -0
- package/dist/storage/sqlite-schema.js +169 -0
- package/dist/storage/sqlite-schema.js.map +1 -0
- package/dist/storage/sqlite.d.ts +73 -0
- package/dist/storage/sqlite.d.ts.map +1 -0
- package/dist/storage/sqlite.js +698 -0
- package/dist/storage/sqlite.js.map +1 -0
- package/dist/tools/__tests__/annotate.test.d.ts +5 -0
- package/dist/tools/__tests__/annotate.test.d.ts.map +1 -0
- package/dist/tools/__tests__/annotate.test.js +314 -0
- package/dist/tools/__tests__/annotate.test.js.map +1 -0
- package/dist/tools/__tests__/link.test.d.ts +5 -0
- package/dist/tools/__tests__/link.test.d.ts.map +1 -0
- package/dist/tools/__tests__/link.test.js +245 -0
- package/dist/tools/__tests__/link.test.js.map +1 -0
- package/dist/tools/__tests__/query.test.d.ts +5 -0
- package/dist/tools/__tests__/query.test.d.ts.map +1 -0
- package/dist/tools/__tests__/query.test.js +288 -0
- package/dist/tools/__tests__/query.test.js.map +1 -0
- package/dist/tools/__tests__/task.test.d.ts +5 -0
- package/dist/tools/__tests__/task.test.d.ts.map +1 -0
- package/dist/tools/__tests__/task.test.js +178 -0
- package/dist/tools/__tests__/task.test.js.map +1 -0
- package/dist/tools/annotate.d.ts +17 -0
- package/dist/tools/annotate.d.ts.map +1 -0
- package/dist/tools/annotate.js +218 -0
- package/dist/tools/annotate.js.map +1 -0
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +14 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/link.d.ts +17 -0
- package/dist/tools/link.d.ts.map +1 -0
- package/dist/tools/link.js +127 -0
- package/dist/tools/link.js.map +1 -0
- package/dist/tools/query.d.ts +17 -0
- package/dist/tools/query.d.ts.map +1 -0
- package/dist/tools/query.js +342 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/task.d.ts +20 -0
- package/dist/tools/task.d.ts.map +1 -0
- package/dist/tools/task.js +161 -0
- package/dist/tools/task.js.map +1 -0
- package/dist/tools/types.d.ts +334 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +19 -0
- package/dist/tools/types.js.map +1 -0
- package/package.json +40 -5
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Advisory File Lock for JSONL Writes (Phase 2)
|
|
3
|
+
*
|
|
4
|
+
* Serializes write access to graph.jsonl across multiple processes.
|
|
5
|
+
* Uses fs.open with exclusive flag + lockfile pattern.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for file lock
|
|
9
|
+
*/
|
|
10
|
+
export interface FileLockConfig {
|
|
11
|
+
/** Path to the lock file (e.g., ".opentasks/write.lock") */
|
|
12
|
+
lockPath: string;
|
|
13
|
+
/** Timeout for acquiring lock (ms) */
|
|
14
|
+
timeout?: number;
|
|
15
|
+
/** Retry interval (ms) */
|
|
16
|
+
retryInterval?: number;
|
|
17
|
+
/** Stale lock timeout (ms) — locks older than this are considered abandoned */
|
|
18
|
+
staleTimeout?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Advisory file lock for serializing JSONL writes
|
|
22
|
+
*
|
|
23
|
+
* Uses a lock file with PID to detect stale locks.
|
|
24
|
+
*/
|
|
25
|
+
export declare class FileLock {
|
|
26
|
+
private readonly config;
|
|
27
|
+
private fd;
|
|
28
|
+
private acquired;
|
|
29
|
+
constructor(config: FileLockConfig);
|
|
30
|
+
/**
|
|
31
|
+
* Acquire the lock
|
|
32
|
+
*
|
|
33
|
+
* Blocks (with polling) until the lock is acquired or timeout expires.
|
|
34
|
+
*
|
|
35
|
+
* @throws Error if lock cannot be acquired within timeout
|
|
36
|
+
*/
|
|
37
|
+
acquire(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Release the lock
|
|
40
|
+
*/
|
|
41
|
+
release(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Check if the current lock file is stale
|
|
44
|
+
*/
|
|
45
|
+
private isStale;
|
|
46
|
+
/**
|
|
47
|
+
* Forcefully break a stale lock
|
|
48
|
+
*/
|
|
49
|
+
private breakLock;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the lock is currently held
|
|
52
|
+
*/
|
|
53
|
+
get isLocked(): boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Execute a function while holding a file lock
|
|
57
|
+
*
|
|
58
|
+
* Automatically acquires and releases the lock.
|
|
59
|
+
*
|
|
60
|
+
* @param lockPath - Path to the lock file
|
|
61
|
+
* @param fn - Function to execute while holding the lock
|
|
62
|
+
* @param timeout - Lock acquisition timeout (ms)
|
|
63
|
+
* @returns The return value of fn
|
|
64
|
+
*/
|
|
65
|
+
export declare function withFileLock<T>(lockPath: string, fn: () => Promise<T>, timeout?: number): Promise<T>;
|
|
66
|
+
//# sourceMappingURL=file-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-lock.d.ts","sourceRoot":"","sources":["../../src/storage/file-lock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAClD,OAAO,CAAC,EAAE,CAAuB;IACjC,OAAO,CAAC,QAAQ,CAAS;gBAEb,MAAM,EAAE,cAAc;IASlC;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgD9B;;OAEG;IACH,OAAO,IAAI,IAAI;IAqBf;;OAEG;IACH,OAAO,CAAC,OAAO;IAwBf;;OAEG;IACH,OAAO,CAAC,SAAS;IAQjB;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;CACF;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAClC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,CAAC,CAAC,CASZ"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Advisory File Lock for JSONL Writes (Phase 2)
|
|
3
|
+
*
|
|
4
|
+
* Serializes write access to graph.jsonl across multiple processes.
|
|
5
|
+
* Uses fs.open with exclusive flag + lockfile pattern.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
const DEFAULT_TIMEOUT = 5000;
|
|
10
|
+
const DEFAULT_RETRY_INTERVAL = 50;
|
|
11
|
+
const DEFAULT_STALE_TIMEOUT = 30000;
|
|
12
|
+
/**
|
|
13
|
+
* Advisory file lock for serializing JSONL writes
|
|
14
|
+
*
|
|
15
|
+
* Uses a lock file with PID to detect stale locks.
|
|
16
|
+
*/
|
|
17
|
+
export class FileLock {
|
|
18
|
+
config;
|
|
19
|
+
fd = null;
|
|
20
|
+
acquired = false;
|
|
21
|
+
constructor(config) {
|
|
22
|
+
this.config = {
|
|
23
|
+
lockPath: config.lockPath,
|
|
24
|
+
timeout: config.timeout ?? DEFAULT_TIMEOUT,
|
|
25
|
+
retryInterval: config.retryInterval ?? DEFAULT_RETRY_INTERVAL,
|
|
26
|
+
staleTimeout: config.staleTimeout ?? DEFAULT_STALE_TIMEOUT,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Acquire the lock
|
|
31
|
+
*
|
|
32
|
+
* Blocks (with polling) until the lock is acquired or timeout expires.
|
|
33
|
+
*
|
|
34
|
+
* @throws Error if lock cannot be acquired within timeout
|
|
35
|
+
*/
|
|
36
|
+
async acquire() {
|
|
37
|
+
if (this.acquired) {
|
|
38
|
+
throw new Error('Lock already acquired');
|
|
39
|
+
}
|
|
40
|
+
const dir = path.dirname(this.config.lockPath);
|
|
41
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
while (true) {
|
|
44
|
+
try {
|
|
45
|
+
// Try to create lock file exclusively
|
|
46
|
+
this.fd = fs.openSync(this.config.lockPath, fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_WRONLY);
|
|
47
|
+
// Write PID for stale detection
|
|
48
|
+
const content = `${process.pid}\n${Date.now()}\n`;
|
|
49
|
+
fs.writeSync(this.fd, content);
|
|
50
|
+
this.acquired = true;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error.code === 'EEXIST') {
|
|
55
|
+
// Lock exists — check if it's stale
|
|
56
|
+
if (this.isStale()) {
|
|
57
|
+
this.breakLock();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
// Check timeout
|
|
61
|
+
if (Date.now() - startTime >= this.config.timeout) {
|
|
62
|
+
throw new Error(`Failed to acquire lock within ${this.config.timeout}ms: ${this.config.lockPath}`);
|
|
63
|
+
}
|
|
64
|
+
// Wait and retry
|
|
65
|
+
await sleep(this.config.retryInterval);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Release the lock
|
|
75
|
+
*/
|
|
76
|
+
release() {
|
|
77
|
+
if (!this.acquired)
|
|
78
|
+
return;
|
|
79
|
+
try {
|
|
80
|
+
if (this.fd !== null) {
|
|
81
|
+
fs.closeSync(this.fd);
|
|
82
|
+
this.fd = null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// Ignore close errors
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
fs.unlinkSync(this.config.lockPath);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// Ignore unlink errors (file may already be removed)
|
|
93
|
+
}
|
|
94
|
+
this.acquired = false;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check if the current lock file is stale
|
|
98
|
+
*/
|
|
99
|
+
isStale() {
|
|
100
|
+
try {
|
|
101
|
+
const content = fs.readFileSync(this.config.lockPath, 'utf-8');
|
|
102
|
+
const lines = content.trim().split('\n');
|
|
103
|
+
const pid = parseInt(lines[0], 10);
|
|
104
|
+
const timestamp = parseInt(lines[1], 10);
|
|
105
|
+
// Check if the process is still running
|
|
106
|
+
if (pid && !isProcessRunning(pid)) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
// Check if the lock is too old
|
|
110
|
+
if (timestamp && Date.now() - timestamp > this.config.staleTimeout) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// If we can't read the lock file, treat as stale
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Forcefully break a stale lock
|
|
122
|
+
*/
|
|
123
|
+
breakLock() {
|
|
124
|
+
try {
|
|
125
|
+
fs.unlinkSync(this.config.lockPath);
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// Ignore
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Whether the lock is currently held
|
|
133
|
+
*/
|
|
134
|
+
get isLocked() {
|
|
135
|
+
return this.acquired;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Execute a function while holding a file lock
|
|
140
|
+
*
|
|
141
|
+
* Automatically acquires and releases the lock.
|
|
142
|
+
*
|
|
143
|
+
* @param lockPath - Path to the lock file
|
|
144
|
+
* @param fn - Function to execute while holding the lock
|
|
145
|
+
* @param timeout - Lock acquisition timeout (ms)
|
|
146
|
+
* @returns The return value of fn
|
|
147
|
+
*/
|
|
148
|
+
export async function withFileLock(lockPath, fn, timeout) {
|
|
149
|
+
const lock = new FileLock({ lockPath, timeout });
|
|
150
|
+
await lock.acquire();
|
|
151
|
+
try {
|
|
152
|
+
return await fn();
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
lock.release();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Check if a process is running
|
|
160
|
+
*/
|
|
161
|
+
function isProcessRunning(pid) {
|
|
162
|
+
try {
|
|
163
|
+
process.kill(pid, 0);
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Sleep for a given number of milliseconds
|
|
172
|
+
*/
|
|
173
|
+
function sleep(ms) {
|
|
174
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=file-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-lock.js","sourceRoot":"","sources":["../../src/storage/file-lock.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAgBlC,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IACF,MAAM,CAA2B;IAC1C,EAAE,GAAkB,IAAI,CAAC;IACzB,QAAQ,GAAG,KAAK,CAAC;IAEzB,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG;YACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,eAAe;YAC1C,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,sBAAsB;YAC7D,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,qBAAqB;SAC3D,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO;QACX,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC/C,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,OAAO,I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K,SAAS;QACf,IAAI,CAAC;YACH,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAAgB,EAChB,EAAoB,EACpB,OAAgB;IAEhB,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IAEjD,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACrB,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,GAAW;IACnC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTasks Storage - Persistence interfaces and implementations
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export type { Storage, Transaction, NodeFilter, ResolvedNodeFilter } from './interface.js';
|
|
7
|
+
export { resolveNodeFilter } from './interface.js';
|
|
8
|
+
export { JSONLPersister, createJSONLPersister, type JSONLPersisterConfig, type LoadResult, } from './jsonl.js';
|
|
9
|
+
export { SQLitePersister, createSQLitePersister, type SQLitePersisterConfig } from './sqlite.js';
|
|
10
|
+
export { atomicWrite, appendToFile, fileExists, readFileOrEmpty } from './atomic-write.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGjG,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTasks Storage - Persistence interfaces and implementations
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export { resolveNodeFilter } from './interface.js';
|
|
7
|
+
// JSONL Persister
|
|
8
|
+
export { JSONLPersister, createJSONLPersister, } from './jsonl.js';
|
|
9
|
+
// SQLite Persister
|
|
10
|
+
export { SQLitePersister, createSQLitePersister } from './sqlite.js';
|
|
11
|
+
// Utilities
|
|
12
|
+
export { atomicWrite, appendToFile, fileExists, readFileOrEmpty } from './atomic-write.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,kBAAkB;AAClB,OAAO,EACL,cAAc,EACd,oBAAoB,GAGrB,MAAM,YAAY,CAAC;AAEpB,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAA8B,MAAM,aAAa,CAAC;AAEjG,YAAY;AACZ,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage interface for OpenTasks
|
|
3
|
+
*
|
|
4
|
+
* Domain-driven storage interface following beads pattern.
|
|
5
|
+
* Defines operations for nodes, edges, tags, and queries.
|
|
6
|
+
*/
|
|
7
|
+
import type { StoredNode, StoredEdge } from '../schema/storage.js';
|
|
8
|
+
import type { EdgeType } from '../schema/edges.js';
|
|
9
|
+
/**
|
|
10
|
+
* Filter criteria for querying nodes
|
|
11
|
+
*/
|
|
12
|
+
export interface NodeFilter {
|
|
13
|
+
/** Filter by node type (single or multiple) */
|
|
14
|
+
type?: string | string[];
|
|
15
|
+
/** Filter by status (single or multiple) */
|
|
16
|
+
status?: string | string[];
|
|
17
|
+
/** Filter by tags (AND semantics - must have all) */
|
|
18
|
+
tags?: string[];
|
|
19
|
+
/** Filter by parent node */
|
|
20
|
+
parent_id?: string;
|
|
21
|
+
/** Filter by archived status */
|
|
22
|
+
archived?: boolean;
|
|
23
|
+
/** Full-text search in title and content */
|
|
24
|
+
search?: string;
|
|
25
|
+
/** Maximum number of results */
|
|
26
|
+
limit?: number;
|
|
27
|
+
/** Offset for pagination */
|
|
28
|
+
offset?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Transaction interface for atomic operations
|
|
32
|
+
*
|
|
33
|
+
* Includes both read and write methods that work within a transaction context.
|
|
34
|
+
* Reads within a transaction see uncommitted writes from the same transaction.
|
|
35
|
+
*/
|
|
36
|
+
export interface Transaction {
|
|
37
|
+
/** Get a node by ID within transaction */
|
|
38
|
+
getNode(id: string): Promise<StoredNode | null>;
|
|
39
|
+
/** Get an edge by ID within transaction */
|
|
40
|
+
getEdge(id: string): Promise<StoredEdge | null>;
|
|
41
|
+
/** Get all tags for a node within transaction */
|
|
42
|
+
getTags(nodeId: string): Promise<string[]>;
|
|
43
|
+
/** Get all edges from a node within transaction */
|
|
44
|
+
getEdgesFrom(nodeId: string, type?: EdgeType): Promise<StoredEdge[]>;
|
|
45
|
+
/** Create a new node within transaction */
|
|
46
|
+
createNode(node: StoredNode, actor?: string): Promise<void>;
|
|
47
|
+
/** Update an existing node within transaction */
|
|
48
|
+
updateNode(id: string, updates: Partial<StoredNode>, actor?: string): Promise<void>;
|
|
49
|
+
/** Create a new edge within transaction */
|
|
50
|
+
createEdge(edge: StoredEdge, actor?: string): Promise<void>;
|
|
51
|
+
/** Delete an edge within transaction */
|
|
52
|
+
deleteEdge(id: string, actor?: string): Promise<void>;
|
|
53
|
+
/** Add a tag to a node within transaction */
|
|
54
|
+
addTag(nodeId: string, tag: string, actor?: string): Promise<void>;
|
|
55
|
+
/** Remove a tag from a node within transaction */
|
|
56
|
+
removeTag(nodeId: string, tag: string, actor?: string): Promise<void>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Core storage interface for OpenTasks
|
|
60
|
+
*
|
|
61
|
+
* Provides domain-driven operations for nodes, edges, tags, and queries.
|
|
62
|
+
* Implementations: SQLitePersister (primary), JSONLPersister (for import/export)
|
|
63
|
+
*/
|
|
64
|
+
export interface Storage {
|
|
65
|
+
/**
|
|
66
|
+
* Create a new node
|
|
67
|
+
* @param node - The node to create (must include id, uuid, type, title)
|
|
68
|
+
* @param actor - Optional actor identifier for audit trail
|
|
69
|
+
*/
|
|
70
|
+
createNode(node: StoredNode, actor?: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Get a node by ID
|
|
73
|
+
* @param id - The node ID (e.g., "s-a2b3")
|
|
74
|
+
* @returns The node or null if not found
|
|
75
|
+
*/
|
|
76
|
+
getNode(id: string): Promise<StoredNode | null>;
|
|
77
|
+
/**
|
|
78
|
+
* Update an existing node
|
|
79
|
+
* @param id - The node ID to update
|
|
80
|
+
* @param updates - Partial node with fields to update
|
|
81
|
+
* @param actor - Optional actor identifier for audit trail
|
|
82
|
+
*/
|
|
83
|
+
updateNode(id: string, updates: Partial<StoredNode>, actor?: string): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Delete a node
|
|
86
|
+
* @param id - The node ID to delete
|
|
87
|
+
* @param actor - Optional actor identifier for audit trail
|
|
88
|
+
*/
|
|
89
|
+
deleteNode(id: string, actor?: string): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Query nodes with filtering
|
|
92
|
+
* @param filter - Filter criteria
|
|
93
|
+
* @returns Matching nodes
|
|
94
|
+
*/
|
|
95
|
+
queryNodes(filter: NodeFilter): Promise<StoredNode[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a new edge
|
|
98
|
+
* @param edge - The edge to create
|
|
99
|
+
* @param actor - Optional actor identifier for audit trail
|
|
100
|
+
*/
|
|
101
|
+
createEdge(edge: StoredEdge, actor?: string): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Get an edge by ID
|
|
104
|
+
* @param id - The edge ID (e.g., "x-r8s9")
|
|
105
|
+
* @returns The edge or null if not found
|
|
106
|
+
*/
|
|
107
|
+
getEdge(id: string): Promise<StoredEdge | null>;
|
|
108
|
+
/**
|
|
109
|
+
* Delete an edge
|
|
110
|
+
* @param id - The edge ID to delete
|
|
111
|
+
* @param actor - Optional actor identifier for audit trail
|
|
112
|
+
*/
|
|
113
|
+
deleteEdge(id: string, actor?: string): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Get all edges from a node
|
|
116
|
+
* @param nodeId - The source node ID
|
|
117
|
+
* @param type - Optional edge type filter
|
|
118
|
+
* @returns Edges where from_id matches
|
|
119
|
+
*/
|
|
120
|
+
getEdgesFrom(nodeId: string, type?: EdgeType): Promise<StoredEdge[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Get all edges to a node
|
|
123
|
+
* @param nodeId - The target node ID
|
|
124
|
+
* @param type - Optional edge type filter
|
|
125
|
+
* @returns Edges where to_id matches
|
|
126
|
+
*/
|
|
127
|
+
getEdgesTo(nodeId: string, type?: EdgeType): Promise<StoredEdge[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Add a tag to a node
|
|
130
|
+
* @param nodeId - The node ID
|
|
131
|
+
* @param tag - The tag to add
|
|
132
|
+
* @param actor - Optional actor identifier for audit trail
|
|
133
|
+
*/
|
|
134
|
+
addTag(nodeId: string, tag: string, actor?: string): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Remove a tag from a node
|
|
137
|
+
* @param nodeId - The node ID
|
|
138
|
+
* @param tag - The tag to remove
|
|
139
|
+
* @param actor - Optional actor identifier for audit trail
|
|
140
|
+
*/
|
|
141
|
+
removeTag(nodeId: string, tag: string, actor?: string): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Get all tags for a node
|
|
144
|
+
* @param nodeId - The node ID
|
|
145
|
+
* @returns Array of tag strings
|
|
146
|
+
*/
|
|
147
|
+
getTags(nodeId: string): Promise<string[]>;
|
|
148
|
+
/**
|
|
149
|
+
* Get tags for multiple nodes (batch operation)
|
|
150
|
+
* @param nodeIds - Array of node IDs
|
|
151
|
+
* @returns Map of node ID to tags array
|
|
152
|
+
*/
|
|
153
|
+
getTagsForNodes(nodeIds: string[]): Promise<Map<string, string[]>>;
|
|
154
|
+
/**
|
|
155
|
+
* Get all nodes with a specific tag
|
|
156
|
+
* @param tag - The tag to search for
|
|
157
|
+
* @returns Nodes that have this tag
|
|
158
|
+
*/
|
|
159
|
+
getNodesByTag(tag: string): Promise<StoredNode[]>;
|
|
160
|
+
/**
|
|
161
|
+
* Get tasks that are ready to work on (no active blockers)
|
|
162
|
+
*
|
|
163
|
+
* A task is ready if:
|
|
164
|
+
* - type = 'task'
|
|
165
|
+
* - status = 'open'
|
|
166
|
+
* - not archived
|
|
167
|
+
* - no blocking tasks that are not closed
|
|
168
|
+
*
|
|
169
|
+
* @returns Ready tasks
|
|
170
|
+
*/
|
|
171
|
+
getReady(): Promise<StoredNode[]>;
|
|
172
|
+
/**
|
|
173
|
+
* Execute a function within a transaction
|
|
174
|
+
*
|
|
175
|
+
* If the function throws, the transaction is rolled back.
|
|
176
|
+
* If the function completes, the transaction is committed.
|
|
177
|
+
*
|
|
178
|
+
* @param fn - Function to execute within transaction
|
|
179
|
+
* @returns The result of the function
|
|
180
|
+
*/
|
|
181
|
+
runInTransaction<T>(fn: (tx: Transaction) => Promise<T>): Promise<T>;
|
|
182
|
+
/**
|
|
183
|
+
* Mark a node as dirty (changed, needs export)
|
|
184
|
+
* @param nodeId - The node ID to mark
|
|
185
|
+
*/
|
|
186
|
+
markDirty(nodeId: string): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Get all dirty node IDs
|
|
189
|
+
* @returns Array of node IDs that have been modified
|
|
190
|
+
*/
|
|
191
|
+
getDirtyNodes(): Promise<string[]>;
|
|
192
|
+
/**
|
|
193
|
+
* Clear dirty status for nodes (after export)
|
|
194
|
+
* @param nodeIds - Node IDs to clear
|
|
195
|
+
*/
|
|
196
|
+
clearDirty(nodeIds: string[]): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Close the storage connection and release resources
|
|
199
|
+
*/
|
|
200
|
+
close(): Promise<void>;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Configuration for node filter with defaults applied
|
|
204
|
+
*/
|
|
205
|
+
export interface ResolvedNodeFilter {
|
|
206
|
+
type: string[] | null;
|
|
207
|
+
status: string[] | null;
|
|
208
|
+
tags: string[] | null;
|
|
209
|
+
parent_id: string | null;
|
|
210
|
+
archived: boolean | null;
|
|
211
|
+
search: string | null;
|
|
212
|
+
limit: number;
|
|
213
|
+
offset: number;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Resolve a NodeFilter to have consistent types and defaults
|
|
217
|
+
*/
|
|
218
|
+
export declare function resolveNodeFilter(filter: NodeFilter): ResolvedNodeFilter;
|
|
219
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/storage/interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAG1B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAEhD,2CAA2C;IAC3C,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IAEhD,iDAAiD;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K,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,kBAAkB,CAWxE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage interface for OpenTasks
|
|
3
|
+
*
|
|
4
|
+
* Domain-driven storage interface following beads pattern.
|
|
5
|
+
* Defines operations for nodes, edges, tags, and queries.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resolve a NodeFilter to have consistent types and defaults
|
|
9
|
+
*/
|
|
10
|
+
export function resolveNodeFilter(filter) {
|
|
11
|
+
return {
|
|
12
|
+
type: filter.type ? (Array.isArray(filter.type) ? filter.type : [filter.type]) : null,
|
|
13
|
+
status: filter.status ? (Array.isArray(filter.status) ? filter.status : [filter.status]) : null,
|
|
14
|
+
tags: filter.tags || null,
|
|
15
|
+
parent_id: filter.parent_id || null,
|
|
16
|
+
archived: filter.archived ?? null,
|
|
17
|
+
search: filter.search || null,
|
|
18
|
+
limit: filter.limit || 100,
|
|
19
|
+
offset: filter.offset || 0,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/storage/interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6QH;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACrF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QAC/F,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI;QACzB,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;QACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI;QACjC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,IAAI;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,GAAG;QAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC;KAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSONL Persister for OpenTasks
|
|
3
|
+
*
|
|
4
|
+
* Git-friendly JSONL storage as source of truth.
|
|
5
|
+
* Each line is a JSON object (node or edge).
|
|
6
|
+
*/
|
|
7
|
+
import type { StoredNode, StoredEdge } from '../schema/storage.js';
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for JSONL Persister
|
|
10
|
+
*/
|
|
11
|
+
export interface JSONLPersisterConfig {
|
|
12
|
+
/** Path to the JSONL file (e.g., ".opentasks/graph.jsonl") */
|
|
13
|
+
path: string;
|
|
14
|
+
/** Optional path for tombstones (soft deletes) */
|
|
15
|
+
tombstonesPath?: string;
|
|
16
|
+
/** Use atomic writes (default: true) */
|
|
17
|
+
atomicWrite?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Result of loading a JSONL file
|
|
21
|
+
*/
|
|
22
|
+
export interface LoadResult {
|
|
23
|
+
nodes: StoredNode[];
|
|
24
|
+
edges: StoredEdge[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* JSONL Persister
|
|
28
|
+
*
|
|
29
|
+
* Handles reading/writing graph data to JSONL files.
|
|
30
|
+
* Source of truth for OpenTasks data.
|
|
31
|
+
*/
|
|
32
|
+
export declare class JSONLPersister {
|
|
33
|
+
private readonly config;
|
|
34
|
+
private watcher;
|
|
35
|
+
constructor(config: JSONLPersisterConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Get the file path
|
|
38
|
+
*/
|
|
39
|
+
get filePath(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Check if the JSONL file exists
|
|
42
|
+
*/
|
|
43
|
+
exists(): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Load the entire graph from JSONL
|
|
46
|
+
*
|
|
47
|
+
* Parses each line as JSON and separates nodes from edges.
|
|
48
|
+
* Invalid lines are skipped with a warning.
|
|
49
|
+
*
|
|
50
|
+
* @returns Object with nodes and edges arrays
|
|
51
|
+
*/
|
|
52
|
+
load(): Promise<LoadResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Save the entire graph to JSONL
|
|
55
|
+
*
|
|
56
|
+
* Overwrites the file with all nodes and edges.
|
|
57
|
+
* Uses atomic write by default (temp file + rename).
|
|
58
|
+
*
|
|
59
|
+
* @param nodes - All nodes to save
|
|
60
|
+
* @param edges - All edges to save
|
|
61
|
+
*/
|
|
62
|
+
save(nodes: StoredNode[], edges: StoredEdge[]): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Append a single entry to the JSONL file
|
|
65
|
+
*
|
|
66
|
+
* Useful for incremental writes without rewriting the entire file.
|
|
67
|
+
* Note: This can lead to duplicate entries; use save() for clean state.
|
|
68
|
+
*
|
|
69
|
+
* @param entry - Node or edge to append
|
|
70
|
+
*/
|
|
71
|
+
append(entry: StoredNode | StoredEdge): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Append multiple entries to the JSONL file
|
|
74
|
+
*
|
|
75
|
+
* @param entries - Nodes or edges to append
|
|
76
|
+
*/
|
|
77
|
+
appendMany(entries: Array<StoredNode | StoredEdge>): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Watch the JSONL file for external changes
|
|
80
|
+
*
|
|
81
|
+
* Calls the callback when the file is modified.
|
|
82
|
+
* Uses debouncing to avoid multiple calls for rapid changes.
|
|
83
|
+
*
|
|
84
|
+
* @param callback - Function to call on file change
|
|
85
|
+
* @returns Unsubscribe function
|
|
86
|
+
*/
|
|
87
|
+
watch(callback: () => void): () => void;
|
|
88
|
+
/**
|
|
89
|
+
* Stop watching the file
|
|
90
|
+
*/
|
|
91
|
+
stopWatching(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Delete the JSONL file
|
|
94
|
+
*
|
|
95
|
+
* Use with caution - this removes all data.
|
|
96
|
+
*/
|
|
97
|
+
delete(): Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create a JSONL persister with default configuration
|
|
101
|
+
*
|
|
102
|
+
* @param basePath - Base directory (e.g., ".opentasks")
|
|
103
|
+
* @returns Configured JSONLPersister
|
|
104
|
+
*/
|
|
105
|
+
export declare function createJSONLPersister(basePath: string): JSONLPersister;
|
|
106
|
+
//# sourceMappingURL=jsonl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonl.d.ts","sourceRoot":"","sources":["../../src/storage/jsonl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGnE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IAEb,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAaD;;;;;GAKG;AACH,qBAAa,cAAc;IACzB,OAAO,C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