cdd-cli 3.1.9 → 3.2.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 (130) hide show
  1. package/.atl/skill-registry.md +30 -0
  2. package/.editorconfig +12 -0
  3. package/.eslintrc.json +1 -1
  4. package/.prettierignore +4 -0
  5. package/.prettierrc +8 -0
  6. package/CHANGELOG.md +46 -0
  7. package/SECURITY.md +5 -0
  8. package/__mocks__/ink.cjs +17 -0
  9. package/coverage/clover.xml +694 -0
  10. package/coverage/coverage-final.json +21 -0
  11. package/coverage/lcov-report/base.css +224 -0
  12. package/coverage/lcov-report/block-navigation.js +87 -0
  13. package/coverage/lcov-report/components/ContainerCreationPrompt.jsx.html +376 -0
  14. package/coverage/lcov-report/components/PromptField.jsx.html +229 -0
  15. package/coverage/lcov-report/components/SuggestionPanel.jsx.html +244 -0
  16. package/coverage/lcov-report/components/index.html +146 -0
  17. package/coverage/lcov-report/favicon.png +0 -0
  18. package/coverage/lcov-report/helpers/constants.js.html +298 -0
  19. package/coverage/lcov-report/helpers/containerOptionsBuilder.js.html +244 -0
  20. package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerActions.js.html +931 -0
  21. package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerList.js.html +307 -0
  22. package/coverage/lcov-report/helpers/dockerService/serviceComponents/index.html +131 -0
  23. package/coverage/lcov-report/helpers/imageNameUtils.js.html +181 -0
  24. package/coverage/lcov-report/helpers/index.html +191 -0
  25. package/coverage/lcov-report/helpers/logger.js.html +424 -0
  26. package/coverage/lcov-report/helpers/safeCall.js.html +139 -0
  27. package/coverage/lcov-report/helpers/validationHelpers.js.html +346 -0
  28. package/coverage/lcov-report/hooks/creation/index.html +146 -0
  29. package/coverage/lcov-report/hooks/creation/useContainerActions.js.html +313 -0
  30. package/coverage/lcov-report/hooks/creation/useContainerCreation.js.html +805 -0
  31. package/coverage/lcov-report/hooks/creation/useLogsViewer.js.html +238 -0
  32. package/coverage/lcov-report/hooks/debug/index.html +116 -0
  33. package/coverage/lcov-report/hooks/debug/useDebugLogs.js.html +187 -0
  34. package/coverage/lcov-report/hooks/index.html +161 -0
  35. package/coverage/lcov-report/hooks/navigation/index.html +116 -0
  36. package/coverage/lcov-report/hooks/navigation/useContainerSelection.js.html +169 -0
  37. package/coverage/lcov-report/hooks/useContainerCommandRouter.js.html +454 -0
  38. package/coverage/lcov-report/hooks/useControls.js.html +826 -0
  39. package/coverage/lcov-report/hooks/useEraseConfirmation.js.html +202 -0
  40. package/coverage/lcov-report/hooks/useExitHandler.js.html +292 -0
  41. package/coverage/lcov-report/index.html +206 -0
  42. package/coverage/lcov-report/prettify.css +1 -0
  43. package/coverage/lcov-report/prettify.js +2 -0
  44. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  45. package/coverage/lcov-report/sorter.js +210 -0
  46. package/coverage/lcov.info +1402 -0
  47. package/dist/App.js +11 -11
  48. package/dist/components/ContainerCreationPrompt.js +31 -10
  49. package/dist/components/ContainerList.js +3 -3
  50. package/dist/components/ContainerRow.js +20 -20
  51. package/dist/components/ContainerSection.js +3 -3
  52. package/dist/components/Footer.js +2 -2
  53. package/dist/components/Header.js +7 -7
  54. package/dist/components/LogViewer.js +3 -3
  55. package/dist/components/MessageFeedback.js +2 -2
  56. package/dist/components/PromptField.js +4 -4
  57. package/dist/components/StatsBar.js +5 -5
  58. package/dist/components/SuggestionPanel.js +44 -0
  59. package/dist/components/UsageMenu.js +3 -3
  60. package/dist/helpers/appInfo.js +7 -7
  61. package/dist/helpers/constants.js +114 -0
  62. package/dist/helpers/containerOptionsBuilder.js +3 -3
  63. package/dist/helpers/dockerService/dockerService.js +1 -1
  64. package/dist/helpers/dockerService/serviceComponents/containerActions.js +99 -40
  65. package/dist/helpers/dockerService/serviceComponents/containerList.js +11 -11
  66. package/dist/helpers/dockerService/serviceComponents/containerLogs.js +9 -9
  67. package/dist/helpers/dockerService/serviceComponents/containerStats.js +5 -5
  68. package/dist/helpers/dockerService/serviceComponents/imageUtils.js +1 -1
  69. package/dist/helpers/exitWithMessage.js +10 -10
  70. package/dist/helpers/imageNameUtils.js +32 -0
  71. package/dist/helpers/logger.js +13 -13
  72. package/dist/helpers/safeCall.js +2 -2
  73. package/dist/helpers/validationHelpers.js +76 -21
  74. package/dist/hooks/creation/useContainerActions.js +9 -9
  75. package/dist/hooks/creation/useContainerCreation.js +138 -36
  76. package/dist/hooks/creation/useLogsViewer.js +2 -2
  77. package/dist/hooks/debug/useDebugLogs.js +4 -4
  78. package/dist/hooks/useContainerCommandRouter.js +13 -13
  79. package/dist/hooks/useContainers.js +3 -3
  80. package/dist/hooks/useControls.js +66 -35
  81. package/dist/hooks/useEraseConfirmation.js +3 -3
  82. package/dist/index.js +2 -2
  83. package/jest.config.cjs +7 -0
  84. package/package.json +7 -3
  85. package/src/App.jsx +33 -16
  86. package/src/components/ContainerCreationPrompt.jsx +43 -9
  87. package/src/components/ContainerList.jsx +3 -3
  88. package/src/components/ContainerRow.jsx +19 -16
  89. package/src/components/ContainerSection.jsx +3 -3
  90. package/src/components/Footer.jsx +2 -2
  91. package/src/components/Header.jsx +7 -7
  92. package/src/components/LogViewer.jsx +5 -3
  93. package/src/components/MessageFeedback.jsx +2 -2
  94. package/src/components/PromptField.jsx +4 -4
  95. package/src/components/StatsBar.jsx +11 -7
  96. package/src/components/SuggestionPanel.jsx +53 -0
  97. package/src/components/UsageMenu.jsx +18 -13
  98. package/src/helpers/appInfo.js +7 -7
  99. package/src/helpers/constants.js +41 -0
  100. package/src/helpers/containerOptionsBuilder.js +16 -5
  101. package/src/helpers/dockerService/dockerService.js +1 -1
  102. package/src/helpers/dockerService/serviceComponents/containerActions.js +116 -43
  103. package/src/helpers/dockerService/serviceComponents/containerList.js +31 -25
  104. package/src/helpers/dockerService/serviceComponents/containerLogs.js +41 -26
  105. package/src/helpers/dockerService/serviceComponents/containerStats.js +13 -11
  106. package/src/helpers/dockerService/serviceComponents/imageUtils.js +5 -4
  107. package/src/helpers/exitWithMessage.js +13 -7
  108. package/src/helpers/imageNameUtils.js +32 -0
  109. package/src/helpers/logger.js +15 -15
  110. package/src/helpers/safeCall.js +2 -2
  111. package/src/helpers/validationHelpers.js +62 -21
  112. package/src/hooks/creation/useContainerActions.js +19 -12
  113. package/src/hooks/creation/useContainerCreation.js +161 -37
  114. package/src/hooks/creation/useLogsViewer.js +2 -2
  115. package/src/hooks/debug/useDebugLogs.js +15 -10
  116. package/src/hooks/navigation/useContainerSelection.js +17 -14
  117. package/src/hooks/useContainerCommandRouter.js +71 -58
  118. package/src/hooks/useContainers.js +4 -4
  119. package/src/hooks/useControls.js +120 -68
  120. package/src/hooks/useEraseConfirmation.js +3 -3
  121. package/src/hooks/useExitHandler.js +29 -26
  122. package/src/index.js +4 -4
  123. package/test/ContainerCreationPrompt.dom.test.js +68 -0
  124. package/test/SuggestionPanel.dom.test.js +53 -0
  125. package/test/constants.test.js +34 -0
  126. package/test/containerActions.test.js +104 -13
  127. package/test/containerOptionsBuilder.test.js +36 -0
  128. package/test/useContainerCreation.dom.test.js +166 -2
  129. package/test/useControls.dom.test.js +313 -0
  130. package/test/validationHelpers.test.js +51 -0
