Skip to content

Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.

fix(server): drop writable from host grant results (#762)

hahahahahayesyeseys3f3b13be991f
diff --git a/server/src/host-access/schema.ts b/server/src/host-access/schema.ts
index 7b8b47f2..1e04f673 100644
--- a/server/src/host-access/schema.ts
+++ b/server/src/host-access/schema.ts
@@ -42,7 +42,6 @@ export type HostAccessDesktopResult = {
grant?: {
grantId: string;
displayName: string;
- writable?: boolean;
};
};
@@ -90,7 +89,6 @@ export function asHostAccessDesktopResult(
grant: {
grantId: grant.grantId,
displayName: grant.displayName,
- writable: grant.writable === true,
},
}
: {}),
diff --git a/server/tests/host-access-broker.test.ts b/server/tests/host-access-broker.test.ts
index 43767f76..21c54106 100644
--- a/server/tests/host-access-broker.test.ts
+++ b/server/tests/host-access-broker.test.ts
@@ -30,7 +30,6 @@ describe("host access broker", () => {
grant: {
grantId: "native-grant-1",
displayName: "Project",
- writable: false,
},
});
diff --git a/server/tests/host-access-schema.test.ts b/server/tests/host-access-schema.test.ts
new file mode 100644
index 00000000..14a854ff
--- /dev/null
+++ b/server/tests/host-access-schema.test.ts
@@ -0,0 +1,25 @@
+import { describe, expect, test } from "bun:test";
+import { asHostAccessDesktopResult } from "../src/host-access/schema";
+
+describe("host access schema", () => {
+ test("folder grant results keep only the opaque id and display name", () => {
+ expect(
+ asHostAccessDesktopResult({
+ operationId: "operation-1",
+ ok: true,
+ grant: {
+ grantId: "grant-1",
+ displayName: "Project",
+ writable: true,
+ },
+ }),
+ ).toEqual({
+ operationId: "operation-1",
+ ok: true,
+ grant: {
+ grantId: "grant-1",
+ displayName: "Project",
+ },
+ });
+ });
+});