@pstdio/pocketcoder-cli 0.6.0 → 0.6.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.
@@ -0,0 +1,39 @@
1
+ CREATE TABLE "workspace_network_events" (
2
+ "workspace_id" uuid,
3
+ "seq" bigint,
4
+ "source_session_id" uuid NOT NULL,
5
+ "source_seq" bigint NOT NULL,
6
+ "occurred_at" timestamp with time zone NOT NULL,
7
+ "decision" text NOT NULL,
8
+ "transport" text NOT NULL,
9
+ "host" text NOT NULL,
10
+ "port" integer NOT NULL,
11
+ "method" text,
12
+ "path" text,
13
+ "matched_rule" text,
14
+ "reason" text NOT NULL,
15
+ CONSTRAINT "workspace_network_events_pkey" PRIMARY KEY("workspace_id","seq"),
16
+ CONSTRAINT "workspace_network_events_workspace_id_source_session_id_source_seq_unique" UNIQUE("workspace_id","source_session_id","source_seq")
17
+ );
18
+ --> statement-breakpoint
19
+ ALTER TABLE "workspaces" ADD COLUMN "network_state" text DEFAULT 'disabled' NOT NULL;--> statement-breakpoint
20
+ ALTER TABLE "workspaces" ADD COLUMN "network_event_seq" bigint DEFAULT 0 NOT NULL;--> statement-breakpoint
21
+ CREATE INDEX "workspace_network_events_page" ON "workspace_network_events" ("workspace_id","seq");--> statement-breakpoint
22
+ ALTER TABLE "workspace_network_events" ADD CONSTRAINT "workspace_network_events_workspace_id_workspaces_id_fkey" FOREIGN KEY ("workspace_id") REFERENCES "workspaces"("id") ON DELETE CASCADE;--> statement-breakpoint
23
+ ALTER TABLE "templates" ADD CONSTRAINT "templates_status_check" CHECK ("status" IN ('active', 'available', 'retired'));--> statement-breakpoint
24
+ ALTER TABLE "warm_pool_runtimes" ADD CONSTRAINT "warm_pool_runtimes_state_check" CHECK ("state" IN ('provisioning', 'ready', 'leasing', 'leased', 'draining', 'failed'));--> statement-breakpoint
25
+ ALTER TABLE "workspace_checkpoints" ADD CONSTRAINT "workspace_checkpoints_state_check" CHECK ("state" IN ('creating', 'ready', 'failed', 'deleting', 'deleted'));--> statement-breakpoint
26
+ ALTER TABLE "workspace_checkpoints" ADD CONSTRAINT "workspace_checkpoints_conversation_restore_check" CHECK ("conversation_restore" IN ('supported', 'filesystem_only', 'unknown'));--> statement-breakpoint
27
+ ALTER TABLE "workspace_operations" ADD CONSTRAINT "workspace_operations_kind_check" CHECK ("kind" IN ('preserve', 'restore', 'verify', 'delete'));--> statement-breakpoint
28
+ ALTER TABLE "workspace_operations" ADD CONSTRAINT "workspace_operations_state_check" CHECK ("state" IN ('pending', 'running', 'succeeded', 'failed'));--> statement-breakpoint
29
+ ALTER TABLE "workspace_state_history" ADD CONSTRAINT "workspace_state_history_from_check" CHECK ("from_state" IS NULL OR "from_state" IN ('queued', 'provisioning', 'connected', 'ready', 'preserving', 'terminating', 'succeeded', 'failed', 'canceled', 'expired', 'preserved'));--> statement-breakpoint
30
+ ALTER TABLE "workspace_state_history" ADD CONSTRAINT "workspace_state_history_to_check" CHECK ("to_state" IN ('queued', 'provisioning', 'connected', 'ready', 'preserving', 'terminating', 'succeeded', 'failed', 'canceled', 'expired', 'preserved'));--> statement-breakpoint
31
+ ALTER TABLE "workspace_state_history" ADD CONSTRAINT "workspace_state_history_reason_check" CHECK ("reason_code" IS NULL OR "reason_code" IN ('child_exit_success', 'child_exit_failure', 'setup_failed', 'bootstrap_failed', 'registration_timeout', 'health_failed', 'child_crash', 'provider_lost', 'disconnect_timeout', 'canceled_by_caller', 'deadline_expired', 'idle_expired', 'queue_timeout', 'launch_failed', 'preserve_requested', 'preserved_by_policy', 'checkpoint_created', 'checkpoint_failed', 'checkpoint_corrupt', 'checkpoint_quota_exceeded', 'checkpoint_storage_lost', 'restore_requested', 'restore_failed', 'image_unavailable', 'source_resolution_failed', 'secret_resolution_failed', 'operation_conflict', 'network_policy_failed'));--> statement-breakpoint
32
+ ALTER TABLE "workspace_storage" ADD CONSTRAINT "workspace_storage_state_check" CHECK ("state" IN ('allocating', 'ready', 'snapshotting', 'retained', 'restoring', 'deleting', 'deleted', 'lost', 'quarantined'));--> statement-breakpoint
33
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_state_check" CHECK ("state" IN ('queued', 'provisioning', 'connected', 'ready', 'preserving', 'terminating', 'succeeded', 'failed', 'canceled', 'expired', 'preserved'));--> statement-breakpoint
34
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_reason_code_check" CHECK ("reason_code" IS NULL OR "reason_code" IN ('child_exit_success', 'child_exit_failure', 'setup_failed', 'bootstrap_failed', 'registration_timeout', 'health_failed', 'child_crash', 'provider_lost', 'disconnect_timeout', 'canceled_by_caller', 'deadline_expired', 'idle_expired', 'queue_timeout', 'launch_failed', 'preserve_requested', 'preserved_by_policy', 'checkpoint_created', 'checkpoint_failed', 'checkpoint_corrupt', 'checkpoint_quota_exceeded', 'checkpoint_storage_lost', 'restore_requested', 'restore_failed', 'image_unavailable', 'source_resolution_failed', 'secret_resolution_failed', 'operation_conflict', 'network_policy_failed'));--> statement-breakpoint
35
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_agent_state_check" CHECK ("agent_state" IN ('unknown', 'running', 'stable'));--> statement-breakpoint
36
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_network_state_check" CHECK ("network_state" IN ('disabled', 'starting', 'ready', 'degraded'));--> statement-breakpoint
37
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_terminal_intent_check" CHECK ("terminal_intent" IS NULL OR "terminal_intent" IN ('queued', 'provisioning', 'connected', 'ready', 'preserving', 'terminating', 'succeeded', 'failed', 'canceled', 'expired', 'preserved'));--> statement-breakpoint
38
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_provisioning_mode_check" CHECK ("provisioning_mode" IS NULL OR "provisioning_mode" IN ('cold', 'warm'));--> statement-breakpoint
39
+ ALTER TABLE "workspaces" ADD CONSTRAINT "workspaces_launch_mode_check" CHECK ("launch_mode" IN ('create', 'restore'));