@@ -0,0 +1,30 @@
1
+ # Skill Registry — CDD
2
+
3
+ Generated: 2026-04-25
4
+
5
+ ## User Skills (from ~/.config/opencode/skills/)
6
+
7
+ | Skill | Trigger |
8
+ |-------|---------|
9
+ | branch-pr | Creating a pull request, opening a PR, or preparing changes for review |
10
+ | go-testing | Writing Go tests, using teatest, or adding test coverage |
11
+ | issue-creation | Creating a GitHub issue, reporting a bug, or requesting a feature |
12
+ | judgment-day | "judgment day", "review adversarial", "dual review", "juzgar", "que lo juzguen" |
13
+ | reporter | Creating a sprint report, updating CHANGELOG, or documenting completed work |
14
+ | sdd-apply | Orchestrator launches to implement one or more tasks from a change |
15
+ | sdd-archive | Orchestrator launches to archive a change after implementation and verification |
16
+ | sdd-design | Orchestrator launches to write or update the technical design for a change |
17
+ | sdd-explore | Orchestrator launches to think through a feature, investigate the codebase, or clarify requirements |
18
+ | sdd-propose | Orchestrator launches to create or update a proposal for a change |
19
+ | sdd-spec | Orchestrator launches to write or update specs for a change |
20
+ | sdd-tasks | Orchestrator launches to create or update the task breakdown for a change |
21
+ | sdd-verify | Orchestrator launches to verify a completed change |
22
+ | skill-creator | Creating a new skill, adding agent instructions, or documenting patterns for AI |
23
+ | skill-registry | "update skills", "skill registry", "actualizar skills", "update registry" |
24
+
25
+ ## Project Conventions
26
+
27
+ - No project-level AGENTS.md / CLAUDE.md / .cursorrules found
28
+ - ESLint config: `.eslintrc.json` (eslint:recommended + plugin:react/recommended)
29
+ - No Prettier config detected — formatting via Babel only
30
+ - No TypeScript (plain JS/JSX with Babel)
package/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
package/.eslintrc.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "es2021": true,
6
6
  "jest": true
7
7
  },
8
- "extends": ["eslint:recommended", "plugin:react/recommended"],
8
+ "extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
9
9
  "parserOptions": {
10
10
  "ecmaVersion": 2021,
11
11
  "sourceType": "module",
@@ -0,0 +1,4 @@
1
+ node_modules/
2
+ dist/
3
+ coverage/
4
+ *.cjs
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "printWidth": 80,
6
+ "tabWidth": 2,
7
+ "arrowParens": "always"
8
+ }
package/CHANGELOG.md CHANGED
@@ -7,6 +7,52 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7
7
  ## [Unreleased]
8
8
  - Nothing yet.
9
9
 
10
+ ## [3.2.2] - 2026-04-27
11
+
12
+ ### Added
13
+
14
+ - Interactive suggestion panel in container creation wizard (step 0) — shows filtered image suggestions below the input as the user types, navigable with ↑↓ and selectable with Enter
15
+ - `IMAGE_PROFILES` expanded from 6 to 20 curated images (nginx, node, python, postgres, mysql, mongo, redis, kafka, elasticsearch, minio, wordpress, and more) each with `requiredEnv`, `defaultPort`, and `suggestedEnv`
16
+ - `SuggestionPanel` component (`src/components/SuggestionPanel.jsx`) — offline, non-overlay panel with scrollable window and focused-row highlight
17
+ - Contextual env var hints in step 3 — when a known image is selected, suggested variables (e.g. `POSTGRES_USER`, `POSTGRES_DB`) are shown as guidance
18
+ - `updateImageInput()`, `moveSuggestionSelection()`, `applyFocusedSuggestion()` functions in `useContainerCreation` hook for autocomplete state management
19
+ - Ink mock infrastructure (`__mocks__/ink.cjs`) with `triggerInput` helper for reliable keyboard routing tests
20
+
21
+ ### Changed
22
+
23
+ - `useControls.js` keyboard routing — ↑↓ and Enter are conditionally intercepted for suggestion navigation only on step 0 when suggestions are visible; all other steps preserve existing behavior
24
+ - `ContainerCreationPrompt.jsx` — renders `SuggestionPanel` below the image input field on step 0
25
+
26
+ ## [3.2.1] - 2026-04-27
27
+
28
+ ### Changed
29
+
30
+ - Unified `normalizeImageName` into a single `src/helpers/imageNameUtils.js` module; removed duplicate definitions from `validationHelpers.js` and `containerActions.js`.
31
+ - Added Prettier and EditorConfig for automatic code formatting enforcement; 37 source files reformatted to consistent style (single quotes, 2-space indent, trailing commas ES5).
32
+ - Added `eslint-config-prettier` to disable ESLint rules that conflict with Prettier.
33
+ - Added `format` and `format:check` npm scripts.
34
+
35
+ ### Fixed
36
+
37
+ - Missing `.jsx` extension on `import App from './App'` in `src/index.js` (ESM correctness).
38
+
39
+ ## [3.2.0] - 2026-04-25
40
+
41
+ ### Added
42
+
43
+ - `IMAGE_PROFILES` map in `src/helpers/constants.js` — defines `requiredEnv` and `defaultPort` per image type (mysql, mariadb, postgres, mongo, mssql, redis).
44
+ - `DB_IMAGES` constant exported from `src/helpers/constants.js`.
45
+ - Contextual validation in wizard: if image matches a known profile, required env vars are enforced before creation.
46
+ - Auto-assigned port feedback: after successful container creation, the success message shows which ports were mapped (e.g. `Ports: 3306→3306/tcp`).
47
+ - Image name normalization: tags and registry prefixes are stripped before profile lookup (`mysql:8`, `docker.io/library/postgres:16` → `mysql`, `postgres`).
48
+ - New test files: `test/containerOptionsBuilder.test.js`, `test/useControls.dom.test.js`.
49
+
50
+ ### Fixed
51
+
52
+ - `validateEnvVars()` was never called in the container creation wizard step 3 — now connected and blocks on invalid input.
53
+ - Env var parsing split on all `=` characters — fixed to split only on the first `=`, preserving values like `JWT=abc=def`.
54
+ - `dbImages` was hardcoded in `useControls.js` — now imports `DB_IMAGES` from constants.
55
+
10
56
  ## [3.1.9] - 2026-04-11
11
57
 
12
58
  ### Changed
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+ # Security
2
+
3
+ If you discover a security vulnerability, please report it privately to the repository owner.
4
+
5
+ Do not disclose vulnerabilities publicly until they are resolved.
@@ -0,0 +1,17 @@
1
+ const React = require('react');
2
+ exports.Box = ({ children, ...props }) =>
3
+ React.createElement('div', { ...props }, children);
4
+ exports.Text = ({ children, color }) =>
5
+ React.createElement('span', { 'data-color': color }, children);
6
+
7
+ // Capture the last registered useInput handler so tests can simulate keypresses.
8
+ let _inputHandler = null;
9
+ exports.useInput = (fn) => { _inputHandler = fn; };
10
+ /** Simulate a keypress through the last registered useInput handler. */
11
+ exports.__triggerInput = (input, key = {}) => {
12
+ if (_inputHandler) _inputHandler(input, key);
13
+ };
14
+ /** Reset captured handler between tests. */
15
+ exports.__resetInput = () => { _inputHandler = null; };
16
+
17
+ exports.useApp = () => ({ exit: () => {} });