1
0
forked from wrenn/wrenn

Refactored to maintain a separate cloud version

Moves 12 packages from internal/ to pkg/ (config, id, validate, events, db,
auth, lifecycle, scheduler, channels, audit, service) so they can be imported
by the enterprise repo as a Go module dependency.

Introduces pkg/cpextension (shared Extension interface + ServerContext) and
pkg/cpserver (Run() entrypoint with functional options) so the enterprise
main.go can call cpserver.Run(cpserver.WithExtensions(...)) without duplicating
the 20-step server bootstrap. Adds db/migrations/embed.go for go:embed access
to OSS SQL migrations from the enterprise module.

cmd/control-plane/main.go is reduced to a 10-line wrapper around cpserver.Run.
This commit is contained in:
2026-04-15 21:41:48 +06:00
parent 11d746dcfc
commit a5ad3731f2
113 changed files with 1137 additions and 543 deletions

View File

@ -144,6 +144,10 @@ message CreateSandboxResponse {
string sandbox_id = 1;
string status = 2;
string host_ip = 3;
// Runtime metadata collected during sandbox creation (e.g. envd_version,
// kernel_version, firecracker_version, agent_version).
map<string, string> metadata = 4;
}
message DestroySandboxRequest {
@ -170,12 +174,20 @@ message ResumeSandboxRequest {
// Default environment variables (set in envd via PostInit on resume).
map<string, string> default_env = 4;
// Kernel version hint from the DB — the agent tries to use the exact version,
// falling back to latest if not found on disk.
string kernel_version = 5;
}
message ResumeSandboxResponse {
string sandbox_id = 1;
string status = 2;
string host_ip = 3;
// Actual runtime metadata after resume (versions may differ from hint if
// the exact kernel was not available).
map<string, string> metadata = 4;
}
message CreateSnapshotRequest {
@ -241,6 +253,9 @@ message SandboxInfo {
int32 timeout_sec = 9;
string team_id = 10;
string template_id = 11;
// Runtime metadata (envd_version, kernel_version, etc.).
map<string, string> metadata = 12;
}
message WriteFileRequest {