@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.
- package/README.md +91 -2
- package/dist/cursor/cursor.d.ts +20 -0
- package/dist/cursor/cursor.d.ts.map +1 -0
- package/dist/cursor/cursor.js +55 -0
- package/dist/cursor/cursor.js.map +1 -0
- package/dist/cycle-budget/cycle-budget.d.ts +25 -0
- package/dist/cycle-budget/cycle-budget.d.ts.map +1 -0
- package/dist/cycle-budget/cycle-budget.js +117 -0
- package/dist/cycle-budget/cycle-budget.js.map +1 -0
- package/dist/cycle-budget/model.d.ts +26 -0
- package/dist/cycle-budget/model.d.ts.map +1 -0
- package/dist/cycle-budget/model.js +20 -0
- package/dist/cycle-budget/model.js.map +1 -0
- package/dist/cycle-budget/queries.d.ts +27 -0
- package/dist/cycle-budget/queries.d.ts.map +1 -0
- package/dist/cycle-budget/queries.js +175 -0
- package/dist/cycle-budget/queries.js.map +1 -0
- package/dist/database/database.d.ts +15 -0
- package/dist/database/database.d.ts.map +1 -0
- package/dist/database/database.js +5 -0
- package/dist/database/database.js.map +1 -0
- package/dist/database/local-sqlite.d.ts +37 -0
- package/dist/database/local-sqlite.d.ts.map +1 -0
- package/dist/database/local-sqlite.js +144 -0
- package/dist/database/local-sqlite.js.map +1 -0
- package/dist/database/schema.d.ts +1341 -0
- package/dist/database/schema.d.ts.map +1 -0
- package/dist/database/schema.js +224 -0
- package/dist/database/schema.js.map +1 -0
- package/dist/engine/engine.d.ts +55 -0
- package/dist/engine/engine.d.ts.map +1 -0
- package/dist/engine/engine.js +193 -0
- package/dist/engine/engine.js.map +1 -0
- package/dist/engine/error.d.ts +37 -0
- package/dist/engine/error.d.ts.map +1 -0
- package/dist/engine/error.js +41 -0
- package/dist/engine/error.js.map +1 -0
- package/dist/engine/lifecycle.d.ts +112 -0
- package/dist/engine/lifecycle.d.ts.map +1 -0
- package/dist/engine/lifecycle.js +132 -0
- package/dist/engine/lifecycle.js.map +1 -0
- package/dist/engine/shutdown.d.ts +12 -0
- package/dist/engine/shutdown.d.ts.map +1 -0
- package/dist/engine/shutdown.js +10 -0
- package/dist/engine/shutdown.js.map +1 -0
- package/dist/engine/submission.d.ts +58 -0
- package/dist/engine/submission.d.ts.map +1 -0
- package/dist/engine/submission.js +54 -0
- package/dist/engine/submission.js.map +1 -0
- package/dist/item-projection/item-projection.d.ts +25 -0
- package/dist/item-projection/item-projection.d.ts.map +1 -0
- package/dist/item-projection/item-projection.js +100 -0
- package/dist/item-projection/item-projection.js.map +1 -0
- package/dist/item-projection/model.d.ts +18 -0
- package/dist/item-projection/model.d.ts.map +1 -0
- package/dist/item-projection/model.js +16 -0
- package/dist/item-projection/model.js.map +1 -0
- package/dist/loop-control/loop-control.d.ts +21 -0
- package/dist/loop-control/loop-control.d.ts.map +1 -0
- package/dist/loop-control/loop-control.js +71 -0
- package/dist/loop-control/loop-control.js.map +1 -0
- package/dist/loop-control/model.d.ts +10 -0
- package/dist/loop-control/model.d.ts.map +1 -0
- package/dist/loop-control/model.js +9 -0
- package/dist/loop-control/model.js.map +1 -0
- package/dist/repository-label-projection/model.d.ts +19 -0
- package/dist/repository-label-projection/model.d.ts.map +1 -0
- package/dist/repository-label-projection/model.js +20 -0
- package/dist/repository-label-projection/model.js.map +1 -0
- package/dist/repository-label-projection/repository-label-projection.d.ts +20 -0
- package/dist/repository-label-projection/repository-label-projection.d.ts.map +1 -0
- package/dist/repository-label-projection/repository-label-projection.js +83 -0
- package/dist/repository-label-projection/repository-label-projection.js.map +1 -0
- package/dist/run-reader/model.d.ts +46 -0
- package/dist/run-reader/model.d.ts.map +1 -0
- package/dist/run-reader/model.js +44 -0
- package/dist/run-reader/model.js.map +1 -0
- package/dist/run-reader/run-reader.d.ts +29 -0
- package/dist/run-reader/run-reader.d.ts.map +1 -0
- package/dist/run-reader/run-reader.js +44 -0
- package/dist/run-reader/run-reader.js.map +1 -0
- package/dist/step-executor.d.ts +43 -0
- package/dist/step-executor.d.ts.map +1 -0
- package/dist/step-executor.js +25 -0
- package/dist/step-executor.js.map +1 -0
- package/dist/store/codec.d.ts +495 -0
- package/dist/store/codec.d.ts.map +1 -0
- package/dist/store/codec.js +162 -0
- package/dist/store/codec.js.map +1 -0
- package/dist/store/queries.d.ts +107 -0
- package/dist/store/queries.d.ts.map +1 -0
- package/dist/store/queries.js +543 -0
- package/dist/store/queries.js.map +1 -0
- package/dist/store/store.d.ts +101 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +432 -0
- package/dist/store/store.js.map +1 -0
- package/dist/transcript.d.ts +64 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transcript.js +59 -0
- package/dist/transcript.js.map +1 -0
- package/dist/workflow/admission.d.ts +13 -0
- package/dist/workflow/admission.d.ts.map +1 -0
- package/dist/workflow/admission.js +55 -0
- package/dist/workflow/admission.js.map +1 -0
- package/dist/workflow/command.d.ts +13 -0
- package/dist/workflow/command.d.ts.map +1 -0
- package/dist/workflow/command.js +17 -0
- package/dist/workflow/command.js.map +1 -0
- package/dist/workflow/workflow.d.ts +18 -0
- package/dist/workflow/workflow.d.ts.map +1 -0
- package/dist/workflow/workflow.js +108 -0
- package/dist/workflow/workflow.js.map +1 -0
- package/drizzle/20260825055549_initial_runtime/migration.sql +73 -0
- package/drizzle/20260825055549_initial_runtime/snapshot.json +592 -0
- package/drizzle/20260830191125_polling_cursors/migration.sql +5 -0
- package/drizzle/20260830191125_polling_cursors/snapshot.json +629 -0
- package/drizzle/20260831073158_attempt_channel/migration.sql +36 -0
- package/drizzle/20260831073158_attempt_channel/snapshot.json +845 -0
- package/drizzle/20260831133534_agent_context/migration.sql +49 -0
- package/drizzle/20260831133534_agent_context/snapshot.json +897 -0
- package/drizzle/20260831134612_attempt_brain/migration.sql +26 -0
- package/drizzle/20260831134612_attempt_brain/snapshot.json +923 -0
- package/drizzle/20260831194605_loop_runtime/migration.sql +4 -0
- package/drizzle/20260831194605_loop_runtime/snapshot.json +954 -0
- package/drizzle/20260901073233_projection_revision/migration.sql +55 -0
- package/drizzle/20260901073233_projection_revision/snapshot.json +991 -0
- package/drizzle/20260901180433_item_projections/migration.sql +22 -0
- package/drizzle/20260901180433_item_projections/snapshot.json +1110 -0
- package/drizzle/20260901185146_repository_label_projections/migration.sql +17 -0
- package/drizzle/20260901185146_repository_label_projections/snapshot.json +1147 -0
- package/drizzle/20260903091940_queued_approved_runs/migration.sql +3 -0
- package/drizzle/20260903091940_queued_approved_runs/snapshot.json +1147 -0
- package/drizzle/20260905150403_item_cycle_budgets/migration.sql +58 -0
- package/drizzle/20260905150403_item_cycle_budgets/snapshot.json +1417 -0
- package/drizzle/20260905174009_item_run_history/migration.sql +1 -0
- package/drizzle/20260905174009_item_run_history/snapshot.json +1431 -0
- package/package.json +60 -6
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
ALTER TABLE `usine_attempts` ADD `brain_json` text;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE `usine_attempts` ADD `parent_model` text;--> statement-breakpoint
|
|
3
|
+
UPDATE `usine_attempts` SET `brain_json` = '{"harness":"pi","model":"legacy-stub","effort":"off"}' WHERE `brain_json` IS NULL;--> statement-breakpoint
|
|
4
|
+
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
5
|
+
CREATE TABLE `__new_usine_attempts` (
|
|
6
|
+
`attempt_id` text PRIMARY KEY,
|
|
7
|
+
`run_id` text NOT NULL,
|
|
8
|
+
`step_name` text NOT NULL,
|
|
9
|
+
`worker_name` text NOT NULL,
|
|
10
|
+
`attempt_number` integer NOT NULL,
|
|
11
|
+
`brain_json` text NOT NULL,
|
|
12
|
+
`parent_model` text,
|
|
13
|
+
`started_at` text NOT NULL,
|
|
14
|
+
`outcome_json` text,
|
|
15
|
+
CONSTRAINT `fk_usine_attempts_run_id_step_name_usine_steps_run_id_step_name_fk` FOREIGN KEY (`run_id`,`step_name`) REFERENCES `usine_steps`(`run_id`,`step_name`),
|
|
16
|
+
CONSTRAINT "usine_attempts_number" CHECK("attempt_number" >= 1),
|
|
17
|
+
CONSTRAINT "usine_attempts_brain_json_valid" CHECK(json_valid("brain_json")),
|
|
18
|
+
CONSTRAINT "usine_attempts_outcome_json_valid" CHECK("outcome_json" is null or json_valid("outcome_json"))
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
INSERT INTO `__new_usine_attempts`(`attempt_id`, `run_id`, `step_name`, `worker_name`, `attempt_number`, `brain_json`, `parent_model`, `started_at`, `outcome_json`) SELECT `attempt_id`, `run_id`, `step_name`, `worker_name`, `attempt_number`, `brain_json`, `parent_model`, `started_at`, `outcome_json` FROM `usine_attempts`;--> statement-breakpoint
|
|
22
|
+
DROP TABLE `usine_attempts`;--> statement-breakpoint
|
|
23
|
+
ALTER TABLE `__new_usine_attempts` RENAME TO `usine_attempts`;--> statement-breakpoint
|
|
24
|
+
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
|
25
|
+
CREATE UNIQUE INDEX `usine_attempt_number` ON `usine_attempts` (`run_id`,`step_name`,`attempt_number`);--> statement-breakpoint
|
|
26
|
+
CREATE UNIQUE INDEX `usine_one_in_flight_attempt` ON `usine_attempts` (`run_id`) WHERE "usine_attempts"."outcome_json" is null;
|