@knpkv/jira-clockify 0.2.0 → 0.5.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.
Files changed (83) hide show
  1. package/README.md +4 -1
  2. package/dist/package.json +12 -13
  3. package/dist/src/bin.js +30 -13
  4. package/dist/src/bin.js.map +1 -1
  5. package/dist/src/cli/auth.js +23 -19
  6. package/dist/src/cli/auth.js.map +1 -1
  7. package/dist/src/cli/config.js +4 -4
  8. package/dist/src/cli/config.js.map +1 -1
  9. package/dist/src/cli/fetchTicket.js +30 -0
  10. package/dist/src/cli/fetchTicket.js.map +1 -0
  11. package/dist/src/cli/fuzzySelect.js +6 -5
  12. package/dist/src/cli/fuzzySelect.js.map +1 -1
  13. package/dist/src/cli/layers.js +10 -8
  14. package/dist/src/cli/layers.js.map +1 -1
  15. package/dist/src/cli/list.js +1 -1
  16. package/dist/src/cli/list.js.map +1 -1
  17. package/dist/src/cli/setup.js +19 -19
  18. package/dist/src/cli/setup.js.map +1 -1
  19. package/dist/src/cli/timer/discard.js +2 -2
  20. package/dist/src/cli/timer/discard.js.map +1 -1
  21. package/dist/src/cli/timer/edit.js +11 -11
  22. package/dist/src/cli/timer/edit.js.map +1 -1
  23. package/dist/src/cli/timer/log.js +56 -79
  24. package/dist/src/cli/timer/log.js.map +1 -1
  25. package/dist/src/cli/timer/start.js +56 -40
  26. package/dist/src/cli/timer/start.js.map +1 -1
  27. package/dist/src/cli/timer/status.js +7 -7
  28. package/dist/src/cli/timer/status.js.map +1 -1
  29. package/dist/src/cli/timer/stop.js +183 -59
  30. package/dist/src/cli/timer/stop.js.map +1 -1
  31. package/dist/src/main.js +15 -3
  32. package/dist/src/main.js.map +1 -1
  33. package/dist/src/services/ClockifyAuth.js +12 -23
  34. package/dist/src/services/ClockifyAuth.js.map +1 -1
  35. package/dist/src/services/ConfigService.js +7 -7
  36. package/dist/src/services/ConfigService.js.map +1 -1
  37. package/dist/src/services/HomeDirectory.js +14 -0
  38. package/dist/src/services/HomeDirectory.js.map +1 -0
  39. package/dist/src/services/StateWriter.js +8 -8
  40. package/dist/src/services/StateWriter.js.map +1 -1
  41. package/dist/src/services/TicketService.js +22 -15
  42. package/dist/src/services/TicketService.js.map +1 -1
  43. package/dist/src/services/TimerService.js +126 -60
  44. package/dist/src/services/TimerService.js.map +1 -1
  45. package/dist/src/tui/App.js +72 -8
  46. package/dist/src/tui/App.js.map +1 -1
  47. package/dist/src/tui/atoms/runtime.js +1 -1
  48. package/dist/src/tui/atoms/runtime.js.map +1 -1
  49. package/dist/src/tui/atoms/tickets.js +1 -1
  50. package/dist/src/tui/atoms/tickets.js.map +1 -1
  51. package/dist/src/tui/atoms/timer.js +7 -2
  52. package/dist/src/tui/atoms/timer.js.map +1 -1
  53. package/dist/src/tui/atoms/ui.js +1 -1
  54. package/dist/src/tui/atoms/ui.js.map +1 -1
  55. package/dist/src/tui/components/BigTimer.js +2 -2
  56. package/dist/src/tui/components/BigTimer.js.map +1 -1
  57. package/dist/src/tui/components/Footer.js +1 -1
  58. package/dist/src/tui/components/Footer.js.map +1 -1
  59. package/dist/src/tui/components/Header.js +3 -2
  60. package/dist/src/tui/components/Header.js.map +1 -1
  61. package/dist/src/tui/components/PopupMessage.js +7 -2
  62. package/dist/src/tui/components/PopupMessage.js.map +1 -1
  63. package/dist/src/tui/components/TicketList.js +3 -2
  64. package/dist/src/tui/components/TicketList.js.map +1 -1
  65. package/dist/src/tui/context/theme.js.map +1 -1
  66. package/dist/src/tui/hooks/useElapsedTimer.js +3 -2
  67. package/dist/src/tui/hooks/useElapsedTimer.js.map +1 -1
  68. package/dist/src/tui/hooks/useTerminalSize.js +1 -21
  69. package/dist/src/tui/hooks/useTerminalSize.js.map +1 -1
  70. package/dist/src/utils/time.js +55 -5
  71. package/dist/src/utils/time.js.map +1 -1
  72. package/dist/test/TimerService.test.js +224 -31
  73. package/dist/test/TimerService.test.js.map +1 -1
  74. package/dist/test/fetchTicket.test.js +89 -0
  75. package/dist/test/fetchTicket.test.js.map +1 -0
  76. package/dist/test/stopPrompts.test.js +93 -0
  77. package/dist/test/stopPrompts.test.js.map +1 -0
  78. package/dist/test/time.test.js +84 -0
  79. package/dist/test/time.test.js.map +1 -0
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +16 -17
  82. package/skills/jcf/SKILL.md +89 -0
  83. package/skills/jcf/agents/openai.yaml +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/jira-clockify",
3
- "version": "0.2.0",
3
+ "version": "0.5.0",
4
4
  "description": "TUI for Jira-Clockify time tracking, attachable to neovim",
5
5
  "license": "MIT",
6
6
  "author": "knpkv",
@@ -13,29 +13,28 @@
13
13
  },
14
14
  "files": [
15
15
  "dist",
16
- "nvim"
16
+ "nvim",
17
+ "skills"
17
18
  ],
18
19
  "dependencies": {
19
- "@effect-atom/atom": "latest",
20
- "@effect-atom/atom-react": "latest",
21
- "@effect/cli": "latest",
22
- "@effect/platform": "latest",
23
- "@effect/platform-node": "latest",
20
+ "@effect/atom-react": "4.0.0-beta.87",
21
+ "@effect/platform-node": "4.0.0-beta.87",
24
22
  "@opentui/core": "https://pkg.pr.new/anomalyco/opentui/@opentui/core@367a94087821b3b5feedd35bbb57df43b10a286e",
25
23
  "@opentui/react": "https://pkg.pr.new/anomalyco/opentui/@opentui/react@367a94087821b3b5feedd35bbb57df43b10a286e",
26
- "effect": "latest",
27
- "react": "^19.1.0",
28
- "@knpkv/atlassian-common": "^0.2.0",
29
- "@knpkv/clockify-api-client": "^0.2.0",
30
- "@knpkv/jira-api-client": "^0.2.0",
31
- "@knpkv/jira-cli": "^0.1.1"
24
+ "effect": "4.0.0-beta.87",
25
+ "react": "^19.2.7",
26
+ "@knpkv/agent-skills": "^0.2.0",
27
+ "@knpkv/atlassian-common": "^0.3.0",
28
+ "@knpkv/jira-api-client": "^0.3.0",
29
+ "@knpkv/jira-cli": "^0.3.0",
30
+ "@knpkv/clockify-api-client": "^0.3.0"
32
31
  },
33
32
  "devDependencies": {
34
- "@effect/vitest": "latest",
33
+ "@effect/vitest": "4.0.0-beta.87",
35
34
  "@types/node": "latest",
36
- "@types/react": "^19.1.8",
37
- "tsx": "^4.19.4",
38
- "vitest": "latest"
35
+ "@types/react": "^19.2.17",
36
+ "tsx": "^4.22.4",
37
+ "vitest": "^4.1.9"
39
38
  },
40
39
  "scripts": {
41
40
  "start": "tsx src/bin.ts",
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: jcf
3
+ description: Use the @knpkv/jira-clockify CLI to track work across Jira and Clockify. Trigger when the user asks an agent to start, stop, discard, edit, inspect, or manually log time for Jira tickets; configure Jira OAuth or Clockify API access; list current Jira tickets; set default Clockify project, billable flag, or JQL; or launch the jcf TUI.
4
+ ---
5
+
6
+ # Jcf
7
+
8
+ Use the `jcf` binary to manage Jira-backed Clockify timers.
9
+
10
+ ## Preconditions
11
+
12
+ - Configure both services before timer operations: Jira OAuth and Clockify API key.
13
+ - Use `jcf auth status` to check readiness.
14
+ - Timer operations write to Clockify and may write Jira worklogs; confirm ambiguous ticket keys, durations, dates, and comments before running them.
15
+ - Use `jcf list --json` when an agent needs structured ticket data.
16
+
17
+ ## Setup
18
+
19
+ ```bash
20
+ jcf auth status
21
+ jcf auth jira create
22
+ jcf auth jira configure
23
+ jcf auth jira login
24
+ jcf auth clockify setup
25
+ ```
26
+
27
+ Configure defaults:
28
+
29
+ ```bash
30
+ jcf config show
31
+ jcf config set project
32
+ jcf config set billable
33
+ jcf config set jql 'assignee = currentUser() AND status != Done ORDER BY updated DESC'
34
+ jcf config reset
35
+ ```
36
+
37
+ ## Timer Commands
38
+
39
+ Launch the TUI:
40
+
41
+ ```bash
42
+ jcf
43
+ jcf tui
44
+ ```
45
+
46
+ List available Jira tickets:
47
+
48
+ ```bash
49
+ jcf list
50
+ jcf list --json
51
+ ```
52
+
53
+ Start work:
54
+
55
+ ```bash
56
+ jcf start PROJ-123
57
+ jcf start PROJ-123 --ago 15m
58
+ jcf start PROJ-123 --since 09:30
59
+ jcf start PROJ-123 --project <clockify-project-id> --billable
60
+ ```
61
+
62
+ Stop or discard current work:
63
+
64
+ ```bash
65
+ jcf status
66
+ jcf stop
67
+ jcf stop --project <clockify-project-id> --billable
68
+ jcf discard
69
+ ```
70
+
71
+ Log completed work manually:
72
+
73
+ ```bash
74
+ jcf log PROJ-123 --time 1h30m
75
+ jcf log PROJ-123 --time 45m --date 2026-06-24 --at 09:00 --comment "Pairing on release notes"
76
+ ```
77
+
78
+ Edit the running timer:
79
+
80
+ ```bash
81
+ jcf edit
82
+ ```
83
+
84
+ ## Agent Workflow
85
+
86
+ 1. Run `jcf auth status` and `jcf status` before changing timer state.
87
+ 2. Use `jcf list --json` to resolve issue keys when the user gives a vague ticket description.
88
+ 3. Prefer explicit flags for non-interactive work: issue key, duration, date, time, project id, billable flag, and comment.
89
+ 4. If no timer is running, `jcf stop` may offer an interactive correction interval; use `jcf log` for deterministic manual logging.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Jira Clockify CLI"
3
+ short_description: "Track Jira work in Clockify"
4
+ default_prompt: "Use $jcf to start, stop, log, or inspect Jira Clockify timers."