@hachej/boring-tasks 0.1.79

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.
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @hachej/boring-tasks
2
+
3
+ Lean Kanban task-board plugin for boring-ui.
4
+
5
+ `boring-tasks` owns only the generic board UI:
6
+
7
+ - standard task cards: number, title, description;
8
+ - adapter selector;
9
+ - flexible adapter-supplied columns;
10
+ - drag/drop status moves;
11
+ - optimistic update and revert.
12
+
13
+ Source-specific behavior belongs in adapters. A GitHub, Linear, Kata, or custom DB adapter maps native status/actions to the normalized board model; the Kanban UI does not know those systems.
14
+
15
+ The server plugin reads its own plugin config and creates task sources from it. In CLI workspaces mode, the host stores this config under the workspace's opaque `plugins.tasks` section:
16
+
17
+ ```yaml
18
+ plugins:
19
+ tasks:
20
+ providers:
21
+ - provider: github
22
+ repo: auto
23
+ - provider: github
24
+ repo: hachej/boring-ui
25
+ ```
26
+
27
+ `repo: auto` detects the repository with `gh repo view --json nameWithOwner` from the workspace root, so each local CLI workspace can map to its own associated GitHub repo. The GitHub source requires `gh auth login` and repository access. If no Tasks config is present, the backend exposes no task sources. If backend routes are unavailable, the front end still falls back to demo adapters for review/playground usage.
@@ -0,0 +1,42 @@
1
+ import { BoringFrontAppLeftOverlayProps, BoringFrontFactoryWithId } from '@hachej/boring-workspace/plugin';
2
+ import * as react from 'react';
3
+ import { BoringTaskAdapter, BoringTaskCard, BoringTaskAdapterSummary } from '../shared/index.js';
4
+ export { BoringTaskAdapterCapabilities, BoringTaskBoardConfig, BoringTaskColumn, BoringTaskEpicRef, BoringTaskMoveInput, BoringTaskStatusId } from '../shared/index.js';
5
+ import { WorkspacePluginClient } from '@hachej/boring-workspace';
6
+
7
+ interface TaskKanbanBoardProps {
8
+ adapters: readonly BoringTaskAdapter[];
9
+ }
10
+ declare function TaskKanbanBoard({ adapters }: TaskKanbanBoardProps): react.JSX.Element;
11
+
12
+ declare function TasksOverlay({ onClose }: BoringFrontAppLeftOverlayProps): react.JSX.Element;
13
+
14
+ interface GitHubMoveIssueInput {
15
+ owner: string;
16
+ repo: string;
17
+ issueNumber: number;
18
+ statusId: string;
19
+ }
20
+ interface GitHubIssuesAdapterOptions {
21
+ owner: string;
22
+ repo: string;
23
+ limit?: number;
24
+ state?: "open" | "closed" | "all";
25
+ /**
26
+ * Optional hosted mover. The browser demo intentionally omits this; hosted
27
+ * apps can route it to a backend that uses `gh` CLI today or GitHub API later.
28
+ */
29
+ moveIssue?: (input: GitHubMoveIssueInput) => Promise<BoringTaskCard | void> | BoringTaskCard | void;
30
+ }
31
+ declare function createGitHubIssuesAdapter({ owner, repo, limit, state, moveIssue }: GitHubIssuesAdapterOptions): BoringTaskAdapter;
32
+
33
+ type TaskHttpClient = Pick<WorkspacePluginClient, "getJson" | "postJson">;
34
+ declare function listHttpTaskSources(client?: TaskHttpClient): Promise<BoringTaskAdapterSummary[]>;
35
+ declare function createHttpTaskAdapter(source: BoringTaskAdapterSummary, client?: TaskHttpClient): BoringTaskAdapter;
36
+
37
+ declare function createMockTaskAdapter(initialTasks?: readonly BoringTaskCard[]): BoringTaskAdapter;
38
+
39
+ declare function createTasksPlugin(): BoringFrontFactoryWithId;
40
+ declare const tasksPlugin: BoringFrontFactoryWithId;
41
+
42
+ export { BoringTaskAdapter, BoringTaskAdapterSummary, BoringTaskCard, TaskKanbanBoard, TasksOverlay, createGitHubIssuesAdapter, createHttpTaskAdapter, createMockTaskAdapter, createTasksPlugin, tasksPlugin as default, listHttpTaskSources };