@paperclipai/db 0.3.0 → 0.3.1-canary.1

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 (56) hide show
  1. package/dist/backup-lib.d.ts +9 -0
  2. package/dist/backup-lib.d.ts.map +1 -1
  3. package/dist/backup-lib.js +230 -62
  4. package/dist/backup-lib.js.map +1 -1
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +9 -6
  7. package/dist/client.js.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/migrate.js +21 -15
  13. package/dist/migrate.js.map +1 -1
  14. package/dist/migration-runtime.d.ts +7 -0
  15. package/dist/migration-runtime.d.ts.map +1 -0
  16. package/dist/migration-runtime.js +102 -0
  17. package/dist/migration-runtime.js.map +1 -0
  18. package/dist/migration-status.d.ts +2 -0
  19. package/dist/migration-status.d.ts.map +1 -0
  20. package/dist/migration-status.js +37 -0
  21. package/dist/migration-status.js.map +1 -0
  22. package/dist/migrations/0026_lying_pete_wisdom.sql +39 -0
  23. package/dist/migrations/0027_tranquil_tenebrous.sql +2 -0
  24. package/dist/migrations/meta/0026_snapshot.json +6193 -0
  25. package/dist/migrations/meta/0027_snapshot.json +6205 -0
  26. package/dist/migrations/meta/_journal.json +14 -0
  27. package/dist/migrations/migrations/0026_lying_pete_wisdom.sql +39 -0
  28. package/dist/migrations/migrations/0027_tranquil_tenebrous.sql +2 -0
  29. package/dist/migrations/migrations/meta/0026_snapshot.json +6193 -0
  30. package/dist/migrations/migrations/meta/0027_snapshot.json +6205 -0
  31. package/dist/migrations/migrations/meta/_journal.json +14 -0
  32. package/dist/runtime-config.d.ts +16 -0
  33. package/dist/runtime-config.d.ts.map +1 -0
  34. package/dist/runtime-config.js +197 -0
  35. package/dist/runtime-config.js.map +1 -0
  36. package/dist/runtime-config.test.d.ts +2 -0
  37. package/dist/runtime-config.test.d.ts.map +1 -0
  38. package/dist/runtime-config.test.js +93 -0
  39. package/dist/runtime-config.test.js.map +1 -0
  40. package/dist/schema/index.d.ts +1 -0
  41. package/dist/schema/index.d.ts.map +1 -1
  42. package/dist/schema/index.js +1 -0
  43. package/dist/schema/index.js.map +1 -1
  44. package/dist/schema/issues.d.ts +19 -0
  45. package/dist/schema/issues.d.ts.map +1 -1
  46. package/dist/schema/issues.js +1 -0
  47. package/dist/schema/issues.js.map +1 -1
  48. package/dist/schema/projects.d.ts +19 -0
  49. package/dist/schema/projects.d.ts.map +1 -1
  50. package/dist/schema/projects.js +2 -1
  51. package/dist/schema/projects.js.map +1 -1
  52. package/dist/schema/workspace_runtime_services.d.ts +452 -0
  53. package/dist/schema/workspace_runtime_services.d.ts.map +1 -0
  54. package/dist/schema/workspace_runtime_services.js +41 -0
  55. package/dist/schema/workspace_runtime_services.js.map +1 -0
  56. package/package.json +2 -2
@@ -183,6 +183,20 @@
183
183
  "when": 1772807461603,
184
184
  "tag": "0025_nasty_salo",
185
185
  "breakpoints": true
186
+ },
187
+ {
188
+ "idx": 26,
189
+ "version": "7",
190
+ "when": 1773089625430,
191
+ "tag": "0026_lying_pete_wisdom",
192
+ "breakpoints": true
193
+ },
194
+ {
195
+ "idx": 27,
196
+ "version": "7",
197
+ "when": 1773150731736,
198
+ "tag": "0027_tranquil_tenebrous",
199
+ "breakpoints": true
186
200
  }
187
201
  ]
188
202
  }
@@ -0,0 +1,39 @@
1
+ CREATE TABLE "workspace_runtime_services" (
2
+ "id" uuid PRIMARY KEY NOT NULL,
3
+ "company_id" uuid NOT NULL,
4
+ "project_id" uuid,
5
+ "project_workspace_id" uuid,
6
+ "issue_id" uuid,
7
+ "scope_type" text NOT NULL,
8
+ "scope_id" text,
9
+ "service_name" text NOT NULL,
10
+ "status" text NOT NULL,
11
+ "lifecycle" text NOT NULL,
12
+ "reuse_key" text,
13
+ "command" text,
14
+ "cwd" text,
15
+ "port" integer,
16
+ "url" text,
17
+ "provider" text NOT NULL,
18
+ "provider_ref" text,
19
+ "owner_agent_id" uuid,
20
+ "started_by_run_id" uuid,
21
+ "last_used_at" timestamp with time zone DEFAULT now() NOT NULL,
22
+ "started_at" timestamp with time zone DEFAULT now() NOT NULL,
23
+ "stopped_at" timestamp with time zone,
24
+ "stop_policy" jsonb,
25
+ "health_status" text DEFAULT 'unknown' NOT NULL,
26
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
27
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
28
+ );
29
+ --> statement-breakpoint
30
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_company_id_companies_id_fk" FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
31
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
32
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_project_workspace_id_project_workspaces_id_fk" FOREIGN KEY ("project_workspace_id") REFERENCES "public"."project_workspaces"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
33
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_issue_id_issues_id_fk" FOREIGN KEY ("issue_id") REFERENCES "public"."issues"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
34
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_owner_agent_id_agents_id_fk" FOREIGN KEY ("owner_agent_id") REFERENCES "public"."agents"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
35
+ ALTER TABLE "workspace_runtime_services" ADD CONSTRAINT "workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk" FOREIGN KEY ("started_by_run_id") REFERENCES "public"."heartbeat_runs"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
36
+ CREATE INDEX "workspace_runtime_services_company_workspace_status_idx" ON "workspace_runtime_services" USING btree ("company_id","project_workspace_id","status");--> statement-breakpoint
37
+ CREATE INDEX "workspace_runtime_services_company_project_status_idx" ON "workspace_runtime_services" USING btree ("company_id","project_id","status");--> statement-breakpoint
38
+ CREATE INDEX "workspace_runtime_services_run_idx" ON "workspace_runtime_services" USING btree ("started_by_run_id");--> statement-breakpoint
39
+ CREATE INDEX "workspace_runtime_services_company_updated_idx" ON "workspace_runtime_services" USING btree ("company_id","updated_at");
@@ -0,0 +1,2 @@
1
+ ALTER TABLE "issues" ADD COLUMN "execution_workspace_settings" jsonb;--> statement-breakpoint
2
+ ALTER TABLE "projects" ADD COLUMN "execution_workspace_policy" jsonb;