diff options
| author | Adam Malczewski <[email protected]> | 2026-06-28 12:59:07 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-28 12:59:07 +0900 |
| commit | 71c635f7d8ee01a2b23d5ddfdfc4bff043980052 (patch) | |
| tree | 1285beba4405e8d0955dcee340a1180aa6ce3a46 /packages/wire/src | |
| parent | b83aa8ddbb7023ae9dd0332b4989d4baa11522af (diff) | |
| download | dispatch-71c635f7d8ee01a2b23d5ddfdfc4bff043980052.tar.gz dispatch-71c635f7d8ee01a2b23d5ddfdfc4bff043980052.zip | |
feat(workspace-star): starred workspace priority for concurrency limiting
Diffstat (limited to 'packages/wire/src')
| -rw-r--r-- | packages/wire/src/index.test.ts | 7 | ||||
| -rw-r--r-- | packages/wire/src/index.ts | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/packages/wire/src/index.test.ts b/packages/wire/src/index.test.ts index 81d10c1..2886ccb 100644 --- a/packages/wire/src/index.test.ts +++ b/packages/wire/src/index.test.ts @@ -42,19 +42,24 @@ describe("@dispatch/wire — Computer / Workspace shapes", () => { expect(entry.usageCount).toBe(3); }); - it("a Workspace carries defaultComputerId (null = local)", () => { + it("a Workspace carries defaultComputerId (null = local) and starred", () => { const remote: Workspace = { id: "default", title: "Default", defaultCwd: null, defaultComputerId: "myserver", + starred: false, createdAt: 0, lastActivityAt: 0, }; expect(remote.defaultComputerId).toBe("myserver"); + expect(remote.starred).toBe(false); const local: Workspace = { ...remote, defaultComputerId: null }; expect(local.defaultComputerId).toBeNull(); + + const starred: Workspace = { ...remote, starred: true }; + expect(starred.starred).toBe(true); }); }); diff --git a/packages/wire/src/index.ts b/packages/wire/src/index.ts index 113f684..aa5b6a8 100644 --- a/packages/wire/src/index.ts +++ b/packages/wire/src/index.ts @@ -651,6 +651,13 @@ export interface Workspace { * (per-conv `computerId` → this → `null`/local). */ readonly defaultComputerId: string | null; + /** + * Whether the workspace is starred by the user. Starred workspaces receive + * PRIORITY in the concurrency limiter queue — their agents jump ahead of + * agents from non-starred workspaces (oldest-agent-first within each group). + * Defaults to `false` on creation. + */ + readonly starred: boolean; /** Epoch-ms when the workspace was first created. */ readonly createdAt: number; /** Epoch-ms of the most recent conversation activity in this workspace. */ |
