@effect-agent/storage-sqlite 0.1.0-beta.45 → 0.1.0-beta.47

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 (58) hide show
  1. package/dist/SqliteActivityStore.d.mts +14 -0
  2. package/dist/SqliteActivityStore.mjs +310 -0
  3. package/dist/SqliteActivityStore.mjs.map +1 -0
  4. package/dist/SqliteScheduleStore.d.mts +14 -0
  5. package/dist/SqliteScheduleStore.mjs +255 -0
  6. package/dist/SqliteScheduleStore.mjs.map +1 -0
  7. package/dist/SqliteStorageConfig.d.mts +34 -0
  8. package/dist/SqliteStorageConfig.mjs +39 -0
  9. package/dist/SqliteStorageConfig.mjs.map +1 -0
  10. package/dist/{sqlite-storage-failpoint-Cr0SXflP.d.mts → SqliteStorageError-W1oM5ka3.d.mts} +6 -15
  11. package/dist/SqliteStorageError.d.mts +2 -0
  12. package/dist/SqliteStorageError.mjs +144 -0
  13. package/dist/SqliteStorageError.mjs.map +1 -0
  14. package/dist/SqliteStorageFailpoint.d.mts +17 -0
  15. package/dist/{sqlite-storage-failpoint-DIwWk5dw.mjs → SqliteStorageFailpoint.mjs} +5 -3
  16. package/dist/SqliteStorageFailpoint.mjs.map +1 -0
  17. package/dist/{testing.d.mts → SqliteStorageFailpointTesting.d.mts} +3 -3
  18. package/dist/{testing.mjs → SqliteStorageFailpointTesting.mjs} +3 -3
  19. package/dist/SqliteStorageFailpointTesting.mjs.map +1 -0
  20. package/dist/SqliteStorageVersion-DwQbn4bw.d.mts +9 -0
  21. package/dist/SqliteStorageVersion.d.mts +2 -0
  22. package/dist/SqliteStorageVersion.mjs +8 -0
  23. package/dist/SqliteStorageVersion.mjs.map +1 -0
  24. package/dist/SqliteSubmissionLedger.d.mts +23 -0
  25. package/dist/SqliteSubmissionLedger.mjs +1656 -0
  26. package/dist/SqliteSubmissionLedger.mjs.map +1 -0
  27. package/dist/SqliteSubscriptionStore.d.mts +13 -0
  28. package/dist/SqliteSubscriptionStore.mjs +596 -0
  29. package/dist/SqliteSubscriptionStore.mjs.map +1 -0
  30. package/dist/SqliteThreadStore.d.mts +49 -0
  31. package/dist/SqliteThreadStore.mjs +422 -0
  32. package/dist/SqliteThreadStore.mjs.map +1 -0
  33. package/dist/index.d.mts +10 -108
  34. package/dist/index.mjs +10 -4265
  35. package/dist/migrations-B82C9A3r.mjs +293 -0
  36. package/dist/migrations-B82C9A3r.mjs.map +1 -0
  37. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  38. package/dist/sqlite-journal-C5SZnSdC.mjs +656 -0
  39. package/dist/sqlite-journal-C5SZnSdC.mjs.map +1 -0
  40. package/package.json +1 -1
  41. package/src/{sqlite-activity-store.ts → SqliteActivityStore.ts} +2 -2
  42. package/src/{sqlite-schedule-store.ts → SqliteScheduleStore.ts} +9 -7
  43. package/src/{errors.ts → SqliteStorageError.ts} +1 -1
  44. package/src/{sqlite-storage-failpoint.ts → SqliteStorageFailpoint.ts} +4 -1
  45. package/src/{sqlite-storage-failpoint-testing.ts → SqliteStorageFailpointTesting.ts} +1 -1
  46. package/src/SqliteStorageVersion.ts +2 -0
  47. package/src/{sqlite-ledger.ts → SqliteSubmissionLedger.ts} +17 -15
  48. package/src/{sqlite-subscription-store.ts → SqliteSubscriptionStore.ts} +14 -12
  49. package/src/{sqlite-thread-store.ts → SqliteThreadStore.ts} +19 -21
  50. package/src/index.ts +9 -10
  51. package/src/{sqlite-journal.ts → internal/sqlite-journal.ts} +5 -5
  52. package/dist/index.mjs.map +0 -1
  53. package/dist/sqlite-storage-failpoint-DIwWk5dw.mjs.map +0 -1
  54. package/dist/testing.mjs.map +0 -1
  55. package/src/sqlite-memory-store.ts +0 -7
  56. package/src/testing.ts +0 -2
  57. /package/src/{sqlite-storage-config.ts → SqliteStorageConfig.ts} +0 -0
  58. /package/src/{migrations.ts → internal/migrations.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"sqlite-storage-failpoint-DIwWk5dw.mjs","names":[],"sources":["../src/sqlite-storage-failpoint.ts"],"sourcesContent":["import { Context, Effect, Layer } from \"effect\";\n\nimport type { SqliteStorageFailpointError, SqliteStorageFailpointLocation } from \"./errors.ts\";\n\nexport type SqliteStorageFailpointHandler = (\n location: SqliteStorageFailpointLocation,\n) => Effect.Effect<void, SqliteStorageFailpointError>;\n\nconst noFailpoint: SqliteStorageFailpointHandler = () => Effect.void;\n\n/** Explicit fault-injection authority used at SQLite operation boundaries. */\nexport class SqliteStorageFailpoint extends Context.Service<\n SqliteStorageFailpoint,\n {\n readonly hit: SqliteStorageFailpointHandler;\n }\n>()(\"@effect-agent/storage-sqlite/SqliteStorageFailpoint\") {\n /** Production default: no fault injection. */\n static readonly layer = Layer.succeed(this)({ hit: noFailpoint });\n}\n"],"mappings":";;AAQA,MAAM,oBAAmD,OAAO;;AAGhE,IAAa,yBAAb,cAA4C,QAAQ,QAKlD,CAAC,CAAC,qDAAqD,CAAC,CAAC;;CAEzD,OAAgB,QAAQ,MAAM,QAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC;AAClE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.mjs","names":[],"sources":["../src/sqlite-storage-failpoint-testing.ts"],"sourcesContent":["import { Context, Effect, Layer, Ref } from \"effect\";\n\nimport {\n SqliteStorageFailpoint,\n type SqliteStorageFailpointHandler,\n} from \"./sqlite-storage-failpoint.ts\";\n\nconst noFailpoint: SqliteStorageFailpointHandler = () => Effect.void;\n\n/** Test-only control for replacing the active SQLite failpoint handler. */\nexport class SqliteStorageFailpointTestControl extends Context.Service<\n SqliteStorageFailpointTestControl,\n {\n readonly clear: Effect.Effect<void>;\n readonly setHandler: (handler: SqliteStorageFailpointHandler) => Effect.Effect<void>;\n }\n>()(\"@effect-agent/storage-sqlite/SqliteStorageFailpointTestControl\") {\n /** Reusable test Layer with a control service backed by the same handler Ref. */\n static readonly layer = Layer.effectContext(\n Effect.gen(function* () {\n const handler = yield* Ref.make<SqliteStorageFailpointHandler>(noFailpoint);\n\n return Context.make(\n SqliteStorageFailpoint,\n SqliteStorageFailpoint.of({\n hit: (location) => Ref.get(handler).pipe(Effect.flatMap((current) => current(location))),\n }),\n ).pipe(\n Context.add(\n SqliteStorageFailpointTestControl,\n SqliteStorageFailpointTestControl.of({\n clear: Ref.set(handler, noFailpoint),\n setHandler: (next) => Ref.set(handler, next),\n }),\n ),\n );\n }),\n );\n}\n"],"mappings":";;;AAOA,MAAM,oBAAmD,OAAO;;AAGhE,IAAa,oCAAb,MAAa,0CAA0C,QAAQ,QAM7D,CAAC,CAAC,gEAAgE,CAAC,CAAC;;CAEpE,OAAgB,QAAQ,MAAM,cAC5B,OAAO,IAAI,aAAa;EACtB,MAAM,UAAU,OAAO,IAAI,KAAoC,WAAW;EAE1E,OAAO,QAAQ,KACb,wBACA,uBAAuB,GAAG,EACxB,MAAM,aAAa,IAAI,IAAI,OAAO,CAAC,CAAC,KAAK,OAAO,SAAS,YAAY,QAAQ,QAAQ,CAAC,CAAC,EACzF,CAAC,CACH,CAAC,CAAC,KACA,QAAQ,IACN,mCACA,kCAAkC,GAAG;GACnC,OAAO,IAAI,IAAI,SAAS,WAAW;GACnC,aAAa,SAAS,IAAI,IAAI,SAAS,IAAI;EAC7C,CAAC,CACH,CACF;CACF,CAAC,CACH;AACF"}
@@ -1,7 +0,0 @@
1
- /** Shared SQLite implementation; the caller supplies the Node SQLite client. */
2
- export {
3
- memoryReaderLayer,
4
- memoryStoreLayer,
5
- memoryStoreLayerWithFailpoints,
6
- type SqliteMemoryInitializationError,
7
- } from "@effect-agent/thread/sql-memory";
package/src/testing.ts DELETED
@@ -1,2 +0,0 @@
1
- /** Mutable fault injection for adapter tests. */
2
- export * from "./sqlite-storage-failpoint-testing.ts";
File without changes