@fayz-ai/plugin-tasks 0.10.32 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TasksGeneralSettings.d.ts","sourceRoot":"","sources":["../../src/components/TasksGeneralSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TasksGeneralSettings.d.ts","sourceRoot":"","sources":["../../src/components/TasksGeneralSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,wBAAgB,oBAAoB,sBA+BnC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE5E,OAAO,EAGL,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAC1C,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE5E,OAAO,EAGL,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAC1C,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAuB,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAUvE,MAAM,WAAW,kBAAkB;IACjC,sBAAsB;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACnC,mBAAmB;IACnB,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,kBAAkB;IAClB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,uDAAuD;IACvD,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,yDAAyD;IACzD,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAkBD,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAyH9E;AAOD,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AACvE,YAAY,EACV,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EACvD,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,iBAAiB,GAC/D,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAC9D,aAAa,EAAE,mBAAmB,EAClC,2BAA2B,EAAE,uBAAuB,GACrD,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { registerTranslations, useTranslation } from '@fayz-ai/core';
|
|
2
|
-
import { getTasksProvider, registerNotesTasksAdapter, useTasksStore, NOTE_LABEL_PREFIX,
|
|
1
|
+
import { tl, registerTranslations, useTranslation } from '@fayz-ai/core';
|
|
2
|
+
import { defineSettingsTab, getTasksProvider, registerNotesTasksAdapter, useTasksStore, NOTE_LABEL_PREFIX, useRightRailStore, useWidgetSurface, useTasksSummaryLine, RightRailPage, TasksPanel } from '@fayz-ai/admin';
|
|
3
3
|
export { TaskCard, TaskDetail, TaskQuickAdd, TasksFilterBar, TasksPanel, createMockTasksProvider, createSupabaseTasksProvider, useTasksStore, useTasksSummaryLine } from '@fayz-ai/admin';
|
|
4
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
4
|
import { useEffect } from 'react';
|
|
6
5
|
import { CheckSquare } from 'lucide-react';
|
|
7
|
-
import { useLayoutStore, useRailRow, cn, SheetBody } from '@fayz-ai/ui';
|
|
6
|
+
import { useLayoutStore, useRailRow, Button, cn, SheetBody } from '@fayz-ai/ui';
|
|
7
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
// src/index.ts
|
|
10
10
|
|
|
@@ -132,36 +132,6 @@ var tasksRegistries = [
|
|
|
132
132
|
]
|
|
133
133
|
}
|
|
134
134
|
];
|
|
135
|
-
var TASKS_DEFAULTS = {
|
|
136
|
-
defaultPriority: "medium"
|
|
137
|
-
};
|
|
138
|
-
function TasksGeneralSettings() {
|
|
139
|
-
const t = useTranslation();
|
|
140
|
-
const s = useTenantPluginSettings("tasks", TASKS_DEFAULTS);
|
|
141
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
142
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
143
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold mb-1", children: t("tasks.settings.general") }),
|
|
144
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mb-3", children: t("tasks.drawer.subtitle") })
|
|
145
|
-
] }),
|
|
146
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
147
|
-
/* @__PURE__ */ jsx("label", { className: "text-sm font-medium", children: t("tasks.settings.defaultPriority") }),
|
|
148
|
-
/* @__PURE__ */ jsxs(
|
|
149
|
-
"select",
|
|
150
|
-
{
|
|
151
|
-
className: "w-full max-w-xs rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-3 py-2 text-sm",
|
|
152
|
-
value: s.get("defaultPriority"),
|
|
153
|
-
onChange: (e) => s.set("defaultPriority", e.target.value),
|
|
154
|
-
children: [
|
|
155
|
-
/* @__PURE__ */ jsx("option", { value: "low", children: t("tasks.priority.low") }),
|
|
156
|
-
/* @__PURE__ */ jsx("option", { value: "medium", children: t("tasks.priority.medium") }),
|
|
157
|
-
/* @__PURE__ */ jsx("option", { value: "high", children: t("tasks.priority.high") }),
|
|
158
|
-
/* @__PURE__ */ jsx("option", { value: "urgent", children: t("tasks.priority.urgent") })
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
] }) })
|
|
163
|
-
] });
|
|
164
|
-
}
|
|
165
135
|
function TasksDrawer() {
|
|
166
136
|
const t = useTranslation();
|
|
167
137
|
const drawerOpen = useTasksStore((s) => s.drawerOpen);
|
|
@@ -208,14 +178,16 @@ function TasksLauncherRow({ railMounted }) {
|
|
|
208
178
|
);
|
|
209
179
|
if (compact) {
|
|
210
180
|
return /* @__PURE__ */ jsxs(
|
|
211
|
-
|
|
181
|
+
Button,
|
|
212
182
|
{
|
|
183
|
+
variant: "bare",
|
|
184
|
+
size: "bare",
|
|
213
185
|
...railRow,
|
|
214
186
|
onClick: open,
|
|
215
187
|
"aria-label": label,
|
|
216
188
|
title: surface === "topbar" ? label : void 0,
|
|
217
189
|
className: cn(
|
|
218
|
-
"fz-tap relative flex shrink-0 items-center justify-center rounded-button p-2 text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground",
|
|
190
|
+
"fz-tap relative flex shrink-0 items-center justify-center rounded-button p-2 font-normal text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground",
|
|
219
191
|
// Na trilha ele é uma linha (ocupa a coluna); na barra, um ícone
|
|
220
192
|
// entre outros, e esticar tomaria a barra inteira.
|
|
221
193
|
surface === "rail" && "w-full"
|
|
@@ -228,11 +200,13 @@ function TasksLauncherRow({ railMounted }) {
|
|
|
228
200
|
);
|
|
229
201
|
}
|
|
230
202
|
return /* @__PURE__ */ jsxs(
|
|
231
|
-
|
|
203
|
+
Button,
|
|
232
204
|
{
|
|
205
|
+
variant: "bare",
|
|
206
|
+
size: "bare",
|
|
233
207
|
onClick: open,
|
|
234
208
|
"aria-label": label,
|
|
235
|
-
className: "fz-tap flex w-full items-center gap-2 rounded-button px-2.5 py-1.5 text-sm text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground",
|
|
209
|
+
className: "fz-tap flex w-full items-center gap-2 rounded-button px-2.5 py-1.5 text-sm text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground font-normal justify-start",
|
|
236
210
|
children: [
|
|
237
211
|
/* @__PURE__ */ jsx(CheckSquare, { className: "h-4 w-4 shrink-0" }),
|
|
238
212
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-left", children: label }),
|
|
@@ -579,6 +553,46 @@ END $dp$;
|
|
|
579
553
|
var MIGRATIONS = [
|
|
580
554
|
{ id: "000_baseline", sql: MIGRATION_000_BASELINE }
|
|
581
555
|
];
|
|
556
|
+
var TRIGGERS = [
|
|
557
|
+
["payable_created", "A bill to pay is created", "Conta a pagar criada"],
|
|
558
|
+
["payable_refund", "A refund is due", "Estorno a pagar"],
|
|
559
|
+
["cash_review_pending", "A cash register awaits review", "Caixa aguardando confer\xEAncia"],
|
|
560
|
+
["cash_review_returned", "A cash review is sent back", "Confer\xEAncia de caixa devolvida"],
|
|
561
|
+
["checkout_pending", "A checkout is pending", "Fechamento pendente"],
|
|
562
|
+
["dfe_received", "A supplier invoice arrives", "Nota de fornecedor recebida"],
|
|
563
|
+
["stock_loss_pending", "A stock loss awaits approval", "Perda de estoque aguardando aprova\xE7\xE3o"],
|
|
564
|
+
["stock_requisition_submitted", "A stock requisition is sent", "Requisi\xE7\xE3o de estoque enviada"],
|
|
565
|
+
["stock_count_review", "A stock count awaits review", "Contagem de estoque para revisar"],
|
|
566
|
+
["stock_transfer_pending", "A stock transfer is pending", "Transfer\xEAncia de estoque pendente"],
|
|
567
|
+
["fiscal_rejected", "An invoice is rejected", "Nota fiscal rejeitada"],
|
|
568
|
+
["service_charge_approved", "A service charge split is approved", "Rateio da taxa de servi\xE7o aprovado"],
|
|
569
|
+
["hr_deadlines", "An HR deadline is near", "Prazo de RH chegando"]
|
|
570
|
+
];
|
|
571
|
+
var tasksV1SettingsTabs = [
|
|
572
|
+
defineSettingsTab({
|
|
573
|
+
id: "tasks",
|
|
574
|
+
label: tl("Tasks", "Tarefas"),
|
|
575
|
+
icon: "CheckSquare",
|
|
576
|
+
section: "operations",
|
|
577
|
+
pending: true,
|
|
578
|
+
defaults: { "tasks.default_priority": "medium" },
|
|
579
|
+
sections: [{
|
|
580
|
+
title: tl("Defaults", "Padr\xF5es"),
|
|
581
|
+
fields: [{ key: "tasks.default_priority", type: "select", label: tl("Default priority", "Prioridade padr\xE3o"), options: [
|
|
582
|
+
{ value: "low", label: tl("Low", "Baixa") },
|
|
583
|
+
{ value: "medium", label: tl("Medium", "M\xE9dia") },
|
|
584
|
+
{ value: "high", label: tl("High", "Alta") },
|
|
585
|
+
{ value: "urgent", label: tl("Urgent", "Urgente") }
|
|
586
|
+
] }]
|
|
587
|
+
}, {
|
|
588
|
+
title: tl("Automations", "Automa\xE7\xF5es"),
|
|
589
|
+
description: tl("Create a task for the right team when\u2026", "Criar uma tarefa para o setor certo quando\u2026"),
|
|
590
|
+
fields: TRIGGERS.map(([id, en2, pt]) => ({ key: `tasks.auto.${id}`, type: "boolean", label: tl(en2, pt) }))
|
|
591
|
+
}]
|
|
592
|
+
})
|
|
593
|
+
];
|
|
594
|
+
|
|
595
|
+
// src/index.ts
|
|
582
596
|
var DEFAULT_LABELS = {
|
|
583
597
|
drawerTitle: "Tasks",
|
|
584
598
|
settingsTitle: "Tasks",
|
|
@@ -671,13 +685,9 @@ function createTasksPlugin(options) {
|
|
|
671
685
|
],
|
|
672
686
|
registries: tasksRegistries,
|
|
673
687
|
settings: [
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
icon: "CheckSquare",
|
|
678
|
-
component: TasksGeneralSettings,
|
|
679
|
-
order: 14
|
|
680
|
-
}
|
|
688
|
+
// One "Tarefas" screen, as in V1. The old default-priority toggle saved a
|
|
689
|
+
// value nothing read; it now waits in the same Em breve screen.
|
|
690
|
+
...tasksV1SettingsTabs
|
|
681
691
|
],
|
|
682
692
|
// One baseline per unit since #338 — read from the generated barrel
|
|
683
693
|
// rather than listed here, so regenerating the SQL never needs a
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/locales/en.ts","../src/locales/pt-BR.ts","../src/locales/index.ts","../src/data/registries.ts","../src/components/TasksGeneralSettings.tsx","../src/components/TasksDrawer.tsx","../src/components/TasksLauncher.tsx","../src/migrations/index.ts","../src/index.ts"],"names":["useTranslation","jsxs","jsx","useTasksStore"],"mappings":";;;;;;;;;;;AAAO,IAAM,EAAA,GAA6B;AAAA,EACxC,aAAA,EAAe,OAAA;AAAA,EACf,oBAAA,EAAsB,OAAA;AAAA,EACtB,uBAAA,EAAyB,wBAAA;AAAA,EACzB,4BAAA,EAA8B,eAAA;AAAA,EAC9B,kBAAA,EAAoB,KAAA;AAAA,EACpB,mBAAA,EAAqB,OAAA;AAAA,EACrB,yBAAA,EAA2B,aAAA;AAAA,EAC3B,mBAAA,EAAqB,MAAA;AAAA,EACrB,mBAAA,EAAqB,OAAA;AAAA,EACrB,0BAAA,EAA4B,aAAA;AAAA,EAC5B,mBAAA,EAAqB,MAAA;AAAA,EACrB,wBAAA,EAA0B,WAAA;AAAA,EAC1B,oBAAA,EAAsB,KAAA;AAAA,EACtB,uBAAA,EAAyB,QAAA;AAAA,EACzB,qBAAA,EAAuB,MAAA;AAAA,EACvB,uBAAA,EAAyB,QAAA;AAAA,EACzB,0BAAA,EAA4B,aAAA;AAAA,EAC5B,qCAAA,EAAuC,sBAAA;AAAA,EACvC,qBAAA,EAAuB,QAAA;AAAA,EACvB,uBAAA,EAAyB,UAAA;AAAA,EACzB,sBAAA,EAAwB,UAAA;AAAA,EACxB,uBAAA,EAAyB,aAAA;AAAA,EACzB,qBAAA,EAAuB,QAAA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AAA;AAAA,QACN,SAAA,EAAW,oBAAA;AAAA,QACX,KAAA,EAAO;AAAA;AACT,KACF;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA,EAAY,UAAA,CAAW,GAAA,CAAI,CAAC,KAAA,MAAW;AAAA,MACrC,EAAA,EAAI,CAAA,MAAA,EAAS,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,MACrB,OAAA,EAAS,OAAA;AAAA,MACT,KAAK,KAAA,CAAM,GAAA;AAAA,MACX,WAAA,EACE;AAAA,KACJ,CAAE,CAAA;AAAA,IAEF,OAAA,EAAS;AAAA,GACX;AACF","file":"index.js","sourcesContent":["export const en: Record<string, string> = {\n 'tasks.title': 'Tasks',\n 'tasks.drawer.title': 'Tasks',\n 'tasks.drawer.subtitle': 'Manage your team tasks',\n 'tasks.quickAdd.placeholder': 'Add a task...',\n 'tasks.filter.all': 'All',\n 'tasks.filter.todo': 'To Do',\n 'tasks.filter.inProgress': 'In Progress',\n 'tasks.filter.done': 'Done',\n 'tasks.status.todo': 'To Do',\n 'tasks.status.in_progress': 'In Progress',\n 'tasks.status.done': 'Done',\n 'tasks.status.cancelled': 'Cancelled',\n 'tasks.priority.low': 'Low',\n 'tasks.priority.medium': 'Medium',\n 'tasks.priority.high': 'High',\n 'tasks.priority.urgent': 'Urgent',\n 'tasks.detail.description': 'Description',\n 'tasks.detail.descriptionPlaceholder': 'Add a description...',\n 'tasks.detail.status': 'Status',\n 'tasks.detail.priority': 'Priority',\n 'tasks.detail.dueDate': 'Due Date',\n 'tasks.detail.assignee': 'Assigned To',\n 'tasks.detail.labels': 'Labels',\n 'tasks.detail.subtasks': 'Subtasks',\n 'tasks.detail.delete': 'Delete Task',\n 'tasks.detail.deleteConfirm': 'Are you sure you want to delete this task?',\n 'tasks.detail.created': 'Created',\n 'tasks.detail.chatWithAi': 'Chat with AI',\n 'tasks.detail.chatWithAi.prompt': 'Take over this task and help me resolve it now, using your tools when needed:',\n 'tasks.detail.updated': 'Updated',\n 'tasks.detail.addSubtask': 'Add subtask...',\n 'tasks.detail.back': 'Back to list',\n 'tasks.summary.overdue': 'overdue',\n 'tasks.summary.dueToday': 'due today',\n 'tasks.empty': 'No tasks yet',\n 'tasks.empty.description': 'Add your first task using the input above',\n 'tasks.settings.title': 'Tasks',\n 'tasks.settings.general': 'General',\n 'tasks.settings.defaultPriority': 'Default Priority',\n 'tasks.settings.autoAssign': 'Auto-assign tasks to creator',\n}\n","export const ptBR: Record<string, string> = {\n 'tasks.title': 'Tarefas',\n 'tasks.drawer.title': 'Tarefas',\n 'tasks.drawer.subtitle': 'Gerencie as tarefas da equipe',\n 'tasks.quickAdd.placeholder': 'Adicionar tarefa...',\n 'tasks.filter.all': 'Todas',\n 'tasks.filter.todo': 'A Fazer',\n 'tasks.filter.inProgress': 'Em Andamento',\n 'tasks.filter.done': 'Concluídas',\n 'tasks.status.todo': 'A Fazer',\n 'tasks.status.in_progress': 'Em Andamento',\n 'tasks.status.done': 'Concluída',\n 'tasks.status.cancelled': 'Cancelada',\n 'tasks.priority.low': 'Baixa',\n 'tasks.priority.medium': 'Média',\n 'tasks.priority.high': 'Alta',\n 'tasks.priority.urgent': 'Urgente',\n 'tasks.detail.description': 'Descrição',\n 'tasks.detail.descriptionPlaceholder': 'Adicionar descrição...',\n 'tasks.detail.status': 'Status',\n 'tasks.detail.priority': 'Prioridade',\n 'tasks.detail.dueDate': 'Data de Vencimento',\n 'tasks.detail.assignee': 'Responsável',\n 'tasks.detail.labels': 'Etiquetas',\n 'tasks.detail.subtasks': 'Subtarefas',\n 'tasks.detail.delete': 'Excluir Tarefa',\n 'tasks.detail.deleteConfirm': 'Tem certeza que deseja excluir esta tarefa?',\n 'tasks.detail.created': 'Criada em',\n 'tasks.detail.chatWithAi': 'Conversar com IA',\n 'tasks.detail.chatWithAi.prompt': 'Assuma esta tarefa e me ajude a resolver agora, usando suas ferramentas quando precisar:',\n 'tasks.detail.updated': 'Atualizada em',\n 'tasks.detail.addSubtask': 'Adicionar subtarefa...',\n 'tasks.detail.back': 'Voltar à lista',\n 'tasks.summary.overdue': 'atrasadas',\n 'tasks.summary.dueToday': 'vencem hoje',\n 'tasks.empty': 'Nenhuma tarefa ainda',\n 'tasks.empty.description': 'Adicione sua primeira tarefa usando o campo acima',\n 'tasks.settings.title': 'Tarefas',\n 'tasks.settings.general': 'Geral',\n 'tasks.settings.defaultPriority': 'Prioridade Padrão',\n 'tasks.settings.autoAssign': 'Atribuir tarefas automaticamente ao criador',\n}\n","import { en } from './en'\nimport { ptBR } from './pt-BR'\n\nexport const tasksLocales: Record<string, Record<string, string>> = {\n en,\n 'pt-BR': ptBR,\n}\n","import type { PluginRegistryDef } from '@fayz-ai/core'\nimport type { EntityDef } from '@fayz-ai/core'\n\n// The label catalogue is the one table this plugin still owns — tasks\n// themselves moved to the spine's public.tasks with db migration 047.\nconst LABELS_TABLE = 'plg_tasks_labels'\n\nconst taskLabelEntity: EntityDef = {\n name: 'Task Label',\n namePlural: 'Task Labels',\n icon: 'Tag',\n displayField: 'name',\n defaultSort: 'name',\n fields: [\n { key: 'name', label: 'Name', type: 'text', required: true, showInTable: true },\n { key: 'color', label: 'Color', type: 'color', showInTable: true, defaultValue: '#6366f1' },\n { key: 'isActive', label: 'Active', type: 'boolean', showInTable: true, defaultValue: true },\n ],\n data: { table: LABELS_TABLE, tenantScoped: true },\n}\n\nexport const tasksRegistries: PluginRegistryDef[] = [\n {\n id: 'task-labels',\n entity: taskLabelEntity,\n icon: 'Tag',\n description: 'Labels for categorizing tasks',\n display: 'table',\n seedData: [\n { id: 'lbl-bug', name: 'Bug', color: '#ef4444', isActive: true },\n { id: 'lbl-feature', name: 'Feature', color: '#3b82f6', isActive: true },\n { id: 'lbl-urgent', name: 'Urgent', color: '#f59e0b', isActive: true },\n { id: 'lbl-personal', name: 'Personal', color: '#8b5cf6', isActive: true },\n ],\n },\n]\n","import React from 'react'\nimport { useTranslation } from '@fayz-ai/core'\nimport { useTenantPluginSettings } from '@fayz-ai/admin'\n\n// Per-tenant defaults = the value that used to be the hardcoded `selected` option.\n// Persisted + re-hydrated per tenant; behavioural consumption is a follow-up.\nconst TASKS_DEFAULTS = {\n defaultPriority: 'medium',\n}\n\nexport function TasksGeneralSettings() {\n const t = useTranslation()\n const s = useTenantPluginSettings('tasks', TASKS_DEFAULTS)\n\n return (\n <div className=\"space-y-6\">\n <div>\n <h3 className=\"text-sm font-semibold mb-1\">{t('tasks.settings.general')}</h3>\n <p className=\"text-xs text-muted-foreground mb-3\">\n {t('tasks.drawer.subtitle')}\n </p>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\">{t('tasks.settings.defaultPriority')}</label>\n <select\n className=\"w-full max-w-xs rounded-input border border-input bg-card shadow-[inset_0_1px_0_rgb(0_0_0_/0.06)] px-3 py-2 text-sm\"\n value={s.get('defaultPriority')}\n onChange={(e) => s.set('defaultPriority', e.target.value)}\n >\n <option value=\"low\">{t('tasks.priority.low')}</option>\n <option value=\"medium\">{t('tasks.priority.medium')}</option>\n <option value=\"high\">{t('tasks.priority.high')}</option>\n <option value=\"urgent\">{t('tasks.priority.urgent')}</option>\n </select>\n </div>\n </div>\n </div>\n )\n}\n","import React from 'react'\nimport { SheetBody } from '@fayz-ai/ui'\nimport { RightRailPage, useTasksStore, TasksPanel, useTasksSummaryLine } from '@fayz-ai/admin'\nimport { useTranslation } from '@fayz-ai/core'\n\n/** Tasks in the shell's right column — a sheet where there is no column. */\nexport function TasksDrawer() {\n const t = useTranslation()\n const drawerOpen = useTasksStore((s) => s.drawerOpen)\n const closeDrawer = useTasksStore((s) => s.closeDrawer)\n const summaryLine = useTasksSummaryLine()\n\n return (\n <RightRailPage\n title={t('tasks.drawer.title')}\n open={drawerOpen}\n onClose={closeDrawer}\n width=\"max-w-lg\"\n >\n {/* The count line only — the column header already carries the name. */}\n <p className=\"shrink-0 border-b border-border/40 px-5 py-2 text-xs text-muted-foreground\">\n {summaryLine || t('tasks.drawer.subtitle')}\n </p>\n\n <SheetBody className=\"flex flex-col px-0 py-0\">\n <TasksPanel />\n </SheetBody>\n </RightRailPage>\n )\n}\n","import React, { useEffect } from 'react'\nimport { CheckSquare } from 'lucide-react'\nimport { cn, useLayoutStore, useRailRow } from '@fayz-ai/ui'\nimport { useRightRailStore, useWidgetSurface, useTasksStore } from '@fayz-ai/admin'\nimport { useTranslation } from '@fayz-ai/core'\nimport { TasksDrawer } from './TasksDrawer'\n\n/**\n * The sidebar row that opens tasks.\n *\n * It no longer registers the rail tab — the shell does that now (db 047 made\n * public.tasks a spine table, so every app has the tab whether or not this\n * plugin is installed). What is left is the row and, on a shell without a rail,\n * the sheet.\n */\nexport function TasksLauncher() {\n const railMounted = useRightRailStore((s) => s.mounted)\n\n return (\n <>\n <TasksLauncherRow railMounted={railMounted} />\n {!railMounted && <TasksDrawer />}\n </>\n )\n}\n\nfunction TasksLauncherRow({ railMounted }: { railMounted: boolean }) {\n const t = useTranslation()\n const toggleDrawer = useTasksStore((s) => s.toggleDrawer)\n const fetchSummary = useTasksStore((s) => s.fetchSummary)\n const summary = useTasksStore((s) => s.summary)\n const togglePanel = useRightRailStore((s) => s.togglePanel)\n\n useEffect(() => {\n fetchSummary()\n }, [fetchSummary])\n\n const pendingCount = summary ? summary.todo + summary.inProgress : 0\n const collapsed = useLayoutStore((s) => s.sidebarCollapsed)\n // Numa shell sem trilha a shell põe isto na barra de topo — ali só cabe o\n // ícone, exatamente como na trilha recolhida.\n const surface = useWidgetSurface()\n const compact = collapsed || surface === 'topbar'\n const label = t('tasks.drawer.title') || 'Tasks'\n const open = () => (railMounted ? togglePanel('tasks') : toggleDrawer())\n // Na trilha recolhida, o mesmo painel de hover que os links abrem — senão\n // esta linha é o único ícone do menu sem nome.\n const railRow = useRailRow(\n surface === 'rail'\n ? { key: 'tasks', label, badge: pendingCount > 0 ? pendingCount : undefined }\n : null,\n )\n\n // A row of the rail, not an icon in the top bar. Tarefas são do workspace —\n // não mudam com a tela aberta — e lá em cima dividiam o canto com o \"Novo\" da\n // página. Os tokens já eram os da trilha (`text-sidebar-*`), o que sobre papel\n // dava um ícone quase invisível: agora eles pousam onde foram feitos.\n if (compact) {\n return (\n <button\n {...railRow}\n onClick={open}\n aria-label={label}\n // Na barra de topo não há painel da trilha para dizer o nome.\n title={surface === 'topbar' ? label : undefined}\n className={cn(\n 'fz-tap relative flex shrink-0 items-center justify-center rounded-button p-2 text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground',\n // Na trilha ele é uma linha (ocupa a coluna); na barra, um ícone\n // entre outros, e esticar tomaria a barra inteira.\n surface === 'rail' && 'w-full',\n )}\n >\n <CheckSquare className=\"h-4 w-4\" />\n {pendingCount > 0 && (\n <span className=\"absolute right-1 top-1 h-2 w-2 rounded-full bg-destructive\" />\n )}\n </button>\n )\n }\n\n return (\n <button\n onClick={open}\n aria-label={label}\n className=\"fz-tap flex w-full items-center gap-2 rounded-button px-2.5 py-1.5 text-sm text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground\"\n >\n <CheckSquare className=\"h-4 w-4 shrink-0\" />\n <span className=\"min-w-0 flex-1 truncate text-left\">{label}</span>\n {pendingCount > 0 && (\n <span\n className={cn(\n 'flex shrink-0 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground',\n pendingCount > 9 ? 'h-5 min-w-5 px-1' : 'h-4 w-4',\n )}\n >\n {pendingCount > 99 ? '99+' : pendingCount}\n </span>\n )}\n </button>\n )\n}\n","// AUTO-GENERATED from 000_baseline.sql — regenerate with scripts/embed-migrations.mjs\n// SQL files are the source of truth; this inline copy lets the manifest declare\n// migrations as data. Do not edit by hand — run the embed script instead.\n\nexport const MIGRATION_000_BASELINE = `-- ============================================================================\n-- plugins/plugin-tasks/src/migrations/000_baseline.sql — what installing this provisions, as one file.\n--\n-- GENERATED by scripts/emit-unit-baselines.mjs (#338). Do not edit by hand:\n-- change the schema, regenerate, and let scripts/check-chain-equivalence.mjs\n-- prove the result still matches.\n--\n-- This replaced 3 migration files. They are kept, unapplied, in\n-- migrations.archive/ — a year of decisions is worth reading even when it is no\n-- longer worth replaying.\n--\n-- Object order is fixed rather than dependency-sorted: schemas, types,\n-- sequences, tables, defaults, functions, constraints, views, indexes, foreign\n-- keys, triggers, row security, policies, grants. Dependencies BETWEEN units\n-- are carried by the order packages/db/chain.json declares.\n-- ============================================================================\n\n-- A LANGUAGE sql function binds its body at CREATE time, and 570 functions\n-- sorted by name are not sorted by who calls whom. This is what lets them load\n-- in any order; every body is still compiled on first call, so a genuinely\n-- broken reference surfaces then rather than never. Session-scoped.\nSET check_function_bodies = false;\n\n\n\n-- ── default privileges: reset ───────────────────────────────────────────\n-- Cleared BEFORE anything is created, so every object below gets the ACL the\n-- dump describes rather than the image's defaults on top of it. Restored at\n-- the end of this file.\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\n\n-- ── table ───────────────────────────────────────────────────────────────\n\nCREATE TABLE public.plg_tasks_labels (\n id uuid DEFAULT gen_random_uuid() NOT NULL,\n tenant_id uuid NOT NULL,\n name text NOT NULL,\n color text DEFAULT '#6366f1'::text NOT NULL,\n is_active boolean DEFAULT true NOT NULL,\n created_at timestamp with time zone DEFAULT now() NOT NULL\n);\n\nCREATE TABLE public.plg_tasks_tasks (\n id uuid DEFAULT gen_random_uuid() NOT NULL,\n tenant_id uuid NOT NULL,\n title text NOT NULL,\n description text,\n status text DEFAULT 'todo'::text NOT NULL,\n priority text DEFAULT 'medium'::text NOT NULL,\n due_date date,\n assigned_to_id uuid,\n assigned_to_name text,\n parent_id uuid,\n labels jsonb DEFAULT '[]'::jsonb NOT NULL,\n \"position\" integer DEFAULT 0 NOT NULL,\n created_by_id uuid,\n created_by_name text,\n created_at timestamp with time zone DEFAULT now() NOT NULL,\n updated_at timestamp with time zone DEFAULT now() NOT NULL,\n CONSTRAINT plg_tasks_tasks_priority_check CHECK ((priority = ANY (ARRAY['low'::text, 'medium'::text, 'high'::text, 'urgent'::text]))),\n CONSTRAINT plg_tasks_tasks_status_check CHECK ((status = ANY (ARRAY['todo'::text, 'in_progress'::text, 'done'::text, 'cancelled'::text])))\n);\n\n\n-- ── constraint ──────────────────────────────────────────────────────────\n\nALTER TABLE ONLY public.plg_tasks_labels\n ADD CONSTRAINT plg_tasks_labels_pkey PRIMARY KEY (id);\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_pkey PRIMARY KEY (id);\n\n\n-- ── index ───────────────────────────────────────────────────────────────\n\nCREATE INDEX idx_plg_tasks_labels_tenant ON public.plg_tasks_labels USING btree (tenant_id);\n\nCREATE INDEX idx_plg_tasks_tasks_assigned ON public.plg_tasks_tasks USING btree (assigned_to_id);\n\nCREATE INDEX idx_plg_tasks_tasks_due ON public.plg_tasks_tasks USING btree (tenant_id, due_date) WHERE (due_date IS NOT NULL);\n\nCREATE INDEX idx_plg_tasks_tasks_parent ON public.plg_tasks_tasks USING btree (parent_id);\n\nCREATE INDEX idx_plg_tasks_tasks_status ON public.plg_tasks_tasks USING btree (tenant_id, status);\n\nCREATE INDEX idx_plg_tasks_tasks_tenant ON public.plg_tasks_tasks USING btree (tenant_id);\n\n\n-- ── fk constraint ───────────────────────────────────────────────────────\n\nALTER TABLE ONLY public.plg_tasks_labels\n ADD CONSTRAINT plg_tasks_labels_tenant_id_fkey FOREIGN KEY (tenant_id) REFERENCES public.tenants(id) ON DELETE CASCADE;\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.plg_tasks_tasks(id) ON DELETE CASCADE;\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_tenant_id_fkey FOREIGN KEY (tenant_id) REFERENCES public.tenants(id) ON DELETE CASCADE;\n\n\n-- ── row security ────────────────────────────────────────────────────────\n\nALTER TABLE public.plg_tasks_labels ENABLE ROW LEVEL SECURITY;\n\nALTER TABLE public.plg_tasks_tasks ENABLE ROW LEVEL SECURITY;\n\n\n-- ── policy ──────────────────────────────────────────────────────────────\n\nCREATE POLICY plg_tasks_labels_delete ON public.plg_tasks_labels FOR DELETE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_insert ON public.plg_tasks_labels FOR INSERT TO authenticated WITH CHECK ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_select ON public.plg_tasks_labels FOR SELECT TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_update ON public.plg_tasks_labels FOR UPDATE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_delete ON public.plg_tasks_tasks FOR DELETE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_insert ON public.plg_tasks_tasks FOR INSERT TO authenticated WITH CHECK ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_select ON public.plg_tasks_tasks FOR SELECT TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_update ON public.plg_tasks_tasks FOR UPDATE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\n\n-- ── acl ─────────────────────────────────────────────────────────────────\n\nGRANT MAINTAIN ON TABLE public.plg_tasks_labels TO anon;\nGRANT ALL ON TABLE public.plg_tasks_labels TO authenticated;\nGRANT ALL ON TABLE public.plg_tasks_labels TO service_role;\n\nGRANT MAINTAIN ON TABLE public.plg_tasks_tasks TO anon;\nGRANT ALL ON TABLE public.plg_tasks_tasks TO authenticated;\nGRANT ALL ON TABLE public.plg_tasks_tasks TO service_role;\n\n\n-- ── default privileges: restore ─────────────────────────────────────────\n-- Put back, so the NEXT thing installed inherits what the chain had.\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT MAINTAIN ON TABLES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT MAINTAIN ON TABLES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$--\n-- PostgreSQL database dump complete\n--$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$--\n-- PostgreSQL database dump complete\n--$stmt$;\nEND $dp$;\n`\n\nexport const MIGRATIONS: Array<{ id: string; sql: string }> = [\n { id: \"000_baseline\", sql: MIGRATION_000_BASELINE },\n]\n","import React from 'react'\nimport type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'\nimport { registerTranslations } from '@fayz-ai/core'\nimport {\n getTasksProvider, useTasksStore,\n registerNotesTasksAdapter, NOTE_LABEL_PREFIX,\n type TasksDataProvider, type TaskPriority,\n} from '@fayz-ai/admin'\nimport type { ResolvedTasksConfig, TasksPluginLabels } from './context'\nimport { tasksLocales } from './locales'\nimport { tasksRegistries } from './data/registries'\nimport { TasksGeneralSettings } from './components/TasksGeneralSettings'\nimport { TasksLauncher } from './components/TasksLauncher'\nimport { MIGRATIONS } from './migrations'\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface TasksPluginOptions {\n /** Label overrides */\n labels?: Partial<TasksPluginLabels>\n /** Plugin scope */\n scope?: PluginScope\n /** Vertical ID */\n verticalId?: VerticalId\n /** Data provider override (defaults to the shell's) */\n dataProvider?: TasksDataProvider\n /** Default priority for new tasks (default: 'medium') */\n defaultPriority?: TaskPriority\n /**\n * Show the Tasks row in the sidebar's foot. Default: true.\n *\n * The panel is worth a permanent row in a product where tasks are the work —\n * an agency, a clinic with a follow-up list. In one where they are back-office\n * (a restaurant during service), that row spends the whole shift competing\n * with the things somebody actually touches, and the badge on it is a red\n * number about paperwork. Turning it off keeps the plugin whole: the table,\n * the provider, the settings tab, the agent's tools and the onboarding rows it\n * carries all stay — only the rail entry goes.\n */\n launcher?: boolean\n}\n\nconst DEFAULT_LABELS: TasksPluginLabels = {\n drawerTitle: 'Tasks',\n settingsTitle: 'Tasks',\n quickAddPlaceholder: 'Add a task...',\n}\n\nfunction resolveConfig(options?: TasksPluginOptions): ResolvedTasksConfig {\n return {\n labels: { ...DEFAULT_LABELS, ...options?.labels },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nexport function createTasksPlugin(options?: TasksPluginOptions): PluginManifest {\n const config = resolveConfig(options)\n // Register locales globally so the plugin's translations resolve even when the\n // host shell does not mount @fayz-ai/core's I18nProvider (incremental de-bridge).\n registerTranslations(tasksLocales)\n\n // The table moved to the spine (db 047) and so did the store, the provider and\n // the panel. What is left here is the sidebar row, the sheet fallback, the\n // label catalogue and the settings tab — the plugin is now a set of surfaces\n // over a table it no longer owns.\n const provider = options?.dataProvider ?? getTasksProvider()\n const store = useTasksStore\n\n // Notes ↔ Tasks bridge: note todos are real tasks, linked by a `note:<id>`\n // label. The shell's Notes tab consumes this; the Tarefas tab (and its\n // summary badge) stays the single source of truth.\n registerNotesTasksAdapter({\n async createTodo({ title, noteId, noteTitle }) {\n const task = await provider.createTask({\n title,\n description: noteTitle ? `Nota: ${noteTitle}` : undefined,\n labels: [`${NOTE_LABEL_PREFIX}${noteId}`],\n })\n void store.getState().fetchSummary()\n return { id: task.id, title: task.title, done: task.status === 'done' }\n },\n async listTodos(noteId) {\n const tasks = await provider.getTasks({})\n const label = `${NOTE_LABEL_PREFIX}${noteId}`\n return tasks\n .filter((t) => t.labels.includes(label))\n .sort((a, b) => (a.status === 'done' ? 1 : 0) - (b.status === 'done' ? 1 : 0))\n .map((t) => ({ id: t.id, title: t.title, done: t.status === 'done' }))\n },\n async toggleTodo(id: string, done: boolean) {\n await provider.updateTask(id, { status: done ? 'done' : 'todo' })\n void store.getState().fetchSummary()\n },\n async removeTodo(id: string) {\n await provider.deleteTask(id)\n void store.getState().fetchSummary()\n },\n })\n\n return {\n id: 'tasks',\n defaultAgentRole: 'setup',\n name: config.labels.drawerTitle,\n icon: 'CheckSquare',\n version: '1.0.0',\n scope: options?.scope ?? 'universal',\n verticalId: options?.verticalId,\n defaultEnabled: true,\n dependencies: [],\n\n navigation: [],\n\n routes: [],\n\n widgets: options?.launcher === false ? [] : [\n {\n // No pé da trilha, não no topo: tarefas são do workspace, não da\n // tela aberta — e no topo elas dividiam o canto com as ações da página.\n id: 'tasks-launcher',\n zone: 'shell.sidebar.footer',\n component: TasksLauncher as unknown as React.ComponentType<unknown>,\n order: 10,\n props: {\n tasksConfig: config,\n tasksProvider: provider,\n },\n },\n ],\n\n aiTools: [\n {\n id: 'tasks.summary',\n name: 'getTasksSummary',\n description: 'Returns a summary of pending tasks: total, overdue, due today, by status and priority.',\n icon: 'CheckSquare',\n mode: 'read' as const,\n category: 'Tasks',\n parameters: {\n type: 'object' as const,\n properties: {\n status: {\n type: 'string' as const,\n description: 'Filter by task status',\n enum: ['todo', 'in_progress', 'done', 'cancelled', 'all'],\n },\n },\n },\n suggestions: [\n { label: 'What tasks are overdue?' },\n { label: 'How many tasks are pending?' },\n { label: \"What's due today?\" },\n ],\n },\n ],\n\n registries: tasksRegistries,\n\n settings: [\n {\n id: 'tasks',\n label: config.labels.settingsTitle,\n icon: 'CheckSquare',\n component: TasksGeneralSettings as unknown as React.ComponentType<unknown>,\n order: 14,\n },\n ],\n\n // One baseline per unit since #338 — read from the generated barrel\n // rather than listed here, so regenerating the SQL never needs a\n // manifest edit to match.\n migrations: MIGRATIONS.map((entry) => ({\n id: `tasks-${entry.id}`,\n version: '1.0.0',\n sql: entry.sql,\n description:\n 'The whole schema this plugin provisions, as one file: every table, view, function, policy and grant, plus the reference rows it seeds. Replaced the per-change chain in the 1.0.0 squash (#338); the files it collapsed are kept, unapplied, in src/migrations.archive/.',\n })),\n\n locales: tasksLocales,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Re-exports — the tasks slice lives in @fayz-ai/admin now, but this package's\n// public surface stays what it was.\n// ---------------------------------------------------------------------------\n\nexport type { ResolvedTasksConfig, TasksPluginLabels } from './context'\nexport type {\n Task, TaskLabel, TaskStatus, TaskPriority, TasksSummary,\n CreateTaskInput, UpdateTaskInput, TaskQuery, TasksDataProvider,\n} from '@fayz-ai/admin'\nexport {\n TasksPanel, TaskCard, TaskDetail, TaskQuickAdd, TasksFilterBar,\n useTasksStore, useTasksSummaryLine,\n createSupabaseTasksProvider, createMockTasksProvider,\n} from '@fayz-ai/admin'\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/locales/en.ts","../src/locales/pt-BR.ts","../src/locales/index.ts","../src/data/registries.ts","../src/components/TasksDrawer.tsx","../src/components/TasksLauncher.tsx","../src/migrations/index.ts","../src/settings/v1-settings.ts","../src/index.ts"],"names":["jsxs","jsx","useTranslation","useTasksStore","en"],"mappings":";;;;;;;;;;;AAAO,IAAM,EAAA,GAA6B;AAAA,EACxC,aAAA,EAAe,OAAA;AAAA,EACf,oBAAA,EAAsB,OAAA;AAAA,EACtB,uBAAA,EAAyB,wBAAA;AAAA,EACzB,4BAAA,EAA8B,eAAA;AAAA,EAC9B,kBAAA,EAAoB,KAAA;AAAA,EACpB,mBAAA,EAAqB,OAAA;AAAA,EACrB,yBAAA,EAA2B,aAAA;AAAA,EAC3B,mBAAA,EAAqB,MAAA;AAAA,EACrB,mBAAA,EAAqB,OAAA;AAAA,EACrB,0BAAA,EAA4B,aAAA;AAAA,EAC5B,mBAAA,EAAqB,MAAA;AAAA,EACrB,wBAAA,EAA0B,WAAA;AAAA,EAC1B,oBAAA,EAAsB,KAAA;AAAA,EACtB,uBAAA,EAAyB,QAAA;AAAA,EACzB,qBAAA,EAAuB,MAAA;AAAA,EACvB,uBAAA,EAAyB,QAAA;AAAA,EACzB,0BAAA,EAA4B,aAAA;AAAA,EAC5B,qCAAA,EAAuC,sBAAA;AAAA,EACvC,qBAAA,EAAuB,QAAA;AAAA,EACvB,uBAAA,EAAyB,UAAA;AAAA,EACzB,sBAAA,EAAwB,UAAA;AAAA,EACxB,uBAAA,EAAyB,aAAA;AAAA,EACzB,qBAAA,EAAuB,QAAA;AAAA,EACvB,uBAAA,EAAyB,UAAA;AAAA,EACzB,qBAAA,EAAuB,aAAA;AAAA,EACvB,4BAAA,EAA8B,4CAAA;AAAA,EAC9B,sBAAA,EAAwB,SAAA;AAAA,EACxB,yBAAA,EAA2B,cAAA;AAAA,EAC3B,gCAAA,EAAkC,+EAAA;AAAA,EAClC,sBAAA,EAAwB,SAAA;AAAA,EACxB,yBAAA,EAA2B,gBAAA;AAAA,EAC3B,mBAAA,EAAqB,cAAA;AAAA,EACrB,uBAAA,EAAyB,SAAA;AAAA,EACzB,wBAAA,EAA0B,WA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,UACX,EAAE,OAAO,yBAAA,EAA0B;AAAA,UACnC,EAAE,OAAO,6BAAA,EAA8B;AAAA,UACvC,EAAE,OAAO,mBAAA;AAAoB;AAC/B;AACF,KACF;AAAA,IAEA,UAAA,EAAY,eAAA;AAAA,IAEZ,QAAA,EAAU;AAAA;AAAA;AAAA,MAGR,GAAG;AAAA,KACL;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA,EAAY,UAAA,CAAW,GAAA,CAAI,CAAC,KAAA,MAAW;AAAA,MACrC,EAAA,EAAI,CAAA,MAAA,EAAS,KAAA,CAAM,EAAE,CAAA,CAAA;AAAA,MACrB,OAAA,EAAS,OAAA;AAAA,MACT,KAAK,KAAA,CAAM,GAAA;AAAA,MACX,WAAA,EACE;AAAA,KACJ,CAAE,CAAA;AAAA,IAEF,OAAA,EAAS;AAAA,GACX;AACF","file":"index.js","sourcesContent":["export const en: Record<string, string> = {\n 'tasks.title': 'Tasks',\n 'tasks.drawer.title': 'Tasks',\n 'tasks.drawer.subtitle': 'Manage your team tasks',\n 'tasks.quickAdd.placeholder': 'Add a task...',\n 'tasks.filter.all': 'All',\n 'tasks.filter.todo': 'To Do',\n 'tasks.filter.inProgress': 'In Progress',\n 'tasks.filter.done': 'Done',\n 'tasks.status.todo': 'To Do',\n 'tasks.status.in_progress': 'In Progress',\n 'tasks.status.done': 'Done',\n 'tasks.status.cancelled': 'Cancelled',\n 'tasks.priority.low': 'Low',\n 'tasks.priority.medium': 'Medium',\n 'tasks.priority.high': 'High',\n 'tasks.priority.urgent': 'Urgent',\n 'tasks.detail.description': 'Description',\n 'tasks.detail.descriptionPlaceholder': 'Add a description...',\n 'tasks.detail.status': 'Status',\n 'tasks.detail.priority': 'Priority',\n 'tasks.detail.dueDate': 'Due Date',\n 'tasks.detail.assignee': 'Assigned To',\n 'tasks.detail.labels': 'Labels',\n 'tasks.detail.subtasks': 'Subtasks',\n 'tasks.detail.delete': 'Delete Task',\n 'tasks.detail.deleteConfirm': 'Are you sure you want to delete this task?',\n 'tasks.detail.created': 'Created',\n 'tasks.detail.chatWithAi': 'Chat with AI',\n 'tasks.detail.chatWithAi.prompt': 'Take over this task and help me resolve it now, using your tools when needed:',\n 'tasks.detail.updated': 'Updated',\n 'tasks.detail.addSubtask': 'Add subtask...',\n 'tasks.detail.back': 'Back to list',\n 'tasks.summary.overdue': 'overdue',\n 'tasks.summary.dueToday': 'due today',\n 'tasks.empty': 'No tasks yet',\n 'tasks.empty.description': 'Add your first task using the input above',\n 'tasks.settings.title': 'Tasks',\n 'tasks.settings.general': 'General',\n 'tasks.settings.defaultPriority': 'Default Priority',\n 'tasks.settings.autoAssign': 'Auto-assign tasks to creator',\n}\n","export const ptBR: Record<string, string> = {\n 'tasks.title': 'Tarefas',\n 'tasks.drawer.title': 'Tarefas',\n 'tasks.drawer.subtitle': 'Gerencie as tarefas da equipe',\n 'tasks.quickAdd.placeholder': 'Adicionar tarefa...',\n 'tasks.filter.all': 'Todas',\n 'tasks.filter.todo': 'A Fazer',\n 'tasks.filter.inProgress': 'Em Andamento',\n 'tasks.filter.done': 'Concluídas',\n 'tasks.status.todo': 'A Fazer',\n 'tasks.status.in_progress': 'Em Andamento',\n 'tasks.status.done': 'Concluída',\n 'tasks.status.cancelled': 'Cancelada',\n 'tasks.priority.low': 'Baixa',\n 'tasks.priority.medium': 'Média',\n 'tasks.priority.high': 'Alta',\n 'tasks.priority.urgent': 'Urgente',\n 'tasks.detail.description': 'Descrição',\n 'tasks.detail.descriptionPlaceholder': 'Adicionar descrição...',\n 'tasks.detail.status': 'Status',\n 'tasks.detail.priority': 'Prioridade',\n 'tasks.detail.dueDate': 'Data de Vencimento',\n 'tasks.detail.assignee': 'Responsável',\n 'tasks.detail.labels': 'Etiquetas',\n 'tasks.detail.subtasks': 'Subtarefas',\n 'tasks.detail.delete': 'Excluir Tarefa',\n 'tasks.detail.deleteConfirm': 'Tem certeza que deseja excluir esta tarefa?',\n 'tasks.detail.created': 'Criada em',\n 'tasks.detail.chatWithAi': 'Conversar com IA',\n 'tasks.detail.chatWithAi.prompt': 'Assuma esta tarefa e me ajude a resolver agora, usando suas ferramentas quando precisar:',\n 'tasks.detail.updated': 'Atualizada em',\n 'tasks.detail.addSubtask': 'Adicionar subtarefa...',\n 'tasks.detail.back': 'Voltar à lista',\n 'tasks.summary.overdue': 'atrasadas',\n 'tasks.summary.dueToday': 'vencem hoje',\n 'tasks.empty': 'Nenhuma tarefa ainda',\n 'tasks.empty.description': 'Adicione sua primeira tarefa usando o campo acima',\n 'tasks.settings.title': 'Tarefas',\n 'tasks.settings.general': 'Geral',\n 'tasks.settings.defaultPriority': 'Prioridade Padrão',\n 'tasks.settings.autoAssign': 'Atribuir tarefas automaticamente ao criador',\n}\n","import { en } from './en'\nimport { ptBR } from './pt-BR'\n\nexport const tasksLocales: Record<string, Record<string, string>> = {\n en,\n 'pt-BR': ptBR,\n}\n","import type { PluginRegistryDef } from '@fayz-ai/core'\nimport type { EntityDef } from '@fayz-ai/core'\n\n// The label catalogue is the one table this plugin still owns — tasks\n// themselves moved to the spine's public.tasks with db migration 047.\nconst LABELS_TABLE = 'plg_tasks_labels'\n\nconst taskLabelEntity: EntityDef = {\n name: 'Task Label',\n namePlural: 'Task Labels',\n icon: 'Tag',\n displayField: 'name',\n defaultSort: 'name',\n fields: [\n { key: 'name', label: 'Name', type: 'text', required: true, showInTable: true },\n { key: 'color', label: 'Color', type: 'color', showInTable: true, defaultValue: '#6366f1' },\n { key: 'isActive', label: 'Active', type: 'boolean', showInTable: true, defaultValue: true },\n ],\n data: { table: LABELS_TABLE, tenantScoped: true },\n}\n\nexport const tasksRegistries: PluginRegistryDef[] = [\n {\n id: 'task-labels',\n entity: taskLabelEntity,\n icon: 'Tag',\n description: 'Labels for categorizing tasks',\n display: 'table',\n seedData: [\n { id: 'lbl-bug', name: 'Bug', color: '#ef4444', isActive: true },\n { id: 'lbl-feature', name: 'Feature', color: '#3b82f6', isActive: true },\n { id: 'lbl-urgent', name: 'Urgent', color: '#f59e0b', isActive: true },\n { id: 'lbl-personal', name: 'Personal', color: '#8b5cf6', isActive: true },\n ],\n },\n]\n","import React from 'react'\nimport { SheetBody } from '@fayz-ai/ui'\nimport { RightRailPage, useTasksStore, TasksPanel, useTasksSummaryLine } from '@fayz-ai/admin'\nimport { useTranslation } from '@fayz-ai/core'\n\n/** Tasks in the shell's right column — a sheet where there is no column. */\nexport function TasksDrawer() {\n const t = useTranslation()\n const drawerOpen = useTasksStore((s) => s.drawerOpen)\n const closeDrawer = useTasksStore((s) => s.closeDrawer)\n const summaryLine = useTasksSummaryLine()\n\n return (\n <RightRailPage\n title={t('tasks.drawer.title')}\n open={drawerOpen}\n onClose={closeDrawer}\n width=\"max-w-lg\"\n >\n {/* The count line only — the column header already carries the name. */}\n <p className=\"shrink-0 border-b border-border/40 px-5 py-2 text-xs text-muted-foreground\">\n {summaryLine || t('tasks.drawer.subtitle')}\n </p>\n\n <SheetBody className=\"flex flex-col px-0 py-0\">\n <TasksPanel />\n </SheetBody>\n </RightRailPage>\n )\n}\n","import React, { useEffect } from 'react'\nimport { CheckSquare } from 'lucide-react'\nimport { Button, cn, useLayoutStore, useRailRow } from '@fayz-ai/ui'\nimport { useRightRailStore, useWidgetSurface, useTasksStore } from '@fayz-ai/admin'\nimport { useTranslation } from '@fayz-ai/core'\nimport { TasksDrawer } from './TasksDrawer'\n\n/**\n * The sidebar row that opens tasks.\n *\n * It no longer registers the rail tab — the shell does that now (db 047 made\n * public.tasks a spine table, so every app has the tab whether or not this\n * plugin is installed). What is left is the row and, on a shell without a rail,\n * the sheet.\n */\nexport function TasksLauncher() {\n const railMounted = useRightRailStore((s) => s.mounted)\n\n return (\n <>\n <TasksLauncherRow railMounted={railMounted} />\n {!railMounted && <TasksDrawer />}\n </>\n )\n}\n\nfunction TasksLauncherRow({ railMounted }: { railMounted: boolean }) {\n const t = useTranslation()\n const toggleDrawer = useTasksStore((s) => s.toggleDrawer)\n const fetchSummary = useTasksStore((s) => s.fetchSummary)\n const summary = useTasksStore((s) => s.summary)\n const togglePanel = useRightRailStore((s) => s.togglePanel)\n\n useEffect(() => {\n fetchSummary()\n }, [fetchSummary])\n\n const pendingCount = summary ? summary.todo + summary.inProgress : 0\n const collapsed = useLayoutStore((s) => s.sidebarCollapsed)\n // Numa shell sem trilha a shell põe isto na barra de topo — ali só cabe o\n // ícone, exatamente como na trilha recolhida.\n const surface = useWidgetSurface()\n const compact = collapsed || surface === 'topbar'\n const label = t('tasks.drawer.title') || 'Tasks'\n const open = () => (railMounted ? togglePanel('tasks') : toggleDrawer())\n // Na trilha recolhida, o mesmo painel de hover que os links abrem — senão\n // esta linha é o único ícone do menu sem nome.\n const railRow = useRailRow(\n surface === 'rail'\n ? { key: 'tasks', label, badge: pendingCount > 0 ? pendingCount : undefined }\n : null,\n )\n\n // A row of the rail, not an icon in the top bar. Tarefas são do workspace —\n // não mudam com a tela aberta — e lá em cima dividiam o canto com o \"Novo\" da\n // página. Os tokens já eram os da trilha (`text-sidebar-*`), o que sobre papel\n // dava um ícone quase invisível: agora eles pousam onde foram feitos.\n if (compact) {\n return (\n <Button variant=\"bare\" size=\"bare\"\n {...railRow}\n onClick={open}\n aria-label={label}\n // Na barra de topo não há painel da trilha para dizer o nome.\n title={surface === 'topbar' ? label : undefined}\n className={cn(\n 'fz-tap relative flex shrink-0 items-center justify-center rounded-button p-2 font-normal text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground',\n // Na trilha ele é uma linha (ocupa a coluna); na barra, um ícone\n // entre outros, e esticar tomaria a barra inteira.\n surface === 'rail' && 'w-full',\n )}\n >\n <CheckSquare className=\"h-4 w-4\" />\n {pendingCount > 0 && (\n <span className=\"absolute right-1 top-1 h-2 w-2 rounded-full bg-destructive\" />\n )}\n </Button>\n )\n }\n\n return (\n <Button variant=\"bare\" size=\"bare\"\n onClick={open}\n aria-label={label}\n className=\"fz-tap flex w-full items-center gap-2 rounded-button px-2.5 py-1.5 text-sm text-sidebar-muted transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground font-normal justify-start\"\n >\n <CheckSquare className=\"h-4 w-4 shrink-0\" />\n <span className=\"min-w-0 flex-1 truncate text-left\">{label}</span>\n {pendingCount > 0 && (\n <span\n className={cn(\n 'flex shrink-0 items-center justify-center rounded-full bg-destructive text-[10px] text-destructive-foreground',\n pendingCount > 9 ? 'h-5 min-w-5 px-1' : 'h-4 w-4',\n )}\n >\n {pendingCount > 99 ? '99+' : pendingCount}\n </span>\n )}\n </Button>\n )\n}\n","// AUTO-GENERATED from 000_baseline.sql — regenerate with scripts/embed-migrations.mjs\n// SQL files are the source of truth; this inline copy lets the manifest declare\n// migrations as data. Do not edit by hand — run the embed script instead.\n\nexport const MIGRATION_000_BASELINE = `-- ============================================================================\n-- plugins/plugin-tasks/src/migrations/000_baseline.sql — what installing this provisions, as one file.\n--\n-- GENERATED by scripts/emit-unit-baselines.mjs (#338). Do not edit by hand:\n-- change the schema, regenerate, and let scripts/check-chain-equivalence.mjs\n-- prove the result still matches.\n--\n-- This replaced 3 migration files. They are kept, unapplied, in\n-- migrations.archive/ — a year of decisions is worth reading even when it is no\n-- longer worth replaying.\n--\n-- Object order is fixed rather than dependency-sorted: schemas, types,\n-- sequences, tables, defaults, functions, constraints, views, indexes, foreign\n-- keys, triggers, row security, policies, grants. Dependencies BETWEEN units\n-- are carried by the order packages/db/chain.json declares.\n-- ============================================================================\n\n-- A LANGUAGE sql function binds its body at CREATE time, and 570 functions\n-- sorted by name are not sorted by who calls whom. This is what lets them load\n-- in any order; every body is still compiled on first call, so a genuinely\n-- broken reference surfaces then rather than never. Session-scoped.\nSET check_function_bodies = false;\n\n\n\n-- ── default privileges: reset ───────────────────────────────────────────\n-- Cleared BEFORE anything is created, so every object below gets the ACL the\n-- dump describes rather than the image's defaults on top of it. Restored at\n-- the end of this file.\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON SEQUENCES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON FUNCTIONS FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL ON TABLES FROM anon, authenticated, service_role, fayz_connector$stmt$;\nEND $dp$;\n\n\n-- ── table ───────────────────────────────────────────────────────────────\n\nCREATE TABLE public.plg_tasks_labels (\n id uuid DEFAULT gen_random_uuid() NOT NULL,\n tenant_id uuid NOT NULL,\n name text NOT NULL,\n color text DEFAULT '#6366f1'::text NOT NULL,\n is_active boolean DEFAULT true NOT NULL,\n created_at timestamp with time zone DEFAULT now() NOT NULL\n);\n\nCREATE TABLE public.plg_tasks_tasks (\n id uuid DEFAULT gen_random_uuid() NOT NULL,\n tenant_id uuid NOT NULL,\n title text NOT NULL,\n description text,\n status text DEFAULT 'todo'::text NOT NULL,\n priority text DEFAULT 'medium'::text NOT NULL,\n due_date date,\n assigned_to_id uuid,\n assigned_to_name text,\n parent_id uuid,\n labels jsonb DEFAULT '[]'::jsonb NOT NULL,\n \"position\" integer DEFAULT 0 NOT NULL,\n created_by_id uuid,\n created_by_name text,\n created_at timestamp with time zone DEFAULT now() NOT NULL,\n updated_at timestamp with time zone DEFAULT now() NOT NULL,\n CONSTRAINT plg_tasks_tasks_priority_check CHECK ((priority = ANY (ARRAY['low'::text, 'medium'::text, 'high'::text, 'urgent'::text]))),\n CONSTRAINT plg_tasks_tasks_status_check CHECK ((status = ANY (ARRAY['todo'::text, 'in_progress'::text, 'done'::text, 'cancelled'::text])))\n);\n\n\n-- ── constraint ──────────────────────────────────────────────────────────\n\nALTER TABLE ONLY public.plg_tasks_labels\n ADD CONSTRAINT plg_tasks_labels_pkey PRIMARY KEY (id);\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_pkey PRIMARY KEY (id);\n\n\n-- ── index ───────────────────────────────────────────────────────────────\n\nCREATE INDEX idx_plg_tasks_labels_tenant ON public.plg_tasks_labels USING btree (tenant_id);\n\nCREATE INDEX idx_plg_tasks_tasks_assigned ON public.plg_tasks_tasks USING btree (assigned_to_id);\n\nCREATE INDEX idx_plg_tasks_tasks_due ON public.plg_tasks_tasks USING btree (tenant_id, due_date) WHERE (due_date IS NOT NULL);\n\nCREATE INDEX idx_plg_tasks_tasks_parent ON public.plg_tasks_tasks USING btree (parent_id);\n\nCREATE INDEX idx_plg_tasks_tasks_status ON public.plg_tasks_tasks USING btree (tenant_id, status);\n\nCREATE INDEX idx_plg_tasks_tasks_tenant ON public.plg_tasks_tasks USING btree (tenant_id);\n\n\n-- ── fk constraint ───────────────────────────────────────────────────────\n\nALTER TABLE ONLY public.plg_tasks_labels\n ADD CONSTRAINT plg_tasks_labels_tenant_id_fkey FOREIGN KEY (tenant_id) REFERENCES public.tenants(id) ON DELETE CASCADE;\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.plg_tasks_tasks(id) ON DELETE CASCADE;\n\nALTER TABLE ONLY public.plg_tasks_tasks\n ADD CONSTRAINT plg_tasks_tasks_tenant_id_fkey FOREIGN KEY (tenant_id) REFERENCES public.tenants(id) ON DELETE CASCADE;\n\n\n-- ── row security ────────────────────────────────────────────────────────\n\nALTER TABLE public.plg_tasks_labels ENABLE ROW LEVEL SECURITY;\n\nALTER TABLE public.plg_tasks_tasks ENABLE ROW LEVEL SECURITY;\n\n\n-- ── policy ──────────────────────────────────────────────────────────────\n\nCREATE POLICY plg_tasks_labels_delete ON public.plg_tasks_labels FOR DELETE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_insert ON public.plg_tasks_labels FOR INSERT TO authenticated WITH CHECK ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_select ON public.plg_tasks_labels FOR SELECT TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_labels_update ON public.plg_tasks_labels FOR UPDATE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_delete ON public.plg_tasks_tasks FOR DELETE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_insert ON public.plg_tasks_tasks FOR INSERT TO authenticated WITH CHECK ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_select ON public.plg_tasks_tasks FOR SELECT TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\nCREATE POLICY plg_tasks_tasks_update ON public.plg_tasks_tasks FOR UPDATE TO authenticated USING ((tenant_id IN ( SELECT public.user_tenant_ids() AS user_tenant_ids)));\n\n\n-- ── acl ─────────────────────────────────────────────────────────────────\n\nGRANT MAINTAIN ON TABLE public.plg_tasks_labels TO anon;\nGRANT ALL ON TABLE public.plg_tasks_labels TO authenticated;\nGRANT ALL ON TABLE public.plg_tasks_labels TO service_role;\n\nGRANT MAINTAIN ON TABLE public.plg_tasks_tasks TO anon;\nGRANT ALL ON TABLE public.plg_tasks_tasks TO authenticated;\nGRANT ALL ON TABLE public.plg_tasks_tasks TO service_role;\n\n\n-- ── default privileges: restore ─────────────────────────────────────────\n-- Put back, so the NEXT thing installed inherits what the chain had.\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT MAINTAIN ON TABLES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT MAINTAIN ON TABLES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO postgres$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO anon$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO anon$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO authenticated$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES TO service_role$stmt$;\nEND $dp$;\n\nDO $dp$ BEGIN\n EXECUTE $stmt$--\n-- PostgreSQL database dump complete\n--$stmt$;\nEXCEPTION WHEN insufficient_privilege OR undefined_object THEN\n RAISE NOTICE 'baseline: not ours to set — %', $stmt$--\n-- PostgreSQL database dump complete\n--$stmt$;\nEND $dp$;\n`\n\nexport const MIGRATIONS: Array<{ id: string; sql: string }> = [\n { id: \"000_baseline\", sql: MIGRATION_000_BASELINE },\n]\n","import { defineSettingsTab } from '@fayz-ai/admin'\nimport { tl } from '@fayz-ai/core'\n\nconst TRIGGERS: Array<[string, string, string]> = [\n ['payable_created', 'A bill to pay is created', 'Conta a pagar criada'],\n ['payable_refund', 'A refund is due', 'Estorno a pagar'],\n ['cash_review_pending', 'A cash register awaits review', 'Caixa aguardando conferência'],\n ['cash_review_returned', 'A cash review is sent back', 'Conferência de caixa devolvida'],\n ['checkout_pending', 'A checkout is pending', 'Fechamento pendente'],\n ['dfe_received', 'A supplier invoice arrives', 'Nota de fornecedor recebida'],\n ['stock_loss_pending', 'A stock loss awaits approval', 'Perda de estoque aguardando aprovação'],\n ['stock_requisition_submitted', 'A stock requisition is sent', 'Requisição de estoque enviada'],\n ['stock_count_review', 'A stock count awaits review', 'Contagem de estoque para revisar'],\n ['stock_transfer_pending', 'A stock transfer is pending', 'Transferência de estoque pendente'],\n ['fiscal_rejected', 'An invoice is rejected', 'Nota fiscal rejeitada'],\n ['service_charge_approved', 'A service charge split is approved', 'Rateio da taxa de serviço aprovado'],\n ['hr_deadlines', 'An HR deadline is near', 'Prazo de RH chegando'],\n]\n\nexport const tasksV1SettingsTabs = [\n defineSettingsTab({\n id: 'tasks',\n label: tl('Tasks', 'Tarefas'),\n icon: 'CheckSquare',\n section: 'operations',\n pending: true,\n defaults: { 'tasks.default_priority': 'medium' },\n sections: [{\n title: tl('Defaults', 'Padrões'),\n fields: [{ key: 'tasks.default_priority', type: 'select', label: tl('Default priority', 'Prioridade padrão'), options: [\n { value: 'low', label: tl('Low', 'Baixa') }, { value: 'medium', label: tl('Medium', 'Média') },\n { value: 'high', label: tl('High', 'Alta') }, { value: 'urgent', label: tl('Urgent', 'Urgente') },\n ] }],\n }, {\n title: tl('Automations', 'Automações'),\n description: tl('Create a task for the right team when…', 'Criar uma tarefa para o setor certo quando…'),\n fields: TRIGGERS.map(([id, en, pt]) => ({ key: `tasks.auto.${id}`, type: 'boolean' as const, label: tl(en, pt) })),\n }],\n }),\n]\n","import React from 'react'\nimport type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'\nimport { registerTranslations } from '@fayz-ai/core'\nimport {\n getTasksProvider, useTasksStore,\n registerNotesTasksAdapter, NOTE_LABEL_PREFIX,\n type TasksDataProvider, type TaskPriority,\n} from '@fayz-ai/admin'\nimport type { ResolvedTasksConfig, TasksPluginLabels } from './context'\nimport { tasksLocales } from './locales'\nimport { tasksRegistries } from './data/registries'\nimport { TasksLauncher } from './components/TasksLauncher'\nimport { MIGRATIONS } from './migrations'\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface TasksPluginOptions {\n /** Label overrides */\n labels?: Partial<TasksPluginLabels>\n /** Plugin scope */\n scope?: PluginScope\n /** Vertical ID */\n verticalId?: VerticalId\n /** Data provider override (defaults to the shell's) */\n dataProvider?: TasksDataProvider\n /** Default priority for new tasks (default: 'medium') */\n defaultPriority?: TaskPriority\n /**\n * Show the Tasks row in the sidebar's foot. Default: true.\n *\n * The panel is worth a permanent row in a product where tasks are the work —\n * an agency, a clinic with a follow-up list. In one where they are back-office\n * (a restaurant during service), that row spends the whole shift competing\n * with the things somebody actually touches, and the badge on it is a red\n * number about paperwork. Turning it off keeps the plugin whole: the table,\n * the provider, the settings tab, the agent's tools and the onboarding rows it\n * carries all stay — only the rail entry goes.\n */\n launcher?: boolean\n}\n\nconst DEFAULT_LABELS: TasksPluginLabels = {\n drawerTitle: 'Tasks',\n settingsTitle: 'Tasks',\n quickAddPlaceholder: 'Add a task...',\n}\n\nfunction resolveConfig(options?: TasksPluginOptions): ResolvedTasksConfig {\n return {\n labels: { ...DEFAULT_LABELS, ...options?.labels },\n }\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nexport function createTasksPlugin(options?: TasksPluginOptions): PluginManifest {\n const config = resolveConfig(options)\n // Register locales globally so the plugin's translations resolve even when the\n // host shell does not mount @fayz-ai/core's I18nProvider (incremental de-bridge).\n registerTranslations(tasksLocales)\n\n // The table moved to the spine (db 047) and so did the store, the provider and\n // the panel. What is left here is the sidebar row, the sheet fallback, the\n // label catalogue and the settings tab — the plugin is now a set of surfaces\n // over a table it no longer owns.\n const provider = options?.dataProvider ?? getTasksProvider()\n const store = useTasksStore\n\n // Notes ↔ Tasks bridge: note todos are real tasks, linked by a `note:<id>`\n // label. The shell's Notes tab consumes this; the Tarefas tab (and its\n // summary badge) stays the single source of truth.\n registerNotesTasksAdapter({\n async createTodo({ title, noteId, noteTitle }) {\n const task = await provider.createTask({\n title,\n description: noteTitle ? `Nota: ${noteTitle}` : undefined,\n labels: [`${NOTE_LABEL_PREFIX}${noteId}`],\n })\n void store.getState().fetchSummary()\n return { id: task.id, title: task.title, done: task.status === 'done' }\n },\n async listTodos(noteId) {\n const tasks = await provider.getTasks({})\n const label = `${NOTE_LABEL_PREFIX}${noteId}`\n return tasks\n .filter((t) => t.labels.includes(label))\n .sort((a, b) => (a.status === 'done' ? 1 : 0) - (b.status === 'done' ? 1 : 0))\n .map((t) => ({ id: t.id, title: t.title, done: t.status === 'done' }))\n },\n async toggleTodo(id: string, done: boolean) {\n await provider.updateTask(id, { status: done ? 'done' : 'todo' })\n void store.getState().fetchSummary()\n },\n async removeTodo(id: string) {\n await provider.deleteTask(id)\n void store.getState().fetchSummary()\n },\n })\n\n return {\n id: 'tasks',\n defaultAgentRole: 'setup',\n name: config.labels.drawerTitle,\n icon: 'CheckSquare',\n version: '1.0.0',\n scope: options?.scope ?? 'universal',\n verticalId: options?.verticalId,\n defaultEnabled: true,\n dependencies: [],\n\n navigation: [],\n\n routes: [],\n\n widgets: options?.launcher === false ? [] : [\n {\n // No pé da trilha, não no topo: tarefas são do workspace, não da\n // tela aberta — e no topo elas dividiam o canto com as ações da página.\n id: 'tasks-launcher',\n zone: 'shell.sidebar.footer',\n component: TasksLauncher as unknown as React.ComponentType<unknown>,\n order: 10,\n props: {\n tasksConfig: config,\n tasksProvider: provider,\n },\n },\n ],\n\n aiTools: [\n {\n id: 'tasks.summary',\n name: 'getTasksSummary',\n description: 'Returns a summary of pending tasks: total, overdue, due today, by status and priority.',\n icon: 'CheckSquare',\n mode: 'read' as const,\n category: 'Tasks',\n parameters: {\n type: 'object' as const,\n properties: {\n status: {\n type: 'string' as const,\n description: 'Filter by task status',\n enum: ['todo', 'in_progress', 'done', 'cancelled', 'all'],\n },\n },\n },\n suggestions: [\n { label: 'What tasks are overdue?' },\n { label: 'How many tasks are pending?' },\n { label: \"What's due today?\" },\n ],\n },\n ],\n\n registries: tasksRegistries,\n\n settings: [\n // One \"Tarefas\" screen, as in V1. The old default-priority toggle saved a\n // value nothing read; it now waits in the same Em breve screen.\n ...tasksV1SettingsTabs,\n ],\n\n // One baseline per unit since #338 — read from the generated barrel\n // rather than listed here, so regenerating the SQL never needs a\n // manifest edit to match.\n migrations: MIGRATIONS.map((entry) => ({\n id: `tasks-${entry.id}`,\n version: '1.0.0',\n sql: entry.sql,\n description:\n 'The whole schema this plugin provisions, as one file: every table, view, function, policy and grant, plus the reference rows it seeds. Replaced the per-change chain in the 1.0.0 squash (#338); the files it collapsed are kept, unapplied, in src/migrations.archive/.',\n })),\n\n locales: tasksLocales,\n }\n}\n\n// ---------------------------------------------------------------------------\n// Re-exports — the tasks slice lives in @fayz-ai/admin now, but this package's\n// public surface stays what it was.\n// ---------------------------------------------------------------------------\n\nexport type { ResolvedTasksConfig, TasksPluginLabels } from './context'\nexport type {\n Task, TaskLabel, TaskStatus, TaskPriority, TasksSummary,\n CreateTaskInput, UpdateTaskInput, TaskQuery, TasksDataProvider,\n} from '@fayz-ai/admin'\nexport {\n TasksPanel, TaskCard, TaskDetail, TaskQuickAdd, TasksFilterBar,\n useTasksStore, useTasksSummaryLine,\n createSupabaseTasksProvider, createMockTasksProvider,\n} from '@fayz-ai/admin'\nimport { tasksV1SettingsTabs } from './settings/v1-settings'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1-settings.d.ts","sourceRoot":"","sources":["../../src/settings/v1-settings.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,mBAAmB,6CAoB/B,CAAA"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"status": "beta",
|
|
5
5
|
"dependencies": []
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.11.0",
|
|
8
8
|
"description": "Fayz SDK — plugin-tasks plugin",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"lucide-react": ">=0.400.0 <1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fayz-ai/core": "^0.
|
|
31
|
-
"@fayz-ai/admin": "^0.
|
|
32
|
-
"@fayz-ai/ui": "^0.
|
|
30
|
+
"@fayz-ai/core": "^0.48.0",
|
|
31
|
+
"@fayz-ai/admin": "^0.48.0",
|
|
32
|
+
"@fayz-ai/ui": "^0.48.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "^18.3.0",
|