mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-03 11:10:23 +02:00
fix(mobile): restore agent invocation target_type "team" enum value
AgentInvocationTarget.target_type's "team" is an unrelated, inert placeholder from migration 130 (agent_invocation_permission) — "reserved for the future team concept... NOT effective in V1" — not the workspace Team entity this branch renamed to Space. The server's CHECK constraint, Go constant, and packages/core/types/agent.ts all still say "team"; only apps/mobile/data/schemas.ts had been swept to "space" by mistake (most likely an overzealous find/replace during the Team→Space rename), which desynced it from the server and broke mobile's typecheck. Revert schemas.ts and its test back to "team" to match the real server contract. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -551,7 +551,7 @@ export const EMPTY_MEMBER_LIST: MemberWithUser[] = [];
|
||||
|
||||
const AgentInvocationTargetSchema: z.ZodType<AgentInvocationTarget> = z
|
||||
.object({
|
||||
target_type: z.enum(["workspace", "member", "space"]).catch("space"),
|
||||
target_type: z.enum(["workspace", "member", "team"]).catch("team"),
|
||||
target_id: z
|
||||
.string()
|
||||
.nullable()
|
||||
|
||||
@@ -35,7 +35,7 @@ describe("AgentSchema invocation permissions", () => {
|
||||
|
||||
expect(parsed.permission_mode).toBe("private");
|
||||
expect(parsed.invocation_targets).toEqual([
|
||||
{ target_type: "space", target_id: null },
|
||||
{ target_type: "team", target_id: null },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user