@hasna/todos 0.11.13 → 0.11.15

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.
Files changed (39) hide show
  1. package/dist/cli/commands/dispatch.d.ts +3 -0
  2. package/dist/cli/commands/dispatch.d.ts.map +1 -0
  3. package/dist/cli/index.js +6685 -5433
  4. package/dist/db/database.d.ts.map +1 -1
  5. package/dist/db/dispatches.d.ts +15 -0
  6. package/dist/db/dispatches.d.ts.map +1 -0
  7. package/dist/db/schema.d.ts +6 -0
  8. package/dist/db/schema.d.ts.map +1 -0
  9. package/dist/db/task-claim.d.ts +7 -0
  10. package/dist/db/task-claim.d.ts.map +1 -0
  11. package/dist/db/task-workflow.d.ts +7 -0
  12. package/dist/db/task-workflow.d.ts.map +1 -0
  13. package/dist/index.d.ts +7 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +5067 -4057
  16. package/dist/lib/dispatch-formatter.d.ts +21 -0
  17. package/dist/lib/dispatch-formatter.d.ts.map +1 -0
  18. package/dist/lib/dispatch.d.ts +28 -0
  19. package/dist/lib/dispatch.d.ts.map +1 -0
  20. package/dist/lib/tmux.d.ts +28 -0
  21. package/dist/lib/tmux.d.ts.map +1 -0
  22. package/dist/mcp/index.d.ts.map +1 -1
  23. package/dist/mcp/index.js +5348 -4245
  24. package/dist/mcp/tools/agents.d.ts +16 -0
  25. package/dist/mcp/tools/agents.d.ts.map +1 -0
  26. package/dist/mcp/tools/dispatch.d.ts +9 -0
  27. package/dist/mcp/tools/dispatch.d.ts.map +1 -0
  28. package/dist/mcp/tools/templates.d.ts +9 -0
  29. package/dist/mcp/tools/templates.d.ts.map +1 -0
  30. package/dist/mcp/tools/webhooks.d.ts +8 -0
  31. package/dist/mcp/tools/webhooks.d.ts.map +1 -0
  32. package/dist/types/index.d.ts +73 -0
  33. package/dist/types/index.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/dashboard/dist/assets/index-B-w1tUlm.js +0 -346
  36. package/dashboard/dist/assets/index-BXQ39iMX.css +0 -1
  37. package/dashboard/dist/index.html +0 -13
  38. package/dashboard/dist/logo.jpg +0 -0
  39. package/dist/server/index.js +0 -4707
@@ -0,0 +1,21 @@
1
+ import type { Task } from "../types/index.ts";
2
+ export interface FormatOpts {
3
+ /** Include task description (truncated to 200 chars). Default: true */
4
+ includeDescription?: boolean;
5
+ /** Include priority badge. Default: true */
6
+ includePriority?: boolean;
7
+ /** Include tags. Default: false */
8
+ includeTags?: boolean;
9
+ /** Heading override for task list dispatches */
10
+ listName?: string;
11
+ }
12
+ /**
13
+ * Format a single task into a compact one-liner.
14
+ * e.g. "[HIGH] APP-00001: Fix the login bug"
15
+ */
16
+ export declare function formatSingleTask(task: Task, opts?: FormatOpts): string;
17
+ /**
18
+ * Format multiple tasks into a numbered list with optional header.
19
+ */
20
+ export declare function formatDispatchMessage(tasks: Task[], opts?: FormatOpts): string;
21
+ //# sourceMappingURL=dispatch-formatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-formatter.d.ts","sourceRoot":"","sources":["../../src/lib/dispatch-formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,mBAAmB,CAAC;AAW5D,MAAM,WAAW,UAAU;IACzB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,4CAA4C;IAC5C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,GAAE,UAAe,GAAG,MAAM,CAqB1E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,GAAE,UAAe,GAAG,MAAM,CAmClF"}
@@ -0,0 +1,28 @@
1
+ import type { Database } from "bun:sqlite";
2
+ import type { CreateDispatchInput, Dispatch } from "../types/index.ts";
3
+ export type { FormatOpts } from "./dispatch-formatter.ts";
4
+ /**
5
+ * Execute a single dispatch: resolve tasks, format, send to tmux, update status.
6
+ */
7
+ export declare function executeDispatch(dispatch: Dispatch, opts?: {
8
+ dryRun?: boolean;
9
+ formatOpts?: import("./dispatch-formatter.ts").FormatOpts;
10
+ }, db?: Database): Promise<void>;
11
+ /**
12
+ * Run all due dispatches (pending + scheduled_at <= now).
13
+ * Returns the count of dispatches that were fired.
14
+ */
15
+ export declare function runDueDispatches(opts?: {
16
+ dryRun?: boolean;
17
+ }, db?: Database): Promise<number>;
18
+ /**
19
+ * Fan-out: dispatch the same task set to multiple tmux windows.
20
+ * Returns the list of created Dispatch objects.
21
+ */
22
+ export declare function dispatchToMultiple(input: Omit<CreateDispatchInput, "target_window"> & {
23
+ targets: string[];
24
+ stagger_ms?: number;
25
+ }, opts?: {
26
+ dryRun?: boolean;
27
+ }, db?: Database): Promise<Dispatch[]>;
28
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/lib/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAW3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAc,MAAM,mBAAmB,CAAC;AAGnF,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,QAAQ,EAClB,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,yBAAyB,EAAE,UAAU,CAAA;CAAO,EAC1F,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CAuDf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,EAC/B,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9F,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,EAC/B,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAAC,QAAQ,EAAE,CAAC,CAmBrB"}
@@ -0,0 +1,28 @@
1
+ import type { TmuxTarget } from "../types/index.ts";
2
+ export declare const DELAY_MIN = 3000;
3
+ export declare const DELAY_MAX = 5000;
4
+ /**
5
+ * Parse a tmux target spec into its components.
6
+ * Accepts: "window", "session:window", "session:window.pane"
7
+ */
8
+ export declare function parseTmuxTarget(spec: string): TmuxTarget;
9
+ /**
10
+ * Build the canonical tmux target string from a TmuxTarget.
11
+ */
12
+ export declare function formatTmuxTarget(target: TmuxTarget): string;
13
+ /**
14
+ * Validate a tmux target by running `tmux list-panes -t <target>`.
15
+ * Throws if tmux is not installed or the target doesn't exist.
16
+ */
17
+ export declare function validateTmuxTarget(spec: string): Promise<void>;
18
+ /**
19
+ * Auto-calculate delay in ms based on message length.
20
+ * Range: DELAY_MIN (3s) to DELAY_MAX (5s), scaling linearly.
21
+ */
22
+ export declare function calculateDelay(message: string): number;
23
+ /**
24
+ * Send a message to a tmux window/pane, wait delayMs, then send Enter.
25
+ * Set dryRun=true to log instead of executing.
26
+ */
27
+ export declare function sendToTmux(target: string, message: string, delayMs: number, dryRun?: boolean): Promise<void>;
28
+ //# sourceMappingURL=tmux.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tmux.d.ts","sourceRoot":"","sources":["../../src/lib/tmux.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,eAAO,MAAM,SAAS,OAAO,CAAC;AAE9B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAuCxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAK3D;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,MAAM,UAAQ,GACb,OAAO,CAAC,IAAI,CAAC,CA+Bf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAiJA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAO9E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAsJA,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAO9E"}