@andypai/agent-kanban 0.3.0 → 0.3.2

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 (59) hide show
  1. package/README.md +34 -5
  2. package/package.json +1 -1
  3. package/src/__tests__/activity.test.ts +2 -2
  4. package/src/__tests__/api.test.ts +3 -3
  5. package/src/__tests__/commands/board.test.ts +3 -3
  6. package/src/__tests__/commands/bulk.test.ts +3 -3
  7. package/src/__tests__/commands/column.test.ts +4 -4
  8. package/src/__tests__/conflict.test.ts +3 -3
  9. package/src/__tests__/db.test.ts +2 -2
  10. package/src/__tests__/id.test.ts +1 -1
  11. package/src/__tests__/index.test.ts +3 -3
  12. package/src/__tests__/jira-adf.test.ts +270 -4
  13. package/src/__tests__/jira-cache.test.ts +1 -1
  14. package/src/__tests__/jira-client.test.ts +2 -2
  15. package/src/__tests__/jira-provider-comment.test.ts +3 -3
  16. package/src/__tests__/jira-provider-mutations.test.ts +4 -4
  17. package/src/__tests__/jira-provider-read.test.ts +52 -6
  18. package/src/__tests__/jira-wiring.test.ts +3 -3
  19. package/src/__tests__/linear-cache-description-activity.test.ts +1 -1
  20. package/src/__tests__/linear-provider-comment.test.ts +2 -2
  21. package/src/__tests__/linear-provider-sync.test.ts +4 -9
  22. package/src/__tests__/local-provider-comment.test.ts +2 -2
  23. package/src/__tests__/mcp-core.test.ts +4 -4
  24. package/src/__tests__/mcp-server.test.ts +3 -3
  25. package/src/__tests__/metrics.test.ts +2 -2
  26. package/src/__tests__/output.test.ts +1 -1
  27. package/src/__tests__/provider-capabilities.test.ts +40 -0
  28. package/src/__tests__/server.test.ts +3 -10
  29. package/src/__tests__/webhooks.test.ts +6 -6
  30. package/src/activity.ts +2 -2
  31. package/src/api.ts +3 -3
  32. package/src/commands/board.ts +4 -4
  33. package/src/commands/bulk.ts +4 -4
  34. package/src/commands/column.ts +4 -4
  35. package/src/commands/mcp.ts +3 -3
  36. package/src/config.ts +1 -1
  37. package/src/db.ts +4 -4
  38. package/src/index.ts +13 -19
  39. package/src/mcp/core.ts +4 -4
  40. package/src/mcp/errors.ts +1 -1
  41. package/src/mcp/index.ts +6 -6
  42. package/src/mcp/server.ts +3 -3
  43. package/src/mcp/types.ts +2 -2
  44. package/src/metrics.ts +1 -1
  45. package/src/output.ts +1 -1
  46. package/src/providers/capabilities.ts +21 -31
  47. package/src/providers/errors.ts +1 -1
  48. package/src/providers/index.ts +6 -6
  49. package/src/providers/jira-adf.ts +116 -12
  50. package/src/providers/jira-cache.ts +1 -1
  51. package/src/providers/jira-client.ts +2 -2
  52. package/src/providers/jira.ts +9 -14
  53. package/src/providers/linear-cache.ts +1 -1
  54. package/src/providers/linear-client.ts +3 -6
  55. package/src/providers/linear.ts +8 -13
  56. package/src/providers/local.ts +8 -8
  57. package/src/providers/types.ts +2 -2
  58. package/src/server.ts +2 -2
  59. package/src/types.ts +1 -0
@@ -3,9 +3,9 @@ import { Database } from 'bun:sqlite'
3
3
  import { mkdtempSync, rmSync } from 'node:fs'
4
4
  import { tmpdir } from 'node:os'
5
5
  import { join } from 'node:path'
6
- import { ErrorCode, KanbanError } from '../errors.ts'
7
- import { run } from '../index.ts'
8
- import { createProvider } from '../providers/index.ts'
6
+ import { ErrorCode, KanbanError } from '../errors'
7
+ import { run } from '../index'
8
+ import { createProvider } from '../providers/index'
9
9
 
10
10
  const ENV_KEYS = [
11
11
  'KANBAN_PROVIDER',
@@ -6,7 +6,7 @@ import {
6
6
  getCachedLinearActivity,
7
7
  initLinearCacheSchema,
8
8
  upsertIssues,
9
- } from '../providers/linear-cache.ts'
9
+ } from '../providers/linear-cache'
10
10
 
