Official
sidebar
Built-in sidebar UI (JavaScript UI plugin).
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/sidebar@0.2.7
Permissions in 0.2.7
Files
contract.ts1018 B
// The divergence/sidebar service: other plugins snooze and unsnooze the
// list's rows, named by the task id a row menu entry's command gets as its
// target. Zod is the contract; the host derives JSON Schema from it and
// checks every call and result.
import * as z from "zod";
import { defineService } from "divergence/services";
export const SidebarService = defineService("divergence/sidebar", "1.0.0", {
methods: {
// Moves the row to the top of Snoozed until `until` (epoch milliseconds),
// or until it is unsnoozed when null.
snooze: {
params: z.object({ taskId: z.string(), until: z.number().nullable() }),
result: z.null(),
errors: [z.object({ _tag: z.literal("UnknownRow"), message: z.string() })],
},
// Puts a snoozed row back where its state puts it; a row that is not
// snoozed, or no longer listed, stays as it is.
unsnooze: { params: z.object({ taskId: z.string() }), result: z.null() },
},
});
export type SidebarService = typeof SidebarService;
No comments yet.