@usine/engine 0.0.1 → 0.2.0

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 (142) hide show
  1. package/README.md +91 -2
  2. package/dist/cursor/cursor.d.ts +20 -0
  3. package/dist/cursor/cursor.d.ts.map +1 -0
  4. package/dist/cursor/cursor.js +55 -0
  5. package/dist/cursor/cursor.js.map +1 -0
  6. package/dist/cycle-budget/cycle-budget.d.ts +25 -0
  7. package/dist/cycle-budget/cycle-budget.d.ts.map +1 -0
  8. package/dist/cycle-budget/cycle-budget.js +117 -0
  9. package/dist/cycle-budget/cycle-budget.js.map +1 -0
  10. package/dist/cycle-budget/model.d.ts +26 -0
  11. package/dist/cycle-budget/model.d.ts.map +1 -0
  12. package/dist/cycle-budget/model.js +20 -0
  13. package/dist/cycle-budget/model.js.map +1 -0
  14. package/dist/cycle-budget/queries.d.ts +27 -0
  15. package/dist/cycle-budget/queries.d.ts.map +1 -0
  16. package/dist/cycle-budget/queries.js +175 -0
  17. package/dist/cycle-budget/queries.js.map +1 -0
  18. package/dist/database/database.d.ts +15 -0
  19. package/dist/database/database.d.ts.map +1 -0
  20. package/dist/database/database.js +5 -0
  21. package/dist/database/database.js.map +1 -0
  22. package/dist/database/local-sqlite.d.ts +37 -0
  23. package/dist/database/local-sqlite.d.ts.map +1 -0
  24. package/dist/database/local-sqlite.js +144 -0
  25. package/dist/database/local-sqlite.js.map +1 -0
  26. package/dist/database/schema.d.ts +1341 -0
  27. package/dist/database/schema.d.ts.map +1 -0
  28. package/dist/database/schema.js +224 -0
  29. package/dist/database/schema.js.map +1 -0
  30. package/dist/engine/engine.d.ts +55 -0
  31. package/dist/engine/engine.d.ts.map +1 -0
  32. package/dist/engine/engine.js +193 -0
  33. package/dist/engine/engine.js.map +1 -0
  34. package/dist/engine/error.d.ts +37 -0
  35. package/dist/engine/error.d.ts.map +1 -0
  36. package/dist/engine/error.js +41 -0
  37. package/dist/engine/error.js.map +1 -0
  38. package/dist/engine/lifecycle.d.ts +112 -0
  39. package/dist/engine/lifecycle.d.ts.map +1 -0
  40. package/dist/engine/lifecycle.js +132 -0
  41. package/dist/engine/lifecycle.js.map +1 -0
  42. package/dist/engine/shutdown.d.ts +12 -0
  43. package/dist/engine/shutdown.d.ts.map +1 -0
  44. package/dist/engine/shutdown.js +10 -0
  45. package/dist/engine/shutdown.js.map +1 -0
  46. package/dist/engine/submission.d.ts +58 -0
  47. package/dist/engine/submission.d.ts.map +1 -0
  48. package/dist/engine/submission.js +54 -0
  49. package/dist/engine/submission.js.map +1 -0
  50. package/dist/item-projection/item-projection.d.ts +25 -0
  51. package/dist/item-projection/item-projection.d.ts.map +1 -0
  52. package/dist/item-projection/item-projection.js +100 -0
  53. package/dist/item-projection/item-projection.js.map +1 -0
  54. package/dist/item-projection/model.d.ts +18 -0
  55. package/dist/item-projection/model.d.ts.map +1 -0
  56. package/dist/item-projection/model.js +16 -0
  57. package/dist/item-projection/model.js.map +1 -0
  58. package/dist/loop-control/loop-control.d.ts +21 -0
  59. package/dist/loop-control/loop-control.d.ts.map +1 -0
  60. package/dist/loop-control/loop-control.js +71 -0
  61. package/dist/loop-control/loop-control.js.map +1 -0
  62. package/dist/loop-control/model.d.ts +10 -0
  63. package/dist/loop-control/model.d.ts.map +1 -0
  64. package/dist/loop-control/model.js +9 -0
  65. package/dist/loop-control/model.js.map +1 -0
  66. package/dist/repository-label-projection/model.d.ts +19 -0
  67. package/dist/repository-label-projection/model.d.ts.map +1 -0
  68. package/dist/repository-label-projection/model.js +20 -0
  69. package/dist/repository-label-projection/model.js.map +1 -0
  70. package/dist/repository-label-projection/repository-label-projection.d.ts +20 -0
  71. package/dist/repository-label-projection/repository-label-projection.d.ts.map +1 -0
  72. package/dist/repository-label-projection/repository-label-projection.js +83 -0
  73. package/dist/repository-label-projection/repository-label-projection.js.map +1 -0
  74. package/dist/run-reader/model.d.ts +46 -0
  75. package/dist/run-reader/model.d.ts.map +1 -0
  76. package/dist/run-reader/model.js +44 -0
  77. package/dist/run-reader/model.js.map +1 -0
  78. package/dist/run-reader/run-reader.d.ts +29 -0
  79. package/dist/run-reader/run-reader.d.ts.map +1 -0
  80. package/dist/run-reader/run-reader.js +44 -0
  81. package/dist/run-reader/run-reader.js.map +1 -0
  82. package/dist/step-executor.d.ts +43 -0
  83. package/dist/step-executor.d.ts.map +1 -0
  84. package/dist/step-executor.js +25 -0
  85. package/dist/step-executor.js.map +1 -0
  86. package/dist/store/codec.d.ts +495 -0
  87. package/dist/store/codec.d.ts.map +1 -0
  88. package/dist/store/codec.js +162 -0
  89. package/dist/store/codec.js.map +1 -0
  90. package/dist/store/queries.d.ts +107 -0
  91. package/dist/store/queries.d.ts.map +1 -0
  92. package/dist/store/queries.js +543 -0
  93. package/dist/store/queries.js.map +1 -0
  94. package/dist/store/store.d.ts +101 -0
  95. package/dist/store/store.d.ts.map +1 -0
  96. package/dist/store/store.js +432 -0
  97. package/dist/store/store.js.map +1 -0
  98. package/dist/transcript.d.ts +64 -0
  99. package/dist/transcript.d.ts.map +1 -0
  100. package/dist/transcript.js +59 -0
  101. package/dist/transcript.js.map +1 -0
  102. package/dist/workflow/admission.d.ts +13 -0
  103. package/dist/workflow/admission.d.ts.map +1 -0
  104. package/dist/workflow/admission.js +55 -0
  105. package/dist/workflow/admission.js.map +1 -0
  106. package/dist/workflow/command.d.ts +13 -0
  107. package/dist/workflow/command.d.ts.map +1 -0
  108. package/dist/workflow/command.js +17 -0
  109. package/dist/workflow/command.js.map +1 -0
  110. package/dist/workflow/workflow.d.ts +18 -0
  111. package/dist/workflow/workflow.d.ts.map +1 -0
  112. package/dist/workflow/workflow.js +108 -0
  113. package/dist/workflow/workflow.js.map +1 -0
  114. package/drizzle/20260825055549_initial_runtime/migration.sql +73 -0
  115. package/drizzle/20260825055549_initial_runtime/snapshot.json +592 -0
  116. package/drizzle/20260830191125_polling_cursors/migration.sql +5 -0
  117. package/drizzle/20260830191125_polling_cursors/snapshot.json +629 -0
  118. package/drizzle/20260831073158_attempt_channel/migration.sql +36 -0
  119. package/drizzle/20260831073158_attempt_channel/snapshot.json +845 -0
  120. package/drizzle/20260831133534_agent_context/migration.sql +49 -0
  121. package/drizzle/20260831133534_agent_context/snapshot.json +897 -0
  122. package/drizzle/20260831134612_attempt_brain/migration.sql +26 -0
  123. package/drizzle/20260831134612_attempt_brain/snapshot.json +923 -0
  124. package/drizzle/20260831194605_loop_runtime/migration.sql +4 -0
  125. package/drizzle/20260831194605_loop_runtime/snapshot.json +954 -0
  126. package/drizzle/20260901073233_projection_revision/migration.sql +55 -0
  127. package/drizzle/20260901073233_projection_revision/snapshot.json +991 -0
  128. package/drizzle/20260901180433_item_projections/migration.sql +22 -0
  129. package/drizzle/20260901180433_item_projections/snapshot.json +1110 -0
  130. package/drizzle/20260901185146_repository_label_projections/migration.sql +17 -0
  131. package/drizzle/20260901185146_repository_label_projections/snapshot.json +1147 -0
  132. package/drizzle/20260903091940_queued_approved_runs/migration.sql +3 -0
  133. package/drizzle/20260903091940_queued_approved_runs/snapshot.json +1147 -0
  134. package/drizzle/20260905150403_item_cycle_budgets/migration.sql +58 -0
  135. package/drizzle/20260905150403_item_cycle_budgets/snapshot.json +1417 -0
  136. package/drizzle/20260905174009_item_run_history/migration.sql +1 -0
  137. package/drizzle/20260905174009_item_run_history/snapshot.json +1431 -0
  138. package/package.json +60 -6
  139. package/dist/index.d.ts +0 -8
  140. package/dist/index.d.ts.map +0 -1
  141. package/dist/index.js +0 -8
  142. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usine/engine",
