summaryrefslogtreecommitdiffhomepage
path: root/packages/wire/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/wire/src')
-rw-r--r--packages/wire/src/index.test.ts7
-rw-r--r--packages/wire/src/index.ts7
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. */