mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-11 19:05:16 +00:00
feat(paseo-agent): add browser OAuth start mode
Default daemon-run OAuth to browser mode while keeping device-code explicit for remote-safe setup.
This commit is contained in:
@@ -127,6 +127,7 @@ describe("Paseo Agent config RPC schemas", () => {
|
||||
type: "config.paseo_agent.oauth.start.request",
|
||||
requestId: "req-oauth-start",
|
||||
name: "subscription",
|
||||
mode: "device_code",
|
||||
});
|
||||
const response = SessionOutboundMessageSchema.parse({
|
||||
type: "config.paseo_agent.oauth.start.response",
|
||||
@@ -147,6 +148,7 @@ describe("Paseo Agent config RPC schemas", () => {
|
||||
});
|
||||
|
||||
expect(request.name).toBe("subscription");
|
||||
expect(request.mode).toBe("device_code");
|
||||
expect(response.payload.authorization?.kind).toBe("device_code");
|
||||
expect(response.payload.authorization?.futureField).toBe("kept");
|
||||
});
|
||||
|
||||
@@ -2042,6 +2042,7 @@ export const PaseoAgentOAuthStartRequestSchema = z.object({
|
||||
type: z.literal("config.paseo_agent.oauth.start.request"),
|
||||
requestId: z.string(),
|
||||
name: z.string().trim().min(1),
|
||||
mode: z.string().min(1).optional(),
|
||||
});
|
||||
|
||||
export const PaseoAgentOAuthCompleteRequestSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user