3
- "version": "0.0.1",
3
+ "version": "0.2.0",
4
4
  "description": "The usine run engine: event ledger, dedup/supersede/revoke, run scheduling, durable-execution seam, SQLite store.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -9,21 +9,72 @@
9
9
  "directory": "packages/engine"
10
10
  },
11
11
  "files": [
12
- "dist"
12
+ "dist",
13
+ "drizzle"
13
14
  ],
14
15
  "type": "module",
15
16
  "sideEffects": false,
16
17
  "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "default": "./dist/index.js"
18
+ "./cycle-budget": {
19
+ "types": "./dist/cycle-budget/cycle-budget.d.ts",
20
+ "default": "./dist/cycle-budget/cycle-budget.js"
21
+ },
22
+ "./engine": {
23
+ "types": "./dist/engine/engine.d.ts",
24
+ "default": "./dist/engine/engine.js"
25
+ },
26
+ "./local-sqlite": {
27
+ "types": "./dist/database/local-sqlite.d.ts",
28
+ "default": "./dist/database/local-sqlite.js"
29
+ },
30
+ "./loop-control": {
31
+ "types": "./dist/loop-control/loop-control.d.ts",
32
+ "default": "./dist/loop-control/loop-control.js"
33
+ },
34
+ "./run-reader": {
35
+ "types": "./dist/run-reader/run-reader.d.ts",
36
+ "default": "./dist/run-reader/run-reader.js"
37
+ },
38
+ "./step-executor": {
39
+ "types": "./dist/step-executor.d.ts",
40
+ "default": "./dist/step-executor.js"
41
+ },
42
+ "./transcript": {
43
+ "types": "./dist/transcript.d.ts",
44
+ "default": "./dist/transcript.js"
45
+ },
46
+ "./database": {
47
+ "types": "./dist/database/database.d.ts",
48
+ "default": "./dist/database/database.js"
49
+ },
50
+ "./item-projection": {
51
+ "types": "./dist/item-projection/item-projection.d.ts",
52
+ "default": "./dist/item-projection/item-projection.js"
53
+ },
54
+ "./repository-label-projection": {
55
+ "types": "./dist/repository-label-projection/repository-label-projection.d.ts",
56
+ "default": "./dist/repository-label-projection/repository-label-projection.js"
57
+ },
58
+ "./cursor": {
59
+ "types": "./dist/cursor/cursor.d.ts",
60
+ "default": "./dist/cursor/cursor.js"
20
61
  }