11
11
  function mkIssue(overrides: Partial<Parameters<typeof upsertIssues>[1][0]> = {}) {
12
12
  return {
@@ -1,12 +1,12 @@
1
1
  import { afterEach, beforeEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
- import { LinearProvider } from '../providers/linear.ts'
3
+ import { LinearProvider } from '../providers/linear'
4
4
  import {
5
5
  initLinearCacheSchema,
6
6
  replaceStates,
7
7
  saveSyncMeta,
8
8
  upsertIssues,
9
- } from '../providers/linear-cache.ts'
9
+ } from '../providers/linear-cache'
10
10
 
11
11
  let db: Database
12
12
  let originalFetch: typeof fetch
@@ -1,6 +1,6 @@
1
1
  import { afterEach, beforeEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
- import { LinearProvider } from '../providers/linear.ts'
3
+ import { LinearProvider } from '../providers/linear'
4
4
  import {
5
5
  getCachedTasks,
6
6
  initLinearCacheSchema,
@@ -8,7 +8,7 @@ import {
8
8
  replaceStates,
9
9
  saveSyncMeta,
10
10
  upsertIssues,
11
- } from '../providers/linear-cache.ts'
11
+ } from '../providers/linear-cache'
12
12
 
13
13
  let db: Database
14
14
  let originalFetch: typeof fetch
@@ -38,7 +38,6 @@ function linearIssue(
38
38
  state: { id: string; name: string; position: number }
39
39
  labels: { nodes: Array<{ id: string; name: string }> }
40
40
  comments: {
41
- totalCount?: number
42
41
  nodes: Array<{ id: string }>
43
42
  pageInfo?: { hasNextPage: boolean; endCursor: string | null }
44
43
  }
@@ -57,7 +56,7 @@ function linearIssue(
57
56
  project: null,
58
57
  state: { id: 'state-1', name: 'Todo', position: 0 },
59
58
  labels: { nodes: [] },
60
- comments: { totalCount: 0, nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
59
+ comments: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
61
60
  ...overrides,
62
61
  }
63
62
  }
@@ -162,7 +161,6 @@ describe('LinearProvider sync', () => {
162
161
  state: { id: 'state-1', name: 'Todo', position: 0 },
163
162
  labels: { nodes: [] },
164
163
  comments: {
165
- totalCount: 0,
166
164
  nodes: [],
167
165
  pageInfo: { hasNextPage: false, endCursor: null },
168
166
  },
@@ -258,9 +256,7 @@ describe('LinearProvider sync', () => {
258
256
  JSON.stringify({
259
257
  data: {
260
258
  issues: {
261
- nodes: [
262
- linearIssue({ comments: { totalCount: 2, nodes: [{ id: 'c1' }, { id: 'c2' }] } }),
263
- ],
259
+ nodes: [linearIssue({ comments: { nodes: [{ id: 'c1' }, { id: 'c2' }] } })],
264
260
  pageInfo: { hasNextPage: false, endCursor: null },
265
261
  },
266
262
  },
@@ -368,7 +364,6 @@ describe('LinearProvider sync', () => {
368
364
  nodes: [
369
365
  linearIssue({
370
366
  comments: {
371
- totalCount: 7,
372
367
  nodes: Array.from({ length: 7 }, (_, index) => ({ id: `c${index}` })),
373
368
  },
374
369
  }),
@@ -1,7 +1,7 @@
1
1
  import { beforeEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
- import { initSchema, seedDefaultColumns, addTask } from '../db.ts'
4
- import { LocalProvider } from '../providers/local.ts'
3
+ import { initSchema, seedDefaultColumns, addTask } from '../db'
4
+ import { LocalProvider } from '../providers/local'
5
5
 
6
6
  let db: Database
7
7
  let provider: LocalProvider
@@ -1,9 +1,9 @@
1
1
  import { beforeEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
- import { addTask, initSchema, seedDefaultColumns } from '../db.ts'
4
- import { createTrackerCore } from '../mcp/core.ts'
5
- import { TrackerMcpError } from '../mcp/errors.ts'
6
- import { LocalProvider } from '../providers/local.ts'
3
+ import { addTask, initSchema, seedDefaultColumns } from '../db'
4
+ import { createTrackerCore } from '../mcp/core'
5
+ import { TrackerMcpError } from '../mcp/errors'
6
+ import { LocalProvider } from '../providers/local'
7
7
 
8
8
  interface TestScope {
9
9
  actor: string
@@ -2,9 +2,9 @@ import { afterEach, beforeEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
3
  import { Client } from '@modelcontextprotocol/sdk/client'
4
4
  import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
5
- import { addTask, initSchema, seedDefaultColumns } from '../db.ts'
6
- import { createTrackerCore, createTrackerMcpServer, TrackerMcpError } from '../mcp/index.ts'
7
- import { LocalProvider } from '../providers/local.ts'
5
+ import { addTask, initSchema, seedDefaultColumns } from '../db'
6
+ import { createTrackerCore, createTrackerMcpServer, TrackerMcpError } from '../mcp/index'
7
+ import { LocalProvider } from '../providers/local'
8
8
 
9
9
  interface TestScope {
10
10
  actor: string
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test, beforeEach } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
- import { initSchema, seedDefaultColumns, addTask } from '../db.ts'
4
- import { getBoardMetrics } from '../metrics.ts'
3
+ import { initSchema, seedDefaultColumns, addTask } from '../db'
4
+ import { getBoardMetrics } from '../metrics'
5
5
 
6
6
  let db: Database
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from 'bun:test'
2
- import { success, error, formatOutput } from '../output.ts'
2
+ import { success, error, formatOutput } from '../output'
3
3
 
4
4
  describe('success', () => {
5
5
  test('wraps data in ok envelope', () => {
@@ -0,0 +1,40 @@
1
+ import { describe, expect, test } from 'bun:test'
2
+
3
+ import {
4
+ JIRA_CAPABILITIES,
5
+ LINEAR_CAPABILITIES,
6
+ LOCAL_CAPABILITIES,
7
+ } from '../providers/capabilities'
8
+
9
+ describe('provider capabilities', () => {
10
+ test('remote providers share the same read/write baseline', () => {
11
+ expect(LINEAR_CAPABILITIES).toEqual(JIRA_CAPABILITIES)
12
+ expect(LINEAR_CAPABILITIES).toEqual({
13
+ taskCreate: true,
14
+ taskUpdate: true,
15
+ taskMove: true,
16
+ taskDelete: false,
17
+ comment: true,
18
+ activity: false,
19
+ metrics: false,
20
+ columnCrud: false,
21
+ bulk: false,
22
+ configEdit: false,
23
+ })
24
+ })
25
+
26
+ test('local provider exposes the full local board surface', () => {
27
+ expect(LOCAL_CAPABILITIES).toEqual({
28
+ taskCreate: true,
29
+ taskUpdate: true,
30
+ taskMove: true,
31
+ taskDelete: true,
32
+ comment: true,
33
+ activity: true,
34
+ metrics: true,
35
+ columnCrud: true,
36
+ bulk: true,
37
+ configEdit: true,
38
+ })
39
+ })
40
+ })
@@ -1,13 +1,6 @@
1
1
  import { afterEach, describe, expect, test } from 'bun:test'
2
- import type {
3
- BoardBootstrap,
4
- BoardConfig,
5
- BoardMetrics,
6
- BoardView,
7
- Column,
8
- Task,
9
- } from '../types.ts'
10
- import { startServer, type StartedServer } from '../server.ts'
2
+ import type { BoardBootstrap, BoardConfig, BoardMetrics, BoardView, Column, Task } from '../types'
3
+ import { startServer, type StartedServer } from '../server'
11
4
  import type {
12
5
  CreateTaskInput,
13
6
  KanbanProvider,
@@ -15,7 +8,7 @@ import type {
15
8
  ProviderSyncStatus,
16
9
  TaskListFilters,
17
10
  UpdateTaskInput,
18
- } from '../providers/types.ts'
11
+ } from '../providers/types'
19
12
 
20
13
  const emptyBoard: BoardView = { columns: [] }
21
14
  const emptyConfig: BoardConfig = { members: [], projects: [], provider: 'local' }
@@ -1,10 +1,10 @@
1
1
  import { beforeEach, afterEach, describe, expect, test } from 'bun:test'
2
2
  import { Database } from 'bun:sqlite'
3
3
  import { createHmac } from 'node:crypto'
4
- import { verifyHmacSha256 } from '../webhooks.ts'
5
- import { JiraProvider, type JiraProviderConfig } from '../providers/jira.ts'
6
- import { JiraClient } from '../providers/jira-client.ts'
7
- import { LinearProvider } from '../providers/linear.ts'
4
+ import { verifyHmacSha256 } from '../webhooks'
5
+ import { JiraProvider, type JiraProviderConfig } from '../providers/jira'
6
+ import { JiraClient } from '../providers/jira-client'
7
+ import { LinearProvider } from '../providers/linear'
8
8
  import {
9
9
  getCachedActivity,
10
10
  getCachedTasks as getCachedJiraTasks,
@@ -13,7 +13,7 @@ import {
13
13
  saveTeamInfo,
14
14
  replaceJiraColumns,
15
15
  upsertJiraIssues,
16
- } from '../providers/jira-cache.ts'
16
+ } from '../providers/jira-cache'
17
17
  import {
18
18
  getCachedTasks as getCachedLinearTasks,
19
19
  initLinearCacheSchema,
@@ -21,7 +21,7 @@ import {
21
21
  replaceStates,
22
22
  saveSyncMeta,
23
23
  upsertIssues,
24
- } from '../providers/linear-cache.ts'
24
+ } from '../providers/linear-cache'
25
25
 
26
26
  function hmac(secret: string, body: string): string {
27
27
  return createHmac('sha256', secret).update(body).digest('hex')
package/src/activity.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Database } from 'bun:sqlite'
2
- import { generateId } from './id.ts'
3
- import type { ActivityEntry, ActivityAction } from './types.ts'
2
+ import { generateId } from './id'
3
+ import type { ActivityEntry, ActivityAction } from './types'
4
4
 
5
5
  export function logActivity(
6
6
  db: Database,
package/src/api.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { KanbanError, ErrorCode } from './errors.ts'
2
- import type { BoardConfig, CliOutput, Task } from './types.ts'
3
- import type { CreateTaskInput, UpdateTaskInput, KanbanProvider } from './providers/types.ts'
1
+ import { KanbanError, ErrorCode } from './errors'
2
+ import type { BoardConfig, CliOutput, Task } from './types'
3
+ import type { CreateTaskInput, UpdateTaskInput, KanbanProvider } from './providers/types'
4
4
 
5
5
  export type WsEvent =
6
6
  | { type: 'task:upsert'; task: Task; columnName: string }
@@ -1,8 +1,8 @@
1
1
  import type { Database } from 'bun:sqlite'
2
- import { initSchema, seedDefaultColumns, isInitialized, resetBoard } from '../db.ts'
3
- import { ErrorCode, KanbanError } from '../errors.ts'
4
- import { success } from '../output.ts'
5
- import type { CliOutput } from '../types.ts'
2
+ import { initSchema, seedDefaultColumns, isInitialized, resetBoard } from '../db'
3
+ import { ErrorCode, KanbanError } from '../errors'
4
+ import { success } from '../output'
5
+ import type { CliOutput } from '../types'
6
6
 
7
7
  export function boardInit(db: Database): CliOutput {
8
8
  if (isInitialized(db)) {
@@ -1,8 +1,8 @@
1
1
  import type { Database } from 'bun:sqlite'
2
- import { bulkMoveAll, bulkClearDone } from '../db.ts'
3
- import { ErrorCode, KanbanError } from '../errors.ts'
4
- import { success } from '../output.ts'
5
- import type { CliOutput } from '../types.ts'
2
+ import { bulkMoveAll, bulkClearDone } from '../db'
3
+ import { ErrorCode, KanbanError } from '../errors'
4
+ import { success } from '../output'
5
+ import type { CliOutput } from '../types'
6
6
 
7
7
  export function bulkMoveAllCmd(db: Database, args: { from?: string; to?: string }): CliOutput {
8
8
  if (!args.from || !args.to) {
@@ -1,8 +1,8 @@
1
1
  import type { Database } from 'bun:sqlite'
2
- import { addColumn, listColumns, renameColumn, reorderColumn, deleteColumn } from '../db.ts'
3
- import { ErrorCode, KanbanError } from '../errors.ts'
4
- import { success } from '../output.ts'
5
- import type { CliOutput } from '../types.ts'
2
+ import { addColumn, listColumns, renameColumn, reorderColumn, deleteColumn } from '../db'
3
+ import { ErrorCode, KanbanError } from '../errors'
4
+ import { success } from '../output'
5
+ import type { CliOutput } from '../types'
6
6
 
7
7
  export function columnAdd(
8
8
  db: Database,
@@ -6,9 +6,9 @@ import {
6
6
  type CallToolResult,
7
7
  } from '@modelcontextprotocol/sdk/types.js'
8
8
  import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv'
9
- import { createTrackerCore, defaultTools, TrackerMcpError } from '../mcp/index.ts'
10
- import type { TrackerMcpPolicy, TrackerMcpTool } from '../mcp/index.ts'
11
- import type { KanbanProvider } from '../providers/types.ts'
9
+ import { createTrackerCore, defaultTools, TrackerMcpError } from '../mcp/index'
10
+ import type { TrackerMcpPolicy, TrackerMcpTool } from '../mcp/index'
11
+ import type { KanbanProvider } from '../providers/types'
12
12
 
13
13
  type LocalScope = Record<string, never>
14
14
 
package/src/config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { readFileSync, writeFileSync, renameSync } from 'node:fs'
2
2
  import { dirname, join } from 'node:path'
3
- import type { BoardConfig } from './types.ts'
3
+ import type { BoardConfig } from './types'
4
4
 
5
5
  const DEFAULT_CONFIG: BoardConfig = { members: [], projects: [] }
6
6
 
package/src/db.ts CHANGED
@@ -2,10 +2,10 @@ import { Database } from 'bun:sqlite'
2
2
  import { existsSync, mkdirSync } from 'node:fs'
3
3
  import { homedir } from 'node:os'
4
4
  import { join } from 'node:path'
5
- import { generateId } from './id.ts'
6
- import { ErrorCode, KanbanError } from './errors.ts'
7
- import type { BoardView, Column, Priority, Task, TaskComment, TaskWithColumn } from './types.ts'
8
- import { logActivity, enterColumn, exitColumn } from './activity.ts'
5
+ import { generateId } from './id'
6
+ import { ErrorCode, KanbanError } from './errors'
7
+ import type { BoardView, Column, Priority, Task, TaskComment, TaskWithColumn } from './types'
8
+ import { logActivity, enterColumn, exitColumn } from './activity'
9
9
 
10
10
  const DEFAULT_COLUMNS = [
11
11
  { name: 'recurring', position: 0 },
package/src/index.ts CHANGED
@@ -2,22 +2,16 @@
2
2
 
3
3
  import { parseArgs } from 'node:util'
4
4
  import { Database } from 'bun:sqlite'
5
- import { KanbanError, ErrorCode } from './errors.ts'
6
- import { formatOutput, error, success } from './output.ts'
7
- import { openDb, getDbPath, initSchema, migrateSchema, seedDefaultColumns } from './db.ts'
8
- import { boardInit, boardReset } from './commands/board.ts'
9
- import {
10
- columnAdd,
11
- columnDelete,
12
- columnList,
13
- columnRename,
14
- columnReorder,
15
- } from './commands/column.ts'
16
- import { bulkClearDoneCmd, bulkMoveAllCmd } from './commands/bulk.ts'
17
- import { getConfigPath, loadConfig, saveConfig } from './config.ts'
18
- import type { CliOutput, Priority } from './types.ts'
19
- import { createProvider } from './providers/index.ts'
20
- import { unsupportedOperation } from './providers/errors.ts'
5
+ import { KanbanError, ErrorCode } from './errors'
6
+ import { formatOutput, error, success } from './output'
7
+ import { openDb, getDbPath, initSchema, migrateSchema, seedDefaultColumns } from './db'
8
+ import { boardInit, boardReset } from './commands/board'
9
+ import { columnAdd, columnDelete, columnList, columnRename, columnReorder } from './commands/column'
10
+ import { bulkClearDoneCmd, bulkMoveAllCmd } from './commands/bulk'
11
+ import { getConfigPath, loadConfig, saveConfig } from './config'
12
+ import type { CliOutput, Priority } from './types'
13
+ import { createProvider } from './providers/index'
14
+ import { unsupportedOperation } from './providers/errors'
21
15
 
22
16
  interface ParsedArgs {
23
17
  values: Record<string, unknown>
@@ -415,7 +409,7 @@ if (import.meta.main) {
415
409
  const db = openDb(dbPath)
416
410
  migrateSchema(db)
417
411
  const provider = createProvider(db, dbPath)
418
- const { startStdioMcpServer } = await import('./commands/mcp.ts')
412
+ const { startStdioMcpServer } = await import('./commands/mcp')
419
413
  await startStdioMcpServer(provider)
420
414
  } else if (argv[0] === 'serve') {
421
415
  const opts = parseServeArgs(argv)
@@ -424,11 +418,11 @@ if (import.meta.main) {
424
418
  const db = openDb(dbPath)
425
419
  migrateSchema(db)
426
420
  const provider = createProvider(db, dbPath)
427
- const { startServer } = await import('./server.ts')
421
+ const { startServer } = await import('./server')
428
422
  startServer(provider, opts.port)
429
423
 
430
424
  if (opts.tunnel) {
431
- const { startCloudflareTunnel } = await import('./tunnel.ts')
425
+ const { startCloudflareTunnel } = await import('./tunnel')
432
426
  try {
433
427
  const handle = startCloudflareTunnel(opts.port)
434
428
  const shutdown = (): void => {
package/src/mcp/core.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { KanbanProvider } from '../providers/types.ts'
2
- import type { Task, TaskComment } from '../types.ts'
3
- import { TrackerMcpError, toTrackerMcpError } from './errors.ts'
4
- import type { TrackerMcpHooks, TrackerMcpPolicy } from './types.ts'
1
+ import type { KanbanProvider } from '../providers/types'
2
+ import type { Task, TaskComment } from '../types'
3
+ import { TrackerMcpError, toTrackerMcpError } from './errors'
4
+ import type { TrackerMcpHooks, TrackerMcpPolicy } from './types'
5
5
 
6
6
  export interface TrackerCore<TScope> {
7
7
  notifyAuthFailure(input: {
package/src/mcp/errors.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { McpError, ErrorCode as JsonRpcErrorCode } from '@modelcontextprotocol/sdk/types.js'
2
- import { ErrorCode, type ErrorCodeValue, KanbanError } from '../errors.ts'
2
+ import { ErrorCode, type ErrorCodeValue, KanbanError } from '../errors'
3
3
 
4
4
  export type TrackerMcpErrorCode =
5
5
  | 'auth_failed'
package/src/mcp/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { createTrackerCore } from './core.ts'
2
- export { createTrackerMcpServer } from './server.ts'
3
- export { TrackerMcpError, type TrackerMcpErrorCode } from './errors.ts'
4
- export type { TrackerCore } from './core.ts'
1
+ export { createTrackerCore } from './core'
2
+ export { createTrackerMcpServer } from './server'
3
+ export { TrackerMcpError, type TrackerMcpErrorCode } from './errors'
4
+ export type { TrackerCore } from './core'
5
5
  export type {
6
6
  TrackerMcpAuthResolver,
7
7
  TrackerMcpHooks,
@@ -9,5 +9,5 @@ export type {
9
9
  TrackerMcpServer,
10
10
  TrackerMcpTool,
11
11
  TrackerMcpToolHandlerContext,
12
- } from './types.ts'
13
- export { defaultTools } from './server.ts'
12
+ } from './types'
13
+ export { defaultTools } from './server'
package/src/mcp/server.ts CHANGED
@@ -13,9 +13,9 @@ import type {
13
13
  JsonSchemaValidatorResult,
14
14
  JsonSchemaType,
15
15
  } from '@modelcontextprotocol/sdk/validation'
16
- import type { TrackerCore } from './core.ts'
17
- import { TrackerMcpError, toMcpError, toTrackerMcpError, trackerMcpJsonRpcCode } from './errors.ts'
18
- import type { TrackerMcpAuthResolver, TrackerMcpServer, TrackerMcpTool } from './types.ts'
16
+ import type { TrackerCore } from './core'
17
+ import { TrackerMcpError, toMcpError, toTrackerMcpError, trackerMcpJsonRpcCode } from './errors'
18
+ import type { TrackerMcpAuthResolver, TrackerMcpServer, TrackerMcpTool } from './types'
19
19
 
20
20
  const EMPTY_OBJECT_SCHEMA = {
21
21
  type: 'object',
package/src/mcp/types.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js'
2
2
  import type { JsonSchemaType } from '@modelcontextprotocol/sdk/validation'
3
- import type { TaskComment } from '../types.ts'
4
- import type { TrackerMcpError, TrackerMcpErrorCode } from './errors.ts'
3
+ import type { TaskComment } from '../types'
4
+ import type { TrackerMcpError, TrackerMcpErrorCode } from './errors'
5
5
 
6
6
  export type TrackerMcpAuthResolver<TScope> = (ctx: {
7
7
  request: Request
package/src/metrics.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Database } from 'bun:sqlite'
2
- import type { ActivityEntry, BoardMetrics } from './types.ts'
2
+ import type { ActivityEntry, BoardMetrics } from './types'
3
3
 
4
4
  function getDistinctTaskFieldValues(db: Database, field: 'assignee' | 'project'): string[] {
5
5
  return (
package/src/output.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CliOutput, BoardView, Task, TaskWithColumn, Column } from './types.ts'
1
+ import type { CliOutput, BoardView, Task, TaskWithColumn, Column } from './types'
2
2
 
3
3
  export function success<T>(data: T): CliOutput<T> {
4
4
  return { ok: true, data }
@@ -1,40 +1,30 @@
1
- import type { ProviderCapabilities } from '../types.ts'
1
+ import type { ProviderCapabilities } from '../types'
2
2
 
3
- export const LOCAL_CAPABILITIES: ProviderCapabilities = {
4
- taskCreate: true,
5
- taskUpdate: true,
6
- taskMove: true,
3
+ function capabilities(overrides: Partial<ProviderCapabilities> = {}): ProviderCapabilities {
4
+ return {
5
+ taskCreate: true,
6
+ taskUpdate: true,
7
+ taskMove: true,
8
+ taskDelete: false,
9
+ comment: true,
10
+ activity: false,
11
+ metrics: false,
12
+ columnCrud: false,
13
+ bulk: false,
14
+ configEdit: false,
15
+ ...overrides,
16
+ }
17
+ }
18
+
19
+ export const LOCAL_CAPABILITIES: ProviderCapabilities = capabilities({
7
20
  taskDelete: true,
8
- comment: true,
9
21
  activity: true,
10
22
  metrics: true,
11
23
  columnCrud: true,
12
24
  bulk: true,
13
25
  configEdit: true,
14
- }
26
+ })
15
27
 
16
- export const LINEAR_CAPABILITIES: ProviderCapabilities = {
17
- taskCreate: true,
18
- taskUpdate: true,
19
- taskMove: true,
20
- taskDelete: false,
21
- comment: true,
22
- activity: false,
23
- metrics: false,
24
- columnCrud: false,
25
- bulk: false,
26
- configEdit: false,
27
- }
28
+ export const LINEAR_CAPABILITIES: ProviderCapabilities = capabilities()
28
29
 
29
- export const JIRA_CAPABILITIES: ProviderCapabilities = {
30
- taskCreate: true,
31
- taskUpdate: true,
32
- taskMove: true,
33
- taskDelete: false,
34
- comment: true,
35
- activity: false,
36
- metrics: false,
37
- columnCrud: false,
38
- bulk: false,
39
- configEdit: false,
40
- }
30
+ export const JIRA_CAPABILITIES: ProviderCapabilities = capabilities()
@@ -1,4 +1,4 @@
1
- import { ErrorCode, type ErrorCodeValue, KanbanError } from '../errors.ts'
1
+ import { ErrorCode, type ErrorCodeValue, KanbanError } from '../errors'
2
2
 
3
3
  export function unsupportedOperation(message: string): never {
4
4
  throw new KanbanError(ErrorCode.UNSUPPORTED_OPERATION, message)
@@ -1,10 +1,10 @@
1
1
  import type { Database } from 'bun:sqlite'
2
- import { getDbPath, initSchema, seedDefaultColumns } from '../db.ts'
3
- import { providerNotConfigured } from './errors.ts'
4
- import { JiraProvider } from './jira.ts'
5
- import { LinearProvider } from './linear.ts'
6
- import { LocalProvider } from './local.ts'
7
- import type { KanbanProvider } from './types.ts'
2
+ import { getDbPath, initSchema, seedDefaultColumns } from '../db'
3
+ import { providerNotConfigured } from './errors'
4
+ import { JiraProvider } from './jira'
5
+ import { LinearProvider } from './linear'
6
+ import { LocalProvider } from './local'
7
+ import type { KanbanProvider } from './types'
8
8
 
9
9
  export function createProvider(db: Database, dbPath = getDbPath()): KanbanProvider {
10
10
  const providerType = (process.env['KANBAN_PROVIDER'] ?? 'local') as 'local' | 'linear' | 'jira'