Repository navigation
feat: add runtime actor ref and personal workspace in Relay - #186
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces the single-user
localruntime actor baseline in core (uid 0/gid 0equivalent) and gives each Relay account a personal workspace withslug = "local", setting the foundation for future multiplayer workspaces and Zanzibar-style authorization without adding actor or workspace columns to the harness database.Schema (
@codeworksh/schema)@codeworksh/schema/actor(ActorRef,root = { id: "local", scope: "local" },isRoot, andCurrentContext.Referencedefaulting toroot).WorkspaceSlug,DEFAULT_PERSONAL_WORKSPACE_SLUG("local"),DEFAULT_PERSONAL_WORKSPACE_NAME("Personal Workspace"),isPersonalWorkspace, andslugonRelay.Workspace.personalWorkspaceNamequery parameter onGET /v1/meandRelay.BadRequest(400) onPOST /v1/workspaces.Harness & Host (
packages/harness,packages/codework)Actorfrom@codeworksh/harness/effectand annotatedControl(prompt,run,interrupt) andLoop.runspans withcodework.actor.idandcodework.actor.scope. No harness SQLite changes.HostActorandactorOf(principal)inpackages/codework/src/server/principal.tsand scopedActor.Currentper RPC call indoor.ts.Relay (
infra/relay)2026113001_workspace_slugaddingworkspace.slug NOT NULLandUNIQUE (account_id, slug)with backfill./v1/mecreates the personal workspace (slug = "local", named frompersonalWorkspaceNamewhen supplied, else"Personal Workspace"), always ordered first.infra/relay/src/slug.tsto generate unique ID-tailed slugs for team workspaces onPOST /v1/workspaceswhile refusing"local"(400).Desktop & Docs (
apps/web,docs/internals)personalWorkspaceNameon/v1/me, defaults to the personal workspace, badges it asPersonalin the switcher, and showsPersonal · Only youinstead of disabled team member invites.00_glossary.md,04_runtime.md, and10_relay.md.Testing
vp run verify(build, format, lint, package typechecks, knip): passedvp checkon modifiedapps/webfiles &vp run --filter @codeworksh/web typecheck: passedpackages/harness/test/control.prompt.test.ts&runner.loop.test.ts: 80/80 passedpackages/codework/test/telemetry.test.ts,server.test.ts,pair.test.ts: 50/50 passed (updatedtelemetry.jsonsnapshot)infra/relay/test/me.test.ts: 3/3 passed against local Postgres & Clerk (default"Personal Workspace", client-passed"Sanchit K","Local"refusal, generated unique slugs).scratch/home), and Electron app viaagent-browser: verified personal workspace creation (slug = "local",name = "Sanchit"),"Local"400inline error, and team workspace creation (slug = "plasma-sensor-of-sub-level-cc137ed4").Built with Gemini in Antigravity.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.