mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-30 20:39:46 +02:00
index slack and add to home page
This commit is contained in:
parent
d47cab6a0f
commit
a22635126a
12 changed files with 1436 additions and 27 deletions
|
|
@ -24,6 +24,25 @@ import { EmailBlockSchema, GmailThreadSchema } from './blocks.js';
|
|||
// Runtime Validation Schemas (Single Source of Truth)
|
||||
// ============================================================================
|
||||
|
||||
const KnowledgeSourceScopeSchema = z.object({
|
||||
type: z.string(),
|
||||
id: z.string(),
|
||||
name: z.string().optional(),
|
||||
workspaceUrl: z.string().optional(),
|
||||
});
|
||||
|
||||
const KnowledgeSourceConfigSchema = z.object({
|
||||
id: z.string(),
|
||||
provider: z.enum(['gmail', 'meeting', 'voice_memo', 'slack', 'github', 'linear']),
|
||||
enabled: z.boolean(),
|
||||
artifactDir: z.string(),
|
||||
syncMode: z.enum(['file', 'poll', 'event', 'manual']).default('file'),
|
||||
intervalMs: z.number().int().positive().optional(),
|
||||
scopes: z.array(KnowledgeSourceScopeSchema).default([]),
|
||||
instructions: z.string().optional(),
|
||||
filters: z.record(z.string(), z.unknown()).optional(),
|
||||
});
|
||||
|
||||
const ipcSchemas = {
|
||||
'app:getVersions': {
|
||||
req: z.null(),
|
||||
|
|
@ -478,6 +497,52 @@ const ipcSchemas = {
|
|||
error: z.string().optional(),
|
||||
}),
|
||||
},
|
||||
'slack:listChannels': {
|
||||
req: z.object({
|
||||
workspaceUrl: z.string(),
|
||||
}),
|
||||
res: z.object({
|
||||
channels: z.array(z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
isPrivate: z.boolean().optional(),
|
||||
isMember: z.boolean().optional(),
|
||||
})),
|
||||
error: z.string().optional(),
|
||||
}),
|
||||
},
|
||||
'slack:getRecentMessages': {
|
||||
req: z.object({
|
||||
limit: z.number().int().positive().max(20).optional(),
|
||||
}),
|
||||
res: z.object({
|
||||
enabled: z.boolean(),
|
||||
messages: z.array(z.object({
|
||||
id: z.string(),
|
||||
workspaceName: z.string().optional(),
|
||||
workspaceUrl: z.string().optional(),
|
||||
channelId: z.string().optional(),
|
||||
channelName: z.string().optional(),
|
||||
author: z.string().optional(),
|
||||
text: z.string(),
|
||||
ts: z.string(),
|
||||
url: z.string().optional(),
|
||||
})),
|
||||
error: z.string().optional(),
|
||||
}),
|
||||
},
|
||||
'knowledgeSources:getConfig': {
|
||||
req: z.null(),
|
||||
res: z.object({
|
||||
sources: z.array(KnowledgeSourceConfigSchema),
|
||||
}),
|
||||
},
|
||||
'knowledgeSources:upsert': {
|
||||
req: KnowledgeSourceConfigSchema,
|
||||
res: z.object({
|
||||
sources: z.array(KnowledgeSourceConfigSchema),
|
||||
}),
|
||||
},
|
||||
'onboarding:getStatus': {
|
||||
req: z.null(),
|
||||
res: z.object({
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ export const ServiceName = z.enum([
|
|||
'calendar',
|
||||
'fireflies',
|
||||
'granola',
|
||||
'slack',
|
||||
'voice_memo',
|
||||
'email_labeling',
|
||||
'note_tagging',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue