@knpkv/codecommit 0.5.5 → 0.7.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 (92) hide show
  1. package/README.md +35 -9
  2. package/dist/package.json +15 -15
  3. package/dist/src/FilterService.d.ts +84 -0
  4. package/dist/src/FilterService.d.ts.map +1 -0
  5. package/dist/src/FilterService.js +85 -0
  6. package/dist/src/FilterService.js.map +1 -0
  7. package/dist/src/bin.js +135 -48
  8. package/dist/src/bin.js.map +1 -1
  9. package/dist/src/filterPresets.d.ts +24 -0
  10. package/dist/src/filterPresets.d.ts.map +1 -0
  11. package/dist/src/filterPresets.js +46 -0
  12. package/dist/src/filterPresets.js.map +1 -0
  13. package/dist/src/main.d.ts +3 -1
  14. package/dist/src/main.d.ts.map +1 -1
  15. package/dist/src/main.js +17 -5
  16. package/dist/src/main.js.map +1 -1
  17. package/dist/src/tui/App.d.ts.map +1 -1
  18. package/dist/src/tui/App.js +3 -2
  19. package/dist/src/tui/App.js.map +1 -1
  20. package/dist/src/tui/atoms/actions.d.ts +6 -6
  21. package/dist/src/tui/atoms/actions.d.ts.map +1 -1
  22. package/dist/src/tui/atoms/actions.js +30 -23
  23. package/dist/src/tui/atoms/actions.js.map +1 -1
  24. package/dist/src/tui/atoms/app.d.ts +7 -7
  25. package/dist/src/tui/atoms/app.d.ts.map +1 -1
  26. package/dist/src/tui/atoms/app.js +11 -12
  27. package/dist/src/tui/atoms/app.js.map +1 -1
  28. package/dist/src/tui/atoms/runtime.d.ts +3 -3
  29. package/dist/src/tui/atoms/runtime.d.ts.map +1 -1
  30. package/dist/src/tui/atoms/runtime.js +8 -8
  31. package/dist/src/tui/atoms/runtime.js.map +1 -1
  32. package/dist/src/tui/atoms/ui.d.ts +1 -1
  33. package/dist/src/tui/atoms/ui.d.ts.map +1 -1
  34. package/dist/src/tui/atoms/ui.js +1 -1
  35. package/dist/src/tui/atoms/ui.js.map +1 -1
  36. package/dist/src/tui/components/DetailsView.d.ts.map +1 -1
  37. package/dist/src/tui/components/DetailsView.js +8 -7
  38. package/dist/src/tui/components/DetailsView.js.map +1 -1
  39. package/dist/src/tui/components/Footer.js +1 -1
  40. package/dist/src/tui/components/Footer.js.map +1 -1
  41. package/dist/src/tui/components/Header.d.ts.map +1 -1
  42. package/dist/src/tui/components/Header.js +5 -4
  43. package/dist/src/tui/components/Header.js.map +1 -1
  44. package/dist/src/tui/components/ListItemRow.d.ts.map +1 -1
  45. package/dist/src/tui/components/ListItemRow.js +3 -3
  46. package/dist/src/tui/components/ListItemRow.js.map +1 -1
  47. package/dist/src/tui/components/MainList.d.ts.map +1 -1
  48. package/dist/src/tui/components/MainList.js +5 -4
  49. package/dist/src/tui/components/MainList.js.map +1 -1
  50. package/dist/src/tui/components/QuickFilters.d.ts.map +1 -1
  51. package/dist/src/tui/components/QuickFilters.js +3 -2
  52. package/dist/src/tui/components/QuickFilters.js.map +1 -1
  53. package/dist/src/tui/components/SettingsAccountsTab.js +1 -1
  54. package/dist/src/tui/components/SettingsAccountsTab.js.map +1 -1
  55. package/dist/src/tui/components/SettingsThemeTab.js +1 -1
  56. package/dist/src/tui/components/SettingsThemeTab.js.map +1 -1
  57. package/dist/src/tui/components/SettingsView.js +1 -1
  58. package/dist/src/tui/components/SettingsView.js.map +1 -1
  59. package/dist/src/tui/context/theme.js +1 -1
  60. package/dist/src/tui/context/theme.js.map +1 -1
  61. package/dist/src/tui/hooks/useKeyboardNav.d.ts.map +1 -1
  62. package/dist/src/tui/hooks/useKeyboardNav.js +5 -4
  63. package/dist/src/tui/hooks/useKeyboardNav.js.map +1 -1
  64. package/dist/src/tui/hooks/useListNavigation.js +1 -1
  65. package/dist/src/tui/hooks/useListNavigation.js.map +1 -1
  66. package/dist/src/tui/ui/DialogCommand.js +1 -1
  67. package/dist/src/tui/ui/DialogCommand.js.map +1 -1
  68. package/dist/src/tui/ui/DialogCreatePR.d.ts.map +1 -1
  69. package/dist/src/tui/ui/DialogCreatePR.js +5 -4
  70. package/dist/src/tui/ui/DialogCreatePR.js.map +1 -1
  71. package/dist/src/tui/utils/prTemplates.d.ts +2 -2
  72. package/dist/src/tui/utils/prTemplates.d.ts.map +1 -1
  73. package/dist/src/tui/utils/prTemplates.js +35 -36
  74. package/dist/src/tui/utils/prTemplates.js.map +1 -1
  75. package/dist/test/ConfigService.test.js +10 -7
  76. package/dist/test/ConfigService.test.js.map +1 -1
  77. package/dist/test/FilterService.test.d.ts +2 -0
  78. package/dist/test/FilterService.test.d.ts.map +1 -0
  79. package/dist/test/FilterService.test.js +209 -0
  80. package/dist/test/FilterService.test.js.map +1 -0
  81. package/dist/test/bin.test.d.ts +2 -0
  82. package/dist/test/bin.test.d.ts.map +1 -0
  83. package/dist/test/bin.test.js +36 -0
  84. package/dist/test/bin.test.js.map +1 -0
  85. package/dist/test/filterPresets.test.d.ts +2 -0
  86. package/dist/test/filterPresets.test.d.ts.map +1 -0
  87. package/dist/test/filterPresets.test.js +166 -0
  88. package/dist/test/filterPresets.test.js.map +1 -0
  89. package/dist/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +17 -17
  91. package/skills/codecommit/SKILL.md +69 -0
  92. package/skills/codecommit/agents/openai.yaml +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/codecommit",
3
- "version": "0.5.5",
3
+ "version": "0.7.0",
4
4
  "description": "TUI for browsing AWS CodeCommit PRs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,30 +12,30 @@
12
12
  "access": "public"
13
13
  },
14
14
  "files": [
15
- "dist"
15
+ "dist",
16
+ "skills"
16
17
  ],
17
18
  "dependencies": {
18
- "@effect-atom/atom-react": "latest",
19
- "@effect/cli": "latest",
20
- "@effect/platform": "latest",
21
- "@effect/platform-bun": "latest",
22
- "@effect/platform-node": "latest",
19
+ "@effect/atom-react": "4.0.0-beta.87",
20
+ "@effect/platform-bun": "4.0.0-beta.87",
21
+ "@effect/platform-node": "4.0.0-beta.87",
23
22
  "@opentui/core": "https://pkg.pr.new/anomalyco/opentui/@opentui/core@367a94087821b3b5feedd35bbb57df43b10a286e",
24
23
  "@opentui/react": "https://pkg.pr.new/anomalyco/opentui/@opentui/react@367a94087821b3b5feedd35bbb57df43b10a286e",
25
- "effect": "latest",
26
- "open": "^10.1.0",
27
- "react": "^19.1.0",
24
+ "effect": "4.0.0-beta.87",
25
+ "react": "^19.2.7",
28
26
  "tslib": "^2.8.1",
29
- "@knpkv/codecommit-core": "^0.7.0",
30
- "@knpkv/codecommit-web": "^0.10.0"
27
+ "@knpkv/agent-skills": "^0.2.0",
28
+ "@knpkv/codecommit-core": "^0.8.0",
29
+ "@knpkv/codecommit-web": "^0.11.0"
31
30
  },
32
31
  "devDependencies": {
33
- "@effect/vitest": "latest",
34
- "@storybook/react": "^8.6.15",
35
- "@types/bun": "^1.3.6",
32
+ "@effect/vitest": "4.0.0-beta.87",
33
+ "@storybook/react": "^10.4.6",
34
+ "@types/bun": "^1.3.14",
36
35
  "@types/node": "latest",
37
- "@types/react": "^19.1.8",
38
- "vitest": "latest"
36
+ "@types/react": "^19.2.17",
37
+ "storybook": "^10.4.6",
38
+ "vitest": "^4.1.9"
39
39
  },
40
40
  "scripts": {
41
41
  "start": "bun src/bin.ts",
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: codecommit
3
+ description: Use the @knpkv/codecommit CLI for AWS CodeCommit pull request workflows. Trigger when the user asks an agent to list, filter, create, export, update, review, or inspect CodeCommit pull requests; launch the CodeCommit TUI or web UI; or work with AWS SSO-backed CodeCommit repositories from the command line.
4
+ ---
5
+
6
+ # CodeCommit
7
+
8
+ Use the `codecommit` binary to work with AWS CodeCommit pull requests from an agent session.
9
+
10
+ ## Preconditions
11
+
12
+ - Require AWS SSO profiles in `~/.aws/config`.
13
+ - Prefer `codecommit pr list --json` for agent parsing.
14
+ - Pass `--profile` and `--region` when the target account is known.
15
+ - Use `codecommit tui` to configure multi-account settings before relying on `--filter` presets.
16
+ - Treat create and update commands as mutating operations; confirm the intended repository, branch, PR id, title, and description before running them.
17
+
18
+ ## Common Tasks
19
+
20
+ List pull requests:
21
+
22
+ ```bash
23
+ codecommit pr list --json
24
+ codecommit pr list --profile default --region us-east-1 --status OPEN --json
25
+ codecommit pr list --all --repo my-repo --json
26
+ ```
27
+
28
+ Use cross-account presets after accounts are enabled in the TUI:
29
+
30
+ ```bash
31
+ codecommit pr list --filter mine --json
32
+ codecommit pr list --filter needs-my-review --json
33
+ codecommit pr list --filter stale --repo my-repo --json
34
+ codecommit pr list --filter conflicting --json
35
+ ```
36
+
37
+ Create a pull request:
38
+
39
+ ```bash
40
+ codecommit pr create my-repo "Add feature X" --source feature/x --destination main --description "Implements feature X"
41
+ ```
42
+
43
+ Export review comments as markdown:
44
+
45
+ ```bash
46
+ codecommit pr export 123 my-repo --output pr-comments.md
47
+ ```
48
+
49
+ Update pull request metadata:
50
+
51
+ ```bash
52
+ codecommit pr update 123 --title "New title"
53
+ codecommit pr update 123 --description "Updated description"
54
+ ```
55
+
56
+ Launch interfaces:
57
+
58
+ ```bash
59
+ codecommit
60
+ codecommit tui
61
+ codecommit web --port 3000 --hostname 127.0.0.1
62
+ ```
63
+
64
+ ## Agent Workflow
65
+
66
+ 1. Run read-only commands first (`pr list`, `pr export`) to establish the current state.
67
+ 2. Keep stdout parseable by using `--json` where available.
68
+ 3. If a command reports expired or failed AWS accounts, ask the user to refresh SSO with the relevant profile before retrying.
69
+ 4. For mutating commands, echo the exact final command and run it only after the target is unambiguous.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "CodeCommit CLI"
3
+ short_description: "Use AWS CodeCommit PR CLI workflows"
4
+ default_prompt: "Use $codecommit to list, inspect, or update AWS CodeCommit pull requests."