21
62
  },
22
63
  "publishConfig": {
23
64
  "access": "public"
24
65
  },
66
+ "dependencies": {
67
+ "@effect/platform-node": "4.0.0-rc.111",
68
+ "@effect/sql-sqlite-node": "4.0.0-rc.111",
69
+ "drizzle-orm": "1.0.0-rc.4",
70
+ "@usine/core": "0.2.0"
71
+ },
25
72
  "devDependencies": {
73
+ "@effect/vitest": "4.0.0-rc.111",
74
+ "drizzle-kit": "1.0.0-rc.4",
75
+ "effect": "4.0.0-rc.111",
26
76
  "typescript": "7.0.2",
77
+ "vitest": "4.1.11",
27
78
  "@usine/tsconfig": "0.0.0"
28
79
  },
29
80
  "peerDependencies": {
@@ -33,6 +84,9 @@
33
84
  "node": ">=22"
34
85
  },
35
86
  "scripts": {
36
- "build": "tsc -b"
87
+ "build": "tsc -b",
88
+ "check": "tsc -p tsconfig.check.json",
89
+ "db:generate": "drizzle-kit generate --config drizzle.config.ts",
90
+ "test": "vitest run"
37
91
  }
38
92
  }
package/dist/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * @usine/engine — The usine run engine: event ledger, dedup/supersede/revoke, run scheduling, durable-execution seam, SQLite store.
3
- *
4
- * Not implemented yet: this 0.0.x release reserves the block's seam while the
5
- * engine grows.
6
- */
7
- export {};
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC"}
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * @usine/engine — The usine run engine: event ledger, dedup/supersede/revoke, run scheduling, durable-execution seam, SQLite store.
3
- *
4
- * Not implemented yet: this 0.0.x release reserves the block's seam while the
5
- * engine grows.
6
- */
7
- export {};
8
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